PageSourceSearch

https://business.leat.com/assets/index-BK9VUuN1.js

js leat.com collected 2026-10-02 04:33:38 UTC 1,207,819 bytes, 126 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CRMRoutes-DYC0l0TN.js","assets/rolldown-runtime-B0FivtK6.js","assets/emptyState-CA9lBoXx.js","assets/DragAndDropContext-uQGDNYeU.js","assets/select-BOVOC0Hn.js","assets/preload-helper-zy4ixF42.js","assets/linkButton-L2AdAfiF.js","assets/thumbnail-3I6z4AqV.js","assets/useModal-34n-Jh4D.js","assets/SidebarRouteItem-Bu_9atOr.js","assets/ContactsMultiSelectFilter-cvAe7aVO.js","assets/OptionLayoutWithDescription-8QlGl33W.js","assets/TableRowInteractive-Bts9G2K4.js","assets/schemas-C1dcpHaF.js","assets/arrow-left-right-BRO0gpuE.js","assets/Overview-D54_Nb-x.js","assets/calendar-clock-CjPHapwW.js","assets/clipboard-check-ZcnvxmVW.js","assets/credit-card-Cx3TxgUZ.js","assets/package-CfYLZNZW.js","assets/useScheduleDescriptions-DEI6EL5N.js","assets/receipt-Eq02qcAj.js","assets/share-2-rg5EcANi.js","assets/ticket-plus-BwHp_NTw.js","assets/trending-up-BY_zfypm.js","assets/user-plus-CkT_fH2W.js","assets/categoryHelper-BAsvOAQW.js","assets/TableCellNumericQuantitative-BP6FjQIP.js","assets/ComboBoxMultiSelectFilter-DFkHfLn9.js","assets/style-BPsjiLzc.js","assets/EditorPanelContent-DvsbTH4M.js","assets/DevicesContext-ki5VgW0Q.js","assets/useEditorPanels-BLOUo-e6.js","assets/LoadingScreen-zPapaIZC.js","assets/with-selector-Cki7t-cC.js","assets/TipTapSimple-iPSAx4O6.js","assets/useImports-BD4x2tGF.js","assets/ImportsContext-W6TswjAM.js","assets/ContactTypeOptionsContext-DPKrNJnd.js","assets/useLocales-D0foCj0p.js","assets/Overview-DGz-l_hK.js","assets/SubscriptionTypesContext-DaeCH_qb.js","assets/useContactLists-CFZNu73j.js","assets/TiersContext-B6NQJ922.js","assets/TabItem-CPgFxD5B.js","assets/value-D3u9nB52.js","assets/style-DLioOiRN.css","assets/FormGroup-DR38SSV1.js","assets/RewardsContext-CFFVT5aA.js","assets/slider-CnkbXMYa.js","assets/eye-off-DImJ_w9f.js","assets/grip-vertical-788HAxTc.js","assets/list-n0sPTOgw.js","assets/FileSaver.min-Br_bjukO.js","assets/StampCardProgramsContext-D-fs7fN2.js","assets/esm-Cnbg4v22.js","assets/TableCellWithLinkAndThumbnail-DEpUbjYx.js","assets/WalletPassEntityCard-BQUbpv0e.js","assets/fingerprint-pattern-TAl72PfH.js","assets/readOnlyWithCopy-Coh211OK.js","assets/clipboard-DFcMMNj8.js","assets/useAutomations-V0KCXD5O.js","assets/TierMultiSelect-6FZtoM9Y.js","assets/AutomatedEmailsContext-C7Kg577W.js","assets/remove-model-namespace-NKKqsuoa.js","assets/webhook-Cy3Po4H1.js","assets/zap-DPWCOtw6.js","assets/useFeatures-BU4k7dpC.js","assets/AutomationsContext-DgrriIU0.js","assets/usePanel-B22q3xCJ.js","assets/useContactAttributes-P3a3pHDg.js","assets/UnitSelect-Cy8d3KWM.js","assets/useForms-BkFmSpIU.js","assets/FormsContext-CJBelwbB.js","assets/PromotionSelect-q6koHKMe.js","assets/WithPromotions-DvbJX6zU.js","assets/hash-DM5aaVW8.js","assets/WalletPassGiftcardPreview-TuhDDYUs.js","assets/GenerateColors-DWk9QARF.js","assets/FontSelect-AS3qXr3w.js","assets/user-BpbZrPJa.js","assets/useFonts-Ow1yZ3n1.js","assets/FontsContext-CVOH2hFF.js","assets/FormEditorContext-CW0AHO6D.js","assets/Stat-DH0dn_u7.js","assets/workflow-CDtNYSZo.js","assets/refresh-ccw-CVdXKyJR.js","assets/refresh-cw-DVum_YpU.js","assets/repeat-Dgd2Ys8P.js","assets/SingleSelectFilter-HmDzHchj.js","assets/GoogleAuthButtonStylePicker-8TIbpiWC.js","assets/CardActions-_0UvUxPD.js","assets/ToggleButtonGroup-CMV66mBH.js","assets/ContactFileTypesContext-BSexv3pg.js","assets/BannerActions-CcK2ioWA.js","assets/SimpleHeader-BHY52jp_.js","assets/BusinessProfilesMultiSelectFilter-C3jZ84m3.js","assets/DisplayValueWithAvatar-UjnI5Nsn.js","assets/GiftcardProgramSelect-C9R4g72N.js","assets/GiftcardProgramsContext-D0HRRIVr.js","assets/StepsBar-BemPmKkY.js","assets/CodeSnippet-CIsgzEIZ.js","assets/Runs-R8Z0eV_I.js","assets/CartesianChart-DeFYwjDv.js","assets/with-selector-Bq3pfwox.js","assets/TableHeaderSticky-BEmgnk4d.js","assets/NumbersFilter-Cz1bxc1-.js","assets/useVoucherInfo-Ckl4SB0Y.js","assets/DigitalRewardSelect-IwM3vwto.js","assets/useGiftcardProgram-jdpJXclS.js","assets/GiftcardProgramContext-LLuxeWdy.js","assets/types-C24ZQfGz.js","assets/tooltipContext-Des0krsy.js","assets/AreaChart-BL9n3KRA.js","assets/YAxis-Cy0C0pG7.js","assets/BarChart-DZQLf_f6.js","assets/chart-CC4FV1Nj.js","assets/TableCellWithAvatar-ws03-nvf.js","assets/CRMRoutes-XWrk_seD.css","assets/DataRoutes-ClgHaAhX.js","assets/a-large-small-CuZGr_-0.js","assets/Overview-psj-V_UH.js","assets/BooleanFilter-CgVLM65d.js","assets/ContactsSearchSingleSelectUsingUuid-tcl1z_L8.js","assets/SelectionWrapper-D09dqKdM.js","assets/banknote-CtETzOJ9.js","assets/database-CcDddtpo.js","assets/corner-down-left-B2V
1dwMxB.js","assets/useArrayFormatter-BGKpBEDU.js","assets/circle-alert-DotGSrJu.js","assets/circle-plus-BHXDhQBy.js","assets/mail-check-KbVhEYGs.js","assets/BusinessProfileSelectUsingUuid-RRB4of2k.js","assets/Vouchers-Dz9Dqu9B.js","assets/shield-alert-C2FtDC4x.js","assets/type-KCeokH1l.js","assets/SummaryLine-BnqHu86W.js","assets/SubscriptionTypeSelect-B-Wp1QY0.js","assets/DisplayValueWithDescription-DQooQYvE.js","assets/PieChart-DHbMfiMl.js","assets/LineChart-y4-FoUd_.js","assets/CountUp-ia1QrT_s.js","assets/useDecimal-DABiB-oY.js","assets/DataRoutes-XZhIfyh6.css","assets/AppsRoutes-Dhgt5tvC.js","assets/Duration-BwHRNISS.js","assets/Duration-DcDYQwmu.css","assets/hourglass-Dw7OMz1m.js","assets/esm-nt2UxGDf.js","assets/StatusIndicator-Cvp0acB4.js","assets/tablet-smartphone-Ff6lJ4Ee.js","assets/ListWrapper-C89ST9bv.js","assets/layers-D-6u1X9Z.js","assets/endOfDay-BTsFY9k5.js","assets/store-CPHOnR5_.js","assets/wallet-DuukY8DA.js","assets/WithIntegrations-BTOMVsBA.js","assets/Divider--Lfc6Iea.js","assets/CardSection-D3kdRPnW.js","assets/SelectComboBoxDropdown-uabx4k8a.js","assets/useIntegrations-CHoYsyAe.js","assets/AppsRoutes-DohOT8Oc.css","assets/StoreRoutes-CEELi3Wl.js","assets/BusinessProfileMultiselectTableFilter-BgbinKBi.js","assets/lightbulb-DTRa3X--.js","assets/StripcardProgramContext-CfXam-88.js","assets/text-quote-D4bf6X03.js","assets/upload-y-T0Jdox.js","assets/GeneralInfo-Db4ATKm3.js","assets/useGiftcardAttributes-BGVMcT6X.js","assets/IssuanceStatusBadge-437_lXWy.js","assets/LoyaltyRoutes-gpL7pITw.js","assets/accountDay-DtxzJ3J_.js","assets/Overview-H1uZlDEg.js","assets/plug-BmQId-jA.js","assets/user-round-BJZL2260.js","assets/differenceInDays-DnI9e6ux.js","assets/Yearly-MVDpfrLZ.js","assets/TableCellNumericQualitative-B9LrD_Rt.js","assets/SettingsRoutes-DAoJlq0v.js","assets/fuse-CVIcQgA_.js","assets/useRecurringEmailInfo-CUj4aNHY.js","assets/useTheme-DDjwjQhx.js","assets/chunk-R2AL7SRX-DYwra3Z2.js","assets/useRecurringEmailInfo-DGspHJkl.css","assets/useLanguages-CeBrQQ57.js","assets/calendar-sync-CMswUknD.js","assets/useBusinessProfileTypes-C2mJd55t.js","assets/ChartSeriesLegend-BkCOaDHS.js","assets/SettingsRoutes-_SWK7wBL.css","assets/AdvancedRoutes-Icf0J_6_.js","assets/ErrorHasOccurred-CSZFSwYR.js","assets/MarketingRoutes-CsSXU_8i.js","assets/sparkle-CrHXNIck.js","assets/AutomationRoutes-q5EbgXBH.js"])))=>i.map(i=>d[i]);
2(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`faf2b30e3eaa2d91afa37d88c450dfaf623cf3a0`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`5b44b6bd-d48b-401f-9fef-2ad0561f384a`,e._sentryDebugIdIdentifier=`sentry-dbid-5b44b6bd-d48b-401f-9fef-2ad0561f384a`)}catch{}})();import{o as e,t}from"./rolldown-runtime-B0FivtK6.js";import{$ as n,$t as r,A as i,B as a,C as o,Ct as s,D as c,Et as l,F as u,G as d,H as f,K as p,O as m,P as h,Q as g,Qt as _,R as v,S as y,U as b,V as x,W as S,X as C,Y as w,Z as T,_ as E,_t as ee,a as D,at as te,b as ne,c as O,ct as re,d as k,en as ie,et as A,g as ae,h as oe,i as se,k as ce,l as le,lt as j,nt as ue,o as de,q as fe,r as pe,rt as me,s as he,t as ge,tt as _e,u as M,ut as ve,w as N,xt as ye,y as be,z as xe}from"./emptyState-CA9lBoXx.js";import{n as Se}from"./DragAndDropContext-uQGDNYeU.js";import{$r as Ce,A as we,Aa as Te,Ar as Ee,Ba as De,C as Oe,Cr as ke,Ct as Ae,D as je,Dn as Me,Ei as Ne,Et as Pe,F as Fe,G as Ie,Ga as Le,Gt as Re,Ha as ze,Hn as Be,Ht as Ve,I as He,Ia as P,Ir as Ue,J as We,Ja as Ge,Ji as Ke,Jr as qe,Jt as Je,K as Ye,Ka as Xe,Kr as Ze,Kt as Qe,L as $e,La as et,M as tt,Ma as nt,Mr as rt,N as it,Na as at,Nn as ot,Nr as st,O as ct,Oa as lt,On as ut,Or as dt,P as ft,Pa as pt,Pr as mt,Q as ht,Qr as gt,Ra as _t,Rn as vt,Rr as yt,Si as bt,Tt as xt,U as St,Ua as Ct,V as wt,Va as Tt,Vr as Et,W as Dt,Wa as Ot,Wr as kt,Wt as At,X as jt,Xn as Mt,Y as Nt,Yi as Pt,Yr as Ft,Yt as It,Z as Lt,Zn as Rt,Zr as zt,_ as Bt,_t as Vt,ai as Ht,ar as Ut,bi as Wt,br as Gt,bt as Kt,c as qt,cn as Jt,cr as Yt,di as Xt,dr as Zt,ei as Qt,en as $t,f as en,ft as tn,g as nn,gi as rn,hr as an,i as on,ii as sn,in as cn,ir as ln,jr as un,k as dn,ka as f
2n,kr as pn,l as mn,li as hn,ln as gn,lr as _n,mr as vn,n as yn,ni as bn,nn as xn,on as F,or as Sn,pr as Cn,pt as wn,q as Tn,qa as En,qr as Dn,qt as On,rn as kn,rr as An,si as jn,sr as Mn,t as Nn,ti as Pn,tn as Fn,v as In,vt as Ln,w as Rn,wr as zn,xi as Bn,xr as Vn,xt as Hn,y as Un,yn as Wn,yr as Gn,z as Kn,za as qn,zr as Jn}from"./select-BOVOC0Hn.js";import{n as Yn,t as Xn}from"./preload-helper-zy4ixF42.js";import{A as Zn,B as Qn,D as $n,I as er,L as tr,M as nr,O as rr,P as ir,R as ar,S as or,V as sr,_ as cr,a as lr,b as ur,g as dr,i as fr,k as pr,o as mr,r as hr,t as gr,w as _r,y as vr,z as yr}from"./linkButton-L2AdAfiF.js";import{$ as br,$t as xr,Bn as Sr,Ct as Cr,Dt as wr,En as Tr,Fn as Er,Gt as Dr,Ht as Or,Jt as kr,Kn as Ar,Kt as jr,Lt as Mr,Mn as Nr,Nt as Pr,Qt as Fr,Rn as Ir,Sn as Lr,St as Rr,Tt as zr,Ut as Br,Vn as Vr,Vt as Hr,Wn as Ur,Wt as Wr,Xn as Gr,Xt as Kr,Yn as qr,Yt as Jr,Z as Yr,Zn as Xr,Zt as Zr,_ as Qr,_n as $r,a as ei,an as ti,ar as ni,bn as ri,c as ii,cn as ai,d as oi,dn as si,en as ci,et as li,f as ui,fn as di,g as fi,h as pi,hn as mi,i as hi,in as gi,ir as _i,jn as vi,kn as yi,kt as bi,l as xi,ln as Si,m as Ci,mn as wi,n as Ti,nn as Ei,nr as Di,o as Oi,on as ki,ot as Ai,p as ji,pn as Mi,qt as Ni,r as Pi,rn as Fi,rr as Ii,s as Li,sn as Ri,t as zi,tn as Bi,u as Vi,un as Hi,xn as Ui,xt as Wi,y as Gi,yn as Ki,yt as qi}from"./useModal-34n-Jh4D.js";import{A as Ji,B as Yi,C as Xi,D as Zi,E as Qi,F as $i,H as ea,I as ta,J as na,K as ra,L as ia,M as aa,N as oa,O as sa,P as ca,R as la,S as ua,U as da,V as fa,W as pa,_ as ma,a as ha,b as ga,c as _a,d as va,f as ya,g as ba,h as xa,i as Sa,j as Ca,k as wa,l as Ta,m as Ea,n as Da,o as Oa,p as ka,q as Aa,r as ja,s as Ma,t as Na,u as Pa,v as Fa,w as Ia,x as La,y as Ra,z as za}from"./fuse-CVIcQgA_.js";import{D as Ba,E as Va,T as Ha,_ as Ua,a as Wa,b as Ga,c as Ka,d as qa,f as Ja,g as Ya,h as Xa,k as Za,l as Qa,m as $a,n as eo,o as to,p as 
2no,r as ro,s as io,t as ao,u as oo,v as so,w as co,y as lo}from"./SidebarRouteItem-Bu_9atOr.js";import{t as uo}from"./thumbnail-3I6z4AqV.js";import{t as fo}from"./arrow-left-right-BRO0gpuE.js";import{n as po}from"./database-CcDddtpo.js";import{_ as mo,a as ho,f as go,g as _o,h as vo,i as yo,l as bo,m as xo,n as So,o as Co,p as wo,r as To,s as Eo,t as Do,u as Oo,v as ko,y as Ao}from"./useLanguages-CeBrQQ57.js";import{n as jo,t as Mo}from"./hourglass-Dw7OMz1m.js";import{a as No,i as Po,n as Fo,r as Io}from"./RewardsContext-CFFVT5aA.js";import{t as Lo}from"./calendar-clock-CjPHapwW.js";import{n as Ro,t as zo}from"./corner-down-left-B2VdwMxB.js";import{t as Bo}from"./circle-plus-BHXDhQBy.js";import{a as Vo,c as Ho,n as Uo,o as Wo,r as Go,s as Ko,t as qo}from"./esm-nt2UxGDf.js";import{t as Jo}from"./credit-card-Cx3TxgUZ.js";import{t as Yo}from"./eye-off-DImJ_w9f.js";import{n as Xo,r as Zo,t as Qo}from"./tablet-smartphone-Ff6lJ4Ee.js";import{t as $o}from"./hash-DM5aaVW8.js";import{t as es}from"./layers-D-6u1X9Z.js";import{n as ts,r as ns,t as rs}from"./DevicesContext-ki5VgW0Q.js";import{t as is}from"./mail-check-KbVhEYGs.js";import{n as as,r as os,t as ss}from"./user-BpbZrPJa.js";import{t as cs}from"./workflow-CDtNYSZo.js";import{n as ls,t as us}from"./endOfDay-BTsFY9k5.js";import{t as ds}from"./receipt-Eq02qcAj.js";import{t as fs}from"./refresh-cw-DVum_YpU.js";import{t as ps}from"./repeat-Dgd2Ys8P.js";import{n as ms,r as hs,t as gs}from"./StripcardProgramContext-CfXam-88.js";import{t as _s}from"./share-2-rg5EcANi.js";import{t as vs}from"./shield-alert-C2FtDC4x.js";import{n as ys,t as bs}from"./StampCardProgramsContext-D-fs7fN2.js";import{t as xs}from"./store-CPHOnR5_.js";import{t as Ss}from"./upload-y-T0Jdox.js";import{t as Cs}from"./wallet-DuukY8DA.js";import{t as ws}from"./webhook-Cy3Po4H1.js";import{t as Ts}from"./zap-DPWCOtw6.js";import{t as Es}from"./CardActions-_0UvUxPD.js";import{n as Ds,t as Os}from"./ToggleButtonGroup-CMV66mBH.js";import{t as ks}from"./differenceInDays-DnI9e6ux.js";import{r as As,t as js}from"./LoadingScreen-zPapaIZC.js";import{n as Ms,r as Ns,t as Ps}from"./ContactFileTypesContext-BSexv3pg.js";import{i as Fs,n as Is,r as Ls,t as Rs}from"./SubscriptionTypesContext-DaeCH_qb.js";import{t as zs}from"./BannerActions-CcK2ioWA.js";import{t as Bs}from"./useFeatures-BU4k7dpC.js";import{$ as Vs,A as Hs,At as Us,B as Ws,C as Gs,Ct as Ks,D as qs,Dt as Js,E as Ys,Et as Xs,G as Zs,H as Qs,J as $s,K as ec,L as tc,M as nc,Mt as rc,N as ic,Nt as ac,O as oc,Ot as sc,P as cc,Pt as lc,Q as uc,S as dc,St as fc,T as pc,Tt as mc,U as hc,V as gc,W as _c,X as vc,Y as yc,Z as bc,_ as xc,_t as Sc,a as Cc,at as wc,b as Tc,bt as Ec,c as Dc,ct as Oc,d as kc,dt as Ac,et as jc,f as Mc,ft as Nc,g as Pc,gt as Fc,h as Ic,ht as Lc,i as Rc,it as zc,j as Bc,jt as Vc,k as Hc,kt as Uc,l as Wc,lt as Gc,m as Kc,mt as qc,n as Jc,nt as Yc,o as Xc,ot as Zc,p as Qc,pt as $c,q as el,r as tl,rt as nl,s as rl,st as il,tt as al,u as ol,ut as sl,v as cl,vt as ll,w as ul,wt as dl,x as fl,xt as pl,y as ml,yt as hl,z as gl}from"./ErrorHasOccurred-CSZFSwYR.js";import{n as _l,t as vl}from"./useTheme-DDjwjQhx.js";import{t as yl}from"./FormsContext-CJBelwbB.js";import{n as bl}from"./AutomatedEmailsContext-C7Kg577W.js";import{t as xl}from"./AutomationsContext-DgrriIU0.js";import{t as Sl}from"./ContactTypeOptionsContext-DPKrNJnd.js";import{t as Cl}from"./FontsContext-CVOH2hFF.js";import{t as wl}from"./GiftcardProgramsContext-D0HRRIVr.js";import{t as Tl}from"./ImportsContext-W6TswjAM.js";import{n as El}from"./WithIntegrations-BTOMVsBA.js";import{n as Dl}from"./WithPromotions-DvbJX6zU.js";import{t as Ol}from"./TiersContext-B6NQJ922.js";import{t as kl}from"./GiftcardProgramContext-LLuxeWdy.js";import{t as Al}from"./usePanel-B22q3xCJ.js";import{t as jl}from"./Divider--Lfc6Iea.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var I=typeof window<`u`?window:void 0,Ml=typeof globalThis<`u`?globalThis:I,Nl=Ml?.navigator,L=Ml?.document,Pl=Ml?.location,Fl
2=Ml?.fetch,Il=Ml!=null&&Ml.XMLHttpRequest&&`withCredentials`in new Ml.XMLHttpRequest?Ml.XMLHttpRequest:void 0,Ll=Ml?.AbortController,Rl=Ml?.CompressionStream,zl=Nl?.userAgent;function Bl(){return!(!I||!1===I.navigator.onLine)}var Vl=typeof globalThis<`u`?globalThis:I;Vl&&typeof self>`u`&&(Vl.self=Vl),Vl&&typeof File>`u`&&(Vl.File=function(){});var R=I??{},Hl={DEBUG:!1,LIB_VERSION:`0.5.0`,LIB_NAME:`browser-common`};function Ul(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function Wl(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Ul(a,r,i,o,s,`next`,e)}function s(e){Ul(a,r,i,o,s,`throw`,e)}o(void 0)}))}}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(null,arguments)}function Gl(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Kl=e=>{if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}};function ql(e){return typeof e==`string`||e}function Jl(e){return typeof e==`string`?e:void 0}var Yl,Xl=`$feature_flag.$feature_flag_response.$feature_flag_has_experiment.$feature_flag_id.$feature_flag_version.$feature_flag_reason.$feature_flag_request_id.$feature_flag_evaluated_at.$feature_flag_error.locally_evaluated.$groups.$process_person_profile.$geoip_disable.$current_url.$pathname.$referring_domain.utm_source.utm_medium.utm_campaign.utm_content.utm_term.gad_source.mc_cid.gclid.gclsrc.dclid.gbraid.wbraid.fbclid.msclkid.twclid.li_fat_id.igshid.ttclid.rdt_cid.epik.qclid.sccid.irclid._kx.$session_id.$window_id.$lib.$lib_version.$device_id.$is_server`.split(`.`),Zl=function(e){return e.AnonymousId=`anonymous_id`,e.DistinctId=`distinct_id`,e.Props=`props`,e.EnablePersonProcessing=`enable_person_processing`,e.PersonMode=`person_mode`,e.FeatureFlagDetails=`feature_flag_details`,e.FeatureFlags=`feature_flags`,e.FeatureFlagPayloads=`feature_flag_payloads`,e.BootstrapFeatureFlagDetails=`bootstrap_feature_flag_details`,e.BootstrapFeatureFlags=`bootstrap_feature_flags`,e.BootstrapFeatureFlagPayloads=`bootstrap_feature_flag_payloads`,e.OverrideFeatureFlags=`override_feature_flags`,e.Queue=`queue`,e.AiQueue=`ai_queue`,e.LogsQueue=`logs_queue`,e.OptedOut=`opted_out`,e.SessionId=`session_id`,e.SessionStartTimestamp=`session_start_timestamp`,e.SessionLastTimestamp=`session_timestamp`,e.PersonProperties=`person_properties`,e.GroupProperties=`group_properties`,e.InstalledAppBuild=`installed_app_build`,e.InstalledAppVersion=`installed_app_version`,e.SessionReplay=`session_replay`,e.PushRegistered=`push_registered`,e.SessionReplayEventTriggerActivatedSession=`session_replay_event_trigger_activated_session`,e.SurveyLastSeenDate=`survey_last_seen_date`,e.SurveysSeen=`surveys_seen`,e.Surveys=`surveys`,e.RemoteConfig=`remote_config`,e.FlagsEndpointWasHit=`flags_endpoint_was_hit`,e.DeviceId=`device_id`,e}({}),Ql=function(e){return e.GZipJS=`gzip-js`,e.Base64=`base64`,e}({}),$l=[`$snapshot`,`$pageview`,`$pageleave`,`$set`,`survey dismissed`,`survey sent`,`survey shown`,`$identify`,`$groupidentify`,`$create_alias`,`$$client_ingestion_warning`,`$web_experiment_applied`,`$feature_enrollment_update`,`$feature_flag_called`],eu=[`token`],tu=`NativeGzipValidationError`,nu=e=>e.length>=2&&e[0]===31&&e[1]===139,ru=(e,t)=>e===Ql.GZipJS||t===Ql.GZipJS||t===`gzip`,iu=e=>!(!e||typeof e!=`object`)&&(`name`in e?String(e.name):``)===`NotReadableError`,au=e=>{var t=Error(`Native gzip produced invalid output: `+e);throw t.name=tu,t},ou=function(){var e=Wl((function*(e,t){18>e.size&&au(`too-short`);var n=new Uint8Array(yield e.slice(0,10).arrayBuffer());nu(n)&&n[2]===8||au(`invalid-header`);var r=new DataView(yield e.slice(e.size-8).arrayBuffer());r.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(Yl)return Yl;Yl=[];for(var e=0;256>e;e++){for(var t=e,n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;Yl[e]=t>>>0}return Yl})(),n=4294967295,r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0})(t)&&au(`invalid-crc`);var i=t.length>>>0;r.getUint32(4,!0)!==i&&au(`invalid-size`)}));return function(t,n){return e.apply(this,arguments)}}();
2function su(){return su=Wl((function*(e,t,n){t===void 0&&(t=!0);try{var r=new TextEncoder().encode(e),i=new globalThis.CompressionStream(`gzip`),a=i.writable.getWriter(),o=a.write(r).then((()=>a.close())).catch(function(){var e=Wl((function*(e){try{yield a.abort(e)}catch{}throw e}));return function(t){return e.apply(this,arguments)}}()),s=new Response(i.readable).blob(),c=(yield Promise.all([s,o]))[0];return yield ou(c,r),c}catch(e){if(n!=null&&n.rethrow)throw e;return t&&console.error(`Failed to gzip compress data`,e),null}})),su.apply(this,arguments)}var cu=`amazonbot,amazonproductbot,app.hypefactors.com,applebot,archive.org_bot,awariobot,backlinksextendedbot,baiduspider,bingbot,bingpreview,chrome-lighthouse,dataforseobot,deepscan,duckduckbot,facebookexternal,facebookcatalog,http://yandex.com/bots,hubspot,ia_archiver,leikibot,linkedinbot,meta-externalagent,mj12bot,msnbot,nessus,petalbot,pinterest,prerender,rogerbot,screaming frog,sebot-wa,sitebulb,slackbot,slurp,trendictionbot,turnitin,twitterbot,vercel-screenshot,vercelbot,yahoo! slurp,yandexbot,zoombot,bot.htm,bot.php,(bot;,bot/,crawler,ahrefsbot,ahrefssiteaudit,semrushbot,siteauditbot,splitsignalbot,gptbot,oai-searchbot,chatgpt-user,perplexitybot,better uptime bot,sentryuptimebot,uptimerobot,headlesschrome,cypress,google-hoteladsverifier,adsbot-google,apis-google,duplexweb-google,feedfetcher-google,google favicon,google web preview,google-read-aloud,googlebot,googleother,google-cloudvertexbot,googleweblight,mediapartners-google,storebot-google,google-inspectiontool,bytespider`.split(`,`),lu=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return cu.concat(t).some((e=>{var t=e.toLowerCase();return n.indexOf(t)!==-1}))};function uu(e,t){return e.indexOf(t)!==-1}var du=function(e){return e.trim()},fu=function(e){return e.replace(/^\$/,``)};function pu(e){var t=[];return JSON.stringify(e,(function(e,n){if(typeof n==`bigint`)return n.toString();if(typeof n!=`function`&&typeof n!=`symbol`){if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&typeof n==`object`){for(;t.length>0&&t[t.length-1]!==this;)t.pop();if(t.includes(n))return`[Circular]`;t.push(n)}return n}}))??`null`}var mu=Object.prototype,hu=mu.hasOwnProperty,gu=mu.toString,B=Array.isArray||function(e){return gu.call(e)===`[object Array]`},_u=e=>typeof e==`function`,vu=e=>e===Object(e)&&!B(e),yu=e=>{if(vu(e)){for(var t in e)if(hu.call(e,t))return!1;return!0}return!1},V=e=>e===void 0,bu=e=>gu.call(e)==`[object String]`,xu=e=>bu(e)&&e.trim().length===0,Su=e=>e===null,H=e=>V(e)||Su(e),Cu=e=>gu.call(e)==`[object Number]`&&e==e,wu=e=>Cu(e)&&e>0,Tu=e=>gu.call(e)===`[object Boolean]`,Eu=e=>e instanceof FormData,Du=e=>uu($l,e),Ou=e=>uu(eu,e);function ku(e){return typeof e!=`object`||!e}function Au(e,t){return{}.toString.call(e)===`[object `+t+`]`}function ju(e){return typeof Event<`u`&&Mu(e,Event)}function Mu(e,t){try{return e instanceof t}catch{return!1}}var Nu=[!0,`true`,1,`1`,`yes`],Pu=e=>uu(Nu,e),Fu=[!1,`false`,0,`0`,`no`];function Iu(e,t,n,r,i){return t>n&&(r.warn(`min cannot be greater than max.`),t=n),Cu(e)?e>n?(r.warn(` cannot be  greater than max: `+n+`. Using max value instead.`),n):t>e?(r.warn(` cannot be less than min: `+t+`. Using min value instead.`),t):e:(r.warn(` must be a number. using max or fallback. max: `+n+`, fallback: `+i),Iu(i||n,t,n,r))}var Lu=class{constructor(e){this.tt={},this.et=e.et,this.it=Iu(e.bucketSize,0,100,e.rt),this.nt=Iu(e.refillRate,0,this.it,e.rt),this.st=Iu(e.refillInterval,0,864e5,e.rt)}ot(e,t){var n=Math.floor((t-e.lastAccess)/this.st);n>0&&(e.tokens=Math.min(e.tokens+n*this.nt,this.it),e.lastAccess+=n*this.st)}consumeRateLimit(e){var t,n=Date.now(),r=String(e),i=this.tt[r];return i?this.ot(i,n):this.tt[r]=i={tokens:this.it,lastAccess:n},i.tokens===0||(i.tokens--,i.tokens===0&&((t=this.et)==null||t.call(this,e)),i.tokens===0)}stop(){this.tt={}}},Ru=`Mobile`,zu=`iOS`,Bu=`Android`,Vu=`Tablet`,Hu=Bu+` `+Vu,Uu=`iPad`,Wu=`Apple`,Gu=Wu+` Watch`,Ku=`Safari`,qu=`BlackBerry`,Ju=`Samsung`,Yu=Ju+`Browser`,Xu=Ju+` Internet`,Zu=`Chrome`,Qu=Zu+` OS`,$u=Zu+` `+zu,ed=`Internet Explorer`,td=ed+` `+Ru,nd=`Opera`,rd=nd+` Mini`,id=`Edge`,ad=`Microsoft `+id,od=`Firefox`,sd=od+` `+zu,cd=`Nintendo`,ld=`PlayStation`,ud=`Xbox`,dd=Bu+` `+
2Ru,fd=Ru+` `+Ku,pd=`Windows`,md=pd+` Phone`,hd=`Nokia`,gd=`Ouya`,_d=`Generic`,vd=_d+` `+Ru.toLowerCase(),yd=_d+` `+Vu.toLowerCase(),bd=`Konqueror`,xd=`Oculus Browser`,Sd=`Vivaldi`,Cd=`Yandex`,wd=`Whale`,Td=`DuckDuckGo`,Ed=`Pale Moon`,Dd=`Waterfox`,Od=`Brave`,kd=`Google Search App`,Ad=`(\\d+(\\.\\d+)?)`,jd=RegExp(`Version/`+Ad),Md=new RegExp(ud,`i`),Nd=RegExp(ld+` \\w+`,`i`),Pd=RegExp(cd+` \\w+`,`i`),Fd=RegExp(qu+`|PlayBook|BB10`,`i`),Id={"NT3.51":`NT 3.11`,"NT4.0":`NT 4.0`,"5.0":`2000`,5.1:`XP`,5.2:`XP`,"6.0":`Vista`,6.1:`7`,6.2:`8`,6.3:`8.1`,6.4:`10`,"10.0":`10`},Ld=function(e,t,n,r){return t||=``,function(e){return e!=null&&e.brave?Od:null}(n)||(r!=null&&r.detectGoogleSearchApp&&uu(e,`GSA/`)?kd:uu(e,` OPR/`)&&uu(e,`Mini`)?rd:uu(e,` OPR/`)?nd:Fd.test(e)?qu:uu(e,`IE`+Ru)||uu(e,`WPDesktop`)?td:uu(e,`OculusBrowser`)?xd:uu(e,Yu)?Xu:uu(e,id)||uu(e,`Edg/`)?ad:uu(e,Sd+`/`)?Sd:uu(e,`YaBrowser/`)?Cd:uu(e,wd+`/`)?wd:uu(e,Td+`/`)||uu(e,`Ddg/`)?Td:uu(e,`FBIOS`)?`Facebook `+Ru:uu(e,`UCWEB`)||uu(e,`UCBrowser`)?`UC Browser`:uu(e,`CriOS`)?$u:uu(e,`CrMo`)||uu(e,Zu)?Zu:uu(e,Bu)&&uu(e,Ku)?dd:uu(e,`FxiOS`)?sd:uu(e.toLowerCase(),bd.toLowerCase())?bd:uu(e,Od+`/`)?Od:((e,t)=>t&&uu(t,Wu)||function(e){return uu(e,Ku)&&!uu(e,Zu)&&!uu(e,Bu)}(e))(e,t)?uu(e,Ru)?fd:Ku:uu(e,`PaleMoon/`)?Ed:uu(e,Dd+`/`)?Dd:uu(e,od)?od:uu(e,`MSIE`)||uu(e,`Trident/`)?ed:uu(e,`Gecko`)?od:``)},Rd={[td]:[RegExp(`rv:`+Ad)],[ad]:[RegExp(id+`?\\/`+Ad)],[Zu]:[RegExp(`(`+Zu+`|CrMo)\\/`+Ad)],[$u]:[RegExp(`CriOS\\/`+Ad)],"UC Browser":[RegExp(`(UCBrowser|UCWEB)\\/`+Ad)],[Ku]:[jd],[fd]:[jd],[nd]:[RegExp(`(Opera|OPR)\\/`+Ad)],[od]:[RegExp(od+`\\/`+Ad)],[sd]:[RegExp(`FxiOS\\/`+Ad)],[bd]:[RegExp(`Konqueror[:/]?`+Ad,`i`)],[qu]:[RegExp(qu+` `+Ad),jd],[dd]:[RegExp(`android\\s`+Ad,`i`)],[Xu]:[RegExp(Yu+`\\/`+Ad)],[xd]:[RegExp(`OculusBrowser\\/`+Ad)],[Sd]:[RegExp(Sd+`\\/`+Ad)],[Cd]:[RegExp(`YaBrowser\\/`+Ad)],[wd]:[RegExp(wd+`\\/`+Ad)],[Od]:[RegExp(Od+`\\/`+Ad)],[Td]:[RegExp(`(DuckDuckGo|Ddg)\\/`+Ad)],[Ed]:[RegExp(`PaleMoon\\/`+Ad)],[Dd]:[RegExp(Dd+`\\/`+Ad)],[kd]:[RegExp(`GSA\\/`+Ad)],[ed]:[RegExp(`(rv:|MSIE )`+Ad)],Mozilla:[RegExp(`rv:`+Ad)]},zd=function(e,t,n,r){var i=Rd[Ld(e,t,n,r)];if(V(i))return null;for(var a=0;i.length>a;a++){var o=e.match(i[a]);if(o)return parseFloat(o[o.length-2])}return null},Bd=[[RegExp(ud+`; `+ud+` (.*?)[);]`,`i`),e=>[ud,e&&e[1]||``]],[new RegExp(cd,`i`),[cd,``]],[new RegExp(ld,`i`),[ld,``]],[Fd,[qu,``]],[new RegExp(pd,`i`),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[md,``];if(new RegExp(Ru).test(t)&&!/IEMobile\b/.test(t))return[pd+` `+Ru,``];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=Id[n[1]]||``;return/arm/i.test(t)&&(r=`RT`),[pd,r]}return[pd,``]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[zu,[e[3],e[4],e[5]||`0`].join(`.`)]:[zu,``]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t=``;return e&&e.length>=3&&(t=V(e[2])?e[3]:e[2]),[`watchOS`,t]}],[RegExp(`(`+Bu+` (\\d+)\\.(\\d+)\\.?(\\d+)?|`+Bu+`)`,`i`),e=>e&&e[2]?[Bu,[e[2],e[3],e[4]||`0`].join(`.`)]:[Bu,``]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=[`Mac OS X`,``];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||`0`].join(`.`)),t}],[/Mac/i,[`Mac OS X`,``]],[/CrOS/,[Qu,``]],[/Linux|debian/i,[`Linux`,``]]],Vd=function(e){return Pd.test(e)?cd:Nd.test(e)?ld:Md.test(e)?ud:new RegExp(gd,`i`).test(e)?gd:RegExp(`(`+md+`|WPDesktop)`,`i`).test(e)?md:/iPad/.test(e)?Uu:/iPod/.test(e)?`iPod Touch`:/iPhone/.test(e)?`iPhone`:/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Gu:Fd.test(e)?qu:/(kobo)\s(ereader|touch)/i.test(e)?`Kobo`:new RegExp(hd,`i`).test(e)?hd:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?`Kindle Fire`:/(Android|ZTE)/i.test(e)?new RegExp(Ru).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Bu:Hu:RegExp(`(pda|`+Ru+`)`,`i`).test(e)?vd:new RegExp(Vu,`i`).test(e)&&!RegExp(Vu+` pc`,`i`).test(e)?yd:``},Hd=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ud(e,t){return typeof(n=e)==`string`&&Hd.test(n)?e:t();var n}function Wd(e){return e&&e.split(`#`)[0]}function Gd(e,t){var n=setTimeout(e,t);return n!=null&&n.unref&&n?.unref(),n}function Kd(e,t,n){return qd.apply(this,arguments)}
2function qd(){return(qd=Wl((function*(e,t,n){var r;try{return yield Promise.race([e,new Promise(((e,i)=>{r=Gd((()=>{try{n?.(),e()}catch(e){i(e)}}),t)}))])}finally{clearTimeout(r)}}))).apply(this,arguments)}var Jd=e=>e instanceof Error,Yd={trace:{text:`TRACE`,number:1},debug:{text:`DEBUG`,number:5},info:{text:`INFO`,number:9},warn:{text:`WARN`,number:13},error:{text:`ERROR`,number:17},fatal:{text:`FATAL`,number:21}},Xd=Yd.info;function Zd(e){if(Tu(e))return{boolValue:e};if(typeof e==`number`)return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e==`string`)return{stringValue:e};if(B(e))return{arrayValue:{values:e.map((e=>Zd(e)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function Qd(e){var t=[];for(var n in e){var r=e[n];Su(r)||V(r)||t.push({key:n,value:Zd(r)})}return t}function $d(e,t){var n=Yd[e.level||`info`]||Xd,r=n.text,i=n.number,a=String(Date.now())+`000000`,o={};t.distinctId&&(o.posthogDistinctId=t.distinctId),t.sessionId&&(o.sessionId=t.sessionId),t.windowId&&(o[`window.id`]=t.windowId),H(t.sessionStartTimestamp)||(o.sessionStartTimestamp=String(t.sessionStartTimestamp)),H(t.lastActivityTimestamp)||(o.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(o[`url.full`]=t.currentUrl),t.screenName&&(o[`screen.name`]=t.screenName),t.appState&&(o[`app.state`]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(o.feature_flags=t.activeFeatureFlags);var s=z({},o,e.attributes||{}),c={timeUnixNano:a,observedTimeUnixNano:a,severityNumber:i,severityText:r,body:{stringValue:e.body},attributes:Qd(s)};return e.trace_id&&(c.traceId=e.trace_id),e.span_id&&(c.spanId=e.span_id),V(e.trace_flags)||(c.flags=e.trace_flags),c}function ef(e,t,n){return z({},e.resourceAttributes,{"service.name":e.serviceName||`unknown_service`},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":t,"telemetry.sdk.version":n})}function tf(e,t,n,r){return{resourceLogs:[{resource:{attributes:Qd(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}var nf=class{constructor(e,t,n,r,i,a,o){a===void 0&&(a=()=>Promise.resolve()),this._instance=e,this.Ne=t,this.rt=n,this.ut=r,this.ht=i,this.dt=a,this.vt=o,this.ct=null,this.ft=0,this.yt=0,this.bt=0,this._t=0,this.wt=!1,this.kt=t.maxBufferSize,this.xt=Math.max(t.maxQueueSize??t.maxBufferSize,t.maxBufferSize),this.St=t.flushIntervalMs,this.Ct=t.maxBatchRecordsPerPost,this.Mt=t.rateCapWindowMs,this.Tt=t.maxLogsPerInterval}reset(){this.Et(),this.ct=null,this.bt=0,this._t=0,this.wt=!1,this.ft=0,this.yt=0,this.Ct=this.Ne.maxBatchRecordsPerPost}onReconnect(){this.yt=0,this.It()}captureLog(e){if(!this._instance.isDisabled&&!this._instance.optedOut&&e!=null&&e.body){var t=this.Pt(e);if(t!==null){if(t.body){if(this.Rt()){var n={record:$d(t,this.ut())};this.ht((()=>this.At(n)))}}else this.rt.info(`Log was rejected in beforeSend function`)}}}Pt(e){var t=this.Ne.beforeSend;if(!t)return e;var n=B(t)?t:[t],r=e;for(var i of n)try{var a=i(r);if(!a)return this.rt.info(`Log was rejected in beforeSend function`),null;r=a}catch(e){return this.rt.error(`Error in beforeSend function for log:`,e),null}return r}Rt(){if(this.Tt===void 0)return!0;var e=Date.now(),t=e-this.bt;return this.Mt>t&&t>=0||(this.bt=e,this._t=0,this.wt=!1),this.Tt>this._t?(this._t++,!0):(this.wt||=(this.rt.warn(`captureLog dropping logs: exceeded `+this.Tt+` logs per `+this.Mt+`ms`),!0),!1)}flush(){var e=this;return Wl((function*(){if(!e._instance.isDisabled)return e.ct||=e.Ft().finally((()=>{e.ct=null})),e.ct}))()}Ft(){var e=this;return Wl((function*(){e.Et();var t=e._instance.getPersistedProperty(Zl.LogsQueue)??[];if(t.length!==0)for(var n=t.length,r=0;t.length>0&&n>r;){e.ft=0;var i=Math.min(t.length,e.Ct),a=t.slice(0,i),o=tf(a.map((e=>e.record)),e.Lt(),e.vt??e._instance.getLibraryId(),e._instance.getLibraryVersion()),s=yield e._instance.Ot(o);if(s.kind===`too-large`&&a.length>1)e.Ct=Math.max(1,Math.floor(a.length/2)),e.rt.warn(`Received 413 when sending logs batch of size `+a.length+`, reducing batch size to `+e.Ct);else if(s.kind===`retry-later`||(s.kind===`too-large`?e.rt.warn(`Dropping a single log record after 413 with batch size 1 — the record 
2is larger than the server cap and cannot be split further.`):s.kind===`ok`&&e.Ne.maxBatchRecordsPerPost>e.Ct&&(e.Ct=Math.min(e.Ne.maxBatchRecordsPerPost,e.Ct+1)),yield e.Dt(a.length),t=e._instance.getPersistedProperty(Zl.LogsQueue)??[],r+=a.length,s.kind===`fatal`))throw s.error}}))()}Dt(e){var t=this;return Wl((function*(){var n=Math.max(0,e-t.ft),r=t._instance.getPersistedProperty(Zl.LogsQueue)??[];t._instance.setPersistedProperty(Zl.LogsQueue,r.slice(n)),yield t.dt()}))()}Lt(){return ef(this.Ne,this._instance.getLibraryId(),this._instance.getLibraryVersion())}At(e){if(!this._instance.optedOut){var t=this._instance.getPersistedProperty(Zl.LogsQueue)??[];this.xt>t.length||(t.shift(),this.ft++,this.rt.info(`Logs queue is full, dropping oldest record.`)),t.push(e),this._instance.setPersistedProperty(Zl.LogsQueue,t),this.kt>t.length?this.$t():this.It()}}$t(e){e===void 0&&(e=this.St),this.Nt||=Gd((()=>{this.Nt=void 0,this.It()}),e)}qt(){var e=Math.min(Math.max(0,this.yt-1),6);return this.St*2**e}jt(){var e=this._instance.getPersistedProperty(Zl.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return Wl((function*(){t.Et();var n=t.flush().catch((()=>{}));e===void 0?yield n:yield Kd(n,e)}))()}flushWithTimeout(e){var t=this;return Wl((function*(){var n=t.flush();yield Kd(n,e,(()=>{n.catch((()=>{}))}))}))()}It(){this.flush().then((()=>{this.yt=0}),(e=>{this.yt++,this.rt.error(`PostHog logs flush failed:`,e)})).finally((()=>{!this._instance.isDisabled&&this.jt()&&this.$t(this.qt())}))}Et(){this.Nt&&=(clearTimeout(this.Nt),void 0)}},rf=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function af(e){return String(e)+`000000`}function of(e,t,n,r){var i=``;return r&&(i=Object.keys(r).sort().map((e=>JSON.stringify(e)+`:`+JSON.stringify(r[e]))).join(`,`)),e+`\0`+t+`\0`+(n??``)+`\0`+i}var sf=class{constructor(e,t,n){this._instance=e,this.Ne=t,this.rt=n,this.Bt=new Map,this.ct=null,this.Ht=!1,this.Ut=new Map,this.zt=new Set,this.Wt=0}count(e,t,n){t===void 0&&(t=1),this.Vt({name:e,type:`count`,value:t,unit:n?.unit,attributes:n?.attributes})}gauge(e,t,n){this.Vt({name:e,type:`gauge`,value:t,unit:n?.unit,attributes:n?.attributes})}histogram(e,t,n){this.Vt({name:e,type:`histogram`,value:t,unit:n?.unit,attributes:n?.attributes})}flush(){var e=this,t=this.ct,n=function(){var n=Wl((function*(){t&&(yield t.catch((()=>{}))),yield e.Zt()}));return function(){return n.apply(this,arguments)}}()().finally((()=>{this.ct===n&&(this.ct=null)}));return this.ct=n,n}drainWindow(){if(this.Bt.size===0)return null;var e=this.Bt;return this.Bt=new Map,this.Ht=!1,this.Ut=new Map,this.zt=new Set,this.Gt(e)}reset(){this.Wt++,this.Et(),this.Bt=new Map,this.ct=null,this.Ht=!1,this.Ut=new Map,this.zt=new Set}Vt(e){if(!this._instance.isDisabled&&!this._instance.optedOut){var t=this.Pt(e);if(t!==null){if(t.name&&typeof t.name==`string`){if(typeof t.value==`number`&&Number.isFinite(t.value)){if(t.type===`count`&&0>t.value)this.rt.warn(`Dropping count '`+t.name+`': counters are monotonic, value must be >= 0`);else{var n,r;try{n=t.attributes?z({},t.attributes):void 0,r=of(t.type,t.name,t.unit,n)}catch(e){this.rt.warn(`Dropping metric '`+t.name+`': attributes could not be serialized`,e);return}var i=this.Bt.get(r);if(!i){if(!this.Qt())return;i={name:t.name,type:t.type,unit:t.unit,attributes:n,windowStartMs:Date.now()},this.Bt.set(r,i)}var a=this.Ut.get(t.name);a===void 0?this.Ut.set(t.name,t.type):a===t.type||this.zt.has(t.name)||(this.zt.add(t.name),this.rt.warn(`Metric name '`+t.name+`' is already used as a `+a+`; recording it as a `+t.type+` too will blend both series in charts. Use a distinct name.`)),this.Kt(i,t.value),this.$t()}}else this.rt.warn(`Dropping metric '`+t.name+`': value must be a finite number`)}else this.rt.warn(`Dropping metric with empty name`)}}}Qt(){return this.Ne.maxSeriesPerFlush>this.Bt.size||(this.Ht||(this.Ht=!0,this.rt.warn(`Metric series cap reached (`+this.Ne.maxSeriesPerFlush+` per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}Kt(e,t){switch(e.type){case`count`:e.total=(e.total??0)+t;break;case`gauge`:e.last=t;break;case`histogram`:e.hist||={count:0,sum:0,min:t,max:t,bucketCounts:Array(rf.length+1).fill(0)};var n=e.hist;n.count+=1,n.sum+=t,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.bucketCounts[function(e,t){for(var n=0;t.length>n;n++)if(t[n]>=e)return n;return t.length}(t,rf)]+=1}}Pt(e){var t=this.Ne.beforeSend;if(!t)return e;var n=B(t)?t:[t],r=e;for(var i of n)try{var a=i(r);if(!a)return this.rt.info(`Metric was rejected in beforeSend function`),null;r=a}catch(e){return this.rt.error(`Error in beforeSend function for metric:`,e),null}return r}$t(){this.Nt||=Gd((()=>{this.Nt=void 0,this.flush().catch((e=>{this.rt.error(`Metrics flush failed:`,e)}))}),this.Ne.flushIntervalMs)}Et(){this.Nt&&=(clearTimeout(this.Nt),void 0)}
2Zt(){var e=this;return Wl((function*(){if(e.Bt.size!==0){var t=e.Bt;e.Bt=new Map,e.Ht=!1,e.Ut=new Map,e.zt=new Set;var n=e.Wt,r=yield e._instance.Jt(e.Gt(t));if(n===e.Wt)switch(r.kind){case`ok`:return;case`retry-later`:e.Yt(t),e.$t();return;case`too-large`:e.rt.warn(`Metrics batch exceeded the server size limit and was dropped`);return;case`fatal`:e.rt.error(`Failed to send metrics batch:`,r.error);return}}}))()}Gt(e){return t=this.Xt(e),n=function(e,t,n){return z({},e.resourceAttributes,{"service.name":e.serviceName||`unknown_service`},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":t,"telemetry.sdk.version":n})}(this.Ne,this._instance.getLibraryId(),this._instance.getLibraryVersion()),r=this._instance.getLibraryId(),i=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:Qd(n)},scopeMetrics:[{scope:{name:r,version:i},metrics:t}]}]};var t,n,r,i}Xt(e){var t=af(Date.now()),n=new Map;for(var r of e.values()){var i=of(r.type,r.name,r.unit,void 0),a=n.get(i);a||(a=z({name:r.name},r.unit&&{unit:r.unit}),r.type===`count`?a.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:r.type===`gauge`?a.gauge={dataPoints:[]}:a.histogram={aggregationTemporality:1,dataPoints:[]},n.set(i,a));var o=Qd(r.attributes??{}),s=af(r.windowStartMs);if(r.type===`count`){var c={attributes:o,startTimeUnixNano:s,timeUnixNano:t,asDouble:r.total??0};a.sum.dataPoints.push(c)}else if(r.type===`gauge`){var l={attributes:o,timeUnixNano:t,asDouble:r.last??0};a.gauge.dataPoints.push(l)}else r.hist&&a.histogram.dataPoints.push({attributes:o,startTimeUnixNano:s,timeUnixNano:t,count:r.hist.count,sum:r.hist.sum,min:r.hist.min,max:r.hist.max,bucketCounts:r.hist.bucketCounts,explicitBounds:rf})}return Array.from(n.values())}Yt(e){for(var t of e){var n=t[0],r=t[1],i=this.Bt.get(n);if(i)switch(i.windowStartMs=Math.min(i.windowStartMs,r.windowStartMs),i.type){case`count`:i.total=(i.total??0)+(r.total??0);break;case`gauge`:break;case`histogram`:if(r.hist){if(i.hist){i.hist.count+=r.hist.count,i.hist.sum+=r.hist.sum,i.hist.min=Math.min(i.hist.min,r.hist.min),i.hist.max=Math.max(i.hist.max,r.hist.max);for(var a=0;i.hist.bucketCounts.length>a;a++)i.hist.bucketCounts[a]+=r.hist.bucketCounts[a]}else i.hist=r.hist}}else this.Qt()&&this.Bt.set(n,r)}}},cf,lf,uf;function df(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return uf&&n.length===lf||(lf=n.length,uf=n.reduce(((n,r)=>{cf||={};var i=cf[r];if(i)n[i[0]]=i[1];else for(var a=e(r),o=a.length-1;o>=0;o--){var s=a[o]?.filename,c=t[r];if(s&&c){n[s]=c,cf[r]=[s,c];break}}return n}),{})),uf}}var ff=class{constructor(e,t,n){n===void 0&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}buildFromUnknown(e,t){t===void 0&&(t={});var n=t&&t.mechanism||{handled:!0,type:`generic`},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(t),a=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(a,n),$exception_level:`error`}}modifyFrames(e){var t=this;return Wl((function*(){for(var n of e)n.stacktrace&&n.stacktrace.frames&&B(n.stacktrace.frames)&&(n.stacktrace.frames=yield t.applyModifiers(n.stacktrace.frames));return e}))()}coerceFallback(e){return{type:`Error`,value:`Unknown error`,stack:e.syntheticException?.stack,synthetic:!0}}parseStacktrace(e,t){var n,r;return e.cause!=null&&(n=this.parseStacktrace(e.cause,t)),e.stack!=``&&e.stack!=null&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),z({},e,{cause:n,stack:r})}applyChunkIds(e,t){return e.map((e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e)))}applyCoercers(e,t){for(var n of this.coercers)if(n.match(e))return n.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return Wl((function*(){var n=e;for(var r of t.modifiers)n=yield r(n);return n}))()}convertToExceptionList(e,t){var n,r,i={type:e.type,value:e.value,mechanism:{type:t.type??`generic`,handled:(n=t.handled)==null||n,synthetic:(r=e.synthetic)!=null&&r}};e.stack&&(i.stacktrace={type:`raw`,frames:e.stack});var a=[i];return e.cause!=null&&a.push(...this.convertToExceptionList(e.cause,z({},t,{handled:!0}))),a}buildParsingContext(e){return{chunkIdMap:df(this.stackParser),skipFirstLines:e.ski
2pFirstLines??1}}buildCoercingContext(e,t,n){n===void 0&&(n=0);var r=(n,r)=>{if(4>=r){var i=this.buildCoercingContext(e,t,r);return this.applyCoercers(n,i)}};return z({},t,{syntheticException:n==0?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,n),next:e=>r(e,n+1)})}},pf=`?`;function mf(e,t,n,r,i){var a={platform:e,filename:t,function:n===`<anonymous>`?pf:n,in_app:!0};return V(r)||(a.lineno=r),V(i)||(a.colno=i),a}var hf=(e,t)=>{var n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?pf:e.split(`@`)[0],n?`safari-extension:`+t:`safari-web-extension:`+t]:[e,t]},gf=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,_f=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vf=/\((\S*)(?::(\d+))(?::(\d+))\)/,yf=(e,t)=>{var n=gf.exec(e);if(n)return mf(t,n[1],pf,+n[2],+n[3]);var r=_f.exec(e);if(r){if(r[2]&&r[2].indexOf(`eval`)===0){var i=vf.exec(r[2]);i&&(r[2]=i[1],r[3]=i[2],r[4]=i[3])}var a=hf(r[1]||pf,r[2]);return mf(t,a[1],a[0],r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},bf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Sf=(e,t)=>{var n=bf.exec(e);if(n){if(n[3]&&n[3].indexOf(` > eval`)>-1){var r=xf.exec(n[3]);r&&(n[1]=n[1]||`eval`,n[3]=r[1],n[4]=r[2],n[5]=``)}var i=n[3],a=n[1]||pf,o=hf(a,i);return mf(t,i=o[1],a=o[0],n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},Cf=/\(error: (.*)\)/,wf=class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var n=bu(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?`DOMError`:`DOMException`}getValue(e){var t=e.name||(this.isDOMError(e)?`DOMError`:`DOMException`);return e.message?t+`: `+e.message:t}isDOMException(e){return Au(e,`DOMException`)}isDOMError(e){return Au(e,`DOMError`)}},Tf=class{match(e){return function(e){switch({}.toString.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object DOMError]`:case`[object WebAssembly.Exception]`:return!0;default:return Mu(e,Error)}}(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var n=e.message;return String(n.error&&typeof n.error.message==`string`?n.error.message:n)}getStack(e){return e.stacktrace||e.stack||void 0}},Ef=class{constructor(){}match(e){return!!Au(e,`ErrorEvent`)&&(e.error!=null||this.fe(e))}coerce(e,t){if(e.error!=null)return t.apply(e.error);var n=t.apply(e.message);return z({},n,{stack:this.pe(e)??n.stack,synthetic:!0})}fe(e){return bu(e.message)&&e.message.length>0}pe(e){var t=e;if(bu(t.filename)&&t.filename.length>0){var n=t.lineno??0,r=t.colno??0;return`Error
3    at `+t.filename+`:`+n+`:`+r}}},Df=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Of=class{match(e){return typeof e==`string`}coerce(e,t){var n=this.getInfos(e),r=n[0],i=n[1];return{type:r??`Error`,value:i??e,stack:t.syntheticException?.stack,synthetic:!0}}getInfos(e){var t=`Error`,n=e,r=e.match(Df);return r&&(t=r[1],n=r[2]),[t,n]}},kf=[`fatal`,`error`,`warning`,`log`,`info`,`debug`];function Af(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return`[object has no keys]`;for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(`, `);if(t>=i.length)return r===n.length?i:i.length>t?i.slice(0,t)+`...`:i}return``}var jf=class{match(e){return typeof e==`object`&&!!e}coerce(e,t){var n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:this.getStack(e)??t.syntheticException?.stack,level:this.isSeverityLevel(e.level)?e.level:`error`,synthetic:!0}}getType(e){return ju(e)?e.constructor.name:`Error`}getValue(e){if(`name`in e&&typeof e.name==`string`){var t=`'`+e.name+`' captured as exception`;return`message`in e&&typeof e.message==`string`&&(t+=` with message: '`+e.message+`'`),t}if(`message`in e&&typeof e.message==`string`)return e.message;var n=this.getObjectClassName(e);return(n&&n!==`Object`?`'`+n+`'`:`Object`)+` captured as exception with keys: `+Af(e)}isSeverityLevel(e){return bu(e)&&!xu(e)&&kf.indexOf(e)>=0}getStack(e){try{return bu(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:bu(e.stack)&&e.stack.length>0?e.stack:void 0}catch{return}}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var n=e[t];if(Jd(n))return n}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}},Mf=class{match(e){return ju(e)}coerce(e,t){var n=e.constructor.name;return{type:n,value:n+` captured as exception with keys: `+Af(e),stack:t.syntheticException?.stack,synthetic:!0}}},Nf=class{match(e){return ku(e)}coerce(e,t){return{type:`Error`,value:`Primitive value captured as exception: `+String(e),stack:t.syntheticException?.stack,synthetic:!0}}},Pf=class{match(e){return Au(e,`PromiseRejectionEvent`)||this.isCu
3stomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!ju(e))return!1;try{var t=e.detail;return typeof t==`object`&&!!t&&`reason`in t}catch{return!1}}coerce(e,t){var n=this.getUnhandledRejectionReason(e);return ku(n)?{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: `+String(n),stack:t.syntheticException?.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){try{if(`reason`in e)return e.reason;if(`detail`in e&&e.detail!=null&&typeof e.detail==`object`&&`reason`in e.detail)return e.detail.reason}catch{}return e}},Ff=`$message`,If=`$timestamp`,Lf=new Set([Ff,If]),Rf={enabled:!0,max_bytes:32768};function zf(e){return e?{enabled:e.enabled??Rf.enabled,max_bytes:Vf(e.max_bytes,Rf.max_bytes)}:z({},Rf)}var Bf=class{constructor(e){this.Ke=[],this.Je=0,this.Ne=zf(e)}setConfig(e){this.Ne=zf(e),this.Xe()}add(e){var t=function(e){var t;try{t=pu(e)}catch{return}try{var n=JSON.parse(t);if(!vu(n))return;var r=n,i=r[Ff],a=r[If];return!bu(i)||i.trim().length===0||!bu(a)&&!Cu(a)?void 0:{step:r,json:t}}catch{return}}(e);if(t){var n=function(e){if(typeof TextEncoder<`u`)return new TextEncoder().encode(e).length;for(var t=encodeURIComponent(e),n=0,r=0;t.length>r;r++)t[r]===`%`?(n+=1,r+=2):n+=1;return n}(t.json);n>this.Ne.max_bytes||(this.Ke.push({step:t.step,bytes:n}),this.Je+=n,this.Xe())}}getAttachable(){return this.Ke.map((e=>e.step))}clear(){this.Ke=[],this.Je=0}size(){return this.Ke.length}Xe(){for(;this.Je>this.Ne.max_bytes&&this.Ke.length>0;){var e=this.Ke.shift();e&&(this.Je-=e.bytes)}}};function Vf(e,t){if(!Cu(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var Hf=function(e,t){var n=(t===void 0?{}:t).debugEnabled,r={k(t){if(I&&(Hl.DEBUG||I.POSTHOG_DEBUG||n)&&!V(I.console)&&I.console){for(var r=(`__rrweb_original__`in I.console[t])?I.console[t].__rrweb_original__:I.console[t],i=arguments.length,a=Array(i>1?i-1:0),o=1;i>o;o++)a[o-1]=arguments[o];r(e,...a)}},debug(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k(`debug`,...t)},info(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k(`log`,...t)},warn(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k(`warn`,...t)},error(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];r.k(`error`,...t)},critical(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];console.error(e,...n)},uninitializedWarning(e){r.error(`You must initialize PostHog before calling `+e)},createLogger:(t,n)=>Hf(e+` `+t,n)};return r},U=Hf(`[PostHog.js]`),Uf=U.createLogger,Wf=Uf(`[ExternalScriptsLoader]`),Gf=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return Wf.warn(t+` was requested but loading of external scripts is disabled.`),n(`Loading of external scripts is disabled`);var r=L?.querySelectorAll(`script`);if(r){for(var i,a=function(){if(r[o].src===t){var e=r[o];return e.__posthog_loading_callback_fired?{v:n()}:(e.addEventListener(`load`,(t=>{e.__posthog_loading_callback_fired=!0,n(void 0,t)})),e.onerror=e=>n(e),{v:void 0})}},o=0;r.length>o;o++)if(i=a())return i.v}var s=()=>{if(!L)return n(`document not found`);var r=L.createElement(`script`);if(r.type=`text/javascript`,r.crossOrigin=`anonymous`,r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,n(void 0,e)},r.onerror=e=>n(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return n(`prepare_external_dependency_script returned null`);if(e.config.external_scripts_inject_target===`head`)L.head.appendChild(r);else{var i,a=L.querySelectorAll(`body > script`);a.length>0?(i=a[0].parentNode)==null||i.insertBefore(r,a[0]):L.body.appendChild(r)}};L!=null&&L.body?s():L?.addEventListener(`DOMContentLoaded`,s)};R.__PosthogExtensions__=R.__PosthogExtensions__||{},R.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t!==`remote-config`){var r;if(e.config.strict_script_versioning)r=e.requestRouter.endpointFor(`assets`,`/static/`+e.version+`/`+t+`.js`);else{var i=`/static/`+t+`.js?v=`+e.version;if(t===`toolbar`){var a=3e5;i=i+`&t=`+Math.floor(Date.now()/a)*a}r=e.requestRouter.endpointFor(`assets`,i)}Gf(e,r,n)}else Gf(e,e.requestRouter.endpointFor(`assets`,`/array/`+e.config.token+`/config.js`),n)},R.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{Gf(e,e.requestRouter.endpointFor(`api`,t),n)},Hl.DEBUG=!1,Hl.LIB_VERSION=`1.416.0`,Hl.LIB_NAME=`web`;var Kf=`$people_distinct_id`,qf=`$device_id`,Jf=`$device_model`,Yf=`__alias`,Xf=`__timers`,Zf=`$autocapture_disabled_server_side`,Qf=`$heatmaps_enabled_server_side`,$f=`$exception_capture_enabled_server_side`,ep=`$error_tracking_suppression_rules`,tp=`$error_tracking_capture_extension_exceptions`,np=`$web_vitals_enabled_server_side`,rp=`$dead_clicks_enabled_server_side`,ip=`$product_tours_enabled_server_side`,ap=`$web_vitals_allowed_metrics`,op=`$session_recording_remote_config`,sp=`$replay_sample_rate`,cp=`$replay_override_sampling`,lp=`$replay_override_linked_flag`,up=`$replay_override_url_trigger`,dp=`$replay_override_event_trigger`,fp=`$sesid`,pp=`$session_is_sampled`,mp=`$enabled_feature_flags`,hp=`$active_feature_flags`,gp=`$early_access_features`,_p=`$feature_flag_details`,vp=`$feature_flag_payloads`,yp=`$feature_flag_request_id`,bp=`$minimal_flag_called_events`,xp=`$override_feature_flags`,Sp=`$override_feature_flag_payloads`,Cp=`$stored_person_properties`,wp=`$stored_group_properties`,Tp=`$surveys`,Ep=`$surveys_loaded_at`,Dp=`$surveys_activated`,Op=`$surveys_activated_session`,kp=`$surveys_activated_timestamps`,Ap=`ph_product_tours`,jp=`$flag_call_reported`,Mp=`$flag_call_reported_session_id`,Np=`$feature_flag_errors`,Pp=`$feature_flag_evaluated_at`,Fp=`$user_state`,Ip=`$client_session_props`,Lp=`$capture_rate_limit`,Rp=`$initial_campaign_params`,zp=`$initial_referrer_info`,Bp=`$initial_person_info`,Vp=`$epp`,Hp=`$posthog_cookieless`,Up=`$cookieless_mode`,Wp=`$sdk_debug_extensions_init_method`,Gp=`$sdk_debug_extensions_init_time_ms`,Kp=`$sdk_debug_recording_script_not_loaded`,qp=`PostHog loadExternalDependency extension not found.`,Jp=`on_reject`,Yp=`always`,Xp=`anonymous`,Zp=`identified`,Qp=`identified_only`,$p=`visibilitychange`,em=`beforeunload`,tm=`$pageview`,nm=`$pageleave`,rm=`$identify`,im=`$groupidentify`;function am(e,t){B(e)&&e.forEach(t)}function om(e,t){if(!H(e)){if(B(e))e.forEach(t);else if(Eu(e))e.forEach(((e,n)=>t(e,n)));else for(var n in e)hu.call(e,n)&&t(e[n],n)}}var sm=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var i of n)for(var a in i)i[a]!==void 0&&(e[a]=i[a]);return e};function cm(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var lm=function(e){try{return e()}catch{return}},um=function(e){return function(){try{for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){U.critical(`Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A.`),U.critical(e)}}},dm=function(e){var t={};return om(e,(function(e,n){(bu(e)&&e.length>0||Cu(e))&&(t[n]=e)})),t},fm=[`herokuapp.com`,`vercel.app`,`netlify.app`];function pm(e){var t=e?.hostname;if(!bu(t))return!1;var n=t.split(`.`).slice(-2).join(`.`);for(var r of fm)if(n===r)return!1;return!0}function mm(e,t,n,r){var i=r??{},a=i.capture,o=i.passive;e?.addEventListener(t,n,{capture:a!==void 0&&a,passive:o===void 0||o})}function hm(e){return e.name===`ph_toolbar_internal`}var gm=e=>{if(L){try{for(var t=e+`=`,n=L.cookie.split(`;`).filter((e=>e.length)),r=0;n.length>r;r++){for(var i=n[r];i.charAt(0)==` `;)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}}catch{}return null}};Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Cu(e)&&isFinite(e)&&Math.floor(e)===e});var _m=class e{constructor(e){if(this.bytes=e,e.length!==16)throw TypeError(`not 128-bit length`)}static fromFieldsV7(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||0>t||0>n||0>r||0>i||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw RangeError(`invalid field value`);var a=new Uint8Array(16);return a[0]=t/2**40,a[1]=t/2**32,a[2]=t/2**24,a[3]=t/2**16,a[4]=t/256,a[5]=t,a[6]=112|n>>>8,a[7]=n,a[8]=128|r>>>24,a[9]=r>>>16,a[10]=r>>>8,a[11]=r,a[12]=i>>>24,a[13]=i>>>16,a[14]=i>>>8,a[15]=i,new e(a)}toString(){for(var e=``,t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),t!==3&&t!==5&&t!==7&&t!==9||(e+=`-`);
3if(e.length!==36)throw Error(`Invalid UUIDv7 was generated`);return e}clone(){return new e(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var t=0;16>t;t++){var n=this.bytes[t]-e.bytes[t];if(n!==0)return Math.sign(n)}return 0}},vm=class{generate(){var e=this.generateOrAbort();if(!V(e))return e;this.S=0;var t=this.generateOrAbort();if(V(t))throw Error(`Could not generate UUID after timestamp reset`);return t}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.C();else{if(this.S>=e+1e4)return;this.I++,this.I>4398046511103&&(this.S++,this.C())}return _m.fromFieldsV7(this.S,Math.trunc(this.I/2**30),this.I&2**30-1,this.A.nextUint32())}C(){this.I=1024*this.A.nextUint32()+(1023&this.A.nextUint32())}constructor(){this.S=0,this.I=0,this.A=new xm}},ym,bm=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<`u`&&UUIDV7_DENY_WEAK_RNG)throw Error(`no cryptographically strong RNG available`);for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};I&&!V(I.crypto)&&crypto.getRandomValues&&(bm=e=>crypto.getRandomValues(e));var xm=class{nextUint32(){return this.R.length>this.O||(bm(this.R),this.O=0),this.R[this.O++]}constructor(){this.R=new Uint32Array(8),this.O=1/0}},Sm=()=>Cm().toString(),Cm=()=>(ym||=new vm).generate(),wm=``,Tm=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Em={N:()=>!!L,j(e){U.error(`cookieStore error: `+e)},P:gm,H(e){var t;try{t=JSON.parse(Em.P(e))||{}}catch{}return t},F(e,t,n,r,i){if(!L)return!1;try{var a=``,o=``,s=function(e,t){if(t){var n=function(e,t){if(t===void 0&&(t=L),wm)return wm;if(!t||[`localhost`,`127.0.0.1`].includes(e))return``;for(var n=e.split(`.`),r=Math.min(n.length,8),i=`dmn_chk_`+Sm();!wm&&r--;){var a=n.slice(r).join(`.`),o=i+`=1;domain=.`+a+`;path=/`;t.cookie=o+`;max-age=3`,t.cookie.includes(i)&&(t.cookie=o+`;max-age=0`,wm=a)}return wm}(e);if(!n){var r=(e=>{var t=e.match(Tm);return t?t[0]:``})(e);r!==n&&U.info(`Warning: cookie subdomain discovery mismatch`,r,n),n=r}return n?`; domain=.`+n:``}return``}(L.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+864e5*n),a=`; expires=`+c.toUTCString()}i&&(o=`; secure`);var l=e+`=`+encodeURIComponent(JSON.stringify(t))+a+`; SameSite=Lax; path=/`+s+o;return l.length>3686.4&&U.warn(`cookieStore warning: large cookie, len=`+l.length),L.cookie=l,!0}catch{return!1}},q(e,t){if(L!=null&&L.cookie)try{Em.F(e,``,-1,t)}catch{return}}},Dm=null,Om={N(){if(!Su(Dm))return Dm;var e=!0;if(V(I))e=!1;else try{var t=`__mplssupport__`;Om.F(t,`xyz`),Om.P(t)!==`"xyz"`&&(e=!1),Om.q(t)}catch{e=!1}return e||U.error(`localStorage unsupported; falling back to cookie store`),Dm=e,e},j(e){U.error(`localStorage error: `+e)},P(e){try{return I?.localStorage.getItem(e)}catch(e){Om.j(e)}return null},H(e){try{return JSON.parse(Om.P(e))||{}}catch{}return null},F(e,t){try{return I?.localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){Om.j(e)}return!1},q(e){try{I?.localStorage.removeItem(e)}catch(e){Om.j(e)}}},km=[qf,`distinct_id`,fp,pp,Vp,Bp,Fp],Am={},jm={N:()=>!0,j(e){U.error(`memoryStorage error: `+e)},P:e=>Am[e]||null,H:e=>Am[e]||null,F:(e,t)=>(Am[e]=t,!0),q(e){delete Am[e]}},Mm=null,Nm={N(){if(!Su(Mm))return Mm;if(Mm=!0,V(I))Mm=!1;else try{var e=`__support__`;Nm.F(e,`xyz`),Nm.P(e)!==`"xyz"`&&(Mm=!1),Nm.q(e)}catch{Mm=!1}return Mm},j(e){U.error(`sessionStorage error: `,e)},P(e){try{return I?.sessionStorage.getItem(e)}catch(e){Nm.j(e)}return null},H(e){try{return JSON.parse(Nm.P(e))||null}catch{}return null},F(e,t){try{return I?.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(e){Nm.j(e)}return!1},q(e){try{I?.sessionStorage.removeItem(e)}catch(e){Nm.j(e)}}},Pm=class{constructor(e){this._instance=e}get Ne(){return this._instance.config}get consent(){return this.ti()?0:this.ei}isOptedOut(){return this.Ne.cookieless_mode===Yp||this.isRejected()||this.consent===-1&&this.Ne.cookieless_mode===Jp}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Ne.opt_out_capturing_by_default}optInOut(e){this.ii.F(this.ri,+!!e,this.Ne.cookie_expiration,this.Ne.cross_subdomain_cookie,this.Ne.secure_cookie)}reset(){this.ii.q(this.ri,this.Ne.cross_subdomain_cookie)}get ri(){var e=this._instance.config,t=e.token,n=e.opt_out_capturing_cookie_prefix;return e.consent_persistence_name||(n?n+t:`__ph_opt_in_out_`+t)}get ei(){var e=this.ii.P(this.ri);return Pu(e)?1:uu(Fu,e)?0:-1}get ii(){var e=this.Ne.opt_out_capturing_persistence_type,t=e===`localStorage`?Om:Em;if(!this.ni||this.ni!==t){this.ni=t;var n=e===`localStorage`?Em:Om;n.P(this.ri)&&(this.ni.P(this.ri)||this.optInOut(Pu(n.P(this.ri))),n.q(this.ri,this.Ne.cross_subdomain_cookie))}return this.ni}ti(){return!!this.Ne.respect_dnt&&[Nl?.doNotTrack,Nl?.msDoNotTrack,R.doNotTrack].some((e=>Pu(e)))}};function Fm(e,t){var n,r=e==null||(n=e.config)==null?void 0:n.get_current_url;if(!_u(r))return t;try{var i=r(t);return bu(i)&&i?i:t}catch(e){return U.error(`Error in get_current_url, falling back to window.location.href`,e),t}}var Im=`__POSTHOG_TOOLBAR__`,Lm=1,Rm=3,zm=11;function Bm(e){return e instanceof Element&&(e.id===Im||!(e.closest==null||!e.closest(`.toolbar-global-fade-container`)))}function Vm(e){return!!e&&e.nodeType===Lm}function Hm(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Um(e){return!!e&&e.nodeType===Rm}function Wm(e){return!!e&&e.nodeType===zm&&Vm(e.host)}var Gm=1e3;function Km(e){return e?du(e).split(/\s+/):[]}function qm(e,t){var n=function(e){var t,n=I==null||(t=I.location)==null?void 0:t.href;return V(n)?void 0:Fm(e,n)}(t);return!!(n&&e&&e.some((e=>n.match(e))))}function Jm(e){var t=``;switch(typeof e.className){case`string`:t=e.className;break;case`object`:t=(e.className&&`baseVal`in e.className?e.className.baseVal:null)||e.getAttribute(`class`)||``;break;default:t=``}return Km(t)}function Ym(e){return H(e)?null:du(e).split(/(\s+)/).filter((e=>yh(e))).join(``).replace(/[\r\n]/g,` `).replace(/[ ]+/g,` `).substring(0,255)}function Xm(e){var t=``;return uh(e)&&!dh(e)&&e.childNodes&&e.childNodes.length&&om(e.childNodes,(function(e){Um(e)&&e.textContent&&(t+=Ym(e.textContent)??``)})),du(t)}function Zm(e){var t;return V(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var Qm=[`a`,`button`,`form`,`input`,`select`,`textarea`,`label`];function $m(e,t){if(V(t))return!0;var n,r=function(e){if(t.some((t=>function(e,t){var n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!n&&n.call(e,t)}catch{return!1}}(e,t))))return{v:!0}};for(var i of e)if(n=r(i))return n.v;return!1}function eh(e){var t=e.parentNode;return!(!t||!Vm(t))&&t}var th=[`.ph-no-autocapture`,`[data-ph-no-autocapture]`],nh=[`next`,`previous`,`prev`,`>`,`<`],rh=[...nh,`+`,`-`,`−`,`–`],ih=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,ah=[`.ph-no-rageclick`,`.ph-no-capture`],oh=[``,`text`,`search`,`email`,`password`,`url`,`tel`,`number`];function sh(e,t){if(!I||ch(e))return!1;var n,r,i,a;if(Tu(t)?(n=!!t&&ah,r=void 0,i=!1):(n=t?.css_selector_ignorelist??ah,r=t?.content_ignorelist,i=(a=t?.ignore_text_selection)!=null&&a),!1===n||i&&function(e){return!(!e||!Vm(e))&&(!!Hm(e,`textarea`)||(Hm(e,`input`)?uu(oh,(e.getAttribute(`type`)||``).toLowerCase()):function(e){if(e.isContentEditable)return!0;var t=e.getAttribute==null?void 0:e.getAttribute(`contenteditable`);return t===`true`||t===``}(e)))}(e))return!1;var o=lh(e,!1).targetElementList;return!function(e,t){if(!1===e||V(e))return!1;var n;if(!0===e)n=nh;else{if(!B(e))return!1;if(e.length>10)return U.error(`[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching.`),!1;n=e.map((e=>e.toLowerCase()))}return t.some((e=>{var t=e.safeText,r=e.ariaLabel;return n.some((e=>ih(t,e)||ih(r,e)))}))}(r,o.map((e=>({safeText:Xm(e).toLowerCase(),ariaLabel:e.getAttribute(`aria-label`)?.toLowerCase().trim()||``}))))&&!$m(o,n)}var ch=e=>!e||Hm(e,`html`)||!Vm(e),lh=(e,t)=>{if(!I||ch(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!Hm(i,`body`);)if(Wm(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var a=eh(i);if(!a)break;if(t||Qm.indexOf(a.tagName.toLowerCase())>-1)n=!0;else try{var o=I.getComputedStyle(a);o&&o.getPropertyValue(`cursor`)===`pointer`&&(n=!0)}catch{}r.push(a),i=a}return{parentIsUsefulElement:n,targetElementList:r}};function uh(e){for(var t=new Set,n=0,r=e;r.parentNode&&!Hm(r,`body`);r=r.parentNode){if(n++>=Gm||t.has(r))return!1;t.add(r);var i=Jm(r);if(uu(i,`ph-sensitive`)||uu(i,`ph-no-capture`))return!1}if(uu(Jm(e),`ph-include`))return!0;var a=e.type||``;if(bu(a))switch(a.toLowerCase()){case`hidden`:case`password`:return!1}
3var o=e.name||e.id||``;return!bu(o)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(o.replace(/[^a-zA-Z0-9]/g,``))}function dh(e){return!!(Hm(e,`input`)&&![`button`,`checkbox`,`submit`,`reset`].includes(e.type)||Hm(e,`select`)||Hm(e,`textarea`)||e.getAttribute(`contenteditable`)===`true`)}var fh=RegExp(`^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$`),ph=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,mh=[16,15,14,13],hh=RegExp(`^(\\d{3}-?\\d{2}-?\\d{4})$`),gh=RegExp(`(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))`,`g`),_h=/[0-9A-Za-z_]/;function vh(e){for(var t=0,n=!1,r=e.length-1;r>=0;r--){var i=e.charCodeAt(r)-48;n&&(i*=2)>9&&(i-=9),t+=i,n=!n}return t%10==0}function yh(e,t){return t===void 0&&(t=!0),!(H(e)||bu(e)&&(e=du(e),(t?fh.test((e||``).replace(/[- ]/g,``)):function(e){var t;for(ph.lastIndex=0;t=ph.exec(e);){var n=t[2];if(n)for(var r=n.replace(/[- ]/g,``),i=0;r.length>i;i++)for(var a of mh){var o=i+a;if(r.length>=o){var s=r.slice(i,o);if(fh.test(s)&&vh(s))return!0}}}return!1}(e))||(t?hh.test(e):function(e){var t;for(gh.lastIndex=0;t=gh.exec(e);){var n=t[1],r=t[3];if(!(n&&r&&_h.test(n)&&_h.test(r)))return!0}return!1}(e))))}function bh(e){var t=Xm(e);return yh(t=(t+` `+xh(e)).trim())?t:``}function xh(e){var t=``;return e&&e.childNodes&&e.childNodes.length&&om(e.childNodes,(function(e){if(e&&e.tagName?.toLowerCase()===`span`)try{var n=Xm(e);t=(t+` `+n).trim(),e.childNodes&&e.childNodes.length&&(t=(t+` `+xh(e)).trim())}catch(e){U.error(`[AutoCapture]`,e)}})),t}function Sh(e){return e.replace(/"|\\"/g,`\\"`)}function Ch(e){var t=e.attr__class;if(t)return B(t)?t:Km(t)}var wh=Uf(`[Dead Clicks]`),Th=()=>!0,Eh=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(rp)),r=e.instance.config.capture_dead_clicks;return Tu(r)?r:!!vu(r)||n},Dh=class{get lazyLoadedDeadClicksAutocapture(){return this.si}constructor(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(e){if(e.ok){var t=e.config;`captureDeadClicks`in t&&(this.instance.persistence&&this.instance.persistence.register({[rp]:t.captureDeadClicks}),this.startIfEnabledOrStop())}}startIfEnabledOrStop(){this.isEnabled(this)?this.ai((()=>{this.oi()})):this.stop()}ai(e){var t,n;(t=R.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture?e():(n=R.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,`dead-clicks-autocapture`,(t=>{t?wh.error(`failed to load script`,t):e()}))}oi(){var e;if(L){if(!this.si&&(e=R.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var t=vu(this.instance.config.capture_dead_clicks)?z({},this.instance.config.capture_dead_clicks):{};t.__onCapture=this.onCapture,this.onCapture&&(t.capture_dead_swipes=!1),this.si=R.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.si.start(L),wh.info(`starting...`)}}else wh.error("`document` not found. Cannot start.")}stop(){this.si&&(this.si.stop(),this.si=void 0,wh.info(`stopping...`))}},Oh=Uf(`[SegmentIntegration]`),kh=`posthog-js`;function Ah(e,t){var n=t===void 0?{}:t,r=n.organization,i=n.projectId,a=n.prefix,o=n.severityAllowList,s=o===void 0?[`error`]:o,c=n.sendExceptionsToPostHog,l=c===void 0||c;return t=>{if(s!==`*`&&!s.includes(t.level)||!e.__loaded)return t;t.tags||={};var n=e.requestRouter.endpointFor(`ui`,`/project/`+e.config.token+`/person/`+e.get_distinct_id());t.tags[`PostHog Person URL`]=n,e.sessionRecordingStarted()&&(t.tags[`PostHog Recording URL`]=e.get_session_replay_url({withTimestamp:!0}));var o,c=t.exception?.values||[],u=c.map((e=>z({},e,{stacktrace:e.stacktrace?z({},e.stacktrace,{type:`raw`,frames:(e.stacktrace.frames||[]).map((e=>z({},e,{platform:`web:javascript`})))}):void 0}))),d={$exception_message:c[0]?.value||t.message,$exception_type:c[0]?.type,$exception_level:t.level,$exception_list:u,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:c[0]?.value||t.message,$sentry_exception_type:c[0]?.type,$sentry_tags:t.tags};return r&&i&&(d.$sentry_url=(a||`https://sentry.io/organizations/`)+r+`/issues/?project=`+i+`&query=`+t.event_id),l&&((o=e.exceptions)==null||o.sendExceptionEvent(d)),t}}var jh=class{constructor(e,t,n,r,i,a){this.name=kh,this.setupOnce=function(o){o(Ah(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:a==null||a}))}}},Mh=class{constructor(e){this.li=(e,t,n)=>{n&&(n.noSessionId||n.activityTimeout||n.sessionPastMaximumLength||n.crossTabAdoption)&&(U.info(`[PageViewManager] Session rotated, clearing pageview state`,{sessionId:e,changeReason:n}),this.ui=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.hi()}hi(){this.di=this._instance.sessionManager?.onSessionId(this.li)}destroy(){var e;(e=this.di)==null||e.call(this),this.di=void 0}doPageView(e,t){var n=this.vi(e,t);return this.ui={pathname:I?.location.pathname??``,pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),n}doPageLeave(e){return this.vi(e,this.ui?.pageViewId)}doEvent(){return{$pageview_id:this.ui?.pageViewId}}vi(e,t){var n=this.ui;if(!n)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var a=i.maxScrollHeight,o=i.lastScrollY,s=i.maxScrollY,c=i.maxContentHeight,l=i.lastContentY,u=i.maxContentY;if(!(V(a)||V(o)||V(s)||V(c)||V(l)||V(u))){a=Math.ceil(a),o=Math.ceil(o),s=Math.ceil(s),c=Math.ceil(c),l=Math.ceil(l),u=Math.ceil(u);var d=a>
31?Iu(o/a,0,1,U):1,f=a>1?Iu(s/a,0,1,U):1,p=c>1?Iu(l/c,0,1,U):1,m=c>1?Iu(u/c,0,1,U):1;r=sm(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:s,$prev_pageview_max_scroll_percentage:f,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:m})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r}},Nh=[`flags`,`surveys`],Ph={[Kf]:{exposure:`hidden`},[Yf]:{exposure:`hidden`},__cmpns:{exposure:`hidden`},[Xf]:{exposure:`hidden`},[Zf]:{exposure:`event`},[Qf]:{exposure:`hidden`},[$f]:{exposure:`event`},[ep]:{exposure:`hidden`},[tp]:{exposure:`event`},[np]:{exposure:`event`},[rp]:{exposure:`event`},[ip]:{exposure:`hidden`},[ap]:{exposure:`event`},[op]:{exposure:`hidden`},$session_recording_enabled_server_side:{exposure:`hidden`},[fp]:{exposure:`hidden`},[pp]:{exposure:`event`},[sp]:{exposure:`event`,shouldSkipFromEventProperties:e=>Su(e)},$session_past_minimum_duration:{exposure:`event`},$session_recording_url_trigger_activated_session:{exposure:`event`},$session_recording_event_trigger_activated_session:{exposure:`event`},$debug_first_full_snapshot_timestamp:{exposure:`event`},$sess_rec_flush_size:{exposure:`hidden`},[mp]:{exposure:`hidden`,storageGroup:`flags`},[hp]:{exposure:`hidden`,storageGroup:`flags`},[gp]:{exposure:`hidden`},[_p]:{exposure:`hidden`,storageGroup:`flags`},[vp]:{exposure:`hidden`,storageGroup:`flags`},[yp]:{exposure:`hidden`,storageGroup:`flags`,volatile:!0},[bp]:{exposure:`hidden`,storageGroup:`flags`},[xp]:{exposure:`hidden`},[Sp]:{exposure:`hidden`},[Cp]:{exposure:`hidden`},[wp]:{exposure:`hidden`},[Tp]:{exposure:`hidden`,storageGroup:`surveys`},[Ep]:{exposure:`hidden`,storageGroup:`surveys`,volatile:!0},[Dp]:{exposure:`event`},[Op]:{exposure:`hidden`},[kp]:{exposure:`hidden`},[Ap]:{exposure:`hidden`},$product_tours_activated:{exposure:`hidden`},$product_tours_activated_session:{exposure:`hidden`},$conversations_widget_session_id:{exposure:`event`},$conversations_ticket_id:{exposure:`event`},$conversations_widget_state:{exposure:`event`},$conversations_user_traits:{exposure:`event`},[jp]:{exposure:`hidden`},[Mp]:{exposure:`hidden`},[Np]:{exposure:`hidden`},[Pp]:{exposure:`hidden`,storageGroup:`flags`,volatile:!0},[Fp]:{exposure:`hidden`},[Ip]:{exposure:`hidden`},[Lp]:{exposure:`hidden`},[Rp]:{exposure:`hidden`},[zp]:{exposure:`hidden`},[Bp]:{exposure:`hidden`},[Vp]:{exposure:`hidden`},[cp]:{exposure:`event`},[lp]:{exposure:`event`},[up]:{exposure:`event`},[dp]:{exposure:`event`},[Wp]:{exposure:`event`},[Gp]:{exposure:`event`},[Kp]:{exposure:`event`},$sdk_debug_replay_event_trigger_status:{exposure:`event`},$sdk_debug_replay_linked_flag_trigger_status:{exposure:`event`},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:`event`},$sdk_debug_replay_remote_trigger_matching_config:{exposure:`event`},$sdk_debug_replay_trigger_groups_count:{exposure:`event`},$sdk_debug_replay_url_trigger_status:{exposure:`event`},$session_recording_start_reason:{exposure:`event`}},Fh=[[`$posthog_sr_group_event_trigger_`,{exposure:`hidden`}],[`$posthog_sr_group_url_trigger_`,{exposure:`hidden`}],[`$posthog_sr_group_sampling_`,{exposure:`hidden`}]],Ih=e=>{var t=Ph[e];if(t)return t;for(var n of Fh){var r=n[1];if(e.indexOf(n[0])===0)return r}},Lh=(e,t)=>{try{return JSON.stringify(e,((e,t)=>typeof t==`bigint`?t.toString():t),t)}catch{return pu(e)}},Rh=e=>{var t=L?.createElement(`a`);return V(t)?null:(t.href=e,t)},zh=function(e,t){for(var n,r=((e.split(`#`)[0]||``).split(/\?(.*)/)[1]||``).replace(/^\?+/g,``).split(`&`),i=0;r.length>i;i++){var a=r[i].split(`=`);
3if(a[0]===t){n=a;break}}if(!B(n)||2>n.length)return``;var o=n[1];try{o=decodeURIComponent(o)}catch{U.error(`Skipping decoding for malformed query param: `+o)}return o.replace(/\+/g,` `)},Bh=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split(`#`),i=r[1],a=(r[0]||``).split(`?`),o=a[1],s=a[0],c=(o||``).split(`&`),l=[],u=0;c.length>u;u++){var d=c[u].split(`=`);B(d)&&(t.includes(d[0])?l.push(d[0]+`=`+n):l.push(c[u]))}var f=s;return o!=null&&(f+=`?`+l.join(`&`)),i!=null&&(f+=`#`+i),f},Vh=function(e,t){var n=e.match(RegExp(t+`=([^&]*)`));return n?n[1]:null},Hh=(e,t)=>e>=t&&Bl(),Uh=(e,t,n,r)=>{if(e===0){if(Bl()){var i=t+1;return i===n&&r(),i}return t}return 0},Wh=`https?://(.*)`,Gh=[`gclid`,`gclsrc`,`dclid`,`gbraid`,`wbraid`,`fbclid`,`msclkid`,`twclid`,`li_fat_id`,`igshid`,`ttclid`,`rdt_cid`,`epik`,`qclid`,`sccid`,`irclid`,`_kx`],Kh=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_content`,`utm_term`,`gad_source`,`mc_cid`,...Gh],qh=`<masked>`,Jh=[`li_fat_id`];function Yh(e,t,n){if(!L)return{};var r,i=t?[...Gh,...n||[]]:[],a=Xh(Bh(L.URL,i,qh),e);return sm((r={},om(Jh,(function(e){var t=gm(e);r[e]=t||null})),r),a)}function Xh(e,t){var n=Kh.concat(t||[]),r={};return om(n,(function(t){r[t]=zh(e,t)||null})),r}function Zh(e){var t=function(e){return e?e.search(Wh+`google.([^/?]*)`)===0?`google`:e.search(Wh+`bing.com`)===0?`bing`:e.search(Wh+`yahoo.com`)===0?`yahoo`:e.search(Wh+`duckduckgo.com`)===0?`duckduckgo`:null:null}(e),n=t==`yahoo`?`p`:`q`,r={};if(!Su(t)){r.$search_engine=t;var i=L?zh(L.referrer,n):``;i.length&&(r.ph_keyword=i)}return r}function Qh(){return navigator.language||navigator.userLanguage}var $h=`$direct`;function eg(){return L?.referrer||$h}function tg(e,t,n){n===void 0&&(n=!1);var r=e?[...Gh,...t||[]]:[],i=(n?Wd(Pl?.href):Pl?.href)?.substring(0,1e3);return{r:eg().substring(0,1e3),u:i?Bh(i,r,qh):void 0}}function ng(e,t){t===void 0&&(t=!1);var n=e.r,r=e.u,i=t?Wd(r):r,a={$referrer:n,$referring_domain:n==null?void 0:n==$h?$h:Rh(n)?.host};if(i){a.$current_url=i;var o=Rh(i);a.$host=o?.host,a.$pathname=o?.pathname,sm(a,Xh(i))}return n&&sm(a,Zh(n)),a}function rg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function ig(){try{return new Date().getTimezoneOffset()}catch{return}}var ag={flags:Pp,surveys:Ep},og=[`cookie`,`localstorage`,`localstorage+cookie`,`sessionstorage`,`memory`],sg=`main`,cg=class{constructor(e,t,n){if(n===void 0&&(n=!0),this.ci={},this.fi=!1,this.pi=!1,this.Ne=e,this.gi=n,this.props={},this.mi=void 0,this.yi=(e=>{var t=``;return e.token&&(t=e.token.replace(/\+/g,`PL`).replace(/\//g,`SL`).replace(/=/g,`EQ`)),e.persistence_name?`ph_`+e.persistence_name:`ph_`+t+`_posthog`})(e),this.ii=this.bi(e),this.pi=this.wi(e),this.load(),e.debug&&U.info(`Persistence loaded`,e.persistence,z({},this.props)),this.update_config(e,e,t),this.save(),I){var r=()=>this.flush();mm(I,`beforeunload`,r,{capture:!1}),mm(I,`pagehide`,r,{capture:!1})}}ki(){var e=this.Ne?.persistence_save_debounce_ms;return Cu(e)&&e>0?e:0}isDisabled(){return!!this.xi}bi(e){og.indexOf(e.persistence.toLowerCase())===-1&&(U.critical(`Unknown persistence type `+e.persistence+`; falling back to localStorage+cookie`),e.persistence=`localStorage+cookie`);var t,n=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=!1);var n=[...km,...e];return z({},Om,{H(e){try{var n={};try{n=Em.H(e)||{}}catch{}var r,i=JSON.parse(Om.P(e)||`{}`);if(t){var a={};for(var o in n){var s=n[o];Su(s)||s===``||(a[o]=s)}r=sm(i,a)}else r=sm(n,i);return Om.F(e,r),r}catch{}return null},F(e,t,r,i,a,o){var s=Om.F(e,t,void 0,void 0,o);try{var c={};n.forEach((e=>{t[e]&&(c[e]=t[e])})),Object.keys(c).length&&Em.F(e,c,r,i,a,o)}catch(e){Om.j(e)}return s},q(e,t){try{I?.localStorage.removeItem(e),Em.q(e,t)}catch(e){Om.j(e)}}})}(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),r=!1,i=e.persistence.toLowerCase();return i===`localstorage`&&Om.N()?(t=Om,r=!0):i===`localstorage+cookie`&&n.N()?(t=n,r=!0):i===`sessionstorage`&&Nm.N()?t=Nm:i===`memory`?t=jm:i===`cookie`?t=Em:n.N()?(t=n,r=!0):t=Em,this.fi=r,t}Si(e){return this.yi+`__`+e}wi(e){return this.fi&&!!e.split_storage}properties(){var e={};return om(this.props,((t,n)=>{var r=Ih(n);if(!r||r.exposure===`event`){if(r!=null&&r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(t))return;e[n]=t}})),e}load(){if(!this.xi){var e=this.ii.H(this.yi);e&&(this.props=sm({},e)),this.pi&&this.Ci()}}Ci(){for(var e of Nh){var t=Om.H(this.Si(e));if(t&&!yu(t)){var n=this.Mi(e);
3n.persisted=!0,this.Ti(e)||(n.fingerprint=this.Ei(t,e)),this.Ii(e,t)||sm(this.props,t)}}}Ti(e){return Object.keys(this.props).some((t=>Ih(t)?.storageGroup===e))}Ii(e,t){var n=ag[e];if(!n)return!1;var r=t[n],i=this.props[n];return Cu(r)&&Cu(i)&&i>r}refreshKey(e){if(!this.xi){var t=this.pi?Ih(e)?.storageGroup:void 0,n=t?Om.H(this.Si(t)):this.ii.H(this.yi);if(n&&e in n)this.Pi(e,n[e]);else{if(t){var r=this.ii.H(this.yi);if(r&&e in r)return void this.Pi(e,r[e])}this.Ri(e)}}}save(){if(!this.xi){var e=this.ki();e>0?V(this.Ai)&&(this.Ai=setTimeout((()=>{this.Ai=void 0,this.Fi()}),e)):this.Fi()}}flush(){V(this.Ai)||(clearTimeout(this.Ai),this.Ai=void 0,this.Fi())}Fi(){this.xi||(this.pi?this.Li():this.Oi(this.ii,this.yi,this.props,sg))}Li(){var e=this.Di(),t=e.main,n=e.groups;for(var r of(this.Oi(this.ii,this.yi,t,sg),Nh)){var i,a=n[r];(!yu(a)||(i=this.ci[r])!=null&&i.persisted)&&this.Oi(Om,this.Si(r),a,r)}}Di(){var e={},t={flags:{},surveys:{}};return om(this.props,((n,r)=>{var i=Ih(r)?.storageGroup;i?t[i][r]=n:e[r]=n})),{main:e,groups:t}}Ei(e,t){if(t===sg)return JSON.stringify(e)+`|`+this.$i+`|`+this.Ni+`|`+this.qi;var n={};return om(e,((e,t)=>{var r;n[t]=(r=Ih(t))!=null&&r.volatile?`__volatile__`:e})),JSON.stringify(n)}Oi(e,t,n,r){var i=this.Mi(r);if(r===sg||i.dirty||V(i.fingerprint)){var a;try{if((a=this.Ei(n,r))===i.fingerprint)return void(i.dirty=!1)}catch{a=void 0}e.F(t,n,this.$i,this.Ni,this.qi,this.Ne.debug)?(i.dirty=!1,r!==sg&&(i.persisted=!0),V(a)||(i.fingerprint=a)):this.Ne.debug&&U.warn(`failed to persist storage entry "`+t+`"; will retry on next save`)}}remove(e){var t=(e===void 0?{}:e).keepGroupEntries,n=t!==void 0&&t;if(V(this.Ai)||(clearTimeout(this.Ai),this.Ai=void 0),this.ii.q(this.yi,!1),this.ii.q(this.yi,!0),!n&&this.gi)for(var r of Nh)Om.q(this.Si(r));n?delete this.ci[sg]:this.ci={}}clear(){this.remove(),this.props={}}register_once(e,t,n){if(vu(e)){V(t)&&(t=`None`),this.$i=V(n)?this.ji:n;var r=!1;if(om(e,((e,n)=>{this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.Pi(n,e),r=!0)})),r)return this.save(),!0}return!1}register(e,t){if(vu(e)){this.$i=V(t)?this.ji:t;var n=!1;if(om(e,((t,r)=>{e.hasOwnProperty(r)&&(this.props[r]!==t||vu(t)||B(t))&&(this.Pi(r,t),n=!0)})),n)return this.save(),!0}return!1}unregister(e){var t=typeof e==`string`?[e]:e,n=!1;for(var r of t)r in this.props&&(this.Ri(r),n=!0);n&&this.save()}update_campaign_params(){var e=L?.URL;if(e!==this.mi){var t=Yh(this.Ne.custom_campaign_params,this.Ne.mask_personal_data_properties,this.Ne.custom_personal_data_properties);yu(dm(t))||this.register(t),this.mi=e}}update_search_keyword(){var e;this.register((e=L?.referrer)?Zh(e):{})}update_referrer_info(){this.register_once({$referrer:eg(),$referring_domain:L!=null&&L.referrer&&Rh(L.referrer)?.host||$h},void 0)}set_initial_person_info(){this.props[Rp]||this.props[zp]||this.register_once({[Bp]:tg(this.Ne.mask_personal_data_properties,this.Ne.custom_personal_data_properties,this.Ne.disable_capture_url_hashes)},void 0)}get_initial_props(){var e={};om([zp,Rp],(t=>{var n=this.props[t];n&&om(n,(function(t,n){e[`$initial_`+fu(n)]=t}))}));var t=this.props[Bp];return t&&sm(e,function(e,t){t===void 0&&(t=!1);var n=ng(e,t),r={};return om(n,(function(e,t){r[`$initial_`+fu(t)]=e})),r}(t,this.Ne.disable_capture_url_hashes)),e}safe_merge(e){return om(this.props,(function(t,n){n in e||(e[n]=t)})),e}update_config(e,t,n){this.ji=this.$i=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var r=e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var n=[...e].sort(),r=[...t].sort();return n.every(((e,t)=>e===r[t]))})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[]),i=r?this.bi(e):this.ii,a=this.wi(e);if(r||a!==this.pi){var o=this.props;this.clear(),this.ii=i,this.pi=a,this.props=o,this.save()}}set_disabled(e){this.xi=e,this.xi?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ni&&(this.Ni=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.qi&&(this.qi=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,t){var n=this.props[Xf]||{};
3n[e]=t,this.Pi(Xf,n),this.save()}remove_event_timer(e){var t=this.props[Xf]||{},n=t[e];return V(n)||(delete t[e],this.Pi(Xf,t),this.save()),n}get_property(e){return this.props[e]}set_property(e,t){this.Pi(e,t),this.save()}Pi(e,t){var n;this.props[e]=t,(n=Ih(e))!=null&&n.volatile||this.Bi(e)}Ri(e){delete this.props[e],this.Bi(e)}Bi(e){var t=Ih(e)?.storageGroup;t&&(this.Mi(t).dirty=!0)}Mi(e){return this.ci[e]||(this.ci[e]={})}};function lg(e){var t=!0;return{dispose(){if(t){t=!1;var n=e();n&&_u(n.then)&&n.then(void 0,(()=>{}))}}}}var ug={GZipJS:`gzip-js`,Base64:`base64`},dg={Activation:`events`,Cancellation:`cancelEvents`},fg={Popover:`popover`,API:`api`,Widget:`widget`,ExternalSurvey:`external_survey`},pg={SHOWN:`survey shown`,DISMISSED:`survey dismissed`,SENT:`survey sent`,ABANDONED:`survey abandoned`},mg={SURVEY_ID:`$survey_id`,SURVEY_NAME:`$survey_name`,SURVEY_RESPONSE:`$survey_response`,SURVEY_ITERATION:`$survey_iteration`,SURVEY_ITERATION_START_DATE:`$survey_iteration_start_date`,SURVEY_PARTIALLY_COMPLETED:`$survey_partially_completed`,SURVEY_SUBMISSION_ID:`$survey_submission_id`,SURVEY_QUESTIONS:`$survey_questions`,SURVEY_COMPLETED:`$survey_completed`,PRODUCT_TOUR_ID:`$product_tour_id`,SURVEY_LAST_SEEN_DATE:`$survey_last_seen_date`,SURVEY_LANGUAGE:`$survey_language`},hg={Popover:`popover`,Inline:`inline`},gg={SHOWN:`product tour shown`,DISMISSED:`product tour dismissed`,COMPLETED:`product tour completed`,STEP_SHOWN:`product tour step shown`,STEP_COMPLETED:`product tour step completed`,BUTTON_CLICKED:`product tour button clicked`,STEP_SELECTOR_FAILED:`product tour step selector failed`,BANNER_CONTAINER_SELECTOR_FAILED:`product tour banner container selector failed`,BANNER_ACTION_CLICKED:`product tour banner action clicked`},_g={TOUR_ID:`$product_tour_id`,TOUR_NAME:`$product_tour_name`,TOUR_ITERATION:`$product_tour_iteration`,TOUR_RENDER_REASON:`$product_tour_render_reason`,TOUR_STEP_ID:`$product_tour_step_id`,TOUR_STEP_ORDER:`$product_tour_step_order`,TOUR_STEP_TYPE:`$product_tour_step_type`,TOUR_DISMISS_REASON:`$product_tour_dismiss_reason`,TOUR_BUTTON_TEXT:`$product_tour_button_text`,TOUR_BUTTON_ACTION:`$product_tour_button_action`,TOUR_BUTTON_LINK:`$product_tour_button_link`,TOUR_BUTTON_TOUR_ID:`$product_tour_button_tour_id`,TOUR_STEPS_COUNT:`$product_tour_steps_count`,TOUR_STEP_SELECTOR:`$product_tour_step_selector`,TOUR_STEP_SELECTOR_FOUND:`$product_tour_step_selector_found`,TOUR_STEP_ELEMENT_TAG:`$product_tour_step_element_tag`,TOUR_STEP_ELEMENT_ID:`$product_tour_step_element_id`,TOUR_STEP_ELEMENT_CLASSES:`$product_tour_step_element_classes`,TOUR_STEP_ELEMENT_TEXT:`$product_tour_step_element_text`,TOUR_ERROR:`$product_tour_error`,TOUR_MATCHES_COUNT:`$product_tour_matches_count`,TOUR_FAILURE_PHASE:`$product_tour_failure_phase`,TOUR_WAITED_FOR_ELEMENT:`$product_tour_waited_for_element`,TOUR_WAIT_DURATION_MS:`$product_tour_wait_duration_ms`,TOUR_BANNER_SELECTOR:`$product_tour_banner_selector`,TOUR_LINKED_SURVEY_ID:`$product_tour_linked_survey_id`,USE_MANUAL_SELECTOR:`$use_manual_selector`,INFERENCE_DATA_PRESENT:`$inference_data_present`,TOUR_LAST_SEEN_DATE:`$product_tour_last_seen_date`,TOUR_TYPE:`$product_tour_type`},vg=Uf(`[RateLimiter]`),yg=class{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach((e=>{vg.info((e||`events`)+` is quota limited.`),this.serverLimits[e]=new Date().getTime()+6e4}))}catch(e){vg.warn(`could not rate limit - continuing. Error: "`+e?.message+`"`,{text:t});return}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){return this.instance.config.rate_limiting?.events_per_second||10}get captureEventsBurstLimit(){return Math.max(this.instance.config.rate_limiting?.events_burst_limit||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var t;e===void 0&&(e=!1);var n=this.captureEventsBurstLimit,r=this.captureEventsPerSecond,i=new Date().getTime(),a=this.instance.persistence?.get_property(Lp)??{tokens:n,last:i};a.tokens+=(i-a.last)/1e3*r,a.last=i,a.tokens>n&&(a.tokens=n);var o=1>a.tokens;if(o||e||(a.tokens=Math.max(0,a.tokens-1)),o&&!e){var s=(Cu(a.dropped)?a.dropped:0)+1;a.dropped=s,!this.lastEventRateLimited&&this.Hi(s)&&(a.dropped=0)}return this.lastEventRateLimited=o,(t=this.instance.persistence)==null||t.set_property(Lp,a),{isRateLimited:o,remainingTokens:a.tokens}}Ui(e){var t=this.instance.config.property_denylist;return!B(t)||!t.includes(e)}zi(){if(this.Ui(`$current_url`)&&this.Ui(`$pathname`)&&Pl!=null&&Pl.pathname)return``+(Pl.origin??``)+Pl.pathname}Hi(e){var t,n=this.captureEventsBurstLimit,r=this.captureEventsPerSecond,i=this.zi(),a=this.Ui(`$session_id`)?(t=this.instance).get_session_id?.call(t):void 0,o=[e+` event(s) dropped since the last warning`,i?`triggered on `+i:void 0,a?`session `+a:void 0].filter(
3Boolean).join(`, `);return!!this.instance.capture(`$$client_ingestion_warning`,{$$client_ingestion_warning_message:`posthog-js client rate limited: `+o+`. Config is set to `+r+` events per second and `+n+` events burst limit.`},{skip_client_rate_limiting:!0})}isServerRateLimited(e){var t=this.serverLimits[e||`events`]||!1;return!1!==t&&new Date().getTime()<t}},bg=Uf(`[RemoteConfig]`),xg=class{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=R._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}Wi(e){var t,n;(t=R.__PosthogExtensions__)!=null&&t.loadExternalDependency?(n=R.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,`remote-config`,(()=>e(this.remoteConfig))):e()}Vi(e){this._instance._send_request({method:`GET`,url:this._instance.requestRouter.endpointFor(`assets`,`/array/`+this._instance.config.token+`/config`),callback:e})}load(){try{if(this.remoteConfig)return bg.info(`Using preloaded remote config`,this.remoteConfig),this.Zi(this.remoteConfig),void this.Gi();if(this._instance.Qi())return void bg.warn(`Remote config is disabled. Falling back to local config.`);this.Wi((e=>{if(!e)return bg.info(`No config found after loading remote JS config. Falling back to JSON.`),void this.Vi((e=>{this.Zi(e.json,e),this.Gi()}));this.Zi(e),this.Gi()}))}catch(e){bg.error(`Error loading remote config`,e),this.Zi()}}stop(){this.Ki&&=(clearInterval(this.Ki),void 0)}refresh(){!this._instance.Qi()&&L&&L.visibilityState!==`hidden`&&this._instance.reloadFeatureFlags()}Gi(){if(!this.Ki){var e=this._instance.config.remote_config_refresh_interval_ms??3e5;e!==0&&(this.Ki=setInterval((()=>{this.refresh()}),e))}}Zi(e,t){!e&&t&&(t.statusCode===0?t.error||bg.warn(`Failed to fetch remote config from PostHog.`):bg.error(`Failed to fetch remote config from PostHog.`));try{this._instance.Zi(e?{ok:!0,config:e}:{ok:!1})}catch(e){bg.error(`Error applying remote config`,e)}if(!1!==e?.hasFeatureFlags&&!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var n;(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded()}catch(e){bg.error(`Error loading feature flags`,e)}}},Sg=Uint8Array,Cg=Uint16Array,wg=Uint32Array,Tg=new Sg([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Eg=new Sg([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Dg=new Sg([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Og=function(e,t){for(var n=new Cg(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new wg(n[30]);for(r=1;30>r;++r)for(var a=n[r];n[r+1]>a;++a)i[a]=a-n[r]<<5|r;return[n,i]},kg=Og(Tg,2),Ag=kg[1];kg[0][28]=258,Ag[258]=28;for(var jg=Og(Eg,0)[1],Mg=new Cg(32768),Ng=0;32768>Ng;++Ng){var Pg=(43690&Ng)>>>1|(21845&Ng)<<1;Mg[Ng]=((65280&(Pg=(61680&(Pg=(52428&Pg)>>>2|(13107&Pg)<<2))>>>4|(3855&Pg)<<4))>>>8|(255&Pg)<<8)>>>1}var Fg=function(e,t,n){for(var r=e.length,i=0,a=new Cg(t);r>i;++i)++a[e[i]-1];var o,s=new Cg(t);for(i=0;t>i;++i)s[i]=s[i-1]+a[i-1]<<1;if(n){o=new Cg(1<<t);var c=15-t;for(i=0;r>i;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=s[e[i]-1]++<<u,f=d|(1<<u)-1;f>=d;++d)o[Mg[d]>>>c]=l}else for(o=new Cg(r),i=0;r>i;++i)o[i]=Mg[s[e[i]-1]++]>>>15-e[i];return o},Ig=new Sg(288);for(Ng=0;144>Ng;++Ng)Ig[Ng]=8;for(Ng=144;256>Ng;++Ng)Ig[Ng]=9;for(Ng=256;280>Ng;++Ng)Ig[Ng]=7;for(Ng=280;288>Ng;++Ng)Ig[Ng]=8;var Lg=new Sg(32);for(Ng=0;32>Ng;++Ng)Lg[Ng]=5;var Rg=Fg(Ig,9,0),zg=Fg(Lg,5,0),Bg=function(e){return(e/8>>0)+(7&e&&1)},Vg=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Cg?Cg:e instanceof wg?wg:Sg)(n-t);return r.set(e.subarray(t,n)),r},Hg=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},Ug=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Wg=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return[new Sg(0),0];if(i==1){var o=new Sg(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[d].f>n[l].f?l++:d++],c=n[l!=u&&n[d].f>n[l].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};var f=a[0].s;for(r=1;i>r;++r)a[r].s>f&&(f=a[r].s);
vendor: 4,255 bytes, line 3
3var p=new Cg(f+1),m=Gg(n[u-1],p,0);if(m>t){r=0;var h=0,g=m-t,_=1<<g;for(a.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));i>r;++r){var v=a[r].s;if(t>=p[v])break;h+=_-(1<<m-p[v]),p[v]=t}for(h>>>=g;h>0;){var y=a[r].s;t>p[y]?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return[new Sg(p),m]},Gg=function(e,t,n){return e.s==-1?Math.max(Gg(e.l,t,n+1),Gg(e.r,t,n+1)):t[e.s]=n},Kg=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Cg(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;t>=s;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return[n.subarray(0,r),t]},qg=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},Jg=function(e,t,n){var r=n.length,i=Bg(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var a=0;r>a;++a)e[i+a+4]=n[a];return 8*(i+4+r)},Yg=function(e,t,n,r,i,a,o,s,c,l,u){Hg(t,u++,n),++i[256];for(var d=Wg(i,15),f=d[0],p=d[1],m=Wg(a,15),h=m[0],g=m[1],_=Kg(f),v=_[0],y=_[1],b=Kg(h),x=b[0],S=b[1],C=new Cg(19),w=0;v.length>w;++w)C[31&v[w]]++;for(w=0;x.length>w;++w)C[31&x[w]]++;for(var T=Wg(C,7),E=T[0],ee=T[1],D=19;D>4&&!E[Dg[D-1]];--D);var te,ne,O,re,k=l+5<<3,ie=qg(i,Ig)+qg(a,Lg)+o,A=qg(i,f)+qg(a,h)+o+14+3*D+qg(C,E)+(2*C[16]+3*C[17]+7*C[18]);if(ie>=k&&A>=k)return Jg(t,u,e.subarray(c,c+l));if(Hg(t,u,1+(ie>A)),u+=2,ie>A){te=Fg(f,p,0),ne=f,O=Fg(h,g,0),re=h;var ae=Fg(E,ee,0);for(Hg(t,u,y-257),Hg(t,u+5,S-1),Hg(t,u+10,D-4),u+=14,w=0;D>w;++w)Hg(t,u+3*w,E[Dg[w]]);u+=3*D;for(var oe=[v,x],se=0;2>se;++se){var ce=oe[se];for(w=0;ce.length>w;++w)Hg(t,u,ae[le=31&ce[w]]),u+=E[le],le>15&&(Hg(t,u,ce[w]>>>5&127),u+=ce[w]>>>12)}}else te=Rg,ne=Ig,O=zg,re=Lg;for(w=0;s>w;++w)if(r[w]>255){var le;Ug(t,u,te[257+(le=r[w]>>>18&31)]),u+=ne[le+257],le>7&&(Hg(t,u,r[w]>>>23&31),u+=Tg[le]);var j=31&r[w];Ug(t,u,O[j]),u+=re[j],j>3&&(Ug(t,u,r[w]>>>5&8191),u+=Eg[j])}else Ug(t,u,te[r[w]]),u+=ne[r[w]];return Ug(t,u,te[256]),u+ne[256]},Xg=new wg([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Zg=function(){for(var e=new wg(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),Qg=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function $g(e,t){t===void 0&&(t={});var n=function(){var e=4294967295;return{p(t){for(var n=e,r=0;t.length>r;++r)n=Zg[255&n^t[r]]^n>>>8;e=n},d(){return 4294967295^e}}}(),r=e.length;n.p(e);var i,a,o,s,c,l=(s=10+((i=t).filename&&i.filename.length+1||0),c=8,function(e,t,n,r,i,a){var o=e.length,s=new Sg(r+o+5*(1+Math.floor(o/7e3))+i),c=s.subarray(r,s.length-i),l=0;if(!t||8>o)for(var u=0;o>=u;u+=65535){var d=u+65535;o>d?l=Jg(c,l,e.subarray(u,d)):(c[u]=!0,l=Jg(c,l,e.subarray(u,o)))}else{for(var f=Xg[t-1],p=f>>>13,m=8191&f,h=(1<<n)-1,g=new Cg(32768),_=new Cg(h+1),v=Math.ceil(n/3),y=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&h},x=new wg(25e3),S=new Cg(288),C=new Cg(32),w=0,T=0,E=(u=0,0),ee=0,D=0;o>u;++u){var te=b(u),ne=32767&u,O=_[te];if(g[ne]=O,_[te]=ne,u>=ee){var re=o-u;if((w>7e3||E>24576)&&re>423){l=Yg(e,c,0,x,S,C,T,E,D,u-D,l),E=w=T=0,D=u;for(var k=0;286>k;++k)S[k]=0;for(k=0;30>k;++k)C[k]=0}var ie=2,A=0,ae=m,oe=ne-O&32767;if(re>2&&te==b(u-oe))for(var se=Math.min(p,re)-1,ce=Math.min(32767,u),le=Math.min(258,re);ce>=oe&&--ae&&ne!=O;){if(e[u+ie]==e[u+ie-oe]){for(var j=0;le>j&&e[u+j]==e[u+j-oe];++j);if(j>ie){if(ie=j,A=oe,j>se)break;var ue=Math.min(oe,j-2),de=0;for(k=0;ue>k;++k){var fe=u-oe+k+32768&32767,pe=fe-g[fe]+32768&32767;pe>de&&(de=pe,O=fe)}}}oe+=(ne=O)-(O=g[ne])+32768&32767}if(A){x[E++]=268435456|Ag[ie]<<18|jg[A];var me=31&Ag[ie],he=31&jg[A];T+=Tg[me]+Eg[he],++S[257+me],++C[he],ee=u+ie,++w}else x[E++]=e[u],++S[e[u]]}}l=Yg(e,c,!0,x,S,C,T,E,D,u-D,l)}return Vg(s,0,r+Bg(l)+i)}(a=e,(o=t).level==null?6:o.level,o.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+o.mem,s,c)),u=l.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&Qg(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;n.length>=r;++r)e[r+10]=n.charCodeAt(r)}}(l,t),Qg(l,u-8,n.d()),Qg(l,u-4,r),l}var e_=!!Il||!!Fl,t_=`text/plain`,n_=!1,r_=(e,t)=>
3{var n=e.split(`#`),r=n[1],i=n[0].split(`?`),a=i[0],o=i[1];if(!o)return e;var s=o.split(`&`).filter((e=>e.split(`=`)[0]!==t)).join(`&`);return a+(s?`?`+s:``)+(r?`#`+r:``)},i_=function(e,t,n){n===void 0&&(n=!0);var r=e.split(`?`),i=r[0],a=r[1],o=z({},t),s=a?.split(`&`).map((e=>{var t,r=e.split(`=`),i=r[0],a=n&&(t=o[i])!=null?t:r[1];return delete o[i],i+`=`+a}))??[],c=function(e,t){var n,r;t===void 0&&(t=`&`);var i=[];return om(e,(function(e,t){V(e)||V(t)||t===`undefined`||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+`=`+n)})),i.join(t)}(o);return c&&s.push(c),s.length>0?i+`?`+s.join(`&`):i},a_=e=>{if(e.Ji)return e.Ji;var t=e.data,n=e.compression;if(t){if(n===ug.GZipJS){var r=$g(function(e,t){var n=e.length;if(typeof TextEncoder<`u`)return new TextEncoder().encode(e);for(var r=new Sg(e.length+(e.length>>>1)),i=0,a=function(e){r[i++]=e},o=0;n>o;++o){if(i+5>r.length){var s=new Sg(i+8+(n-o<<1));s.set(r),r=s}var c=e.charCodeAt(o);128>c?a(c):2048>c?(a(192|c>>>6),a(128|63&c)):c>55295&&57344>c?(a(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++o))>>>18),a(128|c>>>12&63),a(128|c>>>6&63),a(128|63&c)):(a(224|c>>>12),a(128|c>>>6&63),a(128|63&c))}return Vg(r,0,i)}(Lh(t)),{mtime:0});return{contentType:t_,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===ug.Base64){var i=(e=>`data=`+encodeURIComponent(typeof e==`string`?e:Lh(e)))(function(e){return e&&btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,((e,t)=>String.fromCharCode(parseInt(t,16)))))}(Lh(t)));return{contentType:`application/x-www-form-urlencoded`,body:i,estimatedSize:new Blob([i]).size}}var a=Lh(t);return{contentType:`application/json`,body:a,estimatedSize:new Blob([a]).size}}},o_=e=>{var t,n,r=()=>e.transport===`sendBeacon`?{url:i_(e.url,{compression:ug.Base64}),encodedBody:a_(z({},e,{compression:ug.Base64,Ji:void 0}))}:{url:r_(e.url,`compression`),encodedBody:a_(z({},e,{compression:void 0,Ji:void 0}))};try{t=a_(e)}catch(t){if(ru(e.compression,zh(e.url,`compression`)))return U.error(`Failed to gzip request body, sending uncompressed payload`,t),r();throw t}return t&&ru(e.compression,zh(e.url,`compression`))&&!((n=t.body)instanceof ArrayBuffer?nu(new Uint8Array(n)):ArrayBuffer.isView(n)&&nu(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(n_=!0,r()):{url:e.url,encodedBody:t}},s_=e=>{try{return o_(e)}catch(t){U.error(t),e.callback==null||e.callback({statusCode:0,error:t});return}},c_=function(){var e=Wl((function*(e){var t=yield function(e,t,n){return su.apply(this,arguments)}(Lh(e.data),Hl.DEBUG,{rethrow:!0});if(!t)return e;var n=yield t.arrayBuffer();return z({},e,{Ji:{contentType:t_,body:n,estimatedSize:n.byteLength}})}));return function(t){return e.apply(this,arguments)}}(),l_=/Failed to fetch|NetworkError|Load failed/i,u_=e=>e?.name===`TypeError`&&l_.test(e?.message||``),d_=e=>{var t=s_(e);if(t){var n=t.url,r=t.encodedBody??{},i=r.contentType,a=r.body,o=r.estimatedSize,s=new Headers;om(e.headers,(function(e,t){s.append(t,e)})),i&&s.append(`Content-Type`,i);var c=null,l=!1;if(Ll){var u=new Ll;c={signal:u.signal,timeout:setTimeout((()=>{var t,n;l=!0,u.abort((t=e.timeout,(n=Error(`PostHog request timed out`+(t?` after `+t+`ms`:``))).name=`AbortError`,n))}),e.timeout)}}var d=t=>{l&&t?.name===`AbortError`||u_(t)?U.warn(t):U.error(t),e.callback==null||e.callback({statusCode:0,error:t})};try{Fl(n,z({method:e?.method||`GET`,headers:s,keepalive:e.method===`POST`&&!e.Yi&&52428.8>(o||0),body:a,signal:c?.signal},e.fetchOptions)).then((t=>t.text().then((n=>{var r={statusCode:t.status,text:n};if(t.status===200)try{r.json=JSON.parse(n)}catch(e){U.error(e)}e.callback==null||e.callback(r)})))).catch(d).finally((()=>c?clearTimeout(c.timeout):null))}catch(e){c&&clearTimeout(c.timeout),d(e)}}},f_=e=>{try{var t=o_(e),n=t.url,r=t.encodedBody??{},i=r.body,a=r.estimatedSize;if(!i)return;var o=i instanceof Blob?i:new Blob([i],{type:r.contentType});if(Nl.sendBeacon(n,o))return;var s=B(e.data)?e.data:e.data?.batch;if(B(s)&&s.length>1&&(a??0)>16384){var c=Math.ceil(s.length/2),l=t=>B(e.data)?t:z({},e.data,{batch:t});f_(z({},e,{data:l(s.slice(0,c))})),f_(z({},e,{data:l(s.slice(c))}));return}U.warn(`Beacon of ~`+(a??0)+` bytes was rejected by the browser, falling back to fetch`),d_(z({},e,{Yi:!0}))}catch(e){U.warn(`Beacon send failed`,e)}},p_=(e,t,n,r)=>{var i=r===`query`?t===`POST`?`sent_at`:`_`:void 0;return i_(n===ug.GZipJS?r_(e,`compression`):e,z({},i?{[i]:Date.now().toString()}:{},n===ug.GZipJS?{}:{compression:n}))},m_=[];Fl&&m_.push({transport:`fetch`,method:d_}),Il&&m_.push({transport:`XHR`,method(e){var t=s_(e);if(t){var n=new Il,r=t.encodedBody;n.open(e.method||`GET`,t.url,!0);var i=r??{},a=i.contentType,o=i.body;om(e.headers,(function(e,t){n.setRequestHeader(t,e)}
3)),a&&n.setRequestHeader(`Content-Type`,a),e.timeout&&(n.timeout=e.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var t={statusCode:n.status,text:n.responseText};if(n.status===200)try{t.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(t)}},n.send(o)}}}),Nl!=null&&Nl.sendBeacon&&m_.push({transport:`sendBeacon`,method:f_});var h_=3e3,g_=class{constructor(e,t){this.Xi=!0,this.tr=[],this.er=Iu(t?.flush_interval_ms||h_,250,5e3,U.createLogger(`flush interval`),h_),this.ir=e}enqueue(e){this.tr.push(e),this.rr||this.nr()}unload(){this.sr();var e=this.tr.length>0?this.ar():{},t=Object.values(e);[...t.filter((e=>e.url.indexOf(`/e`)===0)),...t.filter((e=>e.url.indexOf(`/e`)!==0))].map((e=>{this.lr(z({},e,{transport:`sendBeacon`}))}))}enable(){this.Xi=!1,this.nr()}nr(){var e=this;this.Xi||(this.rr=setTimeout((()=>{if(this.sr(),this.tr.length>0){var t=this.ar(),n=function(){var n=t[r],i=new Date().getTime();n.data&&B(n.data)&&om(n.data,(e=>{e.offset=Math.abs(e.timestamp-i),delete e.timestamp})),e.lr(n)};for(var r in t)n()}}),this.er))}lr(e){try{this.ir(e)}catch(e){U.error(e)}}sr(){clearTimeout(this.rr),this.rr=void 0}ar(){var e={};return om(this.tr,(t=>{var n,r=t,i=(r?r.batchKey:null)||r.url;V(e[i])&&(e[i]=z({},r,{data:[]})),(n=e[i].data)==null||n.push(r.data)})),this.tr=[],e}},__=[`retriesPerformedSoFar`],v_=class{constructor(e){this.ur=!1,this.hr=3e3,this.tr=[],this._instance=e,this.tr=[],this.dr=!0,!V(I)&&`onLine`in I.navigator&&(this.dr=I.navigator.onLine,this.vr=()=>{this.dr=!0,this.cr()},this.pr=()=>{this.dr=!1},mm(I,`online`,this.vr),mm(I,`offline`,this.pr))}get length(){return this.tr.length}retriableRequest(e){var t=e.retriesPerformedSoFar,n=Gl(e,__);wu(t)&&(n.url=i_(n.url,{retry_count:t})),this._instance._send_request(z({},n,{callback:e=>{if(e.statusCode!==200&&(400>e.statusCode||e.statusCode>=500)){if((e.statusCode===0?3:10)>(t??0))return void this.At(z({retriesPerformedSoFar:t},n));e.statusCode===0&&U.warn(`Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after `+(t??0)+` retries.`)}n.callback==null||n.callback(e)}}))}At(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*2**e,n=t/2,r=Math.min(18e5,t),i=Math.random()-.5;return Math.ceil(r+i*(r-n))}(t),r=Date.now()+n;this.tr.push({retryAt:r,requestOptions:e});var i=`Enqueued failed request for retry in `+n;navigator.onLine||(i+=` (Browser is offline)`),U.warn(i),this.ur||(this.ur=!0,this.gr())}gr(){if(this.mr&&clearTimeout(this.mr),this.tr.length===0)return this.ur=!1,void(this.mr=void 0);this.mr=setTimeout((()=>{this.dr&&this.tr.length>0&&this.cr(),this.gr()}),this.hr)}cr(){var e=Date.now(),t=[],n=this.tr.filter((n=>e>n.retryAt||(t.push(n),!1)));if(this.tr=t,n.length>0)for(var r of n)this.retriableRequest(r.requestOptions)}unload(){for(var e of(this.mr&&=(clearTimeout(this.mr),void 0),this.ur=!1,V(I)||(this.vr&&=(I.removeEventListener(`online`,this.vr),void 0),this.pr&&=(I.removeEventListener(`offline`,this.pr),void 0)),this.tr)){var t=e.requestOptions;try{this._instance._send_request(z({},t,{transport:`sendBeacon`}))}catch(e){U.error(e)}}this.tr=[]}},y_=class{constructor(e){this.yr=()=>{this.br||={};var e=this.scrollElement(),t=this.scrollY(),n=e?Math.max(0,e.scrollHeight-e.clientHeight):0,r=t+(e?.clientHeight||0),i=e?.scrollHeight||0;this.br.lastScrollY=Math.ceil(t),this.br.maxScrollY=Math.max(t,this.br.maxScrollY??0),this.br.maxScrollHeight=Math.max(n,this.br.maxScrollHeight??0),this.br.lastContentY=r,this.br.maxContentY=Math.max(r,this.br.maxContentY??0),this.br.maxContentHeight=Math.max(i,this.br.maxContentHeight??0)},this._instance=e}get _r(){return this._instance.config.scroll_root_selector}getContext(){return this.br}resetContext(){var e=this.br;return setTimeout(this.yr,0),e}startMeasuringScrollPosition(){mm(I,`scroll`,this.yr,{capture:!0}),mm(I,`scrollend`,this.yr,{capture:!0}),mm(I,`resize`,this.yr)}scrollElement(){if(!this._r)return I?.document.documentElement;for(var e of B(this._r)?this._r:[this._r]){var t=I?.document.querySelector(e);
3if(t)return t}}wr(e){var t=e===`y`?`scrollTop`:`scrollLeft`;if(this._r){var n=this.scrollElement();return n&&n[t]||0}return I?e===`y`?I.scrollY||I.pageYOffset||I.document.documentElement.scrollTop||0:I.scrollX||I.pageXOffset||I.document.documentElement.scrollLeft||0:0}scrollY(){return this.wr(`y`)}scrollX(){return this.wr(`x`)}},b_=e=>tg(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties,e?.config.disable_capture_url_hashes),x_=class{constructor(e,t,n,r){this.kr=e=>{var t=this.Sr();if(!t||t.sessionId!==e){var n={sessionId:e,props:this.Cr(this._instance)};this.Mr.register({[Ip]:n})}},this._instance=e,this.Tr=t,this.Mr=n,this.Cr=r||b_,this.Tr.onSessionId(this.kr)}Sr(){return this.Mr.props[Ip]}getSetOnceProps(){var e=this.Sr()?.props;return e?`r`in e?ng(e,this._instance.config.disable_capture_url_hashes):{$referring_domain:e.referringDomain,$pathname:e.initialPathName,utm_source:e.utm_source,utm_campaign:e.utm_campaign,utm_medium:e.utm_medium,utm_content:e.utm_content,utm_term:e.utm_term}:{}}getSessionProps(){var e={};return om(dm(this.getSetOnceProps()),((t,n)=>{n===`$current_url`&&(n=`url`),e[`$session_entry_`+fu(n)]=t})),e}},S_=class{on(e,t){return this.Er[e]||(this.Er[e]=[]),this.Er[e].push(t),()=>{this.Er[e]=this.Er[e].filter((e=>e!==t))}}emit(e,t){for(var n of this.Er[e]||[])n(t);for(var r of this.Er[`*`]||[])r(e,t)}constructor(){this.Er={}}},C_=Uf(`[SessionId]`),w_=864e5,T_=class{on(e,t){return this.Ir.on(e,t)}constructor(e,t,n){var r;if(this.Pr=null,this.Rr=[],this.Ar=void 0,this.Fr=!1,this.Ir=new S_,this.Lr=(e,t)=>!(!wu(e)||!wu(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error(`SessionIdManager requires a PostHogPersistence instance`);if(e.config.cookieless_mode===Yp)throw Error(`SessionIdManager cannot be used with cookieless_mode="always"`);this.Ne=e.config,this.Mr=e.persistence,this.Or=void 0,this.Dr=void 0,this._sessionStartTimestamp=null,this.$r=void 0,this._sessionActivityTimestamp=null,this.Nr=t||Sm,this.qr=n||Sm;var i=this.Ne.persistence_name||this.Ne.token;if(this._sessionTimeoutMs=1e3*Iu(this.Ne.session_idle_timeout_seconds||1800,60,36e3,C_.createLogger(`session_idle_timeout_seconds`),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.jr(),this.Br=`ph_`+i+`_window_id`,this.Hr=`ph_`+i+`_primary_window_exists`,this.Ur()){var a=Nm.H(this.Br),o=Nm.H(this.Hr);a&&!o?this.Or=a:Nm.q(this.Br),Nm.F(this.Hr,!0)}(r=this.Ne.bootstrap)!=null&&r.sessionID&&this.setBootstrapSessionId(this.Ne.bootstrap.sessionID),this.zr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return V(this.Rr)&&(this.Rr=[]),this.Rr.push(e),this.Dr&&e(this.Dr,this.Or),()=>{this.Rr=this.Rr.filter((t=>t!==e))}}Ur(){return this.Ne.persistence!==`memory`&&!this.Mr.xi&&Nm.N()}Wr(e){e!==this.Or&&(this.Or=e,this.Ur()&&Nm.F(this.Br,e))}Vr(){return this.Or?this.Or:this.Ur()?Nm.H(this.Br):null}Zr(e){var t=this.Pr;return!Su(t)&&!Su(e)&&5e3>Math.abs(e-t)}Gr(e,t,n){var r=t!==this._sessionActivityTimestamp,i=e===this.Dr&&n===this._sessionStartTimestamp;this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this.Dr=e,i&&!r||i&&this.Zr(t)||(this.Pr=t,this.Mr.register({[fp]:[t,e,n]}))}Qr(){var e=this.Ne?.persistence_save_debounce_ms;return wu(e)&&e>0}Kr(){this.Qr()?this.Mr.refreshKey(fp):(this.Mr.flush(),this.Mr.load())}Jr(){if(!Su(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Pr){this.Kr();var e=this.Yr();e[1]===this.Dr&&e[2]===this._sessionStartTimestamp&&(this.Pr=this._sessionActivityTimestamp,this.Mr.register({[fp]:[this._sessionActivityTimestamp,this.Dr??null,this._sessionStartTimestamp]}),this.Mr.flush())}}Xr(){var e=this.Yr()[0],t=wu(e)?e:0,n=wu(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(t,n)}tn(e){return this.Kr(),this.Lr(e,this.Xr())}Yr(){var e=this.Mr.props[fp];return B(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Pr=null,this.$r=void 0,clearTimeout(this.en),this.en=void 0,this.Gr(null,null,null)}setBootstrapSessionId(e,t){t===void 0&&(t=!1);var n=function(e,t){t===void 0&&(t=new Date().getTime());try{var n=(e=>{var t=e.replace(/-/g,``);if(t.length!==32)throw Error(`Not a valid UUID`);if(t[12]!==`7`)throw Error(`Not a UUIDv7`);return parseInt(t.substring(0,12),16)})(e);return n>t+6e4?void C_.error(`Bootstrap sessionID cannot be in the future`):n}catch(e){C_.error(`Invalid sessionID in bootstrap`,e);return}}(e);return!V(n)&&(t?this.$r={sessionId:e,sessionStartTimestamp:n}:this.Gr(e,new Date().getTime(),n),!0)}destroy(){this.Fr=!0,this.Jr(),clearTimeout(this.en),this.en=void 0,this.Ar&&I&&(I.removeEventListener(em,this.Ar,{capture:!1}),this.Ar=void 0),this.Rr=[]}zr(){this.Ar=()=>{this.Jr(),this.Ur()&&Nm.q(this.Hr)},mm(I,em,this.Ar,{capture:!1})}
3checkAndGetSessionAndWindowId(e,t){if(e===void 0&&(e=!1),t===void 0&&(t=null),this.Ne.cookieless_mode===Yp)throw Error(`checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"`);var n=t||new Date().getTime(),r=this.Yr(),i=r[1],a=r[2],o=this.Xr(),s=this.Vr(),c=this.$r,l=!!c&&(c.sessionStartTimestamp>n+6e4||n-c.sessionStartTimestamp>w_),u=c?l:wu(a)&&Math.abs(n-a)>w_,d=!1,f=!1,p=!i||!!c,m=i,h=!p&&!e&&this.Lr(n,o);if(h){(h=this.tn(n))||C_.info(`cross-tab refresh kept the session alive`,{sessionId:i});var g=this.Yr();i=g[1],a=g[2]}if(p||h||u){var _=c&&!l;i=_?c.sessionId:this.Nr(),s=this.qr(),C_.info(`new session ID assigned`,{sessionId:i,windowId:s,bootstrapped:!!_,changeReason:{noSessionId:p,activityTimeout:h,sessionPastMaximumLength:u}}),a=_?c.sessionStartTimestamp:n,this.$r=void 0,d=!0}else s||(s=this.qr(),d=!0),(f=i!==m)&&(C_.info(`adopted cross-tab session id`,{sessionId:i,windowId:s}),d=!0);var v=wu(o)&&e&&!u?o:n,y=wu(a)?a:new Date().getTime();this.Wr(s),this.Gr(i,v,y),e||this.jr();var b={noSessionId:p,activityTimeout:h,sessionPastMaximumLength:u,crossTabAdoption:f};return d&&this.Rr.forEach((e=>e(i,s,b))),{sessionId:i,windowId:s,sessionStartTimestamp:y,changeReason:d?b:void 0,lastActivityTimestamp:o}}jr(){this.Fr||(clearTimeout(this.en),this.en=setTimeout((()=>{if(!this.Fr){if(this.tn(new Date().getTime())){var e=this.Dr;this.resetSessionId(),this.Ir.emit(`forcedIdleReset`,{idleSessionId:e})}else this.jr()}}),1.1*this.sessionTimeoutMs))}},E_=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&lu(n,t))return!0;try{var r=e?.userAgentData;if(r!=null&&r.brands&&r.brands.some((e=>lu(e?.brand,t))))return!0}catch{}return!!e.webdriver};function D_(){return(D_=Wl((function*(){var e=Nl?.userAgentData;if(e!=null&&e.getHighEntropyValues)try{var t=(yield e.getHighEntropyValues([`model`]))?.model;return bu(t)&&t.length>0?t:void 0}catch(e){U.info(`Unable to resolve $device_model from userAgentData.getHighEntropyValues`,e);return}}))).apply(this,arguments)}var O_=function(e,t){if(!function(e){try{new RegExp(e)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function k_(e,t,n){return Lh({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var A_={exact:(e,t)=>t.some((t=>e.some((e=>t===e)))),is_not:(e,t)=>t.every((t=>e.every((e=>t!==e)))),regex:(e,t)=>t.some((t=>e.some((e=>O_(t,e))))),not_regex:(e,t)=>t.every((t=>e.every((e=>!O_(t,e))))),icontains:(e,t)=>t.map(j_).some((t=>e.map(j_).some((e=>t.includes(e))))),not_icontains:(e,t)=>t.map(j_).every((t=>e.map(j_).every((e=>!t.includes(e))))),gt:(e,t)=>t.some((t=>{var n=parseFloat(t);return!isNaN(n)&&e.some((e=>n>parseFloat(e)))})),lt:(e,t)=>t.some((t=>{var n=parseFloat(t);return!isNaN(n)&&e.some((e=>n<parseFloat(e)))}))},j_=e=>e.toLowerCase();function M_(e,t){return!e||Object.entries(e).every((e=>{var n=e[1],r=t?.[e[0]];if(V(r)||Su(r))return!1;var i=[String(r)],a=A_[n.operator];return!!a&&a(n.values,i)}))}var N_=`custom`,P_=`i.posthog.com`,F_=/^\/static\//,I_=[`/s/`,`/e/`,`/i/`],L_=class{constructor(e){this.rn={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,``);return e===`https://app.posthog.com`?`https://us.i.posthog.com`:e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,``):this.apiHost}get uiHost(){var e=this.instance.config.ui_host?.replace(/\/$/,``);return e||=this.apiHost.replace(`.`+P_,`.posthog.com`),e===`https://app.posthog.com`?`https://us.posthog.com`:e}get region(){return this.rn[this.apiHost]||(this.rn[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?`us`:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?`eu`:N_),this.rn[this.apiHost]}nn(e){if(F_.test(e)){var t=this.instance.config.asset_host;if(typeof t==`string`)return t.trim().replace(/\/$/,``)||void 0}}sn(e){var t=Rh(e);return t?t.protocol+`//`+t.host+t.pathname:void 0}an(e,t,n){if(e===`ui`)return n;var r=n,i=this.instance.config.rewriteRequestPath;if(i){var a=Rh(n)?.href||n;r=i(new URL(a)).toString()}if(i&&e===`api`&&I_.some((e=>t.indexOf(e)===0))){var o=this.sn(r);if(o){var s=this.apiHost,c=this.ln;c?.apiHost===s&&c.rewriteRequestPath===i||(c={apiHost:s,rewriteRequestPath:i,urls:new Set},this.ln=c),c.urls.add(o)}}return r}isIngestionEndpoint(e){var t=this.ln,n=this.sn(e);return t?.apiHost===this.apiHost&&t.rewriteRequestPath===this.instance.config.rewriteRequestPath&&!!n&&t.urls.has(n)}endpointFor(e,t){if(t===void 0&&(t=``),t&&=t[0]===`/`?t:`/`+t,e===`ui`)return this.an(e,t,this.uiHost+t);if(e===`flags`)return this.an(e,t,this.flagsApiHost+t);if(e===`assets`){var n=this.nn(t);if(n)return this.an(e,t,``+n+t)}if(this.region===N_)return this.an(e,t,this.apiHost+t);var r=P_+t;switch(e){case`assets`:return this.an(e,t,`https://`+this.region+`-assets.`+r);case`api`:return this.an(e,t,`https://`+this.region+`.`+r)}}};function R_(e){var t;return!((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null||!t.length)}var z_=Uf(`[Surveys]`),B_=`seenSurvey_`,V_=e=>{try{var t=(e=>((e,t)=>``+B_+function(e){return e.current_iteration&&e.current_iteration>0?e.id+`_`+e.current_iteration:e.id}(t))(0,e))(e);if(localStorage.getItem(t))return;localStorage.setItem(t,`true`)}catch(e){z_.error(`Failed to persist survey seen state`,e)}},H_=[fg.Popover,fg.Widget,fg.API],U_={ignoreConditions:!1,ignoreDelay:!1,displayType:hg.Popover}
3,W_=Uf(`[PostHog ExternalIntegrations]`),G_={intercom:`intercom-integration`,crispChat:`crisp-chat-integration`},K_=class{constructor(e){this._instance=e}ai(e,t){var n;(n=R.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,e,(e=>{if(e)return W_.error(`failed to load script`,e);t()}))}startIfEnabledOrStop(){var e=this,t=function(){var t,r,i,a=n[0],o=n[1];!o||(t=R.__PosthogExtensions__)!=null&&(t=t.integrations)!=null&&t[a]||e.ai(G_[a],(()=>{var t;(t=R.__PosthogExtensions__)==null||(t=t.integrations)==null||(t=t[a])==null||t.start(e._instance)})),!o&&(r=R.__PosthogExtensions__)!=null&&(r=r.integrations)!=null&&r[a]&&((i=R.__PosthogExtensions__)==null||(i=i.integrations)==null||(i=i[a])==null||i.stop())};for(var n of Object.entries((r=this._instance.config.integrations)??{})){var r;t()}}},q_=class{constructor(e,t){this.rt=e,this.un=t,this.hn=new Map,this.dn=!1}add(e){var t=this;return Wl((function*(){if(t.dn)throw Error(`Cannot add an extension to a disposed ExtensionRuntime`);if(t.hn.has(e.name))throw Error(`Browser extension "`+e.name+`" is already registered`);t.hn.set(e.name,e);try{var n=e.setup(t.un);n&&(yield n)}catch(n){var r=t.hn.get(e.name)===e;r&&t.hn.delete(e.name),t.rt.error(`Failed to set up browser extension "`+e.name+`"`,n),r&&t.vn(e)}}))()}dispose(){if(!this.dn){this.dn=!0;var e=Array.from(this.hn.values()).reverse();for(var t of(this.hn.clear(),e))this.vn(t)}}vn(e){try{var t=e.dispose==null?void 0:e.dispose();t&&_u(t.then)&&t.then(void 0,(t=>{this.rt.error(`Failed to dispose browser extension "`+e.name+`"`,t)}))}catch(t){this.rt.error(`Failed to dispose browser extension "`+e.name+`"`,t)}}},J_=class{constructor(e){this._instance=e}initialize(){}get(e){var t=this._instance.persistence;if(typeof e==`string`)return t?.get_property(e);var n={};for(var r of e){var i=t?.get_property(r);V(i)||(n[r]=i)}return n}set(e,t){var n;(n=this._instance.persistence)==null||n.register(typeof e==`string`?{[e]:t}:e)}remove(e){var t;(t=this._instance.persistence)==null||t.unregister(e)}},Y_=`extensionsRemoteConfig`,X_=class{constructor(e){this.dn=!1,this.instance=e,this.rt=U,this.cn=e.fn,this.kv=new J_(e),this.onEvent=e=>lg(this.instance.on(`eventCaptured`,(t=>{try{e({event:t.event,properties:t.properties})}catch(e){this.rt.error(`Browser extension event listener failed`,e)}}))),this.onRemoteConfig=e=>{if(this.dn)return lg((()=>{}));var t=t=>{try{e(t)}catch(e){this.rt.error(`Browser extension remote config listener failed`,e)}},n=this.instance.pn.on(Y_,t);return this.cn&&t(this.cn),lg(n)},this.gn=new q_(U.createLogger(`[BrowserExtensions]`),this)}get logger(){return this.rt}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){return this.instance.get_property(qf)??this.distinctId}get deviceId(){var e=this.instance.get_property(qf);return typeof e==`string`?e:void 0}get library(){return{name:Hl.LIB_NAME,version:Hl.LIB_VERSION}}get initialPersonProperties(){return this.instance.persistence?.get_initial_props()??{}}get groups(){return this.instance.getGroups()}get session(){try{var e=this.instance.sessionManager?.checkAndGetSessionAndWindowId(!0);return{sessionId:e?.sessionId??``,windowId:e?.windowId??``,sessionStartTimestamp:e?.sessionStartTimestamp??0}}catch{return{sessionId:``,windowId:``,sessionStartTimestamp:0}}}get projectToken(){return this.instance.config.token}add(e){return this.gn.add(e)}capture(e,t,n){var r=this;return Wl((function*(){n?r.instance.capture(e,t,{timestamp:n.timestamp,uuid:n.uuid,$set:n.set,$set_once:n.setOnce}):r.instance.capture(e,t)}))()}registerDynamicEventProperties(e){return lg(this.instance.mn(e))}handleRemoteConfig(e){this.dn||(this.cn=e,this.instance.pn.emit(Y_,e))}sendRequest(e,t){var n=this;return Wl((function*(){t===void 0&&(t={});var r=n.instance.requestRouter.endpointFor(t.target??`api`,e),i={method:t.method,url:t.query?i_(r,t.query):r,data:t.body,headers:t.headers,timeout:t.timeoutMs,fireCallbackOnDrop:!0,transport:t.transport,compression:t.compression,timestampMode:t.sentAt};return t.transport===`sendBeacon`?(n.instance._send_request(i),{statusCode:202}):new Promise((e=>{i.callback=e,n.instance._send_request(i)}))}))()}dispose(){this.dn||(this.dn=!0,this.gn.dispose())}},Z_={},Q_=0,$_=()=>{}
3,ev=`Consent opt in/out is not valid with cookieless_mode="always" and will be ignored`,tv=`Surveys module not available`,nv=`sanitize_properties is deprecated. Use before_send instead`,rv=`Invalid value for property_denylist config: `,iv=[`token`,`distinct_id`,Up],av=`posthog`,ov=!e_&&zl?.indexOf(`MSIE`)===-1&&zl?.indexOf(`Mozilla`)===-1,sv=e=>{var t;return z({api_host:`https://us.i.posthog.com`,flags_api_host:null,ui_host:null,asset_host:null,token:``,autocapture:!0,cross_subdomain_cookie:pm(L?.location),persistence:`localStorage+cookie`,persistence_name:``,cookie_persisted_properties:[],loaded:$_,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:`if_capture_pageview`,defaults:e??`unset`,__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:Pl&&bu(Pl?.search)&&Pl.search.indexOf(`__posthog_debug=true`)!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,disable_external_dependency_loading:!1,strict_script_versioning:!1,enable_recording_console_log:void 0,secure_cookie:(I==null||(t=I.location)==null?void 0:t.protocol)===`https:`,ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:`localStorage`,consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(e){U.error(`Bad HTTP status: `+e.statusCode+` `+e.text)},get_device_id:e=>e,capture_performance:void 0,name:`posthog`,bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Qp,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:h_},error_tracking:{},_onCapture:$_},(e=>({rageclick:e&&e>=`2026-05-30`?{content_ignorelist:rh,ignore_text_selection:!0}
3:!e||`2025-11-30`>e||{content_ignorelist:!0},capture_pageview:!e||`2025-05-24`>e||`history_change`,session_recording:e&&e>=`2026-06-25`?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:e&&e>=`2026-05-30`?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:e&&e>=`2025-11-30`?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>=`2026-01-30`?`head`:`body`,internal_or_test_user_hostname:e&&e>=`2026-01-30`?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:e&&e>=`2026-05-30`?250:0,split_storage:!(!e||`2026-05-30`>e),detect_google_search_app:!(!e||`2026-05-30`>e),disable_capture_url_hashes:!(!e||`2026-06-25`>e)}))(e))},cv=[[`process_person`,`person_profiles`],[`xhr_headers`,`request_headers`],[`cookie_name`,`persistence_name`],[`disable_cookie`,`disable_persistence`],[`__preview_disable_beacon`,`disable_beacon`],[`store_google`,`save_campaign_params`],[`verbose`,`debug`]],lv=e=>{var t={};for(var n of cv){var r=n[0],i=n[1];V(e[r])||(t[i]=e[r])}var a=sm({},t,e),o=e.__preview_external_dependency_versioned_paths;return V(o)||(V(e.strict_script_versioning)&&(a.strict_script_versioning=!!o),bu(o)&&V(e.asset_host)&&(a.asset_host=o)),B(e.property_blacklist)&&(V(e.property_denylist)?a.property_denylist=e.property_blacklist:B(e.property_denylist)?a.property_denylist=[...e.property_blacklist,...e.property_denylist]:U.error(rv+e.property_denylist)),a},uv=class{constructor(){this.__forceAllowLocalhost=!1}get yn(){return this.__forceAllowLocalhost}set yn(e){U.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}},dv=class e{bn(e,t){if(e){var n=this.hn.indexOf(e);n!==-1&&this.hn.splice(n,1)}return this.hn.push(t),t.initialize==null||t.initialize(),t}_n(){return this.config.cookieless_mode===Yp||this.config.cookieless_mode===Jp&&this.consent.isRejected()}get decideEndpointWasHit(){var e;return(e=this.featureFlags?.hasLoadedFlags)!=null&&e}get flagsEndpointWasHit(){var e;return(e=this.featureFlags?.hasLoadedFlags)!=null&&e}constructor(){this.webPerformance=new uv,this.wn=!1,this.version=Hl.LIB_VERSION,this.kn=new Set,this.xn=``,this.pn=new S_,this.hn=[],this.Sn=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=sv(),this.SentryIntegration=jh,this.sentryIntegration=e=>function(e,t){var n=Ah(e,t);return{name:kh,processEvent:e=>n(e)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint=`/e/`,this.Cn=!1,this.Mn=null,this.Tn=null,this.En=null,this.scrollManager=new y_(this),this.pageViewManager=new Mh(this),this.rateLimiter=new yg(this),this.requestRouter=new L_(this),this.consent=new Pm(this),this.externalIntegrations=new K_(this);var t=e.__defaultExtensionClasses??{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.metrics=t.metrics&&new t.metrics(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,n)=>{var r=bu(e)?{[e]:t}:e;this.setPersonProperties(r),n?.({})},set_once:(e,t,n)=>{var r=bu(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),n?.({})}},this.on(`eventCaptured`,(e=>U.info(`send "`+e?.event+`"`,e)))}init(t,n,r){if(r&&r!==av){var i=Z_[r]??new e;return i._init(t,n,r),Z_[r]=i,Z_[av][r]=i,i}return this._init(t,n,r)}_init(e,t,n){var r;t===void 0&&(t={});var i=bu(e)?e.trim():``;if(!i)return U.critical(`PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()`),this;if(this.__loaded)return i===this.config?.token?console.warn(`[PostHog.js]`,`You have already initialized PostHog! Re-initializing is a no-op`):console.warn(`[PostHog.js]`,`You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('`+i+`', { ... }, 'project2')`),this;this.__loaded=!0,this.config=sv(t.defaults),t.debug=this.In(t.debug),this.Pn=t,this.Rn=[],t.person_profiles?this.Tn=t.person_profiles:t.process_person&&(this.Tn=t.process_person);var a=sv(t.defaults),o=lv(t),s=sm({},a,o,{name:n,token:i});vu(a.rageclick)&&vu(o.rageclick)&&(s.rageclick=sm({},a.rageclick,o.rageclick)),vu(a.session_recording)&&vu(o.session_recording)&&(s.session_recording=sm({},a.session_recording,o.session_recording)),this.set_config(s),this.config.on_xhr_error&&U.error(`on_xhr_error is deprecated. Use on_request_error instead`),this.compression=t.disable_compression?void 0:ug.GZipJS;var c=this.An();if(this.persistence=new cg(this.config,c),this.sessionPersistence=this.config.persistence===`
3sessionStorage`||this.config.persistence===`memory`?this.persistence:new cg(z({},this.config,{persistence:`sessionStorage`}),c,!1),this.xn=`ph_`+(this.config.persistence_name||this.config.token)+`_session_registered_properties`,this.config.persistence!==`memory`&&!c&&Nm.N()){var l=Nm.H(this.xn);B(l)&&l.forEach((e=>{bu(e)&&this.kn.add(e)}))}else Nm.q(this.xn);var u=z({},this.persistence.props),d=z({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Fn=new g_((e=>this.Ln(e)),this.config.request_queue_config),this.On=new v_(this),this.__request_queue=[];var f=this._n();if(f||(this.sessionManager=new T_(this),this.sessionPropsManager=new x_(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId(((e,t,n)=>{(n!=null&&n.activityTimeout||n!=null&&n.sessionPastMaximumLength||n!=null&&n.crossTabAdoption)&&this.Dn()}))),this.$n(),this.config.__preview_deferred_init_extensions?(U.info(`Deferring extension initialization to improve startup performance`),setTimeout((()=>{this.Nn(f)}),0)):(U.info(`Initializing extensions synchronously`),this.Nn(f)),Hl.DEBUG=Hl.DEBUG||this.config.debug,Hl.DEBUG&&U.info(`Starting in debug mode`,{this:this,config:t,thisC:z({},this.config),p:u,s:d}),!this.config.identity_distinct_id||(r=t.bootstrap)!=null&&r.distinctID||(t.bootstrap=z({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),t.bootstrap?.distinctID!==void 0){var p=t.bootstrap.distinctID,m=this.get_distinct_id(),h=this.persistence.get_property(Fp);if(t.bootstrap.isIdentifiedID&&m!=null&&m!==p&&h===Xp)this.identify(p);else if(t.bootstrap.isIdentifiedID&&m!=null&&m!==p&&h===Zp)U.warn(`Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.`);else{var g=this.config.get_device_id(Sm()),_=t.bootstrap.isIdentifiedID?g:p;this.persistence.set_property(Fp,t.bootstrap.isIdentifiedID?Zp:Xp),this.register({distinct_id:p,$device_id:_})}}if(f)this.register_once({distinct_id:Hp,$device_id:null},``);else if(!this.get_distinct_id()){var v=this.config.get_device_id(Sm());this.register_once({distinct_id:v,$device_id:v},``),this.persistence.set_property(Fp,Xp)}return mm(I,`onpagehide`in self?`pagehide`:`unload`,this._handle_unload.bind(this),{passive:!1}),t.segment?function(e,t){var n=e.config.segment;if(!n)return t();(function(e,t){var n=e.config.segment;if(!n)return t();var r=n=>{var r=()=>n.anonymousId()||Sm();e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(Fp,Zp)),t()},i=n.user();`then`in i&&_u(i.then)?i.then(r):r(i)})(e,(()=>{n.register((e=>{typeof Promise<`u`&&Promise.resolve||Oh.warn(`This browser does not have Promise support, and can not use the segment integration`);var t=(t,n)=>{if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(Oh.info(`No userId set, resetting PostHog`),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(Oh.info(`UserId set, identifying with PostHog`),e.identify(t.event.userId));var r=e.calculateEventProperties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:`PostHog JS`,type:`enrichment`,version:`1.0.0`,isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>t(e,e.event.event),page:e=>t(e,tm),identify:e=>t(e,rm),screen:e=>t(e,`$screen`)}})(e)).then((()=>{t()}))}))}(this,(()=>this.qn())):this.qn(),_u(this.config._onCapture)&&this.config._onCapture!==$_&&(U.warn("onCapture is deprecated. Please use `before_send` instead"),this.on(`eventCaptured`,(e=>this.config._onCapture(e.event,e)))),this.config.ip&&U.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||function(){return D_.apply(this,arguments)}().then((e=>{e&&this.register({[Jf]:e})})).catch($_),this}$n(){var t,n,r,i=this.config.__extensionClasses?.featureFlags??e.__defaultExtensionClasses?.featureFlags;i&&(this.featureFlags&&this.featureFlags instanceof i||((t=this.jn)==null||t.call(this),this.jn=void 0,this.featureFlags=new i(this)),_u(this.featureFlags.onReloading)&&_u(this.featureFlags.setup)?this.jn||(this.jn=this.featureFlags.onReloading((()=>
3{this.pn.emit(`featureFlagsReloading`,!0)})),this.Bn().add(this.featureFlags)):(n=(r=this.featureFlags).initialize)==null||n.call(r))}Nn(t){var n=performance.now(),r=z({},e.__defaultExtensionClasses,this.config.__extensionClasses),i=[];r.exceptions&&this.hn.push(this.exceptions=this.exceptions??new r.exceptions(this)),r.historyAutocapture&&this.hn.push(this.historyAutocapture=new r.historyAutocapture(this)),r.tracingHeaders&&this.hn.push(this.tracingHeaders=new r.tracingHeaders(this)),r.siteApps&&this.hn.push(this.siteApps=new r.siteApps(this)),r.sessionRecording&&!t&&this.hn.push(this.sessionRecording=new r.sessionRecording(this)),this.config.disable_scroll_properties||i.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),r.autocapture&&this.hn.push(this.autocapture=new r.autocapture(this)),r.surveys&&this.hn.push(this.surveys=this.surveys??new r.surveys(this)),r.logs&&this.hn.push(this.logs=this.logs??new r.logs(this)),r.metrics&&this.hn.push(this.metrics=this.metrics??new r.metrics(this)),r.conversations&&this.hn.push(this.conversations=this.conversations??new r.conversations(this)),r.productTours&&this.hn.push(this.productTours=new r.productTours(this)),r.heatmaps&&this.hn.push(this.heatmaps=new r.heatmaps(this)),r.webVitalsAutocapture&&this.hn.push(this.webVitalsAutocapture=new r.webVitalsAutocapture(this)),r.exceptionObserver&&this.hn.push(this.exceptionObserver=new r.exceptionObserver(this)),r.deadClicksAutocapture&&this.hn.push(this.deadClicksAutocapture=new r.deadClicksAutocapture(this,Eh)),r.toolbar&&this.hn.push(this.toolbar=this.toolbar??new r.toolbar(this)),r.experiments&&this.hn.push(this.experiments=this.experiments??new r.experiments(this)),this.hn.forEach((e=>{e.initialize&&i.push((()=>{e.initialize==null||e.initialize()}))})),i.push((()=>{if(this.Hn){var e=this.Hn;this.Hn=void 0,this.hn.forEach((t=>t.onRemoteConfig==null?void 0:t.onRemoteConfig(e)))}})),this.Un(i,n)}Un(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout((()=>{this.Un(e,t)}),0);var n=e.shift();if(n)try{n()}catch(e){U.error(`Error initializing extension:`,e)}}var r=Math.round(performance.now()-t);this.register_for_session({[Wp]:this.config.__preview_deferred_init_extensions?`deferred`:`synchronous`,[Gp]:r}),this.config.__preview_deferred_init_extensions&&U.info(`PostHog extensions initialized (`+r+`ms)`)}Zi(e){var t;if(!L||!L.body)return U.info(`document not ready yet, trying again in 500 milliseconds...`),void setTimeout((()=>{this.Zi(e)}),500);if(this.config.__preview_deferred_init_extensions&&(this.Hn=e),this.fn=e,this.compression=void 0,e.ok){var n,r=e.config;r.supportedCompression&&!this.config.disable_compression&&(this.compression=uu(r.supportedCompression,ug.GZipJS)?ug.GZipJS:uu(r.supportedCompression,ug.Base64)?ug.Base64:void 0),(n=r.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=r.analytics.endpoint)}this.set_config({person_profiles:this.Tn?this.Tn:Qp}),(t=this.zn)==null||t.handleRemoteConfig(e),this.hn.forEach((t=>t.onRemoteConfig==null?void 0:t.onRemoteConfig(e)))}qn(){try{this.config.loaded(this)}catch(e){U.critical("`loaded` function failed",e)}if(this.Wn(),this.config.internal_or_test_user_hostname&&Pl!=null&&Pl.hostname){var e=Pl.hostname,t=this.config.internal_or_test_user_hostname;(typeof t==`string`?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this._n())&&this.Vn()}),1),this.Zn=new xg(this),this.Zn.load()}Wn(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Fn)==null||e.enable())}_dom_loaded(){this.is_capturing()&&am(this.__request_queue,(e=>this.Ln(e))),this.__request_queue=[],this.Wn()}_handle_unload(){var e,t,n,r,i;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),(t=this.metrics)==null||t.flush(`sendBeacon`),this.config.request_batching?(this.Gn()&&this.capture(nm),(n=this.logs)==null||n.flushLogs(`sendBeacon`),(r=this.Fn)==null||r.unload(),(i=this.On)==null||i.unload()):this.Gn()&&this.capture(nm,null,{transport:`sendBeacon`})}_send_request(e){this.__loaded?ov?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=z({},this.config.request_headers,e.headers),e.compression=e.compression===`best-available`?this.compression:e.compression,(V(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=[`sendBeacon`]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,
3(e=>{var t=z({},e);t.timeout=t.timeout||6e4;var n,r,i,a,o=t.transport??`fetch`;o===`sendBeacon`&&V(t.compression)&&t.data&&(t.compression=ug.Base64),t.method===`POST`&&t.data&&(t.timestampMode===`capture-body`?t.data={api_key:((a=(i=B(n=t.data)?n:[n])[0])==null||(r=a.properties)==null?void 0:r.token)??a?.token,batch:i,sent_at:new Date().toISOString()}:t.timestampMode===`body`&&(t.data=function(e,t){return t===void 0&&(t=new Date().toISOString()),B(e)?e.map((e=>z({},e,{sent_at:t}))):z({},e,{sent_at:t})}(t.data))),t.url=p_(t.url,t.method,t.compression,t.timestampMode);var s=m_.filter((e=>!t.disableTransport||!e.transport||!t.disableTransport.includes(e.transport))),c=function(e,t){for(var n=0;e.length>n;n++)if(e[n].transport===o)return e[n]}(s)?.method??s[0].method;if(!c)throw Error(`No available transport method`);var l=e=>{try{c(e)}catch(e){u_(e)?U.warn(e):U.error(e),t.callback==null||t.callback({statusCode:0,error:e})}};o!==`sendBeacon`&&t.data&&t.compression===ug.GZipJS&&Rl&&typeof Promise<`u`&&!n_?c_(t).then((e=>{l(e)})).catch((n=>{if(iu(n))return n_=!0,void l(z({},t,{compression:void 0,url:p_(e.url,e.method,void 0,e.timestampMode)}));(e=>{if(!e||typeof e!=`object`)return!1;var t=`name`in e?String(e.name):``;return iu(e)||t===tu})(n)&&(n_=!0),l(t)})):c(t)})(z({},e,{callback:t=>{var n,r;this.rateLimiter.checkForLimiting(t),400>t.statusCode||(n=(r=this.config).on_request_error)==null||n.call(r,t),e.callback==null||e.callback(t)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}Ln(e){this.On?this.On.retriableRequest(e):this._send_request(e)}_execute_array(e){Q_++;try{var t,n=[],r=[],i=[];am(e,(e=>{if(e){if(B(t=e[0]))i.push(e);else if(_u(e))try{e.call(this)}catch(t){U.error(`Error executing queued PostHog call`,e,t)}else B(e)&&t===`alias`?n.push(e):B(e)&&t.indexOf(`capture`)!==-1&&_u(this[t])?i.push(e):r.push(e)}}));var a=function(e,t){am(e,(function(e){try{if(B(e[0])){var n=t;om(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else t[e[0]].apply(t,e.slice(1))}catch(t){U.error(`Error executing queued PostHog call`,e,t)}}))};a(n,this),a(r,this),a(i,this)}finally{Q_--}}push(t){if(Q_>0&&B(t)&&bu(t[0])){var n=e.prototype[t[0]];_u(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(e,t,n){var r,i,a,o;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Fn){if(this.is_capturing()){if(!V(e)&&bu(e)){var s=!this.config.opt_out_useragent_filter&&this._is_bot();if(!s||this.config.__preview_capture_bot_pageviews){var c=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(c==null||!c.isRateLimited){t!=null&&t.$current_url&&!bu(t?.$current_url)&&(U.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),t==null||delete t.$current_url),e!==`$exception`||n!=null&&n.Qn||U.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var l=new Date,u=n?.timestamp||l,d=Ud(n?.uuid,Sm),f={uuid:d,event:e,properties:this.calculateEventProperties(e,t||{},u,d)};e===tm&&this.config.__preview_capture_bot_pageviews&&s&&(f.event=`$bot_pageview`,f.properties.$browser_type=`bot`),c&&(f.properties.$lib_rate_limit_remaining_tokens=c.remainingTokens);var p=e===`$feature_flag_called`&&!1===f.properties.$feature_flag_has_experiment&&!0===this.get_property(bp);n!=null&&n.$set&&!p&&(f.$set=n?.$set);var m=n?.$unset;m&&(f.$unset=m);var h,g,_,v=p?void 0:this.Kn(n?.$set_once,e!==im,e===rm);if(v&&(f.$set_once=v),n!=null&&n._noTruncate||(r=this.config.properties_string_max_length,i=f,a=e=>bu(e)?e.slice(0,r):e,o=new Set,f=function e(t,n){if(t!==Object(t))return a?a(t):t;if(!o.has(t)){var r;if(o.add(t),B(t))r=[],am(t,(t=>{r.push(e(t))}));else{var i={};
3om(t,((t,n)=>{o.has(t)||(i[n]=e(t,n))})),r=i}return r}}(i)),f.timestamp=u,V(n?.timestamp)||(f.properties.$event_time_override_provided=!0,f.properties.$event_time_override_system_time=l),p&&(f.properties=function(e,t){t===void 0&&(t=[]);var n={},r=t=>{e[t]!==void 0&&(n[t]=e[t])};return Xl.forEach(r),t.forEach(r),n}(f.properties,iv)),e===pg.DISMISSED||e===pg.SENT){var y=t?.[mg.SURVEY_ID],b=t?.[mg.SURVEY_ITERATION];V_({id:y,current_iteration:b}),f.$set=z({},f.$set,{[(h={id:y,current_iteration:b},g=e===pg.SENT?`responded`:`dismissed`,_=`$survey_`+g+`/`+h.id,h.current_iteration&&h.current_iteration>0&&(_=`$survey_`+g+`/`+h.id+`/`+h.current_iteration),_)]:!0})}else e===pg.SHOWN&&(f.$set=z({},f.$set,{[mg.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===gg.SHOWN){var x=t?.[_g.TOUR_TYPE];x&&(f.$set=z({},f.$set,{[_g.TOUR_LAST_SEEN_DATE+`/`+x]:new Date().toISOString()}))}var S=z({},f.properties.$set,f.$set);if(yu(S)||this.setPersonPropertiesForFlags(S),!H(this.config.before_send)){var C=this.Pt(f);if(!C)return;(f=C).uuid=Ud(f.uuid,Sm)}this.pn.emit(`eventCaptured`,f);var w=n?._url??this.requestRouter.endpointFor(`api`,this.analyticsDefaultEndpoint),T={method:`POST`,url:w,data:f,compression:`best-available`,timestampMode:n?._batchKey===`recordings`||/\/s\/(?:\?|$)/.test(w)?`body`:`capture-body`,batchKey:n?._batchKey,transport:n?.transport};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.Ln(T):this.Fn.enqueue(T),f}U.critical(`This capture call is ignored due to client rate limiting.`)}}else U.error(`No event name provided to posthog.capture`)}}else U.uninitializedWarning(`posthog.capture`)}_addCaptureHook(e){return this.on(`eventCaptured`,(t=>e(t.event,t)))}Bn(){return this.zn??=new X_(this)}mn(e){this.Sn.push(e);var t=!0;return()=>{if(t){t=!1;var n=this.Sn.indexOf(e);n!==-1&&this.Sn.splice(n,1)}}}calculateEventProperties(e,t,n,r,i){if(n||=new Date,!this.persistence||!this.sessionPersistence)return t;var a=i?void 0:this.persistence.remove_event_timer(e),o=z({},t);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,this._n()&&(o[Up]=!0),e===`$snapshot`){var s=z({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=s.distinct_id,(!bu(o.distinct_id)&&!Cu(o.distinct_id)||xu(o.distinct_id))&&U.error(`Invalid distinct_id for replay event. This indicates a bug in your implementation`),o}var c,l=function(e,t,n,r){var i,a,o;if(r===void 0&&(r=!1),!zl)return{};var s,c=e?[...Gh,...t||[]]:[],l=function(e){for(var t=0;Bd.length>t;t++){var n=Bd[t],r=n[1],i=n[0].exec(e),a=i&&(_u(r)?r(i,e):r);if(a)return a}return[``,``]}(zl),u=l[0],d=l[1],f=(s=typeof navigator<`u`?navigator:void 0)!=null&&s.brave?{brave:!0}:{},p={};V(n)||(p.detectGoogleSearchApp=n);var m={},h=(i=navigator)==null||(i=i.userAgentData)==null?void 0:i.platform,g=navigator?.maxTouchPoints,_=I==null||(a=I.screen)==null?void 0:a.width,v=I==null||(o=I.screen)==null?void 0:o.height,y=I?.devicePixelRatio;V(h)||(m.userAgentDataPlatform=h),V(g)||(m.maxTouchPoints=g),V(_)||(m.screenWidth=_),V(v)||(m.screenHeight=v),V(y)||(m.devicePixelRatio=y);var b,x,S,C,w=sm(dm({$os:u,$os_version:d,$browser:Ld(zl,navigator.vendor,f,p),$device:Vd(zl),$device_type:(x=zl,S=m,C=Vd(x),C===Uu||C===Hu||C===`Kobo`||C===`Kindle Fire`||C===yd?Vu:C===cd||C===ud||C===ld||C===gd?`Console`:C===Gu?`Wearable`:C?Ru:S?.userAgentDataPlatform===`Android`&&(S?.maxTouchPoints??0)>0?600>Math.min(S?.screenWidth??0,S?.screenHeight??0)/(S?.devicePixelRatio??1)?Ru:Vu:`Desktop`),$timezone:rg(),$timezone_offset:ig()}),{$current_url:Bh(r?Wd(Pl?.href):Pl?.href,c,qh),$host:Pl?.host,$pathname:Pl?.pathname,$raw_user_agent:zl.length>1e3?zl.substring(0,997)+`...`:zl,$browser_version:zd(zl,navigator.vendor,f,p),$browser_language:Qh(),$browser_language_prefix:(b=Qh(),typeof b==`string`?b.split(`-`)[0]:void 0),$screen_height:I?.screen.height,$screen_width:I?.screen.width,$viewport_height:I?.innerHeight,$viewport_width:I?.innerWidth,$lib:Hl.LIB_NAME,$lib_version:Hl.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return Hl.SDK_DIST_CHANNEL&&(w.$sdk_dist_channel=Hl.SDK_DIST_CHANNEL),w}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes
3);if(this.sessionManager){var u=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime()),d=u.windowId;o.$session_id=u.sessionId,o.$window_id=d}this.sessionPropsManager&&sm(o,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&sm(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=this.On?.length}catch(e){o.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===N_&&(o.$lib_custom_api_host=this.config.api_host),c=e!==tm||i?e!==nm||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),o=sm(o,c),e===tm&&L&&(o.title=L.title),!V(a)){var f=n.getTime()-a;o.$duration=parseFloat((f/1e3).toFixed(3))}zl&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?`bot`:`browser`);var p=this.persistence.properties(),m=this.sessionPersistence.properties();om([`$referrer`,`$referring_domain`],(e=>{e in p&&delete m[e]}));var h={};if(this.Sn.length>0)for(var g of this.Sn.slice())try{sm(h,g())}catch(e){U.error(`Failed to produce browser extension event properties`,e)}(o=sm({},l,p,m,z({},h,o))).$is_identified=this._isIdentified(),B(this.config.property_denylist)?om(this.config.property_denylist,(function(e){delete o[e]})):U.error(rv+this.config.property_denylist+` or property_blacklist config: `+this.config.property_blacklist);var _=this.config.sanitize_properties;_&&(U.error(nv),o=_(o,e));var v=this.Jn();return o.$process_person_profile=v,v&&!i&&this.Yn(`_calculate_event_properties`),o}Kn(e,t,n){if(t===void 0&&(t=!0),n===void 0&&(n=!1),!this.persistence||!this.Jn()||this.wn&&!n)return e;var r=sm({},this.persistence.get_initial_props(),this.sessionPropsManager?.getSetOnceProps()||{},e||{}),i=this.config.sanitize_properties;return i&&(U.error(nv),r=i(r,`$set_once`)),t&&(this.wn=!0),yu(r)?void 0:r}register(e,t){var n;(n=this.persistence)==null||n.register(e,t)}register_once(e,t,n){var r;(r=this.persistence)==null||r.register_once(e,t,n)}register_for_session(e){var t;(t=this.sessionPersistence)==null||t.register(e),Object.keys(e).forEach((e=>this.kn.add(e))),this.Xn()}unregister(e){var t;(t=this.persistence)==null||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)==null||t.unregister(e),this.kn.delete(e),this.Xn()}ts(e,t){this.register({[e]:t})}Dn(){this.kn.forEach((e=>{var t;(t=this.sessionPersistence)==null||t.unregister(e)})),this.kn.clear(),this.Xn()}Xn(){var e;if(this.xn){if(this.config.persistence===`memory`||(e=this.sessionPersistence)!=null&&e.xi||!Nm.N())Nm.q(this.xn);else{var t=[];this.kn.forEach((e=>t.push(e))),t.length>0?Nm.F(this.xn,t):Nm.q(this.xn)}}}getFeatureFlag(e,t){return this.featureFlags?.getFeatureFlag(e,t)}getFeatureFlagPayload(e){return this.featureFlags?.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){return this.featureFlags?.getFeatureFlagResult(e,t)}getAllFeatureFlags(){return this.featureFlags?.getAllFeatureFlags()??[]}isFeatureEnabled(e,t){return this.featureFlags?.isFeatureEnabled(e,t)??t?.defaultValue}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,t,n){var r;(r=this.featureFlags)==null||r.updateFlags(e,t,n)}updateEarlyAccessFeatureEnrollment(e,t,n){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(e,t,n)}getEarlyAccessFeatures(e,t,n){return t===void 0&&(t=!1),this.featureFlags?.getEarlyAccessFeatures(e,t,n)}on(e,t){return this.pn.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:tv}),()=>{})}onSessionId(e){return this.sessionManager?.onSessionId(e)??(()=>{})}getSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:tv})}getActiveMatchingSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:tv})}renderSurvey(e,t){var n;(n=this.surveys)==null||n.renderSurvey(e,t)}displaySurvey(e,t){var n;t===void 0&&(t=U_),(n=this.surveys)==null||n.displaySurvey(e,t)}cancelPendingSurvey(e){var t;(t=this.surveys)==null||t.cancelPendingSurvey(e)}canRenderSurvey(e){return this.surveys?.canRenderSurvey(e)??{visible:!1,disabledReason:tv}}canRenderSurveyAsync(e,t){return t===void 0&&(t=!1),this.surveys?.canRenderSurveyAsync(e,t)??Promise.resolve({visible:!1,disabledReason:tv})}es(e){return!e||xu(e)?(U.critical(`Unique user id has not been set in posthog.identify`),!1):e===Hp?(U.critical(`The string "`+e+`" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.`),!1):![`distinct_id`,`distinctid`].includes(e.toLowerCase())&&![`undefined`,`null`].includes(e.toLowerCase())||(U.critical(`The string "`+e+`" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
3ot a hardcoded string.`),!1)}identify(e,t,n){if(!this.__loaded||!this.persistence)return U.uninitializedWarning(`posthog.identify`);if(Cu(e)&&(e=e.toString(),U.warn(`The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.`)),this.es(e)&&this.Yn(`posthog.identify`)){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(qf)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},``),e!==r&&e!==this.get_property(Yf)&&(this.unregister(Yf),this.register({distinct_id:e}));var i,a=(this.persistence.get_property(Fp)||Xp)===Xp,o=e!==r,s=!o&&a;if(o&&a)this.persistence.set_property(Fp,Zp),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.capture(rm,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.En=k_(e,t,n),(i=this.featureFlags)==null||i.setAnonymousDistinctId(r);else if(s){this.persistence.set_property(Fp,Zp);var c=t||{},l=n||{};this.setPersonPropertiesForFlags({$set:c,$set_once:l},!1),this.capture(`$set`,{$set:c,$set_once:l}),this.En=k_(e,t,n)}else(t||n)&&this.setPersonProperties(t,n);o?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(jp)):s&&(t||n)&&this.reloadFeatureFlags()}}setPersonProperties(e,t){if((e||t)&&this.Yn(`posthog.setPersonProperties`)){var n=k_(this.get_distinct_id(),e,t);this.En===n?U.info(`A duplicate setPersonProperties call was made with the same properties. It has been ignored.`):(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture(`$set`,{$set:e||{},$set_once:t||{}}),this.En=n)}}unsetPersonProperties(e){var t,n=(B(e)?e:[e]).filter((e=>bu(e)&&e.length>0));n.length!==0&&this.Yn(`posthog.unsetPersonProperties`)&&((t=this.featureFlags)==null||t.unsetPersonPropertiesForFlags(n,!0),this.capture(`$set`,{$unset:n}),this.En=null)}group(e,t,n){if(e&&t){var r=this.getGroups(),i=r[e]!==t;if(i&&this.resetGroupPropertiesForFlags(e),this.register({$groups:z({},r,{[e]:t})}),i||n){var a={$group_type:e,$group_key:t};n&&(a.$group_set=n),this.capture(im,a)}n&&this.setGroupPropertiesForFlags({[e]:n}),i&&!n&&this.reloadFeatureFlags()}else U.error(`posthog.group requires a group type and group key`)}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var n;t===void 0&&(t=!0),(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(e){var t;e===void 0&&(e=!0),(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,t){var n;t===void 0&&(t=!0),this.Yn(`posthog.setGroupPropertiesForFlags`)&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;(t=this.featureFlags)==null||t.resetGroupPropertiesForFlags(e)}reset(e){var t=Tu(e)?e:e?.resetDeviceID,n=Tu(e)||e==null?void 0:e.bootstrap;this.rs(t,!1,n)}rs(e,t,n){var r,i,a,o,s,c,l,u,d,f,p;if(t===void 0&&(t=!1),U.info(`reset`),!this.__loaded)return U.uninitializedWarning(`posthog.reset`);var m=n?.sessionID;this.config.bootstrap=n||this.Pn?.bootstrap||{},(r=this.featureFlags)==null||r.updateConfig==null||r.updateConfig(this.config,this.Qi());var h,g,_,v,y=this.get_property(qf),b=this.get_property(Jf),x=this.get_property(op),S=this.is_capturing();if(this.consent.reset(),t||!S||this.is_capturing()||console.warn(`[PostHog.js]`,"reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after."),(i=this.persistence)==null||i.clear(),(a=this.sessionPersistence)==null||a.clear(),this.kn.clear(),this.Xn(),V(x)||(h=this.persistence)==null||h.register({[op]:x}),(o=this.surveys)==null||o.reset(),(s=this.Zn)==null||s.stop(),(c=this.featureFlags)==null||c.reset(),(l=this.conversations)==null||l.reset(),(u=this.logs)==null||u.reset(),(d=this.metrics)==null||d.reset(),(f=this.persistence)==null||f.set_property(Fp,Xp),(p=this.sessionManager)==null||p.resetSessionId(),this.En=null,this.config.cookieless_mode===Yp)this.register_once({distinct_id:Hp,$device_id:null},``);else{var C=this.config.get_device_id(Sm());this.register_once({distinct_id:C,$device_id:e?C:y},``),e||V(b)||this.register({[Jf]:b})}if(this.register({$last_posthog_reset:new Date().toISOString()},1),n&&(n.distinctID===void 0||this._n()||((v=this.persistence)==null||v.set_property(Fp,n.isIdentifiedID?Zp:Xp),this.register({distinct_id:n.distinctID})),(g=this.featureFlags)==null||g.initialize(),!(V(m)||(_=this.sessionManager)!=null&&_.setBootstrapSessionId(m,!0)))){var w=z({},n);delete w.sessionID,this.config.bootstrap=w}delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}shutdown(e){var t=this;return Wl((function*(){var e,n,r,i,a,o,s;if(t.__loaded){(e=t.Zn)==null||e.stop(),(n=t.zn)==null||n.dispose(),(r=t.sessionRecording)==null||r.dispose(),(i=t.logs)==null||i.flushLogs(`sendBeacon`),(a=t.metrics)==null||a.flush(`sendBeacon`),(o=t.Fn)==null||o.unload(),(s=t.On)==null||s.unload();try{var c;(c=t.featureFlags)==null||c.destroy()}catch(e){U.error(`Error while destroying feature flags`,e)}}else U.uninitializedWarning(`posthog.shutdown`)}))()}setIdentity(e,t){var n;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),(n=this.conversations)==null||n.ns()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.ss()}get_distinct_id(){return this.get_property(`distinct_id`)}getGroups(){return this.get_property(`$groups`)||{}}get_session_id(){return this.sessionManager?.checkAndGetSessionAndWindowId(!0).sessionId??``}get_session_replay_url(e){if(!this.sessionManager)return``;var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=t.sessionStartTimestamp,r=this.requestRouter.endpointFor(`ui`,`/project/`+this.config.token+`/replay/`+t.sessionId);if(e!=null&&e.withTimestamp&&n){var i=e.timestampLookBack??10;if(!n)return r;r+=`?t=`+Math.max(Math.floor((new Date().getTime()-n)/1e3)-i,0)}return r}alias(e,t){return e===this.get_property(Kf)?(U.critical(`Attempting to create alias for existing People user - aborting.`),-2):this.Yn(`posthog.alias`)?(V(t)&&(t=this.get_distinct_id()),e===t?(U.warn(`alias matches current distinct_id - skipping api call.`),this.identify(e),-1):(this.ts(Yf,e),this.capture(`$create_alias`,{alias:e,distinct_id:t}))):void 0}set_config(e){var t=z({},this.config);if(vu(e)){var n,r,i,a,o,s,c,l,u,d,f,p;sm(this.config,lv(e));var m=this.An();(n=this.persistence)==null||n.update_config(this.config,t,m),this.sessionPersistence=this.config.persistence===`
3sessionStorage`||this.config.persistence===`memory`?this.persistence:new cg(z({},this.config,{persistence:`sessionStorage`}),m,!1);var h=this.In(this.config.debug);Tu(h)&&(this.config.debug=h),Tu(this.config.debug)&&(this.config.debug?(Hl.DEBUG=!0,Om.N()&&Om.F(`ph_debug`,!0),U.info(`set_config`,{config:e,oldConfig:t,newConfig:z({},this.config)})):(Hl.DEBUG=!1,Om.N()&&Om.q(`ph_debug`))),(r=this.featureFlags)==null||r.updateConfig==null||r.updateConfig(this.config,this.Qi()),(i=this.exceptionObserver)==null||i.onConfigChange(),(a=this.exceptions)==null||a.onConfigChange(),(o=this.sessionRecording)==null||o.startIfEnabledOrStop(),(s=this.tracingHeaders)==null||s.startIfEnabledOrStop(),(c=this.autocapture)==null||c.startIfEnabled(),(l=this.heatmaps)==null||l.startIfEnabled(),(u=this.exceptionObserver)==null||u.startIfEnabledOrStop(),(d=this.deadClicksAutocapture)==null||d.startIfEnabledOrStop(),(f=this.surveys)==null||f.loadIfEnabled(),this.os(),(p=this.externalIntegrations)==null||p.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){Hl.LIB_NAME=e,Hl.LIB_VERSION=t}startSessionRecording(e){var t,n,r,i,a,o=!0===e,s={sampling:o||!(e==null||!e.sampling),linked_flag:o||!(e==null||!e.linked_flag),url_trigger:o||!(e==null||!e.url_trigger),event_trigger:o||!(e==null||!e.event_trigger)};Object.values(s).some(Boolean)&&((t=this.sessionManager)==null||t.checkAndGetSessionAndWindowId(),s.sampling&&((n=this.sessionRecording)==null||n.overrideSampling()),s.linked_flag&&((r=this.sessionRecording)==null||r.overrideLinkedFlag()),s.url_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger(`url`)),s.event_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger(`event`))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,t){if(this.exceptions){var n=Error(`PostHog syntheticException`),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(z({},r,t))}}addExceptionStep(e,t){var n;(n=this.exceptions)==null||n.addExceptionStep(e,t)}captureLog(e){var t;(t=this.logs)==null||t.captureLog(e)}get logger(){return this.logs?.logger??e.ls}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t;return(t=this.toolbar?.loadToolbar(e))!=null&&t}get_property(e){return this.persistence?.props[e]}getSessionProperty(e){return this.sessionPersistence?.props[e]}toString(){var e=this.config.name??av;return e!==av&&(e=av+`.`+e),e}_isIdentified(){return this.persistence?.get_property(Fp)===Zp||this.sessionPersistence?.get_property(Fp)===Zp}Jn(){var e,t;return!(this.config.person_profiles===`never`||this.config.person_profiles===Qp&&!this._isIdentified()&&yu(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[Yf])&&((t=this.persistence)==null||(t=t.props)==null||!t[Vp]))}Gn(){return!0===this.config.capture_pageleave||this.config.capture_pageleave===`if_capture_pageview`&&(!0===this.config.capture_pageview||this.config.capture_pageview===`history_change`)}createPersonProfile(){this.Jn()||this.Yn(`posthog.createPersonProfile`)&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Yn(`posthog.setInternalOrTestUser`)&&this.setPersonProperties({$internal_or_test_user:!0})}Yn(e){return this.config.person_profiles===`never`?(U.error(e+` was called, but process_person is set to "never". This call will be ignored.`),!1):(this.ts(Vp,!0),!0)}An(){if(this.config.cookieless_mode===`always`)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Jp)}os(){var e,t,n=this.An();return this.persistence?.xi!==n&&((e=this.persistence)==null||e.set_disabled(n)),this.sessionPersistence?.xi!==n&&((t=this.sessionPersistence)==null||t.set_disabled(n)),n&&(this.kn.clear(),this.Xn()),n}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==Yp){if(this._n()){var r,i;this.rs(!0,!0),(r=this.sessionManager)==null||r.destroy(),(i=this.pageViewM
3anager)==null||i.destroy(),this.sessionManager=new T_(this),this.pageViewManager=new Mh(this),this.persistence&&(this.sessionPropsManager=new x_(this,this.sessionManager,this.persistence));var a,o=this.config.__extensionClasses?.sessionRecording??e.__defaultExtensionClasses?.sessionRecording;o&&(this.sessionRecording=this.bn(this.sessionRecording,new o(this)),this.fn&&((a=this.sessionRecording)==null||a.onRemoteConfig==null||a.onRemoteConfig(this.fn)))}var s;this.consent.optInOut(!0),this.os(),this.Wn(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Jp&&((s=this.surveys)==null||s.loadIfEnabled()),(V(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture(t?.captureEventName??`$opt_in`,t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vn()}else U.warn(ev)}opt_out_capturing(){var e,t,n;this.config.cookieless_mode===Yp?U.warn(ev):(this.config.cookieless_mode===Jp&&this.consent.isOptedIn()&&this.rs(!0,!0),this.consent.optInOut(!1),this.os(),this.config.cookieless_mode===Jp&&(this.register({distinct_id:Hp,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Vn(),this.Wn()))}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===1?`granted`:e===0?`denied`:`pending`}is_capturing(){return this.config.cookieless_mode===Yp||(this.config.cookieless_mode===Jp?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.os()}_is_bot(){return Nl?E_(Nl,this.config.custom_blocked_useragents):void 0}Vn(){L&&(L.visibilityState===`visible`?this.Cn||(this.Cn=!0,this.capture(tm,{title:L.title},{send_instantly:!0}),this.Mn&&=(L.removeEventListener($p,this.Mn),null)):this.Mn||(this.Mn=this.Vn.bind(this),mm(L,$p,this.Mn)))}debug(e){!1===e?(I?.console.log(`You've disabled debug mode.`),this.set_config({debug:!1})):(I?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Qi(){var e=this.Pn||{};return`advanced_disable_flags`in e?!!e.advanced_disable_flags:!1===this.config.advanced_disable_flags?!0===this.config.advanced_disable_decide?(U.warn(`Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version.`),!0):function(e,t,n,r,i){var a=t in e&&!H(e[t]),o=n in e&&!H(e[n]);return a?e[t]:!!o&&(i&&i.warn(`Config field '`+n+`' is deprecated. Please use '`+t+`' instead. The old field will be removed in a future major version.`),e[n])}(e,`advanced_disable_flags`,`advanced_disable_decide`,0,U):!!this.config.advanced_disable_flags}Pt(e){if(H(this.config.before_send))return e;var t=Object.keys(e.properties??{}).filter(Ou),n=B(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var i of n){if(r=i(r),H(r)){var a=`Event '`+e.event+`' was rejected in beforeSend function`;return Du(e.event)?U.warn(a+`. This can cause unexpected behavior.`):U.info(a),null}r.properties&&!yu(r.properties)||U.warn(`Event '`+e.event+`' has no properties after beforeSend function, this is likely an error.`)}for(var o of t)if(r.properties&&H(r.properties[o]))return U.warn(`Event '`+e.event+`' had its '`+o+`' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped.`),null;return r}getPageViewId(){return this.pageViewManager.ui?.pageViewId}captureTraceFeedback(e,t){this.capture(`$ai_feedback`,{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,n){this.capture(`$ai_metric`,{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})}In(e){var t=Tu(e)&&!e,n=Om.N()&&Om.P(`ph_debug`)===`true`;return!t&&(!!n||e)}};dv.__defaultExtensionClasses={},dv.ls=(()=>{var e=()=>{};return{trace:e,debug:e,info:e,warn:e,error:e,fatal:e}})(),function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=um(e.prototype[t[n]])}(dv,[`identify`]);var fv=class{constructor(e){this.disabled=!1===e;var t=vu(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,n){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}},pv=`$copy_autocapture`,mv=Uf(`[AutoCapture]`);function hv(e,t){return t.length>e?t.slice(0,e)+`...`:t}
3function gv(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Vm(t));return t}function _v(e,t){var n,r=t.e,i=t.maskAllElementAttributes,a=t.maskAllText,o=t.elementAttributeIgnoreList,s=t.elementsChainAsString,c=t.disableCaptureUrlHashes;if(!Vm(e))return{props:{}};for(var l=[e],u=new Set([e]),d=e;d.parentNode&&!Hm(d,`body`)&&Gm>l.length;)if(Wm(d.parentNode)){var f=d.parentNode.host;if(u.has(f))break;u.add(f),l.push(f),d=f}else{if(!Vm(d.parentNode)||u.has(d.parentNode))break;u.add(d.parentNode),l.push(d.parentNode),d=d.parentNode}var p,m,h=[],g={},_=!1,v=!1;if(om(l,(e=>{var t=uh(e);if(Hm(e,`a`)){var n=e.getAttribute(`href`);_=!!(t&&n&&yh(n))&&(c?Wd(n):n)}uu(Jm(e),`ph-no-capture`)&&(v=!0),h.push(function(e,t,n,r,i){i===void 0&&(i=!1);var a=e.tagName.toLowerCase(),o={tag_name:a};Qm.indexOf(a)>-1&&!n&&(o.$el_text=a.toLowerCase()===`a`||a.toLowerCase()===`button`?hv(1024,bh(e)):hv(1024,Xm(e)));var s=Jm(e);s.length>0&&(o.classes=s.filter((function(e){return e!==``}))),om(e.attributes,(function(n){var a;if((!dh(e)||[`name`,`id`,`class`,`aria-label`].indexOf(n.name)!==-1)&&(r==null||!r.includes(n.name))&&!t&&yh(n.value)&&(!bu(a=n.name)||a.substring(0,10)!==`_ngcontent`&&a.substring(0,7)!==`_nghost`)){var s=n.value;n.name===`class`&&(s=Km(s).join(` `)),o[`attr__`+n.name]=hv(1024,n.name===`href`&&i?Wd(s):s)}}));for(var c=1,l=1,u=e;u=gv(u);)c++,u.tagName===e.tagName&&l++;return o.nth_child=c,o.nth_of_type=l,o}(e,i,a,o,c)),sm(g,function(e){if(!uh(e))return{};var t={};return om(e.attributes,(function(e){if(e.name&&e.name.indexOf(`data-ph-capture-attribute`)===0){var n=e.name.replace(`data-ph-capture-attribute-`,``),r=e.value;n&&r&&yh(r)&&(t[n]=r)}})),t}(e))})),v)return{props:{},explicitNoCapture:v};if(a||(h[0].$el_text=Hm(e,`a`)||Hm(e,`button`)?bh(e):Xm(e)),_){var y;h[0].attr__href=_;var b=Rh(_)?.host,x=I==null||(y=I.location)==null?void 0:y.host;b&&x&&b!==x&&(p=_)}return{props:sm({$event_type:r.type,$ce_version:1},s?{}:{$elements:h},{$elements_chain:(m=h,function(e){return e.map((e=>{var t=``;if(e.tag_name&&(t+=e.tag_name),e.attr_class)for(var n of(e.attr_class.sort(),e.attr_class))t+=`.`+n.replace(/"/g,``);var r=z({},e.text?{text:e.text}:{},{"nth-child":e.nth_child??0,"nth-of-type":e.nth_of_type??0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),i={};return cm(r).sort(((e,t)=>e[0].localeCompare(t[0]))).forEach((e=>{var t=e[1];return i[Sh(e[0].toString())]=Sh(t.toString())})),(t+=`:`)+cm(i).map((e=>e[0]+`="`+e[1]+`"`)).join(``)})).join(`;`)}(function(e){return e.map((e=>{var t={text:e.$el_text?.slice(0,400),tag_name:e.tag_name,href:e.attr__href?.slice(0,2048),attr_class:Ch(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return cm(e).filter((e=>e[0].indexOf(`attr__`)===0)).forEach((e=>t.attributes[e[0]]=e[1])),t}))}(m)))},(n=h[0])!=null&&n.$el_text?{$el_text:h[0]?.$el_text}:{},p&&r.type===`click`?{$external_click_url:p}:{},g)}}var vv=Uf(`[ExceptionAutocapture]`),yv=()=>{},bv=Uf(`[TracingHeaders]`),xv=Uf(`[Web Vitals]`),Sv=9e5,Cv=`disabled`,wv=`lazy_loading`,Tv=`awaiting_config`,Ev=`missing_config`;Uf(`[SessionRecording]`),Uf(`[SessionRecording]`);var Dv=`[SessionRecording]`,Ov=Uf(Dv),kv=Uf(`[Heatmaps]`);function Av(e){return vu(e)&&`clientX`in e&&`clientY`in e&&Cu(e.clientX)&&Cu(e.clientY)}var jv=Uf(`[Product Tours]`),Mv=e=>{var t;return!e.config.disable_product_tours&&!((t=e.persistence)==null||!t.get_property(ip))},Nv=[`$set_once`,`$set`],Pv=Uf(`[SiteApps]`),Fv=`Error while initializing PostHog app with config id `;function Iv(e,t,n){if(H(e))return!1;switch(n){case`exact`:return e===t;case`contains`:var r=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`).replace(/_/g,`.`).replace(/%/g,`.*`);return new RegExp(r,`i`).test(e);case`regex`:try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}var Lv=class{constructor(e){this.us=new S_,this.hs=(e,t)=>this.ds(e,t)&&this.vs(e,t)&&this.cs(e,t)&&this.fs(e,t),this.ds=(e,t)=>t==null||!t.event||e?.event===t?.event,this._instance=e,this.ps=new Set,this.gs=new Set}init(){var e;V(this._instance?._addCaptureHook)||(e=this._instance)==null||e._addCaptureHook(((e,t)=>{this.on(e,t)}))}register(e){var t;if(!V(this._instance?._addCaptureHook)&&(e.forEach((e=>{var t,n;
3(t=this.gs)==null||t.add(e),(n=e.steps)==null||n.forEach((e=>{var t;(t=this.ps)==null||t.add(e?.event||``)}))})),(t=this._instance)!=null&&t.autocapture)){var n,r=new Set;e.forEach((e=>{var t;(t=e.steps)==null||t.forEach((e=>{e!=null&&e.selector&&r.add(e?.selector)}))})),(n=this._instance)==null||n.autocapture.setElementSelectors(r)}}on(e,t){t!=null&&e.length!=0&&(this.ps.has(e)||this.ps.has(t.event))&&this.gs&&this.gs?.size>0&&this.gs.forEach((e=>{this.ys(t,e)&&this.us.emit(`actionCaptured`,e.name)}))}bs(e){this.onAction(`actionCaptured`,(t=>e(t)))}ys(e,t){if(t?.steps==null)return!1;for(var n of t.steps)if(this.hs(e,n))return!0;return!1}onAction(e,t){return this.us.on(e,t)}vs(e,t){if(t!=null&&t.url){var n,r=e==null||(n=e.properties)==null?void 0:n.$current_url;if(!r||typeof r!=`string`||!Iv(r,t.url,t.url_matching||`contains`))return!1}return!0}cs(e,t){return!!this._s(e,t)&&!!this.ws(e,t)&&!!this.ks(e,t)}_s(e,t){var n;if(t==null||!t.href)return!0;var r=this.xs(e);if(r.length>0)return r.some((e=>Iv(e.href,t.href,t.href_matching||`exact`)));var i,a=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||``;return!!a&&Iv((i=a.match(/(?::|")href="(.*?)"/))?i[1]:``,t.href,t.href_matching||`exact`)}ws(e,t){var n;if(t==null||!t.text)return!0;var r=this.xs(e);if(r.length>0)return r.some((e=>Iv(e.text,t.text,t.text_matching||`exact`)||Iv(e.$el_text,t.text,t.text_matching||`exact`)));var i,a,o,s=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||``;return!!s&&(i=function(e){for(var t,n=[],r=/(?::|")text="(.*?)"/g;!H(t=r.exec(e));)n.includes(t[1])||n.push(t[1]);return n}(s),a=t.text,o=t.text_matching||`exact`,i.some((e=>Iv(e,a,o))))}ks(e,t){var n,r;if(t==null||!t.selector)return!0;var i=e==null||(n=e.properties)==null?void 0:n.$element_selectors;if(i!=null&&i.includes(t.selector))return!0;var a=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||``;if(t.selector_regex&&a)try{return new RegExp(t.selector_regex).test(a)}catch{return!1}return!1}xs(e){var t;return(e==null||(t=e.properties)==null?void 0:t.$elements)==null?[]:e?.properties.$elements}fs(e,t){return t==null||!t.properties||t.properties.length===0||M_(t.properties.reduce(((e,t)=>{var n=B(t.value)?t.value.map(String):t.value==null?[]:[String(t.value)];return e[t.key]={values:n,operator:t.operator||`exact`},e}),{}),e?.properties)}},Rv=class{constructor(e){var t;this.Ss=[],this._instance=e,this.Cs=new Map,this.Ms=new Map,this.Ts=new Map,(t=this._instance)==null||t.onSessionId==null||t.onSessionId((e=>this.Es(e)))}Is(e){return!1}Ps(){return null}Rs(e){}As(){}Fs(e,t){return!!e&&M_(e.propertyFilters,t?.properties)}Ls(e,t){var n=new Map;return e.forEach((e=>{var r;(r=e.conditions)==null||(r=r[t])==null||(r=r.values)==null||r.forEach((t=>{if(t!=null&&t.name){var r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}}))})),n}Os(e,t,n){var r=(n===dg.Activation?this.Cs:this.Ms).get(e),i=[];return this.Ds((e=>{i=e.filter((e=>r?.includes(e.id)))})),i.filter((r=>{var i,a=(i=r.conditions)==null||(i=i[n])==null||(i=i.values)==null?void 0:i.find((t=>t.name===e));return this.Fs(a,t)}))}register(e){V(this._instance?._addCaptureHook)||(this.$s(e),this.Ns(e))}Ns(e){var t=e.filter((e=>{var t;return e.conditions?.actions&&((t=e.conditions)==null||(t=t.actions)==null||(t=t.values)==null?void 0:t.length)>0}));t.length!==0&&(this.qs??(this.qs=new Lv(this._instance),this.qs.init(),this.qs.bs((e=>{this.onAction(e)}))),t.forEach((e=>{var t,n,r,i,a;e.conditions&&(t=e.conditions)!=null&&t.actions&&(n=e.conditions)!=null&&(n=n.actions)!=null&&n.values&&((r=e.conditions)==null||(r=r.actions)==null||(r=r.values)==null?void 0:r.length)>0&&((i=this.qs)==null||i.register(e.conditions.actions.values),(a=e.conditions)==null||(a=a.actions)==null||(a=a.values)==null||a.forEach((t=>{if(t&&t.name){var n=this.Ts.get(t.name);n&&n.push(e.id),this.Ts.set(t.name,n||[e.id])}})))})))}$s(e){var t,n=e.filter((e=>{var t;return e.conditions?.events&&((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null?void 0:t.length)>0})),r=e.filter((e=>{var t;return e.conditions?.cancelEvents&&((t=e.conditions)==null||(t=t.cancelEvents)==null||(t=t.values)==null?void 0:t.length)>0}));n.length===0&&r.length===0||((t=this._instance)==null||t._addCaptureHook(((e,t)=>{this.onEvent(e,t)})),this.Cs=this.Ls(e,dg.Activation),this.Ms=this.Ls(e,dg.Cancellation))}onEvent(e,t){var n,r,i=this.js(),a=(t==null||(n=t.properties)==null?void 0:n.$survey_id)||(t==null||(r=t.properties)==null?void 0:r.$product_tour_id);if(a&&this.getActivatedIds().includes(a)){var o=this.Bs(e,a);if(o===`consume`)return i.info(`event consumed activated item, remov
3ing it`,{event:e,itemId:a}),void this.Hs([a]);if(o===`persist`)return i.info(`shown item promoted to persisted activation`,{event:e,itemId:a}),this.Us(a),void this.zs([a])}if(this.Ms.has(e)){var s=this.Os(e,t,dg.Cancellation);s.length>0&&(i.info(`cancel event matched, cancelling items`,{event:e,itemsToCancel:s.map((e=>e.id))}),this.Hs(s.map((e=>e.id))),s.forEach((e=>this.Ws(e.id))))}if(this.Cs.has(e)){i.info(`event name matched`,{event:e,eventPayload:t,items:this.Cs.get(e)});var c=this.Os(e,t,dg.Activation);this.Vs(c.map((e=>e.id)))}}onAction(e){this.Ts.has(e)&&this.Vs(this.Ts.get(e)||[])}Vs(e){var t;if(e.length!==0){var n=!((t=this._instance)==null||t.get_session_id==null||!t.get_session_id()),r=[];for(var i of e)n&&this.Is(i)?this.Us(i)&&this.Zs(i):r.push(i);r.length>0&&(this.Ss=[...new Set([...this.Ss,...r])]),this.js().info(`updating activated items`,{activatedItems:this.getActivatedIds()})}}Us(e){this.Ss=this.Ss.filter((t=>t!==e));var t=this.Gs();return!t.includes(e)&&(this.Qs([...t,e]),this.Ks(),!0)}Hs(e){var t=new Set(e);this.Ss=this.Ss.filter((e=>!t.has(e)));var n=this.Js(),r=n.filter((e=>!t.has(e)));r.length!==n.length&&(this.Qs(r),r.length===0&&this.Ys()),this.zs(e)}Xs(){var e,t=this.Ps();if(!t)return{};var n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t];return n&&typeof n==`object`?n:{}}Zs(e){if(this.Ps()){var t=this.Xs();this.Rs(z({},t,{[e]:Date.now()}))}}zs(e){if(this.Ps()){var t=this.Xs(),n={},r=!1;for(var i of Object.entries(t)){var a=i[0],o=i[1];e.includes(a)?r=!0:n[a]=o}r&&(yu(n)?this.As():this.Rs(n))}}ta(){this.Ps()&&this.As()}getActivationTimestamp(e){if(this.Gs().includes(e)){var t=this.Xs()[e];return Cu(t)?t:void 0}}Js(){var e,t=this.ea();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t])||[]}Gs(){var e,t,n=this.Js();if(n.length===0)return[];var r=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[this.ia()],i=(t=this._instance)==null||t.get_session_id==null?void 0:t.get_session_id();return i&&r===i?n:[]}Ks(){var e,t=(e=this._instance)==null||e.get_session_id==null?void 0:e.get_session_id();t&&this.ra(t)}Ys(){this.na()}Es(e){var t,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[this.ia()];if(n&&n!==e){var r=this.Js(),i=this.Xs();r.length>0&&(this.Qs([]),r.filter((e=>Cu(i[e]))).forEach((e=>this.Ws(e)))),this.Ys(),this.ta()}}getActivatedIds(){return[...new Set([...this.Gs(),...this.Ss])].filter((e=>!this.sa(e)))}reset(){this.Ss=[],this.Js().length>0&&this.Qs([]),this.Ys(),this.ta()}getEventToItemsMap(){return this.Cs}aa(){return this.qs}},zv=class extends Rv{constructor(e){super(e)}ea(){return Dp}ia(){return Op}Ps(){return kp}Rs(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({[kp]:e})}As(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(kp)}Is(e){var t,n;this.Ds((t=>{n=t.find((t=>t.id===e))}));var r=(t=n)==null||(t=t.appearance)==null?void 0:t.surveyPopupDelaySeconds;return Cu(r)&&r>0}oa(){return pg.SHOWN}Ds(e){var t;(t=this._instance)==null||t.getSurveys(e)}Ws(e){var t;(t=this._instance)==null||t.cancelPendingSurvey(e)}js(){return z_}Qs(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({[Dp]:e})}ra(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({[Op]:e})}na(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(Op)}sa(){return!1}Bs(e,t){var n;return this.Ds((e=>{n=e.find((e=>e.id===t))})),!n||function(e){var t;return R_(e)&&!((t=e.conditions)==null||(t=t.events)==null||!t.repeatedActivation)||e.schedule===`always`}(n)?e===pg.SHOWN?`consume`:`ignore`:e===pg.SHOWN?`persist`:e===pg.DISMISSED||e===pg.SENT?`consume`:`ignore`}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}},Bv=`SDK is not enabled or survey functionality is not yet loaded`,Vv=`Disabled. Not loading surveys.`,Hv=I!=null&&I.location?Vh(I.location.hash,`__posthog`)||Vh(location.hash,`state`):null,Uv=`_postHogToolbarParams`,Wv=Uf(`[Toolbar]`),Gv=Uf(`[FeatureFlags]`),Kv=class{constructor(e,t){t===void 0&&(t=!1),this.la=!1,this.update(e,t)}update(e,t){this.ua=((e,t)=>({bootstrap:{featureFlags:e.bootstrap?.featureFlags,featureFlagPayloads:e.bootstrap?.featureFlagPayloads},remoteRequestsDisabled:t,featureFlagsDisabled:!!e.advanced_disable_feature_flags,onlyEvaluateSurveyFeatureFlags:!!e.advanced_only_evaluate_survey_feature_flags,deduplicateCallsPerSession:!!e.advanced_feature_flags_dedup_per_session,cacheTtlMs:e.feature_flag_cache_ttl_ms,requestTimeoutMs:e.feature_flag_request_timeout_ms,compression:e.disable_compression?`none`:`base64`,evaluationContexts:e.evaluation_contexts??e.evaluation_environments??[],flagKeys:B(e.flag_keys)?e.flag_keys:void 0}))(e,t),!e.evaluation_environments||e.evaluation_contexts||this.la||(Gv.warn(`evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version.`),this.la=!0),V(e.flag_keys)||B(e.flag_keys)||Gv.error(`Invalid flag_keys found:`,e.flag_keys,`Expected array of non-empty strings`)}get(){return this.ua}},qv=Uf(`[FeatureFlags]`),Jv=Uf(`[FeatureFlags]`,{debugEnabled:!0}),Yv=`" failed. Feature flags didn't load in time.`,Xv=`connection_error`,Zv=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},Qv=e=>{var t={};for(var n of cm(e||{})){var r=n[1];r&&(t[n[0]]=r)}return t},$v=Uf(`[Error tracking]`),ey=`Refusing to render web experiment since the viewer is a likely bot`,ty={icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>O_(t,e),not_regex:(e,t)=>!O_(t,e),exact:(e,t)=>
3t===e,is_not:(e,t)=>t!==e},ny=class e{get Ne(){return this._instance.config}constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(t){t===void 0&&(t=!1),n.getWebExperiments((t=>{e.ha(`retrieved web experiments from the server`),n.da=new Map,t.forEach((t=>{if(t.feature_flag_key){var r;n.da&&(e.ha(`setting flag key `,t.feature_flag_key,` to web experiment `,t),(r=n.da)==null||r.set(t.feature_flag_key,t));var i=n._instance.getFeatureFlag(t.feature_flag_key);bu(i)&&t.variants[i]&&n.va(t.name,i,t.variants[i].transforms)}else if(t.variants)for(var a in t.variants){var o=t.variants[a];e.ca(o,n._instance)&&n.va(t.name,a,o.transforms)}}))}),t)},this._instance=t,this._instance.onFeatureFlags((e=>{this.onFeatureFlags(e)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())e.ha(ey);else if(!this.Ne.disable_web_experiments){if(H(this.da))return this.da=new Map,this.loadIfEnabled(),void this.previewWebExperiment();e.ha(`applying feature flags`,t),t.forEach((e=>{var t;if(this.da&&(t=this.da)!=null&&t.has(e)){var n=this._instance.getFeatureFlag(e),r=this.da?.get(e);n&&r!=null&&r.variants[n]&&this.va(r.name,n,r.variants[n].transforms)}}))}}previewWebExperiment(){var t=e.getWindowLocation();if(t!=null&&t.search){var n=zh(t?.search,`__experiment_id`),r=zh(t?.search,`__experiment_variant`);n&&r&&(e.ha(`previewing web experiments `+n+` && `+r),this.getWebExperiments((e=>{this.fa(parseInt(n),r,e)}),!1,!0))}}loadIfEnabled(){this.Ne.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,n){if(this.Ne.disable_web_experiments&&!n)return e([]);var r=this._instance.get_property(`$web_experiments`);if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/web_experiments/?token=`+this.Ne.token),method:`GET`,timestampMode:`query`,callback:t=>e(t.statusCode===200&&t.json&&t.json.experiments||[])})}fa(t,n,r){var i=r.filter((e=>e.id===t));i&&i.length>0&&(e.ha(`Previewing web experiment [`+i[0].name+`] with variant [`+n+`]`),this.va(i[0].name,n,i[0].variants[n].transforms))}static ca(t,n){return!H(t.conditions)&&e.pa(t,n)&&e.ga(t)}static pa(t,n){if(H(t.conditions)||H(t.conditions?.url))return!0;var r=e.getWindowLocation();if(r){var i,a=Fm(n,r.href);return(i=t.conditions)==null||!i.url||ty[t.conditions?.urlMatchType??`icontains`](t.conditions.url,a)}return!1}
3static getWindowLocation(){return I?.location}static ga(e){if(H(e.conditions)||H(e.conditions?.utm))return!0;var t=Yh();if(t.utm_source){var n,r,i,a,o,s,c,l,u=(n=e.conditions)==null||(n=n.utm)==null||!n.utm_campaign||((r=e.conditions)==null||(r=r.utm)==null?void 0:r.utm_campaign)==t.utm_campaign,d=(i=e.conditions)==null||(i=i.utm)==null||!i.utm_source||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==t.utm_source,f=(o=e.conditions)==null||(o=o.utm)==null||!o.utm_medium||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_medium)==t.utm_medium,p=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_term||((l=e.conditions)==null||(l=l.utm)==null?void 0:l.utm_term)==t.utm_term;return u&&f&&p&&d}return!1}static ha(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];U.info(`[WebExperiments] `+e,n)}va(t,n,r){this._is_bot()?e.ha(ey):n===`control`?e.ha(`Control variants leave the page unmodified.`):r.forEach((r=>{r.selector&&(e.ha(`applying transform of variant `+n+` for experiment `+t+` `,r),(document?.querySelectorAll(r.selector))?.forEach((e=>{var t=e;r.html&&(t.innerHTML=r.html),r.css&&t.setAttribute(`style`,r.css)})))}))}_is_bot(){return Nl&&this._instance?E_(Nl,this.Ne.custom_blocked_useragents):void 0}},ry=Uf(`[Conversations]`),iy=`Conversations not available yet.`,ay=`console`,oy=`__posthogHandledLogsRequestError`,sy=(e,t)=>{var n=e instanceof Error?e:Error(t);return n[oy]=!0,n},cy=e=>!!e&&typeof e==`object`&&!0===e[oy],ly={featureFlags:class{constructor(e){this.name=`featureFlags`,this.ma=!1,this.featureFlagEventHandlers=[],this.rt=qv,this.ya={},this.ba={},this._a=[],this.wa=!1,this.ka=!1,this.xa=0,this.Sa=!1,this.Ca=!1,this.Ma=!1,this.Ta=!1,this.Ea=0,this.Ia=()=>{var e=this.Pa();this.Ea=0,e&&this.reloadFeatureFlags()},`get`in e?this.Ra=e:(this.Aa=new Kv(e.config,e.Qi()),this.Ra=this.Aa)}updateConfig(e,t){var n;(n=this.Aa)==null||n.update(e,t)}setup(e){return this.Fa=e,this.rt=e.logger.createLogger(`[FeatureFlags]`),n=()=>{this.Fa===e&&(this.Fa=void 0,this.un=e,this.La(e))},(t=e.kv.initialize())!=null&&t.then?t.then(n):n();var t,n}La(e){if(this.un===e)return I&&mm(I,`online`,this.Ia),this.Oa=e.registerDynamicEventProperties((()=>this.Da()?this.ya:this.ba)),this.$a(),this.initialize()}destroy(){I?.removeEventListener(`online`,this.Ia)}dispose(){var e;this.xa++,this.Ca=!1,this.Fa=void 0,this.un&&=(this.Na(),(e=this.Oa)==null||e.dispose(),this.Oa=void 0,this._a=[],I?.removeEventListener(`online`,this.Ia),void 0)}get Ne(){return this.Ra.get()}qa(e){return this.un?.kv.get(e)}F(e){this.ja((()=>this.un?.kv.set(e)))}q(e){this.ja((()=>this.un?.kv.remove(e)))}ja(e){try{e()}catch(e){this.rt.error(`Failed to update feature flag persistence`,e)}}$a(){var e={};for(var t of[hp,vp,yp,xp]){var n=this.qa(t);V(n)||(e[t]=n)}this.ya=e;var r=z({},e),i=this.qa(mp);if(i)for(var a of Object.entries(i))r[`$feature/`+a[0]]=a[1];this.ba=r}Da(){var e=this.Ne.cacheTtlMs;if(!e||0>=e)return!1;var t=this.qa(Pp);return typeof t!=`number`||Date.now()-t>e}Ba(){return!!this.Da()&&(this.Ta||this.ka||(this.Ta=!0,this.rt.warn(`Feature flag cache is stale, triggering refresh...`),this.reloadFeatureFlags()),!0)}Ha(){var e=this.Ne.evaluationContexts;return e!=null&&e.length?e.filter((e=>{var t=e&&typeof e==`string`&&e.trim().length>0;return t||this.rt.error(`Invalid evaluation context found:`,e,`Expected non-empty string`),t})):[]}Ua(){var e=this.Ne.flagKeys;if(!V(e))return e.filter((e=>{var t=e&&typeof e==`string`&&e.trim().length>0;return t||this.rt.error(`Invalid flag key found:`,e,`Expected non-empty string`),t}))}initialize(){var e=this.Ne,t=e.bootstrap?.featureFlags??{};if(Object.keys(t).length){var n=e.bootstrap?.featureFlagPayloads??{},r=Object.keys(t).filter((e=>!!t[e])).reduce(((e,n)=>(e[n]=t[n]||!1,e)),{}),i=Object.keys(n).filter((e=>r[e])).reduce(((e,t)=>(e[t]=n[t],e)),{});return this.za({featureFlags:r,featureFlagPayloads:i})}}updateFlags(e,t,n){var r,i,a=n!=null&&n.merge&&(r=this.qa(mp))!=null?r:{},o=n!=null&&n.merge&&(i=this.qa(vp))!=null?i:{},s=z({},a,e),c=z({},o,t),l={};for(var u of Object.entries(s)){var d=u[0],f=u[1];l[d]={key:d,enabled:ql(f),variant:Jl(f),reason:void 0,metadata:V(c?.[d])?void 0:{id:0,version:void 0,description:void 0,payload:c[d]}}}this.za({flags:l})}get hasLoadedFlags(){return this.wa}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.qa(_p),t=this.qa(xp),n=this.qa(Sp);if(!n&&!t)return e||{};var r=sm({},e||{});for(var i of[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])]){var a,o,s=r[i],c=t?.[i],l=V(c)?(a=s?.enabled)!=null&&a:!!c,u=V(c)?s?.variant:typeof c==`string`?c:void 0,d=n?.[i],f=z({},s,{enabled:l,variant:l?u??s?.variant:void 0});l!==s?.enabled&&(f.original_enabled=s?.enabled),u!==s?.variant&&(f.original_variant=s?.variant),d&&(f.metadata=z({},s?.metadata,{payload:d,original_payload:s==null||(o=s.metadata)==null?void 0:o.payload})),r[i]=f}return this.ma||=(this.rt.warn(` Overriding feature flag details!`,{flagDetails:e,overriddenPayloads:n,finalDetails:r}),!0),r}getAllFeatureFlags(){var e=this.getFlagVariants(),t=this.getFlagPayloads();return Object.keys(e).map((n=>{var r=e[n];return{key:n,enabled:ql(r),variant:Jl(r),payload:Kl(t[n])}}))}getFlagVariants(){var e=this.qa(mp),t=this.qa(xp);if(!t)return e||{};for(var n=sm({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.ma||=(this.rt.warn(` Overriding feature flags!`,{enabledFlags:e,overriddenFlags:t,finalFlags:n}),!0),n}getFlagPayloads(){var e=this.qa(vp),t=this.qa(Sp);if(!t)return e||{};for(var n=sm({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.ma||=(this.rt.warn(` Overriding feature flag payloads!`,{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),!0),n}reloadFeatureFlags(){this.Sa||this.Ne.featureFlagsDisabled||this.Pa()||this.Wa||(this._a.slice().forEac
3h((e=>{try{e()}catch(e){this.rt.error(`Error while running feature flags reloading callback`,e)}})),this.Wa=setTimeout((()=>{this.Va()}),5))}Na(){clearTimeout(this.Wa),this.Wa=void 0}onReloading(e){return this._a.push(e),()=>{this._a=this._a.filter((t=>t!==e))}}ensureFlagsLoaded(){this.wa||this.ka||this.Wa||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Sa=e}resetFlagCallReported(){this.q(jp)}Va(e){this.Na();var t=this.un;if(t&&!this.Ne.remoteRequestsDisabled&&!this.Pa()){if(this.ka)this.Ca=!0;else{var n={token:t.projectToken,distinct_id:t.distinctId,groups:t.groups,$anon_distinct_id:this.$anon_distinct_id,person_properties:z({},t.initialPersonProperties,this.qa(Cp)||{},{$lib:t.library.name,$lib_version:t.library.version}),group_properties:this.qa(wp),timezone:rg()};V(t.deviceId)||(n.$device_id=t.deviceId),(e!=null&&e.disableFlags||this.Ne.featureFlagsDisabled)&&(n.disable_flags=!0);var r=this.Ha();r.length&&(n.evaluation_contexts=r);var i=this.Ua();V(i)||(n.flag_keys=i);var a=this.Ne.onlyEvaluateSurveyFeatureFlags,o=`/flags/?v=2`+(a?`&only_evaluate_survey_feature_flags=true`:``),s=this.xa;this.ka=!0;var c=()=>{this.Ca&&(this.Ca=!1,this.Va())},l=e=>{this.ka=!1,s===this.xa?(this.F({[Np]:[Xv]}),this.rt.error(`Feature flag request failed`,e),c()):c()};try{t.sendRequest(o,{target:`flags`,method:`POST`,body:n,compression:this.Ne.compression===`base64`?ug.Base64:void 0,sentAt:`body`,timeoutMs:this.Ne.requestTimeoutMs}).then((e=>{var t,r=e.json??{},i=e.statusCode!==200;if(this.ka=!1,s===this.xa){if(this.Za(e.statusCode),i||this.Ca||(this.$anon_distinct_id=void 0),!n.disable_flags||this.Ca){this.Ma=!i;var o=[];e.error?o.push(e.error instanceof Error&&e.error.name===`AbortError`?`timeout`:e.error instanceof Error?Xv:`unknown_error`):e.statusCode!==200&&o.push(`api_error_`+e.statusCode),r.errorsWhileComputingFlags&&o.push(`errors_while_computing_flags`);var l=!((t=r.quotaLimited)==null||!t.includes(`feature_flags`));l&&o.push(`quota_limited`),this.F({[Np]:o}),l?this.rt.warn(`You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more.`):n.disable_flags||this.za(r,i,{partialResponse:a}),c()}}else c()})).catch(l)}catch(e){l(e)}}}}Pa(){return Hh(this.Ea,3)}Za(e){this.Ea=Uh(e,this.Ea,3,(()=>this.rt.warn(`Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes.`)))}getFeatureFlag(e,t){if(t===void 0&&(t={}),!t.fresh||this.Ma){if(this.wa||this.getFlags()&&this.getFlags().length>0){if(!this.Ba()){var n=this.getFeatureFlagResult(e,t);return n?.variant??n?.enabled}}else this.rt.warn(`getFeatureFlag for key "`+e+Yv)}}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFeatureFlagResult(e,{send_event:!1})?.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.Ma){if(this.wa||this.getFlags()&&this.getFlags().length>0){if(!this.Ba()){var n,r=this.getFlagVariants(),i=e in r,a=r[e],o=this.getFlagPayloads()[e],s=String(a),c=this.qa(yp)||void 0,l=this.qa(Pp)||void 0,u=this.qa(jp)||{};if(this.Ne.deduplicateCallsPerSession){var d=this.un?.session.sessionId,f=this.qa(Mp);d&&d!==f&&(u={},n=d)}if(t.send_event||!(`send_event`in t)){if(e in u&&u[e].includes(s))n&&this.F({[jp]:u,[Mp]:n});else{var p,m,h,g,_,v,y,b;B(u[e])?u[e].push(s):u[e]=[s],this.F(z({[jp]:u},n?{[Mp]:n}:{}));var x=this.getFeatureFlagDetails(e),S=[...this.qa(Np)??[]];V(a)&&S.push(`flag_missing`);var C={$feature_flag:e,$feature_flag_response:a,$feature_flag_payload:o??null,$feature_flag_request_id:c,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:((p=this.Ne.bootstrap)==null||(p=p.featureFlags)==null?void 0:p[e])??null,$feature_flag_bootstrapped_payload:((m=this.Ne.bootstrap)==null||(m=m.featureFlagPayloads)==null?void 0:m[e])??null,$used_bootstrap_value:!this.Ma};V(x==null||(h=x.metadata)==null?void 0:h.has_experiment)||(C.$feature_flag_has_experiment=x.metadata.has_experiment),V(x==null||(g=x.metadata)==null?void 0:g.version)||(C.$feature_flag_version=x.metadata.version);var w,T=(x==null||(_=x.reason)==null?void 0:_.description)??(x==null||(v=x.reason)==null?void 0:v.code);T&&(C.$feature_flag_reason=T),x!=null&&(y=x.metadata)!=null&&y.id&&(C.$feature_flag_id=x.metadata.id),V(x?.original_variant)&&V(x?.original_enabled)||(C.$feature_flag_original_response=V(x.original_variant)?x.original_enabled:x.original_variant),x!=null&&(b=x.metadata)!=null&&b.original_payload&&(C.$feature_flag_original_payload=x==null||(w=x.metadata)==null?void 0:w.original_payload),S.length&&(C.$feature_flag_error=S.join(`,`)),this.Ga(C)}}else n&&this.F({[jp]:u,[Mp]:n});if(i)return{key:e,enabled:!!a,variant:typeof a==`string`?a:void 0,payload:Kl(o)}}}else this.rt.warn(`getFeatureFlagResult for key "`+e+Yv)}}Ga(e){try{var t;(t=this.un)==null||t.capture(`$feature_flag_called`,e).catch((e=>{this.rt.error(`Failed to capture feature flag call`,e)}))}catch(e){this.rt.error(`Failed to capture feature flag call`,e)}}getRemoteConfigPayload(e,t){this.Qa(e,t)}Qa(e,t){var n=this;return Wl((function*(){var r=n.un;if(r){var i={distinct_id:r.distinctId,token:r.projectToken,person_properties:{$lib:r.library.name,$lib_version:r.library.version}},a=n.Ha();a.length&&(i.evaluation_contexts=a);var o,s=n.Ua();V(s)||(i.flag_keys=s);try{o=(yield r.sendRequest(`/flags/?v=2`,{target:`flags`,method:`POST`,body:i,compression:n.Ne.compression===`base64`?ug.Base64:void 0,sentAt:`body`,timeoutMs:n.Ne.requestTimeoutMs})).json?.featureFlagPayloads?.[e]||void 0}catch(e){n.rt.error(`Remote config feature flag request failed`,e);return}try{t(o)}catch(e){n.rt.error(`Remote config feature flag callback failed`,e)}}}))()}isFeatureEnabled(e,t){if(t===void 0&&(t={}),t.fresh&&!this.Ma)return t.defaultValue;if(!(this.wa||this.getFlags()&&this.getFlags().length>
30))return this.rt.warn(`isFeatureEnabled for key "`+e+Yv),t.defaultValue;var n=this.getFeatureFlag(e,t);return V(n)?t.defaultValue:!!n}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,n){this.za(e,t,n)}za(e,t,n){if(this.un){this.wa=!0;var r=function(e,t,n,r,i,a){t===void 0&&(t={}),n===void 0&&(n={}),r===void 0&&(r={}),a===void 0&&(a=qv);var o=((e,t)=>{var n=e.flags;return n?z({},e,{featureFlags:Object.fromEntries(Object.keys(n).map((e=>[e,n[e].variant??n[e].enabled]))),featureFlagPayloads:Object.fromEntries(Object.keys(n).filter((e=>n[e].enabled)).filter((e=>n[e].metadata?.payload)).map((e=>[e,n[e].metadata?.payload])))}):(e.featureFlags&&t.warn(`Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version`),e)})(e,a),s=o.flags,c=o.featureFlags,l=o.featureFlagPayloads;if(c){var u=e.requestId,d=e.evaluatedAt;if(B(c)){a.warn(`v1 of the feature flags endpoint is deprecated. Please use the latest version.`);var f={};if(c)for(var p=0;c.length>p;p++)f[c[p]]=!0;return{[hp]:c,[mp]:f,[bp]:!1}}var m=c,h=l,g=s;if(i!=null&&i.partialResponse)m=z({},t,m),h=z({},n,h),g=z({},r,g);else if(e.errorsWhileComputingFlags){if(s){var _=new Set(Object.keys(s).filter((e=>{var t;return!((t=s[e])!=null&&t.failed)})));m=z({},t,Object.fromEntries(Object.entries(m).filter((e=>_.has(e[0]))))),h=z({},n,Object.fromEntries(Object.entries(h||{}).filter((e=>_.has(e[0]))))),g=z({},r,Object.fromEntries(Object.entries(g||{}).filter((e=>_.has(e[0])))))}else m=z({},t,m),h=z({},n,h),g=z({},r,g)}return z({[hp]:Object.keys(Qv(m)),[mp]:m||{},[vp]:h||{},[_p]:g||{},[bp]:!0===e.minimalFlagCalledEvents},u?{[yp]:u}:{},d?{[Pp]:d}:{})}}(e,this.getFlagVariants(),this.getFlagPayloads(),this.getFlagsWithDetails(),n,this.rt);r&&this.F(r),t||(this.Ta=!1),this.Ka(t)}}override(e,t){t===void 0&&(t=!1),this.rt.warn(`override is deprecated. Please use overrideFeatureFlags instead.`),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){this.Ja(e)}Ja(e){if(this.un){if(!1===e)return this.q([xp,Sp]),this.Ka(),void Jv.info(`All overrides cleared`);if(B(e))return this.F({[xp]:Zv(e)}),this.Ka(),void Jv.info(`Flag overrides set`,{flags:e});if(e&&typeof e==`object`&&(`flags`in e||`payloads`in e)){var t,n=e;this.ma=!!((t=n.suppressWarning)!=null&&t);var r={},i=n.flags,a=n.payloads;i&&(r[xp]=B(i)?Zv(i):i),a&&(r[Sp]=a),Object.keys(r).length&&this.F(r),!1===i&&!1===a?this.q([xp,Sp]):!1===i?this.q(xp):!1===a&&this.q(Sp),this.Ka(),!1===i?Jv.info(`Flag overrides cleared`):i&&Jv.info(`Flag overrides set`,{flags:i}),!1===a?Jv.info(`Payload overrides cleared`):a&&Jv.info(`Payload overrides set`,{payloads:a});return}if(e&&typeof e==`object`)return this.F({[xp]:e}),this.Ka(),void Jv.info(`Flag overrides set`,{flags:e});this.rt.warn(`Invalid overrideOptions provided to overrideFeatureFlags`,{overrideOptions:e})}else this.rt.warn(`posthog.featureFlags.overrideFeatureFlags called before feature flags were ready`)}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.wa){var t=this.Ya(),n=t.flags,r=t.flagVariants;try{e(n,r)}catch(e){this.rt.error(`Error while running feature flags callback`,e)}}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r=(this.qa(gp)||[]).find((t=>t.flagKey===e)),i={[`$feature_enrollment/`+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:i};r&&(a.$early_access_feature_name=r.name),n&&(a.$feature_enrollment_stage=n);var o=z({},this.getFlagVariants(),{[e]:t});this.F({[hp]:Object.keys(Qv(o)),[mp]:o,[Cp]:z({},this.qa(Cp)||{},i)}),this.Ka();try{var s;(s=this.un)==null||s.capture(`$feature_enrollment_update`,a).catch((e=>{this.rt.error(`Failed to capture early access feature enrollment`,e)}))}catch(e){this.rt.error(`Failed to capture early access feature enrollment`,e)}}getEarlyAccessFeatures(e,t,n){t===void 0&&(t=!1);var r=this.qa(gp);!r||t?this.Xa(e,n):e(r)}Xa(e,t){var n=this;return Wl((function*(){var r=n.un;if(r){var i,a=t?`&`+t.map((e=>`stage=`+e)).join(`&`):``;try{var o=yield r.sendRequest(`/api/early_access_features/?token=`+r.projectToken+a,{target:`api`,method:`GET`,sentAt:`query`});if(!o.json)return;n.F({[gp]:i=o.json.earlyAccessFeatures})}catch(e){n.rt.error(`Early access feature request failed`,e);return}try{e(i)}catch(e){n.rt.error(`Early access feature callback failed`,e)}}}))()}Ya(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((e=>t[e])),flagVariants:Object.keys(t).filter((e=>t[e])).reduce(((e,n)=>(e[n]=t[n],e)),{})}}Ka(e){this.$a();var t=this.Ya(),n=t.flags,r=t.flagVariants;
3this.featureFlagEventHandlers.forEach((t=>{try{t(n,r,{errorsLoading:e})}catch(e){this.rt.error(`Error while running feature flags callback`,e)}}))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0),this.eo(e,t)}eo(e,t){t===void 0&&(t=!0);var n=this.qa(Cp)||{},r=e?.$set||(e!=null&&e.$set_once?{}:e),i=e?.$set_once,a={};if(i)for(var o in i)({}).hasOwnProperty.call(i,o)&&(o in n||(a[o]=i[o]));this.F({[Cp]:z({},n,a,r)}),t&&this.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=z({},this.qa(Cp)||{});e.forEach((e=>{delete n[e]})),this.F({[Cp]:n}),t&&this.reloadFeatureFlags()}resetPersonPropertiesForFlags(e){e===void 0&&(e=!0),this.q(Cp),e&&this.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.qa(wp)||{},r=z({},n);for(var i of Object.keys(e))r[i]=z({},n[i],e[i]);this.F({[wp]:r}),t&&this.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.qa(wp)||{};this.F({[wp]:z({},t,{[e]:{}})})}else this.q(wp)}reset(){this.xa++,this.Ca=!1,this.$a(),this.wa=!1,this.Sa=!1,this.Ma=!1,this.$anon_distinct_id=void 0,this.Na(),this.ma=!1,this.Ea=0}}},uy={sessionRecording:class{get Ne(){return this._instance.config}get Mr(){return this._instance.persistence}get started(){var e;return!((e=this.io)==null||!e.isStarted)}get status(){return this.ro===Tv||this.ro===Ev?this.ro:this.io?.status??this.ro}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.ro=Cv,this.no=void 0,this.so=!1,this.ao=(()=>{var e;if(L==null||!L.visibilityState||L.visibilityState===`visible`)return!0;var t=I==null||(e=I.performance)==null||e.getEntriesByType==null?void 0:e.getEntriesByType(`visibility-state`);return!(t!=null&&t.length)||t.some((e=>e.name===`visible`))})(),this.Ie=()=>{var e;L?.visibilityState===`visible`&&(this.ao=!0,(e=this.io)==null||e.setDocumentWasEverVisible==null||e.setDocumentWasEverVisible(!0))},this._instance=e,!this._instance.sessionManager)throw Ov.error(`started without valid sessionManager`),Error(Dv+` started without valid sessionManager. This is a bug.`);if(this.Ne.cookieless_mode===Yp)throw Error(Dv+` cannot be used with cookieless_mode="always"`);L!=null&&L.addEventListener&&mm(L,`visibilitychange`,this.Ie)}initialize(){this.startIfEnabledOrStop()}dispose(){this.so=!0,L==null||L.removeEventListener==null||L.removeEventListener(`visibilitychange`,this.Ie),this.stopRecording()}get oo(){var e,t=!((e=this._instance.get_property(op))==null||!e.enabled),n=!this.Ne.disable_session_recording,r=this.Ne.disable_session_recording||this._instance.consent.isOptedOut();return I&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!(this.so||this.oo&&(t=this.io)!=null&&t.isStarted)){var n=!V(Object.assign)&&!V(Array.from);this.oo&&n?(this.lo(e),Ov.info(`starting`)):(this.ro=Cv,this.stopRecording())}}lo(e){var t,n,r;this.oo&&(this.ro!==Tv&&this.ro!==Ev&&(this.ro=wv),R!=null&&(t=R.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=R.__PosthogExtensions__)!=null&&n.initSessionRecording?this.uo(e):(r=R.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.ho,(t=>{if(t)return Ov.error(`could not load recorder`,t);this.uo(e)})))}stopRecording(){var e,t;(e=this.no)==null||e.call(this),this.no=void 0,(t=this.io)==null||t.stop()}do(){var e,t;(e=this.no)==null||e.call(this),this.no=void 0,(t=this.io)==null||t.discard()}vo(){var e,t;(e=this.Mr)==null||e.unregister(pp),(t=this.Mr)==null||t.unregister(sp)}co(e,t){if(H(e))return null;var n,r=Cu(e)?e:parseFloat(e);return typeof(n=r)!=`number`||!Number.isFinite(n)||0>n||n>1?(Ov.warn(t+` must be between 0 and 1. Ignoring invalid value:`,e),null):r}fo(e){if(this.Mr){var t,n=this.Mr,r=()=>{var t=!1===e.sessionRecording?void 0:e.sessionRecording,r=this.co(this.Ne.session_recording?.sampleRate,`session_recording.sampleRate`),i=this.co(t?.sampleRate,`remote config sampleRate`),a=r??i;H(a)&&this.vo();var o=t?.minimumDurationMilliseconds;n.register({[op]:z({cache_timestamp:Date.now(),enabled:!!t},t,{networkPayloadCapture:z({capturePerformance:e.capturePerformance},t?.networkPayloadCapture),canvasRecording:{enabled:t?.recordCanvas,fps:t?.canvasFps,quality:t?.canvasQuality},sampleRate:a,minimumDurationMilliseconds:V(o)?null:o,endpoint:t?.endpoint,triggerMatchType:t?.triggerMatchType,masking:t?.masking,urlTriggers:t?.urlTriggers,version:t?.version,triggerGroups:t?.triggerGroups})})};r(),(t=this.no)==null||t.call(this),this.no=this._instance.sessionManager?.onSessionId(r)}}onRemoteConfig(e){var t=e.ok?e.config:void 0;t&&`sessionRecording`in t?!1===t.sessionRecording?(this.fo(t),this.do()):(this.fo(t),this.startIfEnabledOrStop()):(this.ro===Tv&&(this.ro=Ev,Ov.warn(`config refresh failed, recording will not start until page reload`)),this.startIfEnabledOrStop())}log(e,t){var n;t===void 0&&(t=`log`),(n=this.io)!=null&&n.log?this.io.log(e,t):Ov.warn(`log called before recorder was ready`)}get ho(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(op);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||`lazy-recorder`}po(){var e,t=this._instance.get_property(op);if(!t)return!1;try{e=typeof t==`object`?t:JSON.parse(t)}catch(e){return Ov.warn(`persisted remote config for session recording is invali
3d and will be ignored`,e),!1}return!H(e.cache_timestamp)&&36e5>=Date.now()-e.cache_timestamp}uo(e){var t,n,r;if(!this.so){if((t=R.__PosthogExtensions__)==null||!t.initSessionRecording)return Ov.warn(`Called on script loaded before session recording is available. This can be caused by adblockers.`),void this._instance.register_for_session({[Kp]:!0});if(this.io||(this.io=R.__PosthogExtensions__?.initSessionRecording(this._instance,this.ao),this.io._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.po()){if(this.ro===Ev||this.ro===Tv)return;this.ro=Tv,Ov.info(`persisted remote config is stale, requesting fresh config before starting`),new xg(this._instance).load();return}this.ro=wv,(n=(r=this.io).setDocumentWasEverVisible)==null||n.call(r,this.ao),this.io.start(e)}}onRRwebEmit(e){var t;(t=this.io)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.io||(t=this.Mr)==null||t.register({[lp]:!0}),(e=this.io)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.io||(t=this.Mr)==null||t.register({[cp]:!0}),(e=this.io)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.io||(n=this.Mr)==null||n.register({[e===`url`?up:dp]:!0}),(t=this.io)==null||t.overrideTrigger(e)}get sdkDebugProperties(){return this.io?.sdkDebugProperties||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.io)==null||!n.tryAddCustomEvent(e,t))}}},dy={autocapture:class{constructor(e){this.mo=!1,this.yo=null,this.bo=!1,this._o=!1,this.instance=e,this.rageclicks=new fv(e.config.rageclick),this.wo=null}initialize(){this.startIfEnabled()}get Ne(){var e=vu(this.instance.config.autocapture)?this.instance.config.autocapture:{};return e.url_allowlist=e.url_allowlist?.map((e=>new RegExp(e))),e.url_ignorelist=e.url_ignorelist?.map((e=>new RegExp(e))),e}ko(){if(this.isBrowserSupported()){if(I&&L){var e=e=>{e||=I?.event;try{this.xo(e)}catch(e){mv.error(`Failed to capture event`,e)}};if(mm(L,`submit`,e,{capture:!0}),mm(L,`change`,e,{capture:!0}),mm(L,`click`,e,{capture:!0}),this.Ne.capture_copied_text){var t=e=>{e||=I?.event;try{this.xo(e,pv)}catch(e){mv.error(`Failed to capture copy/cut event`,e)}};mm(L,`copy`,t,{capture:!0}),mm(L,`cut`,t,{capture:!0})}}}else mv.info(`Disabling Automatic Event Collection because this browser is not supported`)}startIfEnabled(){this.isEnabled&&!this.mo&&(this.ko(),this.mo=!0)}onRemoteConfig(e){if(this.bo=!0,e.ok){var t=e.config;t.elementsChainAsString&&(this._o=t.elementsChainAsString);var n=t.autocapture_opt_out;Tu(n)&&(this.instance.persistence&&this.instance.persistence.register({[Zf]:n}),this.yo=n),this.startIfEnabled()}else this.startIfEnabled()}setElementSelectors(e){this.wo=e}getElementSelectors(e){var t,n=[];return(t=this.wo)==null||t.forEach((t=>{(L?.querySelectorAll(t))?.forEach((r=>{e===r&&n.push(t)}))})),n}get isEnabled(){var e=this.instance.persistence?.props[Zf],t=this.yo,n=this.instance.Qi()&&!this.bo;if(Su(t)&&!Tu(e)&&!n)return!1;var r=this.yo??!!e;return!!this.instance.config.autocapture&&!r}xo(e,t){if(t===void 0&&(t=`$autocapture`),this.isEnabled){var n,r=Zm(e);Um(r)&&(r=r.parentNode||null),t===`$autocapture`&&e.type===`click`&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&sh(r,this.instance.config.rageclick)&&this.xo(e,`$rageclick`);var i=t===pv;if(r&&function(e,t,n,r,i,a){if(!I||ch(e)||n!=null&&n.url_allowlist&&!qm(n.url_allowlist,a)||n!=null&&n.url_ignorelist&&qm(n.url_ignorelist,a))return!1;if(n!=null&&n.dom_event_allowlist){var o=n.dom_event_allowlist;if(o&&!o.some((e=>t.type===e)))return!1}var s=lh(e,r),c=s.parentIsUsefulElement,l=s.targetElementList;if(!function(e,t){var n=t?.element_allowlist;if(V(n))return!0;var r,i=function(e){if(n.some((t=>e.tagName.toLowerCase()===t)))return{v:!0}};for(var a of e)if(r=i(a))return r.v;return!1}(l,n)||!$m(l,n?.css_selector_allowlist)||$m(l,n?.css_selector_ignorelist??th))return!1;try{var u=I.getComputedStyle(e);if(u&&u.getPropertyValue(`cursor`)===`pointer`&&t.type===`click`)return!0}catch{}var d=e.tagName.toLowerCase();switch(d){case`html`:return!1;case`form`:return(i||[`submit`]).indexOf(t.type)>=0;case`input`:case`select`:case`textarea`:return(i||[`change`,`click`]).indexOf(t.type)>=0;default:return c?(i||[`click`]).indexOf(t.type)>=0:(i||[`click`]).indexOf(t.type)>=0&&(Qm.indexOf(d)>-1||e.getAttribute(`contenteditable`)===`true`)}}(r,e,this.Ne,i,i?[`copy`,`cut`]:void 0,this.instance)){var a=_v(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Ne.element_attribute_ignorelist,elementsC
3hainAsString:this._o,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}),o=a.props;if(a.explicitNoCapture)return!1;var s=this.getElementSelectors(r);if(s&&s.length>0&&(o.$element_selectors=s),t===pv){var c,l=Ym(I==null||(c=I.getSelection())==null?void 0:c.toString()),u=e.type||`clipboard`;if(!l)return!1;o.$selected_content=l,o.$copy_type=u}return this.instance.capture(t,o),!0}}}isBrowserSupported(){return _u(L?.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.So=(I==null||(t=I.location)==null?void 0:t.pathname)||``}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview===`history_change`}startIfEnabled(){this.isEnabled&&(U.info(`History API monitoring enabled, starting...`),this.monitorHistoryChanges())}stop(){this.Co&&this.Co(),this.Co=void 0,U.info(`History API monitoring stopped`)}monitorHistoryChanges(){I&&I.history&&(this.Mo(`pushState`),this.Mo(`replaceState`),this.To())}Mo(e){var t;if(I&&((t=I.history[e])==null||!t.__posthog_wrapped__)){var n=this;(function(e,t,n){try{if(!(t in e))return yv;var r={next:e[t]},i=n((function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.next.apply(this,t)}));return _u(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:r}})),e[t]=i,()=>{if(e[t]!==i)for(var n=e[t];_u(n)&&n.__posthog_layer__;){var a=n.__posthog_layer__;if(a.next===i)return void(a.next=r.next);n=a.next}else e[t]=r.next}}catch{return yv}})(I.history,e,(t=>function(r,i,a){t.call(this,r,i,a),n.Eo(e)}))}}Eo(e){try{var t,n=I==null||(t=I.location)==null?void 0:t.pathname;if(!n)return;n!==this.So&&this.isEnabled&&this._instance.capture(tm,{navigation_type:e}),this.So=n}catch(t){U.error(`Error capturing `+e+` pageview`,t)}}To(){if(!this.Co){var e=()=>{this.Eo(`popstate`)};mm(I,`popstate`,e),this.Co=()=>{I&&I.removeEventListener(`popstate`,e)}}}},heatmaps:class{get Ne(){return this.instance.config}constructor(e){var t;this.Io=!1,this.mo=!1,this.Po=null,this.instance=e,this.Io=!((t=this.instance.persistence)==null||!t.props[Qf]),this.rageclicks=new fv(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return vu(this.Ne.capture_heatmaps)&&this.Ne.capture_heatmaps.flush_interval_milliseconds&&(e=this.Ne.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return H(this.Ne.capture_heatmaps)?H(this.Ne.enable_heatmaps)?this.Io:this.Ne.enable_heatmaps:!1!==this.Ne.capture_heatmaps}startIfEnabled(){if(this.isEnabled){if(this.mo)return;kv.info(`starting...`),this.Ro(),this.Ie()}else clearInterval(this.Po??void 0),this.Ao(),this.getAndClearBuffer()}onRemoteConfig(e){if(e.ok){var t=e.config;if(`heatmaps`in t){var n=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Qf]:n}),this.Io=n,this.startIfEnabled()}}}getAndClearBuffer(){var e=this.R;return this.R=void 0,e}Fo(e){Av(e.originalEvent)&&this.ke(e.originalEvent,`deadclick`)}Ie(){this.Po&&clearInterval(this.Po),this.Po=L?.visibilityState===`visible`?setInterval(this.cr.bind(this),this.flushIntervalMilliseconds):null}Ro(){I&&L&&(this.Lo=this.cr.bind(this),mm(I,em,this.Lo),this.Oo=e=>this.ke(e||I?.event),mm(L,`click`,this.Oo,{capture:!0}),this.Do=e=>this.$o(e||I?.event),mm(L,`mousemove`,this.Do,{capture:!0}),this.No=new Dh(this.instance,Th,this.Fo.bind(this)),this.No.startIfEnabledOrStop(),this.qo=this.Ie.bind(this),mm(L,$p,this.qo),this.mo=!0)}Ao(){var e;I&&L&&(this.Lo&&I.removeEventListener(em,this.Lo),this.Oo&&L.removeEventListener(`click`,this.Oo,{capture:!0}),this.Do&&L.removeEventListener(`mousemove`,this.Do,{capture:!0}),this.qo&&L.removeEventListener($p,this.qo),clearTimeout(this.jo),(e=this.No)==null||e.stop(),this.mo=!1)}Bo(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),a=function(e,t,n){for(var r=e;r&&Vm(r)&&!Hm(r,`body`);){if(r===n)return!1;var i=void 0;try{i=(r.ownerDocument?.defaultView??I)?.getComputedStyle(r).position}catch{return!1}if(uu(t,i))return!0;r=eh(r)}return!1}(Zm(e),[`fixed`,`sticky`],i);return{x:e.clientX+(a?0:r),y:e.clientY+(a?0:n),target_fixed:a,type:t}}ke(e,t){var n;if(t===void 0&&(t=`click`),!Bm(e.target)&&Av(e)){var r=this.Bo(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&sh(Zm(e),this.instance.config.rageclick)&&this.Vt(z({},r,{type:`rageclick`})),this.Vt(r)}}$o(e){!Bm(e.target)&&Av(e)&&(clearTimeout(this.jo),this.jo=setTimeout((()=>{this.Vt(this.Bo(e,`mousemove`))}),500))}
3Vt(e){if(I){var t=this.Ne.disable_capture_url_hashes?Wd(I.location.href):I.location.href,n=this.Ne.custom_personal_data_properties,r=Bh(t,this.Ne.mask_personal_data_properties?[...Gh,...n||[]]:[],qh);this.R=this.R||{},this.R[r]||(this.R[r]=[]),this.R[r].push(e)}}cr(){this.R&&!yu(this.R)&&this.instance.capture(`$$heatmap`,{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:Dh,webVitalsAutocapture:class{constructor(e){var t;this.Io=!1,this.mo=!1,this.R={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Ho=()=>{clearTimeout(this.Uo),this.Uo=void 0,this.R.metrics.length!==0&&(this._instance.capture(`$web_vitals`,z({$current_url:this.R.url},this.R.metrics.reduce(((e,t)=>z({},e,{[`$web_vitals_`+t.name+`_event`]:z({},t),[`$web_vitals_`+t.name+`_value`]:t.value})),{}))),this.R={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.zo=e=>{if(this.R=this.R||{navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},H(e?.name)||H(e?.value))xv.error(`Invalid metric received`,e);else{var t=typeof e.navigationURL==`string`?e.navigationURL:void 0,n=this.Wo(t);if(!V(n)){var r=Cu(e.navigationId)||typeof e.navigationId==`string`?`navigation:`+e.navigationId:`url:`+n;if(!this.Vo||this.Vo>e.value){this.R.navigationKey!==r&&(this.Ho(),this.Uo=setTimeout(this.Ho,this.flushToCaptureTimeoutMs)),V(this.R.navigationKey)&&(this.R.navigationKey=r,this.R.url=n),this.R.firstMetricTimestamp=V(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0);var i=this._instance.sessionManager?.checkAndGetSessionAndWindowId(!0),a=z({},e,t?{navigationURL:n}:{},{$current_url:n,timestamp:Date.now()});V(i)||(a.$session_id=i.sessionId,a.$window_id=i.windowId),this.R.metrics.push(a),this.R.metrics.length===this.allowedMetrics.length&&this.Ho()}else xv.error(`Ignoring metric with value >= `+this.Vo,e)}}},this.Zo=()=>
3{if(!this.mo){var e,t,n,r,i=R.__PosthogExtensions__,a=i?.postHogWebVitalsCallbacksByFlavor,o=a?.[this.Go]||(this.Go===`web-vitals`&&V(a)?i?.postHogWebVitalsCallbacks:void 0);if(V(o)||(e=o.onLCP,t=o.onCLS,n=o.onFCP,r=o.onINP),e&&t&&n&&r){var s={reportSoftNavs:this.useSoftNavs};this.allowedMetrics.indexOf(`LCP`)>-1&&e(this.zo.bind(this),s),this.allowedMetrics.indexOf(`CLS`)>-1&&t(this.zo.bind(this),s),this.allowedMetrics.indexOf(`FCP`)>-1&&n(this.zo.bind(this),s),this.allowedMetrics.indexOf(`INP`)>-1&&r(this.zo.bind(this),s),this.mo=!0}else xv.error(`web vitals callbacks not loaded - not starting`)}},this._instance=e,this.Io=!((t=this._instance.persistence)==null||!t.props[np]),this.startIfEnabled()}get Qo(){return this._instance.config.capture_performance}get allowedMetrics(){var e=vu(this.Qo)?this.Qo?.web_vitals_allowed_metrics:void 0;return H(e)?this._instance.persistence?.props[ap]||[`CLS`,`FCP`,`INP`,`LCP`]:e}get flushToCaptureTimeoutMs(){return(vu(this.Qo)?this.Qo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=vu(this.Qo)?this.Qo.web_vitals_attribution:void 0;return e!=null&&e}get useSoftNavs(){var e=vu(this.Qo)?this.Qo.__preview_web_vitals_soft_navs:void 0;return e!=null&&e}get Vo(){var e=vu(this.Qo)&&Cu(this.Qo.__web_vitals_max_value)?this.Qo.__web_vitals_max_value:Sv;return e>0&&6e4>=e?Sv:e}get isEnabled(){var e=Pl?.protocol;if(e!==`http:`&&e!==`https:`)return xv.info(`Web Vitals are disabled on non-http/https protocols`),!1;var t=vu(this.Qo)?this.Qo.web_vitals:Tu(this.Qo)?this.Qo:void 0;return Tu(t)?t:this.Io}startIfEnabled(){this.isEnabled&&!this.mo&&(xv.info(`enabled, starting...`),this.ai(this.Zo))}onRemoteConfig(e){if(e.ok){var t=e.config;if(`capturePerformance`in t){var n=vu(t.capturePerformance)&&!!t.capturePerformance.web_vitals,r=vu(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[np]:n}),this._instance.persistence.register({[ap]:r})),this.Io=n,this.startIfEnabled()}}}get Go(){return this.useSoftNavs?this.useAttribution?`web-vitals-with-attribution-soft-navs`:`web-vitals-soft-navs`:this.useAttribution?`web-vitals-with-attribution`:`web-vitals`}ai(e){var t=R.__PosthogExtensions__,n=this.Go,r=t?.postHogWebVitalsCallbacksByFlavor;r!=null&&r[n]||n===`web-vitals`&&V(r)&&t!=null&&t.postHogWebVitalsCallbacks?e():t==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,n,(t=>{t?xv.error(`failed to load script`,t):e()}))}Wo(e){var t=e||I?.location.href;if(t){var n=this._instance.config.disable_capture_url_hashes?Wd(t):t,r=this._instance.config.custom_personal_data_properties;return Bh(n,this._instance.config.mask_personal_data_properties?[...Gh,...r||[]]:[],qh)}xv.error(`Could not determine current URL`)}}},fy={exceptionObserver:class{constructor(e){var t;this.Zo=()=>{var e;if(I&&this.isEnabled&&(e=R.__PosthogExtensions__)!=null&&e.errorWrappingFunctions){var t=R.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,n=R.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=R.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Ko&&this.Ne.capture_unhandled_errors&&(this.Ko=t(this.captureException.bind(this))),!this.Jo&&this.Ne.capture_unhandled_rejections&&(this.Jo=n(this.captureException.bind(this))),!this.Yo&&this.Ne.capture_console_errors&&(this.Yo=r(this.captureException.bind(this)))}catch(e){vv.error(`failed to start`,e),this.Xo()}}},this._instance=e,this.tl=!((t=this._instance.persistence)==null||!t.props[$f]),this.el=new Lu(z({},function(e){return e===void 0&&(e={}),{refillRate:e.exceptionRateLimiterRefillRate??e.__exceptionRateLimiterRefillRate??1,bucketSize:e.exceptionRateLimiterBucketSize??e.__exceptionRateLimiterBucketSize??10}}(this._instance.config.error_tracking),{refillInterval:1e4,rt:vv})),this.Ne=this.il(),this.startIfEnabledOrStop()}il(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return vu(e)?t=z({},t,e):(V(e)?this.tl:e)&&(t=z({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Ne.capture_console_errors||this.Ne.capture_unhandled_errors||this.Ne.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(vv.info(`enabled`),this.Xo(),this.ai(this.Zo)):this.Xo()}ai(e){var t,n;(t=R.__PosthogExtensions__)!=null&&t.errorWrappingFunctions?e():(n=R.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,`exception-autocapture`,(t=>{if(t)return vv.error(`failed to load script`,t);
3e()}))}Xo(){var e,t,n;(e=this.Ko)==null||e.call(this),this.Ko=void 0,(t=this.Jo)==null||t.call(this),this.Jo=void 0,(n=this.Yo)==null||n.call(this),this.Yo=void 0}onRemoteConfig(e){if(e.ok){var t=e.config;`autocaptureExceptions`in t&&(this.tl=!!t.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[$f]:this.tl}),this.Ne=this.il(),this.startIfEnabledOrStop())}}onConfigChange(){this.Ne=this.il()}captureException(e){var t,n,r=(e==null||(t=e.$exception_list)==null||(t=t[0])==null?void 0:t.type)??`Exception`;this.el.consumeRateLimit(r)?vv.info(`Skipping exception capture because of client rate limiting.`,{exception:r}):(n=this._instance.exceptions)==null||n.sendExceptionEvent(e)}},exceptions:class{constructor(e){this.rl=[],this.nl=new ff([new wf,new Pf,new Ef,new Tf,new Mf,new jf,new Of,new Nf],function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return function(t,r){r===void 0&&(r=0);for(var i=[],a=t.split(`
4`),o=r;a.length>o;o++){var s=a[o];if(1024>=s.length){var c=Cf.test(s)?s.replace(Cf,`$1`):s;if(!c.match(/\S*Error: /)){for(var l of n){var u=l(c,e);if(u){i.push(u);break}}if(i.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map((e=>{return z({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||pf});var n}))}(i)}}(`web:javascript`,yf,Sf)),this._instance=e,this.rl=this._instance.persistence?.get_property(ep)??[],this.sl=zf(this.al()),this.ol=new Bf(this.sl)}onConfigChange(){this.sl=zf(this.al()),this.ol.setConfig(this.sl)}onRemoteConfig(e){if(e.ok){var t=e.config;if(`errorTracking`in t){var n=t.errorTracking?.suppressionRules??[],r=t.errorTracking?.captureExtensionExceptions;this.rl=n,this._instance.persistence&&this._instance.persistence.register({[ep]:this.rl,[tp]:r})}}}get ll(){var e,t=!!this._instance.get_property(tp);return(e=this._instance.config.error_tracking.captureExtensionExceptions??t)!=null&&e}buildProperties(e,t){return this.nl.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.sl.enabled)try{if(!bu(e)||e.trim().length===0)return void $v.warn(`Ignoring exception step because message must be a non-empty string`);var n=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce(((n,r)=>Lf.has(r)?(t.push(r),n):(n[r]=e[r],n)),{}),droppedKeys:t}}(this.ul(t)),r=n.sanitizedProperties,i=n.droppedKeys;i.length>0&&$v.warn(`Ignoring reserved exception step fields`,{droppedKeys:i}),this.ol.add(z({[Ff]:e,[If]:new Date().toISOString()},r))}catch(e){$v.error(`Failed to add exception step. Ignoring breadcrumb.`,e)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.hl(t)){if(this.dl(t))return this.vl(`Exception dropped: matched a suppression rule`),void $v.info(`Skipping exception capture because a suppression rule matched`);if(!this.ll&&this.cl(t))return this.vl(`Exception dropped: thrown by a browser extension`),void $v.info(`Skipping exception capture because it was thrown by an extension`);if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.fl(t))return this.vl(`Exception dropped: thrown by the PostHog SDK`),void $v.info(`Skipping exception capture because it was thrown by the PostHog SDK`)}var n=this.sl.enabled&&H(e.$exception_steps)?this.pl(e):e,r=typeof(a=globalThis._posthogReleaseId)==`string`&&a.length>0?a:void 0;r&&(n.$release_id=r);try{var i=this._instance.capture(`$exception`,n,{_noTruncate:!0,_batchKey:`exceptionEvent`,Qn:!0});return i&&this.ol.clear(),i}catch(e){$v.error(`Failed to capture exception event. Dropping this exception.`,e),this.ol.clear();return}}catch(e){$v.error(`Failed to process exception event. Ignoring this exception.`,e);return}var a}pl(e){try{var t=this.ol.getAttachable();return t.length===0?e:z({},e,{$exception_steps:t})}catch(t){return $v.error(`Failed to read buffered exception steps. Capturing exception without steps.`,t),e}}vl(e){this.sl.enabled&&this.ol.add({[Ff]:e,[If]:new Date().toISOString()})}ul(e){return vu(e)?z({},e):{}}al(){return this._instance.config.error_tracking?.exception_steps??{}}dl(e){if(e.length===0)return!1;try{var t=e.reduce(((e,t)=>{var n=t.type,r=t.value;return bu(n)&&n.length>0&&e.$exception_types.push(n),bu(r)&&r.length>0&&e.$exception_values.push(r),e}),{$exception_types:[],$exception_values:[]});return this.rl.some((e=>{var n=e.values.map((e=>{var n=A_[e.operator],r=t[e.key];if(!n||!r)return!1;var i=B(e.value)?e.value:[e.value];return i.length>0&&n(i,r)}));return e.type===`OR`?n.some(Boolean):n.every(Boolean)}))}catch(e){return $v.warn(`Failed to evaluate suppression rules. Capturing the exception.`,e),!1}}cl(e){return e.flatMap((e=>e.stacktrace?.frames??[])).some((e=>e.filename&&e.filename.startsWith(`chrome-extension://`)))}fl(e){if(e.length>0){var t,n,r=e[0].stacktrace?.frames??[],i=r[r.length-1];return(t=i==null||(n=i.filename)==null?void 0:n.includes(`posthog.com/static`))!=null&&t}return!1}hl(e){return!H(e)&&B(e)}}},py=z({productTours:class{get Mr(){return this._instance.persistence}constructor(e){this.gl=null,this.ml=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(e.ok){var t=e.config;if(`productTours`in t){var n;if(this.Mr&&this.Mr.register({[ip]:!!t.productTours}),!Mv(this._instance))return!this.gl&&H(this.Mr?.props[Ap])||jv.info(`product tours disabled; stopping and clearing cached tours`),(n=this.gl)==null||n.stop(),this.gl=null,void this.clearCache();this.loadIfEnabled()}}}loadIfEnabled(){!this.gl&&Mv(this._instance)&&this.ai((()=>this.yl()))}ai(e){var t,n;(t=R.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=R.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,`product-tours`,(t=>{t?jv.error(`Could not load product tours script`,t):e()}))}yl(){var e;!this.gl&&(e=R.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.gl=R.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!B(this.ml)||t){var n=this.Mr;if(n){var r=n.props[Ap];if(B(r)&&!t)return this.ml=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/product_tours/?token=`+this._instance.config.token),method:`GET`,timestampMode:`query`,callback:t=>{if(Mv(this._instance)){var r=t.statusCode;if(r!==200||!t.json){var i=`Product Tours API could not be loaded, status: `+r;r===0?t.error||jv.warn(i):jv.error(i),e([],{isLoaded:!1,error:i});return}var a=B(t.json.product_tours)?t.json.product_tours:[];this.ml=a,n&&n.register({[Ap]:a}),e(a,{isLoaded:!0})}else e([],{isLoaded:!0})}})}else e(this.ml,{isLoaded:!0})}getActiveProductTours(e){H(this.gl)?e([],{isLoaded:!1,error:`Product tours not loaded`}):this.gl.getActiveProductTours(e)}showProductTour(e){var t;(t=this.gl)==null||t.showTourById(e)}previewTour(e){this.gl?this.gl.previewTour(e):this.ai((()=>{var t;this.yl(),(t=this.gl)==null||t.previewTour(e)}))}dismissProductTour(){var e;(e=this.gl)==null||e.dismissTour(`user_clicked_skip`)}nextStep(){var e;(e=this.gl)==null||e.nextStep()}previousStep(){var e;(e=this.gl)==null||e.previousStep()}clearCache(){var e;this.ml=null,(e=this.Mr)==null||e.unregister(Ap)}resetTour(e){var t;(t=this.gl)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.gl)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.gl)==null||t.cancelPendingTour(e)}}},ly),my={siteApps:class{constructor(e){this.bl=0,this._instance=e,this._l=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}wl(e,t){if(t){var n=this.globalsForEvent(t);this._l.push(n),this._l.length>1e3&&(this._l=this._l.slice(10))}}get siteAppLoaders(){var e;return(e=R._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.wl.bind(this));this.kl=()=>{e(),this._l=[],this.kl=void 0}}}globalsForEvent(e){if(!e)throw Error(`Event payload is required`);var t={},n=this._instance.get_property(`$groups`)||[],r=this._instance.get_property(`$stored_group_properties`)||{};for(var i of Object.entries(r)){var a=i[0];t[a]={id:n[a],type:a,properties:i[1]}}var o=e.$set_once,s=e.$set;return{event:z({},Gl(e,Nv),{properties:z({},e.properties,s?{$set:z({},e.properties?.$set??{},s)}:{},o?{$set_once:z({},e.properties?.$set_once??{},o)}:{}),elements_chain:e.properties?.$elements_chain??``,distinct_id:e.properties?.distinct_id}),person:{properties:this._instance.get_property(`$stored_person_properties`)},groups:t}}xl(e){var t=e.tagName?.toLowerCase();
4return t===`style`&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(Pv.error(`prepare_external_dependency_stylesheet returned null`),null):t===`script`&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(Pv.error(`prepare_external_dependency_script returned null`),null):e}Sl(){var e;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var t=L?.defaultView,n=t==null||(e=t.Node)==null?void 0:e.prototype;if(!t||!n)return()=>{};if(this.bl++,this.Cl)return this.Ml();var r=[],i=this,a=new WeakSet,o=(e,t,n)=>{if(e!=null&&e[t]){var i=e[t];e[t]=n(i),r.push((()=>{e[t]=i}))}},s=e=>{if(a.has(e))return e;var t=i.xl(e);return t&&a.add(t),t},c=e=>e.map((e=>typeof e==`string`?e:s(e))).filter((e=>!Su(e)));return o(n,`appendChild`,(e=>function(t){var n=s(t);return n?e.call(this,n):t})),o(n,`insertBefore`,(e=>function(t,n){var r=s(t);return r?e.call(this,r,n):t})),o(n,`replaceChild`,(e=>function(t,n){var r=s(t);return r?e.call(this,r,n):n})),[t.Element?.prototype,t.Document?.prototype,t.DocumentFragment?.prototype].forEach((e=>{o(e,`append`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,c(n))})),o(e,`prepend`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,c(n))}))})),[t.Element?.prototype,t.CharacterData?.prototype,t.DocumentType?.prototype].forEach((e=>{o(e,`before`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,c(n))})),o(e,`after`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,c(n))})),o(e,`replaceWith`,(e=>function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];var i=c(n);return n.length&&!i.length?void 0:e.apply(this,i)}))})),o(t.Element?.prototype,`insertAdjacentElement`,(e=>function(t,n){var r=s(n);return r?e.call(this,t,r):null})),this.Cl=()=>{r.forEach((e=>e())),this.Cl=void 0},this.Ml()}Ml(){var e=!1;return()=>{var t;e||(e=!0,this.bl--,this.bl===0&&((t=this.Cl)==null||t.call(this)))}}Tl(e,t){t===void 0&&(t=!0);var n=this.Sl();try{var r=e(n);return t&&n(),r}catch(e){throw n(),e}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var n;!t.errored&&this._l.length&&(Pv.info(`Processing `+this._l.length+` events for site app with id `+e.id),this._l.forEach((e=>this.Tl((()=>t.processEvent==null?void 0:t.processEvent(e))))),t.processedBuffer=!0),Object.values(this.apps).every((e=>e.processedBuffer||e.errored))&&((n=this.kl)==null||n.call(this))},r=!1,i=i=>{t.errored=!i,t.loaded=!0,Pv.info(`Site app with id `+e.id+` `+(i?`loaded`:`errored`)),r&&n()};try{var a=this.Tl((t=>e.init({posthog:this._instance,callback(e){t(),i(e)}})),!1).processEvent;a&&(t.processEvent=a),r=!0}catch(t){Pv.error(Fv+e.id,t),i(!1)}if(r&&t.loaded)try{n()}catch(n){Pv.error(`Error while processing buffered events PostHog app with config id `+e.id,n),t.errored=!0}}El(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Il(e){var t=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(e),r=function(r){try{t.Tl((()=>r.processEvent==null?void 0:r.processEvent(n)))}catch(t){Pv.error(`Error while processing event `+e.event+` for site app `+r.id,t)}};for(var i of Object.values(this.apps))r(i)}}onRemoteConfig(e){var t,n,r,i=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.El(),void this._instance.on(`eventCaptured`,(e=>this.Il(e)))):void Pv.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`);if((n=this.kl)==null||n.call(this),e.ok){var a=e.config;if((r=a.siteApps)!=null&&r.length){if(this.isEnabled){var o=function(){var e,t=s.id,n=s.url;R[`__$$ph_site_app_`+t]=i._instance,(e=R.__PosthogExtensions__)==null||e.loadSiteApp==null||e.loadSiteApp(i._instance,n,(e=>{if(e)return Pv.error(Fv+t,e)}))};for(var s of a.siteApps)o()}else Pv.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`)}}}}},hy={tracingHeaders:class{constructor(e){this.Pl=void 0,this.Rl=void 0,this.Al=void 0,this.Zo=()=>{var e,t,n=this.Fl();n?(V(this.Pl)&&(this.Pl=(e=R.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null?void 0:e._patchXHR(n,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),V(this.Rl)&&(this.Rl=(t=R.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null?void 0:t._patchFetch(n,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.Xo()},this._instance=e}initialize(){this.startIfEnabledOrStop()}ai(e){var t,n;(t=R.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns?e():(n=R.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,`tracing-headers`,(t=>{if(t)return bv.error(`failed to load script`,t);
4e()}))}Ll(){return this._instance.config.tracing_headers??this._instance.config.addTracingHeaders??this._instance.config.__add_tracing_headers}Fl(){var e=this.Ll();return B(e)?(B(this.Al)?this.Al.splice(0,this.Al.length,...e):this.Al=[...e],e.length>0?this.Al:void 0):(B(this.Al)&&this.Al.splice(0),this.Al=e||void 0,this.Al)}Xo(){var e,t;(e=this.Pl)==null||e.call(this),(t=this.Rl)==null||t.call(this),this.Pl=void 0,this.Rl=void 0}startIfEnabledOrStop(){this.Fl()?this.ai(this.Zo):this.Xo()}}},gy=z({surveys:class{get Ne(){return this._instance.config}constructor(e){this.Ol=void 0,this._surveyManager=null,this.Dl=!1,this.$l=[],this.Nl=null,this.ql=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Ne.disable_surveys){if(!e.ok)return z_.warn(`Remote config unavailable. Not loading surveys.`);var t=e.config.surveys;if(H(t))return z_.warn(`Flags not loaded yet. Not loading surveys.`);var n=B(t);this.Ol=n?t.length>0:t,z_.info(`flags response received, isSurveysEnabled: `+this.Ol),this.loadIfEnabled()}}reset(){try{var e;(e=this._surveyEventReceiver)==null||e.reset(),localStorage.removeItem(`lastSeenSurveyDate`);for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(B_)||r!=null&&r.startsWith(`inProgressSurvey_`))&&t.push(r)}t.forEach((e=>localStorage.removeItem(e)))}catch{}}loadIfEnabled(){if(!this._surveyManager){if(this.Dl)z_.info(`Already initializing surveys, skipping...`);else if(this.Ne.disable_surveys)z_.info(Vv);else if(this.Ne.cookieless_mode&&this._instance.consent.isOptedOut())z_.info(`Not loading surveys in cookieless mode without consent.`);else{var e=R?.__PosthogExtensions__;if(e){if(!V(this.Ol)||this.Ne.advanced_enable_surveys){var t=this.Ol||this.Ne.advanced_enable_surveys;this.Dl=!0;try{var n=e.generateSurveys;if(n)return void this.jl(n,t);var r=e.loadExternalDependency;if(!r)return void this.Bl(qp);r(this._instance,`surveys`,(n=>{n||!e.generateSurveys?this.Bl(`Could not load surveys script`,n):this.jl(e.generateSurveys,t)}))}catch(e){throw this.Bl(`Error initializing surveys`,e),e}finally{this.Dl=!1}}}else z_.error(`PostHog Extensions not found.`)}}}jl(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new zv(this._instance),z_.info(`Surveys loaded successfully`),this.Hl({isLoaded:!0})}Bl(e,t){z_.error(e,t),this.Hl({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.$l.push(e),this._surveyManager&&this.Hl({isLoaded:!0}),()=>{this.$l=this.$l.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this.Ne.disable_surveys)return z_.info(Vv),e([]);var n,r=this._instance.get_property(Tp);if(r&&!t)return e(r,{isLoaded:!0}),void(this.Ul()&&this.getSurveys((()=>{}),!0));typeof Promise<`u`&&this.Nl?this.Nl.then((t=>e(t.surveys,t.context))):(typeof Promise<`u`&&(this.Nl=new Promise((e=>{n=e}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/surveys/?token=`+this.Ne.token),method:`GET`,timestampMode:`query`,timeout:this.Ne.surveys_request_timeout_ms,callback:t=>{var r;this.Nl=null;var i=t.statusCode;if(i!==200||!t.json){var a=`Surveys API could not be loaded, status: `+i;i===0?t.error||z_.warn(a):z_.error(a),this.ql=Date.now();var o={isLoaded:!1,error:a};e([],o),n?.({surveys:[],context:o});return}this.ql=null;var s,c=t.json.surveys||[],l=c.filter((e=>function(e){return!(!e.start_date||e.end_date)}(e)&&(R_(e)||function(e){var t;return!((t=e.conditions)==null||(t=t.actions)==null||(t=t.values)==null||!t.length)}(e))));l.length>0&&((s=this._surveyEventReceiver)==null||s.register(l)),(r=this._instance.persistence)==null||r.register({[Tp]:c,[Ep]:Date.now()});var u={isLoaded:!0};e(c,u),n?.({surveys:c,context:u})}}))}Ul(){return this.zl()&&!this.Nl&&!this.Wl()}zl(){var e=this._instance.get_property(Ep);return Cu(e)&&Date.now()-e>3e5}Wl(){return Cu(this.ql)&&3e5>Date.now()-this.ql}markSurveyAsSeen(e,t){V_({id:e,current_iteration:t?.iteration??null});try{localStorage.setItem(`lastSeenSurveyDate`,new Date().toISOString())}catch{}}Hl(e){for(var t of this.$l)try{if(!e.isLoaded)return t([],e);
4this.getSurveys(t)}catch(e){z_.error(`Error in survey callback`,e)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!H(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);z_.warn(`init was not called`)}Vl(e){var t=null;return this.getSurveys((n=>{t=n.find((t=>t.id===e))??null})),t}Zl(e){if(H(this._surveyManager))return{eligible:!1,reason:Bv};var t=typeof e==`string`?this.Vl(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:`Survey not found`}}Gl(e){if(H(this._surveyManager))return{eligible:!1,reason:Bv};var t=typeof e==`string`?this.Vl(e):e;return t?this._surveyManager.checkSurveyRenderability(t):{eligible:!1,reason:`Survey not found`}}canRenderSurvey(e){if(H(this._surveyManager))return z_.warn(`init was not called`),{visible:!1,disabledReason:Bv};var t=this.Gl(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return H(this._surveyManager)?(z_.warn(`init was not called`),Promise.resolve({visible:!1,disabledReason:Bv})):new Promise((n=>{this.getSurveys((t=>{var r=t.find((t=>t.id===e))??null;if(r){var i=this.Gl(r);n({visible:i.eligible,disabledReason:i.reason})}else n({visible:!1,disabledReason:`Survey not found`})}),t)}))}renderSurvey(e,t,n){var r;if(H(this._surveyManager))z_.warn(`init was not called`);else{var i=typeof e==`string`?this.Vl(e):e;if(i!=null&&i.id){if(H_.includes(i.type)){var a=L?.querySelector(t);if(a)return(r=i.appearance)!=null&&r.surveyPopupDelaySeconds?(z_.info(`Rendering survey `+i.id+` with delay of `+i.appearance.surveyPopupDelaySeconds+` seconds`),void setTimeout((()=>{var e;z_.info(`Rendering survey `+i.id+` with delay of `+i.appearance?.surveyPopupDelaySeconds+` seconds`),(e=this._surveyManager)==null||e.renderSurvey(i,a,n),z_.info(`Survey `+i.id+` rendered`)}),1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,a,n);z_.warn(`Survey element not found`)}else z_.warn(`Surveys of type `+i.type+` cannot be rendered in the app`)}else z_.warn(`Survey not found`)}}displaySurvey(e,t){var n;if(H(this._surveyManager))z_.warn(`init was not called`);else{var r=this.Vl(e);if(r){var i=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=z({},r,{appearance:z({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==hg.Popover&&t.initialResponses&&z_.warn(`initialResponses is only supported for popover surveys. prefill will not be applied.`),!1===t.ignoreConditions){var a=this.Zl(r);if(!a.eligible)return void z_.warn(`Survey is not eligible to be displayed: `,a.reason)}t.displayType===hg.Inline?this.renderSurvey(i,t.selector,t.properties):this._surveyManager.handlePopoverSurvey(i,t)}else z_.warn(`Survey not found`)}}cancelPendingSurvey(e){H(this._surveyManager)?z_.warn(`init was not called`):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload==null||e.handlePageUnload()}}},ly),_y={toolbar:class{constructor(e){this.instance=e}Ql(e){R.ph_toolbar_state=e}Kl(){return R.ph_toolbar_state??0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),hm(this.instance.config)||!I||!L)return!1;e??=I.location,n??=I.history;try{if(!t){try{I.localStorage.setItem(`test`,`test`),I.localStorage.removeItem(`test`)}catch{return!1}t=I?.localStorage}var r,i=Hv||Vh(e.hash,`__posthog`)||Vh(e.hash,`state`),a=i?lm((()=>JSON.parse(atob(decodeURIComponent(i)))))||lm((()=>JSON.parse(decodeURIComponent(i)))):null;return a&&a.action===`ph_authorize`?((r=a).source=`url`,r&&Object.keys(r).length>0&&(a.desiredHash?e.hash=a.desiredHash:n?n.replaceState(n.state,``,e.pathname+e.search):e.hash=``)):((r=JSON.parse(t.getItem(Uv)||`{}`)).source=`localstorage`,delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}Jl(e){var t=R.ph_load_toolbar||R.ph_load_editor;!H(t)&&_u(t)?t(e,this.instance):Wv.warn(`No toolbar load function found`)}loadToolbar(e){var t=!(L==null||!L.getElementById(Im));if(!I||t)return!1;var n=this.instance.requestRouter.region===`custom`&&this.instance.config.advanced_disable_toolbar_metrics,r=z({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor(`ui`)},n?{instrument:!1}:{});if(I.localStorage.setItem(Uv,JSON.stringify(z({},r,{source:void 0}))),this.Kl()===2)this.Jl(r);else if(this.Kl()===0){var i;this.Ql(1),(i=R.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,`toolbar`,(e=>{if(e)return Wv.error(`[Toolbar] Failed to load`,e),void this.Ql(0);this.Ql(2),this.Jl(r)})),mm(I,`turbolinks:load`,(()=>{this.Ql(0),this.loadToolbar(r)}))}return!0}Yl(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},vy=z({experiments:ny},ly),yy=z({},ly,uy,dy,fy,py,my,gy,hy,_y,vy,{conversations:class{constructor(e){this.Xl=void 0,this._conversationsManager=null,this.tu=!1,this.eu=null,this.iu=!1,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations&&(this.ru=e.ok,e.ok)){var t=e.config.conversations;H(t)||(Tu(t)?this.Xl=t:(this.Xl=t.enabled,this.eu=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Xl=void 0,this.eu=null,this.ru=void 0,this.iu=!1}loadIfEnabled(){if(!(this._conversationsManager||this.tu||this._instance.config.disable_conversations||hm(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=R?.__PosthogExtensions__;if(e&&!V(this.Xl)&&this.Xl){if(this.eu&&this.eu.token){this.tu=!0;try{var t=e.initConversations;if(t)return this.nu(t),void(this.tu=!1);var n=e.loadExternalDependency;if(!n)return void this.su(qp);n(this._instance,`conversations`,(t=>{t||!e.initConversations?this.su(`Could not load conversations script`,t):this.nu(e.initConversations),this.tu=!1}))}catch(e){this.su(`Error initializing conversations`,e),this.tu=!1}}else ry.error(`Conversations enabled but missing token in remote config.`)}}}nu(e){if(this.eu)try{this._conversationsManager=e(this.eu,this._instance),this.iu=!1,ry.info(`Conversations loaded successfully`)}
4catch(e){this.su(`Error completing conversations initialization`,e)}else ry.error(`Cannot complete initialization: remote config is null`)}su(e,t){ry.error(e,t),this._conversationsManager=null,this.tu=!1,this.iu=!0}show(){this._conversationsManager?this._conversationsManager.show():ry.warn(`Conversations not loaded yet.`)}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.Xl&&!Su(this._conversationsManager)}getUnavailableReason(){return this.isAvailable()?null:this._instance.config.disable_conversations?`disabled_by_config`:hm(this._instance.config)?`disabled_for_toolbar`:this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut()?`consent_opted_out`:!1===this.ru?`remote_config_failed`:V(this.Xl)?this.ru?`disabled_in_project`:`remote_config_pending`:this.Xl?H(this.eu)||!this.eu.token?`missing_token`:R!=null&&R.__PosthogExtensions__?this.tu?`initializing`:this.iu?`load_failed`:`not_loaded`:`extensions_unavailable`:`disabled_in_project`}isVisible(){var e;return(e=this._conversationsManager?.isVisible())!=null&&e}sendMessage(e,t,n){var r=this;return Wl((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(ry.warn(iy),null)}))()}getMessages(e,t){var n=this;return Wl((function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(ry.warn(iy),null)}))()}markAsRead(e){var t=this;return Wl((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(ry.warn(iy),null)}))()}getTickets(e){var t=this;return Wl((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(ry.warn(iy),null)}))()}requestRestoreLink(e){var t=this;return Wl((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(ry.warn(iy),null)}))()}restoreFromToken(e){var t=this;return Wl((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(ry.warn(iy),null)}))()}restoreFromUrlToken(){var e=this;return Wl((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(ry.warn(iy),null)}))()}getCurrentTicketId(){return this._conversationsManager?.getCurrentTicketId()??null}getWidgetSessionId(){return this._conversationsManager?.getWidgetSessionId()??null}ns(){var e;(e=this._conversationsManager)==null||e.setIdentity()}ss(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},{logs:class{constructor(e){var t,n=this;this.au=!1,this.ou=!1,this.rt=Uf(`[logs]`),this.lu=z({},this.rt,{error(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];t.some(cy)||n.rt.error(...t)}}),this.tr=[],this.uu=[],this.Ea=0,this.hu=()=>{var e,t;this.Ea=0,(e=this.du)==null||e.onReconnect(),(t=this.vu)==null||t.onReconnect()},this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.au=!0),I&&mm(I,`online`,this.hu)}cu(e,t,n,r){var i,a=function(e,t){var n=e?.flushIntervalMs??3e3,r=e?.maxBufferSize??100,i=t!=null&&t.consoleCapture?void 0:e?.maxLogsPerInterval??1e3,a=V(i)?Math.max(r,2048):Math.max(r,i),o=e?.resourceAttributes;return{serviceName:o?.[`service.name`]??e?.serviceName??t?.serviceNameDefault,serviceVersion:o?.[`service.version`]??e?.serviceVersion,environment:o?.[`deployment.environment`]??e?.environment,resourceAttributes:o,beforeSend:e?.beforeSend,flushIntervalMs:n,maxBufferSize:r,maxQueueSize:a,maxBatchRecordsPerPost:100,rateCapWindowMs:n,maxLogsPerInterval:i,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}((i=this._instance)==null||(i=i.config)==null?void 0:i.logs,n);return[new nf(this.fu(e,t),a,this.lu,(()=>this.pu()),(e=>e()),void 0,r),a]}gu(){var e,t=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;if(!this.du||this.mu!==t){var n;(n=this.du)==null||n.reset(),this.mu=t;var r=this.cu((()=>this.tr),(e=>{this.tr=e}));this.du=r[0],this.yu=r[1]}return this.du}bu(){var e,t=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;if(!this.vu||this._u!==t){var n;(n=this.vu)==null||n.reset(),this._u=t;var r=this.cu((()=>this.uu),(e=>{this.uu=e}),{serviceNameDefault:`posthog-browser-logs`,consoleCapture:!0},ay);this.vu=r[0],this.wu=r[1]}return this.vu}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(e.ok){var t=e.config.logs?.captureConsoleLogs;!H(t)&&t&&(this.au=!0,this.loadIfEnabled())}}reset(){var e,t;this.tr=[],(e=this.du)==null||e.reset(),this.uu=[],(t=this.vu)==null||t.reset(),this.Ea=0}captureLog(e){this.gu().captureLog(e)}he(e){this.bu().captureLog(e)}get logger(){return this.ku||={trace:(e,t)=>this.captureLog({body:e,level:`trace`,attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:`debug`,attributes:t}),info:(e,t)=>this.captureLog({body:e,level:`info`,attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:`warn`,attributes:t}),error:(e,t)=>
4this.captureLog({body:e,level:`error`,attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:`fatal`,attributes:t})},this.ku}flushLogs(e){e?this.xu(e):(this.du&&this.du.flush().catch((e=>this.Su(e))),this.vu&&this.vu.flush().catch((e=>this.Su(e))))}Su(e){cy(e)||this.rt.error(`PostHog logs flush failed:`,e)}loadIfEnabled(){if(this.au&&!this.ou){var e=R?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,`logs`,(t=>{var n;t||(n=e.logs)==null||!n.initializeLogs?this.rt.error(`Could not load logs script`,t):(e.logs.initializeLogs(this._instance),this.ou=!0)})):this.rt.error(qp)}else this.rt.error(`PostHog Extensions not found.`)}}fu(e,t){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:t=>t===Zl.LogsQueue?e():void 0,setPersistedProperty(e,n){e===Zl.LogsQueue&&t(n??[])},Ot:e=>this.Ot(e),getLibraryId:()=>Hl.LIB_NAME,getLibraryVersion:()=>Hl.LIB_VERSION}}Ot(e){return new Promise((t=>{if(Hh(this.Ea,3))t({kind:`fatal`,error:sy(void 0,`logs endpoint is unreachable, dropping batch`)});else{var n=!1,r=e=>{n||(n=!0,clearTimeout(i),t(e))},i=setTimeout((()=>{this.rt.warn(`Logs request timed out before receiving a response`),r({kind:`retry-later`,error:sy(void 0,`logs request timed out`)})}),9e4);this._instance._send_request({method:`POST`,url:this.Cu(),data:e,compression:`best-available`,batchKey:`logs`,fireCallbackOnDrop:!0,callback:e=>{var t=e.statusCode;this.Mu(t),t>=200&&300>t?r({kind:`ok`}):t===413?r({kind:`too-large`}):t!==0&&t!==429&&500>t?r({kind:`fatal`,error:Error(`logs request failed with status `+t)}):t===0?(e.error||this.rt.warn(`Logs request failed before receiving an HTTP response`),r({kind:`retry-later`,error:sy(e.error,`logs request failed before receiving an HTTP response`)})):r({kind:`retry-later`,error:e.error??Error(`logs request failed with status `+t)})}})}}))}Mu(e){(e!==0||this._instance.__loaded)&&(this.Ea=Uh(e,this.Ea,3,(()=>this.rt.warn(`Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes.`))))}xu(e){this.tr.length>0&&this.Tu(e,this.tr,this.yu,Hl.LIB_NAME,(e=>{this.tr=e})),this.uu.length>0&&this.Tu(e,this.uu,this.wu,ay,(e=>{this.uu=e}))}Tu(e,t,n,r,i){if(t.length!==0){var a=t.map((e=>e.record));i([]);var o=tf(a,ef(n,Hl.LIB_NAME,Hl.LIB_VERSION),r,Hl.LIB_VERSION);this._instance._send_request({method:`POST`,url:this.Cu(),data:o,compression:`best-available`,batchKey:`logs`,transport:e})}}Cu(){return this._instance.requestRouter.endpointFor(`api`,`/i/v1/logs`)+`?token=`+encodeURIComponent(this._instance.config.token)}pu(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var n=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0),r=n.windowId,i=n.sessionStartTimestamp,a=n.lastActivityTimestamp;t.sessionId=n.sessionId,t.windowId=r,H(i)||(t.sessionStartTimestamp=i),H(a)||(t.lastActivityTimestamp=a)}if(R!=null&&(e=R.location)!=null&&e.href&&(t.currentUrl=this._instance.config.disable_capture_url_hashes?Wd(R.location.href):R.location.href),this._instance.featureFlags){var o=this._instance.featureFlags.getFlags();o&&o.length>0&&(t.activeFeatureFlags=o)}return t}}},{metrics:class{constructor(e){this.rt=Uf(`[metrics]`),this._instance=e}initialize(){}gu(){var e,t,n=(e=this._instance)==null||(e=e.config)==null?void 0:e.metrics;return this.du&&this.mu===n||((t=this.du)==null||t.reset(),this.mu=n,this.du=new sf(this.fu(),function(e){var t=e?.resourceAttributes;return{serviceName:t?.[`service.name`]??e?.serviceName,serviceVersion:t?.[`service.version`]??e?.serviceVersion,environment:t?.[`deployment.environment`]??e?.environment,resourceAttributes:t,beforeSend:e?.beforeSend,flushIntervalMs:e?.flushIntervalMs??1e4,maxSeriesPerFlush:e?.maxSeriesPerFlush??1e3}}(n),this.rt)),this.du}count(e,t,n){t===void 0&&(t=1),this.gu().count(e,t,n)}gauge(e,t,n){this.gu().gauge(e,t,n)}histogram(e,t,n){this.gu().histogram(e,t,n)}flush(e){if(!this.du)return Promise.resolve();if(e){var t=this.du.drainWindow();return t&&this.Jt(t,e),Promise.resolve()}return this.du.flush().catch((e=>this.rt.error(`PostHog metrics flush failed:`,e)))}reset(){var e;(e=this.du)==null||e.reset()}fu(){var e=this._instance,t=this;return{get isDisabled(){return!1},get optedOut(){return!e.is_capturing()},Jt:e=>t.Jt(e),getLibraryId:()=>Hl.LIB_NAME,getLibraryVersion:()=>Hl.LIB_VERSION}}Jt(e,t){return new Promise((n=>{var r=!1,i=e=>{r||(r=!0,clearTimeout(a),n(e))},a=setTimeout((()=>i({kind:`retry-later`,error:Error(`metrics request timed out`)})),9e4);this._instance._send_request(z({method:`POST`,url:this.Eu(),data:e,compression:`best-available`,batchKey:`metrics`},t&&{transport:t},{fireCallbackOnDrop:!0,callback(e){var t=e.statusCode;i(t>=200&&300>t?{kind:`ok`}:t===413?{kind:`too-large`}:t!==0&&t!==429&&500>t?{kind:`fatal`,error:Error(`metrics request failed with status `+t)}
vendor: 7,855 bytes, line 4
4:{kind:`retry-later`,error:e.error??Error(`metrics request failed with status `+t)})}}))}))}Eu(){return this._instance.requestRouter.endpointFor(`api`,`/i/v1/metrics`)+`?token=`+encodeURIComponent(this._instance.config.token)}}});dv.__defaultExtensionClasses=z({},yy);var by=function(){Hl.SDK_DIST_CHANNEL=`npm`;var e=Z_[av]=new dv;return function(){function e(){e.done||(e.done=!0,ov=!1,om(Z_,(function(e){e._dom_loaded()})))}L!=null&&L.addEventListener?L.readyState===`complete`?e():mm(L,`DOMContentLoaded`,e,{capture:!1}):I&&U.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),e}(),xy=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&O(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&O(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=ee,D=function(){ne.postMessage(null)}}else D=function(){_(ee,0)};function O(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,O(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Sy=t(((e,t)=>{t.exports=xy()})),Cy=t((e=>{var t=Sy(),n=ie(),i=r();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),te=Symbol.iterator;function ne(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var O=Symbol.for(`react.client.reference`);function re(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var k=Array.isArray,A=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},se=[],ce=-1;function le(e){return{current:e}}function j(e){0>ce||(e.current=se[ce],se[ce]=null,ce--)}function ue(e,t){ce++,se[ce]=e.current,e.current=t}var de=le(null),fe=le(null),pe=le(null),me=le(null);function he(e,t){switch(ue(pe,t),ue(fe,e),ue(de,null),t.nodeType){case 9:case 11:e=(e
vendor: 103,642 bytes, lines 4-11
4=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}j(de),ue(de,e)}function ge(){j(de),j(fe),j(pe)}function _e(e){e.memoizedState!==null&&ue(me,e);var t=de.current,n=Qd(t,e.type);t!==n&&(ue(fe,e),ue(de,n))}function M(e){fe.current===e&&(j(de),j(fe)),me.current===e&&(j(me),sp._currentValue=oe)}var ve,N;function ye(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,N=-1<e.stack.indexOf(`
5    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
6`+ve+e+N}var be=!1;function xe(e,t){if(!e||be)return``;be=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
7`),l=s.split(`
8`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
9`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{be=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ye(n):``}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return ye(e.type);case 16:return ye(`Lazy`);case 13:return e.child!==t&&t!==null?ye(`Suspense Fallback`):ye(`Suspense`);case 19:return ye(`SuspenseList`);case 0:case 15:return xe(e.type,!1);case 11:return xe(e.type.render,!1);case 1:return xe(e.type,!0);case 31:return ye(`Activity`);default:return``}}function Ce(e){try{var t=``,n=null;do t+=Se(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
10Error generating stack: `+e.message+`
11`+e.stack}}var we=Object.prototype.hasOwnProperty,Te=t.unstable_scheduleCallback,Ee=t.unstable_cancelCallback,De=t.unstable_shouldYield,Oe=t.unstable_requestPaint,ke=t.unstable_now,Ae=t.unstable_getCurrentPriorityLevel,je=t.unstable_ImmediatePriority,Me=t.unstable_UserBlockingPriority,Ne=t.unstable_NormalPriority,Pe=t.unstable_LowPriority,Fe=t.unstable_IdlePriority,Ie=t.log,Le=t.unstable_setDisableYieldValue,Re=null,ze=null;function Be(e){if(typeof Ie==`function`&&Le(e),ze&&typeof ze.setStrictMode==`function`)try{ze.setStrictMode(Re,e)}catch{}}var Ve=Math.clz32?Math.clz32:Ue,He=Math.log,P=Math.LN2;function Ue(e){return e>>>=0,e===0?32:31-(He(e)/P|0)|0}var We=256,Ge=262144,Ke=4194304;function qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Je(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=qe(n))):i=qe(o):i=qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=qe(n))):i=qe(o)):i=qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ze(){var e=Ke;return Ke<<=1,!(Ke&62914560)&&(Ke=4194304),e}function Qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $e(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function et(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ve(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&tt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function tt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ve(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function nt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ve(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function rt(e,t){var n=t&-t;return n=n&42?1:it(n),(n&(e.suspendedLanes|t))===0?n:0}function it(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function at(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ot(){var e=ae.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function st(e,t){var n=ae.p;try{return ae.p=e,t()}finally{ae.p=n}}var ct=Math.random().toString(36).slice(2),lt=`__reactFiber$`+ct,ut=`__reactProps$`+ct,dt=`__reactContainer$`+ct,ft=`__reactEvents$`+ct,pt=`__reactListeners$`+ct,mt=`__reactHandles$`+ct,ht=`__reactResources$`+ct,gt=`__reactMarker$`+ct;function _t(e){delete e[lt],delete e[ut],delete e[ft],delete e[pt],delete e[mt]}function vt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xf(e);e!==null;){if(n=e[lt])return n;e=xf(e)}return t}e=n,n=e.parentNode}return null}function yt(e){if(e=e[lt]||e[dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function xt(e){var t=e[ht];return t||=e[ht]={hoistableStyles:new Map,hoistableScripts:new Map},t}function St(e){e[gt]=!0}var Ct=new Set,wt={};function Tt(e,t){Et(e,t),Et(e+`Capture`,t)}function Et(e,t){for(wt[e]=t,e=0;e<t.length;e++)Ct.add(t[e])}var Dt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Ot={},kt={};function At(e){return we.call(kt,e)?!0:we.call(Ot,e)?!1:Dt.test(e)?kt[e]=!0:(Ot[e]=!0,!1)}function jt(e,t,n){if(At(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function Mt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Nt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Pt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ft(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function It(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lt(e){if(!e._valueTracker){var t=Ft(e)?`checked`:`value`;e._valueTracker=It(e,t,``+e[t])}}function Rt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ft(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function zt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Bt=/[\n"\\]/g;function Vt(e){return e.replace(Bt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ht(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Pt(t)):e.value!==``+Pt(t)&&(e.value=``+Pt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Wt(e,o,Pt(n)):Wt(e,o,Pt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Pt(s):e.removeAttribute(`name`)}function Ut(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Lt(e);return}n=n==null?``:``+Pt(n),t=t==null?n:``+Pt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Lt(e)}function Wt(e,t,n){t===`number`&&zt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Gt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Pt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Kt(e,t,n){if(t!=null&&(t=``+Pt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Pt(n)}function qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(k(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Pt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Lt(e)}function Jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Xt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Yt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Zt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Xt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Xt(e,o,t[o])}function Qt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var $t=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),en=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function tn(e){return en.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function nn(){}var rn=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,sn=null;function cn(e){var t=yt(e);if(t&&(e=t.stateNode)){var n=e[ut]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ht(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Vt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ut]||null;if(!i)throw Error(a(90));Ht(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Rt(r)}break a;case`textarea`:Kt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Gt(e,!!n.multiple,t,!1)}}}var ln=!1;function un(e,t,n){if(ln)return e(t,n);ln=!0;try{return e(t)}finally{if(ln=!1,(on!==null||sn!==null)&&(Du(),on&&(t=on,e=sn,sn=on=null,cn(t),e)))for(t=0;t<e.length;t++)cn(e[t])}}function dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ut]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var fn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,"passive",{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return _n=i.slice(e,1<r?1-r:void 0)}function yn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bn(){return!0}function xn(){return!1}function F(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?bn:xn,this.isPropagationStopped=xn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=bn)},persist:function(){},isPersistent:bn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cn=F(Sn),wn=p({},Sn,{view:0,detail:0}),Tn=F(wn),En,Dn,On,kn=p({},wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==On&&(On&&e.type===`mousemove`?(En=e.screenX-On.screenX,Dn=e.screenY-On.screenY):Dn=En=0,On=e),En)},movementY:function(e){return`movementY`in e?e.movementY:Dn}}),An=F(kn),jn=F(p({},kn,{dataTransfer:0})),Mn=F(p({},wn,{relatedTarget:0})),Nn=F(p({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=F(p({},Sn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=F(p({},Sn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=F(p({},wn,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=yn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?yn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?yn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=F(p({},kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=F(p({},wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=F(p({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=F(p({},kn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Kn=F(p({},Sn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=fn&&`CompositionEvent`in window,Yn=null;fn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=fn&&`TextEvent`in window&&!Yn,Zn=fn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=vn(),_n=gn=hn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Zn&&t.locale!==`ko`?null:t.data;default:return null}}var ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){on?sn?sn.push(r):sn=[r]:on=r,t=Fd(t,`onChange`),0<t.length&&(n=new Cn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){Dd(e,0)}function dr(e){if(Rt(bt(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(fn){var mr;if(fn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,an(e)),un(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!we.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=zt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=fn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==zt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Fd(Nr,`onSelect`),0<r.length&&(t=new Cn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Rr={animationend:Lr(`Animation`,`AnimationEnd`),animationiteration:Lr(`Animation`,`AnimationIteration`),animationstart:Lr(`Animation`,`AnimationStart`),transitionrun:Lr(`Transition`,`TransitionRun`),transitionstart:Lr(`Transition`,`TransitionStart`),transitioncancel:Lr(`Transition`,`TransitionCancel`),transitionend:Lr(`Transition`,`TransitionEnd`)},zr={},Br={};fn&&(Br=document.createElement(`div`).style,`AnimationEvent`in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),`TransitionEvent`in window||delete Rr.transitionend.transition);function Vr(e){if(zr[e])return zr[e];if(!Rr[e])return e;var t=Rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Br)return zr[e]=t[n];return e}var Hr=Vr(`animationend`),Ur=Vr(`animationiteration`),Wr=Vr(`animationstart`),Gr=Vr(`transitionrun`),Kr=Vr(`transitionstart`),qr=Vr(`transitioncancel`),Jr=Vr(`transitionend`),Yr=new Map,Xr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Xr.push(`scrollEnd`);function Zr(e,t){Yr.set(e,t),Tt(t,[e])}var Qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},$r=[],ei=0,ti=0;function ni(){for(var e=ei,t=ti=ei=0;t<e;){var n=$r[t];$r[t++]=null;var r=$r[t];$r[t++]=null;var i=$r[t];$r[t++]=null;var a=$r[t];if($r[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&oi(n,i,a)}}function ri(e,t,n,r){$r[ei++]=e,$r[ei++]=t,$r[ei++]=n,$r[ei++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),si(e)}function ai(e,t){return ri(e,null,null,t),si(e)}function oi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ve(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function si(e){if(50<V)throw V=0,bu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function li(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(e,t,n,r){return new li(e,t,n,r)}function di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var n=e.alternate;return n===null?(n=ui(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function pi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mi(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)di(e)&&(s=1);else if(typeof e==`string`)s=Qf(e,n,de.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=ui(31,n,t,i),e.elementType=ee,e.lanes=o,e;case _:return hi(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=ui(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case C:return e=ui(13,n,t,i),e.elementType=C,e.lanes=o,e;case w:return e=ui(19,n,t,i),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=ui(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function hi(e,t,n,r){return e=ui(7,e,r,t),e.lanes=n,e}function gi(e,t,n){return e=ui(6,e,null,t),e.lanes=n,e}function _i(e){var t=ui(18,null,null,0);return t.stateNode=e,t}function vi(e,t,n){return t=ui(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yi=new WeakMap;function bi(e,t){if(typeof e==`object`&&e){var n=yi.get(e);return n===void 0?(t={value:e,source:t,stack:Ce(t)},yi.set(e,t),t):n}return{value:e,source:t,stack:Ce(t)}}var xi=[],Si=0,Ci=null,wi=0,Ti=[],Ei=0,Di=null,Oi=1,ki=``;function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ci,Ci=e,wi=t}function ji(e,t,n){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Di=e;var r=Oi;e=ki;var i=32-Ve(r)-1;r&=~(1<<i),n+=1;var a=32-Ve(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Oi=1<<32-Ve(t)+i|n<<i|r,ki=a+e}else Oi=1<<a|n<<i|r,ki=e}function Mi(e){e.return!==null&&(Ai(e,1),ji(e,1,0))}function Ni(e){for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null;for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,ki=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null}function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Oi=t.id,ki=t.overflow,Di=e}var Fi=null,Ii=null,Li=!1,Ri=null,zi=!1,Bi=Error(a(519));function Vi(e){throw qi(bi(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Bi}function Hi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[lt]=e,t[ut]=r,n){case`dialog`:Od(`cancel`,t),Od(`close`,t);break;case`iframe`:case`object`:case`embed`:Od(`load`,t);break;case`video`:case`audio`:for(n=0;n<Td.length;n++)Od(Td[n],t);break;case`source`:Od(`error`,t);break;case`img`:case`image`:case`link`:Od(`error`,t),Od(`load`,t);break;case`details`:Od(`toggle`,t);break;case`input`:Od(`invalid`,t),Ut(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Od(`invalid`,t);break;case`textarea`:Od(`invalid`,t),qt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Vd(t.textContent,n)?(r.popover!=null&&(Od(`beforetoggle`,t),Od(`toggle`,t)),r.onScroll!=null&&Od(`scroll`,t),r.onScrollEnd!=null&&Od(`scrollend`,t),r.onClick!=null&&(t.onclick=nn),t=!0):t=!1,t||Vi(e,!0)}function Ui(e){for(Fi=e.return;Fi;)switch(Fi.tag){case 5:case 31:case 13:zi=!1;return;case 27:case 3:zi=!0;return;default:Fi=Fi.return}}function Wi(e){if(e!==Fi)return!1;if(!Li)return Ui(e),Li=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||$d(e.type,e.memoizedProps)),n=!n),n&&Ii&&Vi(e),Ui(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ii=bf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ii=bf(e)}else t===27?(t=Ii,cf(e.type)?(e=yf,yf=null,Ii=e):Ii=t):Ii=Fi?vf(e.stateNode.nextSibling):null;return!0}function Gi(){Ii=Fi=null,Li=!1}function Ki(){var e=Ri;return e!==null&&(su===null?su=e:su.push.apply(su,e),Ri=null),e}function qi(e){Ri===null?Ri=[e]:Ri.push(e)}var Ji=le(null),Yi=null,Xi=null;function Zi(e,t,n){ue(Ji,t._currentValue),t._currentValue=n}function Qi(e){e._currentValue=Ji.current,j(Ji)}function $i(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ea(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),$i(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),$i(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function ta(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;wr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===me.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[sp]:e.push(sp))}i=i.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Yi=e,Xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Yi,e)}function aa(e,t){return Yi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Xi===null){if(e===null)throw Error(a(308));Xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xi=Xi.next=t;return n}var sa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function _a(e,t){if(pa===null){var n=pa=[];ma=0,ha=yd(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(va,va),t}function va(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ya(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ba=A.S;A.S=function(e,t){uu=ke(),typeof t==`object`&&t&&typeof t.then==`function`&&_a(e,t),ba!==null&&ba(e,t)};var xa=le(null);function Sa(){var e=xa.current;return e===null?Gl.pooledCache:e}function Ca(e,t){t===null?ue(xa,xa.current):ue(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:ua._currentValue,pool:e}}var Ta=Error(a(460)),Ea=Error(a(474)),Da=Error(a(542)),Oa={then:function(){}};function ka(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Aa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(nn,nn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e;default:if(typeof t.status==`string`)t.then(nn,nn);else{if(e=Gl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e}throw Ma=t,Ta}}function ja(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ma=e,Ta):e}}var Ma=null;function Na(){if(Ma===null)throw Error(a(459));var e=Ma;return Ma=null,e}function Pa(e){if(e===Ta||e===Da)throw Error(a(483))}var Fa=null,Ia=0;function La(e){var t=Ia;return Ia+=1,Fa===null&&(Fa=[]),Aa(Fa,e,t)}function Ra(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function za(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ba(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=gi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===E&&ja(a)===t.type)?(t=i(t,n.props),Ra(t,n),t.return=e,t):(t=mi(n.type,n.key,n.props,null,e.mode,r),Ra(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=vi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=hi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=gi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=mi(t.type,t.key,t.props,null,e.mode,n),Ra(n,t),n.return=e,n;case g:return t=vi(t,e.mode,n),t.return=e,t;case E:return t=ja(t),f(e,t,n)}if(k(t)||ne(t))return t=hi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,La(t),n);if(t.$$typeof===x)return f(e,aa(e,t),n);za(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case E:return n=ja(n),p(e,t,n,r)}if(k(n)||ne(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,La(n),r);if(n.$$typeof===x)return p(e,t,aa(e,n),r);za(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=ja(r),m(e,t,n,r,i)}if(k(r)||ne(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,La(r),i);if(r.$$typeof===x)return m(e,t,n,aa(t,r),i);za(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Li&&Ai(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Li&&Ai(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Li&&Ai(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Li&&Ai(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Li&&Ai(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Li&&Ai(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ja(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===_?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ja(o),b(e,r,o,c)}if(k(o))return v(e,r,o,c);if(ne(o)){if(l=ne(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,La(o),c);if(o.$$typeof===x)return b(e,r,aa(e,o),c);za(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=b(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(ql&f)===f:(r&f)===f){f!==0&&f===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ua=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),tu|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$a(n[e],t)}var to=le(null),no=le(0);function ro(e,t){e=$l,ue(no,e),ue(to,t),$l=e|t.baseLanes}function io(){ue(no,$l),ue(to,to.current)}function ao(){$l=no.current,j(to),j(no)}var oo=le(null),so=null;function co(e){var t=e.alternate;ue(mo,mo.current&1),ue(oo,e),so===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(so=e)}function lo(e){ue(mo,mo.current),ue(oo,e),so===null&&(so=e)}function uo(e){e.tag===22?(ue(mo,mo.current),ue(oo,e),so===null&&(so=e)):fo(e)}function fo(){ue(mo,mo.current),ue(oo,oo.current)}function po(e){j(oo),so===e&&(so=null),j(mo)}var mo=le(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hf(n)||gf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var go=0,_o=null,vo=null,yo=null,bo=!1,xo=!1,So=!1,Co=0,wo=0,To=null,Eo=0;function Do(){throw Error(a(321))}function Oo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function ko(e,t,n,r,i,a){return go=a,_o=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?Ks:qs,So=!1,a=n(r,i),So=!1,xo&&(a=jo(t,n,r,i)),Ao(e),a}function Ao(e){A.H=Gs;var t=vo!==null&&vo.next!==null;if(go=0,yo=vo=_o=null,bo=!1,wo=0,To=null,t)throw Error(a(300));e===null||uc||(e=e.dependencies,e!==null&&na(e)&&(uc=!0))}function jo(e,t,n,r){_o=e;var i=0;do{if(xo&&(To=null),wo=0,xo=!1,25<=i)throw Error(a(301));if(i+=1,yo=vo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}A.H=Js,o=t(n,r)}while(xo);return o}function Mo(){var e=A.H,t=e.useState()[0];return t=typeof t.then==`function`?zo(t):t,e=e.useState()[0],(vo===null?null:vo.memoizedState)!==e&&(_o.flags|=1024),t}function No(){var e=Co!==0;return Co=0,e}function Po(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Fo(e){if(bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bo=!1}go=0,yo=vo=_o=null,xo=!1,wo=Co=0,To=null}function Io(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yo===null?_o.memoizedState=yo=e:yo=yo.next=e,yo}function Lo(){if(vo===null){var e=_o.alternate;e=e===null?null:e.memoizedState}else e=vo.next;var t=yo===null?_o.memoizedState:yo.next;if(t!==null)yo=t,vo=e;else{if(e===null)throw _o.alternate===null?Error(a(467)):Error(a(310));vo=e,e={memoizedState:vo.memoizedState,baseState:vo.baseState,baseQueue:vo.baseQueue,queue:vo.queue,next:null},yo===null?_o.memoizedState=yo=e:yo=yo.next=e}return yo}function Ro(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zo(e){var t=wo;return wo+=1,To===null&&(To=[]),e=Aa(To,e,t),t=_o,(yo===null?t.memoizedState:yo.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?Ks:qs),e}function Bo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return zo(e);if(e.$$typeof===x)return ia(e)}throw Error(a(438,String(e)))}function Vo(e){var t=null,n=_o.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=_o.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Ro(),_o.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Ho(e,t){return typeof t==`function`?t(e):t}function Uo(e){return Wo(Lo(),vo,e)}function Wo(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(go&f)===f:(ql&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ha&&(d=!0);else if((go&p)===p){u=u.next,p===ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,_o.lanes|=p,tu|=p;f=u.action,So&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,_o.lanes|=f,tu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(uc=!0,d&&(n=ga,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Go(e){var t=Lo(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);wr(o,t.memoizedState)||(uc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ko(e,t,n){var r=_o,i=Lo(),o=Li;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!wr((vo||i).memoizedState,n);if(s&&(i.memoizedState=n,uc=!0),i=i.queue,_s(Yo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||yo!==null&&yo.memoizedState.tag&1){if(r.flags|=2048,fs(9,{destroy:void 0},Jo.bind(null,r,i,n,t),null),Gl===null)throw Error(a(349));o||go&127||qo(r,t,n)}return n}function qo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=_o.updateQueue,t===null?(t=Ro(),_o.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Jo(e,t,n,r){t.value=n,t.getSnapshot=r,Xo(t)&&Zo(e)}function Yo(e,t,n){return n(function(){Xo(t)&&Zo(e)})}function Xo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Zo(e){var t=ai(e,2);t!==null&&H(t,e,2)}function Qo(e){var t=Io();if(typeof e==`function`){var n=e;if(e=n(),So){Be(!0);try{n()}finally{Be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:e},t}function $o(e,t,n,r){return e.baseState=n,Wo(e,vo,typeof r==`function`?r:Ho)}function es(e,t,n,r,i){if(Hs(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};A.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ts(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ts(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=A.T,o={};A.T=o;try{var s=n(i,r),c=A.S;c!==null&&c(o,s),ns(e,t,s)}catch(n){is(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),A.T=a}}else try{a=n(i,r),ns(e,t,a)}catch(n){is(e,t,n)}}function ns(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){rs(e,t,n)},function(n){return is(e,t,n)}):rs(e,t,n)}function rs(e,t,n){t.status=`fulfilled`,t.value=n,as(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ts(e,n)))}function is(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,as(t),t=t.next;while(t!==r)}e.action=null}function as(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function os(e,t){return t}function ss(e,t){if(Li){var n=Gl.formState;if(n!==null){a:{var r=_o;if(Li){if(Ii){b:{for(var i=Ii,a=zi;i.nodeType!==8;){if(!a){i=null;break b}if(i=vf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ii=vf(i.nextSibling),r=i.data===`F!`;break a}}Vi(r)}r=!1}r&&(t=n[0])}}return n=Io(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:t},n.queue=r,n=zs.bind(null,_o,r),r.dispatch=n,r=Qo(!1),a=Vs.bind(null,_o,!1,r.queue),r=Io(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=es.bind(null,_o,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function cs(e){return ls(Lo(),vo,e)}function ls(e,t,n){if(t=Wo(e,t,os)[0],e=Uo(Ho)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=zo(t)}catch(e){throw e===Ta?Da:e}else r=t;t=Lo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(_o.flags|=2048,fs(9,{destroy:void 0},us.bind(null,i,n),null)),[r,a,e]}function us(e,t){e.action=t}function ds(e){var t=Lo(),n=vo;if(n!==null)return ls(t,n,e);Lo(),t=t.memoizedState,n=Lo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=_o.updateQueue,t===null&&(t=Ro(),_o.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ps(){return Lo().memoizedState}function ms(e,t,n,r){var i=Io();_o.flags|=e,i.memoizedState=fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function hs(e,t,n,r){var i=Lo();r=r===void 0?null:r;var a=i.memoizedState.inst;vo!==null&&r!==null&&Oo(r,vo.memoizedState.deps)?i.memoizedState=fs(t,a,n,r):(_o.flags|=e,i.memoizedState=fs(1|t,a,n,r))}function gs(e,t){ms(8390656,8,e,t)}function _s(e,t){hs(2048,8,e,t)}function vs(e){_o.flags|=4;var t=_o.updateQueue;if(t===null)t=Ro(),_o.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ys(e){var t=Lo().memoizedState;return vs({ref:t,nextImpl:e}),function(){if(z&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function bs(e,t){return hs(4,2,e,t)}function xs(e,t){return hs(4,4,e,t)}function Ss(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Cs(e,t,n){n=n==null?null:n.concat([e]),hs(4,4,Ss.bind(null,t,e),n)}function ws(){}function Ts(e,t){var n=Lo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Oo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Es(e,t){var n=Lo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Oo(t,r[1]))return r[0];if(r=e(),So){Be(!0);try{e()}finally{Be(!1)}}return n.memoizedState=[r,t],r}function Ds(e,t,n){return n===void 0||go&1073741824&&!(ql&261930)?e.memoizedState=t:(e.memoizedState=n,e=Su(),_o.lanes|=e,tu|=e,n)}function Os(e,t,n,r){return wr(n,t)?n:to.current===null?!(go&42)||go&1073741824&&!(ql&261930)?(uc=!0,e.memoizedState=n):(e=Su(),_o.lanes|=e,tu|=e,t):(e=Ds(e,n,r),wr(e,t)||(uc=!0),e)}function ks(e,t,n,r,i){var a=ae.p;ae.p=a!==0&&8>a?a:8;var o=A.T,s={};A.T=s,Vs(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Bs(e,t,ya(c,r),xu(e)):Bs(e,t,r,xu(e))}catch(n){Bs(e,t,{then:function(){},status:`rejected`,reason:n},xu())}finally{ae.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function As(){}function js(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Ms(e).queue;ks(e,i,t,oe,n===null?As:function(){return Ns(e),n(r)})}function Ms(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:oe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ns(e){var t=Ms(e);t.next===null&&(t=e.alternate.memoizedState),Bs(e,t.next.queue,{},xu())}function Ps(){return ia(sp)}function Fs(){return Lo().memoizedState}function Is(){return Lo().memoizedState}function Ls(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=xu();e=Ka(n);var r=qa(t,e,n);r!==null&&(H(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Rs(e,t,n){var r=xu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Hs(e)?Us(t,n):(n=ii(e,t,n,r),n!==null&&(H(n,e,r),Ws(n,t,r)))}function zs(e,t,n){Bs(e,t,n,xu())}function Bs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hs(e))Us(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),Gl===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return H(n,e,r),Ws(n,t,r),!0}return!1}function Vs(e,t,n,r){if(r={lane:2,revertLane:yd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Hs(e)){if(t)throw Error(a(479))}else t=ii(e,n,r,2),t!==null&&H(t,e,2)}function Hs(e){var t=e.alternate;return e===_o||t!==null&&t===_o}function Us(e,t){xo=bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ws(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}var Gs={readContext:ia,use:Bo,useCallback:Do,useContext:Do,useEffect:Do,useImperativeHandle:Do,useLayoutEffect:Do,useInsertionEffect:Do,useMemo:Do,useReducer:Do,useRef:Do,useState:Do,useDebugValue:Do,useDeferredValue:Do,useTransition:Do,useSyncExternalStore:Do,useId:Do,useHostTransitionStatus:Do,useFormState:Do,useActionState:Do,useOptimistic:Do,useMemoCache:Do,useCacheRefresh:Do};Gs.useEffectEvent=Do;var Ks={readContext:ia,use:Bo,useCallback:function(e,t){return Io().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:gs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ms(4194308,4,Ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ms(4194308,4,e,t)},useInsertionEffect:function(e,t){ms(4,2,e,t)},useMemo:function(e,t){var n=Io();t=t===void 0?null:t;var r=e();if(So){Be(!0);try{e()}finally{Be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Io();if(n!==void 0){var i=n(t);if(So){Be(!0);try{n(t)}finally{Be(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Rs.bind(null,_o,e),[r.memoizedState,e]},useRef:function(e){var t=Io();return e={current:e},t.memoizedState=e},useState:function(e){e=Qo(e);var t=e.queue,n=zs.bind(null,_o,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ws,useDeferredValue:function(e,t){return Ds(Io(),e,t)},useTransition:function(){var e=Qo(!1);return e=ks.bind(null,_o,e.queue,!0,!1),Io().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=_o,i=Io();if(Li){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Gl===null)throw Error(a(349));ql&127||qo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,gs(Yo.bind(null,r,o,e),[e]),r.flags|=2048,fs(9,{destroy:void 0},Jo.bind(null,r,o,n,t),null),n},useId:function(){var e=Io(),t=Gl.identifierPrefix;if(Li){var n=ki,r=Oi;n=(r&~(1<<32-Ve(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Eo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ps,useFormState:ss,useActionState:ss,useOptimistic:function(e){var t=Io();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Vs.bind(null,_o,!0,n),n.dispatch=t,[e,t]},useMemoCache:Vo,useCacheRefresh:function(){return Io().memoizedState=Ls.bind(null,_o)},useEffectEvent:function(e){var t=Io(),n={impl:e};return t.memoizedState=n,function(){if(z&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},qs={readContext:ia,use:Bo,useCallback:Ts,useContext:ia,useEffect:_s,useImperativeHandle:Cs,useInsertionEffect:bs,useLayoutEffect:xs,useMemo:Es,useReducer:Uo,useRef:ps,useState:function(){return Uo(Ho)},useDebugValue:ws,useDeferredValue:function(e,t){return Os(Lo(),vo.memoizedState,e,t)},useTransition:function(){var e=Uo(Ho)[0],t=Lo().memoizedState;return[typeof e==`boolean`?e:zo(e),t]},useSyncExternalStore:Ko,useId:Fs,useHostTransitionStatus:Ps,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){return $o(Lo(),vo,e,t)},useMemoCache:Vo,useCacheRefresh:Is};qs.useEffectEvent=ys;var Js={readContext:ia,use:Bo,useCallback:Ts,useContext:ia,useEffect:_s,useImperativeHandle:Cs,useInsertionEffect:bs,useLayoutEffect:xs,useMemo:Es,useReducer:Go,useRef:ps,useState:function(){return Go(Ho)},useDebugValue:ws,useDeferredValue:function(e,t){var n=Lo();return vo===null?Ds(n,e,t):Os(n,vo.memoizedState,e,t)},useTransition:function(){var e=Go(Ho)[0],t=Lo().memoizedState;return[typeof e==`boolean`?e:zo(e),t]},useSyncExternalStore:Ko,useId:Fs,useHostTransitionStatus:Ps,useFormState:ds,useActionState:ds,useOptimistic:function(e,t){var n=Lo();return vo===null?(n.baseState=e,[e,n.queue.dispatch]):$o(n,vo,e,t)},useMemoCache:Vo,useCacheRefresh:Is};Js.useEffectEvent=ys;function Ys(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ka(r);i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(H(t,e,r),Ja(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ka(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(H(t,e,r),Ja(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xu(),r=Ka(n);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,n),t!==null&&(H(t,e,n),Ja(t,e,n))}};function Zs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(i,a):!0}function Qs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Xs.enqueueReplaceState(t,t.state,null)}function $s(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function ec(e){Qr(e)}function tc(e){console.error(e)}function nc(e){Qr(e)}function rc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ic(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function ac(e,t,n){return n=Ka(n),n.tag=3,n.payload={element:null},n.callback=function(){rc(e,t)},n}function oc(e){return e=Ka(e),e.tag=3,e}function sc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ic(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ic(t,n,r),typeof i!=`function`&&(pu===null?pu=new Set([this]):pu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function cc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ta(t,n,i,!0),n=oo.current,n!==null){switch(n.tag){case 31:case 13:return so===null?Pu():n.alternate===null&&eu===0&&(eu=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),$u(e,r,i)),!1;case 22:return n.flags|=65536,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),$u(e,r,i)),!1}throw Error(a(435,n.tag))}return $u(e,r,i),Pu(),!1}if(Li)return t=oo.current,t===null?(r!==Bi&&(t=Error(a(423),{cause:r}),qi(bi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=bi(r,n),i=ac(e.stateNode,r,i),Ya(e,i),eu!==4&&(eu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Bi&&(e=Error(a(422),{cause:r}),qi(bi(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=bi(o,n),ou===null?ou=[o]:ou.push(o),eu!==4&&(eu=2),t===null)return!0;r=bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=ac(n.stateNode,r,e),Ya(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(pu===null||!pu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=oc(i),sc(i,e,n,r),Ya(n,i),!1}n=n.return}while(n!==null);return!1}var lc=Error(a(461)),uc=!1;function dc(e,t,n,r){t.child=e===null?Ha(t,null,n,r):Va(t,e.child,n,r)}function fc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ra(t),r=ko(e,t,n,o,a,i),s=No(),e!==null&&!uc?(Po(e,t,i),Ic(e,t,i)):(Li&&s&&Mi(t),t.flags|=1,dc(e,t,r,i),t.child)}function pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,mc(e,t,a,r,i)):(e=mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Lc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return Ic(e,t,i)}return t.flags|=1,e=fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function mc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref){if(uc=!1,t.pendingProps=r=a,Lc(e,i))e.flags&131072&&(uc=!0);else return t.lanes=e.lanes,Ic(e,t,i)}}return Sc(e,t,n,r,i)}function hc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return _c(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?io():ro(t,a),uo(t);else return r=t.lanes=536870912,_c(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),io(),fo(t)):(Ca(t,a.cachePool),ro(t,a),fo(t),t.memoizedState=null);return dc(e,t,i,n),t.child}function gc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function _c(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),io(),uo(t),e!==null&&ta(e,t,r,!0),t.childLanes=i,null}function vc(e,t){return t=jc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function yc(e,t,n){return Va(t,e.child,null,n),e=vc(t,t.pendingProps),e.flags|=2,po(t),t.memoizedState=null,e}function bc(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(Li){if(r.mode===`hidden`)return e=vc(t,r),t.lanes=536870912,gc(null,e);if(lo(t),(e=Ii)?(e=mf(e,zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Vi(t);return t.lanes=536870912,null}return vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(lo(t),i){if(t.flags&256)t.flags&=-257,t=yc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558))}else if(uc||ta(e,t,n,!1),i=(n&e.childLanes)!==0,uc||i){if(r=Gl,r!==null&&(s=rt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),H(r,e,s),lc;Pu(),t=yc(e,t,n)}else e=o.treeContext,Ii=vf(s.nextSibling),Fi=t,Li=!0,Ri=null,zi=!1,e!==null&&Pi(t,e),t=vc(t,r),t.flags|=4096;return t}return e=fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function xc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Sc(e,t,n,r,i){return ra(t),n=ko(e,t,n,r,void 0,i),r=No(),e!==null&&!uc?(Po(e,t,i),Ic(e,t,i)):(Li&&r&&Mi(t),t.flags|=1,dc(e,t,n,i),t.child)}function Cc(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=jo(t,r,n,i),Ao(e),r=No(),e!==null&&!uc?(Po(e,t,a),Ic(e,t,a)):(Li&&r&&Mi(t),t.flags|=1,dc(e,t,n,a),t.child)}function wc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=ci,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Xs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Wa(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ys(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Xs.enqueueReplaceState(a,a.state,null),Qa(t,r,a,i),Za(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=$s(n,s);a.props=c;var l=a.context,u=n.contextType;o=ci,typeof u==`object`&&u&&(o=ia(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Qs(t,a,r,o),Ua=!1;var f=t.memoizedState;a.state=f,Qa(t,r,a,i),Za(),l=t.memoizedState,s||f!==l||Ua?(typeof d==`function`&&(Ys(t,n,d,r),l=t.memoizedState),(c=Ua||Zs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ga(e,t),o=t.memoizedProps,u=$s(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ci,typeof l==`object`&&l&&(c=ia(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Qs(t,a,r,c),Ua=!1,f=t.memoizedState,a.state=f,Qa(t,r,a,i),Za();var p=t.memoizedState;o!==d||f!==p||Ua||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(Ys(t,n,s,r),p=t.memoizedState),(u=Ua||Zs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,xc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Va(t,e.child,null,i),t.child=Va(t,null,n,i)):dc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ic(e,t,i),e}function Tc(e,t,n,r){return Gi(),t.flags|=256,dc(e,t,n,r),t.child}var Ec={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dc(e){return{baseLanes:e,cachePool:wa()}}function Oc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=iu),e}function kc(e,t,n){var r=t.pendingProps,i=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(mo.current&2)),s&&(i=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Li){if(i?co(t):fo(t),(e=Ii)?(e=mf(e,zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Vi(t);return gf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(fo(t),i=t.mode,c=jc({mode:`hidden`,children:c},i),r=hi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Dc(n),r.childLanes=Oc(e,s,n),t.memoizedState=Ec,gc(null,r)):(co(t),Ac(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(co(t),t.flags&=-257,t=Mc(e,t,n)):t.memoizedState===null?(fo(t),c=r.fallback,i=t.mode,r=jc({mode:`visible`,children:r.children},i),c=hi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Va(t,e.child,null,n),r=t.child,r.memoizedState=Dc(n),r.childLanes=Oc(e,s,n),t.memoizedState=Ec,t=gc(null,r)):(fo(t),t.child=e.child,t.flags|=128,t=null);else if(co(t),gf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,qi({value:r,source:null,stack:null}),t=Mc(e,t,n)}else if(uc||ta(e,t,n,!1),s=(n&e.childLanes)!==0,uc||s){if(s=Gl,s!==null&&(r=rt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),H(s,e,r),lc;hf(c)||Pu(),t=Mc(e,t,n)}else hf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ii=vf(c.nextSibling),Fi=t,Li=!0,Ri=null,zi=!1,e!==null&&Pi(t,e),t=Ac(t,r.children),t.flags|=4096);return t}return i?(fo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=fi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=hi(c,i,n,null),c.flags|=2):c=fi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,gc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Dc(n):(i=c.cachePool,i===null?i=wa():(l=ua._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Oc(e,s,n),t.memoizedState=Ec,gc(e.child,r)):(co(t),n=e.child,e=n.sibling,n=fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Ac(e,t){return t=jc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function jc(e,t){return e=ui(22,e,null,t),e.lanes=0,e}function Mc(e,t,n){return Va(t,e.child,null,n),e=Ac(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Nc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$i(e.return,t,n)}function Pc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Fc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=mo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,ue(mo,o),dc(e,t,r,n),r=Li?wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nc(e,n,t);else if(e.tag===19)Nc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ho(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Pc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Pc(t,!0,n,null,a,r);break;case`together`:Pc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ic(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tu|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Lc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&na(e)))}function Rc(e,t,n){switch(t.tag){case 3:he(t,t.stateNode.containerInfo),Zi(t,ua,e.memoizedState.cache),Gi();break;case 27:case 5:_e(t);break;case 4:he(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(co(t),e=Ic(e,t,n),e===null?null:e.sibling):kc(e,t,n):(co(t),t.flags|=128,null);co(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Fc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ue(mo,mo.current),r)break;return null;case 22:return t.lanes=0,hc(e,t,n,t.pendingProps);case 24:Zi(t,ua,e.memoizedState.cache)}return Ic(e,t,n)}function zc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)uc=!0;else{if(!Lc(e,n)&&!(t.flags&128))return uc=!1,Rc(e,t,n);uc=!!(e.flags&131072)}}else uc=!1,Li&&t.flags&1048576&&ji(t,wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ja(t.elementType),t.type=e,typeof e==`function`)di(e)?(r=$s(e,r),t.tag=1,t=wc(null,t,e,r,n)):(t.tag=0,t=Sc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=fc(null,t,e,r,n);break a}if(i===T){t.tag=14,t=pc(null,t,e,r,n);break a}}throw t=re(e)||e,Error(a(306,t,``))}}return t;case 0:return Sc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=$s(r,t.pendingProps),wc(e,t,r,i,n);case 3:a:{if(he(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Ga(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Zi(t,ua,r),r!==o.cache&&ea(t,[ua],n,!0),Za(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Tc(e,t,r,n);break a}if(r!==i){i=bi(Error(a(424)),t),qi(i),t=Tc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ii=vf(e.firstChild),Fi=t,Li=!0,Ri=null,zi=!0,n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Gi(),r===i){t=Ic(e,t,n);break a}dc(e,t,r,n)}t=t.child}return t;case 26:return xc(e,t),e===null?(n=zf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Li||(n=t.type,e=t.pendingProps,r=Xd(pe.current).createElement(n),r[lt]=t,r[ut]=e,Wd(r,n,e),St(r),t.stateNode=r):t.memoizedState=zf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&Li&&(r=t.stateNode=Sf(t.type,t.pendingProps,pe.current),Fi=t,zi=!0,i=Ii,cf(t.type)?(yf=i,Ii=vf(r.firstChild)):Ii=i),dc(e,t,t.pendingProps.children,n),xc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Li&&((i=r=Ii)&&(r=ff(r,t.type,t.pendingProps,zi),r===null?i=!1:(t.stateNode=r,Fi=t,Ii=vf(r.firstChild),zi=!1,i=!0)),i||Vi(t)),_e(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,$d(i,o)?r=null:s!==null&&$d(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=ko(e,t,Mo,null,null,n),sp._currentValue=i),xc(e,t),dc(e,t,r,n),t.child;case 6:return e===null&&Li&&((e=n=Ii)&&(n=pf(n,t.pendingProps,zi),n===null?e=!1:(t.stateNode=n,Fi=t,Ii=null,e=!0)),e||Vi(t)),null;case 13:return kc(e,t,n);case 4:return he(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):dc(e,t,r,n),t.child;case 11:return fc(e,t,t.type,t.pendingProps,n);case 7:return dc(e,t,t.pendingProps,n),t.child;case 8:return dc(e,t,t.pendingProps.children,n),t.child;case 12:return dc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Zi(t,t.type,r.value),dc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ra(t),i=ia(i),r=r(i),t.flags|=1,dc(e,t,r,n),t.child;case 14:return pc(e,t,t.type,t.pendingProps,n);case 15:return mc(e,t,t.type,t.pendingProps,n);case 19:return Fc(e,t,n);case 31:return bc(e,t,n);case 22:return hc(e,t,n,t.pendingProps);case 24:return ra(t),r=ia(ua),e===null?(i=Sa(),i===null&&(i=Gl,o=da(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Wa(t),Zi(t,ua,i)):((e.lanes&n)!==0&&(Ga(e,t),Qa(t,null,null,n),Za()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Zi(t,ua,r),r!==i.cache&&ea(t,[ua],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Zi(t,ua,r))),dc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Bc(e){e.flags|=4}function Vc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(ju())e.flags|=8192;else throw Ma=Oa,Ea}}else e.flags&=-16777217}function Hc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!$f(t)){if(ju())e.flags|=8192;else throw Ma=Oa,Ea}}function Uc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ze(),e.lanes|=t,au|=t)}function Wc(e,t){if(!Li)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Kc(e,t,n){var r=t.pendingProps;switch(Ni(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gc(t),null;case 1:return Gc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qi(ua),ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?Bc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki())),Gc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Bc(t),o===null?(Gc(t),Vc(t,i,null,r,n)):(Gc(t),Hc(t,o))):o?o===e.memoizedState?(Gc(t),t.flags&=-16777217):(Bc(t),Gc(t),Hc(t,o)):(e=e.memoizedProps,e!==r&&Bc(t),Gc(t),Vc(t,i,e,r,n)),null;case 27:if(M(t),n=pe.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Bc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Gc(t),null}e=de.current,Wi(t)?Hi(t,e):(e=Sf(i,r,n),t.stateNode=e,Bc(t))}return Gc(t),null;case 5:if(M(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Bc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Gc(t),null}if(o=de.current,Wi(t))Hi(t,o);else{var s=Xd(pe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[lt]=t,o[ut]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Wd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Bc(t)}}return Gc(t),Vc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Bc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=pe.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Fi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[lt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Vd(e.nodeValue,n)),e||Vi(t,!0)}else e=Xd(e).createTextNode(r),e[lt]=t,t.stateNode=e}return Gc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[lt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gc(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(a(558))}return Gc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[lt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gc(t),i=!1}else i=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Uc(t,t.updateQueue),Gc(t),null);case 4:return ge(),e===null&&jd(t.stateNode.containerInfo),Gc(t),null;case 10:return Qi(t.type),Gc(t),null;case 19:if(j(mo),r=t.memoizedState,r===null)return Gc(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null){if(i)Wc(r,!1);else{if(eu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,Wc(r,!1),e=o.updateQueue,t.updateQueue=e,Uc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return ue(mo,mo.current&1|2),Li&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ke()>du&&(t.flags|=128,i=!0,Wc(r,!1),t.lanes=4194304)}}else{if(!i){if(e=ho(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Uc(t,e),Wc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Li)return Gc(t),null}else 2*ke()-r.renderingStartTime>du&&n!==536870912&&(t.flags|=128,i=!0,Wc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Gc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ke(),e.sibling=null,n=mo.current,ue(mo,i?n&1|2:n&1),Li&&Ai(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Gc(t),t.subtreeFlags&6&&(t.flags|=8192)):Gc(t),n=t.updateQueue,n!==null&&Uc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&j(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),Gc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function qc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),ge(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return M(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(a(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(mo),null;case 4:return ge(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&j(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function Jc(e,t){switch(Ni(t),t.tag){case 3:Qi(ua),ge();break;case 26:case 27:case 5:M(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:j(mo);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&j(xa);break;case 24:Qi(ua)}}function Yc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Qu(t,t.return,e)}}function Xc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Qu(t,t.return,e)}}function Zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){Qu(e,e.return,t)}}}function Qc(e,t,n){n.props=$s(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Qu(e,t,n)}}function $c(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Qu(e,t,n)}}function el(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Qu(e,t,n)}else n.current=null}}function tl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Qu(e,e.return,t)}}function nl(e,t,n){try{var r=e.stateNode;Gd(r,e.type,n,t),r[ut]=t}catch(t){Qu(e,e.return,t)}}function rl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cf(e.type)||e.tag===4}function il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||rl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&cf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}function sl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wd(t,r,n),t[lt]=e,t[ut]=n}catch(t){Qu(e,e.return,t)}}var cl=!1,ll=!1,ul=!1,dl=typeof WeakSet==`function`?WeakSet:Set,fl=null;function pl(e,t){if(e=e.containerInfo,Jd=gp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Yd={focusedElem:e,selectionRange:n},gp=!1,fl=t;fl!==null;)if(t=fl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,fl=e;else for(;fl!==null;){switch(t=fl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=$s(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)df(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:df(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,fl=e;break}fl=t.return}}function ml(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:kl(e,n),r&4&&Yc(5,n);break;case 1:if(kl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Qu(n,n.return,e)}else{var i=$s(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Qu(n,n.return,e)}}}r&64&&Zc(n),r&512&&$c(n,n.return);break;case 3:if(kl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{eo(e,t)}catch(e){Qu(n,n.return,e)}}break;case 27:t===null&&r&4&&sl(n);case 26:case 5:kl(e,n),t===null&&r&4&&tl(n),r&512&&$c(n,n.return);break;case 12:kl(e,n);break;case 31:kl(e,n),r&4&&bl(e,n);break;case 13:kl(e,n),r&4&&xl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=nd.bind(null,n),_f(e,n))));break;case 22:if(r=n.memoizedState!==null||cl,!r){t=t!==null&&t.memoizedState!==null||ll,i=cl;var a=ll;cl=r,(ll=t)&&!a?jl(e,n,!!(n.subtreeFlags&8772)):kl(e,n),cl=i,ll=a}break;case 30:break;default:kl(e,n)}}function hl(e){var t=e.alternate;t!==null&&(e.alternate=null,hl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_t(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var gl=null,_l=!1;function vl(e,t,n){for(n=n.child;n!==null;)yl(e,t,n),n=n.sibling}function yl(e,t,n){if(ze&&typeof ze.onCommitFiberUnmount==`function`)try{ze.onCommitFiberUnmount(Re,n)}catch{}switch(n.tag){case 26:ll||el(n,t),vl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ll||el(n,t);var r=gl,i=_l;cf(n.type)&&(gl=n.stateNode,_l=!1),vl(e,t,n),Cf(n.stateNode),gl=r,_l=i;break;case 5:ll||el(n,t);case 6:if(r=gl,i=_l,gl=null,vl(e,t,n),gl=r,_l=i,gl!==null){if(_l)try{(gl.nodeType===9?gl.body:gl.nodeName===`HTML`?gl.ownerDocument.body:gl).removeChild(n.stateNode)}catch(e){Qu(n,t,e)}else try{gl.removeChild(n.stateNode)}catch(e){Qu(n,t,e)}}break;case 18:gl!==null&&(_l?(e=gl,lf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):lf(gl,n.stateNode));break;case 4:r=gl,i=_l,gl=n.stateNode.containerInfo,_l=!0,vl(e,t,n),gl=r,_l=i;break;case 0:case 11:case 14:case 15:Xc(2,n,t),ll||Xc(4,n,t),vl(e,t,n);break;case 1:ll||(el(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Qc(n,t,r)),vl(e,t,n);break;case 21:vl(e,t,n);break;case 22:ll=(r=ll)||n.memoizedState!==null,vl(e,t,n),ll=r;break;default:vl(e,t,n)}}function bl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){Qu(t,t.return,e)}}}function xl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){Qu(t,t.return,e)}}function Sl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new dl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new dl),t;default:throw Error(a(435,e.tag))}}function Cl(e,t){var n=Sl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=rd.bind(null,e,t);t.then(r,r)}})}function wl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(cf(c.type)){gl=c.stateNode,_l=!1;break a}break;case 5:gl=c.stateNode,_l=!1;break a;case 3:case 4:gl=c.stateNode.containerInfo,_l=!0;break a}c=c.return}if(gl===null)throw Error(a(160));yl(o,s,i),gl=null,_l=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)El(t,e),t=t.sibling}var Tl=null;function El(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wl(t,e),Dl(e),r&4&&(Xc(3,e,e.return),Yc(3,e),Xc(5,e,e.return));break;case 1:wl(t,e),Dl(e),r&512&&(ll||n===null||el(n,n.return)),r&64&&cl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=Tl;if(wl(t,e),Dl(e),r&512&&(ll||n===null||el(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[gt]||o[lt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head >
11 title`))),Wd(o,r,n),o[lt]=e,St(o),r=o;break a;case`link`:var s=Xf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Wd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Xf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Wd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[lt]=e,St(o),r=o}e.stateNode=r}else Zf(i,e.type,e.stateNode)}else e.stateNode=Gf(i,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&nl(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Zf(i,e.type,e.stateNode):Gf(i,r,e.memoizedProps))}break;case 27:wl(t,e),Dl(e),r&512&&(ll||n===null||el(n,n.return)),n!==null&&r&4&&nl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(wl(t,e),Dl(e),r&512&&(ll||n===null||el(n,n.return)),e.flags&32){i=e.stateNode;try{Jt(i,``)}catch(t){Qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,nl(e,i,n===null?i:n.memoizedProps)),r&1024&&(ul=!0);break;case 6:if(wl(t,e),Dl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Qu(e,e.return,t)}}break;case 3:if(Yf=null,i=Tl,Tl=Ef(t.containerInfo),wl(t,e),Tl=i,Dl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){Qu(e,e.return,t)}ul&&(ul=!1,Ol(e));break;case 4:r=Tl,Tl=Ef(e.stateNode.containerInfo),wl(t,e),Dl(e),Tl=r;break;case 12:wl(t,e),Dl(e);break;case 31:wl(t,e),Dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 13:wl(t,e),Dl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lu=ke()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=cl,d=ll;if(cl=u||i,ll=d||l,wl(t,e),ll=d,cl=u,Dl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||cl||ll||Al(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?uf(m,!0):uf(l.stateNode,!1)}catch(e){Qu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Cl(e,n))));break;case 19:wl(t,e),Dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 30:break;case 21:break;default:wl(t,e),Dl(e)}}function Dl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(rl(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;ol(e,il(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Jt(o,``),n.flags&=-33),ol(e,il(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;al(e,il(e),s);break;default:throw Error(a(161))}}catch(t){Qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ol(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ol(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function kl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ml(e,t.alternate,t),t=t.sibling}function Al(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Xc(4,t,t.return),Al(t);break;case 1:el(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Qc(t,t.return,n),Al(t);break;case 27:Cf(t.stateNode);case 26:case 5:el(t,t.return),Al(t);break;case 22:t.memoizedState===null&&Al(t);break;case 30:Al(t);break;default:Al(t)}e=e.sibling}}function jl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:jl(i,a,n),Yc(4,a);break;case 1:if(jl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;
vendor: 58,802 bytes, lines 11-12
11if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)$a(c[i],s)}catch(e){Qu(r,r.return,e)}}n&&o&64&&Zc(a),$c(a,a.return);break;case 27:sl(a);case 26:case 5:jl(i,a,n),n&&r===null&&o&4&&tl(a),$c(a,a.return);break;case 12:jl(i,a,n);break;case 31:jl(i,a,n),n&&o&4&&bl(i,a);break;case 13:jl(i,a,n),n&&o&4&&xl(i,a);break;case 22:a.memoizedState===null&&jl(i,a,n),$c(a,a.return);break;case 30:break;default:jl(i,a,n)}t=t.sibling}}function I(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&fa(n))}function Ml(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function Nl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)L(e,t,n,r),t=t.sibling}function L(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Nl(e,t,n,r),i&2048&&Yc(9,t);break;case 1:Nl(e,t,n,r);break;case 3:Nl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e)));break;case 12:if(i&2048){Nl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Qu(t,t.return,e)}}else Nl(e,t,n,r);break;case 31:Nl(e,t,n,r);break;case 13:Nl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Nl(e,t,n,r):(a._visibility|=2,Pl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Nl(e,t,n,r):Fl(e,t),i&2048&&I(o,t);break;case 24:Nl(e,t,n,r),i&2048&&Ml(t.alternate,t);break;default:Nl(e,t,n,r)}}function Pl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Pl(a,o,s,c,i),Yc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Pl(a,o,s,c,i)):u._visibility&2?Pl(a,o,s,c,i):Fl(a,o),i&&l&2048&&I(o.alternate,o);break;case 24:Pl(a,o,s,c,i),i&&l&2048&&Ml(o.alternate,o);break;default:Pl(a,o,s,c,i)}t=t.sibling}}function Fl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Fl(n,r),i&2048&&I(r.alternate,r);break;case 24:Fl(n,r),i&2048&&Ml(r.alternate,r);break;default:Fl(n,r)}t=t.sibling}}var Il=8192;function Ll(e,t,n){if(e.subtreeFlags&Il)for(e=e.child;e!==null;)Rl(e,t,n),e=e.sibling}function Rl(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Il&&e.memoizedState!==null&&ep(n,Tl,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var r=Tl;Tl=Ef(e.stateNode.containerInfo),Ll(e,t,n),Tl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Il,Il=16777216,Ll(e,t,n),Il=r):Ll(e,t,n));break;default:Ll(e,t,n)}}function zl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fl=r,Hl(r,e)}zl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vl(e),e=e.sibling}function Vl(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&Xc(9,e,e.return);break;case 3:Bl(e);break;case 12:Bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,R(e)):Bl(e);break;default:Bl(e)}}function R(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fl=r,Hl(r,e)}zl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Xc(8,t,t.return),R(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,R(t));break;default:R(t)}e=e.sibling}}function Hl(e,t){for(;fl!==null;){var n=fl;switch(n.tag){case 0:case 11:case 15:Xc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,fl=r;else a:for(n=e;fl!==null;){r=fl;var i=r.sibling,a=r.return;if(hl(r),r===n){fl=null;break a}if(i!==null){i.return=a,fl=i;break a}fl=a}}}var Ul={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},Wl=typeof WeakMap==`function`?WeakMap:Map,z=0,Gl=null,Kl=null,ql=0,Jl=0,Yl=null,Xl=!1,Zl=!1,Ql=!1,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=null,su=null,cu=!1,lu=0,uu=0,du=1/0,fu=null,pu=null,mu=0,hu=null,gu=null,B=0,_u=0,vu=null,yu=null,V=0,bu=null;function xu(){return z&2&&ql!==0?ql&-ql:A.T===null?ot():yd()}function Su(){if(iu===0){if(!(ql&536870912)||Li){var e=Ge;Ge<<=1,!(Ge&3932160)&&(Ge=262144),iu=e}else iu=536870912}return e=oo.current,e!==null&&(e.flags|=32),iu}function H(e,t,n){(e===Gl&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)&&(ku(e,0),Eu(e,ql,iu,!1)),$e(e,n),(!(z&2)||e!==Gl)&&(e===Gl&&(!(z&2)&&(nu|=n),eu===4&&Eu(e,ql,iu,!1)),dd(e))}function Cu(e,t,n){if(z&6)throw Error(a(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ye(e,t),i=r?Lu(e,t):Fu(e,t,!0),o=r;do{if(i===0){Zl&&!r&&Eu(e,t,0,!1);break}if(n=e.current.alternate,o&&!Tu(n)){i=Fu(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=ou;var l=c.current.memoizedState.isDehydrated;if(l&&(ku(c,s).flags|=256),s=Fu(c,s,!1),s!==2){if(Ql&&!l){c.errorRecoveryDisabledLanes|=o,nu|=o,i=4;break a}o=su,su=i,o!==null&&(su===null?su=o:su.push.apply(su,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){ku(e,0),Eu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:Eu(r,t,iu,!Xl);break a;case 2:su=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=lu+300-ke(),10<i)){if(Eu(r,t,iu,!Xl),Je(r,0,!0)!==0)break a;B=t,r.timeoutHandle=nf(wu.bind(null,r,n,su,fu,cu,t,iu,nu,au,Xl,o,`Throttled`,-0,0),i);break a}wu(r,n,su,fu,cu,t,iu,nu,au,Xl,o,null,-0,0)}break}while(1);dd(e)}function wu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nn},Rl(t,a,d);var m=(a&62914560)===a?lu-ke():(a&4194048)===a?uu-ke():0;if(m=np(d,m),m!==null){B=a,e.cancelPendingCommit=m(Wu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Eu(e,a,o,!l);return}}Wu(e,t,a,n,r,i,o,s,c)}function Tu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Eu(e,t,n,r){t&=~ru,t&=~nu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ve(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&tt(e,n,t)}function Du(){return z&6?!0:(fd(0,!1),!1)}function Ou(){if(Kl!==null){if(Jl===0)var e=Kl.return;else e=Kl,Xi=Yi=null,Fo(e),Fa=null,Ia=0,e=Kl;for(;e!==null;)Jc(e.alternate,e),e=e.return;Kl=null}}function ku(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,rf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),B=0,Ou(),Gl=e,Kl=n=fi(e.current,null),ql=t,Jl=0,Yl=null,Xl=!1,Zl=Ye(e,t),Ql=!1,au=iu=ru=nu=tu=eu=0,su=ou=null,cu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ve(r),a=1<<i;t|=e[i],r&=~a}return $l=t,ni(),n}function Au(e,t){_o=null,A.H=Gs,t===Ta||t===Da?(t=Na(),Jl=3):t===Ea?(t=Na(),Jl=4):Jl=t===lc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Yl=t,Kl===null&&(eu=1,rc(e,bi(t,e.current)))}function ju(){var e=oo.current;return e===null?!0:(ql&4194048)===ql?so===null:(ql&62914560)===ql||ql&536870912?e===so:!1}function Mu(){var e=A.H;return A.H=Gs,e===null?Gs:e}function Nu(){var e=A.A;return A.A=Ul,e}function Pu(){eu=4,Xl||(ql&4194048)!==ql&&oo.current!==null||(Zl=!0),!(tu&134217727)&&!(nu&134217727)||Gl===null||Eu(Gl,ql,iu,!1)}function Fu(e,t,n){var r=z;z|=2;var i=Mu(),a=Nu();(Gl!==e||ql!==t)&&(fu=null,ku(e,t)),t=!1;var o=eu;a:do try{if(Jl!==0&&Kl!==null){var s=Kl,c=Yl;switch(Jl){case 8:Ou(),o=6;break a;case 3:case 2:case 9:case 6:oo.current===null&&(t=!0);var l=Jl;if(Jl=0,Yl=null,Vu(e,s,c,l),n&&Zl){o=0;break a}break;default:l=Jl,Jl=0,Yl=null,Vu(e,s,c,l)}}Iu(),o=eu;break}catch(t){Au(e,t)}while(1);return t&&e.shellSuspendCounter++,Xi=Yi=null,z=r,A.H=i,A.A=a,Kl===null&&(Gl=null,ql=0,ni()),o}function Iu(){for(;Kl!==null;)zu(Kl)}function Lu(e,t){var n=z;z|=2;var r=Mu(),i=Nu();Gl!==e||ql!==t?(fu=null,du=ke()+500,ku(e,t)):Zl=Ye(e,t);a:do try{if(Jl!==0&&Kl!==null){t=Kl;var o=Yl;b:switch(Jl){case 1:Jl=0,Yl=null,Vu(e,t,o,1);break;case 2:case 9:if(ka(o)){Jl=0,Yl=null,Bu(t);break}t=function(){Jl!==2&&Jl!==9||Gl!==e||(Jl=7),dd(e)},o.then(t,t);break a;case 3:Jl=7;break a;case 4:Jl=5;break a;case 7:ka(o)?(Jl=0,Yl=null,Bu(t)):(Jl=0,Yl=null,Vu(e,t,o,7));break;case 5:var s=null;switch(Kl.tag){case 26:s=Kl.memoizedState;case 5:case 27:var c=Kl;if(s?$f(s):c.stateNode.complete){Jl=0,Yl=null;var l=c.sibling;if(l!==null)Kl=l;else{var u=c.return;u===null?Kl=null:(Kl=u,Hu(u))}break b}}Jl=0,Yl=null,Vu(e,t,o,5);break;case 6:Jl=0,Yl=null,Vu(e,t,o,6);break;case 8:Ou(),eu=6;break a;default:throw Error(a(462))}}Ru();break}catch(t){Au(e,t)}while(1);return Xi=Yi=null,A.H=r,A.A=i,z=n,Kl===null?(Gl=null,ql=0,ni(),eu):0}function Ru(){for(;Kl!==null&&!De();)zu(Kl)}function zu(e){var t=zc(e.alternate,e,$l);e.memoizedProps=e.pendingProps,t===null?Hu(e):Kl=t}function Bu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Cc(n,t,t.pendingProps,t.type,void 0,ql);break;case 11:t=Cc(n,t,t.pendingProps,t.type.render,t.ref,ql);break;case 5:Fo(t);default:Jc(n,t),t=Kl=pi(t,$l),t=zc(n,t,$l)}e.memoizedProps=e.pendingProps,t===null?Hu(e):Kl=t}function Vu(e,t,n,r){Xi=Yi=null,Fo(t),Fa=null,Ia=0;var i=t.return;try{if(cc(e,i,t,n,ql)){eu=1,rc(e,bi(n,e.current)),Kl=null;return}}catch(t){if(i!==null)throw Kl=i,t;eu=1,rc(e,bi(n,e.current)),Kl=null;return}t.flags&32768?(Li||r===1?e=!0:Zl||ql&536870912?e=!1:(Xl=e=!0,(r===2||r===9||r===3||r===6)&&(r=oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Uu(t,e)):Hu(t)}function Hu(e){var t=e;do{if(t.flags&32768){Uu(t,Xl);return}e=t.return;var n=Kc(t.alternate,t,$l);if(n!==null){Kl=n;return}if(t=t.sibling,t!==null){Kl=t;return}Kl=t=e}while(t!==null);eu===0&&(eu=5)}function Uu(e,t){do{var n=qc(e.alternate,e);if(n!==null){n.flags&=32767,Kl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Kl=e;return}Kl=e=n}while(e!==null);eu=6,Kl=null}function Wu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Yu();while(mu!==0);if(z&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=ti,et(e,n,o,s,c,l),e===Gl&&(Kl=Gl=null,ql=0),gu=t,hu=e,B=n,_u=o,vu=i,yu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,id(Ne,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=A.T,A.T=null,i=ae.p,ae.p=2,s=z,z|=4;try{pl(e,t,n)}finally{z=s,ae.p=i,A.T=r}}mu=1,Gu(),Ku(),qu()}}function Gu(){if(mu===1){mu=0;var e=hu,t=gu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=A.T,A.T=null;var r=ae.p;ae.p=2;var i=z;z|=4;try{El(t,e);var a=Yd,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Or(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gp=!!Jd,Yd=Jd=null}finally{z=i,ae.p=r,A.T=n}}e.current=t,mu=2}}function Ku(){if(mu===2){mu=0;var e=hu,t=gu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=A.T,A.T=null;var r=ae.p;ae.p=2;var i=z;z|=4;try{ml(e,t.alternate,t)}finally{z=i,ae.p=r,A.T=n}}mu=3}}function qu(){if(mu===4||mu===3){mu=0,Oe();var e=hu,t=gu,n=B,r=yu;t.subtreeFlags&10256||t.flags&10256?mu=5:(mu=0,gu=hu=null,Ju(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(pu=null),at(n),t=t.stateNode,ze&&typeof ze.onCommitFiberRoot==`function`)try{ze.onCommitFiberRoot(Re,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=A.T,i=ae.p,ae.p=2,A.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{A.T=t,ae.p=i}}B&3&&Yu(),dd(e),i=e.pendingLanes,n&261930&&i&42?e===bu?V++:(V=0,bu=e):V=0,fd(0,!1)}}function Ju(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Yu(){return Gu(),Ku(),qu(),Xu()}function Xu(){if(mu!==5)return!1;var e=hu,t=_u;_u=0;var n=at(B),r=A.T,i=ae.p;try{ae.p=32>n?32:n,A.T=null,n=vu,vu=null;var o=hu,s=B;if(mu=0,gu=hu=null,B=0,z&6)throw Error(a(331));var c=z;if(z|=4,Vl(o.current),L(o,o.current,s,n),z=c,fd(0,!1),ze&&typeof ze.onPostCommitFiberRoot==`function`)try{ze.onPostCommitFiberRoot(Re,o)}catch{}return!0}finally{ae.p=i,A.T=r,Ju(e,t)}}function Zu(e,t,n){t=bi(n,t),t=ac(e.stateNode,t,2),e=qa(e,t,2),e!==null&&($e(e,2),dd(e))}function Qu(e,t,n){if(e.tag===3)Zu(e,e,n);else for(;t!==null;){if(t.tag===3){Zu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(pu===null||!pu.has(r))){e=bi(n,e),n=oc(2),r=qa(t,n,2),r!==null&&(sc(n,r,t,e),$e(r,2),dd(r));break}}t=t.return}}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Wl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ql=!0,i.add(n),e=ed.bind(null,e,t,n),t.then(e,e))}function ed(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Gl===e&&(ql&n)===n&&(eu===4||eu===3&&(ql&62914560)===ql&&300>ke()-lu?!(z&2)&&ku(e,0):ru|=n,au===ql&&(au=0)),dd(e)}function td(e,t){t===0&&(t=Ze()),e=ai(e,t),e!==null&&($e(e,t),dd(e))}function nd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function rd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),td(e,n)}function id(e,t){return Te(e,t)}var ad=null,od=null,sd=!1,cd=!1,ld=!1,ud=0;function dd(e){e!==od&&e.next===null&&(od===null?ad=od=e:od=od.next=e),cd=!0,sd||(sd=!0,vd())}function fd(e,t){if(!ld&&cd){ld=!0;do for(var n=!1,r=ad;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ve(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,_d(r,a))}else a=ql,a=Je(r,r===Gl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ye(r,a)||(n=!0,_d(r,a))}r=r.next}while(n);ld=!1}}function pd(){md()}function md(){cd=sd=!1;var e=0;ud!==0&&tf()&&(e=ud);for(var t=ke(),n=null,r=ad;r!==null;){var i=r.next,a=hd(r,t);a===0?(r.next=null,n===null?ad=i:n.next=i,i===null&&(od=n)):(n=r,(e!==0||a&3)&&(cd=!0)),r=i}mu!==0&&mu!==5||fd(e,!1),ud!==0&&(ud=0)}function hd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ve(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Xe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Gl,n=ql,n=Je(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ee(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ye(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ee(r),at(n)){case 2:case 8:n=Me;break;case 32:n=Ne;break;case 268435456:n=Fe;break;default:n=Ne}return r=gd.bind(null,e),n=Te(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ee(r),e.callbackPriority=2,e.callbackNode=null,2}function gd(e,t){if(mu!==0&&mu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var r=ql;return r=Je(e,e===Gl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cu(e,r,t),hd(e,ke()),e.callbackNode!=null&&e.callbackNode===n?gd.bind(null,e):null)}function _d(e,t){if(Yu())return null;Cu(e,t,!0)}function vd(){of(function(){z&6?Te(je,pd):md()})}function yd(){if(ud===0){var e=ha;e===0&&(e=We,We<<=1,!(We&261888)&&(We=256)),ud=e}return ud}function bd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:tn(``+e)}function xd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Sd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=bd((i[ut]||null).action),o=r.submitter;o&&(t=(t=o[ut]||null)?bd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Cn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ud!==0){var e=o?xd(i,o):new FormData(i);js(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?xd(i,o):new FormData(i),js(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Cd=0;Cd<Xr.length;Cd++){var wd=Xr[Cd];Zr(wd.toLowerCase(),`on`+(wd[0].toUpperCase()+wd.slice(1)))}Zr(Hr,`onAnimationEnd`),Zr(Ur,`onAnimationIteration`),Zr(Wr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Gr,`onTransitionRun`),Zr(Kr,`onTransitionStart`),Zr(qr,`onTransitionCancel`),Zr(Jr,`onTransitionEnd`),Et(`onMouseEnter`,[`mouseout`,`mouseover`]),Et(`onMouseLeave`,[`mouseout`,`mouseover`]),Et(`onPointerEnter`,[`pointerout`,`pointerover`]),Et(`onPointerLeave`,[`pointerout`,`pointerover`]),Tt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Tt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Tt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Tt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Td=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Ed=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Td));function Dd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}}}}function Od(e,t){var n=t[ft];n===void 0&&(n=t[ft]=new Set);var r=e+`__bubble`;n.has(r)||(Md(t,e,2,!1),n.add(r))}function kd(e,t,n){var r=0;t&&(r|=4),Md(n,e,r,t)}var Ad=`_reactListening`+Math.random().toString(36).slice(2);function jd(e){if(!e[Ad]){e[Ad]=!0,Ct.forEach(function(t){t!==`selectionchange`&&(Ed.has(t)||kd(t,!1,e),kd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,kd(`selectionchange`,!1,t))}}function Md(e,t,n,r){switch(Cp(t)){case 2:var i=_p;break;case 8:i=vp;break;default:i=yp}n=i.bind(null,t,n,e),i=void 0,!pn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Nd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=vt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}un(function(){var r=a,i=an(n),o=[];a:{var c=Yr.get(e);if(c!==void 0){var l=Cn,u=e;switch(e){case`keypress`:if(yn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Hr:case Ur:case Wr:l=Nn;break;case Jr:l=Wn;break;case`scroll`:case`scrollend`:l=Tn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=dn(m,p),g!=null&&d.push(Pd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==rn&&(u=n.relatedTarget||n.fromElement)&&(vt(u)||u[dt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?vt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:bt(l),h=u==null?c:bt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,vt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Id,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ld(o,c,l,d,!1),u!==null&&f!==null&&Ld(o,f,u,d,!0)}}a:{if(c=r?bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=fr;else if(or(c)){if(pr)v=Sr;else{v=br;var y=yr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Qt(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Wt(c,`number`,c.value)}switch(y=r?bt(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Mr=y,Nr=r,Pr=null);break;case`focusout`:Pr=Nr=Mr=null;break;case`mousedown`:Fr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Fr=!1,Ir(o,n,i);break;case`selectionchange`:if(jr)break;case`keydown`:case`keyup`:Ir(o,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=vn()):(hn=i,gn=`value`in hn?hn.value:hn.textContent,nr=!0)),y=Fd(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Xn?rr(e,n):ir(e,n))&&(x=Fd(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),Sd(o,e,r,n,i)}Dd(o,t)})}function Pd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=dn(e,n),i!=null&&r.unshift(Pd(e,i,a)),i=dn(e,t),i!=null&&r.push(Pd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Id(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=dn(n,a),l!=null&&o.unshift(Pd(n,l,c))):i||(l=dn(n,a),l!=null&&o.push(Pd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Rd=/\r\n?/g,zd=/\u0000|\uFFFD/g;function Bd(e){return(typeof e==`string`?e:``+e).replace(Rd,`
12`).replace(zd,``)}function Vd(e,t){return t=Bd(t),Bd(e)===t}function Hd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Jt(e,``+r);break;case`className`:Mt(e,`class`,r);break;case`tabIndex`:Mt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Mt(e,n,r);break;case`style`:Zt(e,r,o);break;case`data`:if(t!==`object`){Mt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Hd(e,t,`name`,i.name,i,null),Hd(e,t,`formEncType`,i.formEncType,i,null),Hd(e,t,`formMethod`,i.formMethod,i,null),Hd(e,t,`formTarget`,i.formTarget,i,null)):(Hd(e,t,`encType`,i.encType,i,null),Hd(e,t,`method`,i.method,i,null),Hd(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=tn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Od(`beforetoggle`,e),Od(`toggle`,e),jt(e,`popover`,r);break;case`xlinkActuate`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:jt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=$t.get(n)||n,jt(e,n,r))}}function Ud(e,t,n,r,i,o){switch(n){case`style`:Zt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Jt(e,``+r);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!wt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[ut]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):jt(e,n,r)}}}function Wd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Od(`error`,e),Od(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Hd(e,t,o,s,n,null)}}i&&Hd(e,t,`srcSet`,n.srcSet,n,null),r&&Hd(e,t,`src`,n.src,n,null);return;case`input`:Od(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Hd(e,t,r,d,n,null)}}Ut(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Od(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Hd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Gt(e,!!r,n,!0):Gt(e,!!r,t,!1);return;case`textarea`:for(s in Od(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Hd(e,t,s,c,n,null)}qt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Hd(e,t,l,r,n,null)}return;case`dialog`:Od(`beforetoggle`,e),Od(`toggle`,e),Od(`cancel`,e),Od(`close`,e);break;case`iframe`:case`object`:Od(`load`,e);break;case`video`:case`audio`:for(r=0;r<Td.length;r++)Od(Td[r],e);break;case`image`:Od(`error`,e),Od(`load`,e);break;case`details`:Od(`toggle`,e);break;case`embed`:case`source`:case`link`:Od(`error`,e),Od(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Hd(e,t,u,r,n,null)}return;default:if(Qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ud(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Hd(e,t,c,r,n,null))}function Gd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Hd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Hd(e,t,p,m,r,f)}}Ht(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Hd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Hd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Gt(e,!!n,n?[]:``,!1):Gt(e,!!n,t,!0)):Gt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Hd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Hd(e,t,s,i,r,o)}Kt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Hd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Hd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Hd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Hd(e,t,u,p,r,m)}return;default:if(Qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ud(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ud(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Hd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Hd(e,t,f,p,r,m)}function Kd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function qd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Kd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Kd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Jd=null,Yd=null;function Xd(e){return e.nodeType===9?e:e.ownerDocument}function Zd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function $d(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ef=null;function tf(){var e=window.event;return e&&e.type===`popstate`?e!==ef&&(ef=e,!0):(ef=null,!1)}var nf=typeof setTimeout==`function`?setTimeout:void 0,rf=typeof clearTimeout==`function`?clearTimeout:void 0,af=typeof Promise==`function`?Promise:void 0,of=typeof queueMicrotask==`function`?queueMicrotask:af===void 0?nf:function(e){return af.resolve(null).then(e).catch(sf)};function sf(e){setTimeout(function(){throw e})}function cf(e){return e===`head`}function lf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Cf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Cf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[gt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Cf(e.ownerDocument.body)}n=i}while(n);Hp(t)}function uf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function df(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:df(n),_t(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function ff(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[gt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=vf(e.nextSibling),e===null)break}return null}function pf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=vf(e.nextSibling),e===null))return null;return e}function mf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=vf(e.nextSibling),e===null))return null;return e}function hf(e){return e.data===`$?`||e.data===`$~`}function gf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function _f(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function vf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var yf=null;function bf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return vf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function xf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Sf(e,t,n){switch(t=Xd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Cf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_t(e)}var wf=new Map,Tf=new Set;function Ef(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Df=ae.d;ae.d={f:Of,r:kf,D:Mf,C:Nf,L:Pf,m:Ff,X:Lf,S:If,M:Rf};function Of(){var e=Df.f(),t=Du();return e||t}function kf(e){var t=yt(e);t!==null&&t.tag===5&&t.type===`form`?Ns(t):Df.r(e)}var Af=typeof document>`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Vt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Vt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Vt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Vt(n.imageSizes)+`"]`)):i+=`[href="`+Vt(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Uf(e)}wf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Vt(r)+`"][href="`+Vt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!wf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),St(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=xt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);St(c),Wd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=xt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=p({src:e,async:!0},t),(t=wf.get(i))&&Jf(e,t),a=n.createElement(`script`),St(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=xt(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Jf(e,t),a=n.createElement(`script`),St(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var i=(i=pe.current)?Ef(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=xt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=xt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||U(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=xt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Bf(e){return`href="`+Vt(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function U(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Wd(t,`link`,n),St(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Vt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Vt(n.href)+`"]`);if(r)return t.instance=r,St(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),St(r),Wd(r,`style`,i),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Bf(n.href);var o=e.querySelector(Vf(i));if(o)return t.state.loading|=4,t.instance=o,St(o),o;r=Hf(n),(i=wf.get(i))&&qf(r,i),o=(e.ownerDocument||e).createElement(`link`),St(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(i=e.querySelector(Wf(o)))?(t.instance=i,St(i),i):(r=n,(i=wf.get(o))&&(r=p({},n),Jf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),St(i),Wd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Yf=null;function Xf(e,t,n){if(Yf===null){var r=new Map,i=Yf=new Map;i.set(n,r)}else i=Yf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[gt]||a[lt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Zf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,St(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&qf(r,i),a=a.createElement(`link`),St(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&tp===0&&(tp=62500*qd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ap(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=rp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sp={$$typeof:x,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function cp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function lp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new cp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ui(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Wa(a),e}function up(e){return e?(e=ci,e):ci}function dp(e,t,n,r,i,a){i=up(i),r.context===null?r.context=i:r.pendingContext=i,r=Ka(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=qa(e,r,t),n!==null&&(H(n,e,t),Ja(n,e,t))}function fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pp(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&H(t,e,67108864),pp(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=xu();t=it(t);var n=ai(e,t);n!==null&&H(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=A.T;A.T=null;var a=ae.p;try{ae.p=2,yp(e,t,n,r)}finally{ae.p=a,A.T=i}}function vp(e,t,n,r){var i=A.T;A.T=null;var a=ae.p;try{ae.p=8,yp(e,t,n,r)}finally{ae.p=a,A.T=i}}function yp(e,t,n,r){if(gp){var i=bp(r);if(i===null)Nd(e,t,r,xp,n),Mp(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=yt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ve(o);s.entanglements[1]|=c,o&=~c}dd(a),!(z&6)&&(du=ke()+500,fd(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&H(s,a,2),Du(),pp(a,2)}if(a=bp(r),a===null&&Nd(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}function bp(e){return e=an(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=vt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xp=e,null}function Cp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ae()){case je:return 2;case Me:return 8;case Ne:case Pe:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var wp=!1,Tp=null,Ep=null,Dp=null,Op=new Map,kp=new Map,Ap=[],jp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mp(e,t){switch(e){case`focusin`:case`focusout`:Tp=null;break;case`dragenter`:case`dragleave`:Ep=null;break;case`mouseover`:case`mouseout`:Dp=null;break;case`pointerover`:case`pointerout`:Op.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kp.delete(t.pointerId)}}function Np(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=yt(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Pp(e,t,n,r,i){switch(t){case`focusin`:return Tp=Np(Tp,e,t,n,r,i),!0;case`dragenter`:return Ep=Np(Ep,e,t,n,r,i),!0;case`mouseover`:return Dp=Np(Dp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Op.set(a,Np(Op.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kp.set(a,Np(kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=vt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,st(e.priority,function(){hp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,st(e.priority,function(){hp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);rn=r,n.target.dispatchEvent(r),rn=null}else return t=yt(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}
12function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){wp=!1,Tp!==null&&Ip(Tp)&&(Tp=null),Ep!==null&&Ip(Ep)&&(Ep=null),Dp!==null&&Ip(Dp)&&(Dp=null),Op.forEach(Lp),kp.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sp(r||n)===null)continue;break}var a=yt(n);a!==null&&(e.splice(t,3),t-=3,js(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Tp!==null&&zp(Tp,e),Ep!==null&&zp(Ep,e),Dp!==null&&zp(Dp,e),Op.forEach(t),kp.forEach(t);for(var n=0;n<Ap.length;n++){var r=Ap[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ap.length&&(n=Ap[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&Ap.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ut]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ut]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wp(e){this._internalRoot=e}Gp.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;dp(n,xu(),e,t,null,null)},Gp.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),Du(),t[dt]=null}};function Gp(e){this._internalRoot=e}Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ap.length&&t!==0&&t<Ap[n].priority;n++);Ap.splice(n,0,e),n===0&&Fp(e)}};var Kp=n.version;if(Kp!==`19.2.8`)throw Error(a(527,Kp,`19.2.8`));ae.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var qp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:A,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jp.isDisabled&&Jp.supportsFiber)try{Re=Jp.inject(qp),ze=Jp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=ec,s=tc,c=nc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lp(e,1,!1,null,null,n,r,null,i,s,c,Up),e[dt]=t.current,jd(e),new Wp(t)}})),wy=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Cy()})),W=e(ie(),1),Ty=e(wy(),1);function Ey(e,t,n){return r=>{if(!(t.length===0||t.some(t=>!ze(r.getAll(t),e.getAll(t)))))return Ge(22,t.join(`,`),r),r;let i=Dy(e,t,n);return Ge(23,t.join(`,`),r,i),i}}function Dy(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of Array.from(e.keys()))t.includes(n)||r.delete(n);return r}var Oy=Le(`queue-reset`,()=>({mutex:0}));function ky(e=1){Oy.mutex=e}function Ay(e=jy){Oy.mutex=Math.max(0,Oy.mutex-1),!(Oy.mutex>0)&&e()}
12function jy(){Ge(19),qn.abortAll(),Tt.abort().forEach(e=>qn.queuedQuerySync.emit(e))}function My(e){return Le(`history-emitter.${e}`,()=>_t())}var Ny=`__nuqs__`;function Py(e){return typeof history>`u`?!1:history.nuqs?.version&&history.nuqs.version!==`2.9.5`?(console.error(Ot(409),history.nuqs.version,En,e),!1):!history.nuqs?.adapters?.includes(e)}function Fy(e){history.nuqs=history.nuqs??{version:`2.9.5`,adapters:[]},history.nuqs.adapters.push(e)}function Iy(e,t){if(!Py(t))return;let n=typeof location==`object`?location.search:``;e.on(`update`,e=>{let t=e.toString();n=t.length?`?`+t:``}),window.addEventListener(`popstate`,()=>{n=location.search,jy()}),Ge(21,En,t);function r(t){Ay();try{if(new URL(t,location.origin).search===n)return}catch{}try{e.emit(`update`,De(t))}catch(e){console.error(e)}}let i=history.pushState,a=history.replaceState;history.pushState=function(e,t,n){i.call(history,e,``,n),n&&t!==`__nuqs__`&&r(n)},history.replaceState=function(e,t,n){a.call(history,e,``,n),n&&t!==`__nuqs__`&&r(n)},Fy(t)}function Ly({adapter:e,useNavigate:t,useSearchParams:n}){let r=My(e);function i(n){let i=t();return{searchParams:a(n),updateUrl:(0,W.useCallback)((t,n)=>{(0,W.startTransition)(()=>{r.emit(`update`,t)});let a=new URL(location.href);a.search=Xe(t),Ge(20,e,a);let o=n.history===`push`?history.pushState:history.replaceState;ky(n.shallow?1:2),o.call(history,history.state,Ny,a);let s;if(n.shallow===!1){let e=i({hash:a.hash,search:a.search},{replace:!0,preventScrollReset:!0,state:history.state?.usr});e instanceof Promise&&(s=e)}return n.scroll&&window.scrollTo(0,0),s},[i]),autoResetQueueOnUpdate:!1}}function a(e=[]){let[t]=n(typeof location>`u`?new URLSearchParams:new URLSearchParams(location.search)),[i,a]=(0,W.useState)(()=>typeof location>`u`?Dy(t,e,!0):Dy(new URLSearchParams(location.search),e,!1));return(0,W.useEffect)(()=>{function t(){(0,W.startTransition)(()=>{a(Ey(new URLSearchParams(location.search),e,!1))})}function n(t){(0,W.startTransition)(()=>{a(Ey(t,e,!0))})}r.on(`update`,n),window.addEventListener(`popstate`,t);let o=Ey(new URLSearchParams(location.search),e,!1)(i);return o.toString()!==i.toString()&&a(o),()=>{r.off(`update`,n),window.removeEventListener(`popstate`,t)}},[e.join(`&`)]),i}return Iy(r,e),{NuqsAdapter:Ct(i),useOptimisticSearchParams:a}}var Ry=Ly({adapter:`react-router-v7`,useNavigate:s,useSearchParams:at}),zy=Ry.NuqsAdapter;Ry.useOptimisticSearchParams;var By=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){console.warn(`[react-gtm]`,e)}})),Vy=t(((e,t)=>{var n=r(By());function r(e){return e&&e.__esModule?e:{default:e}}t.exports={tags:function(e){var t=e.id,r=e.events,i=e.dataLayer,a=e.dataLayerName,o=e.preview,s=`&gtm_auth=`+e.auth,c=`&gtm_preview=`+o;return t||(0,n.default)(`GTM Id is required`),{iframe:`
13      <iframe src="https://www.googletagmanager.com/ns.html?id=`+t+s+c+`&gtm_cookies_win=x"
14        height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`,script:`
15      (function(w,d,s,l,i){w[l]=w[l]||[];
16        w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', `+JSON.stringify(r).slice(1,-1)+`});
17        var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
18        j.async=true;
18j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'`+s+c+`&gtm_cookies_win=x';
19        f.parentNode.insertBefore(j,f);
20      })(window,document,'script','`+a+`','`+t+`');`,dataLayerVar:this.dataLayer(i,a)}},dataLayer:function(e,t){return`
21      window.`+t+` = window.`+t+` || [];
22      window.`+t+`.push(`+JSON.stringify(e)+`)`}}})),Hy=t(((e,t)=>{var n=r(Vy());function r(e){return e&&e.__esModule?e:{default:e}}t.exports={dataScript:function(e){var t=document.createElement(`script`);return t.innerHTML=e,t},gtm:function(e){var t=n.default.tags(e);return{noScript:function(){var e=document.createElement(`noscript`);return e.innerHTML=t.iframe,e},script:function(){var e=document.createElement(`script`);return e.innerHTML=t.script,e},dataScript:this.dataScript(t.dataLayerVar)}},initialize:function(e){var t=e.gtmId,n=e.events,r=n===void 0?{}:n,i=e.dataLayer,a=e.dataLayerName,o=a===void 0?`dataLayer`:a,s=e.auth,c=s===void 0?``:s,l=e.preview,u=l===void 0?``:l,d=this.gtm({id:t,events:r,dataLayer:i||void 0,dataLayerName:o,auth:c,preview:u});i&&document.head.appendChild(d.dataScript),document.head.insertBefore(d.script(),document.head.childNodes[0]),document.body.insertBefore(d.noScript(),document.body.childNodes[0])},dataLayer:function(e){var t=e.dataLayer,r=e.dataLayerName,i=r===void 0?`dataLayer`:r;if(window[i])return window[i].push(t);var a=n.default.dataLayer(t,i),o=this.dataScript(a);document.head.insertBefore(o,document.head.childNodes[0])}}})),Uy=e(t(((e,t)=>{var n=r(Hy());function r(e){return e&&e.__esModule?e:{default:e}}t.exports=n.default}))(),1);function Wy(e){return(0,W.useEffect)(()=>{let e=fn(`GTM_ID`,`GTM-TNB4GJL`);if(e){let t={gtmId:e};Uy.default.initialize(t)}},[]),e.children}var G;if(typeof window>`u`){var Gy={hostname:``};G={crypto:{randomUUID:function(){throw Error(`unsupported`)}},navigator:{userAgent:``,onLine:!0},document:{createElement:function(){return{}},location:Gy,referrer:``},screen:{width:0,height:0},location:Gy,addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){},CustomEvent:function(){}}}else G=window;var Ky={DEBUG:!1,LIB_VERSION:`2.82.0`},qy=`__mp_targeting`,Jy=`__mp_recorder`,Yy=`__MP_RECORDER_FILENAME__`,Xy=`__MP_TARGETING_FILENAME__`;function Zy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qy(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function $y(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Qy(a,r,i,o,s,`next`,e)}function s(e){Qy(a,r,i,o,s,`throw`,e)}o(void 0)})}}function eb(e,t,n){return eb=pb()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&lb(i,n.prototype),i},eb.apply(null,arguments)}function tb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nb(e,t,n){return t&&tb(e.prototype,t),e}function rb(){return rb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rb.apply(this,arguments)}function ib(e){return ib=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ib(e)}function ab(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lb(e,t)}function ob(e,t){return t!=null&&typeof Symbol<`u`&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function sb(e){return Function.toString.call(e).indexOf(`[native code]`)!==-1}function cb(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function lb(e,t){return lb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},lb(e,t)}function ub(e){"@swc/helpers - typeof";return e&&typeof Symbol<`u`&&e.constructor===Symbol?`symbol`:typeof e}function db(e,t){if(e){if(typeof e==`string`)return Zy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(n);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zy(e,t)}}function fb(e){var t=typeof Map==`function`?new Map:void 0;return fb=function(e){if(e===null||!sb(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return eb(e,arguments,ib(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),lb(n,e)},fb(e)}function pb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pb=function(){return!!e})()}function K(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=db(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mb(e,t){var n,r,i,a,o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return c([e,t])}}function c(a){if(n)throw TypeError(`Generator is already executing.`);for(;o;)try{if(n=1,r&&(i=a[0]&2?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function hb(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
22if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}var gb=Object.defineProperty,_b=function(e,t,n){return t in e?gb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},q=function(e,t,n){return _b(e,(t===void 0?`undefined`:ub(t))===`symbol`?t:t+``,n)},vb=Object.defineProperty,yb=function(e,t,n){return t in e?vb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},bb=function(e,t,n){return yb(e,(t===void 0?`undefined`:ub(t))===`symbol`?t:t+``,n)},xb=function(e){return e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e}(xb||{}),Sb={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},Cb={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},wb={},Tb=function(){return!!globalThis.Zone};function Eb(e){if(wb[e])return wb[e];var t=globalThis[e],n=t.prototype,r=e in Sb?Sb[e]:void 0,i=!!(r&&r.every(function(e){return!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`)})),a=e in Cb?Cb[e]:void 0,o=!!(a&&a.every(function(e){return typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)}));if(i&&o&&!Tb())return wb[e]=t.prototype,t.prototype;try{var s=document.createElement(`iframe`);document.body.appendChild(s);var c=s.contentWindow;if(!c)return t.prototype;var l=c[e].prototype;return document.body.removeChild(s),l?wb[e]=l:n}catch{return n}}var Db={};function Ob(e,t,n){var r=e+`.`+String(n);if(Db[r])return Db[r].call(t);var i=Eb(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?(Db[r]=a,a.call(t)):t[n]}var kb={};function Ab(e,t,n){var r=e+`.`+String(n);if(kb[r])return kb[r].bind(t);var i=Eb(e)[n];return typeof i==`function`?(kb[r]=i,i.bind(t)):t[n]}function jb(e){return Ob(`Node`,e,`childNodes`)}function Mb(e){return Ob(`Node`,e,`parentNode`)}function Nb(e){return Ob(`Node`,e,`parentElement`)}function Pb(e){return Ob(`Node`,e,`textContent`)}function Fb(e,t){return Ab(`Node`,e,`contains`)(t)}function Ib(e){return Ab(`Node`,e,`getRootNode`)()}function Lb(e){return!e||!(`host`in e)?null:Ob(`ShadowRoot`,e,`host`)}function Rb(e){return e.styleSheets}function zb(e){return!e||!(`shadowRoot`in e)?null:Ob(`Element`,e,`shadowRoot`)}function Bb(e,t){return Ob(`Element`,e,`querySelector`)(t)}function Vb(e,t){return Ob(`Element`,e,`querySelectorAll`)(t)}function Hb(){return Eb(`MutationObserver`).constructor}function Ub(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch{return function(){}}}var Wb={childNodes:jb,parentNode:Mb,parentElement:Nb,textContent:Pb,contains:Fb,getRootNode:Ib,host:Lb,styleSheets:Rb,shadowRoot:zb,querySelector:Bb,querySelectorAll:Vb,mutationObserver:Hb,patch:Ub};function Gb(e){return e.nodeType===e.ELEMENT_NODE}function Kb(e){var t=e&&`host`in e&&`mode`in e&&Wb.host(e)||null;return!!(t&&`shadowRoot`in t&&Wb.shadowRoot(t)===e)}function qb(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function Jb(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(/\sbackground-clip:\s*text;/g,` -webkit-background-clip: text; background-clip: text;`)),e}function Yb(e){var t=e.cssText;if(t.split(`"`).length<3)return t;var n=[`@import`,`url(`+JSON.stringify(e.href)+`)`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(`+e.layerName+`)`),e.supportsText&&n.push(`supports(`+e.supportsText+`)`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function Xb(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=e.href;return!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href),Jb(Array.from(t,function(e){return Zb(e,n)}).join(``))}catch{return null}}function Zb(e,t){if($b(e)){var n;try{n=Xb(e.styleSheet)||Yb(e)}catch{n=e.cssText}return e.styleSheet.href?mx(n,e.styleSheet.href):n}var r=e.cssText;return ex(e)&&e.selectorText.includes(`:`)&&(r=Qb(r)),t?mx(r,t):r}function Qb(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function $b(e){return`styleSheet`in e}function ex(e){return`selectorText`in e}var tx=function(){function e(){bb(this,`idNodeMap`,new Map),bb(this,`nodeMetaMap`,new WeakMap)}var t=e.prototype;return t.getId=function(e){return e?this.getMeta(e)?.id??-1:-1},t.getNode=function(e){return this.idNodeMap.get(e)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.removeNodeFromMap=function(e,t){var n=this;t===void 0&&(t=!1);var r=this.getId(e);this.idNodeMap.delete(r),t&&this.nodeMetaMap.delete(e),e.childNodes&&e.childNodes.forEac
22h(function(e){return n.removeNodeFromMap(e,t)})},t.has=function(e){return this.idNodeMap.has(e)},t.hasNode=function(e){return this.nodeMetaMap.has(e)},t.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},t.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function nx(){return new tx}function rx(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,a=e.value,o=e.maskInputFn,s=a||``,c=i&&ix(i);return(n[r.toLowerCase()]||c&&n[c])&&(s=o?o(s,t):`*`.repeat(s.length)),s}function ix(e){return e.toLowerCase()}var ax=`__rrweb_original__`;function ox(e){var t=e.getContext(`2d`);if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var i=0;i<e.height;i+=n){var a=t.getImageData,o=ax in a?a[ax]:a;if(new Uint32Array(o.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(function(e){return e!==0}))return!1}return!0}function sx(e){var t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?ix(t):null}function cx(e,t){var n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}function lx(e){var t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var ux=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,dx=/^(?:[a-z+]+:)?\/\//i,fx=/^www\..*/i,px=/^(data:)([^,]*),(.*)/i;function mx(e,t){return(e||``).replace(ux,function(e,n,r,i,a,o){var s=r||a||o,c=n||i||``;if(!s)return e;if(dx.test(s)||fx.test(s)||px.test(s))return`url(`+c+s+c+`)`;if(s[0]===`/`)return`url(`+c+(lx(t)+s)+c+`)`;var l=t.split(`/`),u=s.split(`/`);l.pop();for(var d=K(u),f;!(f=d()).done;){var p=f.value;p!==`.`&&(p===`..`?l.pop():l.push(p))}return`url(`+c+l.join(`/`)+c+`)`})}function hx(e,t){return t===void 0&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``).replace(/0px/g,`0`)}function gx(e,t,n){n===void 0&&(n=!1);var r=Array.from(t.childNodes),i=[],a=0;if(r.length>1&&e&&typeof e==`string`){for(var o=hx(e,n),s=o.length/e.length,c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent==`string`){for(var l=hx(r[c].textContent,n),u=100,d=3;d<l.length&&(l[d].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,d),1)!==-1);d++);for(;d<l.length;d++){var f=l.substring(0,d),p=o.split(f),m=-1;if(p.length===2)m=p[0].length;else if(p.length>2&&p[0]===``&&r[c-1].textContent!==``)m=o.indexOf(f,1);else if(p.length===1){if(f=f.substring(0,f.length-1),p=o.split(f),p.length<=1)return i.push(e),i;d=u+1}else d===l.length-1&&(m=o.indexOf(f));if(p.length>=2&&d>u){var h=r[c-1].textContent;if(h&&typeof h==`string`){var g=hx(h).length;m=o.indexOf(f,g)}m===-1&&(m=p[0].length)}if(m!==-1){for(var _=Math.floor(m/s);_>0&&_<e.length;){if(a+=1,a>50*r.length)return i.push(e),i;var v=hx(e.substring(0,_),n);if(v.length===m){i.push(e.substring(0,_)),e=e.substring(_),o=o.substring(m);break}v.length<m?_+=Math.max(1,Math.floor((m-v.length)/s)):_-=Math.max(1,Math.floor((v.length-m)*s))}break}}}}return i.push(e),i}function _x(e,t){return gx(e,t).join(`/* rr_split */`)}var vx=1,yx=RegExp(`[^a-z0-9-_:]`),bx=-2;function xx(){return vx++}function Sx(e){if(ob(e,HTMLFormElement))return`form`;var t=ix(e.tagName);return yx.test(t)?`div`:t}var Cx,wx,Tx=/^[^ \t\n\r\u000c]+/,Ex=/^[, \t\n\r\u000c]+/;function Dx(e,t){if(t.trim()===``)return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}for(var i=[];r(Ex),!(n>=t.length);){var a=r(Tx);if(a.slice(-1)===`,`)a=kx(e,a.substring(0,a.length-1)),i.push(a);else{var o=``;a=kx(e,a);for(var s=!1;;){var c=t.charAt(n);if(c===``){i.push((a+o).trim());break}if(s)c===`)`&&(s=!1);else{if(c===`,`){n+=1,i.push((a+o).trim());break}c===`(`&&(s=!0)}o+=c,n+=1}}}return i.join(`, `)}var Ox=new WeakMap;function kx(e,t){return!t||t.trim()===``?t:jx(e,t)}function Ax(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function jx(e,t){var n=Ox.get(e);if(n||(n=e.createElement(`a`),Ox.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function Mx(e,t,n,r){return r&&(n===`src`||n===`href`&&(t!==`use`||r[0]!==`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`)?kx(e,r):n===`srcset`?Dx(e,r):n===`style`?mx(r,jx(e)):t===`object`&&n===`data`?kx(e,r):r)}function Nx(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function Px(e,t,n){try{if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}
22function Fx(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Fx(Wb.parentNode(e),t,n):!1;for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return n?Fx(Wb.parentNode(e),t,n):!1}function Ix(e,t,n,r){var i;if(Gb(e)){if(i=e,!Wb.childNodes(i).length)return!1}else if(Wb.parentElement(e)===null)return!1;else i=Wb.parentElement(e);try{if(typeof t==`string`){if(r){if(i.closest(`.`+t))return!0}else if(i.classList.contains(t))return!0}else if(Fx(i,t,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch{}return!1}function Lx(e,t,n){var r=e.contentWindow;if(r){var i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){var o=setTimeout(function(){i||=(t(),!0)},n);e.addEventListener(`load`,function(){clearTimeout(o),i=!0,t()});return}var s=`about:blank`;if(r.location.href!==s||e.src===s||e.src===``)return setTimeout(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}}function Rx(e,t,n){var r=!1,i;try{i=e.sheet}catch{return}if(!i){var a=setTimeout(function(){r||=(t(),!0)},n);e.addEventListener(`load`,function(){clearTimeout(a),r=!0,t()})}}function zx(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,a=t.blockSelector,o=t.needsMask,s=t.inlineStylesheet,c=t.maskInputOptions,l=c===void 0?{}:c,u=t.maskTextFn,d=t.maskInputFn,f=t.dataURLOptions,p=f===void 0?{}:f,m=t.inlineImages,h=t.recordCanvas,g=t.keepIframeSrcFn,_=t.newlyAddedElement,v=_!==void 0&&_,y=t.cssCaptured,b=y!==void 0&&y,x=Bx(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:xb.Document,childNodes:[]}:{type:xb.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:xb.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return Hx(e,{doc:n,blockClass:i,blockSelector:a,inlineStylesheet:s,maskInputOptions:l,maskInputFn:d,dataURLOptions:p,inlineImages:m,recordCanvas:h,keepIframeSrcFn:g,newlyAddedElement:v,rootId:x});case e.TEXT_NODE:return Vx(e,{doc:n,needsMask:o,maskTextFn:u,rootId:x,cssCaptured:b});case e.CDATA_SECTION_NODE:return{type:xb.CDATA,textContent:``,rootId:x};case e.COMMENT_NODE:return{type:xb.Comment,textContent:Wb.textContent(e)||``,rootId:x};default:return!1}}function Bx(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function Vx(e,t){var n=t.needsMask,r=t.maskTextFn,i=t.rootId,a=t.cssCaptured,o=Wb.parentNode(e),s=o&&o.tagName,c=``,l=s===`STYLE`||void 0,u=s===`SCRIPT`||void 0;return u?c=`SCRIPT_PLACEHOLDER`:a||(c=Wb.textContent(e),l&&c&&(c=mx(c,jx(t.doc)))),!l&&!u&&c&&n&&(c=r?r(c,Wb.parentElement(e)):c.replace(/[\S]/g,`*`)),{type:xb.Text,textContent:c||``,rootId:i}}function Hx(e,t){for(var n=t.doc,r=t.blockClass,i=t.blockSelector,a=t.inlineStylesheet,o=t.maskInputOptions,s=o===void 0?{}:o,c=t.maskInputFn,l=t.dataURLOptions,u=l===void 0?{}:l,d=t.inlineImages,f=t.recordCanvas,p=t.keepIframeSrcFn,m=t.newlyAddedElement,h=m!==void 0&&m,g=t.rootId,_=Px(e,r,i),v=Sx(e),y={},b=e.attributes.length,x=0;x<b;x++){var S=e.attributes[x];Nx(v,S.name,S.value)||(y[S.name]=Mx(n,v,ix(S.name),S.value))}if(v===`link`&&a){var C=Array.from(n.styleSheets).find(function(t){return t.href===e.href}),w=null;C&&(w=Xb(C)),w&&(delete y.rel,delete y.href,y._cssText=w)}if(v===`style`&&e.sheet){var T=Xb(e.sheet);T&&(e.childNodes.length>1&&(T=_x(T,e)),y._cssText=T)}if(v===`input`||v===`textarea`||v===`select`){var E=e.value,ee=e.checked;y.type!==`radio`&&y.type!==`checkbox`&&y.type!==`submit`&&y.type!==`button`&&E?y.value=rx({element:e,type:sx(e),tagName:v,value:E,maskInputOptions:s,maskInputFn:c}):ee&&(y.checked=ee)}if(v===`option`&&(e.selected&&!s.select?y.selected=!0:delete y.selected),v===`dialog`&&e.open&&(y.rr_open_mode=e.matches(`dialog:modal`)?`modal`:`non-modal`),v===`canvas`&&f){if(e.__context===`2d`)ox(e)||(y.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){var D=e.toDataURL(u.type,u.quality),te=n.createElement(`canvas`);te.width=e.width,te.height=e.height,D!==te.toDataURL(u.type,u.quality)&&(y.rr_dataURL=D)}}if(v===`img`&&d){Cx||(Cx=n.createElement(`canvas`),wx=Cx.getContext(`2d`));var ne=e,O=ne.currentSrc||ne.getAttribute(`src`)||`<unknown-src>`,re=ne.crossOrigin,k=function(){ne.removeEventListener(`load`,k);
22try{Cx.width=ne.naturalWidth,Cx.height=ne.naturalHeight,wx.drawImage(ne,0,0),y.rr_dataURL=Cx.toDataURL(u.type,u.quality)}catch(e){if(ne.crossOrigin!==`anonymous`){ne.crossOrigin=`anonymous`,ne.complete&&ne.naturalWidth!==0?k():ne.addEventListener(`load`,k);return}console.warn(`Cannot inline img src=`+O+`! Error: `+e)}ne.crossOrigin===`anonymous`&&(re?y.crossOrigin=re:ne.removeAttribute(`crossorigin`))};ne.complete&&ne.naturalWidth!==0?k():ne.addEventListener(`load`,k)}if(v===`audio`||v===`video`){var ie=y;ie.rr_mediaState=e.paused?`paused`:`played`,ie.rr_mediaCurrentTime=e.currentTime,ie.rr_mediaPlaybackRate=e.playbackRate,ie.rr_mediaMuted=e.muted,ie.rr_mediaLoop=e.loop,ie.rr_mediaVolume=e.volume}if(h||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),_){var A=e.getBoundingClientRect(),ae=A.width,oe=A.height;y={class:y.class,rr_width:``+ae+`px`,rr_height:``+oe+`px`}}v===`iframe`&&!p(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src);var se;try{customElements.get(v)&&(se=!0)}catch{}return{type:xb.Element,tagName:v,attributes:y,childNodes:[],isSVG:Ax(e)||void 0,needBlock:_,rootId:g,isCustom:se}}function Ux(e){return e==null?``:e.toLowerCase()}function Wx(e,t){return!!(t.comment&&e.type===xb.Comment||e.type===xb.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`&&e.attributes.as===`script`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&cx(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(Ux(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Ux(e.attributes.name)===`application-name`||Ux(e.attributes.rel)===`icon`||Ux(e.attributes.rel)===`apple-touch-icon`||Ux(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&Ux(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(Ux(e.attributes.property).match(/^(og|twitter|fb):/)||Ux(e.attributes.name).match(/^(og|twitter):/)||Ux(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(Ux(e.attributes.name)===`robots`||Ux(e.attributes.name)===`googlebot`||Ux(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(Ux(e.attributes.name)===`author`||Ux(e.attributes.name)===`generator`||Ux(e.attributes.name)===`framework`||Ux(e.attributes.name)===`publisher`||Ux(e.attributes.name)===`progid`||Ux(e.attributes.property).match(/^article:/)||Ux(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(Ux(e.attributes.name)===`google-site-verification`||Ux(e.attributes.name)===`yandex-verification`||Ux(e.attributes.name)===`csrf-token`||Ux(e.attributes.name)===`p:domain_verify`||Ux(e.attributes.name)===`verify-v1`||Ux(e.attributes.name)===`verification`||Ux(e.attributes.name)===`shopify-checkout-api-token`))))}function Gx(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,a=t.blockSelector,o=t.maskTextClass,s=t.maskTextSelector,c=t.skipChild,l=c!==void 0&&c,u=t.inlineStylesheet,d=u===void 0||u,f
22=t.maskInputOptions,p=f===void 0?{}:f,m=t.maskTextFn,h=t.maskInputFn,g=t.slimDOMOptions,_=t.dataURLOptions,v=_===void 0?{}:_,y=t.inlineImages,b=y!==void 0&&y,x=t.recordCanvas,S=x!==void 0&&x,C=t.onSerialize,w=t.onIframeLoad,T=t.iframeLoadTimeout,E=T===void 0?5e3:T,ee=t.onStylesheetLoad,D=t.stylesheetLoadTimeout,te=D===void 0?5e3:D,ne=t.keepIframeSrcFn,O=ne===void 0?function(){return!1}:ne,re=t.newlyAddedElement,k=re!==void 0&&re,ie=t.cssCaptured,A=ie!==void 0&&ie,ae=t.needsMask,oe=t.preserveWhiteSpace,se=oe===void 0||oe;ae||=Ix(e,o,s,ae===void 0);var ce=zx(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:ae,inlineStylesheet:d,maskInputOptions:p,maskTextFn:m,maskInputFn:h,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:O,newlyAddedElement:k,cssCaptured:A});if(!ce)return console.warn(e,`not serialized`),null;var le=r.hasNode(e)?r.getId(e):Wx(ce,g)||!se&&ce.type===xb.Text&&!ce.textContent.replace(/^\s+|\s+$/gm,``).length?bx:xx(),j=Object.assign(ce,{id:le});if(r.add(e,j),le===bx)return null;C&&C(e);var ue=!l;if(j.type===xb.Element){ue&&=!j.needBlock,delete j.needBlock;var de=Wb.shadowRoot(e);de&&qb(de)&&(j.isShadowHost=!0)}if((j.type===xb.Document||j.type===xb.Element)&&ue){g.headWhitespace&&j.type===xb.Element&&j.tagName===`head`&&(se=!1);var fe={doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:ae,maskTextClass:o,maskTextSelector:s,skipChild:l,inlineStylesheet:d,maskInputOptions:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:g,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:se,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:O,cssCaptured:!1};if(j.type!==xb.Element||j.tagName!==`textarea`||j.attributes.value===void 0){j.type===xb.Element&&j.attributes._cssText!==void 0&&typeof j.attributes._cssText==`string`&&(fe.cssCaptured=!0);for(var pe=K(Array.from(Wb.childNodes(e))),me;!(me=pe()).done;){var he=me.value,ge=Gx(he,fe);ge&&j.childNodes.push(ge)}}var _e=null;if(Gb(e)&&(_e=Wb.shadowRoot(e)))for(var M=K(Array.from(Wb.childNodes(_e))),ve;!(ve=M()).done;){var N=ve.value,ye=Gx(N,fe);ye&&(qb(_e)&&(ye.isShadow=!0),j.childNodes.push(ye))}}var be=Wb.parentNode(e);return be&&Kb(be)&&qb(be)&&(j.isShadow=!0),j.type===xb.Element&&j.tagName===`iframe`&&Lx(e,function(){var t=e.contentDocument;if(t&&w){var n=Gx(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,needsMask:ae,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:g,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:se,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:O});n&&w(e,n)}},E),j.type===xb.Element&&j.tagName===`link`&&typeof j.attributes.rel==`string`&&(j.attributes.rel===`stylesheet`||j.attributes.rel===`preload`&&typeof j.attributes.href==`string`&&cx(j.attributes.href)===`css`)&&Rx(e,function(){if(ee){var t=Gx(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:ae,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:g,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:se,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:O});t&&ee(e,t)}},te),j}function Kx(e,t){var n=t||{},r=n.mirror,i=r===void 0?new tx:r,a=n.blockClass,o=a===void 0?`rr-block`:a,s=n.blockSelector,c=s===void 0?null:s,l=n.maskTextClass,u=l===void 0?`rr-mask`:l,d=n.maskTextSelector,f=d===void 0?null:d,p=n.inlineStylesheet,m=p===void 0||p,h=n.inl
22ineImages,g=h!==void 0&&h,_=n.recordCanvas,v=_!==void 0&&_,y=n.maskAllInputs,b=y!==void 0&&y,x=n.maskTextFn,S=n.maskInputFn,C=n.slimDOM,w=C!==void 0&&C,T=n.dataURLOptions,E=n.preserveWhiteSpace,ee=n.onSerialize,D=n.onIframeLoad,te=n.iframeLoadTimeout,ne=n.onStylesheetLoad,O=n.stylesheetLoadTimeout,re=n.keepIframeSrcFn;return Gx(e,{doc:e,mirror:i,blockClass:o,blockSelector:c,maskTextClass:u,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:b===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:b===!1?{password:!0}:b,maskTextFn:x,maskInputFn:S,slimDOMOptions:w===!0||w===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:w===!1?{}:w,dataURLOptions:T,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:ee,onIframeLoad:D,iframeLoadTimeout:te,onStylesheetLoad:ne,stylesheetLoadTimeout:O,keepIframeSrcFn:re===void 0?function(){return!1}:re,newlyAddedElement:!1})}function qx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function Jx(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return ob(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Yx={exports:{}},Xx=String,Zx=function(){return{isColorSupported:!1,reset:Xx,bold:Xx,dim:Xx,italic:Xx,underline:Xx,inverse:Xx,hidden:Xx,strikethrough:Xx,black:Xx,red:Xx,green:Xx,yellow:Xx,blue:Xx,magenta:Xx,cyan:Xx,white:Xx,gray:Xx,bgBlack:Xx,bgRed:Xx,bgGreen:Xx,bgYellow:Xx,bgBlue:Xx,bgMagenta:Xx,bgCyan:Xx,bgWhite:Xx}};Yx.exports=Zx(),Yx.exports.createColors=Zx;var Qx=Yx.exports,$x=Jx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),eS=Qx,tS=$x,nS=function(e){ab(t,e);function t(n,r,i,a,o,s){var c=e.call(this,n)||this;return c.name=`CssSyntaxError`,c.reason=n,o&&(c.file=o),a&&(c.source=a),s&&(c.plugin=s),r!==void 0&&i!==void 0&&(typeof r==`number`?(c.line=r,c.column=i):(c.line=r.line,c.column=r.column,c.endLine=i.line,c.endColumn=i.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,t),c}var n=t.prototype;return n.setMessage=function(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return``;var n=this.source;e??=eS.isColorSupported,tS&&e&&(n=tS(n));var r=n.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,r.length),o=String(a).length,s,c;if(e){var l=eS.createColors(!0),u=l.bold,d=l.gray,f=l.red;s=function(e){return u(f(e))},c=function(e){return d(e)}}else s=c=function(e){return e};return r.slice(i,a).map(function(e,n){var r=i+1+n,a=` `+(` `+r).slice(-o)+` | `;if(r===t.line){var l=c(a.replace(/\d/g,` `))+e.slice(0,t.column-1).replace(/[^\t]/g,` `);return s(`>`)+c(a)+e+`
23 `+l+s(`^`)}return` `+c(a)+e}).join(`
24`)},n.toString=function(){var e=this.showSourceCode();return e&&=`
25
26`+e+`
27`,this.name+`: `+this.message+e},t}(fb(Error)),rS=nS;nS.default=nS;var iS={};iS.isClean=Symbol(`isClean`),iS.my=Symbol(`my`);var aS={after:`
28`,beforeClose:`
29`,beforeComment:`
30`,beforeDecl:`
31`,beforeOpen:` `,beforeRule:`
32`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:`    `,semicolon:!1};function oS(e){return e[0].toUpperCase()+e.slice(1)}var sS=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{var i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){for(var n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`),r=e.parent,i=0;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(`
33`)){var a=this.raw(e,null,`indent`);if(a.length)for(var o=0;o<i;o++)n+=a}return n},t.block=function(e,t){var n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);var r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)},t.body=function(e){for(var t=e.nodes.length-1;t>0&&e.nodes[t].type===`comment`;)--t;for(var n=this.raw(e,`semicolon`),r=0;r<e.nodes.length;r++){var i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}},t.comment=function(e){var t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)},t.decl=function(e,t){var n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,n){var r;if(n||=t,t&&(r=e.raws[t],r!==void 0))return r;var i=e.parent;if(n===`before`&&(!i||i.type===`root`&&i.first===e||i&&i.type===`document`))return``;if(!i)return aS[n];var a=e.root();if(a.rawCache||={},a.rawCache[n]!==void 0)return a.rawCache[n];if(n===`before`||n===`after`)return this.beforeAfter(e,n);var o=`raw`+oS(n);return this[o]?r=this[o](a,e):a.walk(function(e){if(r=e.raws[t],r!==void 0)return!1}),r===void 0&&(r=aS[n]),a.rawCache[n]=r,r},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(`
34`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
35`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
36`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
37`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t},t.rawIndent=function(e){if(e.raws.indent)return e.raws.indent;var t;return e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){var i=n.raws.before.split(`
38`);return t=i[i.length-1],t=t.replace(/\S/g,``),!1}}),t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)},t.stringify=function(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)},e}(),cS=sS;sS.default=sS;var lS=cS;function uS(e,t){new lS(t).stringify(e)}var dS=uS;uS.default=uS;var fS=iS.isClean,pS=iS.my,mS=rS,hS=cS,gS=dS;function _S(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r!==`proxyCache`){var i=e[r],a=i===void 0?`undefined`:ub(i);r===`parent`&&a===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return _S(e,n)}):(a===`object`&&i!==null&&(i=_S(i)),n[r]=i)}return n}var vS=function(){function e(e){for(var t in e===void 0&&(e={}),this.raws={},this[fS]=!1,this[pS]=!0,e)if(t===`nodes`){this.nodes=[];for(var n=K(e[t]),r;!(r=n()).done;){var i=r.value;typeof i.clone==`function`?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&`+t.input.from+`:`+t.start.line+`:`+t.start.column+`$&`)}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in e===void 0&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){e===void 0&&(e={});var t=_S(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){e===void 0&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){e===void 0&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(t===void 0&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new mS(e)},t.getProxyProcessor=function(){return{get:function(e,t){return t===`proxyOf`?e:t===`root`?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}},t.markDirty=function(){if(this[fS]){this[fS]=!1;for(var e=this;e=e.parent;)e[fS]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();
38var r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n},t.positionInside=function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,a=0;a<e;a++)n[a]===`
39`?(r=1,i+=1):r+=1;return{column:r,line:i}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}},t.raw=function(e,t){return new hS().raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){var e=[...arguments];if(this.parent){for(var t=this,n=!1,r=K(e),i;!(i=r()).done;){var a=i.value;a===this?n=!0:n?(this.parent.insertAfter(t,a),t=a):this.parent.insertBefore(t,a)}n||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&e.parent.type!==`document`;)e=e.parent;return e},t.toJSON=function(e,t){var n={},r=t==null;t||=new Map;var i=0;for(var a in this)if(Object.prototype.hasOwnProperty.call(this,a)&&a!==`parent`&&a!==`proxyCache`){var o=this[a];if(Array.isArray(o))n[a]=o.map(function(e){return(e===void 0?`undefined`:ub(e))===`object`&&e.toJSON?e.toJSON(null,t):e});else if((o===void 0?`undefined`:ub(o))===`object`&&o.toJSON)n[a]=o.toJSON(null,t);else if(a===`source`){var s=t.get(o.input);s??(s=i,t.set(o.input,i),i++),n[a]={end:o.end,inputId:s,start:o.start}}else n[a]=o}return r&&(n.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),n},t.toProxy=function(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache},t.toString=function(e){e===void 0&&(e=gS),e.stringify&&(e=e.stringify);var t=``;return e(this,function(e){t+=e}),t},t.warn=function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)},nb(e,[{key:`proxyOf`,get:function(){return this}}]),e}(),yS=vS;vS.default=vS;var bS=function(e){ab(t,e);function t(t){var n;return t&&t.value!==void 0&&typeof t.value!=`string`&&(t=rb({},t,{value:String(t.value)})),n=e.call(this,t)||this,n.type=`decl`,n}return nb(t,[{key:`variable`,get:function(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}]),t}(yS),xS=bS;bS.default=bS;var SS=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,CS={nanoid:function(e){e===void 0&&(e=21);for(var t=``,n=e;n--;)t+=SS[Math.random()*64|0];return t}},wS=$x.SourceMapConsumer,TS=$x.SourceMapGenerator,ES=$x.existsSync,DS=$x.readFileSync,OS=$x.dirname,kS=$x.join;function AS(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}var jS=function(){function e(e,t){if(t.map!==!1){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=OS(this.mapFile)),r&&(this.text=r)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||=new wS(this.text),this.consumerCache},t.decodeInline=function(e){var t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return AS(e.substr(RegExp.lastMatch.length));var r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()},t.isMap=function(e){return(e===void 0?`undefined`:ub(e))===`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);
39if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=OS(e),ES(e))return this.mapFile=e,DS(e,`utf-8`).toString().trim()},t.loadMap=function(e,t){if(t===!1)return!1;if(t){if(typeof t==`string`)return t;if(typeof t==`function`){var n=t(e);if(n){var r=this.loadFile(n);if(!r)throw Error(`Unable to load previous source map: `+n.toString());return r}}else if(ob(t,wS))return TS.fromSourceMap(t).toString();else if(ob(t,TS))return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error(`Unsupported previous source map format: `+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){var i=this.annotation;return e&&(i=kS(OS(e),i)),this.loadFile(i)}},t.startWith=function(e,t){return e?e.substr(0,t.length)===t:!1},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),MS=jS;jS.default=jS;var NS=$x.SourceMapConsumer,PS=$x.SourceMapGenerator,FS=$x.fileURLToPath,IS=$x.pathToFileURL,LS=$x.isAbsolute,RS=$x.resolve,zS=CS.nanoid,BS=$x,VS=rS,HS=MS,US=Symbol(`fromOffsetCac
39he`),WS=!!(NS&&PS),GS=!!(RS&&LS),KS=function(){function e(e,t){if(t===void 0&&(t={}),e==null||(e===void 0?`undefined`:ub(e))===`object`&&!e.toString)throw Error(`PostCSS received `+e+` instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===`￾`?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!GS||/^\w+:\/\//.test(t.from)||LS(t.from)?t.from:RS(t.from)),GS&&WS){var n=new HS(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=`<input css `+zS(6)+`>`),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){r===void 0&&(r={});var i,a,o;if(t&&(t===void 0?`undefined`:ub(t))===`object`){var s=t,c=n;if(typeof s.offset==`number`){var l=this.fromOffset(s.offset);t=l.line,n=l.col}else t=s.line,n=s.column;if(typeof c.offset==`number`){var u=this.fromOffset(c.offset);a=u.line,o=u.col}else a=c.line,o=c.column}else if(!n){var d=this.fromOffset(t);t=d.line,n=d.col}var f=this.origin(t,n,a,o);return i=f?new VS(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,r.plugin):new VS(e,a===void 0?t:{column:n,line:t},a===void 0?n:{column:o,line:a},this.css,this.file,r.plugin),i.input={column:n,endColumn:o,endLine:a,line:t,source:this.css},this.file&&(IS&&(i.input.url=IS(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t,n;if(this[US])n=this[US];else{var r=this.css.split(`
40`);n=Array(r.length);for(var i=0,a=0,o=r.length;a<o;a++)n[a]=i,i+=r[a].length+1;this[US]=n}t=n[n.length-1];var s=0;if(e>=t)s=n.length-1;else for(var c=n.length-2,l;s<c;)if(l=s+(c-s>>1),e<n[l])c=l-1;else if(e>=n[l+1])s=l+1;else{s=l;break}return{col:e-n[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:RS(this.map.consumer().sourceRoot||this.map.root||`.`,e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;var o;
40typeof n==`number`&&(o=i.originalPositionFor({column:r,line:n}));var s=LS(a.source)?IS(a.source):new URL(a.source,this.map.consumer().sourceRoot||IS(this.map.mapFile)),c={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:s.toString()};if(s.protocol===`file:`){if(FS)c.file=FS(s);else throw Error(`file: protocol is not available in this PostCSS build`)}var l=i.sourceContentFor(a.source);return l&&(c.source=l),c},t.toJSON=function(){for(var e={},t=0,n=[`hasBOM`,`css`,`file`,`id`];t<n.length;t++){var r=n[t];this[r]!=null&&(e[r]=this[r])}return this.map&&(e.map=rb({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},nb(e,[{key:`from`,get:function(){return this.file||this.id}}]),e}(),qS=KS;KS.default=KS,BS&&BS.registerInput&&BS.registerInput(KS);var JS=$x.SourceMapConsumer,YS=$x.SourceMapGenerator,XS=$x.dirname,ZS=$x.relative,QS=$x.resolve,$S=$x.sep,eC=$x.pathToFileURL,tC=qS,nC=!!(JS&&YS),rC=!!(XS&&QS&&ZS&&$S),iC=function(){function e(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`,t=`
41`;this.css.includes(`\r
42`)&&(t=`\r
43`),this.css+=t+`/*# sourceMappingURL=`+e+` */`},t.applyPrevMaps=function(){for(var e=K(this.previous()),t;!(t=e()).done;){var n=t.value,r=this.toUrl(this.path(n.file)),i=n.root||XS(n.file),a=void 0;this.mapOpts.sourcesContent===!1?(a=new JS(n.text),a.sourcesContent&&(a.sourcesContent=null)):a=n.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}},t.clearAnnotation=function(){if(this.mapOpts.annotation!==!1){if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t);else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}},t.generate=function(){if(this.clearAnnotation(),rC&&nC&&this.isMap())return this.generateMap();var e=``;return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(this.previous().length===1){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=YS.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new YS({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css=``,this.map=new YS({file:this.outputFile(),ignoreInvalidMapping:!0});var t=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,function(s,c,l){if(e.css+=s,c&&l!==`end`&&(i.generated.line=t,i.generated.column=n-1,c.source&&c.source.start?(i.source=e.sourcePath(c),i.original.line=c.source.start.line,i.original.column=c.source.start.column-1,e.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,e.map.addMapping(i))),a=s.match(/\n/g),a?(t+=a.length,o=s.lastIndexOf(`
44`),n=s.length-o):n+=s.length,c&&l!==`start`){var u=c.parent||{raws:{}};(!(c.type===`decl`||c.type===`atrule`&&!c.nodes)||c!==u.last||u.raws.semicolon)&&(c.source&&c.source.end?(i.source=e.sourcePath(c),i.original.line=c.source.end.line,i.original.column=c.source.end.column-1,i.generated.line=t,i.generated.column=n-2,e.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=n-1,e.map.addMapping(i)))}})},t.isAnnotation=function(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(function(e){return e.annotation}):this.mapOpts.annotation},t.isInline=function(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;var e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(function(e){return e.inline})},t.isMap=function(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map},t.isSourcesContent=function(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(function(e){return e.withContent()}):this.mapOpts.sourcesContent},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`},t.path=function(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?XS(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(n=XS(QS(n,this.mapOpts.annotation)));var r=ZS(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new tC(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(n,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(eC){var n=eC(e).toString();return this.memoizedFileURLs.set(e,n),n}throw Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;$S===`\\`&&(e=e.replace(/\\/g,`/`));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),aC=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`comment`,n}return t}(yS),oC=aC;aC.default=aC;var sC=iS.isClean,cC=iS.my,lC=xS,uC=oC,dC=yS,fC,pC,mC,hC;
44function gC(e){return e.map(function(e){return e.nodes&&=gC(e.nodes),delete e.source,e})}function _C(e){if(e[sC]=!1,e.proxyOf.nodes)for(var t=K(e.proxyOf.nodes),n;!(n=t()).done;){var r=n.value;_C(r)}}var vC=function(e){ab(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.append=function(){for(var e=K([...arguments]),t;!(t=e()).done;)for(var n=t.value,r=K(this.normalize(n,this.last)),i;!(i=r()).done;){var a=i.value;this.proxyOf.nodes.push(a)}return this.markDirty(),this},n.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var n=K(this.nodes),r;!(r=n()).done;)r.value.cleanRaws(t)},n.each=function(e){if(this.proxyOf.nodes){for(var t=this.getIterator(),n,r;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}},n.every=function(e){return this.nodes.every(e)},n.getIterator=function(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},n.getProxyProcessor=function(){return{get:function(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?function(){var n=[...arguments],r;return(r=e)[t].apply(r,[].concat(n.map(function(e){return typeof e==`function`?function(t,n){return e(t.toProxy(),n)}:e})))}:t===`every`||t===`some`?function(n){return e[t](function(e){var t=[...arguments].slice(1);return n.apply(void 0,[e.toProxy()].concat(t))})}:t===`root`?function(){return e.root().toProxy()}:t===`nodes`?e.nodes.map(function(e){return e.toProxy()}):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}},n.index=function(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},n.insertAfter=function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(var i=K(r),a;!(a=i()).done;){var o=a.value;this.proxyOf.nodes.splice(n+1,0,o)}var s;for(var c in this.indexes)s=this.indexes[c],n<s&&(this.indexes[c]=s+r.length);return this.markDirty(),this},n.insertBefore=function(e,t){var n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(var a=K(i),o;!(o=a()).done;){var s=o.value;this.proxyOf.nodes.splice(n,0,s)}var c;for(var l in this.indexes)c=this.indexes[l],n<=c&&(this.indexes[l]=c+i.length);return this.markDirty(),this},n.normalize=function(e,n){var r=this;if(typeof e==`string`)e=gC(fC(e).nodes);else if(e===void 0)e=[];else if(Array.isArray(e)){e=e.slice(0);for(var i=K(e),a;!(a=i()).done;){var o=a.value;o.parent&&o.parent.removeChild(o,`ignore`)}}else if(e.type===`root`&&this.type!==`document`){e=e.nodes.slice(0);for(var s=K(e),c;!(c=s()).done;){var l=c.value;l.parent&&l.parent.removeChild(l,`ignore`)}}else if(e.type)e=[e];else if(e.prop){if(e.value===void 0)throw Error(`Value field is missed in node creation`);typeof e.value!=`string`&&(e.value=String(e.value)),e=[new lC(e)]}else if(e.selector)e=[new pC(e)];else if(e.name)e=[new mC(e)];else if(e.text)e=[new uC(e)];else throw Error(`Unknown node type in node creation`);return e.map(function(e){return e[cC]||t.rebuild(e),e=e.proxyOf,e.parent&&e.parent.removeChild(e),e[sC]&&_C(e),e.raws.before===void 0&&n&&n.raws.before!==void 0&&(e.raws.before=n.raws.before.replace(/\S/g,``)),e.parent=r.proxyOf,e})},n.prepend=function(){var e=[...arguments];e=e.reverse();for(var t=K(e),n;!(n=t()).done;){for(var r=n.value,i=this.normalize(r,this.first,`prepend`).reverse(),a=K(i),o;!(o=a()).done;){var s=o.value;this.proxyOf.nodes.unshift(s)}for(var c in this.indexes)this.indexes[c]=this.indexes[c]+i.length}return this.markDirty(),this},n.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},n.removeAll=function(){for(var e=K(this.proxyOf.nodes),t;!(t=e()).done;){var n=t.value;n.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},n.removeChild=function(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);var t;for(var n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?ob(e,RegExp)?this.walk(function(n,r){if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if(e.type===`atrule`)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if(t.type===`comment`)return e(t,n)})},n.walkDecls=function(e,t){return t?ob(e,RegExp)?this.walk(function(n,r){if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if(e.type===`decl`)return t(e,n)}))},n.walkRules=function(e,t){return t?ob(e,RegExp)?this.walk(function(n,r){if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if(e.type===`rule`)return t(e,n)}))},nb(t,[{key:`first`,get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:`last`,get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(dC);vC.registerParse=function(e){fC=e},vC.registerRule=function(e){pC=e},vC.registerAtRule=function(e){mC=e},vC.registerRoot=function(e){hC=e};var yC=vC;vC.default=vC,vC.rebuild=function(e){e.type===`atrule`?Object.setPrototypeOf(e,mC.prototype):e.type===`rule`?Object.setPrototypeOf(e,pC.prototype):e.type===`decl`?Object.setPrototypeOf(e,lC.prototype):e.type===`comment`?Object.setPrototypeOf(e,uC.prototype):e.type===`root`&&Object.setPrototypeOf(e,hC.prototype),e[cC]=!0,e.nodes&&e.nodes.forEac
44h(function(e){vC.rebuild(e)})};var bC=yC,xC,SC,CC=function(e){ab(t,e);function t(t){var n=e.call(this,rb({type:`document`},t))||this;return n.nodes||=[],n}var n=t.prototype;return n.toResult=function(e){return e===void 0&&(e={}),new xC(new SC,this,e).stringify()},t}(bC);CC.registerLazyResult=function(e){xC=e},CC.registerProcessor=function(e){SC=e};var wC=CC;CC.default=CC;var TC=function(){function e(e,t){if(t===void 0&&(t={}),this.type=`warning`,this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}var t=e.prototype;return t.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text},e}(),EC=TC;TC.default=TC;var DC=EC,OC=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){t===void 0&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new DC(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return e.type===`warning`})},nb(e,[{key:`content`,get:function(){return this.css}}]),e}(),kC=OC;OC.default=OC;var AC=39,jC=34,MC=92,NC=47,PC=10,FC=32,IC=12,LC=9,RC=13,zC=91,BC=93,VC=40,HC=41,UC=123,WC=125,GC=59,KC=42,qC=58,JC=64,YC=/[\t\n\f\r "#'()/;[\\\]{}]/g,XC=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ZC=/.[\r\n"'(/\\]/,QC=/[\da-f]/i,$C=function(e,t){t===void 0&&(t={});var n=e.css.valueOf(),r=t.ignoreErrors,i,a,o,s,c,l,u,d,f,p,m=n.length,h=0,g=[],_=[];function v(){return h}function y(t){throw e.error(`Unclosed `+t,h)}function b(){return _.length===0&&h>=m}function x(e){if(_.length)return _.pop();if(!(h>=m)){var t=e?e.ignoreUnclosed:!1;switch(i=n.charCodeAt(h),i){case PC:case FC:case LC:case RC:case IC:a=h;do a+=1,i=n.charCodeAt(a);while(i===FC||i===PC||i===LC||i===RC||i===IC);p=[`space`,n.slice(h,a)],h=a-1;break;case zC:case BC:case UC:case WC:case qC:case GC:case HC:var v=String.fromCharCode(i);p=[v,v,h];break;case VC:if(d=g.length?g.pop()[1]:``,f=n.charCodeAt(h+1),d===`url`&&f!==AC&&f!==jC&&f!==FC&&f!==PC&&f!==LC&&f!==IC&&f!==RC){a=h;do{if(l=!1,a=n.indexOf(`)`,a+1),a===-1){if(r||t){a=h;break}y(`bracket`)}for(u=a;n.charCodeAt(u-1)===MC;)--u,l=!l}while(l);p=[`brackets`,n.slice(h,a+1),h,a],h=a}else a=n.indexOf(`)`,h+1),s=n.slice(h,a+1),a===-1||ZC.test(s)?p=[`(`,`(`,h]:(p=[`brackets`,s,h,a],h=a);break;case AC:case jC:o=i===AC?`'`:`"`,a=h;do{if(l=!1,a=n.indexOf(o,a+1),a===-1){if(r||t){a=h+1;break}y(`string`)}for(u=a;n.charCodeAt(u-1)===MC;)--u,l=!l}while(l);p=[`string`,n.slice(h,a+1),h,a],h=a;break;case JC:YC.lastIndex=h+1,YC.test(n),a=YC.lastIndex===0?n.length-1:YC.lastIndex-2,p=[`at-word`,n.slice(h,a+1),h,a],h=a;break;case MC:for(a=h,c=!0;
44n.charCodeAt(a+1)===MC;)a+=1,c=!c;if(i=n.charCodeAt(a+1),c&&i!==NC&&i!==FC&&i!==PC&&i!==LC&&i!==RC&&i!==IC&&(a+=1,QC.test(n.charAt(a)))){for(;QC.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===FC&&(a+=1)}p=[`word`,n.slice(h,a+1),h,a],h=a;break;default:i===NC&&n.charCodeAt(h+1)===KC?(a=n.indexOf(`*/`,h+2)+1,a===0&&(r||t?a=n.length:y(`comment`)),p=[`comment`,n.slice(h,a+1),h,a],h=a):(XC.lastIndex=h+1,XC.test(n),a=XC.lastIndex===0?n.length-1:XC.lastIndex-2,p=[`word`,n.slice(h,a+1),h,a],g.push(p),h=a)}return h++,p}}function S(e){_.push(e)}return{back:S,endOfFile:b,nextToken:x,position:v}},ew=yC,tw=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`atrule`,n}var n=t.prototype;return n.append=function(){var t=[...arguments],n;return this.proxyOf.nodes||(this.nodes=[]),(n=e.prototype.append).call.apply(n,[this].concat(t))},n.prepend=function(){var t=[...arguments],n;return this.proxyOf.nodes||(this.nodes=[]),(n=e.prototype.prepend).call.apply(n,[this].concat(t))},t}(ew),nw=tw;tw.default=tw,ew.registerAtRule(tw);var rw=yC,iw,aw,ow=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`root`,n.nodes||=[],n}var n=t.prototype;return n.normalize=function(t,n,r){var i=e.prototype.normalize.call(this,t);if(n){if(r===`prepend`)this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var a=K(i),o;!(o=a()).done;){var s=o.value;s.raws.before=n.raws.before}}return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return e===void 0&&(e={}),new iw(new aw,this,e).stringify()},t}(rw);ow.registerLazyResult=function(e){iw=e},ow.registerProcessor=function(e){aw=e};var sw=ow;ow.default=ow,rw.registerRoot(ow);var cw={comma:function(e){return cw.split(e,[`,`],!0)},space:function(e){return cw.split(e,[` `,`
45`,`	`])},split:function(e,t,n){for(var r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1,u=K(e),d;!(d=u()).done;){var f=d.value;l?l=!1:f===`\\`?l=!0:s?f===c&&(s=!1):f===`"`||f===`'`?(s=!0,c=f):f===`(`?o+=1:f===`)`?o>0&&--o:o===0&&t.includes(f)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=f}return(n||i!==``)&&r.push(i.trim()),r}},lw=cw;cw.default=cw;var uw=yC,dw=lw,fw=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`rule`,n.nodes||=[],n}return nb(t,[{key:`selectors`,get:function(){return dw.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}]),t}(uw),pw=fw;fw.default=fw,uw.registerRule(fw);var mw=xS,hw=$C,gw=oC,_w=nw,vw=sw,yw=pw,bw={empty:!0,space:!0};function xw(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}var Sw=function(){function e(e){this.input=e,this.root=new vw,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t=new _w;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);for(var n,r,i,a=!1,o=!1,s=[],c=[];!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?c.push(n===`(`?`)`:`]`):n===`{`&&c.length>0?c.push(`}`):n===c[c.length-1]&&c.pop(),c.length===0){if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if(n===`{`){o=!0;break}if(n===`}`){if(s.length>0){for(i=s.length-1,r=s[i];r&&r[0]===`space`;)r=s[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(t.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(t,`params`,s),a&&(e=s[s.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),o&&(t.nodes=[],this.current=t)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(t!==!1){for(var n=0,r,i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}},t.colon=function(e){for(var t=0,n,r,i,a=K(e.entries()),o;!(o=a()).done;){var s=o.value,c=s[0];if(n=s[1],r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`){if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return c}i=n}return!1},t.comment=function(e){var t=new gw;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);
45if(/^\s*$/.test(n))t.text=``,t.raws.left=n,t.raws.right=``;else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=hw(this.input)},t.decl=function(e,t){var n=new mw;this.init(n,e[0][2]);var r=e[e.length-1];for(r[0]===`;`&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||xw(e)),n.source.end.offset++;e[0][0]!==`word`;)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop=``;e.length;){var i=e[0][0];if(i===`:`||i===`space`||i===`comment`)break;n.prop+=e.shift()[1]}n.raws.between=``;for(var a;e.length;){if(a=e.shift(),a[0]===`:`){n.raws.between+=a[1];break}a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),n.raws.between+=a[1]}(n.prop[0]===`_`||n.prop[0]===`*`)&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var o=[],s;e.length&&(s=e[0][0],s===`space`||s===`comment`);)o.push(e.shift());this.precheckMissedSemicolon(e);for(var c=e.length-1;c>=0;c--){if(a=e[c],a[1].toLowerCase()===`!important`){n.important=!0;var l=this.stringFrom(e,c);l=this.spacesFromEnd(e)+l,l!==` !important`&&(n.raws.important=l);break}if(a[1].toLowerCase()===`important`){for(var u=e.slice(0),d=``,f=c;f>0;f--){var p=u[f][0];if(d.trim().indexOf(`!`)===0&&p!==`space`)break;d=u.pop()[1]+d}d.trim().indexOf(`!`)===0&&(n.important=!0,n.raws.important=d,e=u)}if(a[0]!==`space`&&a[0]!==`comment`)break}e.some(function(e){return e[0]!==`space`&&e[0]!==`comment`})&&(n.raws.between+=o.map(function(e){return e[1]}).join(``),o=[]),this.raw(n,`value`,o.concat(e),t),n.value.includes(`:`)&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new yw;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&t.type===`rule`&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces=``)}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0){if(n===`;`){if(r){this.decl(s,o);return}break}if(n===`{`){this.rule(s);return}if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}n===`:`&&(r=!0)}else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],c===`space`||c===`comment`);)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,a,o=n.length,s=``,c=!0,l,u,d=0;d<o;d+=1)i=n[d],a=i[0],a===`space`&&d===o-1&&!r?c=!1:a===`comment`?(u=n[d-1]?n[d-1][0]:`empty`,l=n[d+1]?n[d+1][0]:`empty`,!bw[u]&&!bw[l]?s.slice(-1)===`,`?c=!1:s+=i[1]:c=!1):s+=i[1];if(!c){var f=n.reduce(function(e,t){return e+t[1]},``);e.raws[t]={raw:f,value:s}}e[t]=s},t.rule=function(e){e.pop();var t=new yw;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,n=``;e.length&&(t=e[e.length-1][0],t===`space`||t===`comment`);)n=e.pop()[1]+n;return n},t.spacesAndCommentsFromStart=function(e){for(var t,n=``;e.length&&(t=e[0][0],t===`space`||t===`comment`);)n+=e.shift()[1];return n},t.spacesFromEnd=function(e){for(var t,n=``;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n},t.stringFrom=function(e,t){for(var n=``,r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})},e}(),Cw=yC,ww=Sw,Tw=qS;function Ew(e,t){var n=new ww(new Tw(e,t));try{n.parse()}catch(e){throw e}return n.root}var Dw=Ew;Ew.default=Ew,Cw.registerParse(Ew);var Ow=iS.isClean,kw=iS.my,Aw=iC,jw=dS,Mw=yC,Nw=wC,Pw=kC,Fw=Dw,Iw=sw,Lw={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},Rw={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},zw={Once:!0,postcssPlugin:!0,prepare:!0},Bw=0;function Vw(e){return(e===void 0?`undefined`:ub(e))===`object`&&typeof e.then==`function`}function Hw(e){var t=!1,n=Lw[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,Bw,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,Bw,n+`Exit`]:[n,n+`Exit`]}function Uw(e){return{eventIndex:0,events:e.type===`document`?[`Document`,Bw,`DocumentExit`]:e.type===`root`?[`Root`,Bw,`RootExit`]:Hw(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}
45function Ww(e){return e[Ow]=!1,e.nodes&&e.nodes.forEach(function(e){return Ww(e)}),e}var Gw={},Kw=function(){function e(t,n,r){var i=this;this.stringified=!1,this.processed=!1;var a;if((n===void 0?`undefined`:ub(n))===`object`&&n!==null&&(n.type===`root`||n.type===`document`))a=Ww(n);else if(ob(n,e)||ob(n,Pw))a=Ww(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var o=Fw;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{a=o(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[kw]&&Mw.rebuild(a)}this.result=new Pw(t,a,r),this.helpers=rb({},Gw,{postcss:Gw,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return(e===void 0?`undefined`:ub(e))===`object`&&e.prepare?rb({},e,e.prepare(i.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw Error(`Use process(css).then(cb) to work with async plugins`)},t.handleError=function(e,t){var n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=K(this.plugins),r;!(r=n()).done;){var i=r.value;if((i===void 0?`undefined`:ub(i))===`object`)for(var a in i){if(!Rw[a]&&/^[A-Z]/.test(a))throw Error(`Unknown event `+a+` in `+i.postcssPlugin+`. Try to update PostCSS (`+this.processor.version+` now).`);if(!zw[a]){if(ub(i[a])===`object`)for(var o in i[a])o===`*`?t(i,a,i[a][o]):t(i,a+`-`+o.toLowerCase(),i[a][o]);else typeof i[a]==`function`&&t(i,a,i[a])}}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return $y(function(){var t,n,r,i,a,o,s,c,l,u,d,f;return mb(this,function(p){switch(p.label){case 0:e.plugin=0,t=0,p.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(n=e.plugins[t],r=e.runOnRoot(n),!Vw(r))return[3,5];p.label=2;case 2:return p.trys.push([2,4,,5]),[4,r];case 3:return p.sent(),[3,5];case 4:throw i=p.sent(),e.handleError(i);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];a=e.result.root,p.label=7;case 7:if(a[Ow])return[3,14];a[Ow]=!0,o=[Uw(a)],p.label=8;case 8:if(!(o.length>0))return[3,13];if(s=e.visitTick(o),!Vw(s))return[3,12];p.label=9;case 9:return p.trys.push([9,11,,12]),[4,s];case 10:return p.sent(),[3,12];case 11:throw c=p.sent(),l=o[o.length-1].node,e.handleError(c,l);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,o;return mb(this,function(s){switch(s.label){case 0:t=f.value,n=t[0],r=t[1],e.result.lastPlugin=n,s.label=1;case 1:return s.trys.push([1,6,,7]),a.type===`document`?(i=a.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]):[3,3];case 2:return s.sent(),[3,5];case 3:return[4,r(a,e.helpers)];case 4:s.sent(),s.label=5;case 5:return[3,7];case 6:throw o=s.sent(),e.handleError(o);case 7:return[2]}})},d=K(e.listeners.OnceExit),p.label=15;case 15:return(f=d()).done?[3,18]:[5,hb(u())];case 16:p.sent(),p.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if((e===void 0?`undefined`:ub(e))===`object`&&e.Once){if(this.result.root.type===`document`){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return Vw(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=jw;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new Aw(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e=K(this.plugins),t;!(t=e()).done;){var n=t.value;if(Vw(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[Ow];)r[Ow]=!0,this.walkSync(r);if(this.listeners.OnceExit){if(r.type===`document`)for(var i=K(r.nodes),a;!(a=i()).done;){var o=a.value;this.visitSync(this.listeners.OnceExit,o)}else this.visitSync(this.listeners.OnceExit,r)}}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n=K(e),r;
vendor: 4,237 bytes, line 45
45!(r=n()).done;){var i=r.value,a=i[0],o=i[1];this.result.lastPlugin=a;var s=void 0;try{s=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(Vw(s))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if(n.type!==`root`&&n.type!==`document`&&!n.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){var i=r[t.visitorIndex],a=i[0],o=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return o(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(t.iterator!==0){for(var s=t.iterator,c;c=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!c[Ow]){c[Ow]=!0,e.push(Uw(c));return}t.iterator=0,delete n.indexes[s]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,u===Bw){n.nodes&&n.nodes.length&&(n[Ow]=!0,t.iterator=n.getIterator());return}if(this.listeners[u]){t.visitors=this.listeners[u];return}}e.pop()},t.walkSync=function(e){var t=this;e[Ow]=!0;for(var n=K(Hw(e)),r;!(r=n()).done;){var i=r.value;if(i===Bw)e.nodes&&e.each(function(e){e[Ow]||t.walkSync(e)});else{var a=this.listeners[i];if(a&&this.visitSync(a,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},nb(e,[{key:`content`,get:function(){return this.stringify().content}},{key:`css`,get:function(){return this.stringify().css}},{key:`map`,get:function(){return this.stringify().map}},{key:`messages`,get:function(){return this.sync().messages}},{key:`opts`,get:function(){return this.result.opts}},{key:`processor`,get:function(){return this.result.processor}},{key:`root`,get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return`LazyResult`}}]),e}();Kw.registerPostcss=function(e){Gw=e};var qw=Kw;Kw.default=Kw,Iw.registerLazyResult(Kw),Nw.registerLazyResult(Kw);var Jw=iC,Yw=dS,Xw=Dw,Zw=kC,Qw=function(){function e(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var r,i=Yw;this.result=new Zw(this._processor,r,this._opts),this.result.css=t;var a=this;Object.defineProperty(this.result,"root",{get:function(){return a.root}});var o=new Jw(i,r,this._opts,t);if(o.isMap()){var s=o.generate(),c=s[0],l=s[1];c&&(this.result.css=c),l&&(this.result.map=l)}else o.clearAnnotation(),this.result.css=o.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},nb(e,[{key:`content`,get:function(){return this.result.css}},{key:`css`,get:function(){return this.result.css}},{key:`map`,get:function(){return this.result.map}},{key:`messages`,get:function(){return[]}},{key:`opts`,get:function(){return this.result.opts}},{key:`processor`,get:function(){return this.result.processor}},{key:`root`,get:function(){if(this._root)return this._root;var e,t=Xw;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return`NoWorkResult`}}]),e}(),$w=Qw;Qw.default=Qw;var eT=$w,tT=qw,nT=wC,rT=sw,iT=function(){function e(e){e===void 0&&(e=[]),this.version=`8.4.38`,this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t=[],n=K(e),r;!(r=n()).done;){var i=r.value;if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),(i===void 0?`undefined`:ub(i))===`object`&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if((i===void 0?`undefined`:ub(i))===`object`&&i.postcssPlugin)t.push(i);else if(typeof i==`function`)t.push(i);else if(!((i===void 0?`undefined`:ub(i))===`object`&&(i.parse||i.stringify)))throw Error(i+` is not a PostCSS plugin`)}return t},t.process=function(e,t){return t===void 0&&(t={}),!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new eT(this,e,t):new tT(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}
45(),aT=iT;iT.default=iT,rT.registerProcessor(iT),nT.registerProcessor(iT);var oT=xS,sT=MS,cT=oC,lT=nw,uT=qS,dT=sw,fT=pw;function pT(e,t){if(Array.isArray(e))return e.map(function(e){return pT(e)});var n=e.inputs,r=cb(e,[`inputs`]);if(n){t=[];for(var i=K(n),a;!(a=i()).done;){var o=a.value,s=rb({},o,{__proto__:uT.prototype});s.map&&=rb({},s.map,{__proto__:sT.prototype}),t.push(s)}}if(r.nodes&&=e.nodes.map(function(e){return pT(e,t)}),r.source){var c=r.source,l=c.inputId;r.source=cb(c,[`inputId`]),l!=null&&(r.source.input=t[l])}if(r.type===`root`)return new dT(r);if(r.type===`decl`)return new oT(r);if(r.type===`rule`)return new fT(r);if(r.type===`comment`)return new cT(r);if(r.type===`atrule`)return new lT(r);throw Error(`Unknown node type: `+e.type)}var mT=pT;pT.default=pT;var hT=rS,gT=xS,_T=qw,vT=yC,yT=aT,bT=dS,xT=mT,ST=wC,CT=EC,wT=oC,TT=nw,ET=kC,DT=qS,OT=Dw,kT=lw,AT=pw,jT=sw,MT=yS;function NT(){var e=[...arguments];return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new yT(e)}NT.plugin=function(e,t){var n=!1;function r(){var r=[...arguments];console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
46https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
47https://www.w3ctech.com/topic/2226`));var i=t.apply(void 0,[].concat(r));return i.postcssPlugin=e,i.postcssVersion=new yT().version,i}var i;return Object.defineProperty(r,"postcss",{get:function(){return i||=r(),i}}),r.process=function(e,t,n){return NT([r(n)]).process(e,t)},r},NT.stringify=bT,NT.parse=OT,NT.fromJSON=xT,NT.list=kT,NT.comment=function(e){return new wT(e)},NT.atRule=function(e){return new TT(e)},NT.decl=function(e){return new gT(e)},NT.rule=function(e){return new AT(e)},NT.root=function(e){return new jT(e)},NT.document=function(e){return new ST(e)},NT.CssSyntaxError=hT,NT.Declaration=gT,NT.Container=vT,NT.Processor=yT,NT.Document=ST,NT.Comment=wT,NT.Warning=CT,NT.AtRule=TT,NT.Result=ET,NT.Input=DT,NT.Rule=AT,NT.Root=jT,NT.Node=MT,_T.registerPostcss(NT);var PT=NT;NT.default=NT;var FT=qx(PT);FT.stringify,FT.fromJSON,FT.plugin,FT.parse,FT.list,FT.document,FT.comment,FT.atRule,FT.rule,FT.decl,FT.root,FT.CssSyntaxError,FT.Declaration,FT.Container,FT.Processor,FT.Document,FT.Comment,FT.Warning,FT.AtRule,FT.Result,FT.Input,FT.Rule,FT.Root,FT.Node;var IT=Object.defineProperty,LT=function(e,t,n){return t in e?IT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},RT=function(e,t,n){return LT(e,(t===void 0?`undefined`:ub(t))===`symbol`?t:t+``,n)};function zT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function BT(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return ob(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var VT={exports:{}},HT=String,UT=function(){return{isColorSupported:!1,reset:HT,bold:HT,dim:HT,italic:HT,underline:HT,inverse:HT,hidden:HT,strikethrough:HT,black:HT,red:HT,green:HT,yellow:HT,blue:HT,magenta:HT,cyan:HT,white:HT,gray:HT,bgBlack:HT,bgRed:HT,bgGreen:HT,bgYellow:HT,bgBlue:HT,bgMagenta:HT,bgCyan:HT,bgWhite:HT}};VT.exports=UT(),VT.exports.createColors=UT;var WT=VT.exports,GT=BT(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),KT=WT,qT=GT,JT=function(e){ab(t,e);function t(n,r,i,a,o,s){var c=e.call(this,n)||this;return c.name=`CssSyntaxError`,c.reason=n,o&&(c.file=o),a&&(c.source=a),s&&(c.plugin=s),r!==void 0&&i!==void 0&&(typeof r==`number`?(c.line=r,c.column=i):(c.line=r.line,c.column=r.column,c.endLine=i.line,c.endColumn=i.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,t),c}var n=t.prototype;return n.setMessage=function(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return``;var n=this.source;e??=KT.isColorSupported,qT&&e&&(n=qT(n));var r=n.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,r.length),o=String(a).length,s,c;if(e){var l=KT.createColors(!0),u=l.bold,d=l.gray,f=l.red;s=function(e){return u(f(e))},c=function(e){return d(e)}}else s=c=function(e){return e};return r.slice(i,a).map(function(e,n){var r=i+1+n,a=` `+(` `+r).slice(-o)+` | `;if(r===t.line){var l=c(a.replace(/\d/g,` `))+e.slice(0,t.column-1).replace(/[^\t]/g,` `);return s(`>`)+c(a)+e+`
48 `+l+s(`^`)}return` `+c(a)+e}).join(`
49`)},n.toString=function(){var e=this.showSourceCode();return e&&=`
50
51`+e+`
52`,this.name+`: `+this.message+e},t}(fb(Error)),YT=JT;JT.default=JT;var XT={};XT.isClean=Symbol(`isClean`),XT.my=Symbol(`my`);var ZT={after:`
53`,beforeClose:`
54`,beforeComment:`
55`,beforeDecl:`
56`,beforeOpen:` `,beforeRule:`
57`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:`    `,semicolon:!1};function QT(e){return e[0].toUpperCase()+e.slice(1)}var $T=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{var i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){for(var n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`),r=e.parent,i=0;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(`
58`)){var a=this.raw(e,null,`indent`);if(a.length)for(var o=0;o<i;o++)n+=a}return n},t.block=function(e,t){var n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);var r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)},t.body=function(e){for(var t=e.nodes.length-1;t>0&&e.nodes[t].type===`comment`;)--t;for(var n=this.raw(e,`semicolon`),r=0;r<e.nodes.length;r++){var i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}},t.comment=function(e){var t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)},t.decl=function(e,t){var n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,n){var r;if(n||=t,t&&(r=e.raws[t],r!==void 0))return r;var i=e.parent;if(n===`before`&&(!i||i.type===`root`&&i.first===e||i&&i.type===`document`))return``;if(!i)return ZT[n];var a=e.root();if(a.rawCache||={},a.rawCache[n]!==void 0)return a.rawCache[n];if(n===`before`||n===`after`)return this.beforeAfter(e,n);var o=`raw`+QT(n);return this[o]?r=this[o](a,e):a.walk(function(e){if(r=e.raws[t],r!==void 0)return!1}),r===void 0&&(r=ZT[n]),a.rawCache[n]=r,r},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(`
59`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
60`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
61`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
62`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t},t.rawIndent=function(e){if(e.raws.indent)return e.raws.indent;var t;return e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){var i=n.raws.before.split(`
63`);return t=i[i.length-1],t=t.replace(/\S/g,``),!1}}),t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)},t.stringify=function(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)},e}(),eE=$T;$T.default=$T;var tE=eE;function nE(e,t){new tE(t).stringify(e)}var rE=nE;nE.default=nE;var iE=XT.isClean,aE=XT.my,oE=YT,sE=eE,cE=rE;function lE(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r!==`proxyCache`){var i=e[r],a=i===void 0?`undefined`:ub(i);r===`parent`&&a===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return lE(e,n)}):(a===`object`&&i!==null&&(i=lE(i)),n[r]=i)}return n}var uE=function(){function e(e){for(var t in e===void 0&&(e={}),this.raws={},this[iE]=!1,this[aE]=!0,e)if(t===`nodes`){this.nodes=[];for(var n=K(e[t]),r;!(r=n()).done;){var i=r.value;typeof i.clone==`function`?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&`+t.input.from+`:`+t.start.line+`:`+t.start.column+`$&`)}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in e===void 0&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){e===void 0&&(e={});var t=lE(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){e===void 0&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){e===void 0&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(t===void 0&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new oE(e)},t.getProxyProcessor=function(){return{get:function(e,t){return t===`proxyOf`?e:t===`root`?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}},t.markDirty=function(){if(this[iE]){this[iE]=!1;for(var e=this;e=e.parent;)e[iE]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();
63var r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n},t.positionInside=function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,a=0;a<e;a++)n[a]===`
64`?(r=1,i+=1):r+=1;return{column:r,line:i}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}},t.raw=function(e,t){return new sE().raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){var e=[...arguments];if(this.parent){for(var t=this,n=!1,r=K(e),i;!(i=r()).done;){var a=i.value;a===this?n=!0:n?(this.parent.insertAfter(t,a),t=a):this.parent.insertBefore(t,a)}n||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&e.parent.type!==`document`;)e=e.parent;return e},t.toJSON=function(e,t){var n={},r=t==null;t||=new Map;var i=0;for(var a in this)if(Object.prototype.hasOwnProperty.call(this,a)&&a!==`parent`&&a!==`proxyCache`){var o=this[a];if(Array.isArray(o))n[a]=o.map(function(e){return(e===void 0?`undefined`:ub(e))===`object`&&e.toJSON?e.toJSON(null,t):e});else if((o===void 0?`undefined`:ub(o))===`object`&&o.toJSON)n[a]=o.toJSON(null,t);else if(a===`source`){var s=t.get(o.input);s??(s=i,t.set(o.input,i),i++),n[a]={end:o.end,inputId:s,start:o.start}}else n[a]=o}return r&&(n.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),n},t.toProxy=function(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache},t.toString=function(e){e===void 0&&(e=cE),e.stringify&&(e=e.stringify);var t=``;return e(this,function(e){t+=e}),t},t.warn=function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)},nb(e,[{key:`proxyOf`,get:function(){return this}}]),e}(),dE=uE;uE.default=uE;var fE=function(e){ab(t,e);function t(t){var n;return t&&t.value!==void 0&&typeof t.value!=`string`&&(t=rb({},t,{value:String(t.value)})),n=e.call(this,t)||this,n.type=`decl`,n}return nb(t,[{key:`variable`,get:function(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}]),t}(dE),pE=fE;fE.default=fE;var mE=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,hE={nanoid:function(e){e===void 0&&(e=21);for(var t=``,n=e;n--;)t+=mE[Math.random()*64|0];return t}},gE=GT.SourceMapConsumer,_E=GT.SourceMapGenerator,vE=GT.existsSync,yE=GT.readFileSync,bE=GT.dirname,xE=GT.join;function SE(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}var CE=function(){function e(e,t){if(t.map!==!1){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=bE(this.mapFile)),r&&(this.text=r)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||=new gE(this.text),this.consumerCache},t.decodeInline=function(e){var t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return SE(e.substr(RegExp.lastMatch.length));var r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()},t.isMap=function(e){return(e===void 0?`undefined`:ub(e))===`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);
64if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=bE(e),vE(e))return this.mapFile=e,yE(e,`utf-8`).toString().trim()},t.loadMap=function(e,t){if(t===!1)return!1;if(t){if(typeof t==`string`)return t;if(typeof t==`function`){var n=t(e);if(n){var r=this.loadFile(n);if(!r)throw Error(`Unable to load previous source map: `+n.toString());return r}}else if(ob(t,gE))return _E.fromSourceMap(t).toString();else if(ob(t,_E))return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error(`Unsupported previous source map format: `+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){var i=this.annotation;return e&&(i=xE(bE(e),i)),this.loadFile(i)}},t.startWith=function(e,t){return e?e.substr(0,t.length)===t:!1},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),wE=CE;CE.default=CE;var TE=GT.SourceMapConsumer,EE=GT.SourceMapGenerator,DE=GT.fileURLToPath,OE=GT.pathToFileURL,kE=GT.isAbsolute,AE=GT.resolve,jE=hE.nanoid,ME=GT,NE=YT,PE=wE,FE=Symbol(`fromOffsetCac
64he`),IE=!!(TE&&EE),LE=!!(AE&&kE),RE=function(){function e(e,t){if(t===void 0&&(t={}),e==null||(e===void 0?`undefined`:ub(e))===`object`&&!e.toString)throw Error(`PostCSS received `+e+` instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===`￾`?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!LE||/^\w+:\/\//.test(t.from)||kE(t.from)?t.from:AE(t.from)),LE&&IE){var n=new PE(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=`<input css `+jE(6)+`>`),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){r===void 0&&(r={});var i,a,o;if(t&&(t===void 0?`undefined`:ub(t))===`object`){var s=t,c=n;if(typeof s.offset==`number`){var l=this.fromOffset(s.offset);t=l.line,n=l.col}else t=s.line,n=s.column;if(typeof c.offset==`number`){var u=this.fromOffset(c.offset);a=u.line,o=u.col}else a=c.line,o=c.column}else if(!n){var d=this.fromOffset(t);t=d.line,n=d.col}var f=this.origin(t,n,a,o);return i=f?new NE(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,r.plugin):new NE(e,a===void 0?t:{column:n,line:t},a===void 0?n:{column:o,line:a},this.css,this.file,r.plugin),i.input={column:n,endColumn:o,endLine:a,line:t,source:this.css},this.file&&(OE&&(i.input.url=OE(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t,n;if(this[FE])n=this[FE];else{var r=this.css.split(`
65`);n=Array(r.length);for(var i=0,a=0,o=r.length;a<o;a++)n[a]=i,i+=r[a].length+1;this[FE]=n}t=n[n.length-1];var s=0;if(e>=t)s=n.length-1;else for(var c=n.length-2,l;s<c;)if(l=s+(c-s>>1),e<n[l])c=l-1;else if(e>=n[l+1])s=l+1;else{s=l;break}return{col:e-n[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:AE(this.map.consumer().sourceRoot||this.map.root||`.`,e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;var o;
65typeof n==`number`&&(o=i.originalPositionFor({column:r,line:n}));var s=kE(a.source)?OE(a.source):new URL(a.source,this.map.consumer().sourceRoot||OE(this.map.mapFile)),c={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:s.toString()};if(s.protocol===`file:`){if(DE)c.file=DE(s);else throw Error(`file: protocol is not available in this PostCSS build`)}var l=i.sourceContentFor(a.source);return l&&(c.source=l),c},t.toJSON=function(){for(var e={},t=0,n=[`hasBOM`,`css`,`file`,`id`];t<n.length;t++){var r=n[t];this[r]!=null&&(e[r]=this[r])}return this.map&&(e.map=rb({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},nb(e,[{key:`from`,get:function(){return this.file||this.id}}]),e}(),zE=RE;RE.default=RE,ME&&ME.registerInput&&ME.registerInput(RE);var BE=GT.SourceMapConsumer,VE=GT.SourceMapGenerator,HE=GT.dirname,UE=GT.relative,WE=GT.resolve,GE=GT.sep,KE=GT.pathToFileURL,qE=zE,JE=!!(BE&&VE),YE=!!(HE&&WE&&UE&&GE),XE=function(){function e(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`,t=`
66`;this.css.includes(`\r
67`)&&(t=`\r
68`),this.css+=t+`/*# sourceMappingURL=`+e+` */`},t.applyPrevMaps=function(){for(var e=K(this.previous()),t;!(t=e()).done;){var n=t.value,r=this.toUrl(this.path(n.file)),i=n.root||HE(n.file),a=void 0;this.mapOpts.sourcesContent===!1?(a=new BE(n.text),a.sourcesContent&&(a.sourcesContent=null)):a=n.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}},t.clearAnnotation=function(){if(this.mapOpts.annotation!==!1){if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t);else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}},t.generate=function(){if(this.clearAnnotation(),YE&&JE&&this.isMap())return this.generateMap();var e=``;return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(this.previous().length===1){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=VE.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new VE({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css=``,this.map=new VE({file:this.outputFile(),ignoreInvalidMapping:!0});var t=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,function(s,c,l){if(e.css+=s,c&&l!==`end`&&(i.generated.line=t,i.generated.column=n-1,c.source&&c.source.start?(i.source=e.sourcePath(c),i.original.line=c.source.start.line,i.original.column=c.source.start.column-1,e.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,e.map.addMapping(i))),a=s.match(/\n/g),a?(t+=a.length,o=s.lastIndexOf(`
69`),n=s.length-o):n+=s.length,c&&l!==`start`){var u=c.parent||{raws:{}};(!(c.type===`decl`||c.type===`atrule`&&!c.nodes)||c!==u.last||u.raws.semicolon)&&(c.source&&c.source.end?(i.source=e.sourcePath(c),i.original.line=c.source.end.line,i.original.column=c.source.end.column-1,i.generated.line=t,i.generated.column=n-2,e.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=n-1,e.map.addMapping(i)))}})},t.isAnnotation=function(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(function(e){return e.annotation}):this.mapOpts.annotation},t.isInline=function(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;var e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(function(e){return e.inline})},t.isMap=function(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map},t.isSourcesContent=function(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(function(e){return e.withContent()}):this.mapOpts.sourcesContent},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`},t.path=function(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?HE(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(n=HE(WE(n,this.mapOpts.annotation)));var r=UE(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new qE(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(n,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(KE){var n=KE(e).toString();return this.memoizedFileURLs.set(e,n),n}throw Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;GE===`\\`&&(e=e.replace(/\\/g,`/`));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),ZE=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`comment`,n}return t}(dE),QE=ZE;ZE.default=ZE;var $E=XT.isClean,eD=XT.my,tD=pE,nD=QE,rD=dE,iD,aD,oD,sD;
69function cD(e){return e.map(function(e){return e.nodes&&=cD(e.nodes),delete e.source,e})}function lD(e){if(e[$E]=!1,e.proxyOf.nodes)for(var t=K(e.proxyOf.nodes),n;!(n=t()).done;){var r=n.value;lD(r)}}var uD=function(e){ab(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.append=function(){for(var e=K([...arguments]),t;!(t=e()).done;)for(var n=t.value,r=K(this.normalize(n,this.last)),i;!(i=r()).done;){var a=i.value;this.proxyOf.nodes.push(a)}return this.markDirty(),this},n.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var n=K(this.nodes),r;!(r=n()).done;)r.value.cleanRaws(t)},n.each=function(e){if(this.proxyOf.nodes){for(var t=this.getIterator(),n,r;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}},n.every=function(e){return this.nodes.every(e)},n.getIterator=function(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},n.getProxyProcessor=function(){return{get:function(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?function(){var n=[...arguments],r;return(r=e)[t].apply(r,[].concat(n.map(function(e){return typeof e==`function`?function(t,n){return e(t.toProxy(),n)}:e})))}:t===`every`||t===`some`?function(n){return e[t](function(e){var t=[...arguments].slice(1);return n.apply(void 0,[e.toProxy()].concat(t))})}:t===`root`?function(){return e.root().toProxy()}:t===`nodes`?e.nodes.map(function(e){return e.toProxy()}):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}},n.index=function(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},n.insertAfter=function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(var i=K(r),a;!(a=i()).done;){var o=a.value;this.proxyOf.nodes.splice(n+1,0,o)}var s;for(var c in this.indexes)s=this.indexes[c],n<s&&(this.indexes[c]=s+r.length);return this.markDirty(),this},n.insertBefore=function(e,t){var n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(var a=K(i),o;!(o=a()).done;){var s=o.value;this.proxyOf.nodes.splice(n,0,s)}var c;for(var l in this.indexes)c=this.indexes[l],n<=c&&(this.indexes[l]=c+i.length);return this.markDirty(),this},n.normalize=function(e,n){var r=this;if(typeof e==`string`)e=cD(iD(e).nodes);else if(e===void 0)e=[];else if(Array.isArray(e)){e=e.slice(0);for(var i=K(e),a;!(a=i()).done;){var o=a.value;o.parent&&o.parent.removeChild(o,`ignore`)}}else if(e.type===`root`&&this.type!==`document`){e=e.nodes.slice(0);for(var s=K(e),c;!(c=s()).done;){var l=c.value;l.parent&&l.parent.removeChild(l,`ignore`)}}else if(e.type)e=[e];else if(e.prop){if(e.value===void 0)throw Error(`Value field is missed in node creation`);typeof e.value!=`string`&&(e.value=String(e.value)),e=[new tD(e)]}else if(e.selector)e=[new aD(e)];else if(e.name)e=[new oD(e)];else if(e.text)e=[new nD(e)];else throw Error(`Unknown node type in node creation`);return e.map(function(e){return e[eD]||t.rebuild(e),e=e.proxyOf,e.parent&&e.parent.removeChild(e),e[$E]&&lD(e),e.raws.before===void 0&&n&&n.raws.before!==void 0&&(e.raws.before=n.raws.before.replace(/\S/g,``)),e.parent=r.proxyOf,e})},n.prepend=function(){var e=[...arguments];e=e.reverse();for(var t=K(e),n;!(n=t()).done;){for(var r=n.value,i=this.normalize(r,this.first,`prepend`).reverse(),a=K(i),o;!(o=a()).done;){var s=o.value;this.proxyOf.nodes.unshift(s)}for(var c in this.indexes)this.indexes[c]=this.indexes[c]+i.length}return this.markDirty(),this},n.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},n.removeAll=function(){for(var e=K(this.proxyOf.nodes),t;!(t=e()).done;){var n=t.value;n.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},n.removeChild=function(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);var t;for(var n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?ob(e,RegExp)?this.walk(function(n,r){if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if(e.type===`atrule`)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if(t.type===`comment`)return e(t,n)})},n.walkDecls=function(e,t){return t?ob(e,RegExp)?this.walk(function(n,r){if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if(e.type===`decl`)return t(e,n)}))},n.walkRules=function(e,t){return t?ob(e,RegExp)?this.walk(function(n,r){if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if(e.type===`rule`)return t(e,n)}))},nb(t,[{key:`first`,get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:`last`,get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(rD);uD.registerParse=function(e){iD=e},uD.registerRule=function(e){aD=e},uD.registerAtRule=function(e){oD=e},uD.registerRoot=function(e){sD=e};var dD=uD;uD.default=uD,uD.rebuild=function(e){e.type===`atrule`?Object.setPrototypeOf(e,oD.prototype):e.type===`rule`?Object.setPrototypeOf(e,aD.prototype):e.type===`decl`?Object.setPrototypeOf(e,tD.prototype):e.type===`comment`?Object.setPrototypeOf(e,nD.prototype):e.type===`root`&&Object.setPrototypeOf(e,sD.prototype),e[eD]=!0,e.nodes&&e.nodes.forEac
69h(function(e){uD.rebuild(e)})};var fD=dD,pD,mD,hD=function(e){ab(t,e);function t(t){var n=e.call(this,rb({type:`document`},t))||this;return n.nodes||=[],n}var n=t.prototype;return n.toResult=function(e){return e===void 0&&(e={}),new pD(new mD,this,e).stringify()},t}(fD);hD.registerLazyResult=function(e){pD=e},hD.registerProcessor=function(e){mD=e};var gD=hD;hD.default=hD;var _D=function(){function e(e,t){if(t===void 0&&(t={}),this.type=`warning`,this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}var t=e.prototype;return t.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text},e}(),vD=_D;_D.default=_D;var yD=vD,bD=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){t===void 0&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new yD(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return e.type===`warning`})},nb(e,[{key:`content`,get:function(){return this.css}}]),e}(),xD=bD;bD.default=bD;var SD=39,CD=34,wD=92,TD=47,ED=10,DD=32,OD=12,kD=9,AD=13,jD=91,MD=93,ND=40,PD=41,FD=123,ID=125,LD=59,RD=42,zD=58,BD=64,VD=/[\t\n\f\r "#'()/;[\\\]{}]/g,HD=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,UD=/.[\r\n"'(/\\]/,WD=/[\da-f]/i,GD=function(e,t){t===void 0&&(t={});var n=e.css.valueOf(),r=t.ignoreErrors,i,a,o,s,c,l,u,d,f,p,m=n.length,h=0,g=[],_=[];function v(){return h}function y(t){throw e.error(`Unclosed `+t,h)}function b(){return _.length===0&&h>=m}function x(e){if(_.length)return _.pop();if(!(h>=m)){var t=e?e.ignoreUnclosed:!1;switch(i=n.charCodeAt(h),i){case ED:case DD:case kD:case AD:case OD:a=h;do a+=1,i=n.charCodeAt(a);while(i===DD||i===ED||i===kD||i===AD||i===OD);p=[`space`,n.slice(h,a)],h=a-1;break;case jD:case MD:case FD:case ID:case zD:case LD:case PD:var v=String.fromCharCode(i);p=[v,v,h];break;case ND:if(d=g.length?g.pop()[1]:``,f=n.charCodeAt(h+1),d===`url`&&f!==SD&&f!==CD&&f!==DD&&f!==ED&&f!==kD&&f!==OD&&f!==AD){a=h;do{if(l=!1,a=n.indexOf(`)`,a+1),a===-1){if(r||t){a=h;break}y(`bracket`)}for(u=a;n.charCodeAt(u-1)===wD;)--u,l=!l}while(l);p=[`brackets`,n.slice(h,a+1),h,a],h=a}else a=n.indexOf(`)`,h+1),s=n.slice(h,a+1),a===-1||UD.test(s)?p=[`(`,`(`,h]:(p=[`brackets`,s,h,a],h=a);break;case SD:case CD:o=i===SD?`'`:`"`,a=h;do{if(l=!1,a=n.indexOf(o,a+1),a===-1){if(r||t){a=h+1;break}y(`string`)}for(u=a;n.charCodeAt(u-1)===wD;)--u,l=!l}while(l);p=[`string`,n.slice(h,a+1),h,a],h=a;break;case BD:VD.lastIndex=h+1,VD.test(n),a=VD.lastIndex===0?n.length-1:VD.lastIndex-2,p=[`at-word`,n.slice(h,a+1),h,a],h=a;break;case wD:for(a=h,c=!0;
69n.charCodeAt(a+1)===wD;)a+=1,c=!c;if(i=n.charCodeAt(a+1),c&&i!==TD&&i!==DD&&i!==ED&&i!==kD&&i!==AD&&i!==OD&&(a+=1,WD.test(n.charAt(a)))){for(;WD.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===DD&&(a+=1)}p=[`word`,n.slice(h,a+1),h,a],h=a;break;default:i===TD&&n.charCodeAt(h+1)===RD?(a=n.indexOf(`*/`,h+2)+1,a===0&&(r||t?a=n.length:y(`comment`)),p=[`comment`,n.slice(h,a+1),h,a],h=a):(HD.lastIndex=h+1,HD.test(n),a=HD.lastIndex===0?n.length-1:HD.lastIndex-2,p=[`word`,n.slice(h,a+1),h,a],g.push(p),h=a)}return h++,p}}function S(e){_.push(e)}return{back:S,endOfFile:b,nextToken:x,position:v}},KD=dD,qD=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`atrule`,n}var n=t.prototype;return n.append=function(){var t=[...arguments],n;return this.proxyOf.nodes||(this.nodes=[]),(n=e.prototype.append).call.apply(n,[this].concat(t))},n.prepend=function(){var t=[...arguments],n;return this.proxyOf.nodes||(this.nodes=[]),(n=e.prototype.prepend).call.apply(n,[this].concat(t))},t}(KD),JD=qD;qD.default=qD,KD.registerAtRule(qD);var YD=dD,XD,ZD,QD=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`root`,n.nodes||=[],n}var n=t.prototype;return n.normalize=function(t,n,r){var i=e.prototype.normalize.call(this,t);if(n){if(r===`prepend`)this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var a=K(i),o;!(o=a()).done;){var s=o.value;s.raws.before=n.raws.before}}return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return e===void 0&&(e={}),new XD(new ZD,this,e).stringify()},t}(YD);QD.registerLazyResult=function(e){XD=e},QD.registerProcessor=function(e){ZD=e};var $D=QD;QD.default=QD,YD.registerRoot(QD);var eO={comma:function(e){return eO.split(e,[`,`],!0)},space:function(e){return eO.split(e,[` `,`
70`,`	`])},split:function(e,t,n){for(var r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1,u=K(e),d;!(d=u()).done;){var f=d.value;l?l=!1:f===`\\`?l=!0:s?f===c&&(s=!1):f===`"`||f===`'`?(s=!0,c=f):f===`(`?o+=1:f===`)`?o>0&&--o:o===0&&t.includes(f)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=f}return(n||i!==``)&&r.push(i.trim()),r}},tO=eO;eO.default=eO;var nO=dD,rO=tO,iO=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`rule`,n.nodes||=[],n}return nb(t,[{key:`selectors`,get:function(){return rO.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}]),t}(nO),aO=iO;iO.default=iO,nO.registerRule(iO);var oO=pE,sO=GD,cO=QE,lO=JD,uO=$D,dO=aO,fO={empty:!0,space:!0};function pO(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}var mO=function(){function e(e){this.input=e,this.root=new uO,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t=new lO;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);for(var n,r,i,a=!1,o=!1,s=[],c=[];!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?c.push(n===`(`?`)`:`]`):n===`{`&&c.length>0?c.push(`}`):n===c[c.length-1]&&c.pop(),c.length===0){if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if(n===`{`){o=!0;break}if(n===`}`){if(s.length>0){for(i=s.length-1,r=s[i];r&&r[0]===`space`;)r=s[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(t.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(t,`params`,s),a&&(e=s[s.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),o&&(t.nodes=[],this.current=t)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(t!==!1){for(var n=0,r,i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}},t.colon=function(e){for(var t=0,n,r,i,a=K(e.entries()),o;!(o=a()).done;){var s=o.value,c=s[0];if(n=s[1],r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`){if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return c}i=n}return!1},t.comment=function(e){var t=new cO;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);
70if(/^\s*$/.test(n))t.text=``,t.raws.left=n,t.raws.right=``;else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=sO(this.input)},t.decl=function(e,t){var n=new oO;this.init(n,e[0][2]);var r=e[e.length-1];for(r[0]===`;`&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||pO(e)),n.source.end.offset++;e[0][0]!==`word`;)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop=``;e.length;){var i=e[0][0];if(i===`:`||i===`space`||i===`comment`)break;n.prop+=e.shift()[1]}n.raws.between=``;for(var a;e.length;){if(a=e.shift(),a[0]===`:`){n.raws.between+=a[1];break}a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),n.raws.between+=a[1]}(n.prop[0]===`_`||n.prop[0]===`*`)&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var o=[],s;e.length&&(s=e[0][0],s===`space`||s===`comment`);)o.push(e.shift());this.precheckMissedSemicolon(e);for(var c=e.length-1;c>=0;c--){if(a=e[c],a[1].toLowerCase()===`!important`){n.important=!0;var l=this.stringFrom(e,c);l=this.spacesFromEnd(e)+l,l!==` !important`&&(n.raws.important=l);break}if(a[1].toLowerCase()===`important`){for(var u=e.slice(0),d=``,f=c;f>0;f--){var p=u[f][0];if(d.trim().indexOf(`!`)===0&&p!==`space`)break;d=u.pop()[1]+d}d.trim().indexOf(`!`)===0&&(n.important=!0,n.raws.important=d,e=u)}if(a[0]!==`space`&&a[0]!==`comment`)break}e.some(function(e){return e[0]!==`space`&&e[0]!==`comment`})&&(n.raws.between+=o.map(function(e){return e[1]}).join(``),o=[]),this.raw(n,`value`,o.concat(e),t),n.value.includes(`:`)&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new dO;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&t.type===`rule`&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces=``)}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0){if(n===`;`){if(r){this.decl(s,o);return}break}if(n===`{`){this.rule(s);return}if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}n===`:`&&(r=!0)}else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],c===`space`||c===`comment`);)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,a,o=n.length,s=``,c=!0,l,u,d=0;d<o;d+=1)i=n[d],a=i[0],a===`space`&&d===o-1&&!r?c=!1:a===`comment`?(u=n[d-1]?n[d-1][0]:`empty`,l=n[d+1]?n[d+1][0]:`empty`,!fO[u]&&!fO[l]?s.slice(-1)===`,`?c=!1:s+=i[1]:c=!1):s+=i[1];if(!c){var f=n.reduce(function(e,t){return e+t[1]},``);e.raws[t]={raw:f,value:s}}e[t]=s},t.rule=function(e){e.pop();var t=new dO;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,n=``;e.length&&(t=e[e.length-1][0],t===`space`||t===`comment`);)n=e.pop()[1]+n;return n},t.spacesAndCommentsFromStart=function(e){for(var t,n=``;e.length&&(t=e[0][0],t===`space`||t===`comment`);)n+=e.shift()[1];return n},t.spacesFromEnd=function(e){for(var t,n=``;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n},t.stringFrom=function(e,t){for(var n=``,r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})},e}(),hO=dD,gO=mO,_O=zE;function vO(e,t){var n=new gO(new _O(e,t));try{n.parse()}catch(e){throw e}return n.root}var yO=vO;vO.default=vO,hO.registerParse(vO);var bO=XT.isClean,xO=XT.my,SO=XE,CO=rE,wO=dD,TO=gD,EO=xD,DO=yO,OO=$D,kO={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},AO={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},jO={Once:!0,postcssPlugin:!0,prepare:!0},MO=0;function NO(e){return(e===void 0?`undefined`:ub(e))===`object`&&typeof e.then==`function`}function PO(e){var t=!1,n=kO[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,MO,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,MO,n+`Exit`]:[n,n+`Exit`]}function FO(e){return{eventIndex:0,events:e.type===`document`?[`Document`,MO,`DocumentExit`]:e.type===`root`?[`Root`,MO,`RootExit`]:PO(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}
70function IO(e){return e[bO]=!1,e.nodes&&e.nodes.forEach(function(e){return IO(e)}),e}var LO={},RO=function(){function e(t,n,r){var i=this;this.stringified=!1,this.processed=!1;var a;if((n===void 0?`undefined`:ub(n))===`object`&&n!==null&&(n.type===`root`||n.type===`document`))a=IO(n);else if(ob(n,e)||ob(n,EO))a=IO(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var o=DO;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{a=o(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[xO]&&wO.rebuild(a)}this.result=new EO(t,a,r),this.helpers=rb({},LO,{postcss:LO,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return(e===void 0?`undefined`:ub(e))===`object`&&e.prepare?rb({},e,e.prepare(i.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw Error(`Use process(css).then(cb) to work with async plugins`)},t.handleError=function(e,t){var n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=K(this.plugins),r;!(r=n()).done;){var i=r.value;if((i===void 0?`undefined`:ub(i))===`object`)for(var a in i){if(!AO[a]&&/^[A-Z]/.test(a))throw Error(`Unknown event `+a+` in `+i.postcssPlugin+`. Try to update PostCSS (`+this.processor.version+` now).`);if(!jO[a]){if(ub(i[a])===`object`)for(var o in i[a])o===`*`?t(i,a,i[a][o]):t(i,a+`-`+o.toLowerCase(),i[a][o]);else typeof i[a]==`function`&&t(i,a,i[a])}}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return $y(function(){var t,n,r,i,a,o,s,c,l,u,d,f;return mb(this,function(p){switch(p.label){case 0:e.plugin=0,t=0,p.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(n=e.plugins[t],r=e.runOnRoot(n),!NO(r))return[3,5];p.label=2;case 2:return p.trys.push([2,4,,5]),[4,r];case 3:return p.sent(),[3,5];case 4:throw i=p.sent(),e.handleError(i);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];a=e.result.root,p.label=7;case 7:if(a[bO])return[3,14];a[bO]=!0,o=[FO(a)],p.label=8;case 8:if(!(o.length>0))return[3,13];if(s=e.visitTick(o),!NO(s))return[3,12];p.label=9;case 9:return p.trys.push([9,11,,12]),[4,s];case 10:return p.sent(),[3,12];case 11:throw c=p.sent(),l=o[o.length-1].node,e.handleError(c,l);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,o;return mb(this,function(s){switch(s.label){case 0:t=f.value,n=t[0],r=t[1],e.result.lastPlugin=n,s.label=1;case 1:return s.trys.push([1,6,,7]),a.type===`document`?(i=a.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]):[3,3];case 2:return s.sent(),[3,5];case 3:return[4,r(a,e.helpers)];case 4:s.sent(),s.label=5;case 5:return[3,7];case 6:throw o=s.sent(),e.handleError(o);case 7:return[2]}})},d=K(e.listeners.OnceExit),p.label=15;case 15:return(f=d()).done?[3,18]:[5,hb(u())];case 16:p.sent(),p.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if((e===void 0?`undefined`:ub(e))===`object`&&e.Once){if(this.result.root.type===`document`){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return NO(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=CO;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new SO(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e=K(this.plugins),t;!(t=e()).done;){var n=t.value;if(NO(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[bO];)r[bO]=!0,this.walkSync(r);if(this.listeners.OnceExit){if(r.type===`document`)for(var i=K(r.nodes),a;!(a=i()).done;){var o=a.value;this.visitSync(this.listeners.OnceExit,o)}else this.visitSync(this.listeners.OnceExit,r)}}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n=K(e),r;
70!(r=n()).done;){var i=r.value,a=i[0],o=i[1];this.result.lastPlugin=a;var s=void 0;try{s=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(NO(s))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if(n.type!==`root`&&n.type!==`document`&&!n.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){var i=r[t.visitorIndex],a=i[0],o=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return o(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(t.iterator!==0){for(var s=t.iterator,c;c=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!c[bO]){c[bO]=!0,e.push(FO(c));return}t.iterator=0,delete n.indexes[s]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,u===MO){n.nodes&&n.nodes.length&&(n[bO]=!0,t.iterator=n.getIterator());return}if(this.listeners[u]){t.visitors=this.listeners[u];return}}e.pop()},t.walkSync=function(e){var t=this;e[bO]=!0;for(var n=K(PO(e)),r;!(r=n()).done;){var i=r.value;if(i===MO)e.nodes&&e.each(function(e){e[bO]||t.walkSync(e)});else{var a=this.listeners[i];if(a&&this.visitSync(a,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},nb(e,[{key:`content`,get:function(){return this.stringify().content}},{key:`css`,get:function(){return this.stringify().css}},{key:`map`,get:function(){return this.stringify().map}},{key:`messages`,get:function(){return this.sync().messages}},{key:`opts`,get:function(){return this.result.opts}},{key:`processor`,get:function(){return this.result.processor}},{key:`root`,get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return`LazyResult`}}]),e}();RO.registerPostcss=function(e){LO=e};var zO=RO;RO.default=RO,OO.registerLazyResult(RO),TO.registerLazyResult(RO);var BO=XE,VO=rE,HO=yO,UO=xD,WO=function(){function e(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var r,i=VO;this.result=new UO(this._processor,r,this._opts),this.result.css=t;var a=this;Object.defineProperty(this.result,"root",{get:function(){return a.root}});var o=new BO(i,r,this._opts,t);if(o.isMap()){var s=o.generate(),c=s[0],l=s[1];c&&(this.result.css=c),l&&(this.result.map=l)}else o.clearAnnotation(),this.result.css=o.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},nb(e,[{key:`content`,get:function(){return this.result.css}},{key:`css`,get:function(){return this.result.css}},{key:`map`,get:function(){return this.result.map}},{key:`messages`,get:function(){return[]}},{key:`opts`,get:function(){return this.result.opts}},{key:`processor`,get:function(){return this.result.processor}},{key:`root`,get:function(){if(this._root)return this._root;var e,t=HO;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return`NoWorkResult`}}]),e}(),GO=WO;WO.default=WO;var KO=GO,qO=zO,JO=gD,YO=$D,XO=function(){function e(e){e===void 0&&(e=[]),this.version=`8.4.38`,this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t=[],n=K(e),r;!(r=n()).done;){var i=r.value;if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),(i===void 0?`undefined`:ub(i))===`object`&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if((i===void 0?`undefined`:ub(i))===`object`&&i.postcssPlugin)t.push(i);else if(typeof i==`function`)t.push(i);else if(!((i===void 0?`undefined`:ub(i))===`object`&&(i.parse||i.stringify)))throw Error(i+` is not a PostCSS plugin`)}return t},t.process=function(e,t){return t===void 0&&(t={}),!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new KO(this,e,t):new qO(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}(),ZO=XO;XO.default=XO,YO.registerProcessor(XO),JO.registerProcessor(XO);var QO=pE,$O=wE,ek=QE,tk=JD,nk=zE,rk=$D,ik=aO;function ak(e,t){if(Array.isArray(e))return e.map(function(e){return ak(e)});var n=e.inputs,r=cb(e,[`inputs`]);if(n){t=[];for(var i=K(n),a;!(a=i()).done;){var o=a.value,s=rb({},o,{__proto__:nk.prototype});s.map&&=rb({},s.map,{__proto__:$O.prototype}),t.push(s)}}if(r.nodes&&=e.nodes.map(function(e){return ak(e,t)}),r.source){var c=r.source,l=c.inputId;r.source=cb(c,[`inputId`]),l!=null&&(r.source.input=t[l])}if(r.type===`root`)return new rk(r);if(r.type===`decl`)return new QO(r);if(r.type===`rule`)return new ik(r);if(r.type===`comment`)return new ek(r);if(r.type===`atrule`)return new tk(r);throw Error(`Unknown node type: `+e.type)}var ok=ak;ak.default=ak;var sk=YT,ck=pE,lk=zO,uk=dD,dk=ZO,fk=rE,pk=ok,mk=gD,hk=vD,gk=QE,_k=JD,vk=xD,yk=zE,bk=yO,xk=tO,Sk=aO,Ck=$D,wk=dE;function Tk(){var e=[...arguments];return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new dk(e)}Tk.plugin=function(e,t){var n=!1;function r(){var r=[...arguments];console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
71https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
72https://www.w3ctech.com/topic/2226`));var i=t.apply(void 0,[].concat(r));return i.postcssPlugin=e,i.postcssVersion=new dk().version,i}var i;return Object.defineProperty(r,"postcss",{get:function(){return i||=r(),i}}),r.process=function(e,t,n){return Tk([r(n)]).process(e,t)},r}
72,Tk.stringify=fk,Tk.parse=bk,Tk.fromJSON=pk,Tk.list=xk,Tk.comment=function(e){return new gk(e)},Tk.atRule=function(e){return new _k(e)},Tk.decl=function(e){return new ck(e)},Tk.rule=function(e){return new Sk(e)},Tk.root=function(e){return new Ck(e)},Tk.document=function(e){return new mk(e)},Tk.CssSyntaxError=sk,Tk.Declaration=ck,Tk.Container=uk,Tk.Processor=dk,Tk.Document=mk,Tk.Comment=gk,Tk.Warning=hk,Tk.AtRule=_k,Tk.Result=vk,Tk.Input=yk,Tk.Rule=Sk,Tk.Root=Ck,Tk.Node=wk,lk.registerPostcss(Tk);var Ek=Tk;Tk.default=Tk;var Dk=zT(Ek);Dk.stringify,Dk.fromJSON,Dk.plugin,Dk.parse,Dk.list,Dk.document,Dk.comment,Dk.atRule,Dk.rule,Dk.decl,Dk.root,Dk.CssSyntaxError,Dk.Declaration,Dk.Container,Dk.Processor,Dk.Document,Dk.Comment,Dk.Warning,Dk.AtRule,Dk.Result,Dk.Input,Dk.Rule,Dk.Root,Dk.Node;var Ok=function(){function e(){RT(this,`parentElement`,null),RT(this,`parentNode`,null),RT(this,`ownerDocument`),RT(this,`firstChild`,null),RT(this,`lastChild`,null),RT(this,`previousSibling`,null),RT(this,`nextSibling`,null),RT(this,`ELEMENT_NODE`,1),RT(this,`TEXT_NODE`,3),RT(this,`nodeType`),RT(this,`nodeName`),RT(this,`RRNodeType`)}var t=e.prototype;return t.contains=function(t){if(!ob(t,e)||t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1},t.appendChild=function(e){throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`)},t.insertBefore=function(e,t){throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`)},t.removeChild=function(e){throw Error(`RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`)},t.toString=function(){return`RRNode`},nb(e,[{key:`childNodes`,get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}}]),e}(),kk={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},Ak={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},jk={},Mk=function(){return!!globalThis.Zone};function Nk(e){if(jk[e])return jk[e];var t=globalThis[e],n=t.prototype,r=e in kk?kk[e]:void 0,i=!!(r&&r.every(function(e){return!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`)})),a=e in Ak?Ak[e]:void 0,o=!!(a&&a.every(function(e){return typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)}));if(i&&o&&!Mk())return jk[e]=t.prototype,t.prototype;try{var s=document.createElement(`iframe`);document.body.appendChild(s);var c=s.contentWindow;if(!c)return t.prototype;var l=c[e].prototype;return document.body.removeChild(s),l?jk[e]=l:n}catch{return n}}var Pk={};function Fk(e,t,n){var r=e+`.`+String(n);if(Pk[r])return Pk[r].call(t);var i=Nk(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?(Pk[r]=a,a.call(t)):t[n]}var Ik={};function Lk(e,t,n){var r=e+`.`+String(n);if(Ik[r])return Ik[r].bind(t);var i=Nk(e)[n];return typeof i==`function`?(Ik[r]=i,i.bind(t)):t[n]}function Rk(e){return Fk(`Node`,e,`childNodes`)}function zk(e){return Fk(`Node`,e,`parentNode`)}function Bk(e){return Fk(`Node`,e,`parentElement`)}function Vk(e){return Fk(`Node`,e,`textContent`)}function Hk(e,t){return Lk(`Node`,e,`contains`)(t)}function Uk(e){return Lk(`Node`,e,`getRootNode`)()}function Wk(e){return!e||!(`host`in e)?null:Fk(`ShadowRoot`,e,`host`)}function Gk(e){return e.styleSheets}function Kk(e){return!e||!(`shadowRoot`in e)?null:Fk(`Element`,e,`shadowRoot`)}function qk(e,t){return Fk(`Element`,e,`querySelector`)(t)}function Jk(e,t){return Fk(`Element`,e,`querySelectorAll`)(t)}function Yk(){return Nk(`MutationObserver`).constructor}function Xk(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch{return function(){}}}var Zk={childNodes:Rk,parentNode:zk,parentElement:Bk,textContent:Vk,contains:Hk,getRootNode:Uk,host:Wk,styleSheets:Gk,shadowRoot:Kk,querySelector:qk,querySelectorAll:Jk,mutationObserver:Yk,patch:Xk};function Qk(e,t,n){n===void 0&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var $k=`Please stop import mirror directly. Instead of that,\r
73now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
74or you can use record.mirror to access the mirror instance during recording.`,eA={map:{},getId:function(){return console.error($k),-1},getNode:function(){return console.error($k),null},removeNodeFromMap:function(){console.error($k)},has:function(){return console.error($k),!1},reset:function(){console.error($k)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(eA=new Proxy(eA,{get:function(e,t,n){return t===`map`&&console.error($k),Reflect.get(e,t,n)}}));function tA(e,t,n){n===void 0&&(n={});var r=null,i=0;return function(){var a=[...arguments],o=Date.now();!i&&n.leading===!1&&(i=o);var s=t-(o-i),c=this;s<=0||s>t?(r&&=(clearTimeout(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=setTimeout(function(){i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function nA(e,t,n,r,i){i===void 0&&(i=window);var a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),a&&a.set&&a.set.call(this,e)}}),function(){return nA(e,t,a||{},!0)}}var rA=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(rA=function(){return new Date().getTime()});function iA(e){var t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t.documentElement.scrollLeft||t?.body&&Zk.parentElement(t.body)?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body&&Zk.parentElement(t.body)?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function aA(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function oA(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function sA(e){return e?e.nodeType===e.ELEMENT_NODE?e:Zk.parentElement(e):null}function cA(e,t,n,r){if(!e)return!1;var i=sA(e);if(!i)return!1;try{if(typeof t==`string`){if(i.classList.contains(t)||r&&i.closest(`.`+t)!==null)return!0}else if(Fx(i,t,r))return!0}catch{}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function lA(e,t){return t.getId(e)!==-1}function uA(e,t,n){return e.tagName===`TITLE`&&n.headTitleMutations?!0:t.getId(e)===bx}function dA(e,t){if(Kb(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=Zk.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:!r||dA(r,t)}function fA(e){return!!e.changedTouches}function pA(e){e===void 0&&(e=window),`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function mA(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function hA(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function gA(e){return e?ob(e,Ok)&&`shadowRoot`in e?!!e.shadowRoot:!!Zk.shadowRoot(e):!1}var _A=function(){function e(){q(this,`id`,1),q(this,`styleIDMap`,new WeakMap),q(this,`idStyleMap`,new Map)}var t=e.prototype;return t.getId=function(e){return this.styleIDMap.get(e)??-1},t.has=function(e){return this.styleIDMap.has(e)},t.add=function(e,t){if(this.has(e))return this.getId(e);var n=t===void 0?this.id++:t;return this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n},t.getStyle=function(e){return this.idStyleMap.get(e)||null},t.reset=function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},t.generateId=function(){return this.id++},t.remove=function(e){var t=this.styleIDMap.get(e);return t!==void 0&&(this.styleIDMap.delete(e),this.idStyleMap.delete(t),!0)},e}();function vA(e){var t=null;return`getRootNode`in e&&Zk.getRootNode(e)?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Zk.host(Zk.getRootNode(e))&&(t=Zk.host(Zk.getRootNode(e))),t}function yA(e){for(var t=e,n;n=vA(t);)t=n;return t}function bA(e){var t=e.ownerDocument;if(!t)return!1;var n=yA(e);return Zk.contains(t,n)}function xA(e){var t=e.ownerDocument;return t?Zk.contains(t,e)||bA(e):!1}var SA=function(e){return e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e}(SA||{}),CA=function(e){return e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e}(CA||{}),wA=function(e){return e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e}(wA||{}),TA=function(e){return e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e}(TA||{}),EA=function(e){return e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e}(EA||{}),DA=function(e){return e[e.Play=0]=`Play`,e[e.Pause=1]=`Pause`,e[e.Seeked=2]=`Seeked`,e[e.VolumeChange=3]=`VolumeChange`,e[e.RateChange=4]=`RateChange`,e}(DA||{}),OA=function(e){return e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e}(OA||{});function kA(e){return`__ln`in e}var AA=function(){function e(){q(this,`length`,0),q(this,`head`,null),q(this,`tail`,null)}var t=e.prototype;return t.get=function(e){if(e>=this.length)throw Error(`Position outside of list range`);for(var t=this.head,n=0;n<e;n++)t=t?.next||null;return t},t.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&kA(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&
vendor: 7,143 bytes, line 74
74(n.previous=t)}else if(e.nextSibling&&kA(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++},t.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)},e}(),jA=function(e,t){return e+`@`+t},MA=function(){function e(){var e=this;q(this,`frozen`,!1),q(this,`locked`,!1),q(this,`texts`,[]),q(this,`attributes`,[]),q(this,`attributeMap`,new WeakMap),q(this,`removes`,[]),q(this,`mapRemoves`,[]),q(this,`movedMap`,{}),q(this,`addedSet`,new Set),q(this,`movedSet`,new Set),q(this,`droppedSet`,new Set),q(this,`removesSubTreeCache`,new Set),q(this,`mutationCb`),q(this,`blockClass`),q(this,`blockSelector`),q(this,`maskTextClass`),q(this,`maskTextSelector`),q(this,`inlineStylesheet`),q(this,`maskInputOptions`),q(this,`maskTextFn`),q(this,`maskInputFn`),q(this,`keepIframeSrcFn`),q(this,`recordCanvas`),q(this,`inlineImages`),q(this,`slimDOMOptions`),q(this,`dataURLOptions`),q(this,`doc`),q(this,`mirror`),q(this,`iframeManager`),q(this,`stylesheetManager`),q(this,`shadowDomManager`),q(this,`canvasManager`),q(this,`processedNodeManager`),q(this,`unattachedDoc`),q(this,`processMutations`,function(t){t.forEach(e.processMutation),e.emit()}),q(this,`emit`,function(){if(!(e.frozen||e.locked)){for(var t=[],n=new Set,r=new AA,i=function(t){for(var n=t,r=bx;r===bx;)n&&=n.nextSibling,r=n&&e.mirror.getId(n);return r},a=function(a){var o=Zk.parentNode(a);if(!(!o||!xA(a))){var s=!1;if(a.nodeType===Node.TEXT_NODE){var c=o.tagName;if(c===`TEXTAREA`)return;c===`STYLE`&&e.addedSet.has(o)&&(s=!0)}var l=Kb(o)?e.mirror.getId(vA(a)):e.mirror.getId(o),u=i(a);if(l===-1||u===-1)return r.addNode(a);var d=Gx(a,{doc:e.doc,mirror:e.mirror,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,dataURLOptions:e.dataURLOptions,recordCanvas:e.recordCanvas,inlineImages:e.inlineImages,onSerialize:function(t){mA(t,e.mirror)&&e.iframeManager.addIframe(t),hA(t,e.mirror)&&e.stylesheetManager.trackLinkElement(t),gA(a)&&e.shadowDomManager.addShadowRoot(Zk.shadowRoot(a),e.doc)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n),e.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:function(t,n){e.stylesheetManager.attachLinkElement(t,n)},cssCaptured:s});d&&(t.push({parentId:l,nextId:u,node:d}),n.add(d.id))}};e.mapRemoves.length;){var o=e.mapRemoves.shift();e.cleanupRemovedNode(o),e.mirror.removeNodeFromMap(o)}for(var s=K(e.movedSet),c;!(c=s()).done;){var l=c.value;FA(e.removesSubTreeCache,l,e.mirror)&&!e.movedSet.has(Zk.parentNode(l))||a(l)}for(var u=K(e.addedSet),d;!(d=u()).done;){var f=d.value;!LA(e.droppedSet,f)&&!FA(e.removesSubTreeCache,f,e.mirror)||LA(e.movedSet,f)?a(f):e.droppedSet.add(f)}for(var p=null;r.length;){var m=null;if(p){var h=e.mirror.getId(Zk.parentNode(p.value)),g=i(p.value);h!==-1&&g!==-1&&(m=p)}if(!m)for(var _=r.tail;_;){var v=_;if(_=_.previous,v){var y=e.mirror.getId(Zk.parentNode(v.value));if(i(v.value)===-1)continue;if(y!==-1){m=v;break}var b=v.value,x=Zk.parentNode(b);if(x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var S=Zk.host(x);if(e.mirror.getId(S)!==-1){m=v;break}}}}if(!m){for(;r.head;)r.removeNode(r.head.value);break}p=m.previous,r.removeNode(m.value),a(m.value)}var C={texts:e.texts.map(function(t){var n=t.node,r=Zk.parentNode(n);return r&&r.tagName===`TEXTAREA`&&e.genTextAreaValueMutation(r),{id:e.mirror.getId(n),value:t.value}}).filter(function(e){return!n.has(e.id)}).filter(function(t){return e.mirror.has(t.id)}),attributes:e.attributes.map(function(t){var n=t.attributes;if(typeof n.style==`string`){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);r.length<n.style.length&&(r+i).split(`var(`).length===n.style.split(`var(`).length&&(n.style=t.styleDiff)}return{id:e.mirror.getId(t.node),attributes:n}}).filter(function(e){return!n.has(e.id)}).filter(function(t){return e.mirror.has(t.id)}),removes:e.removes,adds:t};!C.texts.length&&!C.attributes.length&&!C.removes.length&&!C.adds.length||(e.texts=[],e.attributes=[],e.attributeMap=new WeakMap,e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.removesSubTreeCache=new Set,e.movedMap={},e.mutationCb(C))}}),q(this,`genTextAreaValueMutation`,function(t){var n=e.attributeMap.get(t);n||(n={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},e.attributes.push(n),e.attributeMap.set(t,n));var r=Array.from(Zk.childNodes(t),function(e){return Zk.textContent(e)||``}).join(``);n.attributes.value=rx({element:t,maskInputOptions:e.maskInputOptions,tagName:t.tagName,type:sx(t),value:r,maskInputFn:e.maskInputFn})}),q(this,`processMutation`,function(t){if(!uA(t.target,e.mirror,e.slimDOMOptions))switch(t.type){case`characterData`:var n=Zk.textContent(t.target);!cA(t.target,e.blockClass,e.blockSelector,!1)&&n!==t.oldValue&&e.texts.push({value:Ix(t.target,e.maskTextClass,e.maskTextSelector,!0)&&n?e.maskTextFn?e.maskTextFn(n,sA(t.target)):n.replace(/[\S]/g,`*`):n,node:t.target});break;case`attributes`:var r=t.target,i=t.attributeName,a=t.target.getAttribute(i);if(i===`value`){var o=sx(r);a=rx({element:r,maskInputOptions:e.maskInputOptions,tagName:r.tagName,type:o,value:a,maskInputFn:e.maskInputFn})}if(cA(t.target,e.blockClass,e.blockSelector,!1)||a===t.oldValue)return;var s=e.attributeMap.get(t.target);if(r.tagName===`IFRAME`&&i===`src`&&!e.keepIframeSrcFn(a)){if(!r.contentDocument)i=`rr_src`;else return}if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},e.attributes.push(s),e.attributeMap.set(t.target,s)),i===`type`&&r.tagName===`INPUT`&&(t.oldValue||``).toLowerCase()===`password`&&r.setAttribute(`data-rr-is-password`,`true`),!Nx(r.tagName,i)){if(s.attributes[i]=Mx(e.doc,ix(r.tagName),ix(i),a),i===`style`){if(!e.unattachedDoc)try{e.unattachedDoc=document.implementation.createHTMLDocument()}catch{e.unattachedDoc=e.doc}var c=e.unattachedDoc.createElement(`span`);t.oldValue&&c.setAttribute(`style`,t.oldValue);for(var l=K(Array.from(r.style)),u;!(u=l()).done;){var d=u.value,f=r.style.getPropertyValue(d),p=r.style.getPropertyPriority(d);f!==c.style.getPropertyValue(d)||p!==c.style.getPropertyPriority(d)?p===``?s.styleDiff[d]=f:s.styleDiff[d]=[f,p]:s._unchangedStyles[d]=[f,p]}for(var m=K(Array.from(c.style)),h;!(h=m()).done;){var g=h.value;r.style.getPropertyValue(g)===``&&(s.styleDiff[g]=!1)}}else i===`open`&&r.tagName===`DIALOG`&&(r.matches(`dialog:modal`)?s.attributes.rr_open_mode=`modal`:s.attributes.rr_open_mode=`non-modal`)}break;case`childList`:if(cA(t.target,e.blockClass,e.blockSelector,!0))return;if(t.target.tagName===`TEXTAREA`){e.genTextAreaValueMutation(t.target);return}
74t.addedNodes.forEach(function(n){return e.genAdds(n,t.target)}),t.removedNodes.forEach(function(n){var r=e.mirror.getId(n),i=Kb(t.target)?e.mirror.getId(Zk.host(t.target)):e.mirror.getId(t.target);cA(t.target,e.blockClass,e.blockSelector,!1)||uA(n,e.mirror,e.slimDOMOptions)||!lA(n,e.mirror)||(e.addedSet.has(n)?(NA(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&r===-1||dA(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[jA(r,i)]?NA(e.movedSet,n):(e.removes.push({parentId:i,id:r,isShadow:Kb(t.target)&&qb(t.target)?!0:void 0}),PA(n,e.removesSubTreeCache))),e.mapRemoves.push(n))})}}),q(this,`genAdds`,function(t,n){if(!e.processedNodeManager.inOtherBuffer(t,e)&&!(e.addedSet.has(t)||e.movedSet.has(t))){if(e.mirror.hasNode(t)){if(uA(t,e.mirror,e.slimDOMOptions))return;e.movedSet.add(t);var r=null;n&&e.mirror.hasNode(n)&&(r=e.mirror.getId(n)),r&&r!==-1&&(e.movedMap[jA(e.mirror.getId(t),r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);cA(t,e.blockClass,e.blockSelector,!1)||(Zk.childNodes(t).forEach(function(t){return e.genAdds(t)}),gA(t)&&Zk.childNodes(Zk.shadowRoot(t)).forEach(function(n){e.processedNodeManager.add(n,e),e.genAdds(n,t)}))}}),q(this,`cleanupRemovedNode`,function(t){if(t.nodeName===`IFRAME`)try{e.iframeManager.removeIframe(t)}catch{}else try{e.stylesheetManager.cleanupStylesheetsForRemovedNode(t)}catch{}t.childNodes.forEach(function(t){e.cleanupRemovedNode(t)})})}var t=e.prototype;return t.init=function(e){var t=this;[`mutationCb`,`blockClass`,`blockSelector`,`maskTextClass`,`maskTextSelector`,`inlineStylesheet`,`maskInputOptions`,`maskTextFn`,`maskInputFn`,`keepIframeSrcFn`,`recordCanvas`,`inlineImages`,`slimDOMOptions`,`dataURLOptions`,`doc`,`mirror`,`iframeManager`,`stylesheetManager`,`shadowDomManager`,`canvasManager`,`processedNodeManager`].forEach(function(n){t[n]=e[n]})},t.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},t.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},t.isFrozen=function(){return this.frozen},t.lock=function(){this.locked=!0,this.canvasManager.lock()},t.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},t.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},t.getDoc=function(){return this.doc},e}();function NA(e,t){e.delete(t),Zk.childNodes(t).forEach(function(t){return NA(e,t)})}function PA(e,t){for(var n=[e];n.length;){var r=n.pop();t.has(r)||(t.add(r),Zk.childNodes(r).forEach(function(e){return n.push(e)}))}}function FA(e,t,n){return e.size!==0&&IA(e,t)}function IA(e,t,n){var r=Zk.parentNode(t);return r?e.has(r):!1}function LA(e,t){return e.size!==0&&RA(e,t)}function RA(e,t){var n=Zk.parentNode(t);return n?e.has(n)?!0:RA(e,n):!1}var zA;function BA(e){zA=e}function VA(){zA=void 0}var HA=function(e){return zA?function(){var t=[...arguments];try{return e.apply(void 0,[].concat(t))}catch(e){if(zA&&zA(e)===!0)return;throw e}}:e},UA=[];function WA(e){try{if(`composedPath`in e){var t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function GA(e,t){var n=new MA;UA.push(n),n.init(e);var r=new(Yk())(HA(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function KA(e){for(var t=UA.length-1;t>=0;t--)UA[t].getDoc()===e&&UA.splice(t,1)}function qA(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(n.mousemove===!1)return function(){};var a=typeof n.mousemove==`number`?n.mousemove:50,o=typeof n.mousemoveCallback==`number`?n.mousemoveCallback:500,s=[],c,l=tA(HA(function(e){var n=Date.now()-c;t(s.map(function(e){return e.timeOffset-=n,e}),e),s=[],c=null}),o),u=HA(tA(HA(function(e){var t=WA(e),n=fA(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;c||=rA(),s.push({x:r,y:a,id:i.getId(t),timeOffset:rA()-c}),l(typeof DragEvent<`u`&&ob(e,DragEvent)?CA.Drag:ob(e,MouseEvent)?CA.MouseMove:CA.TouchMove)}),a,{trailing:!1})),d=[Qk(`mousemove`,u,r),Qk(`touchmove`,u,r),Qk(`drag`,u,r)];return HA(function(){d.forEach(function(e){return e()})})}function JA(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,a=e.blockSelector,o=e.sampling;if(o.mouseInteraction===!1)return function(){};var s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=function(e){return function(n){var o=WA(n);if(!cA(o,i,a,!0)){var s=null,c=e;if(`pointerType`in n){switch(n.pointerType){case`mouse`:s=TA.Mouse;break;case`touch`:s=TA.Touch;break;case`pen`:s=TA.Pen}s===TA.Touch?wA[e]===wA.MouseDown?c=`TouchStart`:wA[e]===wA.MouseUp&&(c=`TouchEnd`):TA.Pen}else fA(n)&&(s=TA.Touch);s===null?wA[e]===wA.Click&&(s=l,l=null):(l=s,(c.startsWith(`Touch`)&&s===TA.Touch||c.startsWith(`Mouse`)&&s===TA.Mouse)&&(s=null));var u=fA(n)?n.changedTouches[0]:n;if(u){var d=r.getId(o),f=u.clientX,p=u.clientY;HA(t)(rb({type:wA[c],id:d,x:f,y:p},s!==null&&{pointerType:s}))}}}};return Object.keys(wA).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1}
vendor: 7,724 bytes, line 74
74).forEach(function(e){var t=ix(e),r=u(e);if(window.PointerEvent)switch(wA[e]){case wA.MouseDown:case wA.MouseUp:t=t.replace(`mouse`,`pointer`);break;case wA.TouchStart:case wA.TouchEnd:return}c.push(Qk(t,r,n))}),HA(function(){c.forEach(function(e){return e()})})}function YA(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,a=e.blockSelector,o=e.sampling;return Qk(`scroll`,HA(tA(HA(function(e){var o=WA(e);if(!(!o||cA(o,i,a,!0))){var s=r.getId(o);if(o===n&&n.defaultView){var c=iA(n.defaultView);t({id:s,x:c.left,y:c.top})}else t({id:s,x:o.scrollLeft,y:o.scrollTop})}}),o.scroll||100)),n)}function XA(e,t){var n=e.viewportResizeCb,r=t.win,i=-1,a=-1;return Qk(`resize`,HA(tA(HA(function(){var e=aA(),t=oA();(i!==e||a!==t)&&(n({width:Number(t),height:Number(e)}),i=e,a=t)}),200)),r)}var ZA=[`INPUT`,`TEXTAREA`,`SELECT`],QA=new WeakMap;function $A(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,a=e.blockSelector,o=e.ignoreClass,s=e.ignoreSelector,c=e.maskInputOptions,l=e.maskInputFn,u=e.sampling,d=e.userTriggeredOnInput;function f(e){var t=WA(e),r=e.isTrusted,u=t&&t.tagName;if(t&&u===`OPTION`&&(t=Zk.parentElement(t)),!(!t||!u||ZA.indexOf(u)<0||cA(t,i,a,!0))&&!(t.classList.contains(o)||s&&t.matches(s))){var f=t.value,m=!1,h=sx(t)||``;h===`radio`||h===`checkbox`?m=t.checked:(c[u.toLowerCase()]||c[h])&&(f=rx({element:t,maskInputOptions:c,tagName:u,type:h,value:f,maskInputFn:l})),p(t,d?{text:f,isChecked:m,userTriggered:r}:{text:f,isChecked:m});var g=t.name;h===`radio`&&g&&m&&n.querySelectorAll(`input[type="radio"][name="`+g+`"]`).forEach(function(e){if(e!==t){var n=e.value;p(e,d?{text:n,isChecked:!m,userTriggered:!1}:{text:n,isChecked:!m})}})}}function p(e,n){var i=QA.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){QA.set(e,n);var a=r.getId(e);HA(t)(rb({},n,{id:a}))}}var m=(u.input===`last`?[`change`]:[`input`,`change`]).map(function(e){return Qk(e,HA(f),n)}),h=n.defaultView;if(!h)return function(){m.forEach(function(e){return e()})};var g=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,`value`),_=[[h.HTMLInputElement.prototype,`value`],[h.HTMLInputElement.prototype,`checked`],[h.HTMLSelectElement.prototype,`value`],[h.HTMLTextAreaElement.prototype,`value`],[h.HTMLSelectElement.prototype,`selectedIndex`],[h.HTMLOptionElement.prototype,`selected`]];if(g&&g.set){var v;(v=m).push.apply(v,[].concat(_.map(function(e){return nA(e[0],e[1],{set:function(){HA(f)({target:this,isTrusted:!1})}},!1,h)})))}return HA(function(){m.forEach(function(e){return e()})})}function ej(e){var t=[];function n(e,t){if(dj(`CSSGroupingRule`)&&ob(e.parentRule,CSSGroupingRule)||dj(`CSSMediaRule`)&&ob(e.parentRule,CSSMediaRule)||dj(`CSSSupportsRule`)&&ob(e.parentRule,CSSSupportsRule)||dj(`CSSConditionRule`)&&ob(e.parentRule,CSSConditionRule)){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}return n(e,t)}function tj(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function nj(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,a=t.win;if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return function(){};var o=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:HA(function(e,t,a){var o=a[0],s=a[1],c=tj(t,r,i.styleMirror),l=c.id,u=c.styleId;return(l&&l!==-1||u&&u!==-1)&&n({id:l,styleId:u,adds:[{rule:o,index:s}]}),e.apply(t,a)})}),a.CSSStyleSheet.prototype.addRule=function(e,t,n){n===void 0&&(n=this.cssRules.length);var r=e+` { `+t+` }`;return a.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};var s=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:HA(function(e,t,a){var o=a[0],s=tj(t,r,i.styleMirror),c=s.id,l=s.styleId;return(c&&c!==-1||l&&l!==-1)&&n({id:c,styleId:l,removes:[{index:o}]}),e.apply(t,a)})}),a.CSSStyleSheet.prototype.removeRule=function(e){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[e])};var c;a.CSSStyleSheet.prototype.replace&&(c=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:HA(function(e,t,a){var o=a[0],s=tj(t,r,i.styleMirror),c=s.id,l=s.styleId;return(c&&c!==-1||l&&l!==-1)&&n({id:c,styleId:l,replace:o}),e.apply(t,a)})}));var l;a.CSSStyleSheet.prototype.replaceSync&&(l=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:HA(function(e,t,a){var o=a[0],s=tj(t,r,i.styleMirror),c=s.id,l=s.styleId;return(c&&c!==-1||l&&l!==-1)&&n({id:c,styleId:l,replaceSync:o}),e.apply(t,a)})}));var u={};fj(`CSSGroupingRule`)?u.CSSGroupingRule=a.CSSGroupingRule:(fj(`CSSMediaRule`)&&(u.CSSMediaRule=a.CSSMediaRule),fj(`CSSConditionRule`)&&(u.CSSConditionRule=a.CSSConditionRule),fj(`CSSSupportsRule`)&&(u.CSSSupportsRule=a.CSSSupportsRule));var d={};return Object.entries(u).forEach(function(e){var t=e[0],a=e[1];d[t]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(d[t].insertRule,{apply:HA(function(e,t,a){var o=a[0],s=a[1],c=tj(t.parentStyleSheet,r,i.styleMirror),l=c.id,u=c.styleId;return(l&&l!==-1||u&&u!==-1)&&n({id:l,styleId:u,adds:[{rule:o,index:[].concat(ej(t),[s||0])}]}),e.apply(t,a)})}),a.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:HA(function(e,t,a){var o=a[0],s=tj(t.parentStyleSheet,r,i.styleMirror),c=s.id,l=s.styleId;return(c&&c!==-1||l&&l!==-1)&&n({id:c,styleId:l,removes:[{index:[].concat(ej(t),[o])}]}),e.apply(t,a)})})}),HA(function(){a.CSSStyleSheet.prototype.insertRule=o,a.CSSStyleSheet.prototype.deleteRule=s,c&&(a.CSSStyleSheet.prototype.replace=c),l&&(a.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach(function(e){var t=e[0],n=e[1];n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule})})}function rj(e,t){var n=e.mirror,r=e.stylesheetManager,i=null;i=t.nodeName===`#document`?n.getId(t):n.getId(Zk.host(t));var a=t.nodeName===`#document`?t.defaultView?.Document:t.ownerDocument?.defaultView?.ShadowRoot,o=a?.prototype?Object.getOwnPropertyDescriptor(a?.prototype,`adoptedStyleSheets`):void 0;return i===null||i===-1||!a||!o?function(){}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:function(){return o.get?.call(this)},set:function(e){var t=o.set?.call(this,e);if(i!==null&&i!==-1)try{r.adoptStyleSheets(e,i)}catch{}return t}}),HA(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function ij(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,a=e.stylesheetManager,o=t.win,s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:HA(function(e,t,o){var c=o[0],l=o[1],u=o[2];if(i.has(c))return s.apply(t,[c,l,u]);var d=tj(t.parentRule?.parentStyleSheet,r,a.styleMirror),f=d.id,p=d.styleId;return(f&&f!==-1||p&&p!==-1)&&n({id:f,styleId:p,set:{property:c,value:l,priority:u},index:ej(t.parentRule)}),e.apply(t,o)})});var c=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:HA(function(e,t,o){var s=o[0];if(i.has(s))return c.apply(t,[s]);var l=tj(t.parentRule?.parentStyleSheet,r,a.styleMirror),u=l.id,d=l.styleId;return(u&&u!==-1||d&&d!==-1)&&n({id:u,styleId:d,remove:{property:s},index:ej(t.parentRule)}),e.apply(t,o)})}),HA(function(){o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=c})}function aj(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,a=e.sampling,o=e.doc,s=HA(function(e){return tA(HA(function(a){var o=WA(a);
74if(!(!o||cA(o,n,r,!0))){var s=o.currentTime,c=o.volume,l=o.muted,u=o.playbackRate,d=o.loop;t({type:e,id:i.getId(o),currentTime:s,volume:c,muted:l,playbackRate:u,loop:d})}}),a.media||500)}),c=[Qk(`play`,s(DA.Play),o),Qk(`pause`,s(DA.Pause),o),Qk(`seeked`,s(DA.Seeked),o),Qk(`volumechange`,s(DA.VolumeChange),o),Qk(`ratechange`,s(DA.RateChange),o)];return HA(function(){c.forEach(function(e){return e()})})}function oj(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],a=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,n){var r=new o(e,t,n);return a.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=Xk(n.fonts,`add`,function(e){return function(n){return setTimeout(HA(function(){var e=a.get(n);e&&(t(e),a.delete(n))}),0),e.apply(this,[n])}});return i.push(function(){r.FontFace=o}),i.push(s),HA(function(){i.forEach(function(e){return e()})})}function sj(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,a=e.selectionCb,o=!0,s=HA(function(){var e=t.getSelection();if(!(!e||o&&e?.isCollapsed)){o=e.isCollapsed||!1;for(var s=[],c=e.rangeCount||0,l=0;l<c;l++){var u=e.getRangeAt(l),d=u.startContainer,f=u.startOffset,p=u.endContainer,m=u.endOffset;cA(d,r,i,!0)||cA(p,r,i,!0)||s.push({start:n.getId(d),startOffset:f,end:n.getId(p),endOffset:m})}a({ranges:s})}});return s(),Qk(`selectionchange`,s)}function cj(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return!r||!r.customElements?function(){}:Xk(r.customElements,`define`,function(e){return function(t,r,i){try{n({define:{name:t}})}catch{console.warn(`Custom element callback failed for `+t)}return e.apply(this,[t,r,i])}})}function lj(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,a=e.scrollCb,o=e.viewportResizeCb,s=e.inputCb,c=e.mediaInteractionCb,l=e.styleSheetRuleCb,u=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,p=e.selectionCb,m=e.customElementCb;e.mutationCb=function(){var e=[...arguments];if(t.mutation){var r;(r=t).mutation.apply(r,[].concat(e))}n.apply(void 0,[].concat(e))},e.mousemoveCb=function(){var e=[...arguments];if(t.mousemove){var n;(n=t).mousemove.apply(n,[].concat(e))}r.apply(void 0,[].concat(e))},e.mouseInteractionCb=function(){var e=[...arguments];if(t.mouseInteraction){var n;(n=t).mouseInteraction.apply(n,[].concat(e))}i.apply(void 0,[].concat(e))},e.scrollCb=function(){var e=[...arguments];if(t.scroll){var n;(n=t).scroll.apply(n,[].concat(e))}a.apply(void 0,[].concat(e))},e.viewportResizeCb=function(){var e=[...arguments];if(t.viewportResize){var n;(n=t).viewportResize.apply(n,[].concat(e))}o.apply(void 0,[].concat(e))},e.inputCb=function(){var e=[...arguments];if(t.input){var n;(n=t).input.apply(n,[].concat(e))}s.apply(void 0,[].concat(e))},e.mediaInteractionCb=function(){var e=[...arguments];if(t.mediaInteaction){var n;(n=t).mediaInteaction.apply(n,[].concat(e))}c.apply(void 0,[].concat(e))},e.styleSheetRuleCb=function(){var e=[...arguments];if(t.styleSheetRule){var n;(n=t).styleSheetRule.apply(n,[].concat(e))}l.apply(void 0,[].concat(e))},e.styleDeclarationCb=function(){var e=[...arguments];if(t.styleDeclaration){var n;(n=t).styleDeclaration.apply(n,[].concat(e))}u.apply(void 0,[].concat(e))},e.canvasMutationCb=function(){var e=[...arguments];if(t.canvasMutation){var n;(n=t).canvasMutation.apply(n,[].concat(e))}d.apply(void 0,[].concat(e))},e.fontCb=function(){var e=[...arguments];if(t.font){var n;(n=t).font.apply(n,[].concat(e))}f.apply(void 0,[].concat(e))},e.selectionCb=function(){var e=[...arguments];if(t.selection){var n;(n=t).selection.apply(n,[].concat(e))}p.apply(void 0,[].concat(e))},e.customElementCb=function(){var e=[...arguments];if(t.customElement){var n;(n=t).customElement.apply(n,[].concat(e))}m.apply(void 0,[].concat(e))}}function uj(e,t){t===void 0&&(t={});var n=e.doc.defaultView;if(!n)return function(){};lj(e,t);var r;e.recordDOM&&(r=GA(e,e.doc));var i=qA(e),a=JA(e),o=YA(e),s=XA(e,{win:n}),c=$A(e),l=aj(e),u=function(){},d=function(){},f=function(){},p=function(){};e.recordDOM&&(u=nj(e,{win:n}),d=rj(e,e.doc),f=ij(e,{win:n}),e.collectFonts&&(p=oj(e)));for(var m=sj(e),h=cj(e),g=[],_=K(e.plugins),v;!(v=_()).done;){var y=v.value;g.push(y.observer(y.callback,n,y.options))}return HA(function(){UA.forEach(function(e){return e.reset()}),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(function(e){return e()})})}function dj(e){return window[e]!==void 0}function fj(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}for(var pj=function(){function e(e){q(this,`iframeIdToRemoteIdMap`,new WeakMap),q(this,`iframeRemoteIdToIdMap`,new WeakMap),this.generateIdFn=e}var t=e.prototype;return t.getId=function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o},t.getIds=function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getId(e,t,r,i)})},t.getRemoteId=function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t},t.getRemoteIds=function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getRemoteId(e,t,r)})},t.reset=function(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)},t.getIdToRemoteIdMap=function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t},t.getRemoteIdToIdMap=function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t},e}(),mj=function(){function e(e){q(this,`iframes`,new WeakMap),q(this,`crossOriginIframeMap`,new WeakMap),q(this,`crossOriginIframeMirror`,new pj(xx)),q(this,`crossOriginIframeStyleMirror`),q(this,`crossOriginIframeRootIdMap`,new WeakMap),q(this,`iframeC
74ontentDocumentMap`,new WeakMap),q(this,`iframeObserverCleanupMap`,new WeakMap),q(this,`mirror`),q(this,`mutationCb`),q(this,`wrappedEmit`),q(this,`loadListener`),q(this,`stylesheetManager`),q(this,`recordCrossOriginIframes`),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pj(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}var t=e.prototype;return t.addIframe=function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)},t.getIframeContentDocument=function(e){return this.iframeContentDocumentMap.get(e)},t.setObserverCleanup=function(e,t){this.iframeObserverCleanupMap.set(e,t)},t.getObserverCleanup=function(e){return this.iframeObserverCleanupMap.get(e)},t.removeIframe=function(e){var t=this.iframeContentDocumentMap.get(e);t&&(this.stylesheetManager.cleanupStylesheetsForRemovedNode(t),this.mirror.removeNodeFromMap(t,!0)),this.iframes.delete(e),this.iframeC
vendor: 5,090 bytes, line 74
74ontentDocumentMap.delete(e);var n=this.iframeObserverCleanupMap.get(e);if(n){try{n()}catch{}this.iframeObserverCleanupMap.delete(e)}},t.addLoadListener=function(e){this.loadListener=e},t.attachIframe=function(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),e.contentDocument&&this.iframeContentDocumentMap.set(e,e.contentDocument),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener(`message`,this.handleMessage.bind(this))),(r=this.loadListener)==null||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))},t.handleMessage=function(e){var t=e;if(t.data.type===`rrweb`&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}},t.transformCrossOriginEvent=function(e,t){var n=this,r;switch(t.type){case SA.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:SA.IncrementalSnapshot,data:{source:CA.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case SA.Meta:case SA.Load:case SA.DomContentLoaded:return!1;case SA.Plugin:return t;case SA.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case SA.IncrementalSnapshot:switch(t.data.source){case CA.Mutation:return t.data.adds.forEach(function(t){n.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),n.replaceIdOnNode(t.node,e);var r=n.crossOriginIframeRootIdMap.get(e);r&&n.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(function(t){n.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(function(t){n.replaceIds(t,e,[`id`])}),t.data.texts.forEach(function(t){n.replaceIds(t,e,[`id`])}),t;case CA.Drag:case CA.TouchMove:case CA.MouseMove:return t.data.positions.forEach(function(t){n.replaceIds(t,e,[`id`])}),t;case CA.ViewportResize:return!1;case CA.MediaInteraction:case CA.MouseInteraction:case CA.Scroll:case CA.CanvasMutation:case CA.Input:return this.replaceIds(t.data,e,[`id`]),t;case CA.StyleSheetRule:case CA.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case CA.Font:return t;case CA.Selection:return t.data.ranges.forEach(function(t){n.replaceIds(t,e,[`start`,`end`])}),t;case CA.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),(r=t.data.styles)==null||r.forEach(function(t){n.replaceStyleIds(t,e,[`styleId`])}),t}}return!1},t.replace=function(e,t,n,r){for(var i=K(r),a;!(a=i()).done;){var o=a.value;!Array.isArray(t[o])&&typeof t[o]!=`number`||(t[o]=Array.isArray(t[o])?e.getIds(n,t[o]):e.getId(n,t[o]))}return t},t.replaceIds=function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)},t.replaceStyleIds=function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)},t.replaceIdOnNode=function(e,t){var n=this;this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})},t.patchRootIdOnNode=function(e,t){var n=this;e.type!==OA.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})},e}(),hj=function(){function e(e){q(this,`shadowDoms`,new WeakSet),q(this,`mutationCb`),q(this,`scrollCb`),q(this,`bypassOptions`),q(this,`mirror`),q(this,`restoreHandlers`,[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}var t=e.prototype;return t.init=function(){this.reset(),this.patchAttachShadow(Element,document)},t.addShadowRoot=function(e,t){var n=this;if(qb(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=GA(rb({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(function(){return r.disconnect()}),this.restoreHandlers.push(YA(rb({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(Zk.host(e))),n.restoreHandlers.push(rj({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))},0)}},t.observeAttachShadow=function(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)},t.patchAttachShadow=function(e,t){var n=this;this.restoreHandlers.push(Xk(e.prototype,`attachShadow`,function(e){return function(r){var i=e.call(this,r),a=Zk.shadowRoot(this);return a&&xA(this)&&n.addShadowRoot(a,t),i}}))}
74,t.reset=function(){this.restoreHandlers.forEach(function(e){try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},e}(),gj=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,_j=typeof Uint8Array>`u`?[]:new Uint8Array(256),vj=0;vj<gj.length;vj++)_j[gj.charCodeAt(vj)]=vj;var yj=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=gj[t[n]>>2],i+=gj[(t[n]&3)<<4|t[n+1]>>4],i+=gj[(t[n+1]&15)<<2|t[n+2]>>6],i+=gj[t[n+2]&63];return r%3==2?i=i.substring(0,i.length-1)+`=`:r%3==1&&(i=i.substring(0,i.length-2)+`==`),i},bj=new Map;function xj(e,t){var n=bj.get(e);return n||(n=new Map,bj.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var Sj=function(e,t,n){if(!(!e||!(Tj(e,t)||(e===void 0?`undefined`:ub(e))===`object`))){var r=e.constructor.name,i=xj(n,r),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a}};function Cj(e,t,n){return ob(e,Array)?e.map(function(e){return Cj(e,t,n)}):e===null?e:ob(e,Float32Array)||ob(e,Float64Array)||ob(e,Int32Array)||ob(e,Uint32Array)||ob(e,Uint8Array)||ob(e,Uint16Array)||ob(e,Int16Array)||ob(e,Int8Array)||ob(e,Uint8ClampedArray)?{rr_type:e.constructor.name,args:[Object.values(e)]}:ob(e,ArrayBuffer)?{rr_type:e.constructor.name,base64:yj(e)}:ob(e,DataView)?{rr_type:e.constructor.name,args:[Cj(e.buffer,t,n),e.byteOffset,e.byteLength]}:ob(e,HTMLImageElement)?{rr_type:e.constructor.name,src:e.src}:ob(e,HTMLCanvasElement)?{rr_type:`HTMLImageElement`,src:e.toDataURL()}:ob(e,ImageData)?{rr_type:e.constructor.name,args:[Cj(e.data,t,n),e.width,e.height]}:Tj(e,t)||(e===void 0?`undefined`:ub(e))===`object`?{rr_type:e.constructor.name,index:Sj(e,t,n)}:e}var wj=function(e,t,n){return e.map(function(e){return Cj(e,t,n)})},Tj=function(e,t){return!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(function(e){return typeof t[e]==`function`}).find(function(n){return ob(e,t[n])})};function Ej(e,t,n,r){for(var i=function(){var i=s.value;try{if(typeof t.CanvasRenderingContext2D.prototype[i]!=`function`)return`continue`;var o=Xk(t.CanvasRenderingContext2D.prototype,i,function(a){return function(){var o=this,s=[...arguments];return cA(this.canvas,n,r,!0)||setTimeout(function(){var n=wj(s,t,o);e(o.canvas,{type:EA[`2D`],property:i,args:n})},0),a.apply(this,s)}});a.push(o)}catch{var c=nA(t.CanvasRenderingContext2D.prototype,i,{set:function(t){e(this.canvas,{type:EA[`2D`],property:i,args:[t],setter:!0})}});a.push(c)}},a=[],o=K(Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype)),s;!(s=o()).done;)i();return function(){a.forEach(function(e){return e()})}}function Dj(e){return e===`experimental-webgl`?`webgl`:e}function Oj(e,t,n,r){var i=[];try{var a=Xk(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(i){var a=[...arguments].slice(1);if(!cA(this,t,n,!0)){var o=Dj(i);if(`__context`in this||(this.__context=o),r&&[`webgl`,`webgl2`].includes(o)){if(a[0]&&ub(a[0])===`object`){var s=a[0];s.preserveDrawingBuffer||=!0}else a.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[i].concat(a))}});i.push(a)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return function(){i.forEach(function(e){return e()})}}function kj(e,t,n,r,i,a){for(var o=function(){var o=l.value;if([`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(o))return`continue`;try{if(typeof e[o]!=`function`)return`continue`;var c=Xk(e,o,function(e){return function(){var s=[...arguments],c=e.apply(this,s);if(Sj(c,a,this),`tagName`in this.canvas&&!cA(this.canvas,r,i,!0)){var l={type:t,property:o,args:wj(s,a,this)};n(this.canvas,l)}return c}});s.push(c)}catch{var u=nA(e,o,{set:function(e){n(this.canvas,{type:t,property:o,args:[e],setter:!0})}});s.push(u)}},s=[],c=K(Object.getOwnPropertyNames(e)),l;!(l=c()).done;)o();return s}function Aj(e,t,n,r){var i,a=[];if((i=a).push.apply(i,[].concat(kj(t.WebGLRenderingContext.prototype,EA.WebGL,e,n,r,t))),t.WebGL2RenderingContext!==void 0){var o;(o=a).push.apply(o,[].concat(kj(t.WebGL2RenderingContext.prototype,EA.WebGL2,e,n,r,t)))}return function(){a.forEach(function(e){return e()})}}var jj=`KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSA
74yKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=`,Mj=typeof window<`u`&&window.Blob&&new Blob([function(e){return Uint8Array.from(atob(e),function(e){return e.charCodeAt(0)})}(jj)],{type:`text/javascript;charset=utf-8`});function Nj(e){var t;try{if(t=Mj&&(window.URL||window.webkitURL).createObjectURL(Mj),!t)throw``;var n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,function(){(window.URL||window.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;base64,`+jj,{name:e?.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}var Pj=function(){function e(e){var t=this;q(this,`pendingCanvasMutations`,new Map),q(this,`rafStamps`,{latestId:0,invokeId:null}),q(this,`mirror`),q(this,`mutationCb`),q(this,`resetObservers`),q(this,`frozen`,!1),q(this,`locked`,!1),q(this,`processMutation`,function(e,n){(t.rafStamps.invokeId&&t.rafStamps.latestId!==t.rafStamps.invokeId||!t.rafStamps.invokeId)&&(t.rafStamps.invokeId=t.rafStamps.latestId),t.pendingCanvasMutations.has(e)||t.pendingCanvasMutations.set(e,[]),t.pendingCanvasMutations.get(e).push(n)});var n=e.sampling,r=n===void 0?`all`:n,i=e.win,a=e.blockClass,o=e.blockSelector,s=e.recordCanvas,c=e.dataURLOptions;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&r===`all`&&this.initCanvasMutationObserver(i,a,o),s&&typeof r==`number`&&this.initCanvasFPSObserver(r,i,a,o,{dataURLOptions:c})}var t=e.prototype;return t.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},t.freeze=function(){this.frozen=!0},t.unfreeze=function(){this.frozen=!1},t.lock=function(){this.locked=!0},t.unlock=function(){this.locked=!1},t.initCanvasFPSObserver=function(e,t,n,r,i){var a=this,o=Oj(t,n,r,!0),s=new Map,c=new Nj;c.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),`base64`in e.data){var n=e.data,r=n.base64,i=n.type,o=n.width,c=n.height;a.mutationCb({id:t,type:EA[`2D`],commands:[{property:`clearRect`,args:[0,0,o,c]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:r}],type:i}]},0,0]}]})}};var l=1e3/e,u=0,d,f=function(){var e=[];return t.document.querySelectorAll(`canvas`).forEach(function(t){cA(t,n,r,!0)||e.push(t)}),e},p=function(e){if(u&&e-u<l){d=requestAnimationFrame(p);return}u=e;var t=a;
74f().forEach($y(function(e){var n,r,a;return mb(this,function(o){switch(o.label){case 0:return n=t.mirror.getId(e),s.get(n)||e.width===0||e.height===0?[2]:(s.set(n,!0),[`webgl`,`webgl2`].includes(e.__context)&&(r=e.getContext(e.__context),r?.getContextAttributes()?.preserveDrawingBuffer===!1&&r.clear(r.COLOR_BUFFER_BIT)),[4,createImageBitmap(e)]);case 1:return a=o.sent(),c.postMessage({id:n,bitmap:a,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[a]),[2]}})})),d=requestAnimationFrame(p)};d=requestAnimationFrame(p),this.resetObservers=function(){o(),cancelAnimationFrame(d)}},t.initCanvasMutationObserver=function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=Oj(e,t,n,!1),i=Ej(this.processMutation.bind(this),e,t,n),a=Aj(this.processMutation.bind(this),e,t,n);this.resetObservers=function(){r(),i(),a()}},t.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})},t.startRAFTimestamping=function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)},t.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach(function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})},t.flushPendingCanvasMutationFor=function(e,t){if(!(this.frozen||this.locked)){var n=this.pendingCanvasMutations.get(e);if(!(!n||t===-1)){var r=n.map(function(e){return e.type,cb(e,[`type`])}),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}},e}(),Fj=function(){function e(e){q(this,`trackedLinkElements`,new WeakSet),q(this,`mutationCb`),q(this,`adoptedStyleSheetCb`),q(this,`styleMirror`,new _A),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}var t=e.prototype;return t.attachLinkElement=function(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)},t.trackLinkElement=function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))},t.adoptStyleSheets=function(e,t){var n,r=function(){var e=s.value,t=void 0;n.styleMirror.has(e)?t=n.styleMirror.getId(e):(t=n.styleMirror.add(e),a.push({styleId:t,rules:Array.from(e.rules||CSSRule,function(t,n){return{rule:Zb(t,e.href),index:n}})})),i.styleIds.push(t)};if(e.length!==0){for(var i={id:t,styleIds:[]},a=[],o=K(e),s;!(s=o()).done;)n=this,r();a.length>0&&(i.styles=a),this.adoptedStyleSheetCb(i)}},t.reset=function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},t.cleanupStylesheetsForRemovedNode=function(e){var t=this;try{if(e.nodeType===Node.DOCUMENT_NODE){var n=e;if(n.adoptedStyleSheets)for(var r=K(n.adoptedStyleSheets),i;!(i=r()).done;){var a=i.value;this.styleMirror.remove(a)}}if(e.nodeName===`STYLE`){var o=e;o.sheet&&this.styleMirror.remove(o.sheet)}if(e.nodeName===`LINK`&&e.rel===`stylesheet`){var s=e;s.sheet&&this.styleMirror.remove(s.sheet)}e.childNodes&&e.childNodes.forEach(function(e){t.cleanupStylesheetsForRemovedNode(e)})}catch{}},t.trackStylesheetInLinkElement=function(e){},e}(),Ij=function(){function e(){q(this,`nodeMap`,new WeakMap),q(this,`active`,!1)}var t=e.prototype;return t.inOtherBuffer=function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some(function(e){return e!==t})},t.add=function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))},t.destroy=function(){},e}();function Lj(e){try{var t=new URL(e).origin;return t===`null`?null:t}catch{return null}}function Rj(e){if(!Array.isArray(e)||e.length===0)throw Error(`[rrweb] allowedIframeOrigins must be a non-empty array of origin strings.`);for(var t=new Set,n=0;n<e.length;n++){var r=e[n];if(typeof r!=`string`)throw Error(`[rrweb] allowedIframeOrigins[`+n+`] must be a string, got `+(r===void 0?`undefined`:ub(r))+`.`);var i=Lj(r);i&&t.add(i)}return Object.freeze(t)}var zj,Bj,Vj,Hj=!1;try{if(Array.from([1],function(e){return e*2})[0]!==2){var Uj=document.createElement(`iframe`);document.body.appendChild(Uj),Array.from=Uj.contentWindow?.Array.from||Array.from,document.body.removeChild(Uj)}}catch(e){console.debug(`Unable to override Array.from`,e)}var Wj=nx();function Gj(e){e===void 0&&(e={});var t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,i=e.blockClass,a=i===void 0?`rr-block`:i,o=e.blockSelector,s=o===void 0?null:o,c=e.ignoreClass,l=c===void 0?`rr-ignore`:c,u=e.ignoreSelector,d=u===void 0?null:u,f=e.maskTextClass,p=f===void 0?`rr-mask`:f,m=e.maskTextSelector,h=m===void 0?null:m,g=e.inlineStylesheet,_=g===void 0||g,v=e.maskAllInputs,y=e.maskInputOptions,b=e.slimDOMOptions,x=e.maskInputFn,S=e.maskTextFn,C=e.hooks,w=e.packFn,T=e.sampling,E=T===void 0?{}:T,ee=e.dataURLOptions,D=ee===void 0?{}:ee,te=e.mousemoveWait,ne=e.recordDOM,O=ne===void 0||ne,re=e.recordCanvas,k=re!==void 0&&re,ie=e.recordCrossOriginIframes,A=ie!==void 0&&ie,ae=e.allowedIframeOrigins,oe=e.recordAfter,se=oe===void 0?e.re
74cordAfter===`DOMContentLoaded`?e.recordAfter:`load`:oe,ce=e.userTriggeredOnInput,le=ce!==void 0&&ce,j=e.collectFonts,ue=j!==void 0&&j,de=e.inlineImages,fe=de!==void 0&&de,pe=e.plugins,me=e.keepIframeSrcFn,he=me===void 0?function(){return!1}:me,ge=e.ignoreCSSAttributes,_e=ge===void 0?new Set([]):ge,M=e.errorHandler;BA(M);var ve;A&&ae&&ae.length>0&&(ve=Rj(ae),ve.size===0&&(ve=void 0));var N=!A||window.parent===window,ye=!1;if(!N)try{window.parent.document&&(ye=!1)}catch{ye=!0}if(N&&!t)throw Error(`emit function is required`);if(!N&&!ye)return function(){};te!==void 0&&E.mousemove===void 0&&(E.mousemove=te),Wj.reset();var be=v===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:y===void 0?{password:!0}:y,xe=b===!0||b===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b===`all`,headMetaDescKeywords:b===`all`,headTitleMutations:b===`all`}:b||{};pA();var Se,Ce=0,we=function(e){for(var t=K(pe||[]),n;!(n=t()).done;){var r=n.value;r.eventProcessor&&(e=r.eventProcessor(e))}return w&&!ye&&(e=w(e)),e};zj=function(e,i){var a=e;if(a.timestamp=rA(),UA[0]?.isFrozen()&&a.type!==SA.FullSnapshot&&(a.type!==SA.IncrementalSnapshot||a.data.source!==CA.Mutation)&&UA.forEach(function(e){return e.unfreeze()}),N)t?.(we(a),i);else if(ye){var o={type:`rrweb`,event:we(a),origin:window.location.origin,isCheckout:i};if(ve)for(var s=K(ve),c;!(c=s()).done;){var l=c.value;window.parent.postMessage(o,l)}else window.parent.postMessage(o,`*`)}if(a.type===SA.FullSnapshot)Se=a,Ce=0;else if(a.type===SA.IncrementalSnapshot){if(a.data.source===CA.Mutation&&a.data.isAttachIframe)return;Ce++;var u=r&&Ce>=r,d=n&&a.timestamp-Se.timestamp>n;(u||d)&&Bj(!0)}};for(var Te=function(e){zj({type:SA.IncrementalSnapshot,data:rb({source:CA.Mutation},e)})},Ee=function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.Scroll},e)})},De=function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.CanvasMutation},e)})},Oe=new Fj({mutationCb:Te,adoptedStyleSheetCb:function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.AdoptedStyleSheet},e)})}}),ke=new mj({mirror:Wj,mutationCb:Te,stylesheetManager:Oe,recordCrossOriginIframes:A,wrappedEmit:zj}),Ae=K(pe||[]),je;!(je=Ae()).done;){var Me=je.value;Me.getMirror&&Me.getMirror({nodeMirror:Wj,crossOriginIframeMirror:ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:ke.crossOriginIframeStyleMirror})}var Ne=new Ij;Vj=new Pj({recordCanvas:k,mutationCb:De,win:window,blockClass:a,blockSelector:s,mirror:Wj,sampling:E.canvas,dataURLOptions:D});var Pe=new hj({mutationCb:Te,scrollCb:Ee,bypassOptions:{blockClass:a,blockSelector:s,maskTextClass:p,maskTextSelector:h,inlineStylesheet:_,maskInputOptions:be,dataURLOptions:D,maskTextFn:S,maskInputFn:x,recordCanvas:k,inlineImages:fe,sampling:E,slimDOMOptions:xe,iframeManager:ke,stylesheetManager:Oe,canvasManager:Vj,keepIframeSrcFn:he,processedNodeManager:Ne},mirror:Wj});Bj=function(e){if(e===void 0&&(e=!1),O){zj({type:SA.Meta,data:{href:window.location.href,width:oA(),height:aA()}},e),Oe.reset(),Pe.init(),UA.forEach(function(e){return e.lock()});var t=Kx(document,{mirror:Wj,blockClass:a,blockSelector:s,maskTextClass:p,maskTextSelector:h,inlineStylesheet:_,maskAllInputs:be,maskTextFn:S,maskInputFn:x,slimDOM:xe,dataURLOptions:D,recordCanvas:k,inlineImages:fe,onSerialize:function(e){mA(e,Wj)&&ke.addIframe(e),hA(e,Wj)&&Oe.trackLinkElement(e),gA(e)&&Pe.addShadowRoot(Zk.shadowRoot(e),document)},onIframeLoad:function(e,t){ke.attachIframe(e,t),Pe.observeAttachShadow(e)},onStylesheetLoad:function(e,t){Oe.attachLinkElement(e,t)},keepIframeSrcFn:he});if(!t)return console.warn(`Failed to snapshot the document`);zj({type:SA.FullSnapshot,data:{node:t,initialOffset:iA(window)}},e),UA.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Oe.adoptStyleSheets(document.adoptedStyleSheets,Wj.getId(document))}};try{var Fe=[],Ie=function(e){return HA(uj)({mutationCb:Te,mousemoveCb:function(e,t){return zj({type:SA.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.MouseInteraction},e)})},scrollCb:Ee,viewportResizeCb:function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.ViewportResize},e)})},inputCb:function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.In
74put},e)})},mediaInteractionCb:function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.MediaInteraction},e)})},styleSheetRuleCb:function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.StyleSheetRule},e)})},styleDeclarationCb:function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.StyleDeclaration},e)})},canvasMutationCb:De,fontCb:function(e){return zj({type:SA.IncrementalSnapshot,data:rb({source:CA.Font},e)})},selectionCb:function(e){zj({type:SA.IncrementalSnapshot,data:rb({source:CA.Selection},e)})},customElementCb:function(e){zj({type:SA.IncrementalSnapshot,data:rb({source:CA.CustomElement},e)})},blockClass:a,ignoreClass:l,ignoreSelector:d,maskTextClass:p,maskTextSelector:h,maskInputOptions:be,inlineStylesheet:_,sampling:E,recordDOM:O,recordCanvas:k,inlineImages:fe,userTriggeredOnInput:le,collectFonts:ue,doc:e,maskInputFn:x,maskTextFn:S,keepIframeSrcFn:he,blockSelector:s,slimDOMOptions:xe,dataURLOptions:D,mirror:Wj,iframeManager:ke,stylesheetManager:Oe,shadowDomManager:Pe,processedNodeManager:Ne,canvasManager:Vj,ignoreCSSAttributes:_e,plugins:(pe?.filter(function(e){return e.observer}))?.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return zj({type:SA.Plugin,data:{plugin:e.name,payload:t}})}}})||[]},C)};ke.addLoadListener(function(e){try{var t=e.contentDocument,n=Ie(t);Fe.push(n);var r=ke.getObserverCleanup(e);ke.setObserverCleanup(e,function(){if(r)try{r()}catch{}try{n();var e=Fe.indexOf(n);e!==-1&&Fe.splice(e,1),KA(t)}catch{}})}catch(e){console.warn(e)}});var Le=function(){Bj(),Fe.push(Ie(document)),Hj=!0};return document.readyState===`interactive`||document.readyState===`complete`?Le():(Fe.push(Qk(`DOMContentLoaded`,function(){zj({type:SA.DomContentLoaded,data:{}}),se===`DOMContentLoaded`&&Le()})),Fe.push(Qk(`load`,function(){zj({type:SA.Load,data:{}}),se===`load`&&Le()},window))),function(){Fe.forEach(function(e){try{e()}catch(e){String(e).toLowerCase().includes(`cross-origin`)||console.warn(e)}}),Ne.destroy(),Hj=!1,VA()}}catch(e){console.warn(e)}}Gj.addCustomEvent=function(e,t){if(!Hj)throw Error(`please add custom event after start recording`);zj({type:SA.Custom,data:{tag:e,payload:t}})},Gj.freezePage=function(){UA.forEach(function(e){return e.freeze()})},Gj.takeFullSnapshot=function(e){if(!Hj)throw Error(`please take full snapshot after start recording`);Bj(e)},Gj.mirror=Wj;var Kj;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(Kj||={}),Gj.addCustomEvent,Gj.freezePage,Gj.takeFullSnapshot;var qj={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},Jj={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},Yj={},Xj=function(){return!!globalThis.Zone};function Zj(e){if(Yj[e])return Yj[e];var t=globalThis[e],n=t.prototype,r=e in qj?qj[e]:void 0,i=!!(r&&r.every(function(e){return!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`)})),a=e in Jj?Jj[e]:void 0,o=!!(a&&a.every(function(e){return typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)}));if(i&&o&&!Xj())return Yj[e]=t.prototype,t.prototype;try{var s=document.createElement(`iframe`);document.body.appendChild(s);var c=s.contentWindow;if(!c)return t.prototype;var l=c[e].prototype;return document.body.removeChild(s),l?Yj[e]=l:n}catch{return n}}var Qj={};function $j(e,t,n){var r=e+`.`+String(n);if(Qj[r])return Qj[r].call(t);var i=Zj(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?(Qj[r]=a,a.call(t)):t[n]}var eM={};function tM(e,t,n){var r=e+`.`+String(n);if(eM[r])return eM[r].bind(t);var i=Zj(e)[n];return typeof i==`function`?(eM[r]=i,i.bind(t)):t[n]}function nM(e){return $j(`Node`,e,`childNodes`)}function rM(e){return $j(`Node`,e,`parentNode`)}function iM(e){return $j(`Node`,e,`parentElement`)}function aM(e){return $j(`Node`,e,`textContent`)}function oM(e,t){return tM(`Node`,e,`contains`)(t)}function sM(e){return tM(`Node`,e,`getRootNode`)()}function cM(e){return!e||!(`host`in e)?null:$j(`ShadowRoot`,e,`host`)}function lM(e){return e.styleSheets}function uM(e){return!e||!(`shadowRoot`in e)?null:$j(`Element`,e,`shadowRoot`)}function dM(e,t){return $j(`Element`,e,`querySelector`)(t)}function fM(e,t){return $j(`Element`,e,`querySelectorAll`)(t)}function pM(){return Zj(`MutationObserver`).constructor}function mM(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch{return function(){}}}var hM={childNodes:nM,parentNode:rM,parentElement:iM,textContent:aM,contains:oM,getRootNode:sM,host:cM,styleSheets:lM,shadowRoot:uM,querySelector:dM,querySelectorAll:fM,mutationObserver:pM,patch:mM};function gM(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return gM(hM.parentNode(e),t);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return gM(hM.parentNode(e),t)}
74function _M(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function vM(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return ob(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var yM={exports:{}},bM=String,xM=function(){return{isColorSupported:!1,reset:bM,bold:bM,dim:bM,italic:bM,underline:bM,inverse:bM,hidden:bM,strikethrough:bM,black:bM,red:bM,green:bM,yellow:bM,blue:bM,magenta:bM,cyan:bM,white:bM,gray:bM,bgBlack:bM,bgRed:bM,bgGreen:bM,bgYellow:bM,bgBlue:bM,bgMagenta:bM,bgCyan:bM,bgWhite:bM}};yM.exports=xM(),yM.exports.createColors=xM;var SM=yM.exports,CM=vM(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),wM=SM,TM=CM,EM=function(e){ab(t,e);function t(n,r,i,a,o,s){var c=e.call(this,n)||this;return c.name=`CssSyntaxError`,c.reason=n,o&&(c.file=o),a&&(c.source=a),s&&(c.plugin=s),r!==void 0&&i!==void 0&&(typeof r==`number`?(c.line=r,c.column=i):(c.line=r.line,c.column=r.column,c.endLine=i.line,c.endColumn=i.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,t),c}var n=t.prototype;return n.setMessage=function(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return``;var n=this.source;e??=wM.isColorSupported,TM&&e&&(n=TM(n));var r=n.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,r.length),o=String(a).length,s,c;if(e){var l=wM.createColors(!0),u=l.bold,d=l.gray,f=l.red;s=function(e){return u(f(e))},c=function(e){return d(e)}}else s=c=function(e){return e};return r.slice(i,a).map(function(e,n){var r=i+1+n,a=` `+(` `+r).slice(-o)+` | `;if(r===t.line){var l=c(a.replace(/\d/g,` `))+e.slice(0,t.column-1).replace(/[^\t]/g,` `);return s(`>`)+c(a)+e+`
75 `+l+s(`^`)}return` `+c(a)+e}).join(`
76`)},n.toString=function(){var e=this.showSourceCode();return e&&=`
77
78`+e+`
79`,this.name+`: `+this.message+e},t}(fb(Error)),DM=EM;EM.default=EM;var OM={};OM.isClean=Symbol(`isClean`),OM.my=Symbol(`my`);var kM={after:`
80`,beforeClose:`
81`,beforeComment:`
82`,beforeDecl:`
83`,beforeOpen:` `,beforeRule:`
84`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:`    `,semicolon:!1};function AM(e){return e[0].toUpperCase()+e.slice(1)}var jM=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{var i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){for(var n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`),r=e.parent,i=0;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(`
85`)){var a=this.raw(e,null,`indent`);if(a.length)for(var o=0;o<i;o++)n+=a}return n},t.block=function(e,t){var n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);var r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)},t.body=function(e){for(var t=e.nodes.length-1;t>0&&e.nodes[t].type===`comment`;)--t;for(var n=this.raw(e,`semicolon`),r=0;r<e.nodes.length;r++){var i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}},t.comment=function(e){var t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)},t.decl=function(e,t){var n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,n){var r;if(n||=t,t&&(r=e.raws[t],r!==void 0))return r;var i=e.parent;if(n===`before`&&(!i||i.type===`root`&&i.first===e||i&&i.type===`document`))return``;if(!i)return kM[n];var a=e.root();if(a.rawCache||={},a.rawCache[n]!==void 0)return a.rawCache[n];if(n===`before`||n===`after`)return this.beforeAfter(e,n);var o=`raw`+AM(n);return this[o]?r=this[o](a,e):a.walk(function(e){if(r=e.raws[t],r!==void 0)return!1}),r===void 0&&(r=kM[n]),a.rawCache[n]=r,r},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(`
86`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
87`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
88`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
89`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t},t.rawIndent=function(e){if(e.raws.indent)return e.raws.indent;var t;return e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){var i=n.raws.before.split(`
90`);return t=i[i.length-1],t=t.replace(/\S/g,``),!1}}),t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)},t.stringify=function(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)},e}(),MM=jM;jM.default=jM;var NM=MM;
90function PM(e,t){new NM(t).stringify(e)}var FM=PM;PM.default=PM;var IM=OM.isClean,LM=OM.my,RM=DM,zM=MM,BM=FM;function VM(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r!==`proxyCache`){var i=e[r],a=i===void 0?`undefined`:ub(i);r===`parent`&&a===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return VM(e,n)}):(a===`object`&&i!==null&&(i=VM(i)),n[r]=i)}return n}var HM=function(){function e(e){for(var t in e===void 0&&(e={}),this.raws={},this[IM]=!1,this[LM]=!0,e)if(t===`nodes`){this.nodes=[];for(var n=K(e[t]),r;!(r=n()).done;){var i=r.value;typeof i.clone==`function`?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&`+t.input.from+`:`+t.start.line+`:`+t.start.column+`$&`)}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in e===void 0&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){e===void 0&&(e={});var t=VM(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){e===void 0&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){e===void 0&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(t===void 0&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new RM(e)},t.getProxyProcessor=function(){return{get:function(e,t){return t===`proxyOf`?e:t===`root`?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}},t.markDirty=function(){if(this[IM]){this[IM]=!1;for(var e=this;e=e.parent;)e[IM]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();var r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n},t.positionInside=function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,a=0;a<e;a++)n[a]===`
91`?(r=1,i+=1):r+=1;return{column:r,line:i}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}},t.raw=function(e,t){return new zM().raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){var e=[...arguments];if(this.parent){for(var t=this,n=!1,r=K(e),i;!(i=r()).done;){var a=i.value;a===this?n=!0:n?(this.parent.insertAfter(t,a),t=a):this.parent.insertBefore(t,a)}n||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&e.parent.type!==`document`;)e=e.parent;return e},t.toJSON=function(e,t){var n={},r=t==null;t||=new Map;var i=0;for(var a in this)if(Object.prototype.hasOwnProperty.call(this,a)&&a!==`parent`&&a!==`proxyCache`){var o=this[a];if(Array.isArray(o))n[a]=o.map(function(e){return(e===void 0?`undefined`:ub(e))===`object`&&e.toJSON?e.toJSON(null,t):e});else if((o===void 0?`undefined`:ub(o))===`object`&&o.toJSON)n[a]=o.toJSON(null,t);else if(a===`source`){var s=t.get(o.input);s??(s=i,t.set(o.input,i),i++),n[a]={end:o.end,inputId:s,start:o.start}}else n[a]=o}return r&&(n.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),n},t.toProxy=function(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache},t.toString=function(e){e===void 0&&(e=BM),e.stringify&&(e=e.stringify);var t=``;return e(this,function(e){t+=e}),t}
91,t.warn=function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)},nb(e,[{key:`proxyOf`,get:function(){return this}}]),e}(),UM=HM;HM.default=HM;var WM=function(e){ab(t,e);function t(t){var n;return t&&t.value!==void 0&&typeof t.value!=`string`&&(t=rb({},t,{value:String(t.value)})),n=e.call(this,t)||this,n.type=`decl`,n}return nb(t,[{key:`variable`,get:function(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}]),t}(UM),GM=WM;WM.default=WM;var KM=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,qM={nanoid:function(e){e===void 0&&(e=21);for(var t=``,n=e;n--;)t+=KM[Math.random()*64|0];return t}},JM=CM.SourceMapConsumer,YM=CM.SourceMapGenerator,XM=CM.existsSync,ZM=CM.readFileSync,QM=CM.dirname,$M=CM.join;function eN(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}var tN=function(){function e(e,t){if(t.map!==!1){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=QM(this.mapFile)),r&&(this.text=r)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||=new JM(this.text),this.consumerCache},t.decodeInline=function(e){var t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return eN(e.substr(RegExp.lastMatch.length));var r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()},t.isMap=function(e){return(e===void 0?`undefined`:ub(e))===`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=QM(e),XM(e))return this.mapFile=e,ZM(e,`utf-8`).toString().trim()},t.loadMap=function(e,t){if(t===!1)return!1;if(t){if(typeof t==`string`)return t;if(typeof t==`function`){var n=t(e);if(n){var r=this.loadFile(n);if(!r)throw Error(`Unable to load previous source map: `+n.toString());return r}}else if(ob(t,JM))return YM.fromSourceMap(t).toString();else if(ob(t,YM))return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error(`Unsupported previous source map format: `+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){var i=this.annotation;return e&&(i=$M(QM(e),i)),this.loadFile(i)}},t.startWith=function(e,t){return e?e.substr(0,t.length)===t:!1},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),nN=tN;tN.default=tN;var rN=CM.SourceMapConsumer,iN=CM.SourceMapGenerator,aN=CM.fileURLToPath,oN=CM.pathToFileURL,sN=CM.isAbsolute,cN=CM.resolve,lN=qM.nanoid,uN=CM,dN=DM,fN=nN,pN=Symbol(`fromOffsetCac
91he`),mN=!!(rN&&iN),hN=!!(cN&&sN),gN=function(){function e(e,t){if(t===void 0&&(t={}),e==null||(e===void 0?`undefined`:ub(e))===`object`&&!e.toString)throw Error(`PostCSS received `+e+` instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===`￾`?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!hN||/^\w+:\/\//.test(t.from)||sN(t.from)?t.from:cN(t.from)),hN&&mN){var n=new fN(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=`<input css `+lN(6)+`>`),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){r===void 0&&(r={});var i,a,o;if(t&&(t===void 0?`undefined`:ub(t))===`object`){var s=t,c=n;if(typeof s.offset==`number`){var l=this.fromOffset(s.offset);t=l.line,n=l.col}else t=s.line,n=s.column;if(typeof c.offset==`number`){var u=this.fromOffset(c.offset);a=u.line,o=u.col}else a=c.line,o=c.column}else if(!n){var d=this.fromOffset(t);t=d.line,n=d.col}var f=this.origin(t,n,a,o);return i=f?new dN(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,r.plugin):new dN(e,a===void 0?t:{column:n,line:t},a===void 0?n:{column:o,line:a},this.css,this.file,r.plugin),i.input={column:n,endColumn:o,endLine:a,line:t,source:this.css},this.file&&(oN&&(i.input.url=oN(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t,n;if(this[pN])n=this[pN];else{var r=this.css.split(`
92`);n=Array(r.length);for(var i=0,a=0,o=r.length;a<o;a++)n[a]=i,i+=r[a].length+1;this[pN]=n}t=n[n.length-1];var s=0;if(e>=t)s=n.length-1;else for(var c=n.length-2,l;s<c;)if(l=s+(c-s>>1),e<n[l])c=l-1;else if(e>=n[l+1])s=l+1;else{s=l;break}return{col:e-n[s]+1,line:s+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:cN(this.map.consumer().sourceRoot||this.map.root||`.`,e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;var o;
92typeof n==`number`&&(o=i.originalPositionFor({column:r,line:n}));var s=sN(a.source)?oN(a.source):new URL(a.source,this.map.consumer().sourceRoot||oN(this.map.mapFile)),c={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:s.toString()};if(s.protocol===`file:`){if(aN)c.file=aN(s);else throw Error(`file: protocol is not available in this PostCSS build`)}var l=i.sourceContentFor(a.source);return l&&(c.source=l),c},t.toJSON=function(){for(var e={},t=0,n=[`hasBOM`,`css`,`file`,`id`];t<n.length;t++){var r=n[t];this[r]!=null&&(e[r]=this[r])}return this.map&&(e.map=rb({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},nb(e,[{key:`from`,get:function(){return this.file||this.id}}]),e}(),_N=gN;gN.default=gN,uN&&uN.registerInput&&uN.registerInput(gN);var vN=CM.SourceMapConsumer,yN=CM.SourceMapGenerator,bN=CM.dirname,xN=CM.relative,SN=CM.resolve,CN=CM.sep,wN=CM.pathToFileURL,TN=_N,EN=!!(vN&&yN),DN=!!(bN&&SN&&xN&&CN),ON=function(){function e(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`,t=`
93`;this.css.includes(`\r
94`)&&(t=`\r
95`),this.css+=t+`/*# sourceMappingURL=`+e+` */`},t.applyPrevMaps=function(){for(var e=K(this.previous()),t;!(t=e()).done;){var n=t.value,r=this.toUrl(this.path(n.file)),i=n.root||bN(n.file),a=void 0;this.mapOpts.sourcesContent===!1?(a=new vN(n.text),a.sourcesContent&&(a.sourcesContent=null)):a=n.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}},t.clearAnnotation=function(){if(this.mapOpts.annotation!==!1){if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t);else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}},t.generate=function(){if(this.clearAnnotation(),DN&&EN&&this.isMap())return this.generateMap();var e=``;return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(this.previous().length===1){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=yN.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new yN({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css=``,this.map=new yN({file:this.outputFile(),ignoreInvalidMapping:!0});var t=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,function(s,c,l){if(e.css+=s,c&&l!==`end`&&(i.generated.line=t,i.generated.column=n-1,c.source&&c.source.start?(i.source=e.sourcePath(c),i.original.line=c.source.start.line,i.original.column=c.source.start.column-1,e.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,e.map.addMapping(i))),a=s.match(/\n/g),a?(t+=a.length,o=s.lastIndexOf(`
96`),n=s.length-o):n+=s.length,c&&l!==`start`){var u=c.parent||{raws:{}};(!(c.type===`decl`||c.type===`atrule`&&!c.nodes)||c!==u.last||u.raws.semicolon)&&(c.source&&c.source.end?(i.source=e.sourcePath(c),i.original.line=c.source.end.line,i.original.column=c.source.end.column-1,i.generated.line=t,i.generated.column=n-2,e.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=n-1,e.map.addMapping(i)))}})},t.isAnnotation=function(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(function(e){return e.annotation}):this.mapOpts.annotation},t.isInline=function(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;var e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(function(e){return e.inline})},t.isMap=function(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map},t.isSourcesContent=function(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(function(e){return e.withContent()}):this.mapOpts.sourcesContent},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`},t.path=function(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?bN(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(n=bN(SN(n,this.mapOpts.annotation)));var r=xN(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new TN(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(n,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(wN){var n=wN(e).toString();return this.memoizedFileURLs.set(e,n),n}throw Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;CN===`\\`&&(e=e.replace(/\\/g,`/`));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),kN=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`comment`,n}return t}(UM),AN=kN;kN.default=kN;var jN=OM.isClean,MN=OM.my,NN=GM,PN=AN,FN=UM,IN,LN,RN,zN;
96function BN(e){return e.map(function(e){return e.nodes&&=BN(e.nodes),delete e.source,e})}function VN(e){if(e[jN]=!1,e.proxyOf.nodes)for(var t=K(e.proxyOf.nodes),n;!(n=t()).done;){var r=n.value;VN(r)}}var HN=function(e){ab(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.append=function(){for(var e=K([...arguments]),t;!(t=e()).done;)for(var n=t.value,r=K(this.normalize(n,this.last)),i;!(i=r()).done;){var a=i.value;this.proxyOf.nodes.push(a)}return this.markDirty(),this},n.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var n=K(this.nodes),r;!(r=n()).done;)r.value.cleanRaws(t)},n.each=function(e){if(this.proxyOf.nodes){for(var t=this.getIterator(),n,r;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}},n.every=function(e){return this.nodes.every(e)},n.getIterator=function(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},n.getProxyProcessor=function(){return{get:function(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?function(){var n=[...arguments],r;return(r=e)[t].apply(r,[].concat(n.map(function(e){return typeof e==`function`?function(t,n){return e(t.toProxy(),n)}:e})))}:t===`every`||t===`some`?function(n){return e[t](function(e){var t=[...arguments].slice(1);return n.apply(void 0,[e.toProxy()].concat(t))})}:t===`root`?function(){return e.root().toProxy()}:t===`nodes`?e.nodes.map(function(e){return e.toProxy()}):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}},n.index=function(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},n.insertAfter=function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(var i=K(r),a;!(a=i()).done;){var o=a.value;this.proxyOf.nodes.splice(n+1,0,o)}var s;for(var c in this.indexes)s=this.indexes[c],n<s&&(this.indexes[c]=s+r.length);return this.markDirty(),this},n.insertBefore=function(e,t){var n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(var a=K(i),o;!(o=a()).done;){var s=o.value;this.proxyOf.nodes.splice(n,0,s)}var c;for(var l in this.indexes)c=this.indexes[l],n<=c&&(this.indexes[l]=c+i.length);return this.markDirty(),this},n.normalize=function(e,n){var r=this;if(typeof e==`string`)e=BN(IN(e).nodes);else if(e===void 0)e=[];else if(Array.isArray(e)){e=e.slice(0);for(var i=K(e),a;!(a=i()).done;){var o=a.value;o.parent&&o.parent.removeChild(o,`ignore`)}}else if(e.type===`root`&&this.type!==`document`){e=e.nodes.slice(0);for(var s=K(e),c;!(c=s()).done;){var l=c.value;l.parent&&l.parent.removeChild(l,`ignore`)}}else if(e.type)e=[e];else if(e.prop){if(e.value===void 0)throw Error(`Value field is missed in node creation`);typeof e.value!=`string`&&(e.value=String(e.value)),e=[new NN(e)]}else if(e.selector)e=[new LN(e)];else if(e.name)e=[new RN(e)];else if(e.text)e=[new PN(e)];else throw Error(`Unknown node type in node creation`);return e.map(function(e){return e[MN]||t.rebuild(e),e=e.proxyOf,e.parent&&e.parent.removeChild(e),e[jN]&&VN(e),e.raws.before===void 0&&n&&n.raws.before!==void 0&&(e.raws.before=n.raws.before.replace(/\S/g,``)),e.parent=r.proxyOf,e})},n.prepend=function(){var e=[...arguments];e=e.reverse();for(var t=K(e),n;!(n=t()).done;){for(var r=n.value,i=this.normalize(r,this.first,`prepend`).reverse(),a=K(i),o;!(o=a()).done;){var s=o.value;this.proxyOf.nodes.unshift(s)}for(var c in this.indexes)this.indexes[c]=this.indexes[c]+i.length}return this.markDirty(),this},n.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},n.removeAll=function(){for(var e=K(this.proxyOf.nodes),t;!(t=e()).done;){var n=t.value;n.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},n.removeChild=function(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);var t;for(var n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?ob(e,RegExp)?this.walk(function(n,r){if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if(e.type===`atrule`)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if(t.type===`comment`)return e(t,n)})},n.walkDecls=function(e,t){return t?ob(e,RegExp)?this.walk(function(n,r){if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if(e.type===`decl`)return t(e,n)}))},n.walkRules=function(e,t){return t?ob(e,RegExp)?this.walk(function(n,r){if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if(e.type===`rule`)return t(e,n)}))},nb(t,[{key:`first`,get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:`last`,get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(FN);HN.registerParse=function(e){IN=e},HN.registerRule=function(e){LN=e},HN.registerAtRule=function(e){RN=e},HN.registerRoot=function(e){zN=e};var UN=HN;HN.default=HN,HN.rebuild=function(e){e.type===`atrule`?Object.setPrototypeOf(e,RN.prototype):e.type===`rule`?Object.setPrototypeOf(e,LN.prototype):e.type===`decl`?Object.setPrototypeOf(e,NN.prototype):e.type===`comment`?Object.setPrototypeOf(e,PN.prototype):e.type===`root`&&Object.setPrototypeOf(e,zN.prototype),e[MN
96]=!0,e.nodes&&e.nodes.forEach(function(e){HN.rebuild(e)})};var WN=UN,GN,KN,qN=function(e){ab(t,e);function t(t){var n=e.call(this,rb({type:`document`},t))||this;return n.nodes||=[],n}var n=t.prototype;return n.toResult=function(e){return e===void 0&&(e={}),new GN(new KN,this,e).stringify()},t}(WN);qN.registerLazyResult=function(e){GN=e},qN.registerProcessor=function(e){KN=e};var JN=qN;qN.default=qN;var YN=function(){function e(e,t){if(t===void 0&&(t={}),this.type=`warning`,this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}var t=e.prototype;return t.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text},e}(),XN=YN;YN.default=YN;var ZN=XN,QN=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){t===void 0&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new ZN(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return e.type===`warning`})},nb(e,[{key:`content`,get:function(){return this.css}}]),e}(),$N=QN;QN.default=QN;var eP=39,tP=34,nP=92,rP=47,iP=10,aP=32,oP=12,sP=9,cP=13,lP=91,uP=93,dP=40,fP=41,pP=123,mP=125,hP=59,gP=42,_P=58,vP=64,yP=/[\t\n\f\r "#'()/;[\\\]{}]/g,bP=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,xP=/.[\r\n"'(/\\]/,SP=/[\da-f]/i,CP=function(e,t){t===void 0&&(t={});var n=e.css.valueOf(),r=t.ignoreErrors,i,a,o,s,c,l,u,d,f,p,m=n.length,h=0,g=[],_=[];function v(){return h}function y(t){throw e.error(`Unclosed `+t,h)}function b(){return _.length===0&&h>=m}function x(e){if(_.length)return _.pop();if(!(h>=m)){var t=e?e.ignoreUnclosed:!1;switch(i=n.charCodeAt(h),i){case iP:case aP:case sP:case cP:case oP:a=h;do a+=1,i=n.charCodeAt(a);while(i===aP||i===iP||i===sP||i===cP||i===oP);p=[`space`,n.slice(h,a)],h=a-1;break;case lP:case uP:case pP:case mP:case _P:case hP:case fP:var v=String.fromCharCode(i);p=[v,v,h];break;case dP:if(d=g.length?g.pop()[1]:``,f=n.charCodeAt(h+1),d===`url`&&f!==eP&&f!==tP&&f!==aP&&f!==iP&&f!==sP&&f!==oP&&f!==cP){a=h;do{if(l=!1,a=n.indexOf(`)`,a+1),a===-1){if(r||t){a=h;break}y(`bracket`)}for(u=a;n.charCodeAt(u-1)===nP;)--u,l=!l}while(l);p=[`brackets`,n.slice(h,a+1),h,a],h=a}else a=n.indexOf(`)`,h+1),s=n.slice(h,a+1),a===-1||xP.test(s)?p=[`(`,`(`,h]:(p=[`brackets`,s,h,a],h=a);break;case eP:case tP:o=i===eP?`'`:`"`,a=h;do{if(l=!1,a=n.indexOf(o,a+1),a===-1){if(r||t){a=h+1;break}y(`string`)}for(u=a;n.charCodeAt(u-1)===nP;)--u,l=!l}while(l);p=[`string`,n.slice(h,a+1),h,a],h=a;break;case vP:yP.lastIndex=h+1,yP.test(n),a=yP.lastIndex===0?n.length-1:yP.lastIndex-2,p=[`at-word`,n.slice(h,a+1),h,a],h=a;break;case nP:for(a=h,c=!0;
96n.charCodeAt(a+1)===nP;)a+=1,c=!c;if(i=n.charCodeAt(a+1),c&&i!==rP&&i!==aP&&i!==iP&&i!==sP&&i!==cP&&i!==oP&&(a+=1,SP.test(n.charAt(a)))){for(;SP.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===aP&&(a+=1)}p=[`word`,n.slice(h,a+1),h,a],h=a;break;default:i===rP&&n.charCodeAt(h+1)===gP?(a=n.indexOf(`*/`,h+2)+1,a===0&&(r||t?a=n.length:y(`comment`)),p=[`comment`,n.slice(h,a+1),h,a],h=a):(bP.lastIndex=h+1,bP.test(n),a=bP.lastIndex===0?n.length-1:bP.lastIndex-2,p=[`word`,n.slice(h,a+1),h,a],g.push(p),h=a)}return h++,p}}function S(e){_.push(e)}return{back:S,endOfFile:b,nextToken:x,position:v}},wP=UN,TP=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`atrule`,n}var n=t.prototype;return n.append=function(){var t=[...arguments],n;return this.proxyOf.nodes||(this.nodes=[]),(n=e.prototype.append).call.apply(n,[this].concat(t))},n.prepend=function(){var t=[...arguments],n;return this.proxyOf.nodes||(this.nodes=[]),(n=e.prototype.prepend).call.apply(n,[this].concat(t))},t}(wP),EP=TP;TP.default=TP,wP.registerAtRule(TP);var DP=UN,OP,kP,AP=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`root`,n.nodes||=[],n}var n=t.prototype;return n.normalize=function(t,n,r){var i=e.prototype.normalize.call(this,t);if(n){if(r===`prepend`)this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var a=K(i),o;!(o=a()).done;){var s=o.value;s.raws.before=n.raws.before}}return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return e===void 0&&(e={}),new OP(new kP,this,e).stringify()},t}(DP);AP.registerLazyResult=function(e){OP=e},AP.registerProcessor=function(e){kP=e};var jP=AP;AP.default=AP,DP.registerRoot(AP);var MP={comma:function(e){return MP.split(e,[`,`],!0)},space:function(e){return MP.split(e,[` `,`
97`,`	`])},split:function(e,t,n){for(var r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1,u=K(e),d;!(d=u()).done;){var f=d.value;l?l=!1:f===`\\`?l=!0:s?f===c&&(s=!1):f===`"`||f===`'`?(s=!0,c=f):f===`(`?o+=1:f===`)`?o>0&&--o:o===0&&t.includes(f)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=f}return(n||i!==``)&&r.push(i.trim()),r}},NP=MP;MP.default=MP;var PP=UN,FP=NP,IP=function(e){ab(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`rule`,n.nodes||=[],n}return nb(t,[{key:`selectors`,get:function(){return FP.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}]),t}(PP),LP=IP;IP.default=IP,PP.registerRule(IP);var RP=GM,zP=CP,BP=AN,VP=EP,HP=jP,UP=LP,WP={empty:!0,space:!0};function GP(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}var KP=function(){function e(e){this.input=e,this.root=new HP,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t=new VP;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);for(var n,r,i,a=!1,o=!1,s=[],c=[];!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?c.push(n===`(`?`)`:`]`):n===`{`&&c.length>0?c.push(`}`):n===c[c.length-1]&&c.pop(),c.length===0){if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if(n===`{`){o=!0;break}if(n===`}`){if(s.length>0){for(i=s.length-1,r=s[i];r&&r[0]===`space`;)r=s[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(t.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(t,`params`,s),a&&(e=s[s.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),o&&(t.nodes=[],this.current=t)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(t!==!1){for(var n=0,r,i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}},t.colon=function(e){for(var t=0,n,r,i,a=K(e.entries()),o;!(o=a()).done;){var s=o.value,c=s[0];if(n=s[1],r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`){if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return c}i=n}return!1},t.comment=function(e){var t=new BP;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);
97if(/^\s*$/.test(n))t.text=``,t.raws.left=n,t.raws.right=``;else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=zP(this.input)},t.decl=function(e,t){var n=new RP;this.init(n,e[0][2]);var r=e[e.length-1];for(r[0]===`;`&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||GP(e)),n.source.end.offset++;e[0][0]!==`word`;)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop=``;e.length;){var i=e[0][0];if(i===`:`||i===`space`||i===`comment`)break;n.prop+=e.shift()[1]}n.raws.between=``;for(var a;e.length;){if(a=e.shift(),a[0]===`:`){n.raws.between+=a[1];break}a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),n.raws.between+=a[1]}(n.prop[0]===`_`||n.prop[0]===`*`)&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var o=[],s;e.length&&(s=e[0][0],s===`space`||s===`comment`);)o.push(e.shift());this.precheckMissedSemicolon(e);for(var c=e.length-1;c>=0;c--){if(a=e[c],a[1].toLowerCase()===`!important`){n.important=!0;var l=this.stringFrom(e,c);l=this.spacesFromEnd(e)+l,l!==` !important`&&(n.raws.important=l);break}if(a[1].toLowerCase()===`important`){for(var u=e.slice(0),d=``,f=c;f>0;f--){var p=u[f][0];if(d.trim().indexOf(`!`)===0&&p!==`space`)break;d=u.pop()[1]+d}d.trim().indexOf(`!`)===0&&(n.important=!0,n.raws.important=d,e=u)}if(a[0]!==`space`&&a[0]!==`comment`)break}e.some(function(e){return e[0]!==`space`&&e[0]!==`comment`})&&(n.raws.between+=o.map(function(e){return e[1]}).join(``),o=[]),this.raw(n,`value`,o.concat(e),t),n.value.includes(`:`)&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new UP;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&t.type===`rule`&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces=``)}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0){if(n===`;`){if(r){this.decl(s,o);return}break}if(n===`{`){this.rule(s);return}if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}n===`:`&&(r=!0)}else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],c===`space`||c===`comment`);)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,a,o=n.length,s=``,c=!0,l,u,d=0;d<o;d+=1)i=n[d],a=i[0],a===`space`&&d===o-1&&!r?c=!1:a===`comment`?(u=n[d-1]?n[d-1][0]:`empty`,l=n[d+1]?n[d+1][0]:`empty`,!WP[u]&&!WP[l]?s.slice(-1)===`,`?c=!1:s+=i[1]:c=!1):s+=i[1];if(!c){var f=n.reduce(function(e,t){return e+t[1]},``);e.raws[t]={raw:f,value:s}}e[t]=s},t.rule=function(e){e.pop();var t=new UP;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,n=``;e.length&&(t=e[e.length-1][0],t===`space`||t===`comment`);)n=e.pop()[1]+n;return n},t.spacesAndCommentsFromStart=function(e){for(var t,n=``;e.length&&(t=e[0][0],t===`space`||t===`comment`);)n+=e.shift()[1];return n},t.spacesFromEnd=function(e){for(var t,n=``;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n},t.stringFrom=function(e,t){for(var n=``,r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})},e}(),qP=UN,JP=KP,YP=_N;function XP(e,t){var n=new JP(new YP(e,t));try{n.parse()}catch(e){throw e}return n.root}var ZP=XP;XP.default=XP,qP.registerParse(XP);var QP=OM.isClean,$P=OM.my,eF=ON,tF=FM,nF=UN,rF=JN,iF=$N,aF=ZP,oF=jP,sF={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},cF={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0}
97,lF={Once:!0,postcssPlugin:!0,prepare:!0},uF=0;function dF(e){return(e===void 0?`undefined`:ub(e))===`object`&&typeof e.then==`function`}function fF(e){var t=!1,n=sF[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,uF,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,uF,n+`Exit`]:[n,n+`Exit`]}function pF(e){return{eventIndex:0,events:e.type===`document`?[`Document`,uF,`DocumentExit`]:e.type===`root`?[`Root`,uF,`RootExit`]:fF(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function mF(e){return e[QP]=!1,e.nodes&&e.nodes.forEach(function(e){return mF(e)}),e}var hF={},gF=function(){function e(t,n,r){var i=this;this.stringified=!1,this.processed=!1;var a;if((n===void 0?`undefined`:ub(n))===`object`&&n!==null&&(n.type===`root`||n.type===`document`))a=mF(n);else if(ob(n,e)||ob(n,iF))a=mF(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var o=aF;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{a=o(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[$P]&&nF.rebuild(a)}this.result=new iF(t,a,r),this.helpers=rb({},hF,{postcss:hF,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return(e===void 0?`undefined`:ub(e))===`object`&&e.prepare?rb({},e,e.prepare(i.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw Error(`Use process(css).then(cb) to work with async plugins`)},t.handleError=function(e,t){var n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=K(this.plugins),r;!(r=n()).done;){var i=r.value;if((i===void 0?`undefined`:ub(i))===`object`)for(var a in i){if(!cF[a]&&/^[A-Z]/.test(a))throw Error(`Unknown event `+a+` in `+i.postcssPlugin+`. Try to update PostCSS (`+this.processor.version+` now).`);if(!lF[a]){if(ub(i[a])===`object`)for(var o in i[a])o===`*`?t(i,a,i[a][o]):t(i,a+`-`+o.toLowerCase(),i[a][o]);else typeof i[a]==`function`&&t(i,a,i[a])}}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return $y(function(){var t,n,r,i,a,o,s,c,l,u,d,f;return mb(this,function(p){switch(p.label){case 0:e.plugin=0,t=0,p.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(n=e.plugins[t],r=e.runOnRoot(n),!dF(r))return[3,5];p.label=2;case 2:return p.trys.push([2,4,,5]),[4,r];case 3:return p.sent(),[3,5];case 4:throw i=p.sent(),e.handleError(i);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];a=e.result.root,p.label=7;case 7:if(a[QP])return[3,14];a[QP]=!0,o=[pF(a)],p.label=8;case 8:if(!(o.length>0))return[3,13];if(s=e.visitTick(o),!dF(s))return[3,12];p.label=9;case 9:return p.trys.push([9,11,,12]),[4,s];case 10:return p.sent(),[3,12];case 11:throw c=p.sent(),l=o[o.length-1].node,e.handleError(c,l);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,o;return mb(this,function(s){switch(s.label){case 0:t=f.value,n=t[0],r=t[1],e.result.lastPlugin=n,s.label=1;case 1:return s.trys.push([1,6,,7]),a.type===`document`?(i=a.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]):[3,3];case 2:return s.sent(),[3,5];case 3:return[4,r(a,e.helpers)];case 4:s.sent(),s.label=5;case 5:return[3,7];case 6:throw o=s.sent(),e.handleError(o);case 7:return[2]}})},d=K(e.listeners.OnceExit),p.label=15;case 15:return(f=d()).done?[3,18]:[5,hb(u())];case 16:p.sent(),p.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;
vendor: 5,025 bytes, line 97
97try{if((e===void 0?`undefined`:ub(e))===`object`&&e.Once){if(this.result.root.type===`document`){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return dF(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=tF;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new eF(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e=K(this.plugins),t;!(t=e()).done;){var n=t.value;if(dF(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[QP];)r[QP]=!0,this.walkSync(r);if(this.listeners.OnceExit){if(r.type===`document`)for(var i=K(r.nodes),a;!(a=i()).done;){var o=a.value;this.visitSync(this.listeners.OnceExit,o)}else this.visitSync(this.listeners.OnceExit,r)}}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n=K(e),r;!(r=n()).done;){var i=r.value,a=i[0],o=i[1];this.result.lastPlugin=a;var s=void 0;try{s=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(dF(s))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if(n.type!==`root`&&n.type!==`document`&&!n.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){var i=r[t.visitorIndex],a=i[0],o=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return o(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(t.iterator!==0){for(var s=t.iterator,c;c=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!c[QP]){c[QP]=!0,e.push(pF(c));return}t.iterator=0,delete n.indexes[s]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,u===uF){n.nodes&&n.nodes.length&&(n[QP]=!0,t.iterator=n.getIterator());return}if(this.listeners[u]){t.visitors=this.listeners[u];return}}e.pop()},t.walkSync=function(e){var t=this;e[QP]=!0;for(var n=K(fF(e)),r;!(r=n()).done;){var i=r.value;if(i===uF)e.nodes&&e.each(function(e){e[QP]||t.walkSync(e)});else{var a=this.listeners[i];if(a&&this.visitSync(a,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},nb(e,[{key:`content`,get:function(){return this.stringify().content}},{key:`css`,get:function(){return this.stringify().css}},{key:`map`,get:function(){return this.stringify().map}},{key:`messages`,get:function(){return this.sync().messages}},{key:`opts`,get:function(){return this.result.opts}},{key:`processor`,get:function(){return this.result.processor}},{key:`root`,get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return`LazyResult`}}]),e}();gF.registerPostcss=function(e){hF=e};var _F=gF;gF.default=gF,oF.registerLazyResult(gF),rF.registerLazyResult(gF);var vF=ON,yF=FM,bF=ZP,xF=$N,SF=function(){function e(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var r,i=yF;this.result=new xF(this._processor,r,this._opts),this.result.css=t;var a=this;Object.defineProperty(this.result,"root",{get:function(){return a.root}});var o=new vF(i,r,this._opts,t);if(o.isMap()){var s=o.generate(),c=s[0],l=s[1];c&&(this.result.css=c),l&&(this.result.map=l)}else o.clearAnnotation(),this.result.css=o.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},nb(e,[{key:`content`,get:function(){return this.result.css}},{key:`css`,get:function(){return this.result.css}},{key:`map`,get:function(){return this.result.map}},{key:`messages`,get:function(){return[]}},{key:`opts`,get:function(){return this.result.opts}},{key:`processor`,get:function(){return this.result.processor}},{key:`root`,get:function(){if(this._root)return this._root;var e,t=bF;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return`NoWorkResult`}}]),e}(),CF=SF;SF.default=SF;var wF=CF,TF=_F,EF=JN,DF=jP,OF=function(){function e(e){e===void 0&&(e=[]),this.version=`8.4.38`,this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t=[],n=K(e),r;
97!(r=n()).done;){var i=r.value;if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),(i===void 0?`undefined`:ub(i))===`object`&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if((i===void 0?`undefined`:ub(i))===`object`&&i.postcssPlugin)t.push(i);else if(typeof i==`function`)t.push(i);else if(!((i===void 0?`undefined`:ub(i))===`object`&&(i.parse||i.stringify)))throw Error(i+` is not a PostCSS plugin`)}return t},t.process=function(e,t){return t===void 0&&(t={}),!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new wF(this,e,t):new TF(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}(),kF=OF;OF.default=OF,DF.registerProcessor(OF),EF.registerProcessor(OF);var AF=GM,jF=nN,MF=AN,NF=EP,PF=_N,FF=jP,IF=LP;function LF(e,t){if(Array.isArray(e))return e.map(function(e){return LF(e)});var n=e.inputs,r=cb(e,[`inputs`]);if(n){t=[];for(var i=K(n),a;!(a=i()).done;){var o=a.value,s=rb({},o,{__proto__:PF.prototype});s.map&&=rb({},s.map,{__proto__:jF.prototype}),t.push(s)}}if(r.nodes&&=e.nodes.map(function(e){return LF(e,t)}),r.source){var c=r.source,l=c.inputId;r.source=cb(c,[`inputId`]),l!=null&&(r.source.input=t[l])}if(r.type===`root`)return new FF(r);if(r.type===`decl`)return new AF(r);if(r.type===`rule`)return new IF(r);if(r.type===`comment`)return new MF(r);if(r.type===`atrule`)return new NF(r);throw Error(`Unknown node type: `+e.type)}var RF=LF;LF.default=LF;var zF=DM,BF=GM,VF=_F,HF=UN,UF=kF,WF=FM,GF=RF,KF=JN,qF=XN,JF=AN,YF=EP,XF=$N,ZF=_N,QF=ZP,$F=NP,eI=LP,tI=jP,nI=UM;function rI(){var e=[...arguments];return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new UF(e)}rI.plugin=function(e,t){var n=!1;function r(){var r=[...arguments];console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
98https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
99https://www.w3ctech.com/topic/2226`));var i=t.apply(void 0,[].concat(r));return i.postcssPlugin=e,i.postcssVersion=new UF().version,i}var i;return Object.defineProperty(r,"postcss",{get:function(){return i||=r(),i}}),r.process=function(e,t,n){return rI([r(n)]).process(e,t)},r},rI.stringify=WF,rI.parse=QF,rI.fromJSON=GF,rI.list=$F,rI.comment=function(e){return new JF(e)},rI.atRule=function(e){return new YF(e)},rI.decl=function(e){return new BF(e)},rI.rule=function(e){return new eI(e)},rI.root=function(e){return new tI(e)},rI.document=function(e){return new KF(e)},rI.CssSyntaxError=zF,rI.Declaration=BF,rI.Container=HF,rI.Processor=UF,rI.Document=KF,rI.Comment=JF,rI.Warning=qF,rI.AtRule=YF,rI.Result=XF,rI.Input=ZF,rI.Rule=eI,rI.Root=tI,rI.Node=nI,VF.registerPostcss(rI);var iI=rI;rI.default=rI;var aI=_M(iI);aI.stringify,aI.fromJSON,aI.plugin,aI.parse,aI.list,aI.document,aI.comment,aI.atRule,aI.rule,aI.decl,aI.root,aI.CssSyntaxError,aI.Declaration,aI.Container,aI.Processor,aI.Document,aI.Comment,aI.Warning,aI.AtRule,aI.Result,aI.Input,aI.Rule,aI.Root,aI.Node;var oI=Object.defineProperty,sI=function(e,t,n){return t in e?oI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},cI=function(e,t,n){return sI(e,(t===void 0?`undefined`:ub(t))===`symbol`?t:t+``,n)};function lI(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch{return function(){}}}var uI=function(){function e(e){cI(this,`fileName`),cI(this,`functionName`),cI(this,`lineNumber`),cI(this,`columnNumber`),this.fileName=e.fileName||``,this.functionName=e.functionName||``,this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}var t=e.prototype;return t.toString=function(){var e=this.lineNumber||``,t=this.columnNumber||``;return this.functionName?this.functionName+` (`+this.fileName+`:`+e+`:`+t+`)`:this.fileName+`:`+e+`:`+t},e}(),dI=/(^|@)\S+:\d+/,fI=/^\s*at .*(\S+:\d+|\(native\))/m,pI=/^(eval@)?(\[native code])?$/,mI={parse:function(e){return e?e.stacktrace!==void 0||e[`opera#sourceloc`]!==void 0?this.parseOpera(e):e.stack&&e.stack.match(fI)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn(`[console-record-plugin]: Failed to parse error object:`,e),[]):[]},extractLocation:function(e){if(e.indexOf(`:`)===-1)return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,``));if(!t)throw Error(`Cannot parse given url: `+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(`
100`).filter(function(e){return!!e.match(fI)},this).map(function(e){e.indexOf(`(eval `)>-1&&(e=e.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(\),.*$)/g,``));var t=e.replace(/^\s+/,``).replace(/\(eval code/g,`(`),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=n?t.replace(n[0],``):t;var r=t.split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop());return new uI({functionName:r.join(` `)||void 0,fileName:[`eval`,`<anonymous>`].indexOf(i[0])>-1?void 0:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseFFOrSafari:function(e){return e.stack.split(`
101`).filter(function(e){return!e.match(pI)},this).map(function(e){if(e.indexOf(` > eval`)>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),e.indexOf(`@`)===-1&&e.indexOf(`:`)===-1)return new uI({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,``));return new uI({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(`
102`)>-1&&e.message.split(`
103`).length>e.stacktrace.split(`
104`).length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split(`
105`),r=[],i=2,a=n.length;i<a;i+=2){var o=t.exec(n[i]);o&&r.push(new uI({fileName:o[2],lineNumber:parseFloat(o[1])}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split(`
106`),r=[],i=0,a=n.length;i<a;i+=2){var o=t.exec(n[i]);o&&r.push(new uI({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return r},parseOpera11:function(e){return e.stack.split(`
107`).filter(function(e){return!!e.match(dI)&&!e.match(/^Error created at/)},this).map(function(e){var t=e.split(`@`),n=this.extractLocation(t.pop());return new uI({functionName:(t.shift()||``).replace(/<anonymous function(: (\w+))?>/,`$2`).replace(/\([^)]*\)/g,``)||void 0,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)}};function hI(e){if(!e||!e.outerHTML)return``;for(var t=``;e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(var a=0;a<r.children.length;a++){var o=r.children[a];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===n&&i.push(o)}i.length>1&&(n+=`:eq(`+i.indexOf(e)+`)`),t=n+(t?`>`+t:``),e=r}return t}function gI(e){return Object.prototype.toString.call(e)===`[object Object]`}function _I(e,t){if(t===0)return!0;for(var n=K(Object.keys(e)),r;!(r=n()).done;){var i=r.value;if(gI(e[i])&&_I(e[i],t-1))return!0}return!1}function vI(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],i=[];return JSON.stringify(e,function(e,t){if(r.length>0){var n=r.indexOf(this);
107~n?r.splice(n+1):r.push(this),~n?i.splice(n,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?`[Circular ~]`:`[Circular ~.`+i.slice(0,r.indexOf(t)).join(`.`)+`]`)}else r.push(t);if(t===null)return t;if(t===void 0)return`undefined`;if(a(t))return o(t);if((t===void 0?`undefined`:ub(t))===`bigint`)return t.toString()+`n`;if(ob(t,Event)){var s={};for(var c in t){var l=t[c];s[c]=Array.isArray(l)?hI(l.length?l[0]:null):l}return s}return ob(t,Node)?ob(t,HTMLElement)?t?t.outerHTML:``:t.nodeName:ob(t,Error)?t.stack?t.stack+`
108End of stack for Error object`:t.name+`: `+t.message:t});function a(e){return!!(gI(e)&&Object.keys(e).length>n.numOfKeysLimit||typeof e==`function`||gI(e)&&_I(e,n.depthOfLimit))}function o(e){var t=e.toString();return n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=``+t.slice(0,n.stringLengthLimit)+`...`),t}}var yI={level:[`assert`,`clear`,`count`,`countReset`,`debug`,`dir`,`dirxml`,`error`,`group`,`groupCollapsed`,`groupEnd`,`info`,`log`,`table`,`time`,`timeEnd`,`timeLog`,`trace`,`warn`],lengthThreshold:1e3,logger:`console`};function bI(e,t,n){var r=n?Object.assign({},yI,n):yI,i=r.logger;if(!i)return function(){};var a=typeof i==`string`?t[i]:i,o=0,s=!1,c=[];if(r.level.includes(`error`)){var l=function(t){var n=t.message,i=t.error;e({level:`error`,trace:mI.parse(i).map(function(e){return e.toString()}),payload:[vI(n,r.stringifyOptions)]})};t.addEventListener(`error`,l),c.push(function(){t.removeEventListener(`error`,l)});var u=function(t){var n,i;ob(t.reason,Error)?(n=t.reason,i=[vI(`Uncaught (in promise) `+n.name+`: `+n.message,r.stringifyOptions)]):(n=Error(),i=[vI(`Uncaught (in promise)`,r.stringifyOptions),vI(t.reason,r.stringifyOptions)]),e({level:`error`,trace:mI.parse(n).map(function(e){return e.toString()}),payload:i})};t.addEventListener(`unhandledrejection`,u),c.push(function(){t.removeEventListener(`unhandledrejection`,u)})}for(var d=K(r.level),f;!(f=d()).done;){var p=f.value;c.push(m(a,p))}return function(){c.forEach(function(e){return e()})};function m(t,n){var i=this;return t[n]?lI(t,n,function(t){var a=i;return function(){var i=[...arguments];if(t.apply(a,i),!(n===`assert`&&i[0])&&!s){s=!0;try{var c=mI.parse(Error()).map(function(e){return e.toString()}).splice(1),l=(n===`assert`?i.slice(1):i).map(function(e){return vI(e,r.stringifyOptions)});o++,o<r.lengthThreshold?e({level:n,trace:c,payload:l}):o===r.lengthThreshold&&e({level:`warn`,trace:[],payload:[vI(`The number of log records reached the threshold.`)]})}catch(e){t.apply(void 0,[`rrweb logger error:`,e].concat(i))}finally{s=!1}}}}):function(){}}}var xI=`rrweb/console@1`,SI=function(e){return{name:xI,observer:bI,options:e}},CI=G.setImmediate,wI,TI,EI,DI=Object.prototype.toString,OI=CI===void 0?setTimeout:function(e){return CI(e)};try{Object.defineProperty({},"x",{}),wI=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:r!==!1})}}catch{wI=function(e,t,n){return e[t]=n,e}}EI=(function(){var e,t,n;function r(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(i,a){n=new r(i,a),t?t.next=n:e=n,t=n,n=void 0},drain:function(){var n=e;for(e=t=TI=void 0;n;)n.fn.call(n.self),n=n.next}}})();function kI(e,t){EI.add(e,t),TI||=OI(EI.drain)}function AI(e){var t,n=typeof e;return e!==null&&(n===`object`||n===`function`)&&(t=e.then),typeof t==`function`&&t}function jI(){for(var e=0;e<this.chain.length;e++)MI(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function MI(e,t,n){var r,i;try{t===!1?n.reject(e.msg):(r=t===!0?e.msg:t.call(void 0,e.msg),r===n.promise?n.reject(TypeError(`Promise-chain cycle`)):(i=AI(r))?i.call(r,n.resolve,n.reject):n.resolve(r))}catch(e){n.reject(e)}}function NI(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=AI(e))?kI(function(){var r=new II(n);try{t.call(e,function(){NI.apply(r,arguments)},function(){PI.apply(r,arguments)})}catch(e){PI.call(r,e)}}):(n.msg=e,n.state=1,n.chain.length>0&&kI(jI,n))}catch(e){PI.call(new II(n),e)}}}function PI(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&kI(jI,t))}function FI(e,t,n,r){for(var i=0;i<t.length;i++)(function(i){e.resolve(t[i]).then(function(e){n(i,e)},r)})(i)}function II(e){this.def=e,this.triggered=!1}function LI(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function RI(e){if(typeof e!=`function`)throw TypeError(`Not a function`);if(this.__NPO__!==0)throw TypeError(`Not a promise`);this.__NPO__=1;var t=new LI(this);this.then=function(e,n){var r={success:typeof e!=`function`||e,failure:typeof n==`function`&&n};return r.promise=new this.constructor(function(e,t){if(typeof e!=`function`||typeof t!=`function`)throw TypeError(`Not a function`);r.resolve=e,r.reject=t}),t.chain.push(r),t.state!==0&&kI(jI,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){NI.call(t,e)},function(e){PI.call(t,e)})}catch(e){PI.call(t,e)}}var zI=wI({},`constructor`,RI,!1);RI.prototype=zI,wI(zI,`__NPO__`,0,!1),wI(RI,`resolve`,function(e){var t=this;
vendor: 6,367 bytes, lines 108-111
108return e&&typeof e==`object`&&e.__NPO__===1?e:new t(function(t,n){if(typeof t!=`function`||typeof n!=`function`)throw TypeError(`Not a function`);t(e)})}),wI(RI,`reject`,function(e){return new this(function(t,n){if(typeof t!=`function`||typeof n!=`function`)throw TypeError(`Not a function`);n(e)})}),wI(RI,`all`,function(e){var t=this;return DI.call(e)===`[object Array]`?e.length===0?t.resolve([]):new t(function(n,r){if(typeof n!=`function`||typeof r!=`function`)throw TypeError(`Not a function`);var i=e.length,a=Array(i),o=0;FI(t,e,function(e,t){a[e]=t,++o===i&&n(a)},r)}):t.reject(TypeError(`Not an array`))}),wI(RI,`race`,function(e){var t=this;return DI.call(e)===`[object Array]`?new t(function(n,r){if(typeof n!=`function`||typeof r!=`function`)throw TypeError(`Not a function`);FI(t,e,function(e,t){n(t)},r)}):t.reject(TypeError(`Not an array`))});var BI=typeof Promise<`u`&&Promise.toString().indexOf(`[native code]`)!==-1?Promise:RI,VI=864e5,HI=8e3,UI=Array.prototype,WI=Function.prototype,GI=Object.prototype,KI=UI.slice,qI=GI.toString,JI=GI.hasOwnProperty,YI=G.console,XI=G.navigator,ZI=G.document,QI=G.opera,$I=G.screen,eL=XI.userAgent,tL=WI.bind,nL=UI.forEach,rL=UI.indexOf,iL=UI.map,aL=Array.isArray,oL={},J={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}},sL={log:function(){if(Ky.DEBUG&&!J.isUndefined(YI)&&YI)try{YI.log.apply(YI,arguments)}catch{J.each(arguments,function(e){YI.log(e)})}},warn:function(){if(Ky.DEBUG&&!J.isUndefined(YI)&&YI){var e=[`Mixpanel warning:`].concat(J.toArray(arguments));try{YI.warn.apply(YI,e)}catch{J.each(e,function(e){YI.warn(e)})}}},error:function(){if(Ky.DEBUG&&!J.isUndefined(YI)&&YI){var e=[`Mixpanel error:`].concat(J.toArray(arguments));try{YI.error.apply(YI,e)}catch{J.each(e,function(e){YI.error(e)})}}},critical:function(){if(!J.isUndefined(YI)&&YI){var e=[`Mixpanel error:`].concat(J.toArray(arguments));try{YI.error.apply(YI,e)}catch{J.each(e,function(e){YI.error(e)})}}}},cL=function(e,t){return function(){return arguments[0]=`[`+t+`] `+arguments[0],e.apply(sL,arguments)}},lL=function(e){return{log:cL(sL.log,e),warn:cL(sL.warn,e),error:cL(sL.error,e),critical:cL(sL.critical,e)}},uL=function(e){return function(){try{return e.apply(this,arguments)}catch(e){sL.critical(`Implementation error. Please turn on debug and contact [email protected].`),Ky.DEBUG&&sL.critical(e)}}},dL=function(e){var t=e.prototype;for(var n in t)typeof t[n]==`function`&&(t[n]=uL(t[n]))};J.bind=function(e,t){var n,r;if(tL&&e.bind===tL)return tL.apply(e,KI.call(arguments,1));if(!J.isFunction(e))throw TypeError();return n=KI.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(KI.call(arguments)));var i={};i.prototype=e.prototype;var a=new i;i.prototype=null;var o=e.apply(a,n.concat(KI.call(arguments)));return Object(o)===o?o:a},r},J.each=function(e,t,n){if(e!=null){if(nL&&e.forEach===nL)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r,e)===oL)return}else for(var a in e)if(JI.call(e,a)&&t.call(n,e[a],a,e)===oL)return}},J.extend=function(e){return J.each(KI.call(arguments,1),function(t){for(var n in t)t[n]!==void 0&&(e[n]=t[n])}),e},J.isArray=aL||function(e){return qI.call(e)===`[object Array]`},J.isFunction=function(e){return typeof e==`function`},J.isArguments=function(e){return!!(e&&JI.call(e,`callee`))},J.toArray=function(e){return e?e.toArray?e.toArray():J.isArray(e)||J.isArguments(e)?KI.call(e):J.values(e):[]},J.map=function(e,t,n){if(iL&&e.map===iL)return e.map(t,n);var r=[];return J.each(e,function(e){r.push(t.call(n,e))}),r},J.keys=function(e){var t=[];return e===null||J.each(e,function(e,n){t[t.length]=n}),t},J.values=function(e){var t=[];return e===null||J.each(e,function(e){t[t.length]=e}),t},J.include=function(e,t){var n=!1;return e===null?n:rL&&e.indexOf===rL?e.indexOf(t)!=-1:(J.each(e,function(e){if(n||=e===t)return oL}),n)},J.includes=function(e,t){return e.indexOf(t)!==-1},J.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},J.isObject=function(e){return e===Object(e)&&!J.isArray(e)},J.isEmptyObject=function(e){if(J.isObject(e)){for(var t in e)if(JI.call(e,t))return!1;return!0}return!1},J.isUndefined=function(e){return e===void 0},J.isString=function(e){return qI.call(e)==`[object String]`},J.isDate=function(e){return qI.call(e)==`[object Date]`},J.isNumber=function(e){return qI.call(e)==`[object Number]`},J.isElement=function(e){return!!(e&&e.nodeType===1)},J.encodeDates=function(e){return J.each(e,function(t,n){J.isDate(t)?e[n]=J.formatDate(t):J.isObject(t)&&(e[n]=J.encodeDates(t))}),e},J.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},J.formatDate=function(e){function t(e){return e<10?`0`+e:e}return e.getUTCFullYear()+`-`+t(e.getUTCMonth()+1)+`-`+t(e.getUTCDate())+`T`+t(e.getUTCHours())+`:`+t(e.getUTCMinutes())+`:`+t(e.getUTCSeconds())},J.strip_empty_properties=function(e){var t={};return J.each(e,function(e,n){J.isString(e)&&e.length>0&&(t[n]=e)}),t},J.truncate=function(e,t){var n;return typeof e==`string`?n=e.slice(0,t):J.isArray(e)?(n=[],J.each(e,function(e){n.push(J.truncate(e,t))})):J.isObject(e)?(n={},J.each(e,function(e,r){n[r]=J.truncate(e,t)})):n=e,n},J.JSONEncode=(function(){return function(e){var t=e,n=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":`\\b`,"	":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,'"':`\\"`,"\\":`\\\\`};return t.lastIndex=0,t.test(e)?`"`+e.replace(t,function(e){var t=n[e];return typeof t==`string`?t:`\\u`+(`0000`+e.charCodeAt(0).toString(16)).slice(-4)})+`"`:`"`+e+`"`},r=function(e,t){var i=``,a=`    `,o=0,s=``,c=``,l=0,u=i,d=[],f=t[e];switch(f&&typeof f==`object`&&typeof f.toJSON==`function`&&(f=f.toJSON(e)),typeof f){case`string`:return n(f);case`number`:return isFinite(f)?String(f):`null`;case`boolean`:case`null`:return String(f);case`object`:if(!f)return`null`;if(i+=a,d=[],qI.apply(f)===`[object Array]`){for(l=f.length,o=0;o<l;o+=1)d[o]=r(o,f)||`null`;return c=d.length===0?`[]`:i?`[
109`+i+d.join(`,
110`+i)+`
111`+u+`]`:`[`+d.join(`,`)+`]`,i=u,c}for(s in f)JI.call(f,s)&&(c=r(s,f),c&&d.push(n(s)+(i?`: `:`:`)+c));return c=d.length===0?`{}`:i?`{`+d.join(`,`)+u+`}`:`{`+d.join(`,`)+`}`,i=u,c}};return r(``,{"":t})}}
vendor: 4,314 bytes, lines 111-114
111)(),J.JSONDecode=(function(){var e,t,n={'"':`"`,"\\":`\\`,"/":`/`,b:`\b`,f:`\f`,n:`
112`,r:`\r`,t:`	`},r,i=function(t){var n=SyntaxError(t);throw n.at=e,n.text=r,n},a=function(n){return n&&n!==t&&i(`Expected '`+n+`' instead of '`+t+`'`),t=r.charAt(e),e+=1,t},o=function(){var e,n=``;for(t===`-`&&(n=`-`,a(`-`));t>=`0`&&t<=`9`;)n+=t,a();if(t===`.`)for(n+=`.`;a()&&t>=`0`&&t<=`9`;)n+=t;if(t===`e`||t===`E`)for(n+=t,a(),(t===`-`||t===`+`)&&(n+=t,a());t>=`0`&&t<=`9`;)n+=t,a();if(e=+n,!isFinite(e))i(`Bad number`);else return e},s=function(){var e,r,o=``,s;if(t===`"`)for(;a();){if(t===`"`)return a(),o;if(t===`\\`){if(a(),t===`u`){for(s=0,r=0;r<4&&(e=parseInt(a(),16),isFinite(e));r+=1)s=s*16+e;o+=String.fromCharCode(s)}else if(typeof n[t]==`string`)o+=n[t];else break}else o+=t}i(`Bad string`)},c=function(){for(;t&&t<=` `;)a()},l=function(){switch(t){case`t`:return a(`t`),a(`r`),a(`u`),a(`e`),!0;case`f`:return a(`f`),a(`a`),a(`l`),a(`s`),a(`e`),!1;case`n`:return a(`n`),a(`u`),a(`l`),a(`l`),null}i(`Unexpected "`+t+`"`)},u,d=function(){var e=[];if(t===`[`){if(a(`[`),c(),t===`]`)return a(`]`),e;for(;t;){if(e.push(u()),c(),t===`]`)return a(`]`),e;a(`,`),c()}}i(`Bad array`)},f=function(){var e,n={};if(t===`{`){if(a(`{`),c(),t===`}`)return a(`}`),n;for(;t;){if(e=s(),c(),a(`:`),Object.hasOwnProperty.call(n,e)&&i(`Duplicate key "`+e+`"`),n[e]=u(),c(),t===`}`)return a(`}`),n;a(`,`),c()}}i(`Bad object`)};return u=function(){switch(c(),t){case`{`:return f();case`[`:return d();case`"`:return s();case`-`:return o();default:return t>=`0`&&t<=`9`?o():l()}},function(n){var a;return r=n,e=0,t=` `,a=u(),c(),t&&i(`Syntax error`),a}})(),J.base64Encode=function(e){var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,n,r,i,a,o,s,c,l,u=0,d=0,f=``,p=[];if(!e)return e;e=J.utf8Encode(e);do n=e.charCodeAt(u++),r=e.charCodeAt(u++),i=e.charCodeAt(u++),l=n<<16|r<<8|i,a=l>>18&63,o=l>>12&63,s=l>>6&63,c=l&63,p[d++]=t.charAt(a)+t.charAt(o)+t.charAt(s)+t.charAt(c);while(u<e.length);switch(f=p.join(``),e.length%3){case 1:f=f.slice(0,-2)+`==`;break;case 2:f=f.slice(0,-1)+`=`}return f},J.utf8Encode=function(e){e=(e+``).replace(/\r\n/g,`
113`).replace(/\r/g,`
114`);var t=``,n,r,i=0,a;for(n=r=0,i=e.length,a=0;a<i;a++){var o=e.charCodeAt(a),s=null;o<128?r++:s=o>127&&o<2048?String.fromCharCode(o>>6|192,o&63|128):String.fromCharCode(o>>12|224,o>>6&63|128,o&63|128),s!==null&&(r>n&&(t+=e.substring(n,r)),t+=s,n=r=a+1)}return r>n&&(t+=e.substring(n,e.length)),t},J.UUID=function(){try{return G.crypto.randomUUID()}catch{for(var e=Array(36),t=0;t<36;t++)e[t]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]=`-`,J.map(e,function(e){return e.toString(16)}).join(``)}};var fL=[`ahrefsbot`,`ahrefssiteaudit`,`amazonbot`,`baiduspider`,`bingbot`,`bingpreview`,`chrome-lighthouse`,`facebookexternal`,`petalbot`,`pinterest`,`screaming frog`,`yahoo! slurp`,`yandex`,`adsbot-google`,`apis-google`,`duplexweb-google`,`feedfetcher-google`,`google favicon`,`google web preview`,`google-read-aloud`,`googlebot`,`googleweblight`,`mediapartners-google`,`storebot-google`];J.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<fL.length;t++)if(e.indexOf(fL[t])!==-1)return!0;return!1},J.HTTPBuildQuery=function(e,t){var n,r,i=[];return J.isUndefined(t)&&(t=`&`),J.each(e,function(e,t){n=encodeURIComponent(e.toString()),r=encodeURIComponent(t),i[i.length]=r+`=`+n}),i.join(t)},J.getQueryParam=function(e,t){t=t.replace(/[[]/g,`\\[`).replace(/[\]]/g,`\\]`);var n=`[\\?&]`+t+`=([^&#]*)`,r=new RegExp(n).exec(e);if(r===null||r&&typeof r[1]!=`string`&&r[1].length)return``;var i=r[1];try{i=decodeURIComponent(i)}catch{sL.error(`Skipping decoding for malformed query param: `+i)}return i.replace(/\+/g,` `)},J.cookie={get:function(e){for(var t=e+`=`,n=ZI.cookie.split(`;`),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)==` `;)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}return null},parse:function(e){var t;try{t=J.JSONDecode(J.cookie.get(e))||{}}catch{}return t},set_seconds:function(e,t,n,r,i,a,o){var s=``,c=``,l=``;if(o)s=`; domain=`+o;else if(r){var u=OL(ZI.location.hostname);s=u?`; domain=.`+u:``}if(n){var d=new Date;d.setTime(d.getTime()+n*1e3),c=`; expires=`+d.toGMTString()}a&&(i=!0,l=`; SameSite=None`),i&&(l+=`;
114 secure`),ZI.cookie=e+`=`+encodeURIComponent(t)+c+`; path=/`+s+l},set:function(e,t,n,r,i,a,o){var s=``,c=``,l=``;if(o)s=`; domain=`+o;else if(r){var u=OL(ZI.location.hostname);s=u?`; domain=.`+u:``}if(n){var d=new Date;d.setTime(d.getTime()+n*24*60*60*1e3),c=`; expires=`+d.toGMTString()}a&&(i=!0,l=`; SameSite=None`),i&&(l+=`; secure`);var f=e+`=`+encodeURIComponent(t)+c+`; path=/`+s+l;return ZI.cookie=f,f},remove:function(e,t,n){J.cookie.set(e,``,-1,t,!1,!1,n)}};var pL=function(e){var t=!0;try{var n=`__mplss_`+wL(8),r=`xyz`;e.setItem(n,r),e.getItem(n)!==r&&(t=!1),e.removeItem(n)}catch{t=!1}return t},mL=null,hL=function(e,t){return mL!==null&&!t?mL:mL=pL(e)},gL=null,_L=function(e,t){return gL!==null&&!t?gL:gL=pL(e)};function vL(e,t,n){var r=function(e){sL.error(t+` error: `+e)};return{is_supported:function(r){var i=n(e,r);return i||sL.error(t+` unsupported`),i},error:r,get:function(t){try{return e.getItem(t)}catch(e){r(e)}return null},parse:function(t){try{return J.JSONDecode(e.getItem(t))||{}}catch{}return null},set:function(t,n){try{e.setItem(t,n)}catch(e){r(e)}},remove:function(t){try{e.removeItem(t)}catch(e){r(e)}}}}var yL=function(){try{return G.localStorage}catch{return null}};J.localStorage=vL(yL(),`localStorage`,hL),J.sessionStorage=vL(function(){try{return G.sessionStorage}catch{return null}}(),`sessionStorage`,_L),J.register_event=(function(){var e=function(e,n,r,i,a){if(!e){sL.error(`No valid element provided to register_event`);return}if(e.addEventListener&&!i)e.addEventListener(n,r,!!a);else{var o=`on`+n,s=e[o];e[o]=t(e,r,s)}};function t(e,t,r){return function(i){if(i||=n(G.event),i){var a=!0,o,s;return J.isFunction(r)&&(o=r(i)),s=t.call(e,i),(!1===o||!1===s)&&(a=!1),a}}}function n(e){return e&&(e.preventDefault=n.preventDefault,e.stopPropagation=n.stopPropagation),e}return n.preventDefault=function(){this.returnValue=!1},n.stopPropagation=function(){this.cancelBubble=!0},e})();var bL=RegExp(`^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$`);J.dom_query=(function(){function e(e){return e.all?e.all:e.getElementsByTagName(`*`)}var t=/[\t\r\n]/g;function n(e,n){var r=` `+n+` `;return(` `+e.className+` `).replace(t,` `).indexOf(r)>=0}function r(t){if(!ZI.getElementsByTagName)return[];var r=t.split(` `),i,a,o,s,c,l,u,d,f,p,m=[ZI];for(l=0;l<r.length;l++){if(i=r[l].replace(/^\s+/,``).replace(/\s+$/,``),i.indexOf(`#`)>-1){a=i.split(`#`),o=a[0];var h=a[1],g=ZI.getElementById(h);if(!g||o&&g.nodeName.toLowerCase()!=o)return[];m=[g];continue}if(i.indexOf(`.`)>-1){a=i.split(`.`),o=a[0];var _=a[1];for(o||=`*`,s=[],c=0,u=0;u<m.length;u++)for(f=o==`*`?e(m[u]):m[u].getElementsByTagName(o),d=0;d<f.length;d++)s[c++]=f[d];for(m=[],p=0,u=0;u<s.length;u++)s[u].className&&J.isString(s[u].className)&&n(s[u],_)&&(m[p++]=s[u]);continue}var v=i.match(bL);if(v){o=v[1];var y=v[2],b=v[3],x=v[4];for(o||=`*`,s=[],c=0,u=0;u<m.length;u++)for(f=o==`*`?e(m[u]):m[u].getElementsByTagName(o),d=0;d<f.length;d++)s[c++]=f[d];m=[],p=0;var S;switch(b){case`=`:S=function(e){return e.getAttribute(y)==x};break;case`~`:S=function(e){return e.getAttribute(y).match(RegExp(`\\b`+x+`\\b`))};break;case`|`:S=function(e){return e.getAttribute(y).match(RegExp(`^`+x+`-?`))};break;case`^`:S=function(e){return e.getAttribute(y).indexOf(x)===0};break;case`$`:S=function(e){return e.getAttribute(y).lastIndexOf(x)==e.getAttribute(y).length-x.length};break;case`*`:S=function(e){return e.getAttribute(y).indexOf(x)>-1};break;default:S=function(e){return e.getAttribute(y)}}for(m=[],p=0,u=0;u<s.length;u++)S(s[u])&&(m[p++]=s[u]);continue}for(o=i,s=[],c=0,u=0;u<m.length;u++)for(f=m[u].getElementsByTagName(o),d=0;d<f.length;d++)s[c++]=f[d];m=s}return m}return function(e){return J.isElement(e)?[e]:J.isObject(e)&&!J.isUndefined(e.length)?e:r.call(this,e)}})();var xL=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_content`,`utm_term`,`utm_id`,`utm_source_platform`,`utm_campaign_id`,`utm_creative_format`,`utm_marketing_tactic`],SL=[`dclid`,`fbclid`,`gclid`,`ko_click_id`,`li_fat_id`,`msclkid`,`sccid`,`ttclid`,`twclid`,`wbraid`];J.info={campaignParams:function(e){var t=``,n={};return J.each(xL,function(r){t=J.getQueryParam(ZI.URL,r),t.length?n[r]=t:e!==void 0&&(n[r]=e)}),n},clickParams:function(){var e=``,t={};return J.each(SL,function(n){e=J.getQueryParam(ZI.URL,n),e.length&&(t[n]=e)}),t},marketingParams:function(){return J.extend(J.info.campaignParams(),J.info.clickParams())},searchEngine:function(e){return e.search(`https?://(.*)google.([^/?]*)`)===0?`google`:e.search(`https?://(.*)bing.com`)===0?`bing`:e.search(`https?://(.*)yahoo.com`)===0?`yaho
114o`:e.search(`https?://(.*)duckduckgo.com`)===0?`duckduckgo`:null},searchInfo:function(e){var t=J.info.searchEngine(e),n=t==`yahoo`?`p`:`q`,r={};if(t!==null){r.$search_engine=t;var i=J.getQueryParam(e,n);i.length&&(r.mp_keyword=i)}return r},browser:function(e,t,n){return t||=``,n||J.includes(e,` OPR/`)?J.includes(e,`Mini`)?`Opera Mini`:`Opera`:/(BlackBerry|PlayBook|BB10)/i.test(e)?`BlackBerry`:J.includes(e,`IEMobile`)||J.includes(e,`WPDesktop`)?`Internet Explorer Mobile`:J.includes(e,`SamsungBrowser/`)?`Samsung Internet`:J.includes(e,`Edge`)||J.includes(e,`Edg/`)?`Microsoft Edge`:J.includes(e,`FBIOS`)?`Facebook Mobile`:J.includes(e,`Whale/`)?`Whale Browser`:J.includes(e,`Chrome`)?`Chrome`:J.includes(e,`CriOS`)?`Chrome iOS`:J.includes(e,`UCWEB`)||J.includes(e,`UCBrowser`)?`UC Browser`:J.includes(e,`FxiOS`)?`Firefox iOS`:J.includes(t,`Apple`)?J.includes(e,`Mobile`)?`Mobile Safari`:`Safari`:J.includes(e,`Android`)?`Android Mobile`:J.includes(e,`Konqueror`)?`Konqueror`:J.includes(e,`Firefox`)?`Firefox`:J.includes(e,`MSIE`)||J.includes(e,`Trident/`)?`Internet Explorer`:J.includes(e,`Gecko`)?`Mozilla`:``},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/}[J.info.browser(e,t,n)];if(r===void 0)return null;var i=e.match(r);return i?parseFloat(i[i.length-2]):null},os:function(){var e=eL;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?`Windows Phone`:`Windows`:/(iPhone|iPad|iPod)/.test(e)?`iOS`:/Android/.test(e)?`Android`:/(BlackBerry|PlayBook|BB10)/i.test(e)?`BlackBerry`:/Mac/i.test(e)?`Mac OS X`:/Linux/.test(e)?`Linux`:/CrOS/.test(e)?`Chrome OS`:``},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?`Windows Phone`:/iPad/.test(e)?`iPad`:/iPod/.test(e)?`iPod Touch`:/iPhone/.test(e)?`iPhone`:/(BlackBerry|PlayBook|BB10)/i.test(e)?`BlackBerry`:/Android/.test(e)?`Android`:``},referringDomain:function(e){var t=e.split(`/`);return t.length>=3?t[2]:``},currentUrl:function(){return G.location.href},properties:function(e){return typeof e!=`object`&&(e={}),J.extend(J.strip_empty_properties({$os:J.info.os(),$browser:J.info.browser(eL,XI.vendor,QI),$referrer:ZI.referrer,$referring_domain:J.info.referringDomain(ZI.referrer),$device:J.info.device(eL)}),{$current_url:J.info.currentUrl(),$browser_version:J.info.browserVersion(eL,XI.vendor,QI),$screen_height:$I.height,$screen_width:$I.width,mp_lib:`web`,$lib_version:Ky.LIB_VERSION,$insert_id:wL(),time:J.timestamp()/1e3},J.strip_empty_properties(e))},people_properties:function(){return J.extend(J.strip_empty_properties({$os:J.info.os(),$browser:J.info.browser(eL,XI.vendor,QI)}),{$browser_version:J.info.browserVersion(eL,XI.vendor,QI)})},mpPageViewProperties:function(){return J.strip_empty_properties({current_page_title:ZI.title,current_domain:G.location.hostname,current_url_path:G.location.pathname,current_url_protocol:G.location.protocol,current_url_search:G.location.search})}};var CL=function(e,t){var n=null,r=[];return function(i){var a=this;return r.push(i),n||=new BI(function(i){setTimeout(function(){var t=e.apply(a,[r]);n=null,r=[],i(t)},t)}),n}},wL=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},TL=function(){var e=J.UUID().replace(/-/g,``),t=J.UUID().replace(/-/g,``).substring(0,16);return`00-`+e+`-`+t+`-01`},EL=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,DL=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,OL=function(e){var t=DL,n=e.split(`.`),r=n[n.length-1];(r.length>4||r===`com`||r===`org`)&&(t=EL);var i=e.match(t);return i?i[0]:``},kL=function(){var e=G.navigator.onLine;return J.isUndefined(e)||e},AL=function(){},jL=function(e,t){for(var n=!1,r=0;r<t.length;r++)if(e.match(t[r])){n=!0;break}return n},ML=null,NL=null;typeof JSON<`u`&&(ML=JSON.stringify,NL=JSON.parse),ML||=J.JSONEncode,NL||=J.JSONDecode;var PL=function(e,t,n){if(!G.CompressionStream)return!1;var r=J.info.browser(e,t,n),i=J.info.browserVersion(e,t,n);return!((r===`Safari`||r===`Mobile Safari`)&&i>=16.4&&i<16.6)};J.info=J.info,J.info.browser=J.info.browser,J.info.browserVersion=J.info.browserVersion,J.info.device=J.info.device,J.info.properties=J.info.properties,J.isBlockedUA=J.isBlockedUA,J.isEmptyObject=J.isEmptyObject,J.isObject=J.isObject,J.JSONDecode=J.JSONDecode,J.JSONEncode=J.JSONEncode,J.toArray=J.toArray,J.NPO=RI;var FL=function(e,t,n){this.dbName=e,this.storeName=t,this.version=n.version,this.storeNamesInDb=n.storeNames,this.dbPromise=null};FL.prototype._openDb=function(){var e=this.dbName,t=this.version,n=this.storeNamesInDb;return new BI(function(r,i){var a=G.indexedDB.open(e,t);a.onerror=function(){i(a.error)},a.onsuccess=function(){r(a.result)},a.onupgradeneeded=function(e){var t=e.target.result;
vendor: 4,327 bytes, line 114
114n.forEach(function(e){t.objectStoreNames.contains(e)||t.createObjectStore(e)})}})},FL.prototype.init=function(){return G.indexedDB?(this.dbPromise||=this._openDb(),this.dbPromise.then(function(e){return e instanceof G.IDBDatabase?BI.resolve():BI.reject(e)})):BI.reject(`indexedDB is not supported in this browser`)},FL.prototype.isInitialized=function(){return!!this.dbPromise},FL.prototype.makeTransaction=function(e,t){var n=this.storeName,r=function(r){return new BI(function(i,a){var o=r.transaction(n,e);o.oncomplete=function(){i(o)},o.onabort=o.onerror=function(){a(o.error)},t(o.objectStore(n))})};return this.dbPromise.then(r).catch(function(e){return e&&e.name===`InvalidStateError`?(this.dbPromise=this._openDb(),this.dbPromise.then(r)):BI.reject(e)}.bind(this))},FL.prototype.setItem=function(e,t){return this.makeTransaction(`readwrite`,function(n){n.put(t,e)})},FL.prototype.getItem=function(e){var t;return this.makeTransaction(`readonly`,function(n){t=n.get(e)}).then(function(){return t.result})},FL.prototype.removeItem=function(e){return this.makeTransaction(`readwrite`,function(t){t.delete(e)})},FL.prototype.getAll=function(){var e;return this.makeTransaction(`readonly`,function(t){e=t.getAll()}).then(function(){return e.result})};var IL=`mixpanelBrowserDb`,LL=`mixpanelRecordingEvents`,RL=`mixpanelRecordingRegistry`,zL={version:1,storeNames:[LL,RL]},BL=`__mp_opt_in_out_`;function VL(e,t){$L(!0,e,t)}function HL(e,t){$L(!1,e,t)}function UL(e,t){return ZL(e,t)===`1`}function WL(e,t){if(QL(t))return sL.warn(`This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"`),!0;var n=ZL(e,t)===`0`;return n&&sL.warn(`You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data.`),n}function GL(e){return eR(e,function(e){return this.get_config(e)})}function KL(e){return eR(e,function(e){return this._get_config(e)})}function qL(e){return eR(e,function(e){return this._get_config(e)})}function JL(e,t){t||={},YL(t).remove(XL(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function YL(e){return e||={},e.persistenceType===`localStorage`?J.localStorage:J.cookie}function XL(e,t){return t||={},(t.persistencePrefix||BL)+e}function ZL(e,t){return YL(t).get(XL(e,t))}function QL(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||G,n=t.navigator||{},r=!1;return J.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],function(e){J.includes([!0,1,`1`,`yes`],e)&&(r=!0)}),r}function $L(e,t,n){if(!J.isString(t)||!t.length){sL.error(`gdpr.`+(e?`optIn`:`optOut`)+` called with an invalid token`);return}n||={},YL(n).set(XL(t,n),+!!e,J.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||`$opt_in`,n.trackProperties,{send_immediately:!0})}function eR(e,t){return function(){var n=!1;try{var r=t.call(this,`token`),i=t.call(this,`ignore_dnt`),a=t.call(this,`opt_out_tracking_persistence_type`),o=t.call(this,`opt_out_tracking_cookie_prefix`),s=t.call(this,`window`);r&&(n=WL(r,{ignoreDnt:i,persistenceType:a,persistencePrefix:o,window:s}))}catch(e){sL.error(`Unexpected error when checking tracking opt-out status: `+e)}if(!n)return e.apply(this,arguments);var c=arguments[arguments.length-1];typeof c==`function`&&c(0)}}var tR=lL(`lock`),nR=function(e,t){t||={},this.storageKey=e,this.storage=t.storage||yL(),this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||BI};nR.prototype.withLock=function(e,t){var n=this.promiseImpl;return new n(J.bind(function(n,r){var i=t||new Date().getTime()+`|`+Math.random(),a=new Date().getTime(),o=this.storageKey,s=this.pollIntervalMS,c=this.timeoutMS,l=this.storage,u=o+`:X`,d=o+`:Y`,f=o+`:Z`,p=function(e){if(new Date().getTime()-a>c){tR.error(`Timeout waiting for mutex on `+o+`; clearing lock. [`+i+`]`),l.removeItem(f),l.removeItem(d),g();return}setTimeout(function(){try{e()}catch(e){r(e)}},s*(Math.random()+.1))},m=function(e,t){e()?t():p(function(){m(e,t)})},h=function(){var e=l.getItem(d);return e&&e!==i?!1:(l.setItem(d,i),l.getItem(d)===i||(hL(l,!0)||r(Error(`localStorage support dropped while acquiring lock`)),!1))}
114,g=function(){l.setItem(u,i),m(h,function(){if(l.getItem(u)===i){_();return}p(function(){if(l.getItem(d)!==i){g();return}m(function(){return!l.getItem(f)},_)})})},_=function(){l.setItem(f,`1`);var t=function(){l.removeItem(f),l.getItem(d)===i&&l.removeItem(d),l.getItem(u)===i&&l.removeItem(u)};e().then(function(e){t(),n(e)}).catch(function(e){t(),r(e)})};try{if(hL(l,!0))g();else throw Error(`localStorage support check failed`)}catch(e){r(e)}},this))};var rR=function(e){this.storage=e||yL()};rR.prototype.init=function(){return this.storage?BI.resolve():BI.reject(Error(`localStorage is not available`))},rR.prototype.isInitialized=function(){return!0},rR.prototype.setItem=function(e,t){return new BI(J.bind(function(n,r){try{this.storage.setItem(e,ML(t))}catch(e){r(e)}n()},this))},rR.prototype.getItem=function(e){return new BI(J.bind(function(t,n){var r;try{r=NL(this.storage.getItem(e))}catch(e){n(e)}t(r)},this))},rR.prototype.removeItem=function(e){return new BI(J.bind(function(t,n){try{this.storage.removeItem(e)}catch(e){n(e)}t()},this))};var iR=lL(`batch`),aR=function(e,t){t||={},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new rR,this.lock=new nR(e,{storage:t.sharedLockStorage,timeoutMS:t.sharedLockTimeoutMS})),this.reportError=t.errorReporter||J.bind(iR.error,iR),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1,this.enqueuePersisted=t.enqueueThrottleMs?CL(J.bind(this._enqueuePersisted,this),t.enqueueThrottleMs):J.bind(function(e){return this._enqueuePersisted([e])},this)};aR.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?BI.resolve():this.queueStorage.init().then(J.bind(function(){this.initialized=!0},this)).catch(J.bind(function(e){this.reportError(`Error initializing queue persistence. Disabling persistence`,e),this.initialized=!0,this.usePersistence=!1},this))},aR.prototype.enqueue=function(e,t){var n={id:wL(),flushAfter:new Date().getTime()+t*2,payload:e};return this.usePersistence?this.enqueuePersisted(n):(this.memQueue.push(n),BI.resolve(!0))},aR.prototype._enqueuePersisted=function(e){var t=J.bind(function(){return this.ensureInit().then(J.bind(function(){return this.readFromStorage()},this)).then(J.bind(function(t){return this.saveToStorage(t.concat(e))},this)).then(J.bind(function(t){return t&&(this.memQueue=this.memQueue.concat(e)),t},this)).catch(J.bind(function(t){return this.reportError(`Error enqueueing items`,t,e),!1},this))},this);return this.lock.withLock(t,this.pid).catch(J.bind(function(e){return this.reportError(`Error acquiring storage lock`,e),!1},this))},aR.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.length<e?this.ensureInit().then(J.bind(function(){return this.readFromStorage()},this)).then(J.bind(function(n){if(n.length){var r={};J.each(t,function(e){r[e.id]=!0});for(var i=0;i<n.length;i++){var a=n[i];if(new Date().getTime()>a.flushAfter&&!r[a.id]&&(a.orphaned=!0,t.push(a),t.length>=e))break}}return t},this)):BI.resolve(t)};var oR=function(e,t){var n=[];return J.each(e,function(e){e.id&&!t[e.id]&&n.push(e)}),n};aR.prototype.removeItemsByID=function(e){var t={};if(J.each(e,function(e){t[e]=!0}),this.memQueue=oR(this.memQueue,t),this.usePersistence){var n=J.bind(function(){return this.ensureInit().then(J.bind(function(){return this.readFromStorage()},this)).then(J.bind(function(e){return e=oR(e,t),this.saveToStorage(e)},this)).then(J.bind(function(){return this.readFromStorage()},this)).then(J.bind(function(e){for(var n=0;n<e.length;n++){var r=e[n];if(r.id&&t[r.id])throw Error(`Item not removed from storage`)}return!0},this)).catch(J.bind(function(t){return this.reportError(`Error removing items`,t,e),!1},this))},this);return this.lock.withLock(n,this.pid).catch(J.bind(function(e){return this.reportError(`Error acquiring storage lock`,e),!hL(this.lock.storage,!0)&&n().then(J.bind(function(e){return e||this.queueStorage.removeItem(this.storageKey).then(function(){return e})},this)).catch(J.bind(function(e){return this.reportError(`Error clearing queue`,e),!1},this))},this))}return BI.resolve(!0)};var sR=function(e,t){var n=[];return J.each(e,function(e){var r=e.id;if(r in t){var i=t[r];
vendor: 9,175 bytes, line 114
114i!==null&&(e.payload=i,n.push(e))}else n.push(e)}),n};aR.prototype.updatePayloads=function(e){return this.memQueue=sR(this.memQueue,e),this.usePersistence?this.lock.withLock(J.bind(function(){return this.ensureInit().then(J.bind(function(){return this.readFromStorage()},this)).then(J.bind(function(t){return t=sR(t,e),this.saveToStorage(t)},this)).catch(J.bind(function(t){return this.reportError(`Error updating items`,e,t),!1},this))},this),this.pid).catch(J.bind(function(e){return this.reportError(`Error acquiring storage lock`,e),!1},this)):BI.resolve(!0)},aR.prototype.readFromStorage=function(){return this.ensureInit().then(J.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(J.bind(function(e){return e&&(J.isArray(e)||(this.reportError(`Invalid storage entry:`,e),e=null)),e||[]},this)).catch(J.bind(function(e){return this.reportError(`Error retrieving queue`,e),[]},this))},aR.prototype.saveToStorage=function(e){return this.ensureInit().then(J.bind(function(){return this.queueStorage.setItem(this.storageKey,e)},this)).then(function(){return!0}).catch(J.bind(function(e){return this.reportError(`Error saving queue`,e),!1},this))},aR.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(J.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):BI.resolve()};var cR=6e5,lR=lL(`batch`),uR=function(e,t){this.errorReporter=t.errorReporter,this.queue=new aR(e,{errorReporter:J.bind(this.reportError,this),queueStorage:t.queueStorage,sharedLockStorage:t.sharedLockStorage,sharedLockTimeoutMS:t.sharedLockTimeoutMS,usePersistence:t.usePersistence,enqueueThrottleMs:t.enqueueThrottleMs}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1,this._flushPromise=null};uR.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)},uR.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},uR.prototype.stop=function(){this.stopped=!0,this.timeoutID&&=(clearTimeout(this.timeoutID),null)},uR.prototype.clear=function(){return this.queue.clear()},uR.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},uR.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},uR.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(J.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))},uR.prototype.sendRequestPromise=function(e,t){return new BI(J.bind(function(n){this.sendRequest(e,t,n)},this))},uR.prototype.flush=function(e){if(this.requestInProgress)return lR.log(`Flush: Request already in progress`),BI.resolve();this.requestInProgress=!0,e||={};var t=this.libConfig.batch_request_timeout_ms,n=new Date().getTime(),r=this.batchSize;return this.queue.fillBatch(r).then(J.bind(function(i){var a=i.length===r,o=[],s={};if(J.each(i,function(e){var t=e.payload;if(this.beforeSendHook&&!e.orphaned&&(t=this.beforeSendHook(t)),t){t.event&&t.properties&&(t.properties=J.extend({},t.properties,{mp_sent_by_lib_version:Ky.LIB_VERSION}));var n=!0,r=e.id;r?(this.itemIdsSentSuccessfully[r]||0)>5&&(this.reportError(`[dupe] item ID sent too many times, not sending`,{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[r]}),n=!1):this.reportError(`[dupe] found item with no ID`,{item:e}),n&&o.push(t)}s[e.id]=t},this),o.length<1)return this.requestInProgress=!1,this.resetFlush(),BI.resolve();var c=J.bind(function(){return this.queue.removeItemsByID(J.map(i,function(e){return e.id})).then(J.bind(function(e){return J.each(i,J.bind(function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError(`[dupe] item ID sent too many times`,{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError(`[dupe] found item with no ID while removing`,{item:e})},this)),e?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!a?(this.resetFlush(),BI.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError(`Too many queue failures; disabling batching system.`),this.stopAllBatching()):this.resetFlush(),BI.resolve())},this))},this),l=J.bind(function(a){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(s);if(J.isObject(a)&&a.error===`timeout`&&new Date().getTime()-n>=t)return this.reportError(`Network timeout; retrying`),this.flush();if(J.isObject(a)&&(a.httpStatusCode>=500||a.httpStatusCode===429||a.httpStatusCode<=0&&!kL()||a.error===`timeout`)){var o=this.flushInterval*2;return a.retryAfter&&(o=parseInt(a.retryAfter,10)*1e3||o),o=Math.min(cR,o),this.reportError(`Error; retry in `+o+` ms`),this.scheduleFlush(o),BI.resolve()}if(J.isObject(a)&&a.httpStatusCode===413){if(i.length>1){var l=Math.max(1,Math.floor(r/2));return this.batchSize=Math.min(this.batchSize,l,i.length-1),this.reportError(`413 response; reducing batch size to `+this.batchSize),this.resetFlush(),BI.resolve()}return this.reportError(`Single-event request too large; dropping`,i),this.resetBatchSize(),c()}return c()}catch(e){this.reportError(`Error handling API response`,e),this.resetFlush()}},this),u={method:`POST`,verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(u.transport=`sendBeacon`),lR.log(`MIXPANEL REQUEST:`,o),this.sendRequestPromise(o,u).then(l)},this)).catch(J.bind(function(e){this.reportError(`Error flushing request queue`,e),this.resetFlush()},this))},uR.prototype.reportError=function(e,t){if(lR.error.apply(lR.error,arguments),this.errorReporter)try{t instanceof Error||(t=Error(e)),this.errorReporter(e,t)}catch(e){lR.error(e)}};var dR=function(e){var t=Date.now();return!e||t>e.maxExpires||t>e.idleExpires},fR=250,pR=function(e,t){if(!J.isArray(e))return e&&t.critical(`record_allowed_iframe_origins must be an array of origin strings, cross-origin recording will be disabled.`),[];for(var n=[],r=0;r<e.length;r++)try{var i=new URL(e[r]).origin;if(i===`null`){t.critical(e[r]+` has an opaque origin. Skipping this entry.`);continue}n.push(i)}catch{t.critical(e[r]+` is not a valid origin URL. Skipping this entry.`)}return n},mR=`change`,hR=`click`,gR=`hashchange`,_R=`input`,vR=`load`,yR=`mp_locationchange`,bR=`popstate`,xR=`scrollend`,SR=`scroll`,CR=`select`,wR=`submit`,TR=`toggle`,ER=`visibilitychange`,DR=[`clientX`,`clientY`,`offsetX`,`offsetY`,`pageX`,`pageY`,`screenX`,`screenY`,`x`,`y`],OR=[`mp-include`],kR=[`mp-no-track`],AR=kR.concat([`mp-sensitive`]),jR=[`aria-label`,`aria-labelledby`,`aria-describedby`,`href`,`name`,`role`,`title`,`type`],MR={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},NR={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},PR={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},FR=[`onclick`,`onmousedown`,`onmouseup`,`onpointerdown`,`onpointerup`,`ontouchend`,`ontouchstart`],IR=5,LR=lL(`autocapture`);function RR(e){for(var t={},n=zR(e).split(` `),r=0;r<n.length;r++){var i=n[r];i&&(t[i]=!0)}return t}function zR(e){switch(typeof e.className){case`string`:return e.className;case`object`:return e.className.baseVal||e.getAttribute(`class`)||``;default:return``}}function BR(e){if(e.previousElementSibling)return e.previousElementSibling;do e=e.previousSibling;while(e&&!qR(e));return e}function VR(e,t,n,r,i,a){var o={$classes:zR(e).split(` `),$tag_name:e.tagName.toLowerCase()},s=e.id;s&&(o.$id=s),ez(e,t,i,a)&&J.each(jR.concat(r),function(t){if(e.hasAttribute(t)&&!n[t]){var r=e.getAttribute(t);tz(r)&&(o[`$attr-`+t]=r)}});for(var c=1,l=1,u=e;u=BR(u);)c++,u.tagName===e.tagName&&l++;return o.$nth_child=c,o.$nth_of_type=l,o}function HR(e,t){var n=t.allowElementCallback,r=t.allowSelectors||[],i=t.blockAttrs||[],a=t.blockElementCallback,o=t.blockSelectors||[],s=t.captureTextContent||!1,c=t.captureExtraAttrs||[],l=t.capturedForHeatMap||!1,u={};J.each(i,function(e){u[e]=!0});var d=null,f=e.target===void 0?e.srcElement:e.target;if(YR(f)&&(f=f.parentNode),QR(f,e)&&GR(f,e,n,r)&&!KR(f,e,a,o)){for(var p=[f],m=f;m.parentNode&&!JR(m,`body`);)p.push(m.parentNode),m=m.parentNode;var h=[],g,_=!1;if(J.each(p,function(t){var i=ez(t,e,n,r);!u.href&&t.tagName.toLowerCase()===`a`&&(g=t.getAttribute(`href`),g=i&&tz(g)&&g),KR(t,e,a,o)&&(_=!0),h.push(VR(t,e,u,c,n,r))},this),!_){var v=ZI.documentElement;if(d={$event_type:e.type,$host:G.location.host,$pathname:G.location.pathname,$elements:h,$el_attr__href:g,$viewportHe
114ight:Math.max(v.clientHeight,G.innerHeight||0),$viewportWidth:Math.max(v.clientWidth,G.innerWidth||0),$pageHeight:ZI.body.offsetHeight||0,$pageWidth:ZI.body.offsetWidth||0},J.each(c,function(e){if(!u[e]&&f.hasAttribute(e)){var t=f.getAttribute(e);tz(t)&&(d[`$el_attr__`+e]=t)}}),s&&(y=UR(f,e,n,r),y&&y.length&&(d.$el_text=y)),e.type===hR&&(J.each(DR,function(t){t in e&&(d[`$`+t]=e[t])}),l&&(d.$captured_for_heatmap=!0),f=WR(e)),s){var y=UR(f,e,n,r);y&&y.length&&(d.$el_text=y)}if(f){if(!GR(f,e,n,r)||KR(f,e,a,o))return null;var b=VR(f,e,u,c,n,r);d.$target=b,d.$el_classes=b.$classes,J.extend(d,J.strip_empty_properties({$el_id:b.$id,$el_tag_name:b.$tag_name}))}}}return d}function UR(e,t,n,r){var i=``;return ez(e,t,n,r)&&e.childNodes&&e.childNodes.length&&J.each(e.childNodes,function(e){YR(e)&&e.textContent&&(i+=J.trim(e.textContent).split(/(\s+)/).filter(tz).join(``).replace(/[\r\n]/g,` `).replace(/[ ]+/g,` `).substring(0,255))}),J.trim(i)}function WR(e){for(var t=e.target,n=e.composedPath(),r=0;r<n.length;r++){var i=n[r];if(JR(i,`a`)||JR(i,`button`)||JR(i,`input`)||JR(i,`select`)||i.getAttribute&&i.getAttribute(`role`)===`button`){t=i;break}if(i===t)break}return t}function GR(e,t,n,r){if(n)try{if(!n(e,t))return!1}catch(e){return LR.critical(`Error while checking element in allowElementCallback`,e),!1}if(!r.length)return!0;for(var i=0;i<r.length;i++){var a=r[i];try{if(e.matches(a))return!0}catch(e){LR.critical(`Error while checking selector: `+a,e)}}return!1}function KR(e,t,n,r){var i;if(n)try{if(n(e,t))return!0}catch(e){return LR.critical(`Error while checking element in blockElementCallback`,e),!0}if(r&&r.length)for(i=0;i<r.length;i++){var a=r[i];try{if(e.matches(a))return!0}catch(e){LR.critical(`Error while checking selector: `+a,e)}}var o=RR(e);for(i=0;i<kR.length;i++)if(o[kR[i]])return!0;return!1}function qR(e){return e&&e.nodeType===1}function JR(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function YR(e){return e&&e.nodeType===3}function XR(){try{return!!ZI.createElement(`div`).matches}catch{return!1}}function ZR(){return typeof WeakSet<`u`}function QR(e,t){if(!e||JR(e,`html`)||!qR(e))return!1;switch(e.tagName.toLowerCase()){case`form`:return t.type===wR;case`input`:return[`button`,`submit`].indexOf(e.getAttribute(`type`))===-1?t.type===mR:t.type===hR;case`select`:case`textarea`:return t.type===mR;default:return t.type===hR}}function $R(e){var t=(e.name||e.id||``).toString().toLowerCase();return!!(typeof t==`string`&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(t.replace(/[^a-zA-Z0-9]/g,``)))}function ez(e,t,n,r){var i;if(!GR(e,t,n,r))return!1;for(var a=e;a.parentNode&&!JR(a,`body`);a=a.parentNode){var o=RR(a);for(i=0;i<AR.length;i++)if(o[AR[i]])return!1}var s=RR(e);for(i=0;i<OR.length;i++)if(s[OR[i]])return!0;if(JR(e,`input`)||JR(e,`select`)||JR(e,`textarea`)||e.getAttribute(`contenteditable`)===`true`)return!1;var c=e.type||``;if(typeof c==`string`)switch(c.toLowerCase()){case`hidden`:return!1;case`password`:return!1}return!$R(e)}function tz(e){return!(e===null||J.isUndefined(e)||typeof e==`string`&&(e=J.trim(e),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||``).replace(/[- ]/g,``))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(e)))}function nz(e){var t=`onscrollend`in G,n=uL(e),r=xR;if(!t){var i=null,a=100;n=uL(function(){clearTimeout(i),i=setTimeout(e,a)}),r=SR}return{listener:n,eventType:r}}function rz(e){for(var t=0;t<FR.length;t++)if(e.hasAttribute(FR[t]))return!0;return!1}function iz(e){var t=e.getAttribute(`role`);return t?MR[t.trim().split(/\s+/)[0].toLowerCase()]:!1}function az(e){var t=e.tagName.toLowerCase();return!!(t===`button`||t===`input`||t===`select`||t===`textarea`||t===`details`||t===`dialog`||e.isContentEditable||e.onclick||e.onmousedown||e.onmouseup||e.ontouchstart||e.ontouchend||rz(e)||iz(e)||t===`a`&&e.hasAttribute(`href`)||e.hasAttribute(`tabindex`))}function oz(e){if(!e||!e.tagName)return!0;var t=e.tagName.toLowerCase();if(NR[t])return!0;
vendor: 5,111 bytes, line 114
114if(az(e))return!1;for(var n=e.parentElement,r=0;n&&r<IR;){if(az(n))return!1;if(n.getRootNode&&n.getRootNode()!==ZI){var i=n.getRootNode();if(i.host&&az(i.host))return!1}n=n.parentElement,r++}return!!PR[t]}function sz(e){return`composedPath`in e?e.composedPath():[]}function cz(e){var t=sz(e);return t&&t.length>0?t[0]:e.target||e.srcElement}var lz=`.mp-mask, .fs-mask, .amp-mask, .rr-mask, .ph-mask`,uz=`data-rr-is-password`,dz=[`password`,`email`,`tel`,`hidden`];function fz(e){return e?Array.isArray(e)?e:[e]:[]}function pz(e){var t={input:{maskingSelector:``,unmaskingSelector:``,maskAll:!0},text:{maskingSelector:``,unmaskingSelector:``,maskAll:!0}},n=e.get_config(`record_mask_input_selector`),r=e.get_config(`record_unmask_input_selector`),i=e.get_config(`record_mask_all_inputs`);t.input.maskingSelector=fz(n).join(`,`),t.input.unmaskingSelector=fz(r).join(`,`),i!==void 0&&(t.input.maskAll=i);var a=e.get_config(`record_mask_text_selector`),o=e.get_config(`record_unmask_text_selector`),s=e.get_config(`record_mask_all_text`),c=e.get_config(`record_mask_text_class`),l=fz(a);if(c){if(c instanceof RegExp)t.text._legacyClassRegex=c;else{var u=`.`+c;l.indexOf(u)===-1&&l.push(u)}}return t.text.maskingSelector=l.join(`,`),t.text.unmaskingSelector=fz(o).join(`,`),s===void 0&&a!==void 0?t.text.maskAll=!1:s!==void 0&&(t.text.maskAll=s),t}function mz(e,t){return t?!!e.closest(t):!1}function hz(e,t){var n=(e.getAttribute(`type`)||``).toLowerCase();if(dz.indexOf(n)!==-1)return!0;var r=(e.getAttribute(`autocomplete`)||``).toLowerCase();return r&&r!==``&&r!==`off`||e.hasAttribute(uz)||$R(e)?!0:t.input.maskAll?!mz(e,t.input.unmaskingSelector):!!(mz(e,t.input.maskingSelector)||mz(e,lz))}function gz(e,t){return e?t.text._legacyClassRegex&&gM(e,t.text._legacyClassRegex)?!0:t.text.maskAll?!mz(e,t.text.unmaskingSelector):!!(mz(e,t.text.maskingSelector)||mz(e,lz)):!1}var _z=lL(`network-plugin`);function vz(e){return Math.round(Date.now()-e.performance.now())}var yz={initiatorTypes:[`audio`,`beacon`,`body`,`css`,`early-hint`,`embed`,`fetch`,`frame`,`iframe`,`icon`,`image`,`img`,`input`,`link`,`navigation`,`object`,`ping`,`script`,`track`,`video`,`xmlhttprequest`],ignoreRequestFn:function(){return!1},recordHeaders:{request:[],response:[]},recordBodyUrls:{request:[],response:[]},recordInitialRequests:!1};function bz(e){return e.entryType===`navigation`}function xz(e){return e.entryType===`resource`}function Sz(e,t){for(var n=e.length-1;n>=0;--n)if(t(e[n]))return e[n]}function Cz(e,t,n){if(!(t in e)||typeof e[t]!=`function`)return function(){};var r=e[t];return e[t]=n(r),function(){e[t]=r}}var wz=1048576;function Tz(e){return!e||typeof e!=`string`?e:e.length>wz?(_z.error(`Body truncated from `+e.length+` to `+wz+` characters`),e.substring(0,wz)+`... [truncated]`):e}function Ez(e,t,n){if(!t.PerformanceObserver)return _z.error(`PerformanceObserver not supported`),function(){};n.recordInitialRequests&&e({requests:t.performance.getEntries().filter(function(e){return bz(e)||xz(e)&&n.initiatorTypes.includes(e.initiatorType)}).map(function(e){return{url:e.name,initiatorType:e.initiatorType,status:`responseStatus`in e?e.responseStatus:void 0,startTime:Math.round(e.startTime),endTime:Math.round(e.responseEnd),timeOrigin:vz(t)}}),isInitial:!0});var r=new t.PerformanceObserver(function(r){e({requests:r.getEntries().filter(function(e){return xz(e)&&n.initiatorTypes.includes(e.initiatorType)&&e.initiatorType!==`xmlhttprequest`&&e.initiatorType!==`fetch`}).map(function(e){return{url:e.name,initiatorType:e.initiatorType,status:`responseStatus`in e?e.responseStatus:void 0,startTime:Math.round(e.startTime),endTime:Math.round(e.responseEnd),timeOrigin:vz(t)}})})});return r.observe({entryTypes:[`navigation`,`resource`]}),function(){r.disconnect()}}function Dz(e,t,n){return!t[e]||t[e].length===0?!1:t[e].includes(n.toLowerCase())}function Oz(e,t,n){return!t[e]||t[e].length===0?!1:jL(n,t[e])}function kz(e){if(e==null)return null;var t;if(typeof e==`string`)t=e;else if(e instanceof Document)t=e.textContent;else if(e instanceof FormData)t=J.HTTPBuildQuery(e);else if(J.isObject(e))try{t=JSON.stringify(e)}catch{return`Failed to stringify response object`}else return`Cannot read body of type `+typeof e;return Tz(t)}function Az(e){return new Promise(function(t){var n=setTimeout(function(){t(`Timeout while trying to read body`)},500);try{e.clone().text().then(function(e){clearTimeout(n),t(Tz(e))},function(e){clearTimeout(n),t(`Failed to read body: `+String(e))})}catch(e){clearTimeout(n),t(`Failed to read body: `+String(e))}})}function jz(e,t,n,r,i,a){if(a===void 0&&(a=0),a>10)return _z.error(`Cannot find performance entry`),Promise.resolve(null);var o=Sz(e.performance.getEntriesByName(n),function(e){return xz(e)&&e.initiatorType===t&&(!r||e.startTime>=r)&&(!i||e.startTime<=i)});return o?Promise.resolve(o):new Promise(function(e){setTimeout(e,50*a)}).then(function(){return jz(e,t,n,r,i,a+1)})}function Mz(e,t,n){if(!n.initiatorTypes.includes(`xmlhttprequest`))return function(){};var r=Cz(t.XMLHttpRequest.prototype,`open`,function(r){return function(i,a,o,s,c){o===void 0&&(o=!0);
vendor: 17,247 bytes, line 114
114var l=this,u=new Request(a,{method:i}),d={},f,p,m={},h=l.setRequestHeader.bind(l);l.setRequestHeader=function(e,t){return Dz(`request`,n.recordHeaders,e)&&(m[e]=t),h(e,t)},d.requestHeaders=m;var g=l.send.bind(l);l.send=function(e){return Oz(`request`,n.recordBodyUrls,u.url)&&(d.requestBody=kz(e)),f=t.performance.now(),g(e)},l.addEventListener(`readystatechange`,function(){if(l.readyState===l.DONE){p=t.performance.now();var r={},i=l.getAllResponseHeaders();i&&i.trim().split(/[\r\n]+/).forEach(function(e){if(e){var t=e.indexOf(`: `);if(t!==-1){var i=e.substring(0,t),a=e.substring(t+2);i&&Dz(`response`,n.recordHeaders,i)&&(r[i]=a)}}}),d.responseHeaders=r,Oz(`response`,n.recordBodyUrls,u.url)&&(d.responseBody=kz(l.response)),jz(t,`xmlhttprequest`,u.url,f,p).then(function(n){if(!n){_z.error(`Failed to get performance entry for XHR request to `+u.url);return}e({requests:[{url:n.name,method:u.method,initiatorType:n.initiatorType,status:l.status,startTime:Math.round(n.startTime),endTime:Math.round(n.responseEnd),timeOrigin:vz(t),requestHeaders:d.requestHeaders,requestBody:d.requestBody,responseHeaders:d.responseHeaders,responseBody:d.responseBody}]})}).catch(function(e){_z.error(`Error recording XHR request to `+u.url+`: `+String(e))})}}),r.call(l,i,a,o,s,c)}});return function(){r()}}function Nz(e,t,n){if(!n.initiatorTypes.includes(`fetch`))return function(){};var r=Cz(t,`fetch`,function(r){return function(){var i=new Request(arguments[0],arguments[1]),a,o={},s,c,l,u=Promise.resolve(void 0),d,f=new Promise(function(e){d=e});try{var p={};i.headers.forEach(function(e,t){Dz(`request`,n.recordHeaders,t)&&(p[t]=e)}),o.requestHeaders=p,Oz(`request`,n.recordBodyUrls,i.url)&&(u=Az(i).then(function(e){o.requestBody=e})),s=t.performance.now(),l=r.apply(t,arguments).then(function(e){a=e,c=t.performance.now();var r={};return a.headers.forEach(function(e,t){Dz(`response`,n.recordHeaders,t)&&(r[t]=e)}),o.responseHeaders=r,Oz(`response`,n.recordBodyUrls,i.url)?Az(a).then(function(e){o.responseBody=e,d()}):d(),a})}catch(e){l=Promise.reject(e)}return Promise.all([u,f,l]).then(function(){return jz(t,`fetch`,i.url,s,c)}).then(function(n){if(!n){_z.error(`Failed to get performance entry for fetch request to `+i.url);return}e({requests:[{url:n.name,method:i.method,initiatorType:n.initiatorType,status:a?a.status:void 0,startTime:Math.round(n.startTime),endTime:Math.round(n.responseEnd),timeOrigin:vz(t),requestHeaders:o.requestHeaders,requestBody:o.requestBody,responseHeaders:o.responseHeaders,responseBody:o.responseBody}]})}).catch(function(e){_z.error(`Error recording fetch request to `+i.url+`: `+String(e))}),l}});return function(){r()}}function Pz(e,t,n){if(!(`performance`in t))return function(){};var r=Object.assign({},yz.recordHeaders,n.recordHeaders||{}),i=Object.assign({},yz.recordBodyUrls,n.recordBodyUrls||{});n=Object.assign({},n,{recordHeaders:r,recordBodyUrls:i});var a=Object.assign({},yz,n),o=function(t){var n=t.requests.filter(function(e){return!jL(e.url,a.ignoreRequestUrls||[])&&!a.ignoreRequestFn(e)});(n.length>0||t.isInitial)&&e(Object.assign({},t,{requests:n}))},s=Ez(o,t,a),c=Mz(o,t,a),l=Nz(o,t,a);return function(){s(),c(),l()}}var Fz=`rrweb/[email protected]`,Iz=function(e){return{name:Fz,observer:Pz,options:e}},Lz=lL(`recorder`),Rz=G.CompressionStream,zz={batch_size:1e3,batch_flush_interval_ms:1e4,batch_request_timeout_ms:9e4,batch_autostart:!0},Bz=new Set([CA.MouseMove,CA.MouseInteraction,CA.Scroll,CA.ViewportResize,CA.Input,CA.TouchMove,CA.MediaInteraction,CA.Drag,CA.Selection]);function Vz(e){return e.type===SA.IncrementalSnapshot&&Bz.has(e.data.source)}var Hz=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||AL,this._onMaxLengthReached=e.onMaxLengthReached||AL,this._onBatchSent=e.onBatchSent||AL,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.lastEventTimestamp=e.lastEventTimestamp||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=VI,this.recordMinMs=0,this._recordMinMsCheckStart=null;var t=hL(e.sharedLockStorage||yL(),!0)&&!this.getConfig(`disable_persistence`);this.batcherKey=`__mprec_`+this.getConfig(`name`)+`_`+this.getConfig(`token`)+`_`+this.replayId,this.queueStorage=new FL(IL,LL,zL),this.batcher=new uR(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:zz,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:t,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:fR,sharedLockTimeoutMS:1e4})};Hz.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},t=this._mixpanel.get_property(`$device_id`);t&&(e.$device_id=t);var n=this._mixpanel.get_property(`$user_id`);return n&&(e.$user_id=n),e},Hz.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.queueStorage.init().catch(function(){this.reportError(`Error initializing IndexedDB storage for unloading persisted data.`)}.bind(this)).then(function(){return this.getDurationMs()<this._getRecordMinMs()?this.queueStorage.removeItem(this.batcherKey):this.batcher.flush().then(function(){return this.queueStorage.removeItem(this.batcherKey)}.bind(this))}.bind(this))},Hz.prototype.getConfig=function(e){return this._mixpanel.get_config(e)},Hz.prototype.get_config=function(e){return this.getConfig(e)},Hz.prototype.startRecording=function(e){if(this._rrwebRecord===null){this.reportError(`rrweb record function not provided. `);return}if(this._stopRecording!==null){Lz.log(`Recording already in progress, skipping startRecording.`);return}this.recordMaxMs=this.getConfig(`record_max_ms`),this.recordMaxMs>VI&&(this.recordMaxMs=VI,Lz.critical(`record_max_ms cannot be greater than `+VI+`ms. Capping value.`)),this.maxExpires||=new Date().getTime()+this.recordMaxMs,this.recordMinMs=this._getRecordMinMs(),this.replayStartTime||(this.replayStartTime=new Date().getTime(),this.batchStartUrl=J.info.currentUrl(),this.replayStartUrl=J.info.currentUrl()),e||this.recordMinMs>0?(this.batcher.stop(),this._recordMinMsCheckStart=null):this.batcher.start();var t=function(){clearTimeout(this.idleTimeoutId);var e=this.getConfig(`record_idle_timeout_ms`);this.idleTimeoutId=setTimeout(this._onIdleTimeout,e),this.idleExpires=new Date().getTime()+e}.bind(this);t();var n=this.getConfig(`record_block_selector`);(n===``||n===null)&&(n=void 0);var r=pz(this._mixpanel),i=[];if(this.getConfig(`record_network`)){var a=this.getConfig(`record_network_options`)||{},o=(a.ignoreRequestUrls||[]).slice();o.push(this._getApiRoute()),a.ignoreRequestUrls=o,i.push(Iz(a))}this.getConfig(`record_console`)&&i.push(SI({stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:50,depthOfLimit:2}}));var s=pR(this.getConfig(`record_allowed_iframe_origins`),Lz);try{this._stopRecording=this._rrwebRecord({emit:function(e){if(this.idleExpires&&this.idleExpires<e.timestamp){this._onIdleTimeout();return}this._recordMinMsCheckStart===null&&(this._recordMinMsCheckStart=e.timestamp),Vz(e)&&(this.batcher.stopped&&e.timestamp-this._recordMinMsCheckStart>=this.recordMinMs&&this.batcher.start(),t()),this.__enqueuePromise=this.batcher.enqueue(e),(this.lastEventTimestamp===null||e.timestamp>this.lastEventTimestamp)&&(this.lastEventTimestamp=e.timestamp)}.bind(this),blockClass:this.getConfig(`record_block_class`),blockSelector:n,collectFonts:this.getConfig(`record_collect_fonts`),dataURLOptions:{type:`image/webp`,quality:.6},maskAllInputs:!0,maskTextSelector:`*`,maskInputFn:this._getMaskFn(hz,r),maskTextFn:this._getMaskFn(gz,r),recordCrossOriginIframes:s.length>0,allowedIframeOrigins:s,recordCanvas:this.getConfig(`record_canvas`),sampling:{canvas:15},plugins:i})}catch(e){this.reportError(`Unexpected error when starting rrweb recording.`,e)}if(typeof this._stopRecording!=`function`){this.reportError(`rrweb failed to start, skipping this recording.`),this._stopRecording=null,this.stopRecording();return}var c=this.maxExpires-new Date().getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),c)},Hz.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(e){this.reportError(`Error with rrweb stopRecording`,e)}this._stopRecording=null}var t;return this.batcher.stopped?t=this.batcher.clear():e||(t=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),t},Hz.prototype.isRrwebStopped=function(){return this._stopRecording===null},Hz.prototype.flushEventsWithOptOut=function(e,t,n){var r=function(e){e===0&&(this.stopRecording(),n({error:`Tracking has been opted out, stopping recording.`}))}.bind(this);this._flushEvents(e,t,n,r)},Hz.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(t){this.reportError(`Error getting tab ID for serialization `,t),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,lastEventTimestamp:this.lastEventTimestamp,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}},Hz.deserialize=function(e,t){return new Hz(J.extend({},t,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,lastEventTimestamp:e.lastEventTimestamp,seqNo:e.seqNo,sharedLockStorage:t.sharedLockStorage}))},Hz.prototype._getApiRoute=function(){return this.getConfig(`api_routes`).record},Hz.prototype._sendRequest=function(e,t,n,r){var i=function(t,n){t.status===200&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=J.info.currentUrl()),this._onBatchSent(),r({status:0,httpStatusCode:t.status,responseBody:n,retryAfter:t.headers.get(`Retry-After`)})}.bind(this),a=this._mixpanel.get_api_host&&this._mixpanel.get_api_host(`record`)||this.getConfig(`api_host`);G.fetch(a+`/`+this._getApiRoute()+`?`+new URLSearchParams(t),{method:`POST`,headers:{Authorization:`Basic `+btoa(this.getConfig(`token`)+`:`),"Content-Type":`application/octet-stream`},body:n}).then(function(e){e.json().then(function(t){i(e,t)}).catch(function(e){r({error:e})})}).catch(function(e){r({error:e,httpStatusCode:0})})},Hz.prototype._flushEvents=GL(function(e,t,n){var r=e.length;if(r>0){for(var i=this.replayId,a=1/0,o=-1/0,s=!1,c=0;c<r;c++)a=Math.min(a,e[c].timestamp),o=Math.max(o,e[c].timestamp),e[c].type===SA.FullSnapshot&&(s=!0);if(this.seqNo===0){if(!s){n({error:`First batch does not contain a full snapshot. Aborting recording.`}),this.stopRecording(!0);return}this.replayStartTime=a}else this.replayStartTime||=(this.reportError(`Replay start time not set but seqNo is not 0. Using current batch start time as a fallback.`),a);var l=o-this.replayStartTime,u={$current_url:this.batchStartUrl,$lib_version:Ky.LIB_VERSION,batch_start_time:a/1e3,mp_lib:`web`,replay_id:i,replay_length_ms:l,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},d=JSON.stringify(e);if(Object.assign(u,this.getUserIdInfo()),PL(eL,XI.vendor,QI)){var f=new Blob([d],{type:`application/json`}).stream().pipeThrough(new Rz(`gzip`));new Response(f).blob().then(function(e){u.format=`gzip`,this._sendRequest(i,u,e,n)}.bind(this))}else u.format=`body`,this._sendRequest(i,u,d,n)}}),Hz.prototype.reportError=function(e,t){Lz.error.apply(Lz.error,arguments);try{!t&&!(e instanceof Error)&&(e=Error(e)),this.getConfig(`error_reporter`)(e,t)}catch(e){Lz.error(e)}},Hz.prototype.getDurationMs=function(){return this.replayStartTime===null?0:this.lastEventTimestamp===null?new Date().getTime()-this.replayStartTime:this.lastEventTimestamp-this.replayStartTime},Hz.prototype._getRecordMinMs=function(){var e=this.getConfig(`record_min_ms`);return e>HI?(Lz.critical(`record_min_ms cannot be greater than `+HI+`ms. Capping value.`),HI):e},Hz.prototype._getMaskFn=function(e,t){return function(n,r){if(!n.trim().length)return``;var i=!0;try{i=e(r,t)}catch(e){this.reportError(`Error checking if text should be masked, defaulting to masked`,e)}if(i){var a=Math.min(n.length,1e4);return`*`.repeat(a)}return n}.bind(this)};var Uz=function(e){this.idb=new FL(IL,RL,zL),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};Uz.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config(`disable_persistence`)},Uz.prototype.handleError=function(e){this.errorReporter(`IndexedDB error: `,e)},Uz.prototype.setActiveRecording=function(e){if(!this.isPersistenceEnabled())return BI.resolve();var t=e.tabId;return t?this.idb.init().then(function(){return this.idb.setItem(t,e)}.bind(this)).catch(this.handleError.bind(this)):(console.warn(`No tab ID is set, cannot persist recording metadata.`),BI.resolve())},Uz.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}.bind(this)).then(function(e){return dR(e)?null:e}.bind(this)).catch(this.handleError.bind(this)):BI.resolve(null)},Uz.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()},Uz.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then(function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}.bind(this)).catch(this.handleError.bind(this))},Uz.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):BI.resolve()},Uz.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getAll()}.bind(this)).then(function(e){var t=e.filter(function(e){return dR(e)}).map(function(e){return Hz.deserialize(e,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage}).unloadPersistedData().then(function(){return this.idb.removeItem(e.tabId)}.bind(this)).catch(this.handleError.bind(this))}.bind(this));return BI.all(t)}.bind(this)).catch(this.handleError.bind(this)):BI.resolve([])};var Wz=lL(`recorder`),Gz=function(e,t,n){this.mixpanelInstance=e,this.rrwebRecord=t||Gj,this.sharedLockStorage=n,this.recordingRegistry=new Uz({mixpanelInstance:this.mixpanelInstance,errorReporter:Wz.error,sharedLockStorage:n}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};Gz.prototype.startRecording=function(e){if(e||={},this.activeRecording&&!this.activeRecording.isRrwebStopped()){Wz.log(`Recording already in progress, skipping startRecording.`);return}var t=function(){Wz.log(`Idle timeout reached, restarting recording.`),this.resetRecording()}.bind(this),n=function(){Wz.log(`Max recording length reached, stopping recording.`),this.resetRecording()}.bind(this),r=function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}.bind(this),i={mixpanelInstance:this.mixpanelInstance,onBatchSent:r,onIdleTimeout:t,onMaxLengthReached:n,replayId:J.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return this.activeRecording=e.activeSerializedRecording?Hz.deserialize(e.activeSerializedRecording,i):new Hz(i),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())},Gz.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then(function(){return this.recordingRegistry.clearActiveRecording()}.bind(this)).then(function(){this.stopRecordingInProgress=!1}.bind(this))},Gz.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)},Gz.prototype._stopCurrentRecording=function(e,t){if(this.activeRecording){var n=this.activeRecording.stopRecording(e);return t&&(this.activeRecording=null),n}return BI.resolve()},Gz.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),BI.resolve(null)):this.recordingRegistry.getActiveRecording().then(function(t){return t&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:t}):e?this.startRecording({shouldStopBatcher:!1}):(Wz.log(`No resumable recording found.`),null)}.bind(this))},Gz.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})},Gz.prototype.isRecording=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()},Gz.prototype.getActiveReplayId=function(){return this.isRecording()?this.activeRecording.replayId:null},Object.defineProperty(Gz.prototype,"replayId",{get:function(){return this.getActiveReplayId()}}),G[Jy]=Gz;
114function Kz(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var qz={exports:{}},Jz=qz.exports,Yz;function Xz(){return Yz?qz.exports:(Yz=1,(function(e,t){(function(t,n){e.exports=n()})(Jz,function(){Array.isArray||(Array.isArray=function(e){return Object.prototype.toString.call(e)===`[object Array]`});function e(e){for(var t=[],n=0,r=e.length;n<r;n++)t.indexOf(e[n])===-1&&t.push(e[n]);return t}var t={},n={"==":function(e,t){return e==t},"===":function(e,t){return e===t},"!=":function(e,t){return e!=t},"!==":function(e,t){return e!==t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"<":function(e,t,n){return n===void 0?e<t:e<t&&t<n},"<=":function(e,t,n){return n===void 0?e<=t:e<=t&&t<=n},"!!":function(e){return t.truthy(e)},"!":function(e){return!t.truthy(e)},"%":function(e,t){return e%t},log:function(e){return console.log(e),e},in:function(e,t){return!t||t.indexOf===void 0?!1:t.indexOf(e)!==-1},cat:function(){return Array.prototype.join.call(arguments,``)},substr:function(e,t,n){if(n<0){var r=String(e).substr(t);return r.substr(0,r.length+n)}return String(e).substr(t,n)},"+":function(){return Array.prototype.reduce.call(arguments,function(e,t){return parseFloat(e,10)+parseFloat(t,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(e,t){return parseFloat(e,10)*parseFloat(t,10)})},"-":function(e,t){return t===void 0?-e:e-t},"/":function(e,t){return e/t},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(e,t){return e.concat(t)},[])},var:function(e,t){var n=t===void 0?null:t,r=this;if(e===void 0||e===``||e===null)return r;for(var i=String(e).split(`.`),a=0;a<i.length;a++)if(r==null||(r=r[i[a]],r===void 0))return n;return r},missing:function(){for(var e=[],n=Array.isArray(arguments[0])?arguments[0]:arguments,r=0;r<n.length;r++){var i=n[r],a=t.apply({var:i},this);(a===null||a===``)&&e.push(i)}return e},missing_some:function(e,n){var r=t.apply({missing:n},this);return n.length-r.length>=e?[]:r}};return t.is_logic=function(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).length===1},t.truthy=function(e){return Array.isArray(e)&&e.length===0?!1:!!e},t.get_operator=function(e){return Object.keys(e)[0]},t.get_values=function(e){return e[t.get_operator(e)]},t.apply=function(e,r){if(Array.isArray(e))return e.map(function(e){return t.apply(e,r)});if(!t.is_logic(e))return e;var i=t.get_operator(e),a=e[i],o,s,c,l,u;if(Array.isArray(a)||(a=[a]),i===`if`||i==`?:`){for(o=0;o<a.length-1;o+=2)if(t.truthy(t.apply(a[o],r)))return t.apply(a[o+1],r);return a.length===o+1?t.apply(a[o],r):null}if(i===`and`){for(o=0;o<a.length;o+=1)if(s=t.apply(a[o],r),!t.truthy(s))return s;return s}if(i===`or`){for(o=0;o<a.length;o+=1)if(s=t.apply(a[o],r),t.truthy(s))return s;return s}if(i===`filter`)return l=t.apply(a[0],r),c=a[1],Array.isArray(l)?l.filter(function(e){return t.truthy(t.apply(c,e))}):[];if(i===`map`)return l=t.apply(a[0],r),c=a[1],Array.isArray(l)?l.map(function(e){return t.apply(c,e)}):[];if(i===`reduce`)return l=t.apply(a[0],r),c=a[1],u=a[2]===void 0?null:t.apply(a[2],r),Array.isArray(l)?l.reduce(function(e,n){return t.apply(c,{current:n,accumulator:e})},u):u;if(i===`all`){if(l=t.apply(a[0],r),c=a[1],!Array.isArray(l)||!l.length)return!1;for(o=0;o<l.length;o+=1)if(!t.truthy(t.apply(c,l[o])))return!1;return!0}if(i===`none`){if(l=t.apply(a[0],r),c=a[1],!Array.isArray(l)||!l.length)return!0;for(o=0;o<l.length;o+=1)if(t.truthy(t.apply(c,l[o])))return!1;return!0}if(i===`some`){if(l=t.apply(a[0],r),c=a[1],!Array.isArray(l)||!l.length)return!1;for(o=0;o<l.length;o+=1)if(t.truthy(t.apply(c,l[o])))return!0;return!1}if(a=a.map(function(e){return t.apply(e,r)}),n.hasOwnProperty(i)&&typeof n[i]==`function`)return n[i].apply(r,a);if(i.indexOf(`.`)>0){var d=String(i).split(`.`),f=n;for(o=0;o<d.length;o++){if(!f.hasOwnProperty(d[o]))throw Error(`Unrecognized operation `+i+` (failed at `+d.slice(0,o+1).join(`.`)+`)`);f=f[d[o]]}return f.apply(r,a)}throw Error(`Unrecognized operation `+i)},t.uses_data=function(n){var r=[];if(t.is_logic(n)){var i=t.get_operator(n),a=n[i];
114Array.isArray(a)||(a=[a]),i===`var`?r.push(a[0]):a.forEach(function(e){r.push.apply(r,t.uses_data(e))})}return e(r)},t.add_operation=function(e,t){n[e]=t},t.rm_operation=function(e){delete n[e]},t.rule_like=function(e,n){if(n===e||n===`@`)return!0;if(n===`number`)return typeof e==`number`;if(n===`string`)return typeof e==`string`;if(n===`array`)return Array.isArray(e)&&!t.is_logic(e);if(t.is_logic(n)){if(t.is_logic(e)){var r=t.get_operator(n),i=t.get_operator(e);if(r===`@`||r===i)return t.rule_like(t.get_values(e,!1),t.get_values(n,!1))}return!1}if(Array.isArray(n)){if(Array.isArray(e)){if(n.length!==e.length)return!1;for(var a=0;a<n.length;a+=1)if(!t.rule_like(e[a],n[a]))return!1;return!0}return!1}return!1},t})})(qz),qz.exports)}var Zz=Kz(Xz()),Qz=function(e,t,n){if(e!==n.event_name)return{matches:!1};var r=n.property_filters,i=!0;if(r&&!J.isEmptyObject(r))try{i=Zz.apply(r,t||{})}catch(e){return{matches:!1,error:e.toString()}}return{matches:i}},$z={};$z.eventMatchesCriteria=Qz,G[qy]=Promise.resolve($z);var eB=30,tB=1e3,nB=4;function rB(){this.clicks=[]}rB.prototype.isRageClick=function(e,t){t||={};var n=t.threshold_px||eB,r=t.timeout_ms||tB,i=t.click_count||nB;if(t.interactive_elements_only){var a=cz(e);if(!a||oz(a))return!1}var o=Date.now(),s=e.pageX,c=e.pageY,l=this.clicks[this.clicks.length-1];if(l&&o-l.timestamp<r&&Math.sqrt((s-l.x)**2+(c-l.y)**2)<n){if(this.clicks.push({x:s,y:c,timestamp:o}),this.clicks.length>=i)return this.clicks=[],!0}else this.clicks=[{x:s,y:c,timestamp:o}];return!1};function iB(e,t){this.changeCallback=e||function(){},this.observerConfig=t,this.observedShadowRoots=null,this.shadowObservers=[]}iB.prototype.getEventTarget=function(e){if(this.observedShadowRoots)return cz(e)},iB.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var t=sz(e),n=0;n<t.length;n++){var r=t[n];r&&r.shadowRoot&&this.observeShadowRoot(r.shadowRoot)}},iB.prototype.observeShadowRoot=function(e){if(!(!this.observedShadowRoots||this.observedShadowRoots.has(e))){var t=this;try{this.observedShadowRoots.add(e);var n=new window.MutationObserver(function(){t.changeCallback()});n.observe(e,this.observerConfig),this.shadowObservers.push(n)}catch(e){LR.critical(`Error while observing shadow root`,e)}}},iB.prototype.start=function(){if(!this.observedShadowRoots){if(!ZR()){LR.critical(`Shadow DOM observation unavailable: WeakSet not supported`);return}this.observedShadowRoots=new WeakSet}},iB.prototype.stop=function(){if(this.observedShadowRoots){for(var e=0;e<this.shadowObservers.length;e++)try{this.shadowObservers[e].disconnect()}catch(e){LR.critical(`Error while disconnecting shadow DOM observer`,e)}this.shadowObservers=[],this.observedShadowRoots=null}};var aB=500,oB=[mR,_R,wR,CR,TR],sB=[xR],cB=[gR],lB={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:[`style`,`class`,`hidden`,`checked`,`selected`,`value`,`display`,`visibility`]};function uB(e){this.eventListeners=[],this.mutationObserver=null,this.shadowDOMObserver=null,this.isTracking=!1,this.lastChangeEventTimestamp=0,this.pendingClicks=[],this.onDeadClickCallback=e,this.processingActive=!1,this.processingTimeout=null}uB.prototype.addClick=function(e){var t=this.shadowDOMObserver&&this.shadowDOMObserver.getEventTarget(e);return t||=e.target||e.srcElement,!t||oz(t)?!1:(this.shadowDOMObserver&&this.shadowDOMObserver.observeFromEvent(e),this.pendingClicks.push({element:t,event:e,timestamp:Date.now()}),!0)},uB.prototype.trackClick=function(e,t){if(!this.isTracking)return!1;var n=this.addClick(e);return n&&this.triggerProcessing(t),n},uB.prototype.getDeadClicks=function(e){if(this.pendingClicks.length===0)return[];var t=e.timeout_ms,n=Date.now(),r=this.pendingClicks.slice();this.pendingClicks=[];for(var i=[],a=0;a<r.length;a++){var o=r[a];n-o.timestamp>=t?this.hasChangesAfter(o.timestamp)||i.push(o):this.pendingClicks.push(o)}return i},uB.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100},uB.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()},uB.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))},uB.prototype.processRecursively=function(e){if(!this.isTracking||!this.onDeadClickCallback){this.processingActive=!1;return}var t=e.timeout_ms,n=this;this.processingTimeout=setTimeout(function(){if(n.processingActive){for(var t=n.getDeadClicks(e),r=0;r<t.length;r++)n.onDeadClickCallback(t[r].event);n.pendingClicks.length>0?n.processRecursively(e):n.processingActive=!1}},t)},uB.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;
vendor: 4,165 bytes, line 114
114oB.forEach(function(t){var n=function(){e.recordChangeEvent()};document.addEventListener(t,n,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:t,handler:n,options:{capture:!0,passive:!0}})}),cB.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n),e.eventListeners.push({target:window,event:t,handler:n})}),sB.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n,{passive:!0}),e.eventListeners.push({target:window,event:t,handler:n,options:{passive:!0}})});var t=function(){e.recordChangeEvent()};if(document.addEventListener(`selectionchange`,t),e.eventListeners.push({target:document,event:`selectionchange`,handler:t}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,lB)}catch(e){LR.critical(`Error while setting up mutation observer`,e)}if(window.customElements)try{this.shadowDOMObserver=new iB(function(){e.recordChangeEvent()},lB),this.shadowDOMObserver.start()}catch(e){LR.critical(`Error while setting up shadow DOM observer`,e),this.shadowDOMObserver=null}}},uB.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&=(clearTimeout(this.processingTimeout),null);for(var e=0;e<this.eventListeners.length;e++){var t=this.eventListeners[e];try{t.target.removeEventListener(t.event,t.handler,t.options)}catch(e){LR.critical(`Error while removing event listener`,e)}}if(this.eventListeners=[],this.mutationObserver){try{this.mutationObserver.disconnect()}catch(e){LR.critical(`Error while disconnecting mutation observer`,e)}this.mutationObserver=null}if(this.shadowDOMObserver){try{this.shadowDOMObserver.stop()}catch(e){LR.critical(`Error while stopping shadow DOM observer`,e)}this.shadowDOMObserver=null}}};var dB=`autocapture`,fB=`track_pageview`,pB=`full-url`,mB=`url-with-path-and-query-string`,hB=`url-with-path`,gB=`allow_element_callback`,_B=`allow_selectors`,vB=`allow_url_regexes`,yB=`block_attrs`,bB=`block_element_callback`,xB=`block_selectors`,SB=`block_url_regexes`,CB=`capture_extra_attrs`,wB=`capture_text_content`,TB=`scroll_capture_all`,EB=`scroll_depth_percent_checkpoints`,DB=`click`,OB=`dead_click`,kB=`input`,AB=`pageview`,jB=`rage_click`,MB=`scroll`,NB=`page_leave`,PB=`submit`,FB={};FB[_B]=[],FB[vB]=[],FB[yB]=[],FB[bB]=null,FB[xB]=[],FB[SB]=[],FB[CB]=[],FB[wB]=!1,FB[TB]=!1,FB[EB]=[25,50,75,100],FB[DB]=!0,FB[OB]=!0,FB[kB]=!0,FB[AB]=pB,FB[jB]=!0,FB[MB]=!0,FB[NB]=!1,FB[PB]=!0;var IB={$mp_autocapture:!0},LB=`$mp_click`,RB=`$mp_dead_click`,zB=`$mp_input_change`,BB=`$mp_rage_click`,VB=`$mp_scroll`,HB=`$mp_submit`,UB=`$mp_page_leave`,WB=function(e){this.mp=e,this.maxScrollViewDepth=0,this.hasTrackedScrollSession=!1,this.previousScrollHeight=0};WB.prototype.init=function(){if(!XR()){LR.critical(`Autocapture unavailable: missing required DOM APIs`);return}this.initPageListeners(),this.initPageviewTracking(),this.initClickTracking(),this.initDeadClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking(),this.initPageLeaveTracking()},WB.prototype.getFullConfig=function(){var e=this.mp.get_config(dB);return e?J.isObject(e)?J.extend({},FB,e):FB:{}},WB.prototype.getConfig=function(e){return this.getFullConfig()[e]},WB.prototype.currentUrlBlocked=function(){var e=J.info.currentUrl(),t=this.getConfig(vB)||[];if(t.length)try{return!jL(e,t)}catch(e){return LR.critical(`Error while checking block URL regexes: `,e),!0}var n=this.getConfig(SB)||[];if(!n||!n.length)return!1;try{return jL(e,n)}catch(e){return LR.critical(`Error while checking block URL regexes: `,e),!0}},WB.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(dB)?this.getConfig(AB):this.mp.get_config(fB)},WB.prototype.trackDomEvent=function(e,t){if(!this.currentUrlBlocked()){var n=this.mp.is_recording_heatmap_data()&&(t===LB&&!this.getConfig(DB)||t===BB&&!this._getClickTrackingConfig(jB)||t===RB&&!this._getClickTrackingConfig(OB)),r
114=HR(e,{allowElementCallback:this.getConfig(gB),allowSelectors:this.getConfig(_B),blockAttrs:this.getConfig(yB),blockElementCallback:this.getConfig(bB),blockSelectors:this.getConfig(xB),captureExtraAttrs:this.getConfig(CB),captureTextContent:this.getConfig(wB),capturedForHeatMap:n});r&&(J.extend(r,IB),this.mp.track(t,r))}},WB.prototype.initPageListeners=function(){if(G.removeEventListener(bR,this.listenerPopstate),G.removeEventListener(gR,this.listenerHashchange),!(!this.pageviewTrackingConfig()&&!this.getConfig(NB)&&!this.mp.get_config(`record_heatmap_data`))){this.listenerPopstate=function(){G.dispatchEvent(new Event(yR))},this.listenerHashchange=function(){G.dispatchEvent(new Event(yR))},G.addEventListener(bR,this.listenerPopstate),G.addEventListener(gR,this.listenerHashchange);var e=G.history.pushState;typeof e==`function`&&(G.history.pushState=function(t,n,r){e.call(G.history,t,n,r),G.dispatchEvent(new Event(yR))});var t=G.history.replaceState;typeof t==`function`&&(G.history.replaceState=function(e,n,r){t.call(G.history,e,n,r),G.dispatchEvent(new Event(yR))})}},WB.prototype._getClickTrackingConfig=function(e){var t=this.getConfig(e);return t?t===!0?{}:typeof t==`object`?t:{}:null},WB.prototype._trackPageLeave=function(e,t,n){if(!this.hasTrackedScrollSession&&!(!this.getConfig(NB)&&!this.mp.is_recording_heatmap_data())){this.hasTrackedScrollSession=!0;var r=Math.max(ZI.documentElement.clientHeight,G.innerHeight||0),i=Math.round(Math.max(this.maxScrollViewDepth-r,0)/(n-r)*100),a=Math.round(r/n*100);n<=r&&(i=100,a=100);var o=J.extend({$max_scroll_view_depth:this.maxScrollViewDepth,$max_scroll_percentage:i,$fold_line_percentage:a,$scroll_height:n,$event_type:e.type,$current_url:t||J.info.currentUrl(),$viewportHeight:r,$viewportWidth:Math.max(ZI.documentElement.clientWidth,G.innerWidth||0),$captured_for_heatmap:this.mp.is_recording_heatmap_data()},IB);this.mp.track(UB,o,{transport:`sendBeacon`})}},WB.prototype._initScrollDepthTracking=function(){if(G.removeEventListener(SR,this.listenerScrollDepth),G.removeEventListener(xR,this.listenerScrollDepth),this.mp.get_config(`record_heatmap_data`)){LR.log(`Initializing scroll depth tracking`),this.maxScrollViewDepth=Math.max(ZI.documentElement.clientHeight,G.innerHeight||0);var e=nz(function(){if(!this.currentUrlBlocked()){var e=Math.max(ZI.documentElement.clientHeight,G.innerHeight||0)+G.scrollY;e>this.maxScrollViewDepth&&(this.maxScrollViewDepth=e),this.previousScrollHeight=ZI.body.scrollHeight}}.bind(this));this.listenerScrollDepth=e.listener,G.addEventListener(e.eventType,this.listenerScrollDepth)}},WB.prototype.initClickTracking=function(){G.removeEventListener(hR,this.listenerClick,!0),!(!this.getConfig(DB)&&!this.mp.get_config(`record_heatmap_data`))&&(LR.log(`Initializing click tracking`),this.listenerClick=function(e){!this.getConfig(DB)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(e,LB)}.bind(this),G.addEventListener(hR,this.listenerClick,!0))},WB.prototype.initDeadClickTracking=function(){if(!this._getClickTrackingConfig(OB)&&!this.mp.get_config(`record_heatmap_data`)){this.stopDeadClickTracking();return}LR.log(`Initializing dead click tracking`),this._deadClickTracker||(this._deadClickTracker=new uB(function(e){this.trackDomEvent(e,RB)}.bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=function(e){var t=this._getClickTrackingConfig(OB);if(!(!t&&!this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var n=t||{};n.timeout_ms||=aB,this._deadClickTracker.trackClick(e,n)}}.bind(this),G.addEventListener(hR,this.listenerDeadClick,!0))},WB.prototype.initInputTracking=function(){G.removeEventListener(mR,this.listenerChange,!0),this.getConfig(kB)&&(LR.log(`Initializing input tracking`),this.listenerChange=function(e){this.getConfig(kB)&&this.trackDomEvent(e,zB)}.bind(this),G.addEventListener(mR,this.listenerChange,!0))},WB.prototype.initPageviewTracking=function(){if(G.removeEventListener(yR,this.listenerLocationchange),!(!this.pageviewTrackingConfig()&&!this.mp.get_config(`record_heatmap_data`))){LR.log(`Initializing pageview tracking`);var e=``,t=!1;(this.pageviewTrackingConfig()||this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()&&(t=this.mp.track_pageview(IB)),t&&(e=J.info.currentUrl()),this.listenerLocationchange=uL(function(){if(!this.currentUrlBlocked()){var t=J.info.currentUrl(),n=!1,r=t.split(`#`)[0].split(`?`)[0]!==e.split(`#`)[0].split(`?`)[0],i=this.pageviewTrackingConfig();!i&&this.mp.is_recording_heatmap_data()&&(i=pB),i===pB?n=t!==e:i===mB?n=t.split(`#`)[0]!==e.split(`#`)[0]:i===hB&&(n=r),n&&(this.mp.track_pageview(IB)&&(e=t),r&&(this.lastScrollCheckpoint=0,LR.log(`Path change: re-initializing scroll depth checkpoints`)))}}.bind(this)),G.addEventListener(yR,this.listenerLocationchange)}},WB.prototype.initRageClickTracking=function(){G.removeEventListener(hR,this.listenerRageClick,!0),!(!this._getClickTrackingConfig(jB)&&!this.mp.get_config(`record_heatmap_data`))&&(LR.log(`Initializing rage click tracking`),this._rageClickTracker||=new rB,this.listenerRageClick=function(e){var t=this._getClickTrackingConfig(jB);!t&&!this.mp.is_recording_heatmap_data()||this.currentUrlBlocked()||this._rageClickTracker.isRageClick(e,t)&&this.trackDomEvent(e,BB)}.bind(this),G.addEventListener(hR,this.listenerRageClick,!0))},WB.prototype.initScrollTracking=function(){if(G.removeEventListener(xR,this.listenerScroll),G.removeEventListener(SR,this.listenerScroll),this.getConfig(MB)){LR.log(`Initializing scroll tracking`),this.lastScrollCheckpoint=0;var e=nz(function(){if(this.getConfig(MB)&&!this.currentUrlBlocked()){var e=this.getConfig(TB),t=(this.getConfig(EB)||[]).slice().sort(function(e,t){return e-t}
vendor: 37,940 bytes, line 114
114),n=G.scrollY,r=J.extend({$scroll_top:n},IB);try{var i=ZI.body.scrollHeight,a=Math.round(n/(i-G.innerHeight)*100);if(r.$scroll_height=i,r.$scroll_percentage=a,a>this.lastScrollCheckpoint)for(var o=0;o<t.length;o++){var s=t[o];a>=s&&this.lastScrollCheckpoint<s&&(r.$scroll_checkpoint=s,this.lastScrollCheckpoint=s,e=!0)}}catch(e){LR.critical(`Error while calculating scroll percentage`,e)}e&&this.mp.track(VB,r)}}.bind(this));this.listenerScroll=e.listener,G.addEventListener(e.eventType,this.listenerScroll)}},WB.prototype.initSubmitTracking=function(){G.removeEventListener(wR,this.listenerSubmit,!0),this.getConfig(PB)&&(LR.log(`Initializing submit tracking`),this.listenerSubmit=function(e){this.getConfig(PB)&&this.trackDomEvent(e,HB)}.bind(this),G.addEventListener(wR,this.listenerSubmit,!0))},WB.prototype.initPageLeaveTracking=function(){if(ZI.removeEventListener(ER,this.listenerPageLeaveVisibilitychange),G.removeEventListener(yR,this.listenerPageLeaveLocationchange),G.removeEventListener(vR,this.listenerPageLoad),!(!this.getConfig(NB)&&!this.mp.get_config(`record_heatmap_data`))){LR.log(`Initializing page visibility tracking.`),this._initScrollDepthTracking();var e=J.info.currentUrl();this.listenerPageLoad=function(){this.previousScrollHeight=ZI.body.scrollHeight}.bind(this),G.addEventListener(vR,this.listenerPageLoad),this.listenerPageLeaveLocationchange=uL(function(t){if(!this.currentUrlBlocked()){var n=J.info.currentUrl();n!==e&&(this._trackPageLeave(t,e,this.previousScrollHeight),e=n,this.maxScrollViewDepth=Math.max(ZI.documentElement.clientHeight,G.innerHeight||0),this.previousScrollHeight=ZI.body.scrollHeight,this.hasTrackedScrollSession=!1)}}.bind(this)),G.addEventListener(yR,this.listenerPageLeaveLocationchange),this.listenerPageLeaveVisibilitychange=function(t){ZI.hidden&&this._trackPageLeave(t,e,this.previousScrollHeight)}.bind(this),ZI.addEventListener(ER,this.listenerPageLeaveVisibilitychange)}},WB.prototype.stopDeadClickTracking=function(){this.listenerDeadClick&&=(G.removeEventListener(hR,this.listenerDeadClick,!0),null),this._deadClickTracker&&=(this._deadClickTracker.stopTracking(),null)},dL(WB);var GB=function(e,t){return G[qy]&&typeof G[qy].then==`function`||(G[qy]=new Promise(function(n){e(t,n)}).then(function(){var e=G[qy];if(e&&typeof e.then==`function`)return e;throw Error(`targeting failed to load`)}).catch(function(e){throw delete G[qy],e})),G[qy]},KB=lL(`flags`),qB=`mixpanelFlagsDb`,JB=`mixpanelFlags`,YB={version:1,storeNames:[JB]},XB=`persisted_variants_for_`,ZB=864e5,QB=Object.freeze({NETWORK_ONLY:`networkOnly`,NETWORK_FIRST:`networkFirst`,PERSISTENCE_UNTIL_NETWORK_SUCCESS:`persistenceUntilNetworkSuccess`}),$B=[QB.NETWORK_ONLY,QB.NETWORK_FIRST,QB.PERSISTENCE_UNTIL_NETWORK_SUCCESS],eV=function(e,t,n){this.idb=new FL(qB,JB,YB),this.persistenceConfig=e,this.persistedVariantsKey=XB+t,this.isGloballyDisabled=n||function(){return!1}};eV.prototype.getPolicy=function(){return this.isGloballyDisabled()||!this._isConfigValid()?QB.NETWORK_ONLY:this.persistenceConfig.variantLookupPolicy},eV.prototype.getTtlMs=function(){return this._isConfigValid()?this.persistenceConfig.persistenceTtlMs??ZB:ZB},eV.prototype._isConfigValid=function(){var e=this.persistenceConfig;return e?$B.indexOf(e.variantLookupPolicy)===-1?(KB.error(`Invalid variantLookupPolicy:`,e.variantLookupPolicy),!1):e.persistenceTtlMs!==void 0&&e.persistenceTtlMs!==null&&e.persistenceTtlMs<=0?(KB.error(`If provided, persistenceTtlMs must be a positive number. Provided value:`,e.persistenceTtlMs),!1):!0:!1},eV.prototype.loadFlagsFromStorage=function(e){var t=J.bind(function(){return this.clear().then(function(){return null}).catch(function(){return null})},this);if(this.getPolicy()===QB.NETWORK_ONLY)return t();var n=this.getTtlMs();return this.idb.init().then(J.bind(function(){return this.idb.getItem(this.persistedVariantsKey)},this)).then(J.bind(function(r){if(!r)return KB.log(`No persisted variants found in IndexedDB`),null;if(n&&Date.now()-r.persistedAt>=n)return KB.log(`Persisted variants are expiring`),null;if(!e||r.distinctId!==e.distinct_id)return KB.log(`Persisted variants found, but for a different distinct_id so clearing.`),t();var i=new Map;return J.each(r.flagVariants,function(e,t){i.set(t,{key:e.variant_key,value:e.variant_value,experiment_id:e.experiment_id,is_experiment_active:e.is_experiment_active,is_qa_tester:e.is_qa_tester,variant_source:`persistence`,persisted_at_in_ms:r.persistedAt,ttl_in_ms:n})}),KB.log(`Loaded`,i.size,`variants from IndexedDB for distinct_id`,r.distinctId),{flags:i,pendingFirstTimeEvents:r.pendingFirstTimeEvents||{},persistedAtMs:r.persistedAt,ttlMs:n}},this)).catch(J.bind(function(e){return KB.error(`Failed to load persisted variants from IndexedDB, so clearing`,e),t()},this))},eV.prototype.save=function(e,t,n){if(this.getPolicy()===QB.NETWORK_ONLY)return Promise.resolve();var r={};t.forEach(function(e,t){r[t]={variant_key:e.key,variant_value:e.value,experiment_id:e.experiment_id,is_experiment_active:e.is_experiment_active,is_qa_tester:e.is_qa_tester}});var i={persistedAt:Date.now(),distinctId:e&&e.distinct_id,context:e,flagVariants:r,pendingFirstTimeEvents:n||{}};return this.idb.init().then(J.bind(function(){return this.idb.setItem(this.persistedVariantsKey,i)},this)).then(function(){KB.log(`Saved`,t.size,`variants to IndexedDB for distinct_id`,i.distinctId)}).catch(function(e){KB.error(`Failed to persist variants to IndexedDB:`,e)})},eV.prototype.clear=function(){return this.isGloballyDisabled()?Promise.resolve():this.idb.init().then(J.bind(function(){return this.idb.removeItem(this.persistedVariantsKey)},this)).then(function(){KB.log(`Cleared persisted variants from IndexedDB`)}).catch(function(e){KB.error(`Failed to clear persisted variants from IndexedDB:`,e)})};var tV=lL(`flags`),nV=`flags`,rV=`context`,iV=`persistence`,aV={};aV[rV]={};var oV=function(e,t){return e+`:`+t},sV=function(e){return e.split(`:`)[0]},cV=`FLAG_NOT_FOUND`,lV=`NOT_READY`,uV=`BACKEND_ERROR`,dV=function(e,t){var n={variant_source:`fallback`};return t&&(n.fallback_reason=t),J.isObject(e)?J.extend({},e,n):J.extend({value:e},n)},Y=function(e){this.fetch=G.fetch,this.getFullApiRoute=e.getFullApiRoute,this.getMpConfig=e.getConfigFunc,this.setMpConfig=e.setConfigFunc,this.getMpProperty=e.getPropertyFunc,this.track=e.trackingFunc,this.loadExtraBundle=e.loadExtraBundle||function(){},this.targetingSrc=e.targetingSrc||``};Y.prototype.init=function(){if(!this.minApisSupported()){tV.critical(`Feature Flags unavailable: missing minimum required APIs`);return}return this.flags=null,this.trackedFeatures=new Set,this.pendingFirstTimeEvents={},this.activatedFirstTimeEvents={},this._loadedPersistedAtMs=null,this._loadedTtlMs=null,this.persistence=new eV(this.getConfig(iV),this.getMpConfig(`token`),J.bind(function(){return this.getMpConfig(`disable_persistence`)},this)),this.persistenceLoadedPromise=this.persistence.loadFlagsFromStorage(this._buildContext()).then(J.bind(function(e){e&&(this.flags=e.flags,this.pendingFirstTimeEvents=e.pendingFirstTimeEvents,this._loadedPersistedAtMs=e.persistedAtMs,this._loadedTtlMs=e.ttlMs)},this)),this.persistenceLoadedPromise.then(J.bind(function(){return this.fetchFlags()},this)).catch(function(){tV.error(`Error initializing feature flags`)})},Y.prototype._buildContext=function(){return J.extend({distinct_id:this.getMpProperty(`distinct_id`),device_id:this.getMpProperty(`$device_id`)},this.getConfig(rV))},Y.prototype.reset=function(){return this.persistence?(this.flags=null,this.pendingFirstTimeEvents={},this.activatedFirstTimeEvents={},this.trackedFeatures=new Set,this.fetchPromise=null,this._fetchInProgressStartTime=null,this._loadedPersistedAtMs=null,this._loadedTtlMs=null,this.persistence.clear().then(J.bind(function(){return this.fetchFlags()},this)).catch(function(){tV.error(`Error during flags reset`)})):Promise.resolve()},Y.prototype.getFullConfig=function(){var e=this.getMpConfig(nV);return e?J.isObject(e)?J.extend({},aV,e):aV:{}},Y.prototype.getConfig=function(e){return this.getFullConfig()[e]},Y.prototype.isSystemEnabled=function(){return!!this.getMpConfig(nV)},Y.prototype.updateContext=function(e,t){if(!this.isSystemEnabled())return tV.critical(`Feature Flags not enabled, cannot update context`),Promise.resolve();var n=this.getMpConfig(nV);J.isObject(n)||(n={});var r=t&&t.replace?{}:this.getConfig(rV);n[rV]=J.extend({},r,e);var i={};return i[nV]=n,this.setMpConfig(i),this.fetchFlags().catch(function(){tV.error(`Error fetching flags during updateContext`)})},Y.prototype.areFlagsReady=function(){return this.isSystemEnabled()||tV.error(`Feature Flags not enabled`),!!this.flags},Y.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var e=this._buildContext(),t=e.distinct_id,n=TL();tV.log(`Fetching flags for distinct ID: `+t);var r=new URLSearchParams;r.set(`context`,JSON.stringify(e)),r.set(`token`,this.getMpConfig(`token`)),r.set(`mp_lib`,`web`),r.set(`$lib_version`,Ky.LIB_VERSION);var i=this.getFullApiRoute()+`?`+r.toString();return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=this.fetch.call(G,i,{method:`GET`,headers:{Authorization:`Basic `+btoa(this.getMpConfig(`token`)+`:`),traceparent:n}}).then(function(e){return this.markFetchComplete(),e.json()}.bind(this)).then(function(t){var r=t.flags;if(!r)throw Error(`No flags in API response`);var i=new Map,a={};J.each(r,function(e,t){var n=!1,r=t+`:`;if(J.each(this.activatedFirstTimeEvents,function(e,t){t.startsWith(r)&&(n=!0)}),n){var a=this.flags&&this.flags.get(t);a&&i.set(t,a)}else i.set(t,{key:e.variant_key,value:e.variant_value,experiment_id:e.experiment_id,is_experiment_active:e.is_experiment_active,is_qa_tester:e.is_qa_tester,variant_source:`network`})},this);var o=t.pending_first_time_events;o&&o.length>0&&J.each(o,function(e){var t=e.flag_key,n=oV(t,e.first_time_event_hash);this.activatedFirstTimeEvents[n]||(a[n]={flag_key:t,flag_id:e.flag_id,project_id:e.project_id,first_time_event_hash:e.first_time_event_hash,event_name:e.event_name,property_filters:e.property_filters,pending_variant:e.pending_variant})},this),this.activatedFirstTimeEvents&&J.each(this.activatedFirstTimeEvents,function(e,t){var n=sV(t);e&&!i.has(n)&&this.flags&&this.flags.has(n)&&i.set(n,this.flags.get(n))},this),this.flags=i,this.trackedFeatures=new Set,this.pendingFirstTimeEvents=a,this._loadedPersistedAtMs=null,this._loadedTtlMs=null,this._traceparent=n,this._loadTargetingIfNeeded(),this.persistence.save(e,this.flags,this.pendingFirstTimeEvents)}.bind(this)).catch(function(e){throw this._fetchInProgressStartTime&&this.markFetchComplete(),tV.error(e),e}.bind(this)),this.fetchPromise},Y.prototype.loadFlags=function(){return this.isSystemEnabled()?this.trackedFeatures?this._fetchInProgressStartTime?this.fetchPromise:this.fetchFlags():(tV.error(`loadFlags called before init`),Promise.resolve()):Promise.resolve()},Y.prototype.markFetchComplete=function(){if(!this._fetchInProgressStartTime){tV.error(`Fetch in progress started time not set, cannot mark fetch complete`);return}this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null},Y.prototype._loadTargetingIfNeeded=function(){var e=!1;J.each(this.pendingFirstTimeEvents,function(t){t.property_filters&&!J.isEmptyObject(t.property_filters)&&(e=!0)}),e&&this.getTargeting().then(function(){tV.log(`targeting loaded for property filter evaluation`)})},Y.prototype.getTargeting=function(){return GB(this.loadExtraBundle.bind(this),this.targetingSrc).catch(function(e){tV.error(`Failed to load targeting: `+e)}.bind(this))},Y.prototype.checkFirstTimeEvents=function(e,t){!this.pendingFirstTimeEvents||J.isEmptyObject(this.pendingFirstTimeEvents)||(G[qy]&&J.isFunction(G[qy].then)?G[qy].then(function(n){this._processFirstTimeEventCheck(e,t,n)}.bind(this)).catch(function(){this._processFirstTimeEventCheck(e,t,null)}.bind(this)):this._processFirstTimeEventCheck(e,t,null))},Y.prototype._processFirstTimeEventCheck=function(e,t,n){J.each(this.pendingFirstTimeEvents,function(r,i){if(!this.activatedFirstTimeEvents[i]){var a=r.flag_key,o;if(!n&&r.property_filters&&!J.isEmptyObject(r.property_filters)){tV.warn(`Skipping event check for "`+a+`" - property filters require targeting library`);return}if(!n)o={matches:e===r.event_name,error:null};else{var s={event_name:r.event_name,property_filters:r.property_filters};o=n.eventMatchesCriteria(e,t,s)}if(o.error){tV.error(`Error checking first-time event for flag "`+a+`": `+o.error);return}if(o.matches){tV.log(`First-time event matched for flag "`+a+`": `+e);var c={key:r.pending_variant.variant_key,value:r.pending_variant.variant_value,experiment_id:r.pending_variant.experiment_id,is_experiment_active:r.pending_variant.is_experiment_active};this.flags.set(a,c),this.trackedFeatures.delete(a),this.activatedFirstTimeEvents[i]=!0,this.recordFirstTimeEvent(r.flag_id,r.project_id,r.first_time_event_hash)}}},this)},Y.prototype.getFirstTimeEventApiRoute=function(e){return this.getFullApiRoute().replace(/\/$/,``)+`/`+e+`/first-time-events`},Y.prototype.recordFirstTimeEvent=function(e,t,n){var r=this.getMpProperty(`distinct_id`),i=TL(),a=new URLSearchParams;a.set(`mp_lib`,`web`),a.set(`$lib_version`,Ky.LIB_VERSION);var o=this.getFirstTimeEventApiRoute(e)+`?`+a.toString(),s={distinct_id:r,project_id:t,first_time_event_hash:n};tV.log(`Recording first-time event for flag: `+e),this.fetch.call(G,o,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Basic `+btoa(this.getMpConfig(`token`)+`:`),traceparent:i},body:JSON.stringify(s)}).catch(function(t){tV.error(`Failed to record first-time event for flag `+e+`: `+t)})},Y.prototype.getVariant=function(e,t){if(!this.persistenceLoadedPromise)return new Promise(function(e){tV.critical(`Feature Flags not initialized`),e(dV(t,lV))});var n=this.persistence.getPolicy();return this.persistenceLoadedPromise.then(J.bind(function(){if(n===QB.PERSISTENCE_UNTIL_NETWORK_SUCCESS)return this.areFlagsReady()&&!this._loadedPersistenceIsStale()?this.getVariantSync(e,t):this.fetchPromise?this.fetchPromise.then(J.bind(function(){return this.getVariantSync(e,t)},this)).catch(function(e){return tV.error(e),dV(t,uV)}):dV(t,lV);var r=J.bind(function(){return this.getVariantSync(e,t)},this);return this.fetchPromise?this.fetchPromise.then(r).catch(J.bind(function(e){return tV.error(e),this.areFlagsReady()?r():dV(t,uV)},this)):dV(t,lV)},this))},Y.prototype._loadedPersistenceIsStale=function(){return!this._loadedPersistedAtMs||!this._loadedTtlMs?!1:Date.now()-this._loadedPersistedAtMs>=this._loadedTtlMs},Y.prototype.getVariantSync=function(e,t){if(this._loadedPersistenceIsStale())return tV.log(`Loaded persisted variants are past TTL so returning fallback for "`+e+`"`),dV(t,lV);if(!this.areFlagsReady())return tV.log(`Flags not loaded yet`),dV(t,lV);var n=this.flags.get(e);return n?(this.trackFeatureCheck(e,n),n):(tV.log(`No flag found: "`+e+`"`),dV(t,cV))},Y.prototype.getAllVariants=function(){if(!this.persistenceLoadedPromise)return tV.critical(`Feature Flags not initialized`),Promise.resolve(new Map);var e=this.persistence.getPolicy();return this.persistenceLoadedPromise.then(J.bind(function(){if(e===QB.PERSISTENCE_UNTIL_NETWORK_SUCCESS)return this.areFlagsReady()&&!this._loadedPersistenceIsStale()?this.getAllVariantsSync():this.fetchPromise?this.fetchPromise.then(J.bind(function(){return this.getAllVariantsSync()},this)).catch(function(e){return tV.error(e),new Map}):new Map;var t=J.bind(this.getAllVariantsSync,this);return this.fetchPromise?this.fetchPromise.then(t).catch(t):new Map},this))},Y.prototype.getAllVariantsSync=function(){return this._loadedPersistenceIsStale()?(tV.log(`Loaded persisted variants are past TTL so returning empty Map`),new Map):this.flags||new Map},Y.prototype.getVariantValue=function(e,t){return this.getVariant(e,{value:t}).then(function(e){return e.value}).catch(function(e){return tV.error(e),t})},Y.prototype.getFeatureData=function(e,t){return tV.critical(`mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead.`),this.getVariantValue(e,t)},Y.prototype.getVariantValueSync=function(e,t){return this.getVariantSync(e,{value:t}).value},Y.prototype.isEnabled=function(e,t){return this.getVariantValue(e).then(function(){return this.isEnabledSync(e,t)}.bind(this)).catch(function(e){return tV.error(e),t})},Y.prototype.isEnabledSync=function(e,t){t||=!1;var n=this.getVariantValueSync(e,t);return n!==!0&&n!==!1&&(tV.error(`Feature flag "`+e+`" value: `+n+` is not a boolean; returning fallback value: `+t),n=t),n};function fV(e){return e!=null}Y.prototype.trackFeatureCheck=function(e,t){if(!this.trackedFeatures.has(e)){this.trackedFeatures.add(e);var n={"Experiment name":e,"Variant name":t.key,$experiment_type:`feature_flag`,"Variant fetch start time":fV(this._fetchStartTime)?new Date(this._fetchStartTime).toISOString():null,"Variant fetch complete time":fV(this._fetchCompleteTime)?new Date(this._fetchCompleteTime).toISOString():null,"Variant fetch latency (ms)":this._fetchLatency,"Variant fetch traceparent":this._traceparent};fV(t.experiment_id)&&(n.$experiment_id=t.experiment_id),fV(t.is_experiment_active)&&(n.$is_experiment_active=t.is_experiment_active),fV(t.is_qa_tester)&&(n.$is_qa_tester=t.is_qa_tester),fV(t.variant_source)&&(n.$variant_source=t.variant_source),fV(t.persisted_at_in_ms)&&(n.$persisted_at_in_ms=t.persisted_at_in_ms),fV(t.ttl_in_ms)&&(n.$ttl_in_ms=t.ttl_in_ms),this.track(`$experiment_started`,n)}},Y.prototype.whenReady=function(){return this.fetchPromise?this.fetchPromise:Promise.resolve()},Y.prototype.minApisSupported=function(){return!!this.fetch&&typeof Promise<`u`&&typeof Map<`u`&&typeof Set<`u`},dL(Y),Y.prototype.are_flags_ready=Y.prototype.areFlagsReady,Y.prototype.get_variant=Y.prototype.getVariant,Y.prototype.get_variant_sync=Y.prototype.getVariantSync,Y.prototype.get_all_variants=Y.prototype.getAllVariants,Y.prototype.get_all_variants_sync=Y.prototype.getAllVariantsSync,Y.prototype.get_variant_value=Y.prototype.getVariantValue,Y.prototype.get_variant_value_sync=Y.prototype.getVariantValueSync,Y.prototype.is_enabled=Y.prototype.isEnabled,Y.prototype.is_enabled_sync=Y.prototype.isEnabledSync,Y.prototype.load_flags=Y.prototype.loadFlags,Y.prototype.update_context=Y.prototype.updateContext,Y.prototype.when_ready=Y.prototype.whenReady,Y.prototype.get_feature_data=Y.prototype.getFeatureData,Y.prototype.getTargeting=Y.prototype.getTargeting;var pV=lL(`recorder`),mV=`mp_iframe_handshake_request`,hV=`mp_iframe_handshake_response`,gV=function(e){this.mixpanelInstance=e.mixpanelInstance,this.getMpConfig=e.getConfigFunc,this.getTabId=e.getTabIdFunc,this.reportError=e.reportErrorFunc,this.getDistinctId=e.getDistinctIdFunc,this.loadExtraBundle=e.loadExtraBundle,this.recorderSrc=e.recorderSrc,this.targetingSrc=e.targetingSrc,this.libBasePath=e.libBasePath,this._recorder=null,this._parentReplayId=null,this._parentFrameRetryInterval=null};gV.prototype.shouldLoadRecorder=function(){if(this.getMpConfig(`disable_persistence`))return sL.log(`Load recorder check skipped due to disable_persistence config`),BI.resolve(!1);var e=new FL(IL,RL,zL),t=this.getTabId();return e.init().then(function(){return e.getAll()}).then(function(e){for(var n=0;n<e.length;n++)if(dR(e[n])||e[n].tabId===t)return!0;return!1}).catch(J.bind(function(e){return this.reportError(`Error checking recording registry`,e),!1},this))},gV.prototype.checkAndStartSessionRecording=function(e,t){if(!G.MutationObserver)return sL.critical(`Browser does not support MutationObserver; skipping session recording`),BI.resolve();var n=J.bind(function(e){return new BI(J.bind(function(t){var n=uL(J.bind(function(){this._recorder=this._recorder||new G[Jy](this.mixpanelInstance),this._recorder.resumeRecording(e),t()},this));if(J.isUndefined(G[Jy])){var r=this.recorderSrc||this.libBasePath+Yy;this.loadExtraBundle(r,n)}else n()},this))},this),r=pR(this.getMpConfig(`record_allowed_iframe_origins`),pV);if(r.length>0&&(this._setupParentFrameListener(r),G.parent!==G))return this._setupChildFrameListener(r,n),this._sendParentFrameRequestWithRetry(r),BI.resolve();var i=J.isUndefined(t)?this.getMpConfig(`record_sessions_percent`):t,a=i>0&&Math.random()*100<=i;return e||a?n(!0):this.shouldLoadRecorder().then(J.bind(function(e){return e?n(!1):BI.resolve()},this))},gV.prototype.isRecording=function(){if(!this._recorder||!J.isFunction(this._recorder.isRecording))return!1;try{return this._recorder.isRecording()}catch(e){return this.reportError(`Error checking if recording is active`,e),!1}},gV.prototype.startRecordingOnEvent=function(e,t){var n=this.isRecording(),r=this.getMpConfig(`recording_event_triggers`);if(!n&&r){var i=r[e];if(i&&typeof i.percentage==`number`){var a=i.percentage,o=i.property_filters;if(o&&!J.isEmptyObject(o)){var s=this.targetingSrc||this.libBasePath+Xy;GB(this.loadExtraBundle,s).then(function(n){try{n.eventMatchesCriteria(e,t,{event_name:e,property_filters:o}).matches&&this.checkAndStartSessionRecording(!1,a)}catch(e){sL.critical(`Could not parse recording event trigger properties logic:`,e)}}.bind(this)).catch(function(e){sL.critical(`Failed to load targeting library:`,e)})}else this.checkAndStartSessionRecording(!1,a)}}},gV.prototype.stopSessionRecording=function(){return this._recorder?this._recorder.stopRecording():BI.resolve()},gV.prototype.pauseSessionRecording=function(){return this._recorder?this._recorder.pauseRecording():BI.resolve()},gV.prototype.resumeSessionRecording=function(){return this._recorder?this._recorder.resumeRecording():BI.resolve()},gV.prototype.isRecordingHeatmapData=function(){return this.getSessionReplayId()&&this.getMpConfig(`record_heatmap_data`)},gV.prototype.getSessionRecordingProperties=function(){var e={},t=this.getSessionReplayId();return t&&(e.$mp_replay_id=t),e},gV.prototype.getSessionReplayUrl=function(){var e=null,t=this.getSessionReplayId();return t&&(e=`https://mixpanel.com/projects/replay-redirect?`+J.HTTPBuildQuery({replay_id:t,distinct_id:this.getDistinctId(),token:this.getMpConfig(`token`)})),e},gV.prototype.getSessionReplayId=function(){if(this._parentReplayId)return this._parentReplayId;var e=null;return this._recorder&&(e=this._recorder.replayId),e||null},gV.prototype.getRecorder=function(){return this._recorder},gV.prototype._setupChildFrameListener=function(e,t){if(!this._childFrameMessageHandler){var n=this;this._childFrameMessageHandler=function(r){if(e.indexOf(r.origin)!==-1){var i=r.data;i&&i.type===hV&&i.token===n.getMpConfig(`token`)&&i.replayId&&(n._parentReplayId=i.replayId,i.distinctId&&n.mixpanelInstance.identify(i.distinctId),n._parentFrameRetryActive=!1,G.removeEventListener(`message`,n._childFrameMessageHandler),n._childFrameMessageHandler=null,t(!0))}},G.addEventListener(`message`,this._childFrameMessageHandler)}},gV.prototype._sendParentFrameRequest=function(e){var t={};t.type=mV,t.token=this.getMpConfig(`token`);for(var n=0;n<e.length;n++)try{G.parent.postMessage(t,e[n])}catch{}},gV.prototype._sendParentFrameRequestWithRetry=function(e){var t=this,n=10,r=0,i=50;this._parentFrameRetryActive=!0,this._sendParentFrameRequest(e);function a(){setTimeout(function(){!t._parentFrameRetryActive||t._parentReplayId||++r>=n||(t._sendParentFrameRequest(e),i*=2,a())},i)}a()},gV.prototype._setupParentFrameListener=function(e){if(!this._parentFrameMessageHandler){var t=this;this._parentFrameMessageHandler=function(n){if(e.indexOf(n.origin)!==-1){var r=n.data;if(r&&r.type===mV&&r.token===t.getMpConfig(`token`)){var i=t.getSessionReplayId();if(i){var a={};a.type=hV,a.token=t.getMpConfig(`token`),a.replayId=i,a.distinctId=t.getDistinctId(),n.source.postMessage(a,n.origin)}}}},G.addEventListener(`message`,this._parentFrameMessageHandler)}},dL(gV);var _V=function(){};_V.prototype.create_properties=function(){},_V.prototype.event_handler=function(){},_V.prototype.after_track_handler=function(){},_V.prototype.init=function(e){return this.mp=e,this},_V.prototype.track=function(e,t,n,r){var i=this,a=J.dom_query(e);if(a.length===0){sL.error(`The DOM query (`+e+`) returned 0 elements`);return}return J.each(a,function(e){J.register_event(e,this.override_event,function(e){var a={},o=i.create_properties(n,this),s=i.mp.get_config(`track_links_timeout`);i.event_handler(e,this,a),window.setTimeout(i.track_callback(r,o,a,!0),s),i.mp.track(t,o,i.track_callback(r,o,a))})},this),!0},_V.prototype.track_callback=function(e,t,n,r){r||=!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,!(e&&e(r,t)===!1)&&i.after_track_handler(t,n,r))}},_V.prototype.create_properties=function(e,t){return typeof e==`function`?e(t):J.extend({},e)};var vV=function(){this.override_event=`click`};J.inherit(vV,_V),vV.prototype.create_properties=function(e,t){var n=vV.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n},vV.prototype.event_handler=function(e,t,n){n.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target===`_blank`,n.href=t.href,n.new_tab||e.preventDefault()},vV.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var yV=function(){this.override_event=`submit`};J.inherit(yV,_V),yV.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()},yV.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var bV=`$set`,xV=`$set_once`,SV=`$unset`,CV=`$add`,wV=`$append`,TV=`$union`,EV=`$remove`,DV=`$delete`,OV={set_action:function(e,t){var n={},r={};return J.isObject(e)?J.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[bV]=r,n},unset_action:function(e){var t={},n=[];return J.isArray(e)||(e=[e]),J.each(e,function(e){this._is_reserved_property(e)||n.push(e)},this),t[SV]=n,t},set_once_action:function(e,t){var n={},r={};return J.isObject(e)?J.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[xV]=r,n},union_action:function(e,t){var n={},r={};return J.isObject(e)?J.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=J.isArray(e)?e:[e])},this):r[e]=J.isArray(t)?t:[t],n[TV]=r,n},append_action:function(e,t){var n={},r={};return J.isObject(e)?J.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[wV]=r,n},remove_action:function(e,t){var n={},r={};return J.isObject(e)?J.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[EV]=r,n},delete_action:function(){var e={};return e[DV]=``,e}},kV=function(){};J.extend(kV.prototype,OV),kV.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n},kV.prototype.set=qL(function(e,t,n){var r=this.set_action(e,t);return J.isObject(e)&&(n=t),this._send_request(r,n)}),kV.prototype.set_once=qL(function(e,t,n){var r=this.set_once_action(e,t);return J.isObject(e)&&(n=t),this._send_request(r,n)}),kV.prototype.unset=qL(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)}),kV.prototype.union=qL(function(e,t,n){J.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)}),kV.prototype.delete=qL(function(e){var t=this.delete_action();return this._send_request(t,e)}),kV.prototype.remove=qL(function(e,t,n){var r=this.remove_action(e,t);return this._send_request(r,n)}),kV.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config(`token`);var n=J.encodeDates(e);return this._mixpanel._track_or_batch({type:`groups`,data:n,endpoint:this._mixpanel.get_api_host(`groups`)+`/`+this._get_config(`api_routes`).groups,batcher:this._mixpanel.request_batchers.groups},t)},kV.prototype._is_reserved_property=function(e){return e===`$group_key`||e===`$group_id`},kV.prototype._get_config=function(e){return this._mixpanel.get_config(e)},kV.prototype.toString=function(){return this._mixpanel.toString()+`.group.`+this._group_key+`.`+this._group_id},kV.prototype.remove=kV.prototype.remove,kV.prototype.set=kV.prototype.set,kV.prototype.set_once=kV.prototype.set_once,kV.prototype.union=kV.prototype.union,kV.prototype.unset=kV.prototype.unset,kV.prototype.toString=kV.prototype.toString;var AV=function(){};J.extend(AV.prototype,OV),AV.prototype._init=function(e){this._mixpanel=e},AV.prototype.set=KL(function(e,t,n){var r=this.set_action(e,t);return J.isObject(e)&&(n=t),this._get_config(`save_referrer`)&&this._mixpanel.persistence.update_referrer_info(document.referrer),r[bV]=J.extend({},J.info.people_properties(),r[bV]),this._send_request(r,n)}),AV.prototype.set_once=KL(function(e,t,n){var r=this.set_once_action(e,t);return J.isObject(e)&&(n=t),this._send_request(r,n)}),AV.prototype.unset=KL(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)}),AV.prototype.increment=KL(function(e,t,n){var r={},i={};return J.isObject(e)?(J.each(e,function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e))){sL.error(`Invalid increment value passed to mixpanel.people.increment - must be a number`);return}i[t]=e}},this),n=t):(J.isUndefined(t)&&(t=1),i[e]=t),r[CV]=i,this._send_request(r,n)}),AV.prototype.append=KL(function(e,t,n){J.isObject(e)&&(n=t);var r=this.append_action(e,t);return this._send_request(r,n)}),AV.prototype.remove=KL(function(e,t,n){J.isObject(e)&&(n=t);var r=this.remove_action(e,t);return this._send_request(r,n)}),AV.prototype.union=KL(function(e,t,n){J.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)}),AV.prototype.track_charge=KL(function(){sL.error(`mixpanel.people.track_charge() is deprecated and no longer has any effect.`)}),AV.prototype.clear_charges=function(e){return this.set(`$transactions`,[],e)},AV.prototype.delete_user=function(){if(!this._identify_called()){sL.error(`mixpanel.people.delete_user() requires you to call identify() first`);return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)},AV.prototype.toString=function(){return this._mixpanel.toString()+`.people`},AV.prototype._send_request=function(e,t){e.$token=this._get_config(`token`),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property(`$device_id`),r=this._mixpanel.get_property(`$user_id`),i=this._mixpanel.get_property(`$had_persisted_distinct_id`);n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var a=J.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:`people`,data:a,endpoint:this._mixpanel.get_api_host(`people`)+`/`+this._get_config(`api_routes`).engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),J.isUndefined(t)||(this._get_config(`verbose`)?t({status:-1,error:null}):t(-1)),J.truncate(a,255))},AV.prototype._get_config=function(e){return this._mixpanel.get_config(e)},AV.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0},AV.prototype._enqueue=function(e){bV in e?this._mixpanel.persistence._add_to_people_queue(bV,e):xV in e?this._mixpanel.persistence._add_to_people_queue(xV,e):SV in e?this._mixpanel.persistence._add_to_people_queue(SV,e):CV in e?this._mixpanel.persistence._add_to_people_queue(CV,e):wV in e?this._mixpanel.persistence._add_to_people_queue(wV,e):EV in e?this._mixpanel.persistence._add_to_people_queue(EV,e):TV in e?this._mixpanel.persistence._add_to_people_queue(TV,e):sL.error(`Invalid call to _enqueue():`,e)},AV.prototype._flush_one_queue=function(e,t,n,r){var i=this,a=J.extend({},this._mixpanel.persistence.load_queue(e)),o=a;!J.isUndefined(a)&&J.isObject(a)&&!J.isEmptyObject(a)&&(i._mixpanel.persistence._pop_from_people_queue(e,a),i._mixpanel.persistence.save(),r&&(o=r(a)),t.call(i,o,function(t,r){t===0&&i._mixpanel.persistence._add_to_people_queue(e,a),J.isUndefined(n)||n(t,r)}))},AV.prototype._flush=function(e,t,n,r,i,a,o){var s=this;this._flush_one_queue(bV,this.set,e),this._flush_one_queue(xV,this.set_once,r),this._flush_one_queue(SV,this.unset,a,function(e){return J.keys(e)}),this._flush_one_queue(CV,this.increment,t),this._flush_one_queue(TV,this.union,i);var c=this._mixpanel.persistence.load_queue(wV);if(!J.isUndefined(c)&&J.isArray(c)&&c.length)for(var l,u=function(e,t){e===0&&s._mixpanel.persistence._add_to_people_queue(wV,l),J.isUndefined(n)||n(e,t)},d=c.length-1;d>=0;d--)c=this._mixpanel.persistence.load_queue(wV),l=c.pop(),s._mixpanel.persistence.save(),J.isEmptyObject(l)||s.append(l,u);var f=this._mixpanel.persistence.load_queue(EV);if(!J.isUndefined(f)&&J.isArray(f)&&f.length)for(var p,m=function(e,t){e===0&&s._mixpanel.persistence._add_to_people_queue(EV,p),J.isUndefined(o)||o(e,t)},h=f.length-1;h>=0;h--)f=this._mixpanel.persistence.load_queue(EV),p=f.pop(),s._mixpanel.persistence.save(),J.isEmptyObject(p)||s.remove(p,m)},AV.prototype._is_reserved_property=function(e){return e===`$distinct_id`||e===`$token`||e===`$device_id`||e===`$user_id`||e===`$had_persisted_distinct_id`},AV.prototype.set=AV.prototype.set,AV.prototype.set_once=AV.prototype.set_once,AV.prototype.unset=AV.prototype.unset,AV.prototype.increment=AV.prototype.increment,AV.prototype.append=AV.prototype.append,AV.prototype.remove=AV.prototype.remove,AV.prototype.union=AV.prototype.union,AV.prototype.track_charge=AV.prototype.track_charge,AV.prototype.clear_charges=AV.prototype.clear_charges,AV.prototype.delete_user=AV.prototype.delete_user,AV.prototype.toString=AV.prototype.toString;var jV=`__mps`,MV=`__mpso`,NV=`__mpus`,PV=`__mpa`,FV=`__mpap`,IV=`__mpr`,LV=`__mpu`,RV=`$people_distinct_id`,zV=`__alias`,BV=`__timers`,VV=[jV,MV,NV,PV,FV,IV,LV,RV,zV,BV],HV=function(e){this.props={},this.campaign_params_saved=!1,this.name=e.persistence_name?`mp_`+e.persistence_name:`mp_`+e.token+`_mixpanel`;var t=e.persistence;t!==`cookie`&&t!==`localStorage`&&(sL.critical(`Unknown persistence type `+t+`; falling back to cookie`),t=e.persistence=`cookie`),this.storage=t===`localStorage`&&J.localStorage.is_supported()?J.localStorage:J.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};HV.prototype.properties=function(){var e={};return this.load(),J.each(this.props,function(t,n){J.include(VV,n)||(e[n]=t)}),e},HV.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=J.extend({},e))}},HV.prototype.upgrade=function(){var e,t;this.storage===J.localStorage?(e=J.cookie.parse(this.name),J.cookie.remove(this.name),J.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===J.cookie&&(t=J.localStorage.parse(this.name),J.localStorage.remove(this.name),t&&this.register_once(t))},HV.prototype.save=function(){this.disabled||this.storage.set(this.name,ML(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},HV.prototype.load_prop=function(e){return this.load(),this.props[e]},HV.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},HV.prototype.clear=function(){this.remove(),this.props={}},HV.prototype.register_once=function(e,t,n){return J.isObject(e)?(t===void 0&&(t=`None`),this.expire_days=n===void 0?this.default_expiry:n,this.load(),J.each(e,function(e,n){(!this.props.hasOwnProperty(n)||this.props[n]===t)&&(this.props[n]=e)},this),this.save(),!0):!1},HV.prototype.register=function(e,t){return J.isObject(e)?(this.expire_days=t===void 0?this.default_expiry:t,this.load(),J.extend(this.props,e),this.save(),!0):!1},HV.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},HV.prototype.update_search_keyword=function(e){this.register(J.info.searchInfo(e))},HV.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||`$direct`,$initial_referring_domain:J.info.referringDomain(e)||`$direct`},``)},HV.prototype.get_referrer_info=function(){return J.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},HV.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},HV.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},HV.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},HV.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},HV.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},HV.prototype.get_cross_subdomain=function(){return this.cross_subdomain},HV.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},HV.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue(bV),a=this._get_or_create_queue(xV),o=this._get_or_create_queue(SV),s=this._get_or_create_queue(CV),c=this._get_or_create_queue(TV),l=this._get_or_create_queue(EV,[]),u=this._get_or_create_queue(wV,[]);n===jV?(J.extend(i,r),this._pop_from_people_queue(CV,r),this._pop_from_people_queue(TV,r),this._pop_from_people_queue(SV,r)):n===MV?(J.each(r,function(e,t){t in a||(a[t]=e)}),this._pop_from_people_queue(SV,r)):n===NV?J.each(r,function(e){J.each([i,a,s,c],function(t){e in t&&delete t[e]}),J.each(u,function(t){e in t&&delete t[e]}),o[e]=!0}):n===PV?(J.each(r,function(e,t){t in i?i[t]+=e:(t in s||(s[t]=0),s[t]+=e)},this),this._pop_from_people_queue(SV,r)):n===LV?(J.each(r,function(e,t){J.isArray(e)&&(t in c||(c[t]=[]),J.each(e,function(e){J.include(c[t],e)||c[t].push(e)}))}),this._pop_from_people_queue(SV,r)):n===IV?(l.push(r),this._pop_from_people_queue(wV,r)):n===FV&&(u.pu
114sh(r),this._pop_from_people_queue(SV,r)),sL.log(`MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):`),sL.log(t),this.save()},HV.prototype._pop_from_people_queue=function(e,t){var n=this.props[this._get_queue_key(e)];J.isUndefined(n)||J.each(t,function(t,r){e===wV||e===EV?J.each(n,function(e){e[r]===t&&delete e[r]}):delete n[r]},this)},HV.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},HV.prototype._get_queue_key=function(e){if(e===bV)return jV;if(e===xV)return MV;if(e===SV)return NV;if(e===CV)return PV;if(e===wV)return FV;if(e===EV)return IV;if(e===TV)return LV;sL.error(`Invalid queue:`,e)},HV.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=J.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},HV.prototype.set_event_timer=function(e,t){var n=this.load_prop(BV)||{};n[e]=t,this.props[BV]=n,this.save()},HV.prototype.remove_event_timer=function(e){var t=(this.load_prop(BV)||{})[e];return J.isUndefined(t)||(delete this.props[BV][e],this.save()),t};var UV,WV=function(e,t){throw Error(e+` not available in this build.`)},GV,KV=0,qV=1,JV=`mixpanel`,YV=`base64`,XV=`json`,ZV=`$device:`,QV=`strict`,$V=`fallback`,eH=`disabled`,tH=G.XMLHttpRequest&&`withCredentials`in new XMLHttpRequest,nH=!tH&&eL.indexOf(`MSIE`)===-1&&eL.indexOf(`Mozilla`)===-1,rH=null;XI.sendBeacon&&(rH=function(){return XI.sendBeacon.apply(XI,arguments)});var iH={track:`track/`,engage:`engage/`,groups:`groups/`,record:`record/`,flags:`flags/`,settings:`settings/`},aH={api_host:`https://api-js.mixpanel.com`,api_hosts:{},api_routes:iH,api_extra_query_params:{},api_method:`POST`,api_transport:`XHR`,api_payload_format:YV,app_host:`https://mixpanel.com`,autocapture:!1,cdn:`https://cdn.mxpnl.com`,cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:AL,flags:!1,persistence:`cookie`,persistence_name:``,cookie_domain:``,cookie_name:``,loaded:AL,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:`localStorage`,opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_allowed_iframe_origins:[],record_block_class:RegExp(`^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$`),record_block_selector:`img, video, audio`,record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,recording_event_triggers:{},record_idle_timeout_ms:18e5,record_mask_inputs:!0,record_max_ms:VI,record_min_ms:0,record_network:!1,record_network_options:{},record_sessions_percent:0,recorder_src:null,targeting_src:null,lib_base_path:`https://cdn.mxpnl.com/libs/`,remote_settings_mode:eH},oH=!1,X=function(){},sH=function(e,t,n){var r,i=n===JV?GV:GV[n];if(i&&UV===KV)r=i;else{if(i&&!J.isArray(i)){sL.error(`You have already initialized `+n);return}r=new X}if(r._cached_groups={},r._init(e,t,n),r.people=new AV,r.people._init(r),!r.get_config(`skip_first_touch_marketing`)){var a=J.info.campaignParams(null),o={},s=!1;J.each(a,function(e,t){o[`initial_`+t]=e,e&&(s=!0)}),s&&r.people.set_once(o)}Ky.DEBUG=Ky.DEBUG||r.get_config(`debug`);var c=UV===KV?`module`:`snippet`;return G.dispatchEvent(new G.CustomEvent(`$mp_sdk_to_extension_event`,{detail:{instance:r,source:c,token:e,name:n,info:J.info}})),!J.isUndefined(i)&&J.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};X.prototype.init=function(e,t,n){if(J.isUndefined(n)){this.report_error(`You must name your new library: init(token, config, name)`);return}if(n===JV){this.report_error(`You must initialize the main mixpanel object right after you include the Mixpanel js snippet`);return}var r=sH(e,t,n);return GV[n]=r,r._loaded(),r},X.prototype._init=function(e,t,n){t||={},this.__loaded=!0,this.config={};var r={};if(`api_payload_format`in t||(t.api_host||aH.api_host).match(/\.mixpanel\.com/)&&(r.a
vendor: 18,852 bytes, line 114
114pi_payload_format=XV),this.hooks={},this.set_config(J.extend({},aH,r,t,{name:n,token:e,callback_fn:(n===JV?n:JV+`.`+n)+`._jsc`})),this.recorderManager=new gV({mixpanelInstance:this,getConfigFunc:J.bind(this.get_config,this),setConfigFunc:J.bind(this.set_config,this),getTabIdFunc:J.bind(this.get_tab_id,this),reportErrorFunc:J.bind(this.report_error,this),getDistinctIdFunc:J.bind(this.get_distinct_id,this),recorderSrc:this.get_config(`recorder_src`),targetingSrc:this.get_config(`targeting_src`),libBasePath:this.get_config(`lib_base_path`),loadExtraBundle:WV}),this._jsc=AL,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this._remote_settings_strict_disabled=!1,this.request_batchers={},this._batch_requests=this.get_config(`batch_requests`),this._batch_requests){if(!J.localStorage.is_supported(!0)||!tH)this._batch_requests=!1,sL.log(`Turning off Mixpanel request-queueing; needs XHR and localStorage support`),J.each(this.get_batcher_configs(),function(e){sL.log(`Clearing batch queue `+e.queue_key),J.localStorage.remove(e.queue_key)});else if(this.init_batchers(),rH&&G.addEventListener){var i=J.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);G.addEventListener(`pagehide`,function(e){e.persisted&&i()}),G.addEventListener(`visibilitychange`,function(){ZI.visibilityState===`hidden`&&i()})}}this.persistence=this.cookie=new HV(this.config),this.unpersisted_superprops={},this._gdpr_init();var a=J.UUID();this.get_distinct_id()||this.register_once({distinct_id:ZV+a,$device_id:a},``),this.flags=new Y({getFullApiRoute:J.bind(function(){return this.get_api_host(`flags`)+`/`+this.get_config(`api_routes`).flags},this),getConfigFunc:J.bind(this.get_config,this),setConfigFunc:J.bind(this.set_config,this),getPropertyFunc:J.bind(this.get_property,this),trackingFunc:J.bind(this.track,this),loadExtraBundle:WV,targetingSrc:this.get_config(`targeting_src`)||this.get_config(`lib_base_path`)+Xy}),this.flags.init(),this.flags=this.flags,this._init_tab_id();var o=this.get_config(`remote_settings_mode`);this.__session_recording_init_promise=o===QV||o===$V?this._fetch_remote_settings(o).then(J.bind(function(){return this._check_and_start_session_recording()},this)):this._check_and_start_session_recording(),this.autocapture=new WB(this),this.autocapture.init()},X.prototype._init_tab_id=function(){if(this.get_config(`disable_persistence`))sL.log(`Tab ID initialization skipped due to disable_persistence config`);else if(J.sessionStorage.is_supported())try{var e=this.get_config(`name`)+`_`+this.get_config(`token`),t=`mp_tab_id_`+e,n=`mp_gen_new_tab_id_`+e;(J.sessionStorage.get(n)||!J.sessionStorage.get(t))&&J.sessionStorage.set(t,`$tab-`+J.UUID()),J.sessionStorage.set(n,`1`),this.tab_id=J.sessionStorage.get(t),G.addEventListener(`beforeunload`,function(){J.sessionStorage.remove(n)})}catch(e){this.report_error(`Error initializing tab id`,e)}else this.report_error(`Session storage is not supported, cannot keep track of unique tab ID.`)},X.prototype.get_tab_id=function(){return this.tab_id||null},X.prototype._check_and_start_session_recording=GL(function(e){return this.recorderManager.checkAndStartSessionRecording(e)}),X.prototype._start_recording_on_event=uL(function(e,t){this.__session_recording_init_promise&&this.__session_recording_init_promise.then(J.bind(function(){if(!this._remote_settings_strict_disabled)return this.recorderManager.startRecordingOnEvent(e,t)},this))}),X.prototype.start_session_recording=function(){return this._check_and_start_session_recording(!0)},X.prototype.stop_session_recording=function(){return this.recorderManager.stopSessionRecording()},X.prototype.pause_session_recording=function(){return this.recorderManager.pauseSessionRecording()},X.prototype.resume_session_recording=function(){return this.recorderManager.resumeSessionRecording()},X.prototype.is_recording_heatmap_data=function(){return this.recorderManager.isRecordingHeatmapData()},X.prototype.get_session_recording_properties=function(){return this.recorderManager.getSessionRecordingProperties()},X.prototype.get_session_replay_url=function(){return this.recorderManager.getSessionReplayUrl()},X.prototype.__get_recorder=function(){return this.recorderManager.getRecorder()},X.prototype.__get_recording_init_promise=function(){return this.__session_recording_init_promise},X.prototype._loaded=function(){if(this.get_config(`loaded`)(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config(`store_google`)&&this.get_config(`stop_utm_persistence`)){var e=J.info.campaignParams(null);J.each(e,function(e,t){this.unregister(t)}.bind(this))}},X.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(ZI.referrer),this.get_config(`store_google`)&&!this.get_config(`stop_utm_persistence`)&&this.register(J.info.campaignParams()),this.get_config(`save_referrer`)&&this.persistence.update_referrer_info(ZI.referrer)},X.prototype._dom_loaded=function(){J.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||J.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},X.prototype._track_dom=function(e,t){if(this.get_config(`img`))return this.report_error(`You can't use DOM tracking functions with img = true.`),!1;if(!oH)return this.__dom_loaded_queue.push([e,t]),!1;var n=new e().init(this);return n.track.apply(n,t)},X.prototype._prepare_callback=function(e,t){if(J.isUndefined(e))return null;if(tH)return function(n){e(n,t)};var n=this._jsc,r=``+Math.floor(Math.random()*1e8),i=this.get_config(`callback_fn`)+`[`+r+`]`;return n[r]=function(i){delete n[r],e(i,t)},i},X.prototype._send_request=function(e,t,n,r){var i=!0;if(nH)return this.__request_queue.push(arguments),i;var a={method:this.get_config(`api_method`),transport:this.get_config(`api_transport`),verbose:this.get_config(`verbose`)},o=null;!r&&(J.isFunction(n)||typeof n==`string`)&&(r=n,n=null),n=J.extend(a,n||{}),tH||(n.method=`GET`);var s=n.method===`POST`,c=rH&&s&&n.transport.toLowerCase()===`sendbeacon`,l=n.verbose;t.verbose&&(l=!0),this.get_config(`test`)&&(t.test=1),l&&(t.verbose=1),this.get_config(`img`)&&(t.img=1),tH||(r?t.callback=r:(l||this.get_config(`test`))&&(t.callback=`(function(){})`)),t.ip=+!!this.get_config(`ip`),t._=new Date().getTime().toString(),s&&(o=`data=`+encodeURIComponent(t.data),delete t.data),J.extend(t,this.get_config(`api_extra_query_params`)),e+=`?`+J.HTTPBuildQuery(t);var u=this;if(`img`in t){var d=ZI.createElement(`img`);d.src=e,ZI.body.appendChild(d)}else if(c){try{i=rH(e,o)}catch(e){u.report_error(e),i=!1}try{r&&r(+!!i)}catch(e){u.report_error(e)}}else if(tH)try{var f=new XMLHttpRequest;f.open(n.method,e,!0);var p=this.get_config(`xhr_headers`);if(s&&(p[`Content-Type`]=`application/x-www-form-urlencoded`),J.each(p,function(e,t){f.setRequestHeader(t,e)}),n.timeout_ms&&f.timeout!==void 0){f.timeout=n.timeout_ms;var m=new Date().getTime()}f.withCredentials=!0,f.onreadystatechange=function(){if(f.readyState===4){if(f.status===200){if(r){if(l){var e;try{e=J.JSONDecode(f.responseText)}catch(t){if(u.report_error(t),n.ignore_json_errors)e=f.responseText;else return}r(e)}else r(Number(f.responseText))}}else{var t=f.timeout&&!f.status&&new Date().getTime()-m>=f.timeout?`timeout`:`Bad HTTP status: `+f.status+` `+f.statusText;if(u.report_error(t),r){if(l){var i=f.responseHeaders||{};r({status:0,httpStatusCode:f.status,error:t,retryAfter:i[`Retry-After`]})}else r(0)}}}},f.send(o)}catch(e){u.report_error(e),i=!1}else{var h=ZI.createElement(`script`);h.type=`text/javascript`,h.async=!0,h.defer=!0,h.src=e;var g=ZI.getElementsByTagName(`script`)[0];g.parentNode.insertBefore(h,g)}return i},X.prototype._fetch_remote_settings=function(e){var t=this,n=function(){e===`strict`&&(t.set_config({record_sessions_percent:0}),t._remote_settings_strict_disabled=!0)};if(!G.AbortController)return sL.critical(`Remote settings unavailable: missing minimum required APIs`),n(),Promise.resolve();var r=this.get_api_host(`settings`)+`/`+this.get_config(`api_routes`).settings,i={$lib_version:Ky.LIB_VERSION,mp_lib:`web`,sdk_config:`1`},a=J.HTTPBuildQuery(i),o=r+`?`+a,s=new AbortController,c=setTimeout(function(){s.abort()},500),l={method:`GET`,headers:{Authorization:`Basic `+btoa(t.get_config(`token`)+`:`)},signal:s.signal};return G.fetch(o,l).then(function(e){if(clearTimeout(c),!e.ok){sL.critical(`Network response was not ok`),n();return}return e.json()}).then(function(e){if(e&&e.sdk_config&&e.sdk_config.config){var r=e.sdk_config.config,i={};J.each(r,function(e,t){aH.hasOwnProperty(t)&&(i[t]=e)}),J.isEmptyObject(i)?(sL.critical(`No valid config keys found in remote settings.`),n()):t.set_config(i)}else n()}).catch(function(e){clearTimeout(c),sL.critical(`Failed to fetch remote settings`,e),n()})},X.prototype._execute_array=function(e){var t,n=[],r=[],i=[];J.each(e,function(e){e&&(t=e[0],J.isArray(t)?i.push(e):typeof e==`function`?e.call(this):J.isArray(e)&&t===`alias`?n.push(e):J.isArray(e)&&t.indexOf(`track`)!==-1&&typeof this[t]==`function`?i.push(e):r.push(e))},this);var a=function(e,t){J.each(e,function(e){if(J.isArray(e[0])){var n=t;J.each(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};a(n,this),a(r,this),a(i,this)},X.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},X.prototype.get_batcher_configs=function(){var e=`__mpq_`+this.get_config(`token`);return this._batcher_configs=this._batcher_configs||{events:{type:`events`,api_name:`track`,queue_key:e+`_ev`},people:{type:`people`,api_name:`engage`,queue_key:e+`_pp`},groups:{type:`groups`,api_name:`groups`,queue_key:e+`_gr`}},this._batcher_configs},X.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=J.bind(function(e){return new uR(e.queue_key,{libConfig:this.config,errorReporter:this.get_config(`error_reporter`),sendRequestFunc:J.bind(function(t,n,r){var i=this.get_config(`api_routes`);this._send_request(this.get_api_host(e.api_name)+`/`+i[e.api_name],this._encode_data_for_request(t),n,this._prepare_callback(r,t))},this),beforeSendHook:J.bind(function(t){var n=this._run_hook(`before_send_`+e.type,t);return n?n[0]:null},this),stopAllBatchingFunc:J.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config(`batch_autostart`)&&this.start_batch_senders()},X.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,J.each(this.request_batchers,function(e){e.start()}))},X.prototype.stop_batch_senders=function(){this._batch_requests=!1,J.each(this.request_batchers,function(e){e.stop(),e.clear()})},X.prototype.push=function(e){this._execute_array([e])},X.prototype.enable=function(e){var t,n,r,i;if(e===void 0)this._flags.disable_all_events=!1;else{for(t={},n=[],r=0;r<e.length;r++)t[e[r]]=!0;for(i=0;i<this.__disabled_events.length;i++)t[this.__disabled_events[i]]||n.push(this.__disabled_events[i]);this.__disabled_events=n}},X.prototype.disable=function(e){e===void 0?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},X.prototype._encode_data_for_request=function(e){var t=ML(e);return this.get_config(`api_payload_format`)===YV&&(t=J.base64Encode(t)),{data:t}},X.prototype._track_or_batch=function(e,t){var n=J.truncate(e.data,255),r=e.endpoint,i=e.batcher,a=e.should_send_immediately,o=e.send_request_options||{};t||=AL;var s=!0,c=J.bind(function(){return o.skip_hooks||(n=this._run_hook(`before_send_`+e.type,n),n&&=n[0]),n?(sL.log(`MIXPANEL REQUEST:`),sL.log(n),this._send_request(r,this._encode_data_for_request(n),o,this._prepare_callback(t,n))):null},this);return this._batch_requests&&!a?i.enqueue(n).then(function(e){e?t(1,n):c()}):s=c(),s&&n},X.prototype.track=GL(function(e,t,n,r){var i;if(!(n&&n.skip_hooks)){if(i=this._run_hook(`before_track`,e,t),i===null)return;e=i[0],t=i[1]}!r&&typeof n==`function`&&(r=n,n=null),n||={};var a=n.transport;a&&(n.transport=a);var o=n.send_immediately;if(typeof r!=`function`&&(r=AL),J.isUndefined(e)){this.report_error(`No event name provided to mixpanel.track`);return}if(this._event_is_disabled(e)){r(0);return}t=J.extend({},t),t.token=this.get_config(`token`);var s=this.persistence.remove_event_timer(e);if(!J.isUndefined(s)){var c=new Date().getTime()-s;t.$duration=parseFloat((c/1e3).toFixed(3))}this._set_default_superprops();var l=this.get_config(`track_marketing`)?J.info.marketingParams():{};t=J.extend({},J.info.properties({mp_loader:this.get_config(`mp_loader`)}),l,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var u=this.get_config(`property_blacklist`);J.isArray(u)?J.each(u,function(e){delete t[e]}):this.report_error(`Invalid value for property_blacklist config: `+u),this._start_recording_on_event(e,t);var d={event:e,properties:t};return i=this._track_or_batch({type:`events`,data:d,endpoint:this.get_api_host(`events`)+`/`+this.get_config(`api_routes`).track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r),this.flags&&this.flags.checkFirstTimeEvents&&this.flags.checkFirstTimeEvents(e,t),i}),X.prototype.set_group=GL(function(e,t,n){J.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)}),X.prototype.add_group=GL(function(e,t,n){var r=this.get_property(e),i={};return r===void 0?(i[e]=[t],this.register(i)):r.indexOf(t)===-1&&(r.push(t),i[e]=r,this.register(i)),this.people.union(e,t,n)}),X.prototype.remove_group=GL(function(e,t,n){var r=this.get_property(e);if(r!==void 0){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),r.length===0&&this.unregister(e)}return this.people.remove(e,t,n)}),X.prototype.track_with_groups=GL(function(e,t,n,r){var i=J.extend({},t||{});return J.each(n,function(e,t){e!=null&&(i[t]=e)}),this.track(e,i,r)}),X.prototype._create_map_key=function(e,t){return e+`_`+JSON.stringify(t)},X.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},X.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return(r===void 0||r._group_key!==e||r._group_id!==t)&&(r=new kV,r._init(this,e,t),this._cached_groups[n]=r),r},X.prototype.track_pageview=GL(function(e,t){typeof e!=`object`&&(e={}),t||={};var n=t.event_name||`$mp_web_page_view`,r=J.extend(J.info.mpPageViewProperties(),J.info.campaignParams(),J.info.clickParams()),i=J.extend({},r,e);return this.is_recording_heatmap_data()&&(i.$captured_for_heatmap=!0),this.track(n,i)}),X.prototype.track_links=function(){return this._track_dom.call(this,vV,arguments)},X.prototype.track_forms=function(){return this._track_dom.call(this,yV,arguments)},X.prototype.time_event=function(e){if(J.isUndefined(e)){this.report_error(`No event name provided to mixpanel.time_event`);return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var cH={persistent:!0},lH=function(e){var t=J.isObject(e)?e:J.isUndefined(e)?{}:{days:e};return J.extend({},cH,t)};X.prototype.register=function(e,t){var n=this._run_hook(`before_register`,e,t);if(n!==null){e=n[0],t=n[1];var r=lH(t);r.persistent?this.persistence.register(e,r.days):J.extend(this.unpersisted_superprops,e)}},X.prototype.register_once=function(e,t,n){var r=this._run_hook(`before_register_once`,e,t,n);if(r!==null){e=r[0],t=r[1],n=r[2];var i=lH(n);i.persistent?this.persistence.register_once(e,t,i.days):(t===void 0&&(t=`None`),J.each(e,function(e,n){(!this.unpersisted_superprops.hasOwnProperty(n)||this.unpersisted_superprops[n]===t)&&(this.unpersisted_superprops[n]=e)},this))}},X.prototype.unregister=function(e,t){var n=this._run_hook(`before_unregister`,e,t);n!==null&&(e=n[0],t=n[1],t=lH(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e])},X.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},X.prototype.identify=function(e,t,n,r,i,a,o,s){var c=this._run_hook(`before_identify`,e);if(c===null)return-1;e=c[0];var l=this.get_distinct_id();if(e&&l!==e){if(typeof e==`string`&&e.indexOf(ZV)===0)return this.report_error(`distinct_id cannot have $device: prefix`),-1;this.register({$user_id:e})}if(!this.get_property(`$device_id`)){var u=l;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},``)}e!==l&&e!==this.get_property(zV)&&(this.unregister(zV),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,a,o,s),e!==l&&this.track(`$identify`,{distinct_id:e,$anon_distinct_id:l},{skip_hooks:!0}),e!==l&&this.flags.fetchFlags().catch(function(){sL.error(`[flags] Error fetching flags during identify`)})},X.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=J.UUID();this.register_once({distinct_id:ZV+e,$device_id:e},``),this._check_and_start_session_recording(),this.flags.reset()},X.prototype.get_distinct_id=function(){return this.get_property(`distinct_id`)},X.prototype.alias=function(e,t){if(e===this.get_property(RV))return this.report_error(`Attempting to create alias for existing People user - aborting.`),-2;var n=this;return J.isUndefined(t)&&(t=this.get_distinct_id()),e===t?(this.report_error(`alias matches current distinct_id - skipping api call.`),this.identify(e),-1):(this._register_single(zV,e),this.track(`$create_alias`,{alias:e,distinct_id:t},{skip_hooks:!0},function(){n.identify(e)}))},X.prototype.name_tag=function(e){this._register_single(`mp_name_tag`,e)},X.prototype.set_config=function(e){J.isObject(e)&&(J.extend(this.config,e),e.batch_size&&J.each(this.request_batchers,function(e){e.resetBatchSize()}),this.get_config(`persistence_name`)||(this.config.persistence_name=this.config.cookie_name),this.get_config(`disable_persistence`)||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Ky.DEBUG=Ky.DEBUG||this.get_config(`debug`),(`autocapture`in e||`record_heatmap_data`in e)&&this.autocapture&&this.autocapture.init(),J.isObject(e.hooks)&&(this.hooks={},J.each(e.hooks,function(e,t){if(J.isFunction(e))this.hooks[t]=[e];else if(J.isArray(e)){this.hooks[t]=[];for(var n=0;n<e.length;n++)J.isFunction(e[n])||sL.critical(`Invalid hook added. Hook is not a function`),this.hooks[t].push(e[n])}else sL.critical(`Invalid hooks added. Ensure that the hook values passed into config.hooks are functions or arrays of functions.`)},this)))},X.prototype.get_config=function(e){return this.config[e]}
114,X.prototype._run_hook=function(e){var t=KI.call(arguments,1);return J.each(this.hooks[e],function(n){if(t===null)return null;var r=n.apply(this,t);r===void 0?(this.report_error(e+` hook did not return a valid value`),t=null):(J.isArray(r)||(r=[r]),t.splice.apply(t,[0,r.length].concat(r)))},this),t},X.prototype.get_property=function(e){return this.persistence.load_prop([e])},X.prototype.get_api_host=function(e){return this.get_config(`api_hosts`)[e]||this.get_config(`api_host`)},X.prototype.toString=function(){var e=this.get_config(`name`);return e!==JV&&(e=JV+`.`+e),e},X.prototype._event_is_disabled=function(e){return J.isBlockedUA(eL)||this._flags.disable_all_events||J.include(this.__disabled_events,e)},X.prototype._gdpr_init=function(){this.get_config(`opt_out_tracking_persistence_type`)===`localStorage`&&J.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:`cookie`})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:`cookie`})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:`cookie`,enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config(`opt_out_tracking_by_default`)||J.cookie.get(`mp_optout`))&&(J.cookie.remove(`mp_optout`),this.opt_out_tracking({clear_persistence:this.get_config(`opt_out_persistence_by_default`)}))},X.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config(`disable_persistence`)&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},X.prototype._gdpr_call_func=function(e,t){return t=J.extend({track:J.bind(this.track,this),persistence_type:this.get_config(`opt_out_tracking_persistence_type`),cookie_prefix:this.get_config(`opt_out_tracking_cookie_prefix`),cookie_expiration:this.get_config(`cookie_expiration`),cross_site_cookie:this.get_config(`cross_site_cookie`),cross_subdomain_cookie:this.get_config(`cross_subdomain_cookie`),cookie_domain:this.get_config(`cookie_domain`),secure_cookie:this.get_config(`secure_cookie`),ignore_dnt:this.get_config(`ignore_dnt`)},t),J.localStorage.is_supported()||(t.persistence_type=`cookie`),e(this.get_config(`token`),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},X.prototype.opt_in_tracking=function(e){e=J.extend({enable_persistence:!0},e),this._gdpr_call_func(VL,e),this._gdpr_update_persistence(e)},X.prototype.opt_out_tracking=function(e){e=J.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(HL,e),this._gdpr_update_persistence(e)},X.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(UL,e)},X.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(WL,e)},X.prototype.clear_opt_in_out_tracking=function(e){e=J.extend({enable_persistence:!0},e),this._gdpr_call_func(JL,e),this._gdpr_update_persistence(e)},X.prototype.report_error=function(e,t){sL.error.apply(sL.error,arguments);try{!t&&!(e instanceof Error)&&(e=Error(e)),this.get_config(`error_reporter`)(e,t)}catch(e){sL.error(e)}},X.prototype.add_hook=function(e,t){this.hooks[e]||(this.hooks[e]=[]),this.hooks[e].push(t)},X.prototype.remove_hook=function(e,t){var n;this.hooks[e]&&(n=this.hooks[e].indexOf(t),n===-1?sL.log(`remove_hook failed. Matching hook was not found`):this.hooks[e].splice(n,1))},X.prototype.init=X.prototype.init,X.prototype.reset=X.prototype.reset,X.prototype.enable=X.prototype.enable,X.prototype.disable=X.prototype.disable,X.prototype.time_event=X.prototype.time_event,X.prototype.track=X.prototype.track,X.prototype.track_links=X.prototype.track_links,X.prototype.track_forms=X.prototype.track_forms,X.prototype.track_pageview=X.prototype.track_pageview,X.prototype.register=X.prototype.register,X.prototype.register_once=X.prototype.register_once,X.prototype.unregister=X.prototype.unregister,X.prototype.identify=X.prototype.identify,X.prototype.alias=X.prototype.alias,X.prototype.name_tag=X.prototype.name_tag,X.prototype.set_config=X.prototype.set_config,X.prototype.get_config=X.prototype.get_config,X.prototype.get_api_host=X.prototype.get_api_host,X.prototype.get_property=X.prototype.get_property,X.prototype.get_distinct_id=X.prototype.get_distinct_id,X.prototype.toString=X.prototype.toString,X.prototype.opt_out_tracking=X.prototype.opt_out_tracking,X.prototype.opt_in_tracking=X.prototype.opt_in_tracking,X.prototype.has_opted_out_tracking=X.prototype.has_opted_out_tracking,X.prototype.has_opted_in_tracking=X.prototype.has_opted_in_tracking,X.prototype.clear_opt_in_out_tracking=X.prototype.clear_opt_in_out_tracking,X.prototype.get_group=X.prototype.get_group,X.prototype.set_group=X.prototype.set_group,X.prototype.add_group=X.prototype.add_group,X.prototype.remove_group=X.prototype.remove_group,X.prototype.add_hook=X.prototype.add_hook,X.prototype.remove_hook=X.prototype.remove_hook,X.prototype.track_with_groups=X.prototype.track_with_groups,X.prototype.start_batch_senders=X.prototype.start_batch_senders,X.prototype.stop_batch_senders=X.prototype.stop_batch_senders,X.prototype.start_session_recording=X.prototype.start_session_recording,X.prototype.stop_session_recording=X.prototype.stop_session_recording,X.prototype.pause_session_recording=X.prototype.pause_session_recording,X.prototype.resume_session_recording=X.prototype.resume_session_recording,X.prototype.get_session_recording_properties=X.prototype.get_session_recording_properties,X.prototype.get_session_replay_url=X.prototype.get_session_replay_url,X.prototype.get_tab_id=X.prototype.get_tab_id,X.prototype.DEFAULT_API_ROUTES=iH,X.prototype.__get_recorder=X.prototype.__get_recorder,X.prototype.__get_recording_init_promise=X.prototype.__get_recording_init_promise,HV.prototype.properties=HV.prototype.properties,HV.prototype.update_search_keyword=HV.prototype.update_search_keyword,HV.prototype.update_referrer_info=HV.prototype.update_referrer_info,HV.prototype.get_cross_subdomain=HV.prototype.get_cross_subdomain,HV.prototype.clear=HV.prototype.clear;var uH={},dH=function(){J.each(uH,function(e,t){t!==JV&&(GV[t]=e)}),GV._=J},fH=function(){GV.init=function(e,t,n){if(n)return GV[n]||(GV[n]=uH[n]=sH(e,t,n),GV[n]._loaded()),GV[n];var r=GV;uH[JV]?r=uH[JV]:e&&(r=sH(e,t,JV),r._loaded(),uH[JV]=r),GV=r,UV===qV&&(G[JV]=GV),dH()}},pH=function(){function e(){e.done||(e.done=!0,oH=!0,nH=!1,J.each(uH,function(e){e._dom_loaded()}))}function t(){try{ZI.documentElement.doScroll(`left`)}catch{setTimeout(t,1);return}e()}if(ZI.addEventListener)ZI.readyState===`complete`?e():ZI.addEventListener(`DOMContentLoaded`,e,!1);else if(ZI.attachEvent){ZI.attachEvent(`onreadystatechange`,e);var n=!1;try{n=G.frameElement===null}catch{}ZI.documentElement.doScroll&&n&&t()}J.register_event(G,`load`,e,!0)};function mH(e){return WV=e,UV=KV,GV=new X,fH(),GV.init(),pH(),GV}function hH(e,t){t()}var gH=mH(hH),Z=_();function _H(e){let[t,n]=(0,W.useState)(!1);(0,W.useEffect)(()=>
114{if(t)return;let e=fn(`MIXPANEL_PROJECT_TOKEN`,`9d9990f2d4a50dd61a3b390fde83373a`);e&&(gH.init(e,{api_host:`https://api-eu.mixpanel.com`,persistence:`localStorage`}),n(!0))},[]);let r=(e,t)=>{a(`PageViewed`,{page_name:e,...t})},i=(e,t)=>{a(`FlowInteraction`,{domain:e,step:t})},a=(e,n={})=>{t&&gH.track(e,n)};return(0,Z.jsx)(lt.Provider,{value:{trackPage:r,trackFlow:i,trackEvent:a,identifyUser:e=>{t&&gH.identify(e)},forgetUser:()=>{t&&gH.reset()}},children:e.children})}function vH(){let e=ye(),t=e=>!Number.isNaN(Number.parseFloat(e))&&!Number.isNaN(e-0),n=(0,W.useMemo)(()=>{let n=[];return e.pathname.split(`/`).forEach(e=>{!t(e)&&e!==``&&n.push(Ht(e))}),n.length===0?rn()?`Piggy: Business Dashboard`:`Leat: Business Dashboard`:n.join(` | `)},[e.pathname]);return(0,Z.jsx)(`title`,{children:n})}var yH=(0,W.createContext)(()=>{});function bH({value:e,children:t}){return W.createElement(yH.Provider,{value:e},t)}function xH(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function SH(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function CH(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var wH=(e,t)=>Math.abs(e-t)<1.01,TH=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},EH,DH=()=>{if(EH!==void 0)return EH;if(typeof navigator>`u`)return EH=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return EH=!0;let e=navigator.maxTouchPoints;return EH=navigator.platform===`MacIntel`&&e!==void 0&&e>0},OH=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},kH=e=>e,AH=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},jH=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(OH(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(OH(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},MH={passive:!0},NH=typeof window>`u`||`onscrollend`in window,PH=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&NH,o=0,s=a?null:TH(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,MH),a&&r.addEventListener(`scrollend`,u,MH),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u)}},FH=(e,t)=>PH(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),IH=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},LH=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},RH=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>
vendor: 11,871 bytes, line 114
114{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:kH,rangeExtractor:AH,onChange:()=>{},measureElement:IH,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=Math.max(0,e.start+t);n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=SH(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!DH()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,MH),e.addEventListener(`touchend`,n,MH),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(DH()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=SH(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.getMeasurements=SH(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._flatMeasurements;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e,this._flatMeasurements=a}let o;if(u===0)o=t+n;else{let e=u-1;o=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t),n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=o,a[t*2+1]=i,o+=i+s}let c=xH(e,a,r);return this.measurementsCache=c,c}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=SH(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=VH(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=SH(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(e<0||e>=this.options.count)return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r<l,d=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?u:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},s,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++;let f=!1;a?f=this.applyScrollAdjustment(this.getTotalSize()-c):d&&(f=this.applyScrollAdjustment(s)),this.notify(f)}},this.getVirtualItems=SH(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return CH(t[zH(0,t.length-1,r?e=>n[e*2]:e=>CH
vendor: 3,798 bytes, line 114
114(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){return e===0?!1:
vendor: 3,739 bytes, line 114
114DH()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=e,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&wH(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},zH=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function BH(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function VH(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=BH(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=zH(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var HH=e(r(),1),UH=typeof document<`u`?W.useLayoutEffect:W.useEffect;function WH({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=W.useReducer(e=>e+1,0)[1],a=W.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},s=e=>{let t=a.current;if(!t.enabled||!t.container)return;o(e);let n=!!e.options.horizontal,r=t.mode===`transform`,i=n?`left`:`top`,s=e.options.scrollMargin,c=e.getVirtualItems();for(let a of c){let o=a.start-s,c=e.elementsCache.get(a.key);c&&t.lastPositions.get(c)!==o&&(t.lastPositions.set(c,o),r?c.style.transform=n?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:c.style[i]=`${o}px`)}},c={...r,onChange:(t,n)=>{var o;let c=a.current,l=!0;if(c.enabled){s(t);let e=t.range,n=c.prevRange;l=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,l&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}l&&(e&&n?(0,HH.flushSync)(i):i()),(o=r.onChange)==null||o.call(r,t,n)}},[l]=W.useState(()=>{let e=new RH(c);return Object.assign(e,{containerRef:t=>{let n=a.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return l.setOptions(c),UH(()=>
114l._didMount(),[]),UH(()=>(o(l),l._willUpdate())),UH(()=>{s(l)}),l}function GH(e){return WH({observeElementRect:jH,observeElementOffset:FH,scrollToFn:LH,...e})}function KH(e,t,n,r){let i=g(n);(0,W.useEffect)(()=>{e??=window;function n(e){i.current(e)}return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)},[e,t,r])}function qH(e){let t=(0,W.useRef)({value:``,selectionStart:null,selectionEnd:null});return KH(e,`blur`,e=>{let n=e.target;Jn(n)&&(t.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})}),T(()=>{if(!me(e)&&Jn(e)&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:n,selectionEnd:r}=t.current;n!==null&&r!==null&&e.setSelectionRange(n,r)}t.current={value:``,selectionStart:null,selectionEnd:null}}})}function JH(e,t){let n=(0,W.useRef)([]),r=T(e);(0,W.useEffect)(()=>{let e=[...n.current];for(let[i,a]of t.entries())if(n.current[i]!==a){let i=r(t,e);return n.current=t,i}},[r,...t])}function YH(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var XH=[];YH(()=>{function e(e){if(!yt(e.target)||e.target===document.body||XH[0]===e.target)return;let t=e.target;t=t.closest(Gr),XH.unshift(t??e.target),XH=XH.filter(e=>e!=null&&e.isConnected),XH.splice(10)}window.addEventListener(`click`,e,{capture:!0}),window.addEventListener(`mousedown`,e,{capture:!0}),window.addEventListener(`focus`,e,{capture:!0}),document.body.addEventListener(`click`,e,{capture:!0}),document.body.addEventListener(`mousedown`,e,{capture:!0}),document.body.addEventListener(`focus`,e,{capture:!0})});var ZH=Object.defineProperty,QH=(e,t,n)=>t in e?ZH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$H=(e,t,n)=>(QH(e,typeof t==`symbol`?t:t+``,n),n),eU=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(eU||{}),tU=(e=>(e[e.Single=0]=`Single`,e[e.Multi=1]=`Multi`,e))(tU||{}),nU=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Focus=1]=`Focus`,e[e.Other=2]=`Other`,e))(nU||{}),rU=(e=>(e[e.OpenCombobox=0]=`OpenCombobox`,e[e.CloseCombobox=1]=`CloseCombobox`,e[e.GoToOption=2]=`GoToOption`,e[e.SetTyping=3]=`SetTyping`,e[e.RegisterOption=4]=`RegisterOption`,e[e.UnregisterOption=5]=`UnregisterOption`,e[e.DefaultToFirstOption=6]=`DefaultToFirstOption`,e[e.SetActivationTrigger=7]=`SetActivationTrigger`,e[e.UpdateVirtualConfiguration=8]=`UpdateVirtualConfiguration`,e[e.SetInputElement=9]=`SetInputElement`,e[e.SetButtonElement=10]=`SetButtonElement`,e[e.SetOptionsElement=11]=`SetOptionsElement`,e[e.MarkInputAsMoved=12]=`MarkInputAsMoved`,e))(rU||{});function iU(e,t=e=>e){let n=e.activeOptionIndex===null?null:e.options[e.activeOptionIndex],r=t(e.options.slice()),i=r.length>0&&r[0].dataRef.current.order!==null?r.sort((e,t)=>e.dataRef.current.order-t.dataRef.current.order):Xr(r,e=>e.dataRef.current.domRef.current),a=n?i.indexOf(n):null;return a===-1&&(a=null),{options:i,activeOptionIndex:a}}var aU={1(e){var t;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1)return e;let n=e.inputElement?ha.Tracked(Sa(e.inputElement)):e.inputPositionState;return{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:n,__demoMode:!1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(t!==-1)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1,inputPositionState:ha.Idle}}return{...e,comboboxState:0,inputPositionState:ha.Idle,__demoMode:!1}},3(e,t){return e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping}},2(e,t){var n,r;if((n=e.dataRef.current)!=null&&n.disabled||e.optionsElement&&!((r=e.dataRef.current)!=null&&r.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let{options:n,disabled:r}=e.virtual,i=t.focus===ka.Specific?t.idx:Ea(t,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex??n.findIndex(e=>!r(e))??null,resolveDisabled:r,resolveId(){throw Error(`Function not implemented.`)}}),a=t.trigger??2;return e.activeOptionIndex===i&&e.activationTrigger===a?e:{...e,activeOptionIndex:i,activationTrigger:a,isTyping:!1,__demoMode:!1}}let i=iU(e);if(i.activeOptionIndex===null){let e=i.options.findIndex(e=>!e.dataRef.current.disabled);e!==-1&&(i.activeOptionIndex=e)}let a=t.focus===ka.Specific?t.idx:Ea(t,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),o=t.trigger??2;return e.activeOptionIndex===a&&e.activationTrigger===o?e:{...e,...i,isTyping:!1,activeOptionIndex:a,activationTrigger:o,__demoMode:!1}},4:(e,t)=>{var n,r,i,a;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let o=t.payload,s=iU(e,e=>(e.push(o),e));e.activeOptionIndex===null&&(i=(r=e.dataRef.current).isSelected)!=null&&i.call(r,t.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(o));let c={...e,...s,activationTrigger:2};return(a=e.dataRef.current)!=null&&a.__demoMode&&e.dataRef.current.value===void 0&&(c.activeOptionIndex=0),c},5:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(e=>e.id!==t.id)};let r=iU(e,e=>{let n=e.findIndex(e=>e.id===t.id);return n!==-1&&e.splice(n,1),e});return{...e,...r,activationTrigger:2}},6:(e,t)=>e.defaultToFirstOption===t.value?e:{...e,defaultToFirstOption:t.value},7:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},8:(e,t)=>
114{if(e.virtual===null)return{...e,virtual:{options:t.options,disabled:t.disabled??(()=>!1)}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let n=e.activeOptionIndex;if(e.activeOptionIndex!==null){let r=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);n=r===-1?null:r}return{...e,activeOptionIndex:n,virtual:{options:t.options,disabled:t.disabled??(()=>!1)}}},9:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},10:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},11:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},12(e){return e.inputPositionState.kind===`Tracked`?{...e,inputPositionState:ha.Moved}:e}},oU=class e extends pa{constructor(e){super(e),$H(this,`actions`,{onChange:e=>{let{onChange:t,compare:n,mode:r,value:i}=this.state.dataRef.current;return d(r,{0:()=>t?.(e),1:()=>{let r=i.slice(),a=r.findIndex(t=>n(t,e));return a===-1?r.push(e):r.splice(a,1),t?.(r)}})},registerOption:(e,t)=>(this.send({type:4,payload:{id:e,dataRef:t}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(t.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,t)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:t})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,t;this.send({type:1}),this.send({type:6,value:!1}),(t=(e=this.state.dataRef.current).onClose)==null||t.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(e!==null){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:t}=this.state.options[e];this.actions.onChange(t.current.value)}this.actions.goToOption({focus:ka.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),$H(this,`selectors`,{activeDescendantId:e=>{let t=this.selectors.activeOptionIndex(e);if(t!==null)return e.virtual?e.options.find(n=>!n.dataRef.current.disabled&&e.dataRef.current.compare(n.dataRef.current.value,e.virtual.options[t]))?.id:e.options[t]?.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&e.activeOptionIndex===null&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:t,disabled:n}=e.virtual,r=t.findIndex(e=>{var t;return!((t=n?.(e))!=null&&t)});if(r!==-1)return r}let t=e.options.findIndex(e=>!e.dataRef.current.disabled);if(t!==-1)return t}return e.activeOptionIndex},activeOption:e=>{let t=this.selectors.activeOptionIndex(e);return t===null?null:e.virtual?e.virtual.options[t??0]:e.options[t]?.dataRef.current.value??null},isActive:(e,t,n)=>{let r=this.selectors.activeOptionIndex(e);return r===null?!1:e.virtual?r===e.dataRef.current.calculateIndex(t):e.options[r]?.id===n},shouldScrollIntoView:(e,t,n)=>!(e.virtual||e.__demoMode||e.comboboxState!==0||e.activationTrigger===0||!this.selectors.isActive(e,t,n)),didInputMove(e){return e.inputPositionState.kind===`Moved`}});{let e=this.state.id,t=da.get(null);this.disposables.add(t.on(ea.Push,n=>{!t.selectors.isTop(n,e)&&this.state.comboboxState===0&&this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.inputElement&&(e.dispose(),e.add(Oa(t.inputElement,t.inputPositionState,()=>{this.send({type:12})})))})})}static new({id:t,virtual:n=null,__demoMode:r=!1}){return new e({id:t,dataRef:{current:{}},comboboxState:+!r,isTyping:!1,options:[],virtual:n?{options:n.options,disabled:n.disabled??(()=>!1)}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:r,inputPositionState:ha.Idle})}reduce(e,t){return d(t.type,aU,e,t)}},sU=(0,W.createContext)(null);function cU(e){let t=(0,W.useContext)(sU);if(t===null){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,lU),t}return t}function lU({id:e,virtual:t=null,__demoMode:n=!1}){let r=(0,W.useMemo)(()=>oU.new({id:e,virtual:t,__demoMode:n}),[]);return ya(()=>r.dispose()),r}var uU=(0,W.createContext)(null);uU.displayName=`ComboboxDataContext`;function dU(e){let t=(0,W.useContext)(uU);if(t===null){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,dU),t}return t}var fU=(0,W.createContext)(null);function pU(e){let t=cU(`VirtualProvider`),{options:r}=dU(`VirtualProvider`).virtual,i=fa(t,e=>e.optionsElement),[a,o]=(0,W.useMemo)(()=>{let e=i;if(!e)return[0,0];let t=window.getComputedStyle(e);return[parseFloat(t.paddingBlockStart||t.paddingTop),parseFloat(t.paddingBlockEnd||t.paddingBottom)]},[i]),s=GH({enabled:r.length!==0,scrollPaddingStart:a,scrollPaddingEnd:o,count:r.length,estimateSize(){return 40},getScrollElement(){return t.state.optionsElement},overscan:12}),[c,l]=(0,W.useState)(0);n(()=>{l(e=>e+1)},[r]);let u=s.getVirtualItems(),d=fa(t,e=>e.activationTrigger===nU.Pointer),f=fa(t,t.selectors.activeOptionIndex);return u.length===0?null:W.createElement(fU.Provider,{value:s},W.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`${s.getTotalSize()}px`},ref:e=>{e&&(d||f!==null&&r.length>f&&s.scrollToIndex(f))}},u.map(t=>W.createElement(W.Fragment,{key:t.key},W.cloneElement(e.children?.call(e,{...e.slot,option:r[t.index]}),{key:`${c}-${t.key}`,"data-index":t.index,"aria-setsize":r.length,"aria-posinset":t.index+1,style:{position:`absolute`,top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:`none`}})))))}var mU=W.Fragment;function hU(e,t){let r=(0,zt.useId)(),i=fe(),{value:o,defaultValue:s,onChange:c,form:l,name:u,by:f,invali
114d:p=!1,disabled:m=i||!1,onClose:h,__demoMode:g=!1,multiple:_=!1,immediate:v=!1,virtual:y=null,nullable:b,...x}=e,S=gt(s),[C=_?[]:void 0,E]=Ce(o,c,S),ee=lU({id:r,virtual:y,__demoMode:g}),D=(0,W.useRef)({static:!1,hold:!1}),te=ni(f),ne=T(e=>y?f===null?y.options.indexOf(e):y.options.findIndex(t=>te(t,e)):ee.state.options.findIndex(t=>te(t.dataRef.current.value,e))),O=(0,W.useCallback)(e=>d(ie.mode,{[tU.Multi]:()=>C.some(t=>te(t,e)),[tU.Single]:()=>te(C,e)}),[C]),re=fa(ee,e=>e.virtual),k=T(()=>h?.()),ie=(0,W.useMemo)(()=>({__demoMode:g,immediate:v,optionsPropsRef:D,value:C,defaultValue:S,disabled:m,invalid:p,mode:_?tU.Multi:tU.Single,virtual:y?re:null,onChange:E,isSelected:O,calculateIndex:ne,compare:te,onClose:k}),[g,v,D,C,S,m,p,_,y,re,E,O,ne,te,k]);n(()=>{y&&ee.send({type:rU.UpdateVirtualConfiguration,options:y.options,disabled:y.disabled??null})},[y,y?.options,y?.disabled]),n(()=>{ee.state.dataRef.current=ie},[ie]);let[A,ae,oe,se]=fa(ee,e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]),ce=da.get(null),le=fa(ce,(0,W.useCallback)(e=>ce.selectors.isTop(e,r),[ce,r]));$i(le,[ae,oe,se],()=>ee.actions.closeCombobox());let j=fa(ee,ee.selectors.activeOptionIndex),ue=fa(ee,ee.selectors.activeOption),de=w({open:A===eU.Open,disabled:m,invalid:p,activeIndex:j,activeOption:ue,value:C}),[pe,me]=pn(),he=t===null?{}:{ref:t},ge=(0,W.useCallback)(()=>{if(S!==void 0)return E?.(S)},[E,S]),_e=a();return W.createElement(me,{value:pe,props:{htmlFor:oe?.id},slot:{open:A===eU.Open,disabled:m}},W.createElement(La,null,W.createElement(uU.Provider,{value:ie},W.createElement(sU.Provider,{value:ee},W.createElement(xa,{value:d(A,{[eU.Open]:ba.Open,[eU.Closed]:ba.Closed})},u!=null&&W.createElement(Dn,{disabled:m,data:C==null?{}:{[u]:C},form:l,onReset:ge}),_e({ourProps:he,theirProps:x,slot:de,defaultTag:mU,name:`Combobox`}))))))}var gU=`input`;function _U(e,t){let n=cU(`Combobox.Input`),r=dU(`Combobox.Input`),i=(0,zt.useId)(),o=Ze(),{id:s=o||`headlessui-combobox-input-${i}`,onChange:c,displayValue:l,disabled:u=r.disabled||!1,autoFocus:f=!1,type:p=`text`,...m}=e,h=(0,W.useRef)(null),g=Ue(h,t,ua(),n.actions.setInputElement),[_,v]=fa(n,e=>[e.comboboxState,e.isTyping]),y=A(),b=T(()=>{n.actions.onChange(null),n.state.optionsElement&&(n.state.optionsElement.scrollTop=0),n.actions.goToOption({focus:ka.Nothing})});JH(([e,t],[r,i])=>{if(n.state.isTyping)return;let a=h.current;a&&((i===eU.Open&&t===eU.Closed||e!==r)&&(a.value=e),requestAnimationFrame(()=>{if(n.state.isTyping||!a||me(a))return;let{selectionStart:e,selectionEnd:t}=a;Math.abs((t??0)-(e??0))===0&&e===0&&a.setSelectionRange(a.value.length,a.value.length)}))},[(0,W.useMemo)(()=>typeof l==`function`&&r.value!==void 0?l(r.value)??``:typeof r.value==`string`?r.value:``,[r.value,l]),_,v]),JH(([e],[t])=>{if(e===eU.Open&&t===eU.Closed){if(n.state.isTyping)return;let e=h.current;if(!e)return;let t=e.value,{selectionStart:r,selectionEnd:i,selectionDirection:a}=e;e.value=``,e.value=t,a===null?e.setSelectionRange(r,i):e.setSelectionRange(r,i,a)}},[_]);let S=(0,W.useRef)(!1),C=T(()=>{S.current=!0}),E=T(()=>{y.nextFrame(()=>{S.current=!1})}),ee=T(e=>{switch(n.actions.setIsTyping(!0),e.key){case un.Enter:if(n.state.comboboxState!==eU.Open||S.current)return;if(e.preventDefault(),e.stopPropagation(),n.selectors.activeOptionIndex(n.state)===null){n.actions.closeCombobox();return}n.actions.selectActiveOption(),r.mode===tU.Single&&n.actions.closeCombobox();break;case un.ArrowDown:return e.preventDefault(),e.stopPropagation(),d(n.state.comboboxState,{[eU.Open]:()=>n.actions.goToOption({focus:ka.Next}),[eU.Closed]:()=>n.actions.openCombobox()});case un.ArrowUp:return e.preventDefault(),e.stopPropagation(),d(n.state.comboboxState,{[eU.Open]:()=>n.actions.goToOption({focus:ka.Previous}),[eU.Closed]:()=>{(0,HH.flushSync)(()=>n.actions.openCombobox()),r.value||n.actions.goToOption({focus:ka.Last})}});case un.Home:if(n.state.comboboxState===eU.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),n.actions.goToOption({focus:ka.First});case un.PageUp:return e.preventDefault(),e.stopPropagation(),n.actions.goToOption({focus:ka.First});case un.End:if(n.state.comboboxState===eU.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),n.actions.goToOption({focus:ka.Last});case un.PageDown:return e.preventDefault(),e.stopPropagation(),n.actions.goToOption({focus:ka.Last});case un.Escape:return n.state.comboboxState===eU.Open?(e.preventDefault(),n.state.optionsElement&&!r.optionsPropsRef.current.static&&e.stopPropagation(),r.mode===tU.Single&&r.value===null&&b(),n.actions.closeCombobox()):void 0;case un.Tab:if(n.actions.setIsTyping(!1),n.state.comboboxState!==eU.Open)return;r.mode===tU.Single&&n.state.activationTrigger!==nU.Focus&&n.actions.selectActiveOption(),n.actions.closeCombobox()}}),D=T(e=>{c?.(e),r.mode===tU.Single&&e.target.value===``&&b(),n.actions.openCombobox()}),te=T(e=>{var t,i;let a=e.relatedTarget??XH.find(t=>t!==e.currentTarget);if(!((t=n.state.optionsElement)!=null&&t.contains(a))&&!((i=n.state.buttonElement)!=null&&i.contains(a))&&n.state.comboboxState===eU.Open)return e.preventDefault(),r.mode===tU.Single&&r.value===null&&b(),n.actions.closeCombobox()}),ne=T(e=>{var t,i;let a=e.relatedTarget??XH.find(t=>t!==e.currentTarget);(t=n.state.buttonElement)!=null&&t.contains(a)||(i=n.state.optionsElement)!=null&&i.contains(a)||r.disabled||r.immediate&&n.state.comboboxState!==eU.Open&&y.microTask(()=>{(0,HH.flushSync)(()=>n.actions.openCombobox()),n.actions.setActivationTrigger(nU.Focus)})}
114),O=dt(),k=mt(),{isFocused:ie,focusProps:ae}=j({autoFocus:f}),{isHovered:oe,hoverProps:se}=re({isDisabled:u}),ce=fa(n,e=>e.optionsElement),le=w({open:_===eU.Open,disabled:u,invalid:r.invalid,hover:oe,focus:ie,autofocus:f}),ue=x({ref:g,id:s,role:`combobox`,type:p,"aria-controls":ce?.id,"aria-expanded":_===eU.Open,"aria-activedescendant":fa(n,n.selectors.activeDescendantId),"aria-labelledby":O,"aria-describedby":k,"aria-autocomplete":`list`,defaultValue:e.defaultValue??(r.defaultValue===void 0?null:l?.(r.defaultValue))??r.defaultValue,disabled:u||void 0,autoFocus:f,onCompositionStart:C,onCompositionEnd:E,onKeyDown:ee,onChange:D,onFocus:ne,onBlur:te},ae,se);return a()({ourProps:ue,theirProps:m,slot:le,defaultTag:gU,name:`Combobox.Input`})}var vU=`button`;function yU(e,t){let n=cU(`Combobox.Button`),r=dU(`Combobox.Button`),[i,o]=(0,W.useState)(null),s=Ue(t,o,n.actions.setButtonElement),c=(0,zt.useId)(),{id:l=`headlessui-combobox-button-${c}`,disabled:u=r.disabled||!1,autoFocus:d=!1,...f}=e,[p,m,h]=fa(n,e=>[e.comboboxState,e.inputElement,e.optionsElement]),g=qH(m),_=p===eU.Open;aa(_,{trigger:i,action:(0,W.useCallback)(e=>{if(i!=null&&i.contains(e.target)||m!=null&&m.contains(e.target))return oa.Ignore;let t=e.target.closest(`[role="option"]:not([data-disabled])`);return Et(t)?oa.Select(t):h!=null&&h.contains(e.target)?oa.Ignore:oa.Close},[i,m,h]),close:n.actions.closeCombobox,select:n.actions.selectActiveOption});let v=T(e=>{switch(e.key){case un.Space:case un.Enter:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===eU.Closed&&(0,HH.flushSync)(()=>n.actions.openCombobox()),g();return;case un.ArrowDown:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===eU.Closed&&((0,HH.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:ka.First})),g();return;case un.ArrowUp:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===eU.Closed&&((0,HH.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:ka.Last})),g();return;case un.Escape:if(n.state.comboboxState!==eU.Open)return;e.preventDefault(),n.state.optionsElement&&!r.optionsPropsRef.current.static&&e.stopPropagation(),(0,HH.flushSync)(()=>n.actions.closeCombobox()),g();return;default:return}}),y=ra(()=>{n.state.comboboxState===eU.Open?n.actions.closeCombobox():n.actions.openCombobox(),g()}),b=dt([l]),{isFocusVisible:S,focusProps:E}=j({autoFocus:d}),{isHovered:ee,hoverProps:D}=re({isDisabled:u}),{pressed:te,pressProps:ne}=C({disabled:u}),O=w({open:p===eU.Open,active:te||p===eU.Open,disabled:u,invalid:r.invalid,value:r.value,hover:ee,focus:S}),k=x({ref:s,id:l,type:Za(e,i),tabIndex:-1,"aria-haspopup":`listbox`,"aria-controls":h?.id,"aria-expanded":p===eU.Open,"aria-labelledby":b,disabled:u||void 0,autoFocus:d,onKeyDown:v},y,E,D,ne);return a()({ourProps:k,theirProps:f,slot:O,defaultTag:vU,name:`Combobox.Button`})}var bU=`div`,xU=v.RenderStrategy|v.Static;function SU(e,t){let r=(0,zt.useId)(),{id:i=`headlessui-combobox-options-${r}`,hold:o=!1,anchor:s,portal:c=!1,modal:l=!0,transition:u=!1,...d}=e,f=cU(`Combobox.Options`),p=dU(`Combobox.Options`),m=Qi(s);m&&(c=!0);let[h,g]=Xi(m),[_,v]=(0,W.useState)(null),y=Ia(),b=Ue(t,m?h:null,f.actions.setOptionsElement,v),[S,C,E,ee,D]=fa(f,e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger]),te=ca(C||E),ne=ca(ee),O=Fa(),[re,k]=sa(u,_,O===null?S===eU.Open:(O&ba.Open)===ba.Open);la(re,C,f.actions.closeCombobox);let ie=!p.__demoMode&&l&&S===eU.Open;Ca(ie,ne);let A=!p.__demoMode&&l&&S===eU.Open;za(A,{allowed:(0,W.useCallback)(()=>[C,E,ee],[C,E,ee])});let ae=!fa(f,f.selectors.didInputMove)&&re;n(()=>{p.optionsPropsRef.current.static=e.static??!1},[p.optionsPropsRef,e.static]),n(()=>{p.optionsPropsRef.current.hold=o},[p.optionsPropsRef,o]),Zi(S===eU.Open,{container:ee,accept(e){return e.getAttribute(`role`)===`option`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});let oe=dt([E?.id]),se=w({open:S===eU.Open,option:void 0}),ce=T(()=>{f.actions.setActivationTrigger(nU.Pointer)}),le=T(e=>{e.preventDefault(),f.actions.setActivationTrigger(nU.Pointer)}),j=x(m?y():{},{"aria-labelledby":oe,role:`listbox`,"aria-multiselectable":p.mode===tU.Multi||void 0,id:i,ref:b,style:{...d.style,...g,"--input-width":na(re,C,!0).width,"--button-width":na(re,E,!0).width},onWheel:D===nU.Pointer?void 0:ce,onMouseDown:le,...wa(k)}),ue=re&&S===eU.Closed&&!e.static,de=ga(ue,p.virtual?.options),fe=ga(ue,p.value),pe=(0,W.useCallback)(e=>p.compare(fe,e),[p.compare,fe]),me=(0,W.useMemo)(()=>
114{if(!p.virtual)return p;if(de===void 0)throw Error("Missing `options` in virtual mode");return de===p.virtual.options?p:{...p,virtual:{...p.virtual,options:de}}},[p,de,p.virtual?.options]);p.virtual&&Object.assign(d,{children:W.createElement(uU.Provider,{value:me},W.createElement(pU,{slot:se},d.children))});let he=a(),ge=(0,W.useMemo)(()=>p.mode===tU.Multi?p:{...p,isSelected:pe},[p,pe]);return W.createElement(_a,{enabled:c?e.static||re:!1,ownerDocument:te},W.createElement(uU.Provider,{value:ge},he({ourProps:j,theirProps:{...d,children:W.createElement(Ra,{freeze:ue},typeof d.children==`function`?d.children?.call(d,se):d.children)},slot:se,defaultTag:bU,features:xU,visible:ae,name:`Combobox.Options`})))}var CU=`div`;function wU(e,t){var r;let i=dU(`Combobox.Option`),o=cU(`Combobox.Option`),s=(0,zt.useId)(),{id:c=`headlessui-combobox-option-${s}`,value:l,disabled:u=((r=i.virtual)?.disabled)?.call(r,l)??!1,order:d=null,...f}=e,[p]=fa(o,e=>[e.inputElement]),m=qH(p),h=fa(o,(0,W.useCallback)(e=>o.selectors.isActive(e,l,c),[l,c])),_=i.isSelected(l),v=(0,W.useRef)(null),y=g({disabled:u,value:l,domRef:v,order:d}),b=(0,W.useContext)(fU),x=Ue(t,v,b?b.measureElement:null),S=T(()=>{o.actions.setIsTyping(!1),o.actions.onChange(l)});n(()=>o.actions.registerOption(c,y),[y,c]);let C=fa(o,(0,W.useCallback)(e=>o.selectors.shouldScrollIntoView(e,l,c),[l,c]));n(()=>{if(C)return _e().requestAnimationFrame(()=>{var e,t;(t=(e=v.current)?.scrollIntoView)==null||t.call(e,{block:`nearest`})})},[C,v]);let E=T(e=>{e.preventDefault(),e.button===Aa.Left&&(u||(S(),ia()||requestAnimationFrame(()=>m()),i.mode===tU.Single&&o.actions.closeCombobox()))}),ee=T(()=>{if(u)return o.actions.goToOption({focus:ka.Nothing});let e=i.calculateIndex(l);o.actions.goToOption({focus:ka.Specific,idx:e})}),D=Ji(),te=T(e=>D.update(e)),ne=T(e=>{if(!D.wasMoved(e)||u||h&&o.state.activationTrigger===nU.Pointer)return;let t=i.calculateIndex(l);o.actions.goToOption({focus:ka.Specific,idx:t},nU.Pointer)}),O=T(e=>{D.wasMoved(e)&&(u||h&&(i.optionsPropsRef.current.hold||o.state.activationTrigger===nU.Pointer&&o.actions.goToOption({focus:ka.Nothing})))}),re=w({active:h,focus:h,selected:_,disabled:u}),k={id:c,ref:x,role:`option`,tabIndex:u===!0?void 0:-1,"aria-disabled":u===!0||void 0,"aria-selected":_,disabled:void 0,onMouseDown:E,onFocus:ee,onPointerEnter:te,onMouseEnter:te,onPointerMove:ne,onMouseMove:ne,onPointerLeave:O,onMouseLeave:O};return a()({ourProps:k,theirProps:f,slot:re,defaultTag:CU,name:`Combobox.Option`})}var TU=f(hU),EU=f(yU),DU=f(_U),OU=Ee,kU=f(SU),AU=f(wU),jU=Object.assign(TU,{Input:DU,Button:EU,Label:OU,Options:kU,Option:AU});function MU(e,t=typeof document<`u`?document.defaultView:null,n){let r=Yi(e,`escape`);KH(t,`keydown`,e=>{r&&(e.defaultPrevented||e.key===un.Escape&&n(e))})}function NU(){let[e]=(0,W.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(pointer: coarse)`):null),[t,r]=(0,W.useState)(e?.matches??!1);return n(()=>{if(!e)return;function t(e){r(e.matches)}return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[e]),t}function PU({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=T(()=>{let r=te(n),i=[];for(let t of e)t!==null&&(kt(t)?i.push(t):`current`in t&&kt(t.current)&&i.push(t.current));if(t!=null&&t.current)for(let e of t.current)i.push(e);for(let e of r?.querySelectorAll(`html > *, body > *`)??[])e!==document.body&&e!==document.head&&kt(e)&&e.id!==`headlessui-portal-root`&&(n&&(e.contains(n)||e.contains(n?.getRootNode()?.host))||i.some(t=>e.contains(t))||i.push(e));return i});
114return{resolveContainers:r,contains:T(e=>r().some(t=>t.contains(e)))}}var FU=(0,W.createContext)(null);function IU({children:e,node:t}){let[n,r]=(0,W.useState)(null),i=LU(t??n);return W.createElement(FU.Provider,{value:i},e,i===null&&W.createElement(qe,{features:Ft.Hidden,ref:e=>{if(e){for(let t of te(e)?.querySelectorAll(`html > *, body > *`)??[])if(t!==document.body&&t!==document.head&&kt(t)&&t!=null&&t.contains(e)){r(t);break}}}}))}function LU(e=null){return(0,W.useContext)(FU)??e}function RU(){let e=(0,W.useRef)(!1);return n(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var zU=(e=>(e[e.Forwards=0]=`Forwards`,e[e.Backwards=1]=`Backwards`,e))(zU||{});function BU(){let e=(0,W.useRef)(0);return ta(!0,`keydown`,t=>{t.key===`Tab`&&(e.current=+!!t.shiftKey)},!0),e}function VU(e){if(!e)return new Set;if(typeof e==`function`)return new Set(e());let t=new Set;for(let n of e.current)kt(n.current)&&t.add(n.current);return t}var HU=`div`,UU=(e=>(e[e.None=0]=`None`,e[e.InitialFocus=1]=`InitialFocus`,e[e.TabLock=2]=`TabLock`,e[e.FocusLock=4]=`FocusLock`,e[e.RestoreFocus=8]=`RestoreFocus`,e[e.AutoFocus=16]=`AutoFocus`,e))(UU||{});function WU(e,t){let n=(0,W.useRef)(null),r=Ue(n,t),{initialFocus:i,initialFocusFallback:o,containers:s,features:c=15,...l}=e;va()||(c=0);let u=ca(n.current);JU(c,{ownerDocument:u});let f=YU(c,{ownerDocument:u,container:n,initialFocus:i,initialFocusFallback:o});XU(c,{ownerDocument:u,container:n,containers:s,previousActiveElement:f});let p=BU(),m=T(e=>{if(!Et(n.current))return;let t=n.current;(e=>e())(()=>{d(p.current,{[zU.Forwards]:()=>{Ii(t,Di.First,{skipElements:[e.relatedTarget,o]})},[zU.Backwards]:()=>{Ii(t,Di.Last,{skipElements:[e.relatedTarget,o]})}})})}),h=Yi(!!(c&2),`focus-trap#tab-lock`),g=A(),_=(0,W.useRef)(!1),v={ref:r,onKeyDown(e){e.key==`Tab`&&(_.current=!0,g.requestAnimationFrame(()=>{_.current=!1}))},onBlur(e){if(!(c&4))return;let t=VU(s);Et(n.current)&&t.add(n.current);let r=e.relatedTarget;yt(r)&&r.dataset.headlessuiFocusGuard!==`true`&&(ZU(t,r)||(_.current?Ii(n.current,d(p.current,{[zU.Forwards]:()=>Di.Next,[zU.Backwards]:()=>Di.Previous})|Di.WrapAround,{relativeTo:e.target}):yt(e.target)&&_i(e.target)))}},y=a();return W.createElement(W.Fragment,null,h&&W.createElement(qe,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:m,features:Ft.Focusable}),y({ourProps:v,theirProps:l,defaultTag:HU,name:`FocusTrap`}),h&&W.createElement(qe,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:m,features:Ft.Focusable}))}var GU=f(WU),KU=Object.assign(GU,{features:UU});function qU(e=!0){let t=(0,W.useRef)(XH.slice());return JH(([e],[n])=>{n===!0&&e===!1&&ue(()=>{t.current.splice(0)}),n===!1&&e===!0&&(t.current=XH.slice())},[e,XH,t]),T(()=>t.current.find(e=>e!=null&&e.isConnected)??null)}function JU(e,{ownerDocument:t}){let n=!!(e&8),r=qU(n);JH(()=>{n||me(t?.body)&&_i(r())},[n]),ya(()=>{n&&_i(r())})}function YU(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=(0,W.useRef)(null),o=Yi(!!(e&1),`focus-trap#initial-focus`),s=RU();return JH(()=>{if(e===0)return;if(!o){i!=null&&i.current&&_i(i.current);return}let c=n.current;c&&ue(()=>{if(!s.current)return;let n=t?.activeElement;if(r!=null&&r.current){if(r?.current===n){a.current=n;return}}else if(c.contains(n)){a.current=n;return}if(r!=null&&r.current)_i(r.current);else{if(e&16){if(Ii(c,Di.First|Di.AutoFocus)!==qr.Error)return}else if(Ii(c,Di.First)!==qr.Error)return;if(i!=null&&i.current&&(_i(i.current),t?.activeElement===i.current))return;console.warn(`There are no focusable elements inside the <FocusTrap />`)}a.current=t?.activeElement})},[i,o,e]),a}function XU(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=RU(),o=!!(e&4);KH(t?.defaultView,`focus`,e=>{if(!o||!a.current)return;let t=VU(r);Et(n.current)&&t.add(n.current);let s=i.current;if(!s)return;let c=e.target;Et(c)?ZU(t,c)?(i.current=c,_i(c)):(e.preventDefault(),e.stopPropagation(),_i(s)):_i(i.current)},!0)}function ZU(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function QU(e){return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!b(e.as??oW)||W.Children.count(e.children)===1}var $U=(0,W.createContext)(null);$U.displayName=`TransitionContext`;var eW=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(eW||{});function tW(){let e=(0,W.useContext)($U);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}function nW(){let e=(0,W.useContext)(rW);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}var rW=(0,W.createContext)(null);rW.displayName=`NestingContext`;function iW(e){return`children`in e?iW(e.children):e.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e===`visible`).length>0}function aW(e,t){let n=g(e),r=(0,W.useRef)([]),i=RU(),a=A(),o=T((e,t=xe.Hidden)=>{let o=r.current.findIndex(({el:t})=>t===e);o!==-1&&(d(t,{[xe.Unmount](){r.current.splice(o,1)},[xe.Hidden](){r.current[o].state=`hidden`}}),a.microTask(()=>{var e;!iW(r)&&i.current&&((e=n.current)==null||e.call(n))}))}),s=T(e=>{let t=r.current.find(({el:t})=>t===e);return t?t.state!==`visible`&&(t.state=`visible`):r.current.push({el:e,state:`visible`}),()=>o(e,xe.Unmount)}),c=(0,W.useRef)([]),l=(0,W.useRef)(Promise.resolve()),u=(0,W.useRef)({enter:[],leave:[]}
114),f=T((e,n,r)=>{c.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),t?.chains.current[n].push([e,new Promise(e=>{c.current.push(e)})]),t?.chains.current[n].push([e,new Promise(e=>{Promise.all(u.current[n].map(([e,t])=>t)).then(()=>e())})]),n===`enter`?l.current=l.current.then(()=>t?.wait.current).then(()=>r(n)):r(n)}),p=T((e,t,n)=>{Promise.all(u.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;(e=c.current.shift())==null||e()}).then(()=>n(t))});return(0,W.useMemo)(()=>({children:r,register:s,unregister:o,onStart:f,onStop:p,wait:l,chains:u}),[s,o,r,f,p,u,l])}var oW=W.Fragment,sW=v.RenderStrategy;function cW(e,t){var r;let{transition:i=!0,beforeEnter:o,afterEnter:s,beforeLeave:c,afterLeave:l,enter:u,enterFrom:f,enterTo:m,entered:h,leave:g,leaveFrom:_,leaveTo:v,...y}=e,[b,x]=(0,W.useState)(null),C=(0,W.useRef)(null),w=QU(e),E=Ue(...w?[C,t,x]:t===null?[]:[t]),ee=(r=y.unmount)==null||r?xe.Unmount:xe.Hidden,{show:D,appear:te,initial:ne}=tW(),[O,re]=(0,W.useState)(D?`visible`:`hidden`),k=nW(),{register:ie,unregister:A}=k;n(()=>ie(C),[ie,C]),n(()=>{if(ee===xe.Hidden&&C.current){if(D&&O!==`visible`){re(`visible`);return}return d(O,{hidden:()=>A(C),visible:()=>ie(C)})}},[O,C,ie,A,D,ee]);let ae=va();n(()=>{if(w&&ae&&O===`visible`&&C.current===null)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[C,O,ae,w]);let oe=ne&&!te,se=te&&D&&ne,ce=(0,W.useRef)(!1),le=aW(()=>{ce.current||(re(`hidden`),A(C))},k),j=T(e=>{ce.current=!0;let t=e?`enter`:`leave`;le.onStart(C,t,e=>{e===`enter`?o?.():e===`leave`&&c?.()})}),ue=T(e=>{let t=e?`enter`:`leave`;ce.current=!1,le.onStop(C,t,e=>{e===`enter`?s?.():e===`leave`&&l?.()}),t===`leave`&&!iW(le)&&(re(`hidden`),A(C))});(0,W.useEffect)(()=>{w&&i||(j(D),ue(D))},[D,w,i]);let[,de]=sa(!(!i||!w||!ae||oe),b,D,{start:j,end:ue}
114),fe=S({ref:E,className:p(y.className,se&&u,se&&f,de.enter&&u,de.enter&&de.closed&&f,de.enter&&!de.closed&&m,de.leave&&g,de.leave&&!de.closed&&_,de.leave&&de.closed&&v,!de.transition&&D&&h)?.trim()||void 0,...wa(de)}),pe=0;O===`visible`&&(pe|=ba.Open),O===`hidden`&&(pe|=ba.Closed),D&&O===`hidden`&&(pe|=ba.Opening),!D&&O===`visible`&&(pe|=ba.Closing);let me=a();return W.createElement(rW.Provider,{value:le},W.createElement(xa,{value:pe},me({ourProps:fe,theirProps:y,defaultTag:oW,features:sW,visible:O===`visible`,name:`Transition.Child`})))}function lW(e,t){let{show:r,appear:i=!1,unmount:o=!0,...s}=e,c=(0,W.useRef)(null),l=QU(e),u=Ue(...l?[c,t]:t===null?[]:[t]);va();let d=Fa();if(r===void 0&&d!==null&&(r=(d&ba.Open)===ba.Open),r===void 0)throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,p]=(0,W.useState)(r?`visible`:`hidden`),m=aW(()=>{r||p(`hidden`)}),[h,g]=(0,W.useState)(!0),_=(0,W.useRef)([r]);n(()=>{h!==!1&&_.current[_.current.length-1]!==r&&(_.current.push(r),g(!1))},[_,r]);let v=(0,W.useMemo)(()=>({show:r,appear:i,initial:h}),[r,i,h]);n(()=>{r?p(`visible`):!iW(m)&&c.current!==null&&p(`hidden`)},[r,m]);let y={unmount:o},b=T(()=>{var t;h&&g(!1),(t=e.beforeEnter)==null||t.call(e)}),x=T(()=>{var t;h&&g(!1),(t=e.beforeLeave)==null||t.call(e)}),S=a();return W.createElement(rW.Provider,{value:m},W.createElement($U.Provider,{value:v},S({ourProps:{...y,as:W.Fragment,children:W.createElement(fW,{ref:u,...y,...s,beforeEnter:b,beforeLeave:x})},theirProps:{},defaultTag:W.Fragment,features:sW,visible:f===`visible`,name:`Transition`})))}function uW(e,t){let n=(0,W.useContext)($U)!==null,r=Fa()!==null;return W.createElement(W.Fragment,null,!n&&r?W.createElement(dW,{ref:t,...e}):W.createElement(fW,{ref:t,...e}))}var dW=f(lW),fW=f(cW),pW=f(uW),mW=Object.assign(dW,{Child:pW,Root:dW}),hW=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(hW||{}),gW=(e=>(e[e.SetTitleId=0]=`SetTitleId`,e))(gW||{}),_W={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},vW=(0,W.createContext)(null);vW.displayName=`DialogContext`;function yW(e){let t=(0,W.useContext)(vW);if(t===null){let t=Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,yW),t}return t}function bW(e,t){return d(t.type,_W,e,t)}var xW=f(function(e,t){let r=(0,zt.useId)(),{id:i=`headlessui-dialog-${r}`,open:o,onClose:s,initialFocus:c,role:l=`dialog`,autoFocus:u=!0,__demoMode:d=!1,unmount:f=!1,...p}=e,m=(0,W.useRef)(!1);l=function(){return l===`dialog`||l===`alertdialog`?l:(m.current||(m.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),`dialog`)}();let h=Fa();o===void 0&&h!==null&&(o=(h&ba.Open)===ba.Open);let g=(0,W.useRef)(null),_=Ue(g,t),v=ca(g.current),y=+!o,[b,x]=(0,W.useReducer)(bW,{titleId:null,descriptionId:null,panelRef:(0,W.createRef)()}),S=T(()=>s(!1)),C=T(e=>x({type:0,id:e})),E=va()?y===0:!1,[ee,D]=Ta(),te={get current(){return b.panelRef.current??g.current}},ne=LU(),{resolveContainers:O}=PU({mainTreeNode:ne,portals:ee,defaultContainers:[te]}),re=h!==null&&(h&ba.Closing)===ba.Closing;za(d||re?!1:E,{allowed:T(()=>[g.current?.closest(`[data-headlessui-portal]`)??null]),disallowed:T(()=>[ne?.closest(`body > *:not(#headlessui-portal-root)`)??null])});let k=da.get(null);n(()=>{if(E)return k.actions.push(i),()=>k.actions.pop(i)},[k,i,E]);let ie=fa(k,(0,W.useCallback)(e=>k.selectors.isTop(e,i),[k,i]));$i(ie,O,e=>{e.preventDefault(),S()}),MU(ie,v?.defaultView,e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&`blur`in document.activeElement&&typeof document.activeElement.blur==`function`&&document.activeElement.blur(),S()}),Ca(d||re?!1:E,v,O),la(E,g,S);let[A,ae]=rt(),oe=(0,W.useMemo)(()=>[{dialogState:y,close:S,setTitleId:C,unmount:f},b],[y,S,C,f,b]),se=w({open:y===0}),ce={ref:_,id:i,role:l,tabIndex:-1,"aria-modal":d?void 0:y===0||void 0,"aria-labelledby":b.titleId,"aria-describedby":A,unmount:f},le=!NU(),j=UU.None;E&&!d&&(j|=UU.RestoreFocus,j|=UU.TabLock,u&&(j|=UU.AutoFocus),le&&(j|=UU.InitialFocus));let ue=a();return W.createElement(ma,null,W.createElement(Pa,{force:!0},W.createElement(_a,null,W.createElement(vW.Provider,{value:oe},W.createElement(Ma,{target:g},W.createElement(Pa,{force:!1},W.createElement(ae,{slot:se},W.createElement(D,null,W.createElement(KU,{initialFocus:c,initialFocusFallback:g,containers:O,features:j},W.createElement(bH,{value:S},ue({ourProps:ce,theirProps:p,slot:se,defaultTag:SW,features:CW,visible:y===0,name:`Dialog`}
114)))))))))))}),SW=`div`,CW=v.RenderStrategy|v.Static;function wW(e,t){let{transition:n=!1,open:r,...i}=e,a=Fa(),o=e.hasOwnProperty(`open`)||a!==null,s=e.hasOwnProperty(`onClose`);if(!o&&!s)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!o)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!=`boolean`)throw Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!=`function`)throw Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?W.createElement(IU,null,W.createElement(mW,{show:r,transition:n,unmount:i.unmount},W.createElement(xW,{ref:t,...i}))):W.createElement(IU,null,W.createElement(xW,{ref:t,open:r,...i}))}var TW=`div`;function EW(e,t){let n=(0,zt.useId)(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...o}=e,[{dialogState:s,unmount:c},l]=yW(`Dialog.Panel`),u=Ue(t,l.panelRef),d=w({open:s===0}),f={ref:u,id:r,onClick:T(e=>{e.stopPropagation()})},p=i?pW:W.Fragment,m=i?{unmount:c}:{},h=a();return W.createElement(p,{...m},h({ourProps:f,theirProps:o,slot:d,defaultTag:TW,name:`Dialog.Panel`}))}var DW=`div`;function OW(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:o}]=yW(`Dialog.Backdrop`),s=w({open:i===0}),c={ref:t,"aria-hidden":!0},l=n?pW:W.Fragment,u=n?{unmount:o}:{},d=a();return W.createElement(l,{...u},d({ourProps:c,theirProps:r,slot:s,defaultTag:DW,name:`Dialog.Backdrop`}))}var kW=`h2`;function AW(e,t){let n=(0,zt.useId)(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:o,setTitleId:s}]=yW(`Dialog.Title`),c=Ue(t);(0,W.useEffect)(()=>(s(r),()=>s(null)),[r,s]);let l=w({open:o===0}),u={ref:c,id:r};return a()({ourProps:u,theirProps:i,slot:l,defaultTag:kW,name:`Dialog.Title`})}var jW=f(wW),MW=f(EW),NW=f(OW),PW=f(AW),FW=Object.assign(jW,{Panel:MW,Title:PW,Description:st}),IW=u(`book-open-text`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M16 13h2`,key:`weia3s`}],[`path`,{d:`M16 9h2`,key:`1n7gjm`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}],[`path`,{d:`M6 13h2`,key:`1cckiz`}],[`path`,{d:`M6 9h2`,key:`1k7j9f`}]]),LW=u(`chart-no-axes-column`,[[`path`,{d:`M5 21v-6`,key:`1hz6c0`}],[`path`,{d:`M12 21V3`,key:`1lcnhd`}],[`path`,{d:`M19 21V9`,key:`unv183`}]]),RW=u(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),zW=u(`circle-chevron-right`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m10 8 4 4-4 4`,key:`1wy4r4`}]]),BW=u(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),VW=u(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),HW=u(`footprints`,[[`path`,{d:`M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z`,key:`1dudjm`}],[`path`,{d:`M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z`,key:`l2t8xc`}],[`path`,{d:`M16 17h4`,key:`1dejxt`}],[`path`,{d:`M4 13h4`,key:`1bwh8b`}]]),UW=u(`layout-template`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}
114],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]),WW=u(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),GW=u(`monitor-play`,[[`path`,{d:`M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z`,key:`vbtd3f`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`,key:`x3v2xh`}]]),KW=u(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),qW=u(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),JW={type:`3rdParty`,init(e){ae(e.options.react),oe(e)}};function YW(e){let t=Lr({from:{opacity:0}
114,to:{opacity:1},delay:300});return(0,Z.jsx)(Ui.div,{style:t,className:jn(`flex min-h-fit w-screen grow items-center`,`-mt-[clamp(0px,calc((100vh-700px)*0.24),160px)]`,`sm:max-w-[480px] sm:rounded-lg`,e.className),children:(0,Z.jsx)(Zt,{fluid:!0,children:e.children})})}function XW(e){return(0,Z.jsx)(`main`,{className:`flex min-h-screen flex-col items-center justify-between bg-bg-default px-2 py-4`,children:e.children})}var ZW=`data:image/svg+xml,%3csvg%20width='331'%20height='297'%20viewBox='0%200%20331%20297'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M260.633%20120.233C256.252%20141.975%20249.682%20152.798%20240.921%20152.798C234.584%20152.798%20229.087%20148.853%20224.473%20140.869C219.859%20132.931%20213.661%20120.233%20205.88%20102.869C196.606%2081.8482%20188.078%2064.6769%20180.297%2051.2559C172.516%2037.8843%20162.543%2026.0991%20150.381%2015.9495C138.171%205.84943%20123.585%200.750732%20106.531%200.750732C66.1304%200.750732%2037.5648%2028.4561%2020.7431%2083.8685C8.56966%20124.042%201.84252%20172.378%200.554243%20228.779C0.43324%20234.077%200.372738%20236.726%201.39875%20238.822C2.29091%20240.644%203.79168%20242.18%205.59324%20243.113C7.66509%20244.187%2010.3571%20244.187%2015.7412%20244.187H49.9832C55.1593%20244.187%2057.7474%20244.187%2059.7252%20243.228C61.4991%20242.369%2062.8933%20241.064%2063.8691%20239.352C64.9571%20237.442%2065.1344%20234.785%2065.489%20229.471C66.8596%20208.929%2069.3476%20191.707%2072.9797%20177.809C78.8046%20155.346%2086.5875%20144.139%2096.3253%20144.139C103.13%20144.139%20109.001%20148.131%20113.848%20156.068C118.693%20164.053%20125.264%20177.425%20133.558%20196.281C146.234%20227.402%20159.374%20251.837%20172.982%20269.586C186.634%20287.335%20205.135%20296.186%20228.48%20296.186C267.948%20296.186%20295.536%20268.672%20311.379%20213.645C322.875%20173.601%20329.307%20125.115%20330.648%2068.1882C330.773%2062.8736%20330.836%2060.2162%20329.81%2058.1189C328.918%2056.2936%20327.419%2054.7593%20325.615%2053.8241C323.543%2052.7496%20320.846%2052.7496%20315.451%2052.7496H281.752C276.521%2052.7496%20273.906%2052.7496%20271.908%2053.7319C270.126%2054.6081%20268.711%2055.9568%20267.751%2057.6953C266.675%2059.6442%20266.547%2062.3114%20266.293%2067.6459C265.272%2089.0314%20263.387%20106.562%20260.633%20120.233Z'%20fill='%23111111'%20style='fill:%23111111;fill:color(display-p3%200.0667%200.0667%200.0667);fill-opacity:1;'/%3e%3c/svg%3e`,QW=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2026.0.1,SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2033%2033'%20style='enable-background:new%200%200%2033%2033;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{filter:url(%23Adobe_OpacityMaskFilter);}%20.st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;}%20.st2{mask:url(%23b_00000103948769136694185620000003652668121443702189_);fill-rule:evenodd;clip-rule:evenodd;fill:%23FC5200;}%20%3c/style%3e%3cg%20transform='translate(0%20.778)'%3e%3cdefs%3e%3cfilter%20id='Adobe_OpacityMaskFilter'%20filterUnits='userSpaceOnUse'%20x='4.1'%20y='0'%20width='24.8'%20height='31.2'%3e%3cfeColorMatrix%20type='matrix'%20values='1%200%200%200%200%200%201%200%200%200%200%200%201%200%200%200%200%200%201%200'/%3e%3c/filter%3e%3c/defs%3e%3cmask%20maskUnits='userSpaceOnUse'%20x='4.1'%20y='0'%20width='24.8'%20height='31.2'%20id='b_00000103948769136694185620000003652668121443702189_'%3e%3cg%20class='st0'%3e%3cpath%20id='a_00000176022919920127428310000009186594248171636877_'%20class='st1'%20d='M4.1,31.8h107.5V0H4.1V31.8z'/%3e%3c/g%3e%3c/mask%3e%3cpath%20class='st2'%20d='M18.7,16.5c-3.2,0-5.8-2.6-5.8-5.8c0-3.2,2.6-5.8,5.8-5.8c3.2,0,5.8,2.6,5.8,5.8%20C24.4,13.9,21.8,16.5,18.7,16.5%20M18.7,0.5c-3,0-5.8,1.3-7.8,3.6C9.6,2.2,7.8,0.8,5.6,0L4.1,4.2C6.4,5,8,6.9,8.2,9.2%20c0.1,1.2,0.2,2.2,0.2,2.4v19.6h4.5v-12c1.7,1.2,3.7,1.8,5.8,1.8c5.7,0,10.3-4.6,10.3-10.3C28.9,5.1,24.3,0.5,18.7,0.5'/%3e%3c/g%3e%3c/svg%3e`;function $W(e){let{description:t,title:n}=e,{push:r}=be();return(0,Z.jsxs)(Va,{children:[(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(Ha,{children:n}),t&&(0,Z.jsx)(Ba,{children:t})]}),(0,Z.jsx)(Es,{children:(0,Z.jsx)(`img`,{className:`size-6 cursor-pointer`,src:rn()?QW:ZW,alt:`logo`,onClick:()=>r(`/`)})})]})}var eG=`personalized_onboarding_state`;function tG(e){localStorage.setItem(eG,JSON.stringify(e??{}))}function nG(){let e=localStorage.getItem(eG);if(!e)return null;try{return JSON.parse(e)}catch{return localStorage.removeItem(eG),null}}function rG(){return!!nG()?.needs_website}function iG(){return nG()?.prefill?.website??``}function aG(){return iG().trim()!==``}function oG(e){let t=nG()??{};tG({...t,needs_website:!1,prefill:{...t.prefill,website:e}})}var sG=null;function cG(e){sG=e}function lG(){let e=sG;return sG=null,e}var Q={login:`/login`,selectAccount:`/select-account`,createAccount:`/create-account`,setupBrandkit:`/setup-brandkit`,pendingInvitations:`/pending-invitations`,configureAccount:`/configure-account`,personalizedWebsite:`/personalized-website`,afterLogin:`/after-login`,loginWithEmailCode:`/login-with-email-code`,loginWithAuthenticatorCode:`/login-with-authenticator-code`,home:`/home`,notifications:`/settings/notifications`,start:`/start`,signUpRoute:`/sign-up`,signUpAsRoute:`/sign-up-as`,verifyRoute:`/verify`,linkSocialRoute:`/link-user-to-social`,forgotPassword:`/forgot-password`,checkEmail:`/check-email`},uG=[{type:`account_creation`,path:Q.createAccount,label:`Stepper account`},{type:`pending_invitations`,path:Q.pendingInvitations,label:`Invitations`},{type:`configuring_account`,path:Q.configureAccount,label:`Configure account`},{type:`select_account`,path:Q.selectAccount,label:`Select account`}];function dG(){let{push:e,queryParams:t}=be(),n=Rt(),{errorToast:r}=y(),{t:i}=k(),[a,o]=(0,W.useState)(null),s=()=>n.get(`/after-login`).then(e=>o(e.data.data.step)).catch(e=>r(e,i(`authActionFailed`)));return(0,W.useEffect)(()=>{s()},[]),(0,W.useEffect)(()=>
114{if(t.stay||!a)return;if(a===`account_creation`&&rG()){e(Q.personalizedWebsite);return}if(a===`account_creation`&&aG()){e(Q.createAccount);return}if(a===`account_creation`){n.get(`/after-login/company-enrichment/domain-decision`).then(t=>{let r=t.data.data;tG(r),r.can_prefill_company&&cG(n.post(`/after-login/company-enrichment`,{website:void 0}).then(e=>e.data.data).catch(e=>(console.error(`Company enrichment failed`,e),null))),e(rG()?Q.personalizedWebsite:Q.createAccount)}).catch(()=>{e(Q.createAccount)});return}if(a===`brand_kit`){n.put(`/after-login/create-brand-kit/skip-step`).then(s).catch(e=>r(e,i(`authActionFailed`)));return}let o=uG.find(e=>e.type===a);e(o?.path??Q.selectAccount)},[a]),(0,Z.jsx)(XW,{children:t.stay&&(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:`After login`,description:`Recommended step: ${a}`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:uG.map(t=>(0,Z.jsx)(`button`,{type:`button`,onClick:()=>e(t.path),className:`rounded-lg border border-border-secondary p-8 shadow-xs hover:scale-101`,children:(0,Z.jsx)(`p`,{className:`text-text-tertiary`,children:t.label})},t.type))})]})})}var fG=Intl?.supportedValuesOf?Intl.supportedValuesOf(`timeZone`):[],pG=10;function mG(e,t){return new Intl.DateTimeFormat(`en-CA`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`}).format(e)}function hG(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function gG(e){return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeZone:`UTC`}).format(new Date(`${e}T00:00:00Z`))}function _G(e,t){return new Intl.DateTimeFormat(void 0,{timeZone:t,hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}).format(e)}function vG(e,t){return(0,W.useMemo)(()=>{let n=e?.linkAvailability?.linkAvailabilityByDuration??{},[r]=Object.keys(n),i=r?Number(r):null,a=r?n[r]:[],o=Array.isArray(a)?a:a?.availabilities??[],s=new Map;for(let e of o){let n=mG(new Date(e.startMillisUtc),t);s.set(n,[...s.get(n)??[],e])}return{duration:i,byDay:s}},[e,t])}function yG(){let{t:e}=k(),{successToast:t,errorToast:n}=y(),r=Rt(),[i,a]=(0,W.useState)(`date`),[o,s]=(0,W.useState)(0),[c,l]=(0,W.useState)(),[u,d]=(0,W.useState)(),[f,p]=(0,W.useState)(),[m,h]=(0,W.useState)(),[g,_]=(0,W.useState)(!1),[v,b]=(0,W.useState)(),[x,S]=(0,W.useState)(pG),[C,w]=(0,W.useState)(()=>Intl.DateTimeFormat().resolvedOptions().timeZone);vt({url:`/after-login/introduction-meeting/availability?month_offset=${o}&timezone=${encodeURIComponent(C)}`,dataSetter:e=>b(e)});let{duration:T,byDay:E}=vG(v,C),ee=v===void 0||E.size>0,D=u?E.get(u)??[]:[],te=D.slice(0,x),ne=D.length>x,O=e=>{s(Math.max(0,e)),l(void 0),d(void 0),p(void 0),S(pG)};return m?(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1 py-4 text-center`,children:[(0,Z.jsx)(M,{as:`p`,variant:`headingMd`,children:e(`meetingBooked`)}),(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,className:`text-text-tertiary`,children:new Intl.DateTimeFormat(void 0,{dateStyle:`full`,timeStyle:`short`,timeZone:C}).format(new Date(m.startMillisUtc))})]}):(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,Z.jsxs)(`div`,{className:`flex w-full flex-row items-center gap-3 pt-4`,children:[(0,Z.jsx)(rr,{src:`https://ca.slack-edge.com/T0DRU197A-U0945KJL4TF-395809037f37-512`,className:`size-12`}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-start`,children:[(0,Z.jsx)(M,{as:`p`,variant:`headingSm`,children:e(`letIntroduceOurselves`)}),(0,Z.jsx)(M,{as:`p`,variant:`bodyMd`,tone:`secondary`,children:e(`bookYourIntroductionCallWith`,{name:`Nick`})})]})]}),i===`date`&&(0,Z.jsx)(vr,{mode:`single`,selected:c,onSelect:e=>{l(e);let t=e?hG(e):void 0;d(t),S(pG);let n=t?E.get(t)??[]:[];p(n[0]),a(`time`)},disabled:e=>ur(e,ut(new Date))||!E.has(hG(e)),onNextClick:()=>O(o+1),onPrevClick:()=>O(o-1),startMonth:or(new Date),endMonth:ee?void 0:$n(new Date,o),className:`w-full! p-0! [&_table]:w-full! [&_td]:w-full! [&_th]:w-full! [&_tr]:w-full!`,todayClassName:`border-0`,disabledClassName:`pointer-events-none opacity-40`,showYearSwitcher:!1}),i===`time`&&u&&(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsxs)(N,{variant:`tertiary`,onClick:()=>{a(`date`),l(void 0),d(void 0),p(void 0)},className:`w-fit`,size:`sm`,children:[(0,Z.jsx)(Vn,{className:`size-4`}),gG(u)]}),(0,Z.jsxs)($t,{className:`w-full`,children:[(0,Z.jsx)(F,{children:e(`timezone`)}),(0,Z.jsx)(ts,{options:fG,searchFn:(e,t)=>e.toLowerCase().includes(t.toLowerCase()),getOptionValue:e=>e,renderOption:e=>(0,Z.jsx)(M,{as:`p`,variant:`bodyMd`,children:e}),getDisplayValue:e=>(0,Z.jsx)(M,{as:`p`,variant:`bodyMd`,children:e}),value:C,onChange:e=>{w(e),p(void 0),S(pG)},isClearable:!1,noResultsMessage:e(`noTimezoneFound`)})]}),D.length>0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,children:e(`selectATime`)}),(0,Z.jsxs)(Os,{type:`single`,value:f?String(f.startMillisUtc):``,onValueChange:e=>{p(D.find(t=>String(t.startMillisUtc)===e))},className:`grid! grid-cols-[repeat(auto-fill,minmax(56px,1fr))] justify-items-start gap-2`,children:[te.map(e=>(0,Z.jsx)(Ds,{value:String(e.startMillisUtc),className:`tabular-nums`,children:_G(new Date(e.startMillisUtc),C)},e.startMillisUtc)),ne&&(0,Z.jsx)(N,{variant:`default`,onClick:()=>S(e=>e+pG),className:`col-span-3 w-fit`,size:`sm`,children:e(`loadMoreTimeslots`)})]})]}):(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,tone:`secondary`,className:`text-center`,children:e(`noAvailableTimes`)}),(0,Z.jsx)(N,{variant:`primary`,onClick:()=>{!f||!T||(_(!0),r.post(`/after-login/introduction-meeting/book`,{start_time:f.startMillisUtc,duration:T,timezone:C}).then(()=>{t(e(`meetingBooked`)),h(f)}
114).catch(t=>n(t,e(`authActionFailed`))).finally(()=>_(!1)))},disabled:!f||g,className:`w-full`,children:e(`confirmCall`)})]})]})}function bG(){let{t:e}=k(),{errorToast:t}=y(),{push:n}=be(),[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(0),[s,c]=(0,W.useState)(0),l=Rt(),u=`/after-login/configuring-account`,{mutate:d}=vt({url:u,dataSetter:e=>{o(e.progress),i(e.has_completed)},refreshInterval:r?null:1e3}),f=[e(`creatingLoyaltyProgram`),e(`setupInitialBusinessProfile`),e(`creatingContactsPortal`),e(`settingUpAutomatedEmails`),e(`creatingInitialWalletPass`)];return(0,W.useEffect)(()=>{l.post(u).then(()=>d()).catch(n=>t(n,e(`authActionFailed`)))},[]),(0,W.useEffect)(()=>{if(!r){let e=setInterval(()=>{c(e=>(e+1)%f.length)},4e3);return()=>clearInterval(e)}},[r]),(0,Z.jsx)(XW,{children:(0,Z.jsxs)(YW,{className:`mt-4!`,children:[(0,Z.jsx)(Va,{children:(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(Ha,{children:e(`bookYourIntroductionCall`)}),e(`bookYourIntroductionCallDescription`)&&(0,Z.jsx)(Ba,{children:e(`bookYourIntroductionCallDescription`)})]})}),(0,Z.jsx)(co,{className:`pt-0!`,children:(0,Z.jsx)(yG,{})}),(0,Z.jsx)(ri,{children:(0,Z.jsxs)(`div`,{className:`flex w-full flex-col items-center gap-4`,children:[(0,Z.jsxs)(`div`,{className:`flex w-full flex-col items-center`,children:[(0,Z.jsx)(`div`,{className:`relative h-16 w-full overflow-hidden py-4`,children:(0,Z.jsx)(Ki,{mode:`wait`,children:(0,Z.jsx)(Be.div,{initial:{y:`100%`,opacity:0},animate:{y:`0%`,opacity:1},exit:{y:`-100%`,opacity:0},transition:{duration:.7,ease:`easeInOut`},className:`absolute w-full text-center text-md text-text-tertiary`,children:r?e(`accountIsReady`):f[s]},s)})}),(0,Z.jsx)(_o,{percentage:a})]}),(0,Z.jsx)(N,{variant:`primary`,onClick:()=>{l.get(`/after-login/select-account`).then(e=>{let t=e.data.data;t?.length>0&&localStorage.setItem(`currentAccountId`,t[0].id),n(Q.home)}).catch(()=>n(Q.selectAccount))},disabled:!r,className:`w-full`,children:e(`continueToDashboard`)})]})})]})})}function xG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!==`__proto__`&&(e[r]=n[r])}return e}var SG={read:function(e){return e[0]===`"`&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function CG(e,t){function n(n,r,i){if(!(typeof document>`u`)){i=xG({},t,i),typeof i.expires==`number`&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a=``;for(var o in i)i[o]&&(a+=`; `+o,i[o]!==!0&&(a+=`=`+i[o].split(`;`)[0]));return document.cookie=n+`=`+e.write(r,n)+a}}function r(t){if(!(typeof document>`u`||arguments.length&&!t)){for(var n=document.cookie?document.cookie.split(`; `):[],r={},i=0;i<n.length;i++){var a=n[i].split(`=`),o=a.slice(1).join(`=`);try{var s=decodeURIComponent(a[0]);if(s in r||(r[s]=e.read(o,s)),t===s)break}catch{}}return t?r[t]:r}}return Object.create({set:n,get:r,remove:function(e,t){n(e,``,xG({},t,{expires:-1}))},withAttributes:function(e){return CG(this.converter,xG({},this.attributes,e))},withConverter:function(e){return CG(xG({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var wG=CG(SG,{path:`/`});function TG(){let{t:e}=k();return(0,Z.jsxs)(`div`,{className:`flex w-full items-center justify-center gap-5 py-6`,children:[(0,Z.jsx)(`a`,{href:`https://www.leat.com/legal/legal-notice`,target:`_blank`,rel:`noopener`,children:(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,tone:`tertiary`,className:`hover:underline md:text-sm`,children:e(`aboutUs`)})}),(0,Z.jsx)(`a`,{href:`https://www.leat.com/legal/terms-and-conditions`,target:`_blank`,rel:`noopener`,children:(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,tone:`tertiary`,className:`hover:underline md:text-sm`,children:e(`termsAndConditions`)})})]})}function EG(e){let{onClick:t,value:n,children:r}=e;return(0,Z.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,Z.jsx)(`div`,{className:`flex gap-2`,children:r}),(0,Z.jsx)(`div`,{children:(0,Z.jsx)(`div`,{className:`flex size-5 items-center justify-center rounded-full transition-bg hover:bg-bg-surface-selected`,onClick:e=>{e.stopPropagation(),t(n)},children:(0,Z.jsx)(ce,{className:`size-3.5`,color:`var(--neutral-500)`})})})]})}function DG(e){let{loading:t,onChange:n,values:r,industryOptions:i}=e,{t:a}=k(),[o,s]=(0,W.useState)(``),c=e=>{r.industry===e?n(`industry`,null):n(`industry`,e)};return(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(F,{children:a(`industry`)}),(0,Z.jsx)(mi,{loading:t,search:o,noValuesSelectedMessage:a(`industry`),filterFn:(e,t)=>{if(!e)return 1;let n=i.find(t=>t.value===e);return n?+!!n.label.toLowerCase().includes(t.toLowerCase()):0},setSearch:s,selected:Wt(r.industry),getDisplayValue:e=>(0,Z.jsx)(EG,{value:e,onClick:c,children:(0,Z.jsx)(`div`,{className:`leading-tight`,children:(0,Z.jsx)(Kt,{label:i.find(t=>t.value===e)?.label})})}),children:(0,Z.jsx)(Ae,{noResultsMessage:a(`noIndustryFound`),children:i.map(e=>(0,Z.jsx)(Hn,{value:e.value,onSelect:c,selected:Wt(r.industry).includes(e.label),children:(0,Z.jsx)(`div`,{className:`leading-tight`,children:(0,Z.jsx)(Kt,{label:e.label})})},e.value))})})]})}function OG(){let{t:e}=k(),[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({company:``,industry:``,country:``,website:``,phone:``,brand_color:``,logo:``}),{push:a}=be(),{errorToast:o}=y(),[s,c]=(0,W.useState)(!1),l=Rt(),u=lo(i),d=`/after-login/create-account`,f=iG(),{pending:p}=vt({url:d,dataSetter:e=>{n(e),i({company:``,industry:null,phone:``,website:f||e.website||``,country:e.country_value,brand_color:e.brand_color??``,logo:e.logo})}});(0,W.useEffect)(()=>
114{if(!t)return;let e=!1;return(lG()??l.post(`/after-login/company-enrichment`,{website:f||void 0}).then(e=>e.data.data)).then(n=>{e||!n||i(e=>({...e,company:e.company||n.prefill?.company||``,industry:e.industry||n.prefill?.industry||null,country:e.country&&e.country!==t.country_value?e.country:n.prefill?.country||e.country||``,website:e.website||n.prefill?.website||``,brand_color:e.brand_color||n.prefill?.brand_color||``,logo:e.logo||n.prefill?.logo||n.prefill?.logo_url||``}))}).catch(t=>{e||console.error(`Company enrichment failed`,t)}),()=>{e=!0}},[t]);let m=!!(r.company&&r.industry&&r.country&&r.website&&r.phone);return t?(0,Z.jsxs)(XW,{children:[(0,Z.jsxs)(YW,{children:[(0,Z.jsxs)(Va,{children:[(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(Ha,{children:`${e(`welcome`)}, ${t.user.first_name} `}),e(`helpUsSetUpAccount`)&&(0,Z.jsx)(Ba,{children:e(`helpUsSetUpAccount`)})]}),(0,Z.jsx)(Es,{children:(0,Z.jsx)(`img`,{className:`size-6 cursor-pointer`,src:rn()?QW:ZW,alt:`logo`,onClick:()=>a(`/`)})})]}),(0,Z.jsx)(co,{children:(0,Z.jsxs)(Ga,{onSubmit:()=>{c(!0),l.post(d,{company:r.company,industry:r.industry,country:r.country,website:r.website,phone:r.phone,campaign_url:wG.get(`__gtm_campaign_url`),referrer_url:wG.get(`__gtm_referrer`)}).then(()=>l.post(`/after-login/create-brand-kit`,sn({logo:r.logo,color:r.brand_color}))).then(()=>a(Q.configureAccount)).catch(t=>{o(t,e(`authActionFailed`)),c(!1)})},className:`flex flex-col gap-3`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`company`)}),(0,Z.jsx)(Pe,{name:`company`,placeholder:e(`company`),type:`text`,required:!0,value:r.company,onChange:e=>u(e.target.name,e.target.value)})]}),(0,Z.jsx)($t,{children:(0,Z.jsx)(DG,{industryOptions:t.industry_options,loading:p,values:r,onChange:u})}),(0,Z.jsx)($t,{children:(0,Z.jsx)(vo,{countries:t.countries,loading:p,selectedCountry:t.countries.find(e=>e.value===r.country),setSelectedCountry:e=>u(`country`,e.value)})}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`website`)}),(0,Z.jsx)(Pe,{name:`website`,placeholder:e(`website`),type:`text`,required:!0,value:r.website,onChange:e=>u(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`phone`)}),(0,Z.jsx)(Pe,{name:`phone`,placeholder:e(`phone`),type:`text`,required:!0,onChange:e=>u(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`brandColor`)}),(0,Z.jsx)($r,{name:`brand_color`,placeholder:`#ffffff`,color:r.brand_color,onChange:e=>u(`brand_color`,e)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`logo`)}),(0,Z.jsx)(Ns,{previewUrl:typeof r.logo==`string`?r.logo:null,onFileSelected:e=>u(`logo`,e),acceptedFileTypes:{"image/*":[`.jpeg`,`.jpg`,`.png`]}})]})]})}),(0,Z.jsx)(N,{type:`submit`,variant:`primary`,isLoading:s,disabled:!m,children:e(`continue`)})]})})]}),(0,Z.jsx)(TG,{})]}):null}function kG(){let{t:e}=k(),{push:t}=be(),n=rG(),[r,i]=(0,W.useState)(iG());if((0,W.useEffect)(()=>{n||t(Q.afterLogin)},[t,n]),!n)return null;let a=()=>{let e=r.trim();e&&(oG(e),t(Q.afterLogin))};return(0,Z.jsxs)(XW,{children:[(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(`welcome`),description:e(`whatCompanyDoYouWorkFor`)}),(0,Z.jsx)(co,{children:(0,Z.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),a()},className:`flex flex-col gap-4`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsx)(M,{as:`p`,variant:`bodyMd`,tone:`secondary`,children:e(`websiteNeededDescription`)}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`website`)}),(0,Z.jsx)(Pe,{name:`website`,placeholder:`https://example.com`,type:`text`,required:!0,value:r,onChange:e=>i(e.target.value)})]})]})}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(N,{type:`submit`,variant:`primary`,disabled:!r.trim(),children:e(`continue`)}),(0,Z.jsx)(N,{onClick:()=>t(Q.createAccount),children:e(`skip`)})]})]})})]}),(0,Z.jsx)(TG,{})]})}function AG(){let e=Yt(),t=Rt(),{errorToast:n}=y(),{destroy:r}=_n(),[i,a]=(0,W.useState)(!1),o=()=>{Object.keys(localStorage).filter(e=>/^\d+_selected_(giftcard|stripcard)_program_id$/.test(e)).forEac
114h(r)},s=()=>{o(),r(`token`),r(`currentAccountId`)};return{logoutPending:i,logout:()=>{a(!0),t.get(`/logout`).catch(n).finally(()=>{s(),e.forgetUser(),window.location.replace(`/login`)})}}}function jG(){let{t:e}=k(),{logout:t}=AG(),n=s();return(0,Z.jsxs)(XW,{children:[(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(`thisAccountIsInactive`),description:e(`accountIsInactiveDescription`)}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(N,{variant:`primary`,onClick:()=>n(Q.selectAccount),children:e(`selectDifferentAccount`)}),(0,Z.jsx)(N,{variant:`default`,onClick:()=>{t()},children:e(`logout`)})]})]}),(0,Z.jsx)(TG,{})]})}function MG(){let{login:e,switchToAccount:t}=Sn(),{queryParams:n,replace:r}=be(),{errorToast:i}=y(),{t:a}=k(),[o,s]=(0,W.useState)(new Ls),c=Rt();return(0,W.useEffect)(()=>{n.account_id&&n.token&&(e(n.token),c.get(`/accounts/${n.account_id}`).then(e=>s(e.data.data)).catch(e=>i(e,a(`authActionFailed`))))},[]),(0,W.useEffect)(()=>{o.id&&setTimeout(()=>{t(o.id),r(Q.start)},2e3)},[o]),(0,Z.jsx)(XW,{children:(0,Z.jsx)(`div`,{className:`flex grow flex-col items-center justify-center gap-4 p-4`,children:(0,Z.jsx)(M,{as:`p`,variant:`bodyLg`,className:`text-center`,children:`Misschien wil iemand van team tech wel een kopje koffie...`})})})}function NG(e){let{push:t}=be(),n=e?`&redirect=${encodeURIComponent(e)}`:``;return e=>{let r=encodeURIComponent(e.token);if(e.method===`email_code`){t(`${Q.loginWithEmailCode}?token=${r}${n}`);return}e.method===`authenticator_code`&&t(`${Q.loginWithAuthenticatorCode}?token=${r}${n}`)}}function PG(){let{queryParams:e}=be(),t=e.redirect;return typeof t==`string`&&t.startsWith(`/`)&&!t.startsWith(`//`)&&!t.includes(`\\`)&&!t.includes(`:`)?t:Q.afterLogin}function FG(){let{t:e}=k(),t=Rt(),{login:n,isLoggedIn:r}=Sn(),{push:i}=be(),a=PG(),{errorToast:o}=y(),[s,c]=(0,W.useState)(!1),[l]=Ln(`token`),[u,d]=(0,W.useState)(``);(0,W.useEffect)(()=>{r()&&bt(Q.home)},[]),(0,W.useEffect)(()=>{u.length==6&&f()},[u]);let f=()=>{c(!0),t.post(`/login-with-authenticator-code`,{code:u,token:l}).then(e=>{let t=e.data.data.token;n(t),i(a)}).catch(t=>{c(!1),o(t,e(`authActionFailed`))})};return(0,Z.jsxs)(XW,{children:[(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(`logIn`),description:e(`useYourAuthenticatorAppToGenerateACode`)}),(0,Z.jsxs)(co,{className:`flex w-full flex-col items-center gap-2`,children:[(0,Z.jsx)(Wo,{onChange:e=>d(e),value:u,name:`code`,className:`w-full justify-between space-x-4`,inputMode:`tel`,type:`number`,fields:6,inputStyle:{MozAppearance:`textfield`,width:`60px`,height:`55px`,fontSize:`19px`,borderRadius:`8px`,fontWeight:`500`,borderWidth:`1px`,borderStyle:`solid`,textAlign:`center`,color:`var(--text-default)`}}),(0,Z.jsxs)(`div`,{className:`mt-3 flex items-center justify-center gap-1`,children:[(0,Z.jsx)(`p`,{className:`font-extralight text-sm text-text-secondary`,children:e(`troubleLoggingIn`)}),(0,Z.jsx)(`a`,{href:`mailto:${Ke.support}?subject=Trouble logging in using MFA&body=I am having trouble logging in with Multi factor authentication. Can you help me?`,children:(0,Z.jsx)(`p`,{className:`text-primary-600 text-sm`,children:e(`contactSupport`)})})]})]})]}),(0,Z.jsx)(TG,{})]})}function IG(e={}){let{nonce:t,locale:n,onScriptLoadSuccess:r,onScriptLoadError:i}=e,[a,o]=(0,W.useState)(!1),s=(0,W.useRef)(r);s.current=r;let c=(0,W.useRef)(i);return c.current=i,(0,W.useEffect)(()=>{let e=document.createElement(`script`);return e.src=`https://accounts.google.com/gsi/client`,n&&(e.src+=`?hl=${n}`),e.async=!0,e.defer=!0,e.nonce=t,e.onload=()=>{var e;o(!0),(e=s.current)==null||e.call(s)},e.onerror=()=>{var e;o(!1),(e=c.current)==null||e.call(c)},document.body.appendChild(e),()=>{document.body.removeChild(e)}},[t]),a}var LG=(0,W.createContext)(null);function RG({clientId:e,nonce:t,locale:n,onScriptLoadSuccess:r,onScriptLoadError:i,children:a}){let o=IG({nonce:t,onScriptLoadSuccess:r,onScriptLoadError:i,locale:n}),s=(0,W.useMemo)(()=>({locale:n,clientId:e,scriptLoadedSuccessfully:o}),[e,o]);return W.createElement(LG.Provider,{value:s},a)}function zG(){let e=(0,W.useContext)(LG);if(!e)throw Error(`Google OAuth components must be used within GoogleOAuthProvider`);return e}function BG({flow:e=`implicit`,scope:t=``,onSuccess:n,onError:r,onNonOAuthError:i,overrideScope:a,state:o,...s}){let{clientId:c,scriptLoadedSuccessfully:l}=zG(),u=(0,W.useRef)(),d=(0,W.useRef)(n);d.current=n;let f=(0,W.useRef)(r);f.current=r;let p=(0,W.useRef)(i);p.current=i,(0,W.useEffect)(()=>
114{if(!l)return;let n=e===`implicit`?`initTokenClient`:`initCodeClient`,r=((window==null?void 0:window.google)?.accounts)?.oauth2[n]({client_id:c,scope:a?t:`openid profile email ${t}`,callback:e=>{var t;if(e.error)return f.current?.call(f,e);(t=d.current)==null||t.call(d,e)},error_callback:e=>{var t;(t=p.current)==null||t.call(p,e)},state:o,...s});u.current=r},[c,l,e,t,o]);let m=(0,W.useCallback)(e=>u.current?.requestAccessToken(e),[]),h=(0,W.useCallback)(()=>u.current?.requestCode(),[]);return e===`implicit`?m:h}function VG(e){let{t}=k(),{pending:n,onClick:r}=e,i=BG({onSuccess:e=>r(e.access_token)});return(0,Z.jsxs)(`button`,{type:`button`,disabled:n,onClick:()=>i(),"aria-label":t(`signInWithGoogle`),className:`flex w-full items-center justify-center rounded-md p-0.5 text-text-default ${n?`cursor-not-allowed bg-bg-button-disabled`:`bg-bg-button-default pr-3 shadow-button-default hover:bg-bg-button-hover hover:shadow-button-hover active:bg-bg-button-active active:shadow-button-active`}`,children:[(0,Z.jsx)(`div`,{className:`flex size-9 items-center justify-center rounded-l`,children:n?(0,Z.jsx)(c,{className:`size-5`}):(0,Z.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,className:`size-5`,children:[(0,Z.jsx)(`title`,{children:t(`signInWithGoogle`)}),(0,Z.jsx)(`desc`,{children:`Google G Logo`}),(0,Z.jsx)(`path`,{d:`M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z`,className:`fill-[#4285f4]`}),(0,Z.jsx)(`path`,{d:`M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z`,className:`fill-[#34a853]`}),(0,Z.jsx)(`path`,{d:`M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z`,className:`fill-[#fbbc05]`}),(0,Z.jsx)(`path`,{d:`M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z`,className:`fill-[#ea4335]`})]})}),!n&&(0,Z.jsx)(`span`,{className:`text-sm text-text-default tracking-wider`,children:t(`signInWithGoogle`)})]})}var HG=`736434070411-o1v5vuk95c6ubn5n3d9ktt1grr45jcp2.apps.googleusercontent.com`,UG=`g_auth_token`;function WG(e){let t=Rt(),{set:n}=_n(),{push:r}=be(),[i,a]=W.useState(!1);return(0,Z.jsx)(RG,{clientId:HG,children:(0,Z.jsx)(VG,{pending:i,onClick:i=>{a(!0),t.post(e.authUrl,{token:i}).then(t=>e.onSuccess(t.data.data)).catch(t=>{if(t.code==Mt.USER_NOT_LINKED_TO_SOCIAL){n(UG,i),r(Q.linkSocialRoute);return}if(t.code==Mt.USER_EXISTS_LOGIN_WITH_SOCIAL){n(UG,i),r(Q.linkSocialRoute);return}e.onError(t),a(!1)})}})})}var GG=e=>{let[t,n]=(0,W.useState)(!1),r=()=>{n(e=>!e)};return(0,Z.jsxs)(xt,{className:`group`,children:[(0,Z.jsx)(Pe,{"data-slot":`suffix`,type:t?`text`:`password`,...e}),(0,Z.jsx)(N,{"data-slot":`suffix`,onClick:r,asChild:!0,tabIndex:0,onKeyDown:e=>e.key===`Enter`&&r(),className:`relative flex items-center justify-center rounded-xs p-0.5 opacity-0 transition-opacity ease-in-out focus:shadow-focus-ring active::opacity-100 group-focus-within:opacity-100 group-hover:opacity-100`,children:t?(0,Z.jsx)(Yo,{className:`size-4 text-icon-secondary-default hover:cursor-pointer`}):(0,Z.jsx)(Sr,{className:`size-4 text-icon-secondary-default hover:cursor-pointer`})})]})};function KG(){let{t:e}=k(),t=Rt(),{isLoggedIn:n}=Sn(),r=NG(),{push:i,queryParams:a}=be(),{successToast:o,errorToast:s}=y(),[c,l]=(0,W.useState)(null),[u,d]=(0,W.useState)(!1),[f,p]=(0,W.useState)(``),[m,h]=(0,W.useState)(``);return(0,W.useEffect)(()=>{a.confirmOrder&&localStorage.setItem(`confirmOrder`,`true`)},[]),(0,W.useEffect)(()=>{n()&&bt(Q.start)},[]),(0,Z.jsxs)(XW,{children:[(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(`logIn`),description:e(`continueToBusinessDashboard`)}),(0,Z.jsxs)(co,{className:`flex flex-col gap-7`,children:[c&&(0,Z.jsxs)(di,{tone:`warning`,children:[(0,Z.jsx)(Mi,{tone:`warning`}),(0,Z.jsxs)(Hi,{children:[(0,Z.jsx)(M,{as:`span`,tone:`warning`,children:e(`pleaseVerifyUser`)}),(0,Z.jsx)(zs,{children:(0,Z.jsx)(N,{onClick:()=>{t.post(`/verify/send`,{email:f}).then(()=>o(e(`resendVerificationEmail`))).catch(t=>s(t,e(`authActionFailed`))).finally(()=>l(!1))},children:e(`clickToResendVerification`)})})]})]}),(0,Z.jsx)(`div`,{className:`flex w-full justify-center`,children:(0,Z.jsx)(WG,{onError:t=>{s(t,e(`googleAuthFailed`)),console.error(t)},onSuccess:e=>r(e),authUrl:`/social/google/login`})}),(0,Z.jsx)(Si,{text:e(`or`)}),(0,Z.jsxs)(Ga,{onSubmit:()=>{f&&m&&(d(!0),t.post(`/login-with-credentials`,{email:f,password:m}).then(e=>{r(e.data.data)}).catch(t=>{if(t.message.includes(`Your account has not been verified yet. Please check your inbox.`)){l(!0),d(!1);return}d(!1),s(t,e(`authActionFailed`))}))},className:`flex flex-col gap-3`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`email`)}),(0,Z.jsx)(Pe,{name:`email`,placeholder:e(`[email protected]`),autoComplete:`email`,value:f,type:`email`,required:!0,onChange:e=>p(e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`password`)}),(0,Z.jsx)(GG,{autoComplete:`current-password`,value:m,required:!0,onChange:e=>h(e.target.value)})]})]})}),(0,Z.jsx)(N,{isLoading:u,variant:`primary`,disabled:!f||!m,type:`submit`,children:e(`onboardingLogin`)}),(0,Z.jsx)(ai,{to:Q.forgotPassword,className:`flex justify-center text-sm`,removeUnderline:!0,children:e(`forgotYourPassword`)})]}),!1]}),(0,Z.jsxs)(ri,{className:`flex items-center justify-center gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-sm text-text-default`,children:e(`newToPiggy`)}),(0,Z.jsxs)(ai,{to:Q.signUpRoute,removeUnderline:!0,className:`inline-flex items-center gap-1 text-sm hover:underline`,children:[e(`getStarted`),(0,Z.jsx)(ke,{className:`size-4`})]})]})]}),(0,Z.jsx)(TG,{})]})}function qG(){let{t:e}=k(),t=Rt(),{login:n,isLoggedIn:r}=Sn(),{push:i,queryParams:a}=be(),o=PG(),{successToast:s,errorToast:c}=y(),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(!1),[p,m]=Ln(`token`),[h,g]=(0,W.useState)(``);(0,W.useEffect)(()=>{r()&&bt(Q.home)},[]),(0,W.useEffect)(()=>{h.length==6&&_()},[h]);let _=()=>{f(!0),t.post(`/login-with-email-code`,{code:h,token:p}).then(e=>{let t=e.data.data.token;n(t),i(o)}).catch(t=>{f(!1),c(t,e(`authActionFailed`))})};return(0,Z.jsxs)(XW,{children:[(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(`logIn`),description:e(`loginToYourAccountUsingEmailCode`)}
114),(0,Z.jsxs)(co,{className:`p-4`,children:[(0,Z.jsx)(Wo,{onChange:e=>g(e),value:h,name:`code`,className:`w-full justify-between space-x-4`,inputMode:`tel`,type:`number`,fields:6,inputStyle:{MozAppearance:`textfield`,width:`60px`,height:`55px`,fontSize:`19px`,borderRadius:`8px`,fontWeight:`500`,borderWidth:`1px`,borderStyle:`solid`,textAlign:`center`}}),(0,Z.jsxs)(`div`,{className:`mt-3 flex items-center justify-center gap-1`,children:[(0,Z.jsx)(`p`,{className:`text-sm text-text-tertiary`,children:e(`troubleLoggingIn`)}),(0,Z.jsx)(`a`,{href:`mailto:${Ke.support}?subject=Trouble logging in using MFA&body=I am having trouble logging in with Multi factor authentication. Can you help me?`,children:(0,Z.jsx)(`p`,{className:`text-sm text-text-link-default`,children:e(`contactSupport`)})})]})]})]}),(0,Z.jsx)(TG,{})]})}function JG({name:e,image:t,onClick:n,disabled:r=!1,inactive:i=!1,dimmed:a=!1,pending:o=!1}){let{t:s}=k();return(0,Z.jsxs)(`button`,{type:`button`,onClick:n,disabled:r,"aria-busy":o,className:jn(`flex items-center gap-4 roun
114ded-lg bg-bg-fill-default p-2 text-left transition-all disabled:cursor-not-allowed`,i?`border border-border-default opacity-50`:`shadow-button-default hover:bg-bg-fill-hover hover:shadow-button-hover active:shadow-button-active`,a&&`opacity-50`),children:[(0,Z.jsx)(uo,{className:`size-12`,src:t,alt:e}),(0,Z.jsx)(M,{as:`p`,variant:`headingMd`,children:e}),o&&(0,Z.jsx)(`span`,{className:`mr-3 ml-auto`,children:(0,Z.jsx)(c,{accessibilityLabel:s(`loading`)})})]})}function YG({accounts:e,failed:t,onPick:n}){let{t:r}=k();return t?(0,Z.jsx)(si,{tone:`critical`,children:(0,Z.jsx)(Hi,{children:(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,children:r(`somethingWentWrongTryAgain`)})})}):e===null?(0,Z.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,Z.jsx)(c,{})}):e.length===0?(0,Z.jsx)(si,{tone:`warning`,children:(0,Z.jsx)(Hi,{children:(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,children:r(`mcpAuthorizeNoAccounts`)})})}):(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(M,{as:`p`,variant:`headingSm`,children:r(`mcpAuthorizeChooseAccount`)}),(0,Z.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.map(e=>(0,Z.jsx)(JG,{name:e.account_name,image:e.account_image,onClick:()=>n(e.integration)},e.integration))})]})}function XG({callbackUri:e}){let{t}=k();return(0,Z.jsx)(si,{tone:`warning`,children:(0,Z.jsxs)(Hi,{children:[(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,color:`secondary`,className:`break-all`,children:t(`mcpAuthorizeCallbackHost`,{host:e})}),(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,children:t(`mcpAuthorizeCallbackWarning`)})]})})}function ZG({account:e,onChange:t}){let{t:n}=k();
114return(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 rounded-lg bg-bg-fill-default p-2 shadow-button-default`,children:[(0,Z.jsx)(uo,{className:`size-12`,src:e.account_image,alt:e.account_name}),(0,Z.jsx)(M,{as:`p`,variant:`headingMd`,className:`grow`,children:e.account_name}),t&&(0,Z.jsx)(N,{variant:`tertiary`,onClick:t,children:n(`mcpAuthorizeChangeAccount`)})]})}function QG({pending:e,canAllow:t,onAllow:n,onDeny:r}){let{t:i}=k();return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(N,{variant:`primary`,isLoading:e,disabled:!t,onClick:n,children:i(`allow`)}),(0,Z.jsx)(N,{variant:`default`,disabled:e,onClick:r,children:i(`cancel`)})]})}function $G({clientName:e}){let{t}=k();return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(M,{as:`p`,variant:`headingSm`,children:t(`mcpAuthorizeCapabilitiesTitle`,{clientName:e})}),(0,Z.jsxs)(`ul`,{className:`flex flex-col gap-2`,children:[(0,Z.jsxs)(`li`,{className:`flex gap-2`,children:[(0,Z.jsx)(Sr,{className:`mt-0.5 size-4 shrink-0 text-icon-secondary-default`}),(0,Z.jsx)(M,{as:`span`,variant:`bodyMd`,children:t(`mcpAuthorizeCapabilityRead`)})]}),(0,Z.jsxs)(`li`,{className:`flex gap-2`,children:[(0,Z.jsx)(Bo,{className:`mt-0.5 size-4 shrink-0 text-icon-secondary-default`}),(0,Z.jsx)(M,{as:`span`,variant:`bodyMd`,children:t(`mcpAuthorizeCapabilityCreateReward`)})]})]})]})}function eK(){let{t:e}=k();return(0,Z.jsx)(si,{tone:`critical`,children:(0,Z.jsxs)(Hi,{children:[(0,Z.jsx)(M,{as:`p`,variant:`headingSm`,children:e(`mcpAuthorizeInvalidRequest`)}),(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,children:e(`mcpAuthorizeInvalidRequestDescription`)})]})})}function tK(){let{t:e}=k();return(0,Z.jsx)(si,{tone:`warning`,children:(0,Z.jsx)(Hi,{children:(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,children:e(`mcpAuthorizeUnverifiedClient`)})})})}var nK=/^[0-9a-f-]{36}$/i;function rK(e){let t=e.get(`client_id`),n=e.get(`redirect_uri`),r=e.get(`code_challenge`),i=e.get(`resource`),a=i?.split(`/`).filter(Boolean).pop();return{clientId:t,redirectUri:n,codeChallenge:r,codeChallengeMethod:e.get(`code_challenge_method`)??`S256`,responseType:e.get(`response_type`)??`code`,scope:e.get(`scope`)??`mcp:use`,state:e.get(`state`),resource:i,integrationUuid:a&&nK.test(a)?a:null,isValid:!!t&&!!n&&!!r}}function iK(e){let t=Rt(),[n,r]=(0,W.useState)(null),[i,a]=(0,W.useState)(!1),[o,s]=(0,W.useState)(null);return(0,W.useEffect)(()=>{e&&t.get(`/api/mcp/oauth/accounts`,{},{baseURL:Pt.API_HOST}).then(e=>{let t=e.data?.data??[];r(t),t.length===1&&s(t[0].integration)}).catch(()=>a(!0))},[e]),{accounts:n,failed:i,picked:o,setPicked:s}}function aK(e,t){let n=Rt(),[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{!e||!t||n.get(`/api/mcp/oauth/connection`,{integration:t},{baseURL:Pt.API_HOST}).then(e=>{let n=e.data?.data??e.data;i({integration:t,account_name:n.account_name,account_image:n.account_image??null,personal_data:!!n.personal_data})}).catch(()=>o(!0))},[e,t]),{account:r,failed:a}}function oK(e,t,n){let r=Rt(),[i,a]=(0,W.useState)(null),[o,s]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{a(null),s(!1),!(!e||!t||!n)&&r.get(`/api/mcp/oauth/client`,{client_id:t,redirect_uri:n},{baseURL:Pt.API_HOST}).then(e=>{let t=e.data?.data??e.data;a(t?.client_name?{name:t.client_name,callbackUri:t.redirect_uri??null,issuer:t.issuer??null}:null)}).catch(()=>a(null)).finally(()=>s(!0))},[e,t,n]),{client:i,checked:o}}function sK(){let{t:e}=k(),{errorToast:t}=y(),{logout:n}=Sn(),r=Rt(),{getToken:i}=Mn(),a=i(),o=ye(),[s]=at(),[l,u]=(0,W.useState)(!1),[d,f]=(0,W.useState)(null),p=rK(s),m=!!a,{client:h,checked:g}=oK(m,p.clientId,p.redirectUri),_=aK(m,p.integrationUuid),{accounts:v,failed:b,picked:x,setPicked:S}=iK(m&&!p.integrationUuid),C=p.integrationUuid?_.account:v?.find(e=>e.integration===x)??null,w=d??C?.personal_data??!1,T=!p.integrationUuid&&(v?.length??0)>1,E=h?.name??e(`mcpAuthorizeDefaultClientName`);if(!a)return sessionStorage.setItem(`redirect_url`,o.pathname+o.search),(0,Z.jsx)(pt,{to:`/`});let ee=e=>{S(e),f(null)},D=()=>{!p.isValid||l||!C||!h||(u(!0),r.post(`/api/mcp/oauth/approve`,{client_id:p.clientId,redirect_uri:p.redirectUri,response_type:p.responseType,scope:p.scope,state:p.state,code_challenge:p.codeChallenge,code_challenge_method:p.codeChallengeMethod,integration:C.integration,resource:p.resource,personal_data:w},{baseURL:Pt.API_HOST}).then(e=>{let t=e.data?.data?.redirect_url??e.data?.redirect_url;t?bt(t):u(!1)}).catch(n=>{t(n,e(`authActionFailed`)),u(!1)}))},te=()=>{if(!h?.callbackUri){bt(`/`);return}
114let e=new URLSearchParams({error:`access_denied`});p.state&&e.set(`state`,p.state),h.issuer&&e.set(`iss`,h.issuer),bt(`${h.callbackUri}?${e.toString()}`)},ne;return ne=p.isValid?g&&!h?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(tK,{}),(0,Z.jsx)(QG,{pending:!1,canAllow:!1,onAllow:D,onDeny:te})]}):!C&&p.integrationUuid?_.failed?(0,Z.jsx)(si,{tone:`critical`,children:(0,Z.jsx)(Hi,{children:(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,children:e(`somethingWentWrongTryAgain`)})})}):(0,Z.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,Z.jsx)(c,{})}):C?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ZG,{account:C,onChange:T?()=>ee(null):void 0}),(0,Z.jsx)($G,{clientName:E}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4 border-border-default border-t pt-4`,children:[(0,Z.jsx)(Vo,{checked:w,disabled:l,onChange:f}),(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,tone:`secondary`,children:e(`mcpPersonalDataChangeLater`)})]}),h?.callbackUri&&(0,Z.jsx)(XG,{callbackUri:h.callbackUri}),(0,Z.jsx)(QG,{pending:l,canAllow:!!h,onAllow:D,onDeny:te})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(YG,{accounts:v,failed:b,onPick:ee}),(0,Z.jsx)(N,{variant:`default`,onClick:te,children:e(`cancel`)})]}):(0,Z.jsx)(eK,{}),(0,Z.jsx)(XW,{children:(0,Z.jsxs)(`div`,{className:`flex grow flex-col items-center justify-center gap-4 p-4`,children:[(0,Z.jsxs)(YW,{className:`flex grow-0 flex-col`,children:[(0,Z.jsx)($W,{title:e(`mcpAuthorizeTitle`),description:e(`mcpAuthorizeDescription`,{clientName:E})}),(0,Z.jsx)(co,{children:(0,Z.jsx)(`div`,{className:`flex flex-col gap-4`,children:ne})})]}),(0,Z.jsx)(`div`,{className:`flex w-full justify-end`,children:(0,Z.jsx)(N,{variant:`default`,onClick:()=>n(!0),children:e(`logout`)})})]})})}function cK(){let{t:e}=k(),[t,n]=(0,W.useState)([]),{push:r}=be(),{errorToast:i,successToast:a}=y(),[o,s]=(0,W.useState)(null),[c,l]=(0,W.useState)(!1),u=Rt(),[d,f]=(0,W.useState)(!1),p=`/after-login/pending-invitations`,{pending:m}=vt({url:p,dataSetter:n});return(0,W.useEffect)(()=>{f(!!o)},[o]),(0,Z.jsx)(XW,{children:(0,Z.jsxs)(`div`,{className:`flex grow flex-col items-center justify-center gap-4 p-4`,children:[(0,Z.jsxs)(YW,{className:`flex grow-0 flex-col`,children:[(0,Z.jsx)($W,{title:e(`invitations`)}),(0,Z.jsxs)(co,{children:[!m&&t.length===0&&(0,Z.jsx)(M,{as:`p`,tone:`secondary`,children:`You have no pending invitations`}),t.map(e=>(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>
114s(e),className:`flex w-full flex-row items-center gap-4 rounded-xs bg-bg-fill-default p-2 shadow-button-default hover:bg-bg-fill-hover hover:shadow-button-hover active:shadow-button-active`,children:[(0,Z.jsx)(uo,{className:`size-12`,src:e.image,alt:e.invited_for_account}),(0,Z.jsx)(M,{as:`p`,variant:`headingMd`,children:e.invited_for_account})]},e.id)),(0,Z.jsx)(St,{open:d,onOpenChange:e=>{f(e),e||s(null)},children:(0,Z.jsxs)(Ye,{children:[(0,Z.jsxs)(Nt,{children:[(0,Z.jsx)(Lt,{children:e(`confirm`)}),(0,Z.jsx)(Tn,{hidden:!0,children:e(`confirmInvitation`)})]}),(0,Z.jsx)(Dt,{className:`p-4`,children:e(`wantToAcceptInvitation`,{account:o?.invited_for_account})}),(0,Z.jsxs)(We,{children:[(0,Z.jsx)(N,{variant:`primary`,onClick:()=>{l(!0),u.post(`${p}/${o.id}/accept`).then(()=>{a(e(`invitationAccepted`)),r(Q.selectAccount)}).catch(t=>i(t,e(`authActionFailed`))).finally(()=>l(!1))},isLoading:c,children:e(`accept`)}),(0,Z.jsx)(N,{onClick:()=>{l(!0),u.post(`${p}/${o.id}/decline`).then(()=>{a(e(`invitationDeclined`)),r(Q.selectAccount)}).catch(t=>i(t,e(`authActionFailed`))).finally(()=>l(!1))},isLoading:c,children:e(`decline`)})]})]})})]})]}),(0,Z.jsx)(`div`,{className:`flex w-full justify-end`,children:(0,Z.jsx)(N,{className:`mt-2`,value:`default`,onClick:()=>r(Q.afterLogin),isLoading:c,children:e(`back`)})})]})})}function lK(){let{t:e}=k(),{logout:t}=Sn(),{push:n}=be(),[r,i]=(0,W.useState)([]),[a,o]=(0,W.useState)(null);vt({url:`/after-login/select-account`,dataSetter:i});let s=e=>{a||(o(e.id),setTimeout(()=>{localStorage.setItem(`currentAccountId`,e.id);let t=sessionStorage.getItem(`redirect_url`);t?(sessionStorage.removeItem(`redirect_url`),n(t)):n(Q.start)},600))};return(0,Z.jsx)(XW,{children:(0,Z.jsxs)(`div`,{className:`flex grow flex-col items-center justify-center gap-4 p-4`,children:[(0,Z.jsxs)(YW,{className:`flex grow-0 flex-col`,children:[(0,Z.jsx)($W,{title:`Account`,description:e(`chooseAnAccount`)}),(0,Z.jsx)(co,{children:(0,Z.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:r.map(e=>{let t=a===e.id;return(0,Z.jsx)(JG,{name:e.company,image:e.image,onClick:()=>s(e),disabled:!e.active||a!==null,inactive:!e.active,dimmed:a!==null&&!t,pending:t},e.id)})})})]}),(0,Z.jsx)(`div`,{className:`flex w-full justify-end`,children:(0,Z.jsx)(N,{variant:`default`,onClick:()=>t(!0),children:e(`logout`)})})]})})}function uK(){let{t:e}=k(),{successToast:t,errorToast:n}=y(),r=Rt(),[i,a]=(0,W.useState)(!1),{push:o,queryParams:s}=be(),c=s?.email,{login:l}=Sn(),[u,d]=(0,W.useState)(``),[f,p]=(0,W.useState)(!1),m=window.innerWidth<640,h=()=>{i||(a(!0),r.post(`/verify/send`,{email:c}).then(()=>t(e(`resendVerificationEmail`))).catch(t=>n(t,e(`authActionFailed`))).finally(()=>{setTimeout(()=>{a(!1)},6e4)}))},g=()=>{p(!0),r.post(`/verify/code`,{code:u,email:c}).then(n=>{t(e(`emailVerified`)),n.data.data.signup_flow&&tG(n.data.data.signup_flow),l(n.data.data.token),o(Q.afterLogin)}).catch(t=>n(t,e(`authActionFailed`))).finally(()=>p(!1))};return(0,W.useEffect)(()=>{u?.length===6&&g()},[u]),(0,W.useEffect)(()=>{c||o(Q.login)},[]),(0,Z.jsxs)(XW,{children:[(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(`verifyEmail`),description:e(`emailSentTo`,{email:c})}),(0,Z.jsxs)(co,{className:`flex w-full flex-col gap-4`,children:[(0,Z.jsx)(`p`,{className:`font-extralight text-sm text-text-secondary`,children:e(`pleaseCheckYourInbox`)}),(0,Z.jsx)(Wo,{onChange:e=>d(e),value:u,name:`code`,disabled:f,className:`w-full justify-between space-x-4`,inputMode:`tel`,fields:6,inputStyle:{MozAppearance:`textfield`,width:m?`45px`:`60px`,height:m?`50px`:`65px`,fontSize:m?`16px`:`19px`,borderRadius:`8px`,fontWeight:`400`,borderWidth:`1px`,borderStyle:`solid`,textAlign:`center`}}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(N,{isLoading:f,variant:`primary`,disabled:u?.length<6,onClick:g,children:e(`verify`)}),(0,Z.jsx)(N,{type:`button`,variant:`tertiary`,onClick:h,children:e(`resendEmail`)})]})]})]}),(0,Z.jsx)(TG,{})]})}function dK(){return{push:e=>{if(!window.dataLayer){console.warn(`dataLayer is not defined`);return}dataLayer.push(e)}}}function fK(){let{t:e}=k(),t=dK(),n=Rt(),{login:r}=Sn(),i=NG(),{push:a,queryParams:o}=be(),{successToast:s,errorToast:c}=y(),[l,u]=(0,W.useState)(!1),[d,f]=(0,W.useState)({firstname:o.firstName??``,lastname:o.lastName??``,email:o.email?o.email.toString():``,password:``,password_confirmation:``,terms_and_conditions:!1}),p=lo(f),m=!!(d.firstname&&d.lastname&&d.email&&d.password&&d.password_confirmation&&d.terms_and_conditions),h=()=>{u(!0),n.post(`/sign-up`,d).then(()=>{s(e(`signUpSuccessfulCheckYourInbox`)),t.push({event:`sign_up`}),a(`${Q.checkEmail}?email=${hn(d.email)}`)}).catch(t=>{c(t,e(`authActionFailed`)),u(!1)})},g=t=>{s(e(`googleSignUpSuccessful`)),r(t),a(Q.afterLogin)};return(0,Z.jsxs)(XW,{children:[(0,Z.jsxs)(YW,{children:[(0,Z.jsxs)(Va,{children:[(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(Ha,{children:e(`signUp`)}),e(`tryPiggyForFree`)&&(0,Z.jsx)(Ba,{children:e(`tryPiggyForFree`)})]}),(0,Z.jsx)(`img`,{className:`size-6 cursor-pointer`,src:rn()?QW:ZW,alt:`logo`,onClick:()=>a(`/`)})]}),(0,Z.jsxs)(co,{className:`space-y-6`,children:[(0,Z.jsx)(`div`,{className:`flex justify-center`,children:(0,Z.jsx)(WG,{onError:t=>c(t,e(`googleAuthFailed`)),authUrl:`/social/google/sign-up`,onSuccess:e=>{if(e.method){i(e);return}g(e.token)}})}),(0,Z.jsx)(Si,{text:e(`or`)}),(0,Z.jsxs)(Ga,{onSubmit:h,className:`flex flex-col gap-3`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)(xn,{children:[(0,Z.jsxs)($t,{className:`w-full`,children:[(0,Z.jsx)(F,{children:e(`firstName`)}),(0,Z.jsx)(Pe,{name:`firstname`,placeholder:`John`,autoComplete:`given-name`,value:d.firstname,type:`text`,required:!0,onChange:e=>p(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{className:`w-full`,children:[(0,Z.jsx)(F,{children:e(`lastName`)}),(0,Z.jsx)(Pe,{name:`lastname`,placeholder:`Doe`,autoComplete:`family-name`,value:d.lastname,type:`text`,required:!0,onChange:e=>p(e.target.name,e.target.value)})]})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`email`)}),(0,Z.jsx)(Pe,{name:`email`,placeholder:`[email protected]`,autoComplete:`email`,value:d.email,type:`email`,required:!0,onChange:e=>p(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`password`)}),(0,Z.jsx)(GG,{name:`password`,autoComplete:`new-password`,value:d.password,required:!0,onChange:e=>p(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`confirmPassword`)}),(0,Z.jsx)(GG,{name:`password_confirmation`,autoComplete:`new-password`,value:d.password_confirmation,required:!0,onChange:e=>p(e.target.name,e.target.value)})]}),(0,Z.jsxs)(cr,{children:[(0,Z.jsx)(dr,{name:`terms_and_conditions`,checked:d.terms_and_conditions,onChange:e=>p(`terms_and_conditions`,e)}),(0,Z.jsx)(F,{onClickCapture:e=>e.stopPropagation(),dangerouslySetInnerHTML:{__html:e(`iAgreeWithTheTerms`,{terms:`https://www.leat.com/legal/terms-and-conditions`,privacy:`https://www.leat.com/legal/privacy-policy`})}})]})]})}),(0,Z.jsx)(N,{isLoading:l,variant:`primary`,disabled:!m,type:`submit`,children:e(`create`)})]})]}),(0,Z.jsxs)(ri,{className:`flex items-center justify-center gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-sm text-text-default`,children:e(`alreadyHaveAnAccount`)}),(0,Z.jsxs)(ai,{removeUnderline:!0,to:Q.login,className:`inline-flex items-center gap-1 text-sm hover:underline`,children:[e(`logIn`),(0,Z.jsx)(ke,{className:`size-4`})]})]})]}),(0,Z.jsx)(TG,{})]})}function pK(){let{t:e}=k(),t=Rt(),{login:n}=Sn(),{push:r,queryParams:i}=be(),a=i.token?.toString(),{errorToast:o}=y(),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)({email:``,invited_by_account:``}),[d,f]=(0,W.useState)({first_name:``,last_name:``,password:``,password_confirmation:``}),p=lo(f),m=`/invitation/sign-up`;return vt({url:m,params:i,dataSetter:u}),(0,Z.jsxs)(XW,{children:[(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(`signUp`),description:e(`invitedByAccount`,{company:l.invited_by_account})}),(0,Z.jsx)(co,{children:a?(0,Z.jsx)(Ga,{onSubmit:()=>{c(!0),t.post(m,{...d,token:a}).then(e=>{n(e.data.data.token),r(Q.pendingInvitations)}).catch(t=>{o(t,e(`authActionFailed`)),c(!1)})},className:`flex flex-col gap-3`,children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`email`)}),(0,Z.jsx)(Ya,{children:l.email})]}),(0,Z.jsxs)(xn,{children:[(0,Z.jsxs)($t,{className:`w-full`,children:[(0,Z.jsx)(F,{children:e(`firstName`)}),(0,Z.jsx)(Pe,{name:`first_name`,placeholder:e(`firstName`),autoComplete:`given-name`,value:d.first_name,type:`text`,required:!0,onChange:e=>p(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{className:`w-full`,children:[(0,Z.jsx)(F,{children:e(`lastName`)}),(0,Z.jsx)(Pe,{name:`last_name`,placeholder:e(`lastName`),autoComplete:`family-name`,value:d.last_name,type:`text`,required:!0,onChange:e=>p(e.target.name,e.target.value)})]})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`password`)}),(0,Z.jsx)(GG,{name:`password`,placeholder:e(`password`),autoComplete:`new-password`,value:d.password,required:!0,onChange:e=>p(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`confirmPassword`)}),(0,Z.jsx)(GG,{name:`password_confirmation`,placeholder:e(`confirmPassword`),autoComplete:`new-password`,value:d.password_confirmation,required:!0,onChange:e=>p(e.target.name,e.target.value)})]}),(0,Z.jsx)(N,{variant:`primary`,isLoading:s,type:`submit`,children:e(`continue`)})]})}):(0,Z.jsx)(`p`,{children:`No token found.`})})]}),(0,Z.jsx)(TG,{})]})}function mK(){let{t:e}=k(),t=Rt(),{push:n}=be(),r=NG(),{errorToast:i}=y(),{destroy:a,get:o}=_n(),[s,c]=(0,W.useState)(!1);return(0,Z.jsx)(XW,{children:(0,Z.jsxs)(YW,{children:[(0,Z.jsx)(Go,{title:e(`linkSocialTitle`)}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(Xa,{children:e(`linkSocialDescription`)}),(0,Z.jsx)(N,{variant:`primary`,onClick:()=>{c(!0),t.post(`/social/google/link`,{token:o(UG)}).then(e=>{a(UG),r(e.data.data)}).catch(t=>i(t,e(`authActionFailed`))).finally(()=>c(!1))},className:`w-full`,isLoading:s,children:e(`linkSocialAccept`)}),(0,Z.jsx)(N,{variant:`default`,onClick:()=>{a(UG),n(Q.login)},className:`w-full`,isLoading:s,children:e(`back`)})]})]})})}function hK(){let{t:e}=k(),t=Rt(),{push:n,queryParams:r}=be(),{login:i}=Sn(),{successToast:a,errorToast:o}=y(),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{c(!0),t.get(`/verify`,{token:r.verification_token}).then(t=>{u(!0),a(e(`emailVerified`)),i(t.data.data.token),n(Q.afterLogin)}).catch(t=>o(t,e(`authActionFailed`))).finally(()=>c(!1))},[]),(0,Z.jsx)(XW,{children:(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(l?`verify`:`verificationFailed`)}),(0,Z.jsxs)(co,{children:[l&&(0,Z.jsx)(M,{as:`p`,children:e(`successfullyVerifiedDescription`)}),(0,Z.jsx)(N,{variant:`primary`,onClick:()=>n(Q.login),isLoading:s,disabled:s,className:`w-full`,children:e(l?`onboardingLogin`:`backToLogin`)})]})]})})}function gK(e){let{title:t,titleClasses:n,subTitle:r,button:i}=e;return(0,Z.jsxs)(`div`,{className:`flex min-h-screen flex-col items-center justify-center bg-bg-default text-center`,children:[t&&(0,Z.jsx)(`h1`,{className:`2xl text-text-default ${n}`,children:t}),r,(0,Z.jsx)(`div`,{className:`mt-14`,children:i&&(0,Z.jsx)(N,{variant:`primary`,onClick:i.onClick,children:i.label})})]})}function _K(){let{push:e}=be();return(0,Z.jsx)(gK,{title:`We are in maintenance mode`,subTitle:`Please come back in a while.`,button:{label:`Try again`,onClick:()=>e(Q.home)}})}function vK(){let{t:e}=k(),{errorToast:t,successToast:n}=y(),r=Rt(),{push:i}=be(),[a,o]=(0,W.useState)(!1),[s,c]=(0,W.useState)(``);return(0,Z.jsx)(XW,{children:(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(`forgotPassword`),description:e(`pleaseEnterYourEmailToResetYourPassword`)}),(0,Z.jsxs)(co,{children:[(0,Z.jsxs)(Ga,{onSubmit:()=>{o(!0),r.post(`/forgot-password`,{email:s}).then(()=>{n(e(`passwordResetEmailSent`)),i(`/login`)}).catch(n=>t(n,e(`passwordResetEmailSendFailed`))).finally(()=>o(!1))},className:`flex flex-col gap-3`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsx)(Fn,{children:(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`email`)}),(0,Z.jsx)(Pe,{name:`email`,placeholder:e(`email`),value:s,type:`email`,required:!0,onChange:e=>c(e.target.value)})]})})}),(0,Z.jsx)(N,{isLoading:a,variant:`primary`,disabled:!s||a,type:`submit`,children:e(`send`)})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 pt-4`,children:[(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,children:e(`needHelp`)}),(0,Z.jsx)(`a`,{href:`mailto:${Ke.support}`,className:`text-sm text-text-link-default hover:underline`,children:e(`contactSupport`)})]})]})]})})}function yK(){let{t:e}=k(),{errorToast:t,successToast:n}=y(),r=Rt(),{push:i,queryParams:a}=be(),[o,s]=(0,W.useState)(!1),[c,l]=(0,W.useState)({password:``,password_confirmation:``,token:a.token}),u=lo(l);return(0,W.useEffect)(()=>{r.get(`/reset-password/${a.token}`).catch(()=>i(Q.home))},[]),(0,Z.jsx)(XW,{children:(0,Z.jsxs)(YW,{children:[(0,Z.jsx)($W,{title:e(`passwordReset`)}),(0,Z.jsx)(co,{children:(0,Z.jsxs)(Ga,{onSubmit:()=>{s(!0),r.post(`/reset-password`,c).then(()=>{localStorage.clear(),n(e(`passwordResetSuccess`)),i(`/`)}).catch(n=>t(n,e(`passwordResetFailed`))).finally(()=>s(!1))},className:`flex flex-col gap-3`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`newPassword`)}),(0,Z.jsx)(GG,{name:`password`,placeholder:e(`newPassword`),autoComplete:`new-password`,value:c.password,required:!0,disabled:o,onChange:e=>u(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`confirmPassword`)}),(0,Z.jsx)(GG,{name:`password_confirmation`,placeholder:e(`confirmPassword`),autoComplete:`new-password`,value:c.password_confirmation,required:!0,disabled:o,onChange:e=>u(e.target.name,e.target.value)})]})]})}),(0,Z.jsx)(N,{isLoading:o,variant:`primary`,disabled:!c.password||!c.password_confirmation,t
114ype:`submit`,children:e(`submit`)})]})})]})})}var bK=`data:image/svg+xml,%3csvg%20width='331'%20height='297'%20viewBox='0%200%20331%20297'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M260.633%20120.234C256.252%20141.976%20249.682%20152.799%20240.921%20152.799C234.584%20152.799%20229.087%20148.854%20224.473%20140.87C219.859%20132.932%20213.661%20120.234%20205.88%20102.87C196.606%2081.8492%20188.078%2064.6779%20180.297%2051.2569C172.516%2037.8853%20162.543%2026.1%20150.381%2015.9505C138.171%205.8504%20123.585%200.751709%20106.531%200.751709C66.1304%200.751709%2037.5648%2028.4571%2020.7431%2083.8695C8.56966%20124.043%201.84252%20172.379%200.554243%20228.78C0.43324%20234.078%200.372738%20236.727%201.39875%20238.823C2.29091%20240.645%203.79168%20242.18%205.59324%20243.114C7.66509%20244.188%2010.3571%20244.188%2015.7412%20244.188H49.9832C55.1593%20244.188%2057.7474%20244.188%2059.7252%20243.229C61.4991%20242.37%2062.8933%20241.065%2063.8691%20239.353C64.9571%20237.443%2065.1344%20234.786%2065.489%20229.472C66.8596%20208.93%2069.3476%20191.708%2072.9797%20177.81C78.8046%20155.347%2086.5875%20144.14%2096.3253%20144.14C103.13%20144.14%20109.001%20148.132%20113.848%20156.069C118.693%20164.054%20125.264%20177.426%20133.558%20196.282C146.234%20227.403%20159.374%20251.838%20172.982%20269.587C186.634%20287.336%20205.135%20296.187%20228.48%20296.187C267.948%20296.187%20295.536%20268.673%20311.379%20213.646C322.875%20173.602%20329.307%20125.116%20330.648%2068.1892C330.773%2062.8745%20330.836%2060.2172%20329.81%2058.1199C328.918%2056.2946%20327.419%2054.7603%20325.615%2053.8251C323.543%2052.7506%20320.846%2052.7506%20315.451%2052.7506H281.752C276.521%2052.7506%20273.906%2052.7506%20271.908%2053.7329C270.126%2054.6091%20268.711%2055.9577%20267.751%2057.6963C266.675%2059.6452%20266.547%2062.3124%20266.293%2067.6469C265.272%2089.0324%20263.387%20106.563%20260.633%20120.234Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3c/svg%3e`;Yn();var xK=2e3,SK=[{name:`crm`,width:`w-11`},{name:`loyalty`,width:`w-15`},{name:`marketing`,width:`w-20`},{name:`store`,width:`w-12`},{name:`apps`,width:`w-11`},{name:`data`,width:`w-11`},{name:`automation`,width:`w-18`}];function CK(){let[e]=(0,W.useState)(()=>`-${Math.round(performance.now()%xK)}ms`);return(0,W.useEffect)(()=>{window.location.pathname.startsWith(`/crm`)&&Xn(()=>import(`./CRMRoutes-DYC0l0TN.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118])).catch(()=>{})},[]),(0,Z.jsxs)(`div`,{role:`status`,"aria-label":E.t(`loading`,`Loading`),className:m(`flex h-dvh flex-col bg-nav-bg-surface-default`,`pr-(--safe-right) pb-(--safe-bottom) pl-(--safe-left)`,`[--frame-gutter:0px] sm:[--frame-gutter:0.5rem]`),style:{"--pulse-offset":e},children:[(0,Z.jsx)(`div`,{className:`w-full shrink-0 pt-(--safe-top)`,children:(0,Z.jsxs)(`div`,{className:`flex h-14 items-center justify-between px-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center`,children:[(0,Z.jsx)(`div`,{className:`flex size-9 items-center justify-center`,children:(0,Z.jsx)(`img`,{className:`block h-6 w-4 object-fill`,src:rn()?QW:bK,alt:``})}),(0,Z.jsx)(`div`,{className:`ml-8 hidden items-center gap-0.5 lg:flex`,children:SK.map(({name:e,width:t})=>(0,Z.jsx)(`div`,{className:`flex h-8 items-center px-3`,children:(0,Z.jsx)(wK,{className:m(`h-3 rounded-full`,t)})},e))})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[[`assistant`,`notifications`,`search`,`settings`].map(e=>(0,Z.jsx)(`div`,{className:`flex size-9 items-center justify-center`,children:(0,Z.jsx)(wK,{className:`size-5 rounded-full`})},e)),(0,Z.jsx)(`div`,{className:`flex size-9 items-center justify-center`,children:(0,Z.jsx)(wK,{className:`size-8 rounded-full`})}),(0,Z.jsx)(`div`,{className:`flex size-9 items-center justify-center lg:hidden`,children:(0,Z.jsx)(wK,{className:`h-3 w-4 roun
114ded-xs`})})]})]})}),(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 px-(--frame-gutter) pb-(--frame-gutter)`,children:(0,Z.jsx)(`div`,{className:`page-container relative min-h-0 min-w-0 flex-1`,children:(0,Z.jsx)(`div`,{className:m(`h-full overflow-hidden bg-bg-default outline outline-main-content`,`sm:rounded-xl sm:shadow-card-default`),children:(0,Z.jsx)(Ms,{})})})})]})}function wK(e){return(0,Z.jsx)(wt,{className:m(`bg-nav-bg-surface-secondary-default [animation-delay:var(--pulse-offset)]!`,e.className)})}function TK({accounts:e}){let{t}=k(),{brandKit:n}=ki(),{account:r}=(0,W.useContext)(He),{switchToAccount:i}=Sn(),[a,o]=(0,W.useState)(null);return(0,W.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>{i(a.id),bt(window.location.origin)},1500);return()=>clearTimeout(e)},[a]),(0,Z.jsxs)(we,{children:[(0,Z.jsxs)(ft,{className:`max-h-[40vh]`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded-md px-2 py-3 font-medium text-nav-text-default text-sm antialiased lg:py-1.5`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-row items-center gap-2`,children:[n.small_logo&&(0,Z.jsx)(uo,{className:`size-4`,src:n.small_logo.url,alt:`company logo`}),(0,Z.jsx)(`span`,{className:`truncate`,children:r.company})]}),(0,Z.jsx)(O,{size:`sm`,tone:le.SUCCESS,children:t(`active`)})]}),e.filter(e=>e.id!==r.id).map(e=>(0,Z.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between gap-2 rounded-md px-2 py-3 text-left font-medium text-nav-text-default text-sm antialiased transition-colors hover:cursor-pointer hover:bg-nav-bg-surface-hover focus-visible:shadow-focus-ring-on-dark active:bg-nav-bg-surface-active lg:py-1.5`,onClick:t=>{t.stopPropagation(),o(e)},children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-row items-center gap-2`,children:[e.small_logo_url&&(0,Z.jsx)(uo,{className:`size-4`,src:e.small_logo_url,alt:`company logo`}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.company})]}),a?.id===e.id&&(0,Z.jsx)(c,{size:`small`,className:`stroke-icon-onDark!`})]},e.id))]}),(0,Z.jsx)(tt,{orientation:`vertical`,children:(0,Z.jsx)(it,{})})]})}var EK=(0,W.createContext)(null);function DK(){let e=(0,W.useContext)(EK);if(!e)throw Error(`Navigation components must be used within NavigationMenu`);return e}var OK=W.forwardRef(({className:e,children:t,...n},r)=>{let[i,a]=W.useState(``);return(0,Z.jsx)(EK.Provider,{value:{openDropdown:i,setOpenDropdown:a},children:(0,Z.jsx)(`nav`,{ref:r,className:m(`w-full bg-nav-bg-surface-default text-nav-text-default shadow-lg`,e),style:{zIndex:$a.navigation},...n,children:t})})});OK.displayName=`NavigationMenu`;function kK({id:e,label:t,children:n,align:r=`start`,triggerClassName:i,showChevron:a=!0,trigger:o,contentClassName:s,onClose:c}){let{openDropdown:l,setOpenDropdown:u}=DK(),d=ye(),f=l===e,p=e===d.pathname.split(`/`)[1],g=t=>{t&&u(e)},_=()=>{u(``),c?.()};return(0,Z.jsx)(Je,{open:f,onOpenChange:g,children:(0,Z.jsxs)(`li`,{onPointerEnter:()=>{l!==``&&l!==e&&u(e)},children:[(0,Z.jsx)(It,{asChild:!0,children:(0,Z.jsx)(`button`,{type:`button`,className:m(`flex items-center gap-2 rounded-full py-1.5 pr-1.5 pl-2.5 font-medium text-nav-text-default text-sm transition-colors hover:cursor-pointer hover:bg-nav-bg-surface-hover hover:text-nav-text-default-hover focus-visible:shadow-focus-ring-on-dark active:bg-bg-nav-bg-surface-active`,p&&`bg-nav-bg-surface-active`,i),onPointerDown:e=>{e.stopPropagation()},children:o??(0,Z.jsxs)(Z.Fragment,{children:[t,a&&(0,Z.jsx)(h,{className:m(`size-3 transition-transform`,f&&`rotate-180`)})]})})}),(0,Z.jsx)(On,{children:(0,Z.jsx)(Qe,{align:r,sideOffset:8,onEscapeKeyDown:_,onPointerDownOutside:_,className:m(`min-w-64 overflow-y-hidden rounded-xl border border-nav-border-default bg-nav-bg-surface-default shadow-lg`,`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 origin-(--radix-popover-content-transform-origin) data-[state=closed]:animate-out data-[state=closed]:ease-in data-[state=closed]:[animation-duration:180ms]`,s),style:{zIndex:$a.navigation},children:(0,Z.jsx)(`div`,{className:`space-y-0.5 p-1`,children:n})})})]})})}var AK=W.forwardRef(({className:e,children:t,...n},r)=>(0,Z.jsx)(`li`,{ref:r,className:jn(e,`relative`),...n,children:t}));AK.displayName=`NavigationMenuItem`;var jK=`hidden h-8 items-center gap-2 rounded-full py-0 pr-3 pl-1.5 font-medium text-nav-text-default text-xs lg:flex`;function MK(){let{brandKit:e}=ki(),{account:t}=(0,W.useContext)(He),{openDropdown:n,setOpenDropdown:r}=DK(),[i,a]=(0,W.useState)([]);vt({url:`/accounts`,dataSetter:a});let o=(0,Z.jsxs)(Z.Fragment,{children:[e.small_logo?(0,Z.jsx)(`img`,{className:`size-5 shrink-0 rounded-full object-cover`,src:e.small_logo.url,alt:``}):(0,Z.jsx)(`span`,{className:`grid size-5 shrink-0 place-items-center rounded-full bg-bg-fill-secondary-default font-semibold text-[10px] text-text-secondary`,children:t.company.charAt(0).toUpperCase()}),(0,Z.jsx)(`span`,{className:`max-w-20 truncate xl:max-w-36`,children:t.company})]});return i.length<=1?(0,Z.jsx)(AK,{className:m(jK,`bg-nav-bg-surface-default`),children:o}):(0,Z.jsx)(kK,{id:`account-switch`,align:`end`,triggerClassName:m(jK,`group bg-nav-bg-surface-default hover:bg-nav-bg-surface-hover data-[state=open]:bg-nav-bg-surface-active`),trigger:(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,onClick:()=>{n===`account-switch`&&r(``)},children:[o,(0,Z.jsx)(RW,{className:`-mr-1 size-3 shrink-0 text-nav-text-secondary transition-colors group-hover:text-nav-text-default`})]}),contentClassName:`w-72`,children:(0,Z.jsx)(TK,{accounts:i})})}var NK=W.forwardRef(({className:e,children:t,to:n,isActive:r,onClick:i,...a},s)=>{let c=ye(),l=(0,W.useContext)(EK),u=c.pathname.split(`/`)[1],d=n?String(n).split(`/`)[1]:``,f=r??(n?u===d:!1);return n?(0,Z.jsx)(nt,{ref:s,to:n,tabIndex:-1,"data-discover":`false`,className:m(e),onClick:e=>{l?.setOpenDropdown(``),i?.(e)},...a,children:(0,Z.jsx)(o,{variant:`onDark`,className:m(`hover:!bg-nav-bg-surface-hover rounded-full bg-nav-bg-surface-default text-nav-text-default shadow-none`,f&&`!text-nav-text-default bg-nav-bg-surface-active shadow-button-primary-active`),children:t})}):(0,Z.jsx)(o,{variant:`onDark`,onClick:i,className:m(`hover:!bg-nav-bg-surface-hover rounded-full bg-nav-bg-surface-default text-nav-text-default shadow-none`,f&&`!text-nav-text-default bg-nav-bg-surface-active shadow-button-primary-active`),children:t})});NK.displayName=`NavigationMenuIconLink`;var $=W.forwardRef(({className:e,children:t,to:n,isActive:r,onClick:i,href:a,...o},s)=>{let c=ye(),l=(0,W.useContext)(EK),u=r??(n?c.pathname.startsWith(String(n)):!1),d=e=>{l?.setOpenDropdown(``),i?.(e)},f=m(e,`flex items-center gap-2 rounded-lg py-1.5 pr-1.5 pl-2.5 font-medium text-nav-text-default text-sm transition-colors hover:cursor-pointer hover:bg-nav-bg-surface-hover hover:text-nav-text-default-hover focus-visible:shadow-focus-ring-on-dark active:bg-bg-nav-bg-surface-active`,u&&`bg-nav-bg-surface-active`);return n?(0,Z.jsx)(nt,{ref:s,to:n,className:f,onClick:d,...o,children:t}):(0,Z.jsx)(`a`,{ref:s,href:a,className:f,onClick:d,...o,children:t})});$.displayName=`NavigationMenuLink`;var PK=W.forwardRef(({className:e,children:t,...n},r)=>(0,Z.jsx)(`ul`,{ref:r,className:m(e,`relative flex items-center justify-between`),...n,children:t}));PK.displayName=`NavigationMenuList`;function FK(){let{t:e}=k(),{account:t}=(0,W.useContext)(He),n=`/apps`,{accountUser:r}=gn();return{customerApp:{name:`Customer App`,path:`${n}/customer-app`,usesFeature:t.uses_customer_app},businessApp:{name:`Business App`,path:`${n}/business-app/devices`,activePath:`${n}/business-app`,hasPermission:r.hasPermission(`devices`)},portalSessions:{name:`Portal Sessions`,activePath:`${n}/portal-sessions`,path:`${n}/portal-sessions/sessions`,usesFeature:t.usesFeature(Bs.PORTAL_SESSIONS)},contactsPortal:{name:e(`contactsPortal`),activePath:`${n}/contacts-portal`,path:`${n}/contacts-portal/overview/information`},widget:{name:`Widget`,path:`${n}/widgets`},integrations:{name:e(`integrations`),activePath:`${n}/integrations`,path:`${n}/integrations/apps/marketplace`},webhooks:{name:`Webhooks`,path:`${n}/integrations/webhooks`}}}function IK(){let{t:e}=k(),t=FK();return(0,Z.jsxs)(kK,{id:`apps`,label:e(`navigationApps`),children:[t.customerApp.usesFeature&&(0,Z.jsx)($,{to:t.customerApp.path,children:t.customerApp.name}),t.businessApp.hasPermission&&(0,Z.jsx)($,{to:t.businessApp.path,children:t.businessApp.name}),t.portalSessions.usesFeature&&(0,Z.jsx)($,{to:t.portalSessions.path,children:t.portalSessions.name}),(0,Z.jsx)($,{to:t.contactsPortal.path,children:t.contactsPortal.name}),(0,Z.jsx)($,{to:t.widget.path,children:t.widget.name}),(0,Z.jsx)($,{to:t.integrations.path,children:t.integrations.name})]})}function LK(){let{t:e}=k();return(0,Z.jsx)($,{className:`rounded-full! pr-2.5!`,to:`/automation`,children:e(`navigationAutomation`)})}function RK(){let{t:e}=k(),{account:t}=(0,W.useContext)(He),n=`/crm`;return{contacts:{name:e(`contacts`),activePath:`${n}/contacts`,path:gi},identifiers:{name:e(`identifiers`),path:`${n}/identifiers`},lists:{name:e(`lists`),path:`${n}/lists`},segments:{name:e(`segments`),path:`${n}/segments`},forms:{name:e(`forms`),path:`${n}/forms`},orders:{name:e(`orders`),activePath:`${n}/orders`,path:`${n}/orders/all`},bookings:{name:e(`bookings`),path:`${n}/bookings`,usesFeature:t.usesFeature(Bs.BOOKINGS)},reviews:{name:e(`reviews`),path:`${n}/reviews`,usesFeature:t.usesFeature(Bs.REVIEWS)},events:{name:e(`events`),path:`${n}/events/all`,usesFeature:t.usesFeature(Bs.EVENTS)},visits:{name:e(`visits`),path:`${n}/visits`,activePath:`${n}/visits`,usesFeature:t.usesFeature(Bs.VISITS)},shifts:{name:e(`shifts`),path:`${n}/shifts/all`,usesFeature:t.usesFeature(Bs.SHIFTS)}}}function zK(){let{t:e}=k(),t=RK(),{accountUser:n}=gn();return n.hasPermission(`contacts`)?(0,Z.jsxs)(kK,{id:`crm`,label:e(`navigationCrm`),children:[(0,Z.jsx)($,{to:t.contacts.path,children:t.contacts.name}),(0,Z.jsx)($,{to:t.identifiers.path,children:t.identifiers.name}),(0,Z.jsx)($,{to:t.lists.path,children:t.lists.name}),n.isAdmin&&(0,Z.jsx)($,{to:t.segments.path,children:t.segments.name}),(0,Z.jsx)($,{to:t.forms.path,children:t.forms.name}),(0,Z.jsx)($,{to:t.orders.path,children:t.orders.name}),t.bookings.usesFeature&&(0,Z.jsx)($,{to:t.bookings.path,children:t.bookings.name}),t.reviews.usesFeature&&(0,Z.jsx)($,{to:t.reviews.path,children:t.reviews.name}),t.events.usesFeature&&(0,Z.jsx)($,{to:t.events.path,children:t.events.name}),t.visits.usesFeature&&(0,Z.jsx)($,{to:t.visits.path,children:t.visits.name}),t.shifts.usesFeature&&(0,Z.jsx)($,{to:t.shifts.path,children:t.shifts.name})]}):null}function BK(){let{t:e}=k(),{account:t}=(0,W.useContext)(He),n=`/data`;return{reports:{name:e(`reports`),path:`${n}/reports`},insights:{name:`Insights`,path:`${n}/insights`},fraudRisk:{name:e(`fraudRisk`,`Fraud risk`),path:`${n}/fraud-risk`,usesFeature:t.usesFeature(Bs.FRAUD_RISK_REPORTS)},advancedReports:{name:e(`advancedReports`),path:`${n}/advanced-reports`},imports:{name:e(`imports`),path:`${n}/imports`},exports:{name:e(`exports`),path:`${n}/exports`},generate:{name:e(`generate`),path:`${n}/generate`},files:{name:e(`files`),path:`${n}/files`},backgroundTasks:{name:e(`backgroundTasks`),path:`${n}/background-tasks`}}}function VK(){let{t:e}=k(),t=BK();return(0,Z.jsxs)(kK,{id:`data`,label:e(`navigationData`),children:[(0,Z.jsx)($,{to:t.insights.path,children:t.insights.name}),(0,Z.jsx)($,{to:t.fraudRisk.path,hidden:!t.fraudRisk.usesFeature,children:t.fraudRisk.name}),(0,Z.jsx)($,{to:t.imports.path,children:t.imports.name}),(0,Z.jsx)($,{to:t.exports.path,children:t.exports.name}),(0,Z.jsx)($,{to:t.generate.path,children:t.generate.name}),(0,Z.jsx)($,{to:t.files.path,children:t.files.name}),(0,Z.jsx)($,{to:t.backgroundTasks.path,children:t.backgroundTasks.name})]})}function HK(){let{t:e}=k(),{account:t}=Fe(),n=`/loyalty`;return{dashboard:{name:e(`analytics`),path:`${n}/analytics`},rewards:{name:e(`rewards`),path:`${n}/rewards`},transactions:{name:e(`transactions`),activePath:`${n}/transactions`,path:`${n}/transactions/points-transactions`},pointsIssuances:{name:e(`pointsIssuances`),path:`${n}/points-issuances`},tokens:{name:`Tokens`,path:`${n}/tokens`},rules:{name:e(`earnRules`),path:`${n}/earn-rules`},tierTracks:{name:e(`tierTracks`),path:`${n}/tier-tracks`},promotions:{name:e(`promotionsAndVouchers`),path:`${n}/promotions`},promoCodes:{name:e(`promoCodes`),path:`${n}/promo-codes`},deals:{name:e(`deals`),path:`${n}/deals`},referrals:{name:`Referrals`,path:`${n}/referrals/leaderboard`,usesFeature:t.usesFeature(Bs.REFERRALS)},stampCards:{name:e(`stampCards`,`Stamp cards`),path:`${n}/stamp-cards`,usesFeature:t.usesFeature(Bs.STAMP_CARDS)},orderRules:{name:e(`orderRules`),activePath:`${n}/order-rules`,path:`${n}/order-rules/overview`}}}function UK(){let{t:e}=k(),t=HK(),{accountUser:n}=gn(),{account:r}=Fe();return n.hasPermission(`loyalty`)?(0,Z.jsxs)(kK,{id:`loyalty`,label:e(`navigationLoyalty`),children:[(0,Z.jsx)($,{to:t.dashboard.path,children:t.dashboard.name}),(0,Z.jsx)($,{to:t.transactions.path,children:t.transactions.name}),(0,Z.jsx)($,{to:t.rules.path,children:t.rules.name}
114),(0,Z.jsx)($,{to:t.pointsIssuances.path,children:t.pointsIssuances.name}),(0,Z.jsx)($,{to:t.rewards.path,children:t.rewards.name}),(0,Z.jsx)($,{to:t.promotions.path,children:t.promotions.name}),r.is_demo_account&&(0,Z.jsx)($,{to:t.promoCodes.path,children:t.promoCodes.name}),r.is_demo_account&&(0,Z.jsx)($,{to:t.deals.path,children:t.deals.name}),(0,Z.jsx)($,{to:t.tierTracks.path,children:t.tierTracks.name}),(0,Z.jsx)($,{to:t.tokens.path,children:t.tokens.name}),t.referrals.usesFeature&&(0,Z.jsx)($,{to:t.referrals.path,children:t.referrals.name}),t.stampCards.usesFeature&&(0,Z.jsx)($,{to:t.stampCards.path,children:t.stampCards.name})]}):null}function WK(){let{t:e}=k(),t=`/marketing`;return{campaigns:{name:e(`campaigns`),path:`${t}/campaigns`},recurringEmails:{name:e(`recurringEmails`),path:`${t}/recurring-emails`},automatedEmails:{name:e(`automatedEmails`),path:`${t}/automated-emails`},templates:{name:e(`templates`),activePath:`${t}/templates`,path:`${t}/templates/personal`}}}function GK(){let{t:e}=k(),t=WK(),{accountUser:n}=gn();return n.hasPermission(`marketing`)?(0,Z.jsxs)(kK,{id:`marketing`,label:e(`navigationMarketing`),align:`start`,children:[(0,Z.jsx)($,{to:t.campaigns.path,children:t.campaigns.name}),(0,Z.jsx)($,{to:t.recurringEmails.path,children:t.recurringEmails.name}),(0,Z.jsx)($,{to:t.automatedEmails.path,children:t.automatedEmails.name}),(0,Z.jsx)($,{to:t.templates.path,children:t.templates.name})]}):null}function KK(){let{t:e}=k(),{account:t}=(0,W.useContext)(He),n=`/store`;return{prepaid:{name:e(`prepaid`),activePath:`${n}/prepaid`,path:`${n}/prepaid/balances`},giftcards:{name:e(`giftcards`),activePath:`${n}/giftcards`,path:`${n}/giftcards/cards`},stripcards:{name:e(`stripcards`),activePath:`${n}/stripcards`,path:`${n}/stripcards/cards`,usesFeature:t.usesFeature(Bs.STRIPCARDS)},internalStore:{name:e(`internalStore`),activePath:`${n}/internal-store`,path:`${n}/internal-store/orders`}}}function qK(){let{t:e}=k(),t=KK();return(0,Z.jsxs)(kK,{id:`store`,label:e(`navigationStore`),children:[(0,Z.jsx)($,{to:t.prepaid.path,children:t.prepaid.name}),(0,Z.jsx)($,{to:t.giftcards.path,children:t.giftcards.name}),t.stripcards.usesFeature&&(0,Z.jsx)($,{to:t.stripcards.path,children:t.stripcards.name}),(0,Z.jsx)($,{to:t.internalStore.path,children:t.internalStore.name})]})}function JK(){return(0,Z.jsxs)(`div`,{id:`main-nav`,className:`ml-8 hidden items-center gap-0.5 lg:flex`,children:[(0,Z.jsx)(zK,{}),(0,Z.jsx)(UK,{}),(0,Z.jsx)(GK,{}),(0,Z.jsx)(qK,{}),(0,Z.jsx)(IK,{}),(0,Z.jsx)(VK,{}),(0,Z.jsx)(LK,{})]})}function YK(){let{t:e}=k(),{open:t,setOpen:n,openSupport:r}=xr(),{count:i}=Fr(),{pathname:a}=ye(),s=a.includes(`/ai-assistant`)||a.endsWith(`/support`),c=i>0?`${e(`assistant.assistantName`)}, ${e(`support.unreadReplies`,`{{count}} new replies from our team`,{count:i})}`:e(`assistant.assistantName`);return(0,Z.jsx)(AK,{children:(0,Z.jsx)(o,{variant:`onDark`,ariaLabel:c,title:c,onClick:()=>{s||(!t&&i>0?r?.():n?.(!t))},className:m(`hover:!bg-nav-bg-surface-hover rounded-full bg-nav-bg-surface-default text-nav-text-default shadow-none`,t&&`!text-nav-text-default bg-nav-bg-surface-active shadow-button-primary-active`),children:(0,Z.jsxs)(`span`,{className:`relative flex`,children:[(0,Z.jsx)(Bi,{calm:!0}),i>0&&(0,Z.jsxs)(`span`,{"aria-hidden":!0,className:`absolute -top-1.5 -right-2 flex h-fit items-center justify-center gap-1 text-nowrap rounded-full bg-linear-(--color-badge-bg-primary-on-dark) bg-linear-to-b px-1 py-0.5 font-body font-normal text-[10px] text-badge-text-primary-on-dark leading-3`,children:[(0,Z.jsx)(`span`,{className:`absolute inset-0 rounded-full shadow-color-burn`}),i>99?`99+`:i]})]})})})}var XK=W.forwardRef(({className:e,isActive:t,...n},r)=>(0,Z.jsx)(o,{ref:r,variant:`onDark`,className:m(`hover:!bg-nav-bg-surface-hover rounded-full bg-nav-bg-surface-default text-nav-text-default shadow-none`,t&&`!text-nav-text-default bg-nav-bg-surface-active shadow-button-primary-active`,e),...n}));XK.displayName=`NavigationMenuIconButton`;function ZK(){let{t:e}=k(),{formatDateTimeForUser:t}=Oe(),[n,r]=(0,W.useState)(!1),{current:i,visible:a,now:o,isDismissed:s,report:c}=Wr();if(i.length===0)return null;let l=a.length,u=e(`leatAnnouncements.title`,`Announcements from Leat`),d=l>0?`${u}, ${e(`leatAnnouncements.unread`,`{{count}} new announcements`,{count:l})}`:u;return(0,Z.jsx)(AK,{children:(0,Z.jsxs)(Ve,{open:n,onOpenChange:r,children:[(0,Z.jsx)(Re,{asChild:!0,children:(0,Z.jsx)(XK,{ariaLabel:d,title:d,isActive:n,children:(0,Z.jsxs)(`span`,{className:`relative flex`,children:[(0,Z.jsx)(vi,{className:`size-5`}),l>
1140&&(0,Z.jsxs)(`span`,{"aria-hidden":!0,className:`absolute -top-1.5 -right-2 flex h-fit items-center justify-center gap-1 text-nowrap rounded-full bg-linear-(--color-badge-bg-primary-on-dark) bg-linear-to-b px-1 py-0.5 font-body font-normal text-[10px] text-badge-text-primary-on-dark leading-3`,children:[(0,Z.jsx)(`span`,{className:`absolute inset-0 rounded-full shadow-color-burn`}),l>99?`99+`:l]})]})})}),(0,Z.jsxs)(At,{align:`end`,sideOffset:6,collisionPadding:12,className:`flex max-h-(--radix-popover-content-available-height) w-[calc(100vw-1.5rem)] flex-col p-0 sm:w-107`,children:[(0,Z.jsx)(`div`,{className:`shrink-0 border-border-default border-b px-4 py-3`,children:(0,Z.jsx)(M,{as:`h2`,variant:`headingSm`,children:u})}),(0,Z.jsx)(`ul`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-1`,children:i.map(n=>{let r=s(n),i=kr(n);return(0,Z.jsxs)(`li`,{className:`flex items-start gap-3 rounded px-3 py-2`,children:[(0,Z.jsx)(he,{tone:n.kind,size:`md`,children:(0,Z.jsx)(i,{className:`size-4`})}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,Z.jsx)(Ni,{announcement:n,now:o,muted:r}),n.type===`custom`&&(0,Z.jsx)(M,{as:`span`,variant:`bodyXs`,tone
114:`tertiary`,children:e(`leatAnnouncements.until`,`Until {{date}}`,{date:t(n.ends_at)})}),(0,Z.jsx)(jr,{announcement:n,now:o,onClick:()=>c(n,`clicked`)})]}),(0,Z.jsx)(`span`,{"aria-hidden":!0,className:m(`mt-1.5 size-2.5 shrink-0 rounded-full`,r?`bg-transparent`:`border border-border-default bg-bg-fill-brand-default`)})]},n.id)})})]})]})})}var QK={},$K={};function eq(e,t){return QK[e]=QK[e]||[],QK[e].push(t),()=>{let n=QK[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function tq(e,t){if(!$K[e]){$K[e]=!0;try{t()}catch(t){lc&&Uc.error(`Error while instrumenting ${e}`,t)}}}function nq(e,t){let n=e&&QK[e];if(n)for(let r of n)try{r(t)}catch(t){lc&&Uc.error(`Error while triggering instrumentation handler.
115Type: ${e}
116Name: ${mc(r)}
117Error:`,t)}}var rq=null;function iq(e){let t=`error`;eq(t,e),tq(t,aq)}function aq(){rq=ac.onerror,ac.onerror=function(e,t,n,r,i){return nq(`error`,{column:r,error:i,line:n,msg:e,url:t}),rq?rq.apply(this,arguments):!1},ac.onerror.__SENTRY_INSTRUMENTED__=!0}var oq=null;function sq(e){let t=`unhandledrejection`;eq(t,e),tq(t,cq)}function cq(){oq=ac.onunhandledrejection,ac.onunhandledrejection=function(e){return nq(`unhandledrejection`,e),!oq||oq.apply(this,arguments)},ac.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function lq(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}function uq(e){Uc.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function dq(e,t){if(!t?.length)return!1;for(let n of t){if(mq(n)){if(e.description&&Vs(e.description,n))return lc&&uq(e),!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let r=!n.name||e.description&&Vs(e.description,n.name),i=!n.op||e.op&&Vs(e.op,n.op),a=!n.attributes||Object.entries(n.attributes).every(([t,n])=>fq(e.attributes?.[t],n));if(r&&i&&a)return lc&&uq(e),!0}return!1}function fq(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?Vs(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function pq(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function mq(e){return typeof e==`string`||e instanceof RegExp}var hq=[];function gq(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function _q(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return gq(r)}function vq(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&bq(e,t,n)}),n}function yq(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function bq(e,t,n){if(n[t.name]){lc&&Uc.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!hq.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),hq.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),lc&&Uc.log(`Integration installed: ${t.name}`)}function xq(e){return e}function Sq(e){return!!e&&typeof e==`function`&&`_static`in e&&!!e._static}var Cq=!1;function wq(e,t){return ul(lc?"The `beforeSendSpan` callback threw an error, sending the span unmodified:":``,()=>t(e),()=>e)||(Cq||=(sc(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0),e)}function Tq(e){let t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links};return oc(t)}function Eq(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}function Dq(e){return e.getOptions().traceLifecycle===`stream`}function Oq(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function kq(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Aq(){return`npm`}function jq(){return!kq()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Mq(){return typeof window<`u`&&(!jq()||Nq())}function Nq(){return ac.process?.type===`renderer`}function Pq(e,t){let n=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:e.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,ingest_settings:Mq()?{infer_ip:n,infer_user_agent:n}:void 0,items:e}]}function Fq(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Iq(e,t,n,r){let i=dc(n),a={sent_at:new Date(zc()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Hc(t)}},o=`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()];
117return Pc(a,[o])}function Lq(e,t,n,r){let i=dc(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;Fq(e,n?.sdk);let o=xc(e,i,r,t);return delete e.sdkProcessingMetadata,Pc(o,[[{type:a},e]])}function Rq(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function zq(e){return`${Rq(e)}${e.projectId}/envelope/`}function Bq(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Vq(e,t,n){return t||`${zq(e)}?${Bq(e,n)}`}function Hq(e,t){let n=Hs(e);if(!n)return``;let r=`${Rq(n)}embed/error-page/`,i=`dsn=${Hc(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`&&e!==`onError`){if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`}return`${r}?${i}`}function Uq(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...Mq()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Wq(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Hc(r)),Pc(a,[Uq(e,i)])}function Gq(e,t){let n=t??Kq(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Wq(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);qq().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function Kq(e){return qq().get(e)}function qq(){return Vc(`clientToLogBufferMap`,()=>new WeakMap)}function Jq(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...Mq()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Yq(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Hc(r)),Pc(a,[Jq(e,i)])}function Xq(e,t){let n=t??Zq(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Yq(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Qq().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function Zq(e){return Qq().get(e)}function Qq(){return Vc(`clientToMetricBufferMap`,()=>new WeakMap)}function $q(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||Dq(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(Tq(t)):r.push(t);if(n.length!==0)return e.spans=r,Pq(n,t)}var eJ=Symbol.for(`SentryBufferFullError`);function tJ(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return Mc(eJ);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return Qc(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>Oq(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var nJ=6e4;function rJ(e,t=zc()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?nJ:r-t}function iJ(e,t){return e[t]||e.all||0}function aJ(e,t,n=zc()){return iJ(e,t)>n}function oJ(e,{statusCode:t,headers:n},r=zc()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+rJ(o,r):t===429&&(i.all=r+6e4);return i}function sJ(e,t,n=tJ(e.bufferSize||64)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(Tc(i,(t,n)=>{let i=ml(n);aJ(r,i)?e.recordDroppedEvent(`ratelimit_backoff`,i):a.push(t)}),a.length===0)return Promise.resolve({});let o=Pc(i[0],a),s=t=>{if(cl(o,[`client_report`])){lc&&Uc.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}Tc(o,(n,r)=>{e.recordDroppedEvent(t,ml(r))})};return n.add(()=>t({body:Gs(o)}).then(e=>e.statusCode===413?(lc&&Uc.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),s(`send_error`),e):(lc&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&Uc.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=oJ(r,e),e),e=>{throw s(`network_error`),lc&&Uc.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>
117{if(e===eJ)return lc&&Uc.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Promise.resolve({});throw e})}return{send:a,flush:i}}function cJ(e,t,n){let r=[{type:`client_report`},{timestamp:n||ec(),discarded_events:e}];return Pc(t?{dsn:t}:{},[r])}function lJ(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function uJ(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i??`ok`,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[ic],exclusive_time:o?.[nc],measurements:e.measurements,is_segment:!0}}function dJ(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}function fJ(e){e.traceLifecycle!==`stream`||!(e.beforeSendTransaction||e.ignoreTransactions?.length)||sc(()=>{console.warn("[Sentry] `beforeSendTransaction` and `ignoreTransactions` are ignored with `traceLifecycle: 'stream'` (enabled by default). Use `beforeSendSpan` and `ignoreSpans` instead, or set `traceLifecycle: 'static'`.")})}var pJ={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,queues:!0,stackFrameVariables:!0,frameContextLines:5};function mJ(e){return typeof e==`boolean`||`allow`in e||`deny`in e}function hJ(e){return e===void 0?{...pJ.httpHeaders}:mJ(e)?{request:e,response:e}:{request:e.request??pJ.httpHeaders.request,response:e.response??pJ.httpHeaders.response}}function gJ(e){let t=e.dataCollection??{};return{userInfo:t.userInfo??pJ.userInfo,cookies:t.cookies??pJ.cookies,httpHeaders:hJ(t.httpHeaders),httpBodies:t.httpBodies??pJ.httpBodies,urlQueryParams:t.urlQueryParams??pJ.urlQueryParams,graphQL:{document:t.graphQL?.document??pJ.graphQL.document,variables:t.graphQL?.variables??pJ.graphQL.variables},genAI:{inputs:t.genAI?.inputs??pJ.genAI.inputs,outputs:t.genAI?.outputs??pJ.genAI.outputs},databaseQueryData:t.databaseQueryData??pJ.databaseQueryData,queues:t.queues??pJ.queues,stackFrameVariables:t.stackFrame
117Variables??pJ.stackFrameVariables,frameContextLines:t.frameContextLines??pJ.frameContextLines}}var _J=`Not capturing exception because it's already been captured.`,vJ=`Discarded session because of missing or non-string release`,yJ=Symbol.for(`SentryInternalError`),bJ=Symbol.for(`SentryDoNotSendEventError`),xJ=5e3;function SJ(e){return{message:e,[yJ]:!0}}function CJ(e){return{message:e,[bJ]:!0}}function wJ(e){return Fc(e)&&yJ in e}function TJ(e){return Fc(e)&&bJ in e}function EJ(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??xJ;t>0&&(s=!0,o=Oq(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var DJ=class{constructor(e){this._options={attachStacktrace:!0,...e,traceLifecycle:e.traceLifecycle===`static`?`static`:`stream`},this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=tJ(e.transportOptions?.bufferSize??64),this._dataCollection=gJ(e),this._unhandledSessionStatus=`crashed`,e.dsn?this._dsn=Hs(e.dsn):lc&&Uc.warn(`No DSN provided, client will not send events.`);let{beforeSendSpan:t,traceLifecycle:n}=this._options;if(lc&&t&&Sq(t)!==(n===`static`)&&sc(()=>{console.warn(`Ignoring \`beforeSendSpan\`: ${n===`static`?`wrap it with`:`remove`} \`Sentry.withStaticSpan\` to use it with \`traceLifecycle: "${n}"\`.`)}),this._dsn){let t=Vq(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}EJ(this,`afterCaptureLog`,`flushLogs`,NJ,Gq),EJ(this,`afterCaptureMetric`,`flushMetrics`,MJ,Xq)}captureException(e,t,n){let r=uc();if(vc(e))return lc&&Uc.log(_J),r;let i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),`error`),i.event_id}captureMessage(e,t,n,r){let i={event_id:uc(),...n},a=Sc(e)?e:String(e),o=hl(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let r=uc();if(t?.originalException&&vc(t.originalException))return lc&&Uc.log(_J),r;let i={event_id:r,...t},a=e.sdkProcessingMetadata||{},o=a.capturedSpanScope,s=a.capturedSpanIsolationScope,c=fl(e.type);return this._process(()=>this._captureEvent(e,i,o||n,s),c),i.event_id}captureSession(e){this.sendSession(e),Zs(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&(this._setupIntegrations(),fJ(this._options))}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),bq(this,e,this._integrations),t||yq(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=$q(e,this),r=Lq(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=Kc(r,Ic(e));n&&(r=Kc(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=Ys}=this._options;if(`aggregates`in e){let r=e.attrs||{};if(!r.release&&!t){lc&&Uc.warn(vJ);return}r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t){lc&&Uc.warn(vJ);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let r=Iq(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;lc&&Uc.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:``}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];
117n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{let t=await this._transport.send(e);return this.emit(`afterEnvelope`,e),t}catch(e){return lc&&Uc.error(`Error while sending envelope:`,e),{}}return lc&&Uc.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=vq(this,e),yq(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(Zs(e,{...n&&{status:this._unhandledSessionStatus},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),kc(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...Qs(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:pc(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=Ws(),r=gc()){return lc&&AJ(e)&&Uc.log(`Captured error event \`${lJ(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{lc&&(TJ(e)?Uc.log(e.message):wJ(e)?Uc.warn(e.message):Uc.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=jJ(e),s=AJ(e),c=`before send for type \`${e.type||`error`}\``,l=`before_send`,u=a===void 0?void 0:lq(a),d=fl(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw CJ("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:OJ(kJ(this,i,e,t,()=>{l=`callback_error`}),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(l,d),o){let t=e.spans||[];this.recordDroppedEvent(l,`span`,1+t.length)}throw CJ(`${c} ${l===`callback_error`?`threw an error`:"returned `null`"}, will not send event.`)}let f=n.getSession()||r.getSession();if(s&&f&&this._updateSessionFromEvent(f,i),s&&typeof u==`number`&&wc()>u)throw this.recordDroppedEvent(`sample_rate`,`error`),CJ(`Discarding event because it's not included in the random sample (sampling rate = ${a})`);if(o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let p=i.transaction_info;return o&&p&&i.transaction!==e.transaction&&(i.transaction_info={...p,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw TJ(e)||wJ(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),SJ(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
118Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===eJ&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){lc&&Uc.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){lc&&Uc.log(`No outcomes to send`);return}if(!this._dsn){lc&&Uc.log(`No dsn provided, will not send outcomes`);return}lc&&Uc.log(`Sending outcomes:`,e);let t=cJ(e,this._options.tunnel&&Hc(this._dsn));this.sendEnvelope(t)}};function OJ(e,t){let n=`${t} must return \`null\` or a valid event.`;if(fc(e))return e.then(e=>{if(!ll(e)&&e!==null)throw SJ(n);return e},e=>{throw SJ(`${t} rejected with ${e}`)});if(!ll(e)&&e!==null)throw SJ(n);return e}function kJ(e,t,n,r,i){let{beforeSend:a,ignoreSpans:o,beforeSendTransaction:s}=t,c=Sq(t.beforeSendSpan)&&t.beforeSendSpan,l=n;if(AJ(l)&&a){let e=l;return ul(lc?"The `beforeSend` callback threw an error, dropping the event:":``,()=>a(e,r),()=>(i(),null))}if(jJ(l)){if(c||o){let t=uJ(l);
118if(o?.length&&dq({description:t.description,op:t.op,attributes:t.data},o))return null;if(c){let e=wq(t,c);l=_c(n,dJ(e))}if(l.spans){let t=[],n=l.spans;for(let e of n){if(o?.length&&dq({description:e.description,op:e.op,attributes:e.data},o)){pq(n,e);continue}c?t.push(wq(e,c)):t.push(e)}let r=l.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),l.spans=t}}if(s){if(l.spans){let e=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return ul(lc?"The `beforeSendTransaction` callback threw an error, dropping the event:":``,()=>s(l,r),()=>(i(),null))}}return l}function AJ(e){return e.type===void 0}function jJ(e){return e.type===`transaction`}function MJ(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+PJ(e.attributes)}function NJ(e){let t=0;return e.message&&(t+=e.message.length*2),t+PJ(e.attributes)}function PJ(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*FJ(e[0]):hl(e)?t+=FJ(e):t+=100}),t}function FJ(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function IJ(e,t){t.debug===!0&&(lc?Uc.enable():sc(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Ws().update(t.initialScope);let n=new e(t);return LJ(n),n.init(),n}function LJ(e){Ws().setClient(e)}var RJ=`[Filtered]`,zJ=[`auth`,`token`,`secret`,`session`,`password`,`passwd`,`pwd`,`key`,`jwt`,`bearer`,`sso`,`saml`,`csrf`,`xsrf`,`credentials`,`sid`,`identity`,`set-cookie`,`cookie`];function BJ(e,t){return t.some(t=>e.includes(t))}function VJ(e,t,n){if(t===!1)return!0;let r=e.toLowerCase();if(BJ(r,n==null?zJ:[...zJ,...n]))return!0;if(t===!0)return!1;let i=(`deny`in t?t.deny:t.allow).some(e=>r.includes(e.toLowerCase()));return`deny`in t?i:!i}function HJ(e,t,n){if(t===!1)return{};let r={};for(let i of Object.keys(e))r[i]=VJ(i,t,n)?RJ:e[i];return r}function UJ(e,t){if(!(!e||t===!1))return e.split(`&`).map(e=>{let n=e.indexOf(`=`),r=n===-1?e:e.slice(0,n),i=new URLSearchParams(`${r}=`).keys().next().value;return i!==void 0&&VJ(i,t)?`${r}=${RJ}`:e}).join(`&`)}function WJ(e,t){let n=e.indexOf(`#`),r=n===-1?e.length:n,i=e.indexOf(`?`);if(i===-1||i>r)return e;let a=e.slice(0,i),o=e.slice(i+1,r),s=e.slice(r),c=UJ(o,t);return c?`${a}?${c}${s}`:`${a}${s}`}function GJ(e){return(e??gl())?.getDataCollectionOptions().urlQueryParams??!0}function KJ(e,t){return e===void 0?void 0:WJ(e,GJ(t))}function qJ(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function JJ(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function YJ(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function XJ(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:rc})),i.version=rc)}var ZJ=100;function QJ(e,t){let n=gl(),r=gc();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=ZJ}=n.getOptions();if(a<=0)return;let o={timestamp:ec(),...e},s=i?ul(lc?"The `beforeBreadcrumb` callback threw an error, dropping the breadcrumb:":``,()=>sc(()=>i(o,t)),()=>null):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var $J=`FunctionToString`,eY=new WeakMap,tY=xq((()=>({name:$J,setupOnce(){let e=Function.prototype.toString;try{Function.prototype.toString=function(...t){let n=Gc(this),r;try{eY.has(gl())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){eY.set(e,!0)}}))),nY=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/Java exception was raised during method invocation$/,/Java object is gone$/],rY=`EventFilters`,iY=xq((e={})=>{let t;return{name:rY,setup(n){t=aY(e,n.getOptions())},processEvent(n,r,i){return t||=aY(e,i.getOptions()),oY(n,t)?null:n}}});function aY(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:nY],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function oY(e,t){if(!e.type){if(sY(e,t.ignoreErrors))return lc&&Uc.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
119Event: ${bc(e)}`),!0;if(pY(e))return lc&&Uc.warn(`Event dropped due to not having an error message, error type or stacktrace.
120Event: ${bc(e)}`),!0;if(lY(e,t.denyUrls))return lc&&Uc.warn(`Event dropped due to being matched by \`denyUrls\` option.
121Event: ${bc(e)}.
122Url: ${fY(e)}`),!0;if(!uY(e,t.allowUrls))return lc&&Uc.warn(`Event dropped due to not being matched by \`allowUrls\` option.
123Event: ${bc(e)}.
124Url: ${fY(e)}`),!0}else if(e.type===`transaction`&&cY(e,t.ignoreTransactions))return lc&&Uc.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
125Event: ${bc(e)}`),!0;return!1}function sY(e,t){return t?.length?lJ(e).some(e=>al(e,t)):!1}function cY(e,t){if(!t?.length)return!1;let n=e.transaction;return n?al(n,t):!1}function lY(e,t){if(!t?.length)return!1;let n=fY(e);return n?al(n,t):!1}function uY(e,t){if(!t?.length)return!0;let n=fY(e);return!n||al(n,t)}function dY(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function fY(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?dY(t):null}catch{return lc&&Uc.error(`Cannot extract url for event ${bc(e)}`),null}}function pY(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function mY(e,t,n,r,i,a){if(!i.exception?.values||!a||!$c(a.originalException))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=hY(e,t,r,a.originalException,n,i.exception.values,o,0))}
125function hY(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if($c(r[i])){_Y(o,s,r);let a=e(t,r[i]),l=c.length;vY(a,i,l,s),c=hY(e,t,n,r[i],i,[a,...c],a,l)}return gY(r)&&r.errors.forEach((a,l)=>{if($c(a)){_Y(o,s,r);let u=e(t,a),d=c.length;vY(u,`errors[${l}]`,d,s),c=hY(e,t,n,a,i,[u,...c],u,d)}}),c}function gY(e){return Array.isArray(e.errors)}function _Y(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...gY(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function vY(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function yY(e){return $c(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function bY(e){return yY(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var xY=new Set([]);function SY(e){let t=`console`,n=eq(t,e);return tq(t,TY),n}function CY(e){for(let t of e)xY.add(t);return()=>{for(let t of e)xY.delete(t)}}var wY=new Set;function TY(){`console`in ac&&Js.forEach(function(e){wY.has(e)||!(e in ac.console)||(wY.add(e),Oc(ac.console,e,function(t){return Us[e]=t,function(...t){let n=t[0],r=Us[e],i=xY.size&&typeof n==`string`&&al(n,xY);i||nq(`console`,{args:t,level:e}),(!i||lc&&Uc.isEnabled())&&r?.apply(ac.console,t)}}))})}function EY(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var DY=`Dedupe`,OY=xq((()=>{let e;return{name:DY,processEvent(t){if(t.type)return t;try{if(kY(t,e))return lc&&Uc.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function kY(e,t){return t?!!(AY(e,t)||jY(e,t)):!1}function AY(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!NY(e,t)||!MY(e,t))}function jY(e,t){let n=PY(t),r=PY(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!NY(e,t)||!MY(e,t))}function MY(e,t){let n=dl(e),r=dl(t);if(!n||!r)return!n&&!r;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function NY(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n||!r)return!n&&!r;try{return n.join(``)===r.join(``)}catch{return!1}}function PY(e){return e.exception?.values?.[0]}var FY=`Console`,IY=xq((e={})=>{let t=new Set(e.levels||Js);return{name:FY,setup(n){let r=SY(({args:e,level:r})=>{gl()!==n||!t.has(r)||LY(r,e)});if(n.registerCleanup(r),e.filter){let t=CY(e.filter);n.registerCleanup(t)}}}});function LY(e,t){let n={category:`console`,data:{arguments:t,logger:`console`},level:EY(e),message:RY(t)};if(e===`assert`){if(t[0]===!1){let e=t.slice(1);n.message=e.length>0?`Assertion failed: ${RY(e)}`:`Assertion failed`,n.data.arguments=e}else return}QJ(n,{input:t,level:e})}function RY(e){return`util`in ac&&typeof ac.util.format==`function`?ac.util.format(...e):jc(e,` `)}var zY=`ConversationId`,BY=xq((()=>({name:zY,setup(e){e.on(`spanStart`,e=>{let t=Ws().getScopeData(),n=gc().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=qs(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(Bc,r)}})}}))),VY=ac;function HY(){if(!(`fetch`in VY))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function UY(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function WY(){if(typeof EdgeRuntime==`string`)return!0;if(!HY())return!1;if(UY(VY.fetch))return!0;let e=!1,t=VY.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=UY(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){lc&&Uc.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function GY(e){let t=`fetch`,n=eq(t,e);return tq(t,()=>KY()),n}function KY(e){Mq()&&!WY()||Oc(ac,`fetch`,function(t){return new Proxy(t,{apply(t,n,r){let i=Error(),{method:a,url:o}=YY(r),s={args:r,fetchData:{method:a,url:o},startTimestamp:el()*1e3,virtualError:i,headers:XY(r)};return e||nq(`fetch`,{...s}),Reflect.apply(t,ac,r).then(async t=>(e?e(t):nq(`fetch`,{...s,endTimestamp:el()*1e3,response:t}),t),e=>{nq(`fetch`,{...s,endTimestamp:el()*1e3,error:e}),$c(e)&&e.stack===void 0&&(e.stack=i.stack,Zc(e,`framesToPop`,1));let t=gl()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&$c(e)&&e.name===`TypeError`&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(s.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:Zc(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})})}function qY(e,t){return Fc(e)&&!!e[t]}function JY(e){return typeof e==`string`?e:e?qY(e,`url`)?e.url:e.toString?e.toString():``:``}
125function YY(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:JY(t),method:qY(n,`method`)?String(n.method).toUpperCase():Ec(t)&&qY(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:JY(t),method:qY(t,`method`)?String(t.method).toUpperCase():`GET`}}function XY(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Ec(t))return new Headers(t.headers)}catch{}}function ZY(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var QY=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,$Y=ac,eX=80,tX={};try{typeof Node<`u`&&(tX.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(tX.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,tX.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,tX.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,tX.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(tX.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function nX(e,t,n){let r=tX[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function rX(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||eX;for(;n&&i++<5&&(o=iX(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=nX(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function iX(e,t){let n=[],r=nX(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=nX(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>nX(e,`getAttribute`,t)).map(t=>[t,nX(e,`getAttribute`,t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=nX(e,`id`);t&&n.push(`#${t}`);let r=nX(e,`className`);if(r&&pl(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=nX(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}function aX(e,t,n){$Y.document&&$Y.addEventListener(e,t,n)}function oX(e,t,n){$Y.document&&$Y.removeEventListener(e,t,n)}var sX=e=>{let t=$Y.requestIdleCallback||$Y.setTimeout;if($Y.document?.visibilityState===`hidden`)e();else{let n=!1,r=()=>{n||=(e(),!0)};aX(`visibilitychange`,r,{once:!0,capture:!0}),t(()=>{r(),oX(`visibilitychange`,r,{capture:!0})})}};function cX(e,t=5){if(!ac.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function lX(){try{return $Y.document?.location.href??``}catch{return``}}var uX=1e3,dX,fX,pX;function mX(e){eq(`dom`,e),tq(`dom`,hX)}function hX(){if(!$Y.document)return;let e=nq.bind(null,`dom`),t=vX(e,!0);$Y.document.addEventListener(`click`,t,!1),$Y.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=$Y[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Oc(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=vX(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),Oc(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function gX(e){if(e.type!==fX)return!1;try{if(!e.target||e.target._sentryId!==pX)return!1}catch{}return!0}function _X(e,t){return e===`keypress`?!t?.tagName||!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!1}function vX(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=yX(n);if(_X(n.type,r))return;Zc(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Zc(r,`_sentryId`,uc());let i=n.type===`keypress`?`input`:n.type;gX(n)||(e({event:n,name:i,global:t}),fX=n.type,pX=r?r._sentryId:void 0),clearTimeout(dX),dX=$Y.setTimeout(()=>{pX=void 0,fX=void 0},uX)}}function yX(e){try{return e.target}catch{return null}}var bX;function xX(){return`history`in $Y&&!!$Y.history}function SX(e){let t=`history`;eq(t,e),tq(t,CX)}function CX(){if($Y.addEventListener(`popstate`,()=>{let e=$Y.location.href,t=bX;bX=e,t!==e&&nq(`history`,{from:t,to:e})}),!xX())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=bX,i=wX(String(n));if(bX=i,r===i)return e.apply(this,t);nq(`history`,{from:r,to:i})}return e.apply(this,t)}}Oc($Y.history,`pushState`,e),Oc($Y.history,`replaceState`,e)}function wX(e){try{return new URL(e,$Y.location.origin).toString()}catch{return e}}var TX={};function EX(e){let t=TX[e];if(t)return t;let n=$Y[e];if(UY(n))return TX[e]=n.bind($Y);let r=$Y.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){QY&&Uc.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(TX[e]=n.bind($Y))}function DX(e){TX[e]=void 0}var OX=`__sentry_xhr_v3__`;function kX(e){eq(`xhr`,e),tq(`xhr`,AX)}
125function AX(){if(!$Y.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=el()*1e3,a=pl(n[0])?n[0].toUpperCase():void 0,o=jX(n[1]);if(!a||!o)return e.apply(t,n);t[OX]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[OX];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}nq(`xhr`,{endTimestamp:el()*1e3,startTimestamp:i,xhr:t,virtualError:r}),r=void 0,t.removeEventListener(`readystatechange`,s)}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[OX];return a&&pl(r)&&pl(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[OX];return r?(n[0]!==void 0&&(r.body=n[0]),nq(`xhr`,{startTimestamp:el()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function jX(e){if(pl(e))return e;try{return e.toString()}catch{}}function MX(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}var NX=ac,PX=0,FX=[];function IX(e){if(PX>0)return!0;let t=e?FX.findIndex(t=>LX(t,e)):-1;return t!==-1&&(FX.splice(t,1),!0)}function LX(e,t){return e.msg===t.msg&&e.url===t.url&&e.line===t.line&&e.column===t.column}function RX(){PX++,setTimeout(()=>{PX--})}function zX(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Gc(e))return e}catch{return e}let r=function(...n){ac._sentryWrappedDepth=(ac._sentryWrappedDepth||0)+1;try{let r=n.map(e=>zX(e,t));return e.apply(this,r)}catch(e){throw RX(),hc(r=>{r.addEventProcessor(e=>(t.mechanism&&(yc(e,void 0,void 0),$s(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),Xc(e)}),e}finally{ac._sentryWrappedDepth=(ac._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}sl(r,e),Zc(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function BX(){let e=lX(),{referrer:t}=NX.document||{},{userAgent:n}=NX.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function VX(e,t){let n=WX(e,t),r={type:YX(t),value:XX(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function HX(e,t,n,r){let i=gl()?.getOptions().normalizeDepth,a=rZ(t),o={__serialized__:Yc(t,i)};if(a)return{exception:{values:[VX(e,a)]},extra:o};let s={exception:{values:[{type:Lc(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:tZ(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=WX(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function UX(e,t){return{exception:{values:[VX(e,t)]}}}function WX(e,t){let n=t.stacktrace||t.stack||``,r=KX(t),i=qX(t);try{return e(n,r,i)}catch{}return[]}var GX=/Minified React error #\d+;/i;function KX(e){return e&&GX.test(e.message)?1:0}function qX(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function JX(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function YX(e){let t=e?.name;return!t&&JX(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function XX(e){let t=e?.message;return JX(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?bY(t.error):bY(e):`No error message`}function ZX(e,t,n,r){let i=$X(e,t,n?.syntheticException||void 0,r);return $s(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),Qc(i)}function QX(e,t,n=`info`,r,i){let a=eZ(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),Qc(a)}function $X(e,t,n,r,i){let a;if(qc(t)&&t.error)return UX(e,t.error);if(Ac(t)||Nc(t)){let i=t;if(`stack`in t){a=UX(e,t);let i=a.exception?.values?.[0];
125if(r&&n&&i&&!i.stacktrace){let t=WX(e,n);t.length&&(i.stacktrace={frames:t},$s(a,{synthetic:!0}))}}else{let t=i.name||(Ac(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=eZ(e,o,n,r),yc(a,o)}return a}if($c(t))return UX(e,t);if(ll(t)||Lc(t))return a=HX(e,t,n,i),$s(a,{synthetic:!0}),a;let o=String(t);return a=eZ(e,o,n,r),yc(a,o,void 0),$s(a,{synthetic:!0}),a}function eZ(e,t,n,r){let i={};if(r&&n){let r=WX(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),$s(i,{synthetic:!0})}if(Sc(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function tZ(e,{isUnhandledRejection:t}){let n=il(e),r=t?`promise rejection`:`exception`;return qc(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Lc(e)?`Event \`${nZ(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function nZ(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function rZ(e){return Object.values(e).find($c)}var iZ=class extends DJ{constructor(e){let t=aZ(e);XJ(t,`browser`,[`browser`],NX.SENTRY_SDK_SOURCE||Aq()),super(t),this._unhandledSessionStatus=`unhandled`;let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r}=this._options;NX.document&&NX.document.addEventListener(`visibilitychange`,()=>{NX.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),n&&this.on(`beforeSendSession`,YJ)}eventFromException(e,t){return ZX(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return QX(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function aZ(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:NX.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var oZ=40;function sZ(e,t=EX(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw DX(`fetch`),e}finally{n-=a,r--}}return sJ(e,i,tJ(e.bufferSize||oZ))}var cZ=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,lZ=30,uZ=50;function dZ(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var fZ=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,pZ=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,mZ=/\((\S*)(?::(\d+))(?::(\d+))\)/,hZ=/at (.+?) ?\(data:(.+?),/,gZ=[lZ,e=>{let t=e.match(hZ);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=fZ.exec(e);if(n){let[,e,t,r]=n;return dZ(e,`?`,+t,+r)}let r=pZ.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=mZ.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=bZ(r[1]||`?`,r[2]);return dZ(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],_Z=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vZ=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,yZ=Ks(gZ,[uZ,e=>{let t=_Z.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=vZ.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=bZ(n,e),dZ(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),bZ=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},xZ=1024,SZ=`Breadcrumbs`,CZ=xq(((e={})=>{let t={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:SZ,setup(e){t.dom&&mX(TZ(e,t.dom)),t.xhr&&kX(EZ(e)),t.fetch&&GY(DZ(e)),t.history&&SX(OZ(e)),t.sentry&&e.on(`beforeSendEvent`,wZ(e))}}}));function wZ(e){return function(t){gl()===e&&QJ({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:bc(t)},{event:t})}}function TZ(e,t){return function(n){if(gl()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>xZ&&(cZ&&Uc.warn(`\`dom.maxStringLength\` cannot exceed ${xZ}, but a value of ${o} was configured. Sentry will use ${xZ} instead.`),o=xZ),typeof a==`string`&&(a=[a]);try{let e=n.event,t=kZ(e)?e.target:e;r=rX(t,{keyAttrs:a,maxStringLength:o}),i=cX(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};
125i&&(s.data={"ui.component_name":i}),QJ(s,{event:n.event,name:n.name,global:n.global})}}function EZ(e){return function(t){if(gl()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[OX];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:ZY(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),QJ(d,u)}}function DZ(e){return function(t){if(gl()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`)){if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),QJ(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:ZY(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),QJ(s,o)}}}}function OZ(e){return function(t){if(gl()!==e)return;let n=t.from,r=t.to,i=qJ(NX.location.href),a=n?qJ(n):void 0,o=qJ(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),QJ({category:`navigation`,data:{from:n,to:r}})}}function kZ(e){return!!e&&!!e.target}var AZ=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),jZ=`BrowserApiErrors`,MZ=xq(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:jZ,setupOnce(){t.setTimeout&&Oc(NX,`setTimeout`,NZ),t.setInterval&&Oc(NX,`setInterval`,NZ),t.requestAnimationFrame&&Oc(NX,`requestAnimationFrame`,PZ),t.XMLHttpRequest&&`XMLHttpRequest`in NX&&Oc(XMLHttpRequest.prototype,`send`,FZ);let e=t.eventTarget;e&&(Array.isArray(e)?e:AZ).forEach(e=>IZ(e,t))}}}));function NZ(e){return function(...t){let n=t[0];return t[0]=zX(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${mc(e)}`}}),e.apply(this,t)}}function PZ(e){return function(t){return e.apply(this,[zX(t,{mechanism:{data:{handler:mc(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function FZ(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Oc(n,e,function(t){let n={mechanism:{data:{handler:mc(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Gc(t);return r&&(n.mechanism.data.handler=mc(r)),zX(t,n)})}),e.apply(this,t)}}function IZ(e,t){let n=NX[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Oc(n,`addEventListener`,function(n){return function(r,i,a){try{LZ(i)&&(i.handleEvent=zX(i.handleEvent,{mechanism:{data:{handler:mc(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&RZ(this,r,i),n.apply(this,[r,zX(i,{mechanism:{data:{handler:mc(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),Oc(n,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function LZ(e){return typeof e.handleEvent==`function`}function RZ(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var zZ=xq((e={})=>{let t=e.lifecycle??`page`;return{name:`BrowserSession`,setupOnce(){if(NX.document===void 0){cZ&&Uc.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}ol({ignoreDuration:!0});let e=!1;sX(()=>{e||=(rl(),!0)});let n=gc(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();(r?.id!==n?.id||r?.ip_address!==n?.ip_address)&&(r=n,e&&rl())}),t===`route`&&SX(({from:t,to:n})=>{t!==n&&(ol({ignoreDuration:!0}),rl(),e=!0)})}}}),BZ=`CultureContext`,VZ=xq((()=>({name:BZ,preprocessEvent(e){let t=HZ();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=HZ();t&&Eq(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function HZ(){try{let e=NX.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var UZ=`GlobalHandlers`,WZ=xq(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:UZ,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(GZ(e),XZ(`onerror`)),t.onunhandledrejection&&(KZ(e),XZ(`onunhandledrejection`))}}}));function GZ(e){iq(t=>{let{stackParser:n,attachStacktrace:r}=ZZ();if(gl()!==e||IX(t))return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=YZ($X(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Cc(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function KZ(e){sq(t=>{let{stackParser:n,attachStacktrace:r}=ZZ();if(gl()!==e||IX())return;let i=qZ(t),a=hl(i)?JZ(i):$X(n,i,void 0,r,!0);a.level=`error`,Cc(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function qZ(e){if(hl(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function JZ(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function YZ(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];
125return c.length===0&&c.push({colno:r,lineno:n,filename:QZ(t)??lX(),function:`?`,in_app:!0}),e}function XZ(e){cZ&&Uc.log(`Global Handler attached: ${e}`)}function ZZ(){return gl()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function QZ(e){if(!(!pl(e)||e.length===0))return e.startsWith(`data:`)?`<${JJ(e,!1)}>`:e}var $Z=xq(()=>({name:`HttpContext`,preprocessEvent(e,t,n){if(!NX.navigator&&!NX.location&&!NX.document)return;let{url:r,headers:i}=BX(),a=n.getDataCollectionOptions().httpHeaders.request,o=Object.entries(e.request?.headers??{}).filter(([e])=>!(e in i)),s={...HJ(i,a),...Object.fromEntries(o)};e.request={url:r,...e.request,...Object.keys(s).length>0?{headers:s}:{headers:void 0}}},processSpan(e,t){if(!NX.navigator&&!NX.location&&!NX.document)return;let n=BX(),r=HJ(n.headers,t.getDataCollectionOptions().httpHeaders.request),i=r.Referer,{hostname:a,protocol:o}=NX.location||{};Eq(e,{[cc]:r[`User-Agent`],[tc]:o===`file:`||a===`localhost`||a===`127.0.0.1`||a===`[::1]`||!!a?.endsWith(`.localhost`),...e.is_segment&&{"url.full":e.attributes?.[`sentry.op`]===`http.client`?void 0:KJ(n.url),"http.request.header.referer":i?[i]:void 0}})}})),eQ=`cause`,tQ=5,nQ=`LinkedErrors`,rQ=xq(((e={})=>{let t=e.limit||tQ,n=e.key||eQ;return{name:nQ,preprocessEvent(e,r,i){mY(VX,i.getOptions().stackParser,n,t,e,r)}}})),iQ=/^HTML(\w*)Element$/;function aQ(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(MX(e)){let t=oQ(e);if(iQ.test(t))return`[HTMLElement: ${rX(e)}]`}}function oQ(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function sQ(){return cQ()?(cZ&&sc(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function cQ(){if(NX.window===void 0)return!1;let e=NX;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=lX();return!(NX===NX.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function lQ(e){return[iY(),tY(),BY(),MZ(),CZ(),IY(),WZ(),rQ(),OY(),$Z(),VZ(),zZ()]}function uQ(e={}){let t=!e.skipBrowserExtensionCheck&&sQ(),n=e.defaultIntegrations==null?lQ():e.defaultIntegrations,r=_q({integrations:e.integrations,defaultIntegrations:n}),i={...e,enabled:!t&&e.enabled,stackParser:Xs(e.stackParser||yZ),integrations:r,transport:e.transport||sZ};return nl(aQ),IJ(iZ,i)}function dQ(e={}){let t=NX.document,n=t?.head||t?.body;if(!n){cZ&&Uc.error(`[showReportDialog] Global document not defined`);return}let r=Ws(),i=gl()?.getDsn();if(!i){cZ&&Uc.error(`[showReportDialog] DSN not configured`);return}let a={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Dc()},{onLoad:o,onClose:s,onError:c}=a;if(!a.eventId){cZ&&Uc.error(`[showReportDialog] No event ID`),c?.(Error(`No event ID to show the report dialog for`));return}let l=NX.document.createElement(`script`);if(l.async=!0,l.crossOrigin=`anonymous`,l.src=Hq(i,a),o&&(l.onload=o),c&&(l.onerror=()=>{c(Error(`Failed to load the report dialog script`))}),s){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{s()}finally{NX.removeEventListener(`message`,e)}};NX.addEventListener(`message`,e),l.addEventListener(`error`,()=>{NX.removeEventListener(`message`,e)})}n.appendChild(l)}function fQ(e){return ll(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function pQ(e){let t={...e};XJ(t,`react`),Wc(`react`,{version:W.version});let n=uQ(t);return nl(mQ),n}function mQ(e){return fQ(e)?`[SyntheticEvent]`:aQ(e)}function hQ(e,t){let n=new WeakSet;function r(e,t){if(!n.has(e)){if(e.cause)return n.add(e),r(e.cause,t);e.cause=t}}r(e,t)}function gQ(e,{componentStack:t},n){if($c(e)&&t){let n=Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,hQ(e,n)}return Xc(e,n)}var _Q=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,vQ={componentStack:null,error:null,eventId:null},yQ=class extends W.Component{constructor(e){super(e),this.state=vQ,this._openFallbackReportDialog=!0;let t=gl();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on(`afterSendEvent`,t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&dQ({...e.dialogOptions,eventId:this._lastEventId})}))}
125componentDidCatch(e,t){let{componentStack:n}=t,{beforeCapture:r,onError:i,showDialog:a,dialogOptions:o}=this.props;hc(s=>{r&&r(s,e,n);let c=gQ(e,t,{mechanism:{handled:this.props.handled==null?!!this.props.fallback:this.props.handled,type:`auto.function.react.error_boundary`}});i&&i(e,n,c),a&&(this._lastEventId=c,this._openFallbackReportDialog&&dQ({...o,eventId:c})),this.setState({error:e,componentStack:n,eventId:c})})}componentDidMount(){let{onMount:e}=this.props;e&&e()}componentWillUnmount(){let{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===vQ?r(null,null,null):r(e,t,n)),this._cleanupHook&&=(this._cleanupHook(),void 0)}resetErrorBoundary(){let{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(vQ)}render(){let{fallback:e,children:t}=this.props,n=this.state;if(n.componentStack===null)return typeof t==`function`?t():t;let r=typeof e==`function`?W.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return W.isValidElement(r)?r:(e&&_Q&&Uc.warn(`fallback did not produce a valid ReactElement`),null)}};function bQ(){let{t:e}=k(),{newVersionIsAvailable:t}=Rc(),[n,r]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{n&&setTimeout(()=>Ne(),1500)},[n]),t?(0,Z.jsx)(AK,{children:(0,Z.jsx)(NK,{isActive:n,onClick:()=>r(!0),children:(0,Z.jsxs)(ar,{children:[(0,Z.jsx)(sr,{asChild:!0,children:(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(fs,{className:n?`animate-spin-easing`:``,size:20}),(0,Z.jsxs)(`span`,{className:`absolute -top-0.5 right-2.5 flex size-3`,children:[(0,Z.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-(--green-400) opacity-75`}),(0,Z.jsx)(`span`,{className:`relative inline-flex size-3 rounded-full border-(--neutral-900) border-2 bg-(--green-500)`})]})]})}),(0,Z.jsx)(yr,{align:`end`,children:e(`newVersionAvailableClickMe`)})]})})}):null}var xQ=e(ve(),1),SQ=Ja,CQ=W.forwardRef(({className:e,...t},n)=>(0,Z.jsx)(qa,{ref:n,className:m(`inline-flex items-center gap-4 h-fit`,e),...t}));CQ.displayName=qa.displayName;var wQ=W.forwardRef(({className:e,children:t,...n},r)=>(0,Z.jsxs)(no,{ref:r,className:m(`group relative inline-flex items-center gap-1.5 whitespace-nowrap px-0.5 py-3 font-body font-medium text-[13px] text-text-tertiary leading-4 transition-colors duration-200`,`hover:text-text-hover hover:cursor-pointer`,`focus-visible:rounded-xs focus-visible:shadow-focus-ring focus-visible:outline-border-default focus-visible:outline-solid`,`disabled:pointer-events-none disabled:text-text-disabled disabled:hover:text-text-disabled`,`data-[state=active]:text-text-default`,e),...n,children:[t,(0,Z.jsx)(`span`,{className:m(`absolute inset-x-0 bottom-0 h-[3px] translate-y-0.5 scale-x-0 rounded-xs bg-bg-fill-brand-default transition-transform duration-200`,`group-data-[state=active]:scale-x-100`)})]}));wQ.displayName=no.displayName;var TQ=W.forwardRef(({className:e,...t},n)=>(0,Z.jsx)(oo,{ref:n,className:e,...t}));TQ.displayName=oo.displayName;var EQ={scheduled:`info`,overdue:`warning`,executing:`warning`,completed:`success`,failed:`critical`},DQ={campaign:{icon:Nr,labelKey:`agendaTypeCampaign`,href:({resource_id:e})=>`/marketing/campaigns/${e}/information`},recurring_email:{icon:ps,labelKey:`agendaTypeRecurringEmail`,href:({resource_id:e})=>`/marketing/recurring-emails/${e}/information`},voucher_issuance:{icon:Po,labelKey:`agendaTypeVoucherIssuance`,href:({resource_id:e,promotion_id:t})=>`/loyalty/promotions/${t}/issuances/${e}`},points_issuance:{icon:ir,labelKey:`agendaTypePointsIssuance`,href:({resource_id:e})=>`/loyalty/points-issuances/${e}`},automation:{icon:cs,labelKey:`agendaTypeAutomation`,href:({resource_id:e})=>`/automation/details/${e}/information`},fraud_risk_report:{icon:vs,labelKey:`agendaTypeFraudRiskReport`,href:()=>`/data/fraud-risk/loyalty`},giftcard_fraud_risk_report:{icon:vs,labelKey:`agendaTypeGiftcardFraudRiskReport`,href:()=>`/data/fraud-risk/giftcard`},contact_list:{icon:Zn,labelKey:`agendaTypeContactList`,href:({resource_id:e})=>`/crm/lists/dynamic/${e}`},contact_lifecycle:{icon:fs,labelKey:`agendaTypeContactLifecycle`,href:()=>`/settings/contacts`},segment_scheme:{icon:Ro,labelKey:`agendaTypeSegmentScheme`,href:({resource_id:e})=>`/crm/segments/${e}`},tier_program:{icon:Ar,labelKey:`agendaTypeTierProgram`,href:()=>`/loyalty/tier-tracks`}}
125,OQ={scheduled:le.PRIMARY,overdue:le.WARNING,executing:le.WARNING,completed:le.SUCCESS,failed:le.CRITICAL},kQ={scheduled:`agendaStatusScheduled`,overdue:`agendaStatusOverdue`,executing:`agendaStatusExecuting`,completed:`agendaStatusCompleted`,failed:`agendaStatusFailed`},AQ=`0-overdue`;function jQ(e,t){let n=new Map;for(let r of e){let e=r.status===`overdue`?AQ:Wn(new Jt(r.at,t),`yyyy-MM-dd`);n.set(e,[...n.get(e)??[],r])}return[...n.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({key:e,entries:t}))}function MQ(e,t,n,r){if(e===`0-overdue`)return r(`agendaStatusOverdue`);let i=dn(e,t),a=ks(i,ut(Jt.tz(t)));return a===0?r(`agendaToday`):a===1?r(`agendaTomorrow`):new Intl.DateTimeFormat(n,{weekday:`long`,day:`numeric`,month:`long`,timeZone:t}).format(i)}function NQ(e,t,n){return new Intl.DateTimeFormat(n,{day:`numeric`,month:`long`,timeZone:t}).format(new Date(e))}function PQ({from:e,to:t}){let{account:n}=Fe(),[r,i]=(0,W.useState)([]),[a,o]=(0,W.useState)(!1),s=new URLSearchParams({from:e,to:t}).toString(),{mutate:c}=vt({url:`/accounts/${n.id}/agenda?${s}`,dataSetter:e=>{i(e),o(!0)}});return{entries:r,hasLoaded:a,mutate:c}}function FQ({entry:e,formatRelativeDateTimeShort:t,onOpen:n}){let{t:r}=k(),i=DQ[e.type],a=i.icon,o=r(i.labelKey);return(0,Z.jsxs)(`button`,{type:`button`,onClick:n,className:`flex w-full cursor-pointer items-start gap-3 rounded px-3 py-2 text-left hover:bg-bg-surface-hover`,children:[(0,Z.jsx)(he,{tone:EQ[e.status],size:`md`,children:(0,Z.jsx)(a,{className:`size-4`})}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,Z.jsx)(`div`,{className:`min-h-6`,children:(0,Z.jsx)(M,{as:`span`,variant:`bodyMd`,fontWeight:`medium`,tone:`base`,className:`inline-flex`,children:e.title??o})}
125),(0,Z.jsx)(M,{as:`span`,variant:`bodyXs`,tone:`secondary`,truncate:!0,children:o})]}),(0,Z.jsxs)(`span`,{className:`flex shrink-0 flex-col items-end justify-between gap-1 self-stretch`,children:[(0,Z.jsx)(O,{tone:OQ[e.status],size:`sm`,children:r(kQ[e.status])}),(0,Z.jsx)(M,{as:`span`,variant:`bodyXs`,tone:`tertiary`,children:t(e.at)})]})]})}function IQ({entries:e,days:t,timezone:n,locale:r,formatRelativeDateTimeShort:i,onOpen:a}){let{t:o}=k();return e.length===0?(0,Z.jsx)(`div`,{className:`px-3.5 py-6 text-center`,children:(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,tone:`tertiary`,children:o(`notificationCentreUpcomingEmptyTitle`)})}):(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 px-1 py-1`,children:t.map(e=>(0,Z.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,Z.jsx)(`div`,{className:`px-3 pt-1.5 pb-0.5`,children:(0,Z.jsx)(M,{as:`span`,variant:`bodyXs`,fontWeight:`medium`,tone:`tertiary`,children:MQ(e.key,n,r,o)})}),e.entries.map(e=>(0,Z.jsx)(FQ,{entry:e,formatRelativeDateTimeShort:i,onOpen:()=>a(e)},e.id))]},e.key))})}function LQ({children:e}){let{t}=k();return(0,Z.jsx)(`div`,{className:`flex h-11 shrink-0 items-center justify-between gap-2 border-border-default border-t pr-2 pl-4`,children:e})}var RQ={critical:`critical`,error:`critical`,warning:`warning`,info:`info`,success:`success`};function zQ({notification:e,formatRelativeDateTimeShort:t,onOpen:n}){let r=bo(e.type);return(0,Z.jsxs)(`button`,{type:`button`,onClick:n,className:(0,xQ.default)(`flex w-full cursor-pointer items-start gap-3 rounded px-3 py-2 text-left hover:bg-bg-surface-hover focus-visible:shadow-focus-ring`),children:[(0,Z.jsx)(he,{tone:RQ[e.severity],size:`md`,children:(0,Z.jsx)(r,{className:`size-4`})}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,Z.jsx)(`div`,{className:`min-h-6`,children:(0,Z.jsx)(M,{as:`span`,variant:`bodyMd`,fontWeight:`medium`,tone:e.is_read?`secondary`:`base`,className:`inline-flex`,children:e.subject})}
125),(0,Z.jsx)(M,{as:`span`,variant:`bodyXs`,tone:e.is_read?`tertiary`:`secondary`,truncate:!0,children:e.message})]}),(0,Z.jsxs)(`span`,{className:`flex shrink-0 flex-col items-end justify-between gap-1 self-stretch`,children:[(0,Z.jsx)(`span`,{className:(0,xQ.default)(`size-2.5 shrink-0 rounded-full`,e.is_read?`bg-transparent`:`border border-border-default bg-bg-fill-brand-default`)}),(0,Z.jsx)(M,{as:`span`,variant:`bodyXs`,tone:`tertiary`,children:t(e.last_occurred_at)})]})]})}function BQ(e,t){switch(e){case`today`:return t(`notificationCentreGroupToday`);case`yesterday`:return t(`notificationCentreGroupYesterday`);case`thisWeek`:return t(`notificationCentreGroupThisWeek`);default:return t(`notificationCentreGroupMoreThanAWeekAgo`)}}function VQ({notifications:e,groups:t,formatRelativeDateTimeShort:n,onOpen:r}){let{t:i}=k();return e.length===0?(0,Z.jsx)(`div`,{className:`px-3.5 py-6 text-center`,children:(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,tone:`tertiary`,children:i(`notificationCentreEmptyOpenTitle`)})}):(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 px-1 py-1`,children:t.map(e=>(0,Z.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,Z.jsx)(`div`,{className:`px-3 pt-1.5 pb-0.5`,children:(0,Z.jsx)(M,{as:`span`,variant:`bodyXs`,fontWeight:`medium`,tone:`tertiary`,children:BQ(e.key,i)})}),e.notifications.map(e=>(0,Z.jsx)(zQ,{notification:e,formatRelativeDateTimeShort:n,onOpen:()=>r(e)},e.id))]},e.key))})}var HQ=[`today`,`yesterday`,`thisWeek`,`moreThanAWeekAgo`];function UQ(e){let t=new Date,n=new Map;for(let r of e){let e=WQ(r.last_occurred_at,t),i=n.get(e)??[];i.push(r),n.set(e,i)}return HQ.filter(e=>n.has(e)).map(e=>({key:e,notifications:n.get(e)??[]}))}function WQ(e,t){let n=je(e);return _r(n,t)?`today`:_r(n,As(t,1))?`yesterday`:Me(n,As(t,7))>=0?`thisWeek`:`moreThanAWeekAgo`}function GQ({unreadCount:e,onClose:t}){let{t:n}=k(),{formatRelativeDateTimeShort:r}=Oe(),{errorToast:i}=y(),a=s(),c=go(),{account:l}=Fe(),{accountUser:u}=gn(),d=Rn(u.user.locale),[f,p]=(0,W.useState)(`notifications`),{notifications:m,mutate:h}=wo(`open`,1,5),g=UQ(m),_=l.timezone,{entries:v}=PQ((0,W.useMemo)(()=>{let e=ut(Jt.tz(_)),t=us(ot(Jt.tz(_),1));return{from:ct(e),to:ct(t)}},[_])),b=v.filter(e=>e.kind===`planned`),x=jQ(b,_),S=b.filter(e=>[`scheduled`,`overdue`,`executing`].includes(e.status)).length,C=b.filter(e=>e.status===`completed`).length;return(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,Z.jsxs)(SQ,{className:`flex min-h-0 flex-1 flex-col`,value:f,onValueChange:e=>p(e),children:[(0,Z.jsxs)(`div`,{className:`flex h-fit shrink-0 items-center justify-between gap-2 border-border-default border-b pr-2 pl-4`,children:[(0,Z.jsxs)(CQ,{children:[(0,Z.jsxs)(wQ,{value:`notifications`,className:`gap-1.5`,children:[n(`notifications`),e>0&&(0,Z.jsx)(O,{tone:le.PRIMARY,size:`sm`,children:e})]}),(0,Z.jsxs)(wQ,{value:`upcoming`,className:`gap-1.5`,children:[n(`notificationCentreUpcomingActivityTab`),(0,Z.jsxs)(`div`,{className:`flex flex-row -space-x-2`,children:[S>0&&(0,Z.jsx)(O,{tone:le.PRIMARY,size:`sm`,children:S}),C>0&&(0,Z.jsx)(O,{tone:le.SUCCESS,size:`sm`,children:C})]})]})]}),(0,Z.jsx)(o,{ariaLabel:n(`notificationSettings`),variant:`tertiary`,size:`sm`,onClick:()=>{t(),a(`/settings/notifications`)},children:(0,Z.jsx)(mo,{className:`size-4`})})]}),(0,Z.jsx)(TQ,{value:`notifications`,className:`min-h-0 flex-1 overflow-y-auto`,children:(0,Z.jsx)(VQ,{notifications:m,groups:g,formatRelativeDateTimeShort:r,onOpen:e=>{let n=e.deep_link&&Oo(e.deep_link.path,u)?e.deep_link.path:null;t(),a(n??`/settings/notifications/all`),e.is_read||c.markRead(e.id).then(()=>h()).catch(i)}})}),(0,Z.jsx)(TQ,{value:`upcoming`,className:`min-h-0 flex-1 overflow-y-auto`,children:(0,Z.jsx)(IQ,{entries:b,days:x,timezone:_,locale:d,formatRelativeDateTimeShort:r,onOpen:e=>{t(),a(DQ[e.type].href(e))}})})]}),f===`notifications`?(0,Z.jsxs)(LQ,{children:[(0,Z.jsx)(ai,{to:`/settings/notifications/all`,removeUnderline:!0,className:`text-sm`,onClick:t,children:n(`allNotifications`)}),(0,Z.jsx)(N,{size:`sm`,onClick:()=>c.markAllRead().then(()=>h()).catch(i),children:n(`markAllAsRead`)})]}
125):(0,Z.jsx)(LQ,{children:(0,Z.jsx)(ai,{to:`/agenda`,removeUnderline:!0,className:`text-sm`,onClick:t,children:n(`allActivity`)})})]})}function KQ(){let[e,t]=(0,W.useState)(!1),{count:n}=xo();return(0,Z.jsx)(AK,{children:(0,Z.jsxs)(Ve,{open:e,onOpenChange:t,children:[(0,Z.jsx)(Re,{asChild:!0,children:(0,Z.jsx)(XK,{ariaLabel:`Notifications`,isActive:e,children:(0,Z.jsxs)(`span`,{className:`relative flex`,children:[(0,Z.jsx)(po,{className:`size-5`}),n>0&&(0,Z.jsxs)(`div`,{className:(0,xQ.default)(`absolute -top-1.5 -right-2 flex h-fit items-center justify-center gap-1 text-nowrap rounded-full bg-linear-(--color-badge-bg-primary-on-dark) bg-linear-to-b px-1 py-0.5 font-body font-normal text-[10px] text-badge-text-primary-on-dark leading-3`),children:[(0,Z.jsx)(`div`,{className:(0,xQ.default)(`absolute inset-0 rounded-full shadow-color-burn`)}),n>99?`99+`:n]})]})})}),(0,Z.jsx)(At,{align:`end`,sideOffset:6,collisionPadding:12,className:`flex max-h-(--radix-popover-content-available-height) w-[calc(100vw-1.5rem)] flex-col p-0 sm:w-107`,children:(0,Z.jsx)(GQ,{unreadCount:n,onClose:()=>t(!1)})})]})})}var qQ=(0,W.createContext)({});function JQ(){let{isOpen:e,setIsOpen:t}=(0,W.useContext)(qQ);return{isOpen:e,setIsOpen:t}}function YQ(){let{isOpen:e,setIsOpen:t}=JQ();return(0,Z.jsx)(AK,{children:(0,Z.jsx)(NK,{onClick:()=>{t(!e)},children:(0,Z.jsx)(Cn,{className:`size-5`})})})}function XQ(){return(0,Z.jsx)(AK,{children:(0,Z.jsx)(NK,{to:`/settings/account`,children:(0,Z.jsx)(hs,{className:`size-5`})})})}function ZQ(){let{t:e}=k(),t=FK();return(0,Z.jsxs)(lr,{value:`apps`,className:`border-border-on-dark`,children:[(0,Z.jsx)(mr,{className:`font-regular text-text-onDark-default`,children:e(`navigationApps`)}),(0,Z.jsxs)(fr,{className:`px-2 *:pb-3`,children:[(0,Z.jsx)($,{to:t.customerApp.path,children:t.customerApp.name}),t.businessApp.hasPermission&&(0,Z.jsx)($,{to:t.businessApp.path,children:t.businessApp.name}),t.portalSessions.usesFeature&&(0,Z.jsx)($,{to:t.portalSessions.path,children:t.portalSessions.name}),(0,Z.jsx)($,{to:t.contactsPortal.path,children:t.contactsPortal.name}),(0,Z.jsx)($,{to:t.widget.path,children:t.widget.name}),(0,Z.jsx)($,{to:t.integrations.path,children:t.integrations.name})]})]})}function QQ(){let{t:e}=k(),{setOpenDropdown:t}=DK();return(0,Z.jsx)(nt,{to:`/automation`,className:`text-left`,onClick:()=>t(``),children:(0,Z.jsx)(`div`,{className:`group flex w-full flex-row items-center justify-between border-border-on-dark px-4 py-4 text-left font-body font-medium font-tracking-normal text-[14px] text-text-onDark-default leading-5 transition-colors focus:outline-hidden focus-visible:underline`,children:e(`navigationAutomation`)})})}function $Q(){let{t:e}=k(),t=RK(),{accountUser:n}=gn();return n.hasPermission(`contacts`)?(0,Z.jsxs)(lr,{value:`crm`,className:`border-border-on-dark`,children:[(0,Z.jsx)(mr,{className:`font-regular text-text-onDark-default`,children:e(`navigationCrm`)}),(0,Z.jsxs)(fr,{className:`px-2 *:pb-3`,children:[(0,Z.jsx)($,{to:t.contacts.path,children:t.contacts.name}),(0,Z.jsx)($,{to:t.identifiers.path,children:t.identifiers.name}),(0,Z.jsx)($,{to:t.lists.path,children:t.lists.name}),n.isAdmin&&(0,Z.jsx)($,{to:t.segments.path,children:t.segments.name}),(0,Z.jsx)($,{to:t.forms.path,children:t.forms.name}),(0,Z.jsx)($,{to:t.orders.path,children:t.orders.name}),t.bookings.usesFeature&&(0,Z.jsx)($,{to:t.bookings.path,children:t.bookings.name}),t.reviews.usesFeature&&(0,Z.jsx)($,{to:t.reviews.path,children:t.reviews.name}),t.events.usesFeature&&(0,Z.jsx)($,{to:t.events.path,children:t.events.name}),t.visits.usesFeature&&(0,Z.jsx)($,{to:t.visits.path,children:t.visits.name}),t.shifts.usesFeature&&(0,Z.jsx)($,{to:t.shifts.path,children:t.shifts.name})]})]}):null}function e$(){let{t:e}=k(),t=BK();return(0,Z.jsxs)(lr,{value:`data`,className:`border-border-on-dark`,children:[(0,Z.jsx)(mr,{className:`font-regular text-text-onDark-default`,children:e(`navigationData`)}),(0,Z.jsxs)(fr,{className:`px-2 *:pb-3`,children:[(0,Z.jsx)($,{to:t.insights.path,children:t.insights.name}),(0,Z.jsx)($,{to:t.fraudRisk.path,hidden:!t.fraudRisk.usesFeature,children:t.fraudRisk.name}),(0,Z.jsx)($,{to:t.imports.path,children:t.imports.name}),(0,Z.jsx)($,{to:t.exports.path,children:t.exports.name}),(0,Z.jsx)($,{to:t.generate.path,children:t.generate.name}),(0,Z.jsx)($,{to:t.files.path,children:t.files.name}),(0,Z.jsx)($,{to:t.backgroundTasks.path,children:t.backgroundTasks.name})]})]})}function t$(){let{t:e}=k(),t=HK(),{accountUser:n}=gn();return n.hasPermission(`loyalty`)?(0,Z.jsxs)(lr,{value:`loyalty`,className:`border-border-on-dark`,children:[(0,Z.jsx)(mr,{className:`font-regular text-text-onDark-default`,children:e(`navigationLoyalty`)}),(0,Z.jsxs)(fr,{className:`px-2 *:pb-3`,children:[(0,Z.jsx)($,{to:t.dashboard.path,children:t.dashboard.name}),(0,Z.jsx)($,{to:t.transactions.path,children:t.transactions.name}),(0,Z.jsx)($,{to:t.rules.path,children:t.rules.name}
125),(0,Z.jsx)($,{to:t.pointsIssuances.path,children:t.pointsIssuances.name}),(0,Z.jsx)($,{to:t.rewards.path,children:t.rewards.name}),(0,Z.jsx)($,{to:t.promotions.path,children:t.promotions.name}),(0,Z.jsx)($,{to:t.tierTracks.path,children:t.tierTracks.name}),(0,Z.jsx)($,{to:t.tokens.path,children:t.tokens.name}),t.referrals.usesFeature&&(0,Z.jsx)($,{to:t.referrals.path,children:t.referrals.name}),t.stampCards.usesFeature&&(0,Z.jsx)($,{to:t.stampCards.path,children:t.stampCards.name})]})]}):null}function n$(){let{t:e}=k(),t=WK(),{accountUser:n}=gn();return n.hasPermission(`marketing`)?(0,Z.jsxs)(lr,{value:`marketing`,className:`border-border-on-dark`,children:[(0,Z.jsx)(mr,{className:`font-regular text-text-onDark-default`,children:e(`navigationMarketing`)}),(0,Z.jsxs)(fr,{className:`px-2 *:pb-3`,children:[(0,Z.jsx)($,{to:t.campaigns.path,children:t.campaigns.name}),(0,Z.jsx)($,{to:t.recurringEmails.path,children:t.recurringEmails.name}),(0,Z.jsx)($,{to:t.automatedEmails.path,children:t.automatedEmails.name}),(0,Z.jsx)($,{to:t.templates.path,children:t.templates.name})]})]}):null}function r$(){let{t:e}=k(),t=KK();return(0,Z.jsxs)(lr,{value:`store`,className:`border-border-on-dark`,children:[(0,Z.jsx)(mr,{className:`font-regular text-text-onDark-default`,children:e(`navigationStore`)}),(0,Z.jsxs)(fr,{className:`px-2 *:pb-3`,children:[(0,Z.jsx)($,{to:t.prepaid.path,children:t.prepaid.name}),(0,Z.jsx)($,{to:t.giftcards.path,children:t.giftcards.name}),t.stripcards.usesFeature&&(0,Z.jsx)($,{to:t.stripcards.path,children:t.stripcards.name}),(0,Z.jsx)($,{to:t.internalStore.path,children:t.internalStore.name})]})]})}function i$(){let{openDropdown:e,setOpenDropdown:t}=DK(),n=e===`mobile-menu`;return(0,Z.jsx)(kK,{id:`mobile-menu`,"data-side":`top`,contentClassName:`w-dvw h-dvh rounded-none lg:hidden data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:[--tw-enter-translate-y:-2rem] data-[state=open]:ease-out data-[state=open]:[animation-duration:300ms] data-[state=closed]:[--tw-exit-translate-y:-2rem] data-[state=closed]:[--tw-exit-scale:1] data-[state=closed]:ease-in data-[state=closed]:[animation-duration:300ms]`,triggerClassName:`p-1! size-9 items-center justify-center bg-nav-bg-default focus-visible:shadow-none focus-visible:outline-0 lg:hidden`,trigger:(0,Z.jsxs)(`span`,{onClick:()=>{n&&t(``)},"aria-hidden":`true`,className:`relative block size-5`,children:[(0,Z.jsx)(`span`,{className:`absolute left-[3px] h-0.5 w-3.5 rounded-full bg-current transition-all duration-300 ease-in-out ${n?`top-[9px] rotate-45`:`top-[5px] rotate-0`}`}),(0,Z.jsx)(`span`,{className:`absolute top-[9px] left-[3px] h-0.5 w-3.5 rounded-full bg-current transition-all duration-300 ease-in-out ${n?`opacity-0`:`opacity-100`}`}),(0,Z.jsx)(`span`,{className:`absolute left-[3px] h-0.5 w-3.5 rounded-full bg-current transition-all duration-300 ease-in-out ${n?`top-[9px] -rotate-45`:`top-[13px] rotate-0`}`})]}),children:(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 pt-3 font-normal text-text-default lg:hidden`,children:(0,Z.jsxs)(hr,{type:`single`,collapsible:!0,children:[(0,Z.jsx)($Q,{}),(0,Z.jsx)(t$,{}),(0,Z.jsx)(n$,{}),(0,Z.jsx)(r$,{}),(0,Z.jsx)(ZQ,{}),(0,Z.jsx)(e$,{}),(0,Z.jsx)(QQ,{})]})})})}function a$(){let{language:e}=k();return{url:e==`en`||e==`nl`||e==`de`?`https://help.leat.com/${e}`:`https://help.leat.com/en`}}function o$(e){let{type:t}=e,{theme:n,switchTheme:r}=vl();return(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>r(t),className:`flex h-8 w-full items-center justify-center rounded-lg hover:bg-nav-bg-surface-hover focus-visible:shadow-focus-ring-on-dark ${n===t?`bg-nav-bg-surface-active`:``}`,children:[t===`light`&&(0,Z.jsx)(qW,{className:`size-4 stroke-nav-text-default`}),t===`dark`&&(0,Z.jsx)(Ko,{className:`size-4 stroke-nav-text-default`}),t===`system`&&(0,Z.jsx)(os,{className:`size-4 stroke-nav-text-default`})]})}function s$(){let{t:e}=k(),{brandKit:t}=ki(),[n,r]=(0,W.useState)(!1),{accountUser:{user:i}}=gn(),{account:a}=(0,W.useContext)(He),o=a$(),[s,c]=(0,W.useState)(`user`),{openDropdown:l,setOpenDropdown:u}=DK(),[d,f]=(0,W.useState)([]),{logout:p}=AG(),[m,h]=(0,W.useState)(!1),g=Xt(i.fullName()||i.email),_=(0,W.useRef)(null),v=(0,W.useRef)(null),[y,b]=(0,W.useState)(void 0);return(0,W.useLayoutEffect)(()=>{let e=requestAnimationFrame(()=>{let e=s===`user`?_.current:v.current;e&&b(e.offsetHeight)});return()=>cancelAnimationFrame(e)},[s,d,l]),vt({url:`/accounts`,dataSetter:f}),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(kK,{id:`user`,align:`end`,onClose:()=>c(`user`),triggerClassName:`mt-1 p-1! size-9 items-center justify-center bg-nav-bg-surface-default text-nav-text-default hover:bg-nav-bg-surface-hover focus-visible:shadow-none focus-visible:outline-0 lg:mt-0 lg:p-0! lg:size-8 lg:bg-transparent`,contentClassName:`w-dvw h-dvh rounded-none  lg:w-80! lg:h-auto! lg:rounded-lg max-lg:data-[state=open]:animate-in max-lg:data-[state=open]:fade-in-0 max-lg:data-[state=open]:[--tw-enter-translate-y:-2rem] max-lg:data-[state=open]:ease-out max-lg:data-[state=open]:[animation-duration:300ms] max-lg:data-[state=closed]:[--tw-exit-translate-y:-2rem] max-lg:data-[state=closed]:[--tw-exit-scale:1] max-lg:data-[state=closed]:ease-in max-lg:data-[state=closed]:[animation-duration:300ms]`,trigger:(0,Z.jsx)(`span`,{onClick:()=>{l===`user`&&u(``)},className:`flex items-center`,children:(0,Z.jsx)(rr,{src:i.avatar,alt:i.email,initials:g,"aria-label":e(`goToProfile`),className:`size-8 outline-nav-border-default! hover:opacity-90 focus-visible:shadow-focus-ring`})}),children:(0,Z.jsx)(`div`,{className:`overflow-hidden transition-[height] duration-300 ease-out`,style:{height:y},children:(0,Z.jsxs)(`div`,{className:`flex w-[200%] items-start transition-transform duration-300 ease-out ${s===`accountSwitch`?`-translate-x-1/2`:`translate-x-0`}`,children:[(0,Z.jsxs)(`div`,{ref:_,className:`flex w-1/2 shrink-0 flex-col gap-1 pb-0.5`,children:[(0,Z.jsxs)($,{to:`/user/profile`,children:[(0,Z.jsx)(rr,{src:i.avatar,initials:g,alt:i.email,"aria-label":e(`goToProfile`),className:`size-10 outline-nav-border-default!`}),(0,Z.jsxs)(`div`,{className:`ml-2 flex flex-col`,children:[(0,Z.jsxs)(M,{variant:`headingSm`,as:`p`,className:`text-nav-text-default`,children:[i.firstname,` `,i.lastname]}),(0,Z.jsx)(M,{as:`p`,className:`text-nav-text-secondary`,children:i.email})]})]}),(0,Z.jsx)(Si,{orientation:`horizontal`,className:`bg-nav-border-default`}
125),(0,Z.jsxs)(`div`,{className:`flex flex-row justify-around gap-0.5 px-1`,children:[(0,Z.jsx)(o$,{type:`light`}),(0,Z.jsx)(Si,{orientation:`vertical`,className:`bg-nav-border-default`}),(0,Z.jsx)(o$,{type:`dark`}),(0,Z.jsx)(Si,{orientation:`vertical`,className:`bg-nav-border-default`}),(0,Z.jsx)(o$,{type:`system`})]}),(0,Z.jsx)(Si,{orientation:`horizontal`,className:`bg-nav-border-default`}),(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsxs)($,{to:`/user/profile`,className:`flex gap-2`,children:[(0,Z.jsx)(ss,{className:`size-4`}),e(`profile`)]}),(0,Z.jsxs)($,{href:o.url,target:`_blank`,className:`flex gap-2`,children:[(0,Z.jsx)(IW,{className:`size-4`}),e(`helpCenter`)]}),(0,Z.jsxs)($,{onClick:()=>h(!0),className:`flex gap-2`,children:[(0,Z.jsx)(WW,{className:`size-4`}),e(`logout`)]})]}),(0,Z.jsx)(Si,{orientation:`horizontal`,className:`bg-nav-border-default lg:hidden`}),(0,Z.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between gap-2 rounded-md px-2 py-3 font-medium text-nav-text-default text-sm antialiased transition-colors hover:cursor-pointer hover:bg-nav-bg-surface-hover focus-visible:shadow-focus-ring-on-dark active:bg-nav-bg-surface-active lg:hidden lg:py-1.5`,onClick:()=>c(`accountSwitch`),children:[(0,Z.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[t.small_logo&&(0,Z.jsx)(uo,{className:`size-4`,src:t.small_logo.url,alt:`company logo`}),a.company]}),(0,Z.jsx)(fo,{className:`size-4`})]})]}),(0,Z.jsxs)(`div`,{ref:v,className:`flex w-1/2 shrink-0 flex-col gap-1 pb-0.5`,children:[(0,Z.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-2 py-3 font-medium text-nav-text-default text-sm antialiased transition-colors hover:cursor-pointer hover:bg-nav-bg-surface-hover focus-visible:shadow-focus-ring-on-dark active:bg-nav-bg-surface-active lg:py-1.5`,onClick:()=>c(`user`),children:[(0,Z.jsx)(Vn,{className:`size-4`}),e(`back`)]}),(0,Z.jsx)(Si,{orientation:`horizontal`,className:`bg-nav-border-default`}),(0,Z.jsx)(TK,{accounts:d})]})]})})}),(0,Z.jsx)(St,{open:m,onOpenChange:h,children:(0,Z.jsxs)(Ye,{children:[(0,Z.jsxs)(Dt,{className:`p-4`,children:[(0,Z.jsx)(Lt,{children:e(`logout`)}),(0,Z.jsx)(Tn,{children:e(`doYouWantToLogout`)})]}),(0,Z.jsxs)(We,{children:[(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{children:e(`cancel`)})}),(0,Z.jsx)(N,{onClick:()=>{r(!0),p()},variant:`primary`,isLoading:n,tone:`critical`,children:e(`logout`)})]})]})})]})}var c$=200;function l$(){let{t:e}=k(),{visible:t,now:n,isDismissible:r,dismiss:i,hideForNow:a,report:o}=Wr(),{open:s,tab:c}=xr(),{pathname:l}=ye(),u=l.endsWith(`/support`)||s&&c===`support`?t.filter(e=>!Kr(e)):t,[d,f]=(0,W.useState)(!1),p=u.length>1,h=p&&d;(0,W.useEffect)(()=>{p||f(!1)},[p]);let[g,_]=(0,W.useState)({}),v=(0,W.useCallback)((e,t)=>{_(n=>n[e]===t?n:{...n,[e]:t})},[]);if(u.length===0)return null;let y=Zr(u.map(e=>g[e.id]??0),h);return(0,Z.jsxs)(`div`,{className:m(`pointer-events-none fixed inset-x-0 flex flex-col items-center gap-2`,`top-[calc(var(--nav-h,3.5rem)+0.75rem)] px-[calc(var(--frame-gutter,0px)+0.75rem)]`),children:[(0,Z.jsx)(`div`,{className:m(`relative w-full max-w-xl transition-[height] duration-300 ease-out motion-reduce:transition-none`,p&&`pointer-events-auto`),style:{height:y.height},children:u.map((e,t)=>(0,Z.jsx)(u$,{announcement:e,now:n,position:y.cards[t],depth:t,count:u.length,front:t===0,shown:t===0||h,onHeight:v,moreCount:p&&!h&&t===0?u.length-1:0,onExpand:()=>f(!0),dismissible:r(e),onClose:()=>r(e)?i(e):a(e),onReport:t=>o(e,t)},e.id))}),h&&(0,Z.jsxs)(N,{variant:`default`,size:`sm`,className:`pointer-events-auto shadow-popover2`,"aria-expanded":!0,onClick:()=>f(!1),children:[(0,Z.jsx)(Gn,{className:`size-4`}),e(`leatAnnouncements.showLess`,`Show less`)]})]})}function u$({announcement:e,now:t,position:n,depth:r,count:i,front:a,shown:s,onHeight:c,moreCount:l,onExpand:u,dismissible:d,onClose:f,onReport:p}){let{t:g}=k(),[_,v]=(0,W.useState)(!1),y=(0,W.useRef)(null),b=e.kind===`warning`;(0,W.useEffect)(()=>{s&&Jr(e)&&p(`seen`)},[s,e.id,e.seen]),(0,W.useLayoutEffect)(()=>{let t=y.current;if(!t)return;c(e.id,t.offsetHeight);let n=new ResizeObserver(()=>c(e.id,t.offsetHeight));return n.observe(t),()=>n.disconnect()},[e.id,c]);let x=()=>{v(!0),window.setTimeout(f,c$)},S=n.height>0;return(0,Z.jsx)(`div`,{role:b?`alert`:`status`,inert:!s,"aria-hidden":!s,className:m(`pointer-events-auto absolute inset-x-0 top-0 origin-bottom overflow-hidden rounded-lg border border-border-default shadow-popover2`,`transition-[transform,height,opacity,background-color] duration-300 ease-out motion-reduce:transition-none`,s?`bg-bg-surface-default`:`bg-bg-surface-hover`,a&&!_&&`fade-in-0 slide-in-from-top-2 animate-in`),style:{zIndex:i-r,height:S?n.height:void 0,transform:`translateY(${n.y-(_?8:0)}px) scale(${n.scale})`,opacity:_||!n.visible?0:1},children:(0,Z.jsxs)(`div`,{ref:y,className:m(`flex items-start gap-3 p-3 transition-opacity duration-200`,!s&&`opacity-0`),children:[(0,Z.jsx)(Dr,{announcement:e}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2 pt-0.5`,children:[(0,Z.jsx)(Ni,{announcement:e,now:t}),(e.link_url||l>0)&&(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,Z.jsx)(jr,{announcement:e,now:t,variant:`primary`,onClick:()=>p(`clicked`)}),l>0&&(0,Z.jsxs)(N,{variant:`tertiary`,size:`sm`,className:`ml-auto`,"aria-expanded":!1,onClick:u,children:[g(`leatAnnouncements.more`,`+{{count}} more`,{count:l}),(0,Z.jsx)(h,{className:`size-4`})]})]})]}),(0,Z.jsx)(o,{size:`sm`,variant:`tertiary`,className:`-mt-1 -mr-1 shrink-0`,ariaLabel:d?g(`leatAnnouncements.dismiss`,`Dismiss announcement`):g(`leatAnnouncements.hide`,`Hide for now`),onClick:x,children:d?(0,Z.jsx)(ce,{className:`size-4`}):(0,Z.jsx)(Gn,{className:`size-4`})})]})})}function d$(){let{t:e}=k(),{accountSubscription:t}=Co(),{accountUser:n}=gn(),{account:r}=Fe(),i=(0,W.useRef)(null),a=!!t?.overdueAmount&&!r.suspend_overdue_amount_modal;return(0,W.useLayoutEffect)(()=>
125{if(!i.current)return;let e=new ResizeObserver(([e])=>{let t=e.borderBoxSize?.[0]?.blockSize??e.contentRect.height;document.documentElement.style.setProperty(`--nav-h`,`${t}px`)});return e.observe(i.current,{box:`border-box`}),()=>e.disconnect()},[]),(0,Z.jsxs)(`div`,{ref:i,className:`flex h-fit w-full shrink-0 flex-col bg-nav-bg-surface-default pt-(--safe-top)`,style:{zIndex:$a.navigation},children:[a&&(0,Z.jsxs)(si,{tone:`warning`,className:`rounded-none! sm:px-6`,children:[(0,Z.jsxs)(Hi,{children:[(0,Z.jsx)(M,{as:`h3`,variant:`headingSm`,className:`text-text-warning-on-bg-fill`,children:e(`openInvoice`)}),(0,Z.jsx)(M,{as:`span`,className:`text-text-warning-on-bg-fill`,children:e(`explanationOpenInvoice`,{amount:t.overdueAmount})})]}),n.isAdmin&&(0,Z.jsx)(zs,{className:`mt-0`,children:(0,Z.jsx)(Is,{to:`/settings/subscription/current#invoices`,className:`h-fit`,children:e(`viewInvoices`)})})]}),(0,Z.jsx)(OK,{children:(0,Z.jsxs)(PK,{className:`h-14 px-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center`,children:[(0,Z.jsx)(AK,{children:(0,Z.jsx)($,{className:`sr-only z-50 -translate-y-full bg-nav-bg-surface-default font-body text-sm focus:not-sr-only focus:absolute focus:translate-y-0 focus:transform focus:rounded-xs focus:px-4 focus:py-2 focus:shadow-focus-ring-on-dark focus:transition`,href:`#main-content`,children:e(`skipToMain`)})}),(0,Z.jsx)(AK,{children:(0,Z.jsx)(NK,{to:Q.start,isActive:!1,children:(0,Z.jsx)(`img`,{className:`block size-6 object-fill`,src:rn()?QW:bK,alt:`logo`})})}),(0,Z.jsx)(JK,{})]}),(0,Z.jsxs)(`div`,{className:`relative flex items-center justify-between gap-0.5`,children:[(0,Z.jsx)(bQ,{}),(0,Z.jsx)(YK,{}),(0,Z.jsx)(ZK,{}),(0,Z.jsx)(KQ,{}),(0,Z.jsx)(YQ,{}),(0,Z.jsx)(XQ,{}),(0,Z.jsxs)(`div`,{className:`flex items-center lg:ml-1.5 lg:gap-0.5 lg:rounded-full lg:bg-nav-bg-surface-secondary-default lg:p-0.5`,children:[(0,Z.jsx)(MK,{}),(0,Z.jsx)(s$,{})]}),(0,Z.jsx)(i$,{})]})]})}),(0,Z.jsx)(l$,{})]})}function f$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)({id:``,type:``,plan:{itemPriceId:``,discountedPrice:0},planName:``,currencyCode:``,billingPeriod:``,billingPeriodUnit:``,displayPrice:``,autoRenewal:!1,hasContract:!1,futureSubscription:null,contractTerms:{startDate:``,endDate:``,renewalDate:``,actionAtTermEnd:``,autoRenewal:!1,initialPeriod:0,initialPeriodUnit:``,renewalPeriod:0,renewalPeriodUnit:``,noticePeriod:0},addOns:[],products:{plan:{limit:0,currentUsage:0,tiers:[]},addOns:[]},pricePerPeriod:0}),{mutate:i,pending:a}=vt({url:`accounts/${t?.id}/subscription/current`,dataSetter:e=>{r(e)}});return(0,Z.jsx)(Eo.Provider,{value:{accountSubscription:n,mutate:i,pending:a},children:e.children})}function p$(e){let{account:t}=(0,W.useContext)(He),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/devices`,dataSetter:r});return(0,Z.jsx)(rs.Provider,{value:{mutate:a,pending:i,devices:n},children:e.children})}function m$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/forms`,dataSetter:r});return(0,Z.jsx)(yl.Provider,{value:{forms:n,mutate:a},children:e.children})}function h$(e){let{account:t}=(0,W.useContext)(He),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/roles`,dataSetter:r});return(0,Z.jsx)(ho.Provider,{value:{pending:i,mutate:a,roles:n},children:e.children})}function g$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/units`,dataSetter:r});return(0,Z.jsx)(Io.Provider,{value:{mutate:a,units:n},children:e.children})}var _$=5e3,v$=`/settings/subscription/current#invoices`;function y$(){let{t:e}=k(),{accountSubscription:t}=Co(),{accountUser:n}=gn(),{account:r}=Fe(),{open:a,openSupport:o}=xr(),{push:s}=be(),c=ye(),[l,u]=(0,W.useState)(!0),d=(0,W.useRef)(null),f=!!t?.overdueAmount,p=c.pathname.includes(`/settings/subscription`);(0,W.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);let m=e=>{u(e),e||(d.current&&clearTimeout(d.current),d.current=setTimeout(()=>u(!0),_$))};return!f||p||r.suspend_overdue_amount_modal||n.user.email.includes(`@leat.com`)||n.user.email.includes(`@piggy.nl`)?null:(0,Z.jsx)(St,{open:l&&!a,onOpenChange:m,children:(0,Z.jsxs)(Ye,{className:`sm:max-w-xl`,overlayClassName:`bg-black/60 backdrop-blur-md`,children:[(0,Z.jsx)(Lt,{className:`sr-only`,children:e(`overduePaymentTitle`)}),(0,Z.jsx)(Tn,{hidden:!0,children:e(`overduePaymentBalanceLine`,{amount:t.overdueAmount})}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-5 px-6 py-9 sm:px-8`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-4 text-center`,children:[(0,Z.jsx)(`div`,{className:`rounded-full bg-bg-fill-critical-secondary/60 p-3`,children:(0,Z.jsx)(`div`,{className:`flex size-14 items-center justify-center rounded-full bg-bg-fill-critical-default`,children:(0,Z.jsx)(i,{className:`size-7 text-text-critical-on-bg-fill`,strokeWidth:2})})}
125),(0,Z.jsx)(M,{as:`h2`,variant:`headingXl`,"aria-hidden":!0,children:e(`overduePaymentTitle`)}),(0,Z.jsx)(M,{as:`span`,variant:`heading2xl`,tone:`critical`,numeric:!0,children:t.overdueAmount}),(0,Z.jsxs)(`div`,{className:`flex max-w-md flex-col gap-1`,children:[(0,Z.jsx)(M,{as:`p`,fontWeight:`medium`,children:e(`overduePaymentMustBePaidInFull`)}),(0,Z.jsx)(M,{as:`p`,tone:`secondary`,children:n.isAdmin?e(`overduePaymentAdminInstruction`):e(`overduePaymentContactAdmin`)})]})]}),(0,Z.jsxs)(di,{tone:`critical`,className:`p-4`,children:[(0,Z.jsx)(Mi,{tone:`critical`,className:`mt-px`}),(0,Z.jsxs)(Hi,{children:[(0,Z.jsx)(M,{as:`p`,variant:`bodyMd`,tone:`inherit`,fontWeight:`medium`,children:e(`warning`)}),(0,Z.jsx)(M,{as:`p`,variant:`bodyMd`,tone:`inherit`,children:e(`overduePaymentSuspensionWarning`)})]})]}),n.isAdmin&&(0,Z.jsxs)(N,{variant:`primary`,className:`w-full py-2.5`,onClick:()=>{m(!1),s(v$)},children:[(0,Z.jsx)(Jo,{className:`size-4`}),e(`viewAndPayInvoices`)]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-1`,children:[(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,tone:`tertiary`,children:e(`needHelp`)}),(0,Z.jsx)(N,{variant:`tertiary`,size:`sm`,onClick:o,children:e(`chatWithSupport`)})]})]})]})})}function b$(){let{t:e}=k(),{successToast:t,errorToast:n}=y(),r=Rt(),{data:i,setData:a}=(0,W.useContext)(Qt),[o,s]=(0,W.useState)(!1),{goBack:c}=be(),{accountUser:{user:l}}=gn(),[u,d]=(0,W.useState)(!1);(0,W.useEffect)(()=>{s(!!i)},[i]);let f=()=>{d(!0),r.post(`/verify/send`,{email:l.email}).then(()=>t(e(`resendVerificationEmail`))).catch(n).finally(()=>d(!1))};return(0,Z.jsx)(St,{open:o,onOpenChange:s,children:(0,Z.jsx)(jt,{children:(0,Z.jsxs)(Ye,{children:[(0,Z.jsxs)(Dt,{className:`p-4`,children:[(0,Z.jsx)(Lt,{children:i?.title}),(0,Z.jsx)(Tn,{children:i?.message})]}),(0,Z.jsxs)(We,{children:[(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{onClick:()=>{a(null),c()},children:e(`close`)})}),(0,Z.jsx)(N,{variant:`primary`,onClick:()=>{i.type==`verify_email`?f():(a(null),c())},isLoading:u,children:i?.submit_text})]})]})})})}var x$={FREE:`FREE`,STARTER:`STARTER`,PROFESSIONAL:`PROFESSIONAL`,ENTERPRISE:`ENTERPRISE`};function S$(){let{t:e}=k(),{usageData:t,setUsageData:n}=(0,W.useContext)(An),{account:r}=(0,W.useContext)(He),{errorToast:i}=y(),a=Rt(),[o,s]=(0,W.useState)(!1),[c,l]=(0,W.useState)(!1),[u,d]=(0,W.useState)(null),{push:f}=be();(0,W.useEffect)(()=>{t?(l(!0),s(!0),a.get(`/accounts/${r.id}/usages/check`,{limit:t.limit,type:t.type}).then(e=>{d(e.data.data.next_plan)}).catch(i).finally(()=>s(!1))):l(!1)},[t]);let p=()=>{n(null),d(null)},m=()=>{p(),f(`/settings/subscription`)},h={[x$.FREE]:{name:e(`free`),description:e(`free`)},[x$.STARTER]:{name:e(`starter`),description:e(`starterPlanDescription`)},[x$.PROFESSIONAL]:{name:e(`professional`),description:e(`professionalPlanDescription`)},[x$.ENTERPRISE]:{name:e(`enterprise`),description:e(`enterprisePlanDescription`)}},g={[ln.NUMBER_OF_USERS]:e(`users`),[ln.NUMBER_OF_FORMS]:e(`forms`),[ln.NUMBER_OF_UNITS]:e(`units`),[ln.NUMBER_OF_EMAILS]:e(`emails`),[ln.NUMBER_OF_WIDGETS]:e(`widgets`),[ln.NUMBER_OF_REWARDS]:e(`rewards`),[ln.NUMBER_OF_CONTACTS]:e(`contacts`),[ln.NUMBER_OF_GIFTCARDS]:e(`giftcards`),[ln.NUMBER_OF_SHOPS]:e(`businessProfiles`),[ln.NUMBER_OF_AUTOMATIONS]:e(`automations`),[ln.NUMBER_OF_LOYALTY_RULES]:e(`loyaltyRules`),[ln.NUMBER_OF_CONTACT_LISTS]:e(`contactLists`),[ln.NUMBER_OF_LOYALTY_TOKENS]:e(`loyaltyTokens`),[ln.NUMBER_OF_EMAIL_RECIPIENTS]:e(`emailRecipients`),[ln.NUMBER_OF_CONTACT_ATTRIBUTES]:e(`customAttributes`)};return t?(0,Z.jsx)(St,{open:c,onOpenChange:p,children:(0,Z.jsx)(jt,{children:(0,Z.jsxs)(Ye,{children:[(0,Z.jsxs)(Nt,{children:[(0,Z.jsx)(Lt,{children:e(`usageLimitReached`)}),(0,Z.jsx)(Tn,{hidden:!0,children:e(`upgradeYourPlan`,{plan:h[u]?.name,type:g[t.type]})})]}),t&&(0,Z.jsxs)(`div`,{className:`p-4`,children:[(0,Z.jsx)(M,{as:`h3`,variant:`headingSm`,children:e(`currentPlanIsLimited`,{limit:t.limit,type:g[t.type]})}),(0,Z.jsx)(`p`,{className:`text-gray-400 text-sm`,children:e(`upgradeYourPlan`,{plan:h[u]?.name,type:g[t.type]})}),(0,Z.jsxs)(`div`,{className:`mt-4 rounded-xs px-4 py-3 shadow-button-default transition-all hover:cursor-pointer hover:bg-bg-fill-hover hover:shadow-button-hover hover:transition-all active:bg-bg-fill-active active:shadow-button-active`,onClick:m,children:[(0,Z.jsx)(M,{as:`h3`,variant:`headingMd`,children:h[u]?.name}),(0,Z.jsx)(M,{as:`p`,tone:`secondary`,children:h[u]?.description})]})]}),(0,Z.jsxs)(We,{children:[(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{onClick:p,isLoading:o,children:e(`cancel`)})}),(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{variant:`primary`,onClick:m,isLoading:o,children:e(`seePlans`)})})]})]})})}):null}function C$(e){let[t,n]=(0,W.useState)(!1),[r,i]=(0,W.useState)(`assistant`),[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)([]),[l,u]=(0,W.useState)(null);(0,W.useEffect)(()=>{t||u(null)},[t]);let d=(0,W.useCallback)(e=>(c(t=>[...t,e]),()=>c(t=>t.filter(t=>t!==e))),[]),f=(0,W.useCallback)((e,{drawer:t=!0}={})=>{o(e.trim()||null),i(`assistant`),t&&n(!0)},[]),p=(0,W.useCallback)(()=>
125{i(`support`),n(!0)},[]),m=(0,W.useCallback)(()=>o(null),[]),h=(0,W.useMemo)(()=>({open:t,setOpen:n,tab:r,setTab:i,openSupport:p,prompt:a,ask:f,clearPrompt:m,editors:s,registerEditor:d,conversationId:l,setConversationId:u}),[t,r,p,a,f,m,s,d,l]);return(0,Z.jsx)(ci.Provider,{value:h,children:e.children})}function w$(e){let{account:t}=(0,W.useContext)(He),[n,r]=(0,W.useState)([]),{mutate:i}=vt({url:`/accounts/${t.id}/configuration/automated-emails`,dataSetter:r});return(0,Z.jsx)(bl.Provider,{value:{mutate:i,automatedEmails:n},children:e.children})}function T$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/automations`,dataSetter:r});return(0,Z.jsx)(xl.Provider,{value:{mutate:a,automations:n},children:e.children})}function E$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)({colors:{}}),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/brand-kit`,dataSetter:r});return(0,Z.jsx)(Ri.Provider,{value:{mutate:a,brandKit:n},children:e.children})}var D$=(0,W.createContext)({businessProfiles:[]});function O$(e){let{account:t}=(0,W.useContext)(He),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/business-profiles`,dataSetter:r});return(0,Z.jsx)(D$.Provider,{value:{mutate:a,businessProfiles:n},children:e.children})}function k$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{mutate:i}=vt({url:`/accounts/${t.id}/configuration/contact-file-types`,dataSetter:r});return(0,Z.jsx)(Ps.Provider,{value:{mutate:i,contactFileTypes:n},children:e.children})}function A$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{mutate:i}=vt({url:`/accounts/${t.id}/configuration/contact-type-options`,dataSetter:e=>r(e.data??e)});return(0,Z.jsx)(Sl.Provider,{value:{mutate:i,contactTypeOptions:n},children:e.children})}function j$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/custom-attribute-groups`,dataSetter:r});return(0,Z.jsx)(yo.Provider,{value:{mutate:a,customAttributeGroups:n},children:e.children})}function M$(e){let{account:t}=(0,W.useContext)(He),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/custom-attributes`,dataSetter:r});return(0,Z.jsx)(bi.Provider,{value:{mutate:a,customAttributes:n},children:e.children})}function N$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/fonts`,dataSetter:r});return(0,Z.jsx)(Cl.Provider,{value:{mutate:a,fonts:n},children:e.children})}function P$(e){let{account:t}=(0,W.useContext)(He),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/giftcard-programs`,dataSetter:r});return(0,Z.jsx)(wl.Provider,{value:{mutate:a,pending:i,giftcardPrograms:n},children:e.children})}function F$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/groups`,dataSetter:r});return(0,Z.jsx)(ms.Provider,{value:{groups:n,mutate:a},children:e.children})}function I$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{mutate:i}=vt({url:`/accounts/${t.id}/configuration/imports`,dataSetter:r});return(0,Z.jsx)(Tl.Provider,{value:{mutate:i,imports:n},children:e.children})}function L$(e){let{account:t}=(0,W.useContext)(He),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/rewards`,dataSetter:r});return(0,Z.jsx)(Fo.Provider,{value:{pending:i,mutate:a,rewards:n},children:e.children})}function R$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/sender-profiles`,dataSetter:r});return(0,Z.jsx)(ja.Provider,{value:{mutate:a,senderProfiles:n},children:e.children})}function z$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{mutate:i}=vt({url:`/accounts/${t.id}/configuration/socials`,dataSetter:r});return(0,Z.jsx)(Da.Provider,{value:{mutate:i,socials:n},children:e.children})}function B$(e){let{account:t}=(0,W.useContext)(He),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/stamp-card-programs`,dataSetter:r});return(0,Z.jsx)(bs.Provider,{value:{mutate:a,pending:i,stampCardPrograms:n},children:e.children})}function V$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{pending:i,mutate:a}=vt({url:`/accounts/${t.id}/configuration/subscription-types`,dataSetter:r});return(0,Z.jsx)(Rs.Provider,{value:{mutate:a,subscriptionTypes:n},children:e.children})}function H$(e){let{account:t}=Fe(),[n,r]=(0,W.useState)([]),{mutate:i}=vt({url:`/accounts/${t.id}/configuration/tiers`,dataSetter:r});return(0,Z.jsx)(Ol.Provider,{value:{mutate:i,tiers:n},children:e.children})}function U$(){let{t:e}=k(),{open:t,setOpen:n,editors:r}=xr(),{pathname:i}=ye(),a=i.includes(`/ai-assistant`)||i.endsWith(`/support`);if(t||a||r?.length)return null;let o=e(`assistant.assistantName`);return(0,Z.jsx)(`button`,{type:`button`,"aria-label":o,title:o,onClick:()=>n?.(!0),className:m(`group fixed right-6 bottom-6 z-40`,`flex size-12 cursor-pointer items-center justify-center rounded-full`,`bg-nav-bg-surface-default shadow-button-primary-default`,`transition-transform hover:scale-105 active:scale-100`,`focus-visible:shadow-focus-ring focus-visible:outline-none`),children:(0,Z.jsx)(Bi,{width:26,height:26,calm:!0})})}function W$({children:e,className:t}){return(0,Z.jsx)(`kbd`,{className:m(`inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded border border-border-secondary bg-bg-fill-default px-1.5 font-medium font-sans text-[11px] text-text-tertiary`,t),children:e})}function G$(){let{t:e}=k(),{accountUser:t}=gn(),{push:n}=be(),r=FK(),{account:i}=(0,W.useContext)(He),a={visible:i.uses_customer_app,group:e(`navigation`),label:`Customer App`,description:`Apps`,type:e1.NAVIGATION,icon:as,handle:()=>n(r.customerApp.path),tags:[`customer app`]},o={visible:t.hasPermission(`devices`),group:e(`navigation`),label:`Business App`,description:`Apps`,type:e1.NAVIGATION,icon:Qo,handle:()=>n(r.businessApp.path),tags:[e(`device`),`business app`,`devices`,`link`,e(`link`)]},s={visible:i.is_demo_account,group:e(`navigation`),label:`Portal Sessions`,description:`Apps`,type:e1.NAVIGATION,icon:Xo,handle:()=>n(r.portalSessions.path),tags:[`portal sessions`]},c={visible:!0,group:e(`navigation`),label:e(`contactsPortal`),description:`Apps`,type:e1.NAVIGATION,icon:Zo,handle:()=>n(r.contactsPortal.path),tags:[`contact portal`]},l={visible:!0,group:e(`navigation`),label:`Widget`,description:`Apps`,type:e1.NAVIGATION,icon:Ho,handle:()=>n(r.widget.path),tags:[`widget`]},u={visible:!0,group:e(`navigation`),label:`Webhooks`,description:`Apps -> ${e(`integrations`)}`,type:e1.NAVIGATION,icon:ws,handle:()=>n(r.webhooks.path),tags:[`webhook`]},d={visible:!0,group:e(`navigation`),label:e(`integrations`),description:`Apps`,type:e1.NAVIGATION,icon:Ao,handle:()=>n(r.integrations.path),tags:[`integrations`,`apps`,`marketplace`,`shopify`,`mollie`,`Zenchef`,`MICE`]};return[a,o,{visible:t.hasPermission(`devices`),group:e(`navigation`),label:e(`narrowcasting`),description:`Apps`,type:e1.NAVIGATION,icon:GW,handle:()=>n(`/apps/business-app/narrowcasting`),tags:[`narrowcasting`,`ipad`,`tablet`]},u,s,c,l,d,{visible:t.hasPermission(`devices`),group:e(`create`),label:e(`createLinkToken`),description:e(`businessApp`),type:e1.CREATE,icon:vn,handle:()=>n(r.businessApp.path),tags:[`create link token`,`token`,`link`,e(`link`)]},{visible:!0,group:e(`create`),label:e(`createAnAccessToken`),description:`Access Token`,type:e1.CREATE,icon:vn,handle:()=>n(`/apps/integrations/personal-access-tokens`),tags:[`api`,`access token`]}]}function K$(){let{t:e}=k(),{push:t}=be();return[{group:e(`navigation`),label:e(`automations`),visible:!0,description:`Automation`,type:e1.NAVIGATION,icon:Ts,handle:()=>t(`/automation`),tags:[`automation`,`automations`,e(`automations`)]},{visible:!0,group:e(`create`),label:e(`createANewAutomation`),description:e(`automations`),type:e1.CREATE,icon:vn,handle:()=>t(`/automation/create`),tags:[e(`automation`),`automation`]}]}function q$(){let{t:e}=k(),{push:t}=be(),n=RK(),{account:r}=(0,W.useContext)(He);return[{visible:!0,group:e(`navigation`),label:e(`contacts`),description:`CRM`,type:e1.NAVIGATION,icon:Zn,handle:()=>t(n.contacts.path),tags:[`contacts`]},{visible:!0,group:e(`navigation`),label:e(`identifiers`),description:`CRM`,type:e1.NAVIGATION,icon:$o,handle:()=>t(n.identifiers.path),tags:[`identifiers`]},{visible:!0,group:e(`navigation`),label:e(`lists`),description:`CRM`,type:e1.NAVIGATION,icon:ns,handle:()=>t(`/crm/lists`),tags:[`lists`]},{visible:!0,group:e(`navigation`),label:e(`forms`),description:`CRM`,type:e1.NAVIGATION,icon:Ir,handle:()=>t(n.forms.path),tags:[`forms`]},{visible:!0,group:e(`navigation`),label:e(`orders`),description:`CRM`,type:e1.NAVIGATION,icon:ds,handle:()=>t(n.orders.path),tags:[`orders`]},{visible:r.usesFeature(Bs.BOOKINGS),group:e(`navigation`),label:e(`bookings`),description:`CRM`,type:e1.NAVIGATION,icon:No,handle:()=>t(n.bookings.path),tags:[`bookings`]},{visible:r.usesFeature(Bs.EVENTS),group:e(`navigation`),label:e(`events`),description:`CRM`,type:e1.NAVIGATION,icon:ko,handle:()=>t(n.events.path),tags:[`events`]},{visible:r.usesFeature(Bs.VISITS),group:e(`navigation`),label:e(`visits`),description:`CRM`,type:e1.NAVIGATION,icon:HW,handle:()=>t(n.visits.path),tags:[`visits`]},{visible:r.usesFeature(Bs.SHIFTS),group:e(`navigation`),label:e(`shifts`),description:`CRM`,type:e1.NAVIGATION,icon:Ur,handle:()=>t(n.shifts.path),tags:[`shifts`]},{visible:!0,group:e(`create`),label:e(`createContactList`),description:`CRM`,type:e1.CREATE,icon:vn,handle:()=>t(n.lists.path),tags:[`create list`]}]}function J$(){let{t:e}=k(),{push:t}=be(),n={visible:!0,group:e(`navigation`),label:e(`reports`),description:`Data`,type:e1.NAVIGATION,icon:LW,handle:()=>t(`/data/reports`),tags:[`reports`,`metric`,`chart`]},r={visible:!0,group:e(`navigation`),label:e(`imports`),description:`Data`,type:e1.NAVIGATION,icon:Ss,handle:()=>t(`/data/imports`),tags:[`imports`]},i={visible:!0,group:e(`navigation`),label:e(`exports`),description:`Data`,type:e1.NAVIGATION,icon:Vr,handle:()=>t(`/data/exports`),tags:[`exports`]},a={visible:!0,group:e(`navigation`),label:e(`generate`),description:`Data`,type:e1.NAVIGATION,icon:Tr,handle:()=>t(`/data/generate`),tags:[`generate`]},o={visible:!0,group:e(`navigation`),label:e(`files`),description:`Data`,type:e1.NAVIGATION,icon:VW,handle:()=>t(`/data/files`),tags:[`files`]};return[n,r,{visible:!0,group:e(`create`),label:e(`importData`),description:e(`import`),type:e1.CREATE,icon:vn,handle:()=>t(`/data/imports/flow`),tags:[e(`import`),`import`]},i,a,o]}function Y$(){let{t:e}=k(),{accountUser:t}=gn(),{push:n}=be(),{account:r}=(0,W.useContext)(He);return[{visible:t.hasPermission(`loyalty`),group:e(`navigation`),label:e(`analytics`),description:`Loyalty`,type:e1.NAVIGATION,icon:LW,handle:()=>n(`/loyalty/analytics`),tags:[`analytics`]},{visible:t.hasPermission(`loyalty`),group:e(`navigation`),label:e(`rewards`),description:`Loyalty`,type:e1.NAVIGATION,icon:nr,handle:()=>n(`/loyalty/rewards`),tags:[`rewards`]},{visible:t.hasPermission(`loyalty`),group:e(`navigation`),label:e(`transactions`),description:`Loyalty`,type:e1.NAVIGATION,icon:fo,handle:()=>n(`/loyalty/transactions`),tags:[`transactions`]},{visible:t.hasPermission(`loyalty`),group:e(`navigation`),label:`tokens`,description:`Loyalty`,type:e1.NAVIGATION,icon:ir,handle:()=>n(`/loyalty/tokens`),tags:[`tokens`]},{visible:t.hasPermission(`loyalty`),group:e(`navigation`),label:e(`stagedCreditReceptions`),description:`Loyalty`,type:e1.NAVIGATION,icon:Mo,handle:()=>n(`/loyalty/staged-credit-receptions`),tags:[`tokens`]},{visible:t.hasPermission(`loyalty`),group:e(`navigation`),label:e(`rules`),description:`Loyalty`,type:e1.NAVIGATION,icon:Ts,handle:()=>n(`/loyalty/rules`),tags:[`rules`]},{visible:t.hasPermission(`loyalty`),group:e(`navigation`),label:e(`tierTracks`),description:`Loyalty`,type:e1.NAVIGATION,icon:es,handle:()=>n(`/loyalty/tier-tracks`),tags:[`tiers`]},{visible:t.hasPermission(`loyalty`),group:e(`navigation`),label:e(`promotionsAndVouchers`),description:`Loyalty`,type:e1.NAVIGATION,icon:Po,handle:()=>n(`/loyalty/promotions`),tags:[`vouchers`]},{visible:t.hasPermission(`loyalty`)&&r.usesFeature(Bs.REFERRALS),group:e(`navigation`),label:`Referrals`,description:`Loyalty`,type:e1.NAVIGATION,icon:_s,handle:()=>n(`/loyalty/referrals`),tags:[`referrals`]},{visible:t.hasPermission(`loyalty`),group:e(`create`),label:e(`createANewReward`),description:e(`rewards`),type:e1.CREATE,icon:vn,handle:()=>n(`/loyalty/rewards/new`),tags:[e(`reward`),`reward`]}]}
125function X$(){let{t:e}=k(),{accountUser:t}=gn(),{push:n}=be();return[{visible:t.hasPermission(`marketing`),group:e(`navigation`),label:e(`campaigns`),description:`Marketing`,type:e1.NAVIGATION,icon:Nr,handle:()=>n(`/marketing/campaigns`),tags:[`campaigns`,`email`]},{visible:t.hasPermission(`marketing`),group:e(`navigation`),label:e(`automatedEmails`),description:`Marketing`,type:e1.NAVIGATION,icon:is,handle:()=>n(`/marketing/automated-emails`),tags:[`automatedEmails`,`email`]},{visible:t.hasPermission(`marketing`),group:e(`navigation`),label:e(`templates`),description:`Marketing`,type:e1.NAVIGATION,icon:UW,handle:()=>n(`/marketing/templates/personal`),tags:[`templates`,`email`]}]}function Z$(){let{t:e}=k(),{accountUser:t}=gn(),{push:n}=be();return[{visible:!0,group:e(`navigation`),label:e(`settings`),description:e(`settings`),type:e1.NAVIGATION,icon:hs,handle:()=>n(`/settings/account`),tags:[`settings`]},{visible:t.hasPermission(`admin`),group:e(`navigation`),label:e(`users`),description:e(`userManagement`),type:e1.NAVIGATION,icon:Zn,handle:()=>n(`/settings/user-management`),tags:[`users`,`user management`]},{visible:t.hasPermission(`admin`),group:e(`navigation`),label:e(`businessProfiles`),description:e(`businessProfiles`),type:e1.NAVIGATION,icon:jo,handle:()=>n(`/settings/business-profiles`),tags:[`business profiles`,`profiles`,`shops`,`locations`]},{visible:t.hasPermission(`admin`),group:e(`navigation`),label:e(`contactFileTypes`),description:e(`fileManagementDescription`),type:e1.NAVIGATION,icon:BW,handle:()=>n(`/settings/contacts`),tags:[`file management`,`contact file types`,`uploads`]}]}function Q$(){let{t:e}=k(),{accountUser:t}=gn(),{push:n}=be(),{account:r}=(0,W.useContext)(He),i=KK();return[{visible:t.hasPermission(`prepaid`),group:e(`navigation`),label:e(`prepaid`),description:`Store`,type:e1.NAVIGATION,icon:Cs,handle:()=>n(i.prepaid.path),tags:[`prepaid`]},{visible:t.hasPermission(`giftcards`),group:e(`navigation`),label:e(`giftcards`),description:`Store`,type:e1.NAVIGATION,icon:Jo,handle:()=>n(i.giftcards.path),tags:[`giftcards`]},{visible:r.usesFeature(Bs.STRIPCARDS),group:e(`navigation`),label:e(`stripcards`),description:`Store`,type:e1.NAVIGATION,icon:ys,handle:()=>n(i.stripcards.path),tags:[`stripcards`]},{visible:!0,group:e(`navigation`),label:e(`internalStore`),description:`Store`,type:e1.NAVIGATION,icon:xs,handle:()=>n(i.internalStore.path),tags:[`internalStore`]}]}function $$(){let{t:e}=k(),{ask:t}=xr();return[{visible:!0,group:e(`action`),label:e(`createQrCode`),description:`Qr code`,type:e1.ACTION,icon:ls,keyword:`qr`,tags:[`qr-code`],handle:e=>{Bn(`${Pt.FORM_HOST}/qr?value=${encodeURIComponent(e)}`)},placeholder:e(`fillInValue`)},{visible:!0,group:e(`action`),label:e(`askAi`),description:`Assistant`,type:e1.ACTION,icon:Tr,keyword:`ai`,tags:[`ai`,`assistant`,`ask`,`chat`,`help`],handle:e=>t?.(e),placeholder:e(`assistant.chatPlaceholder`)}]}var e1=function(e){return e.ACTION=`action`,e.NAVIGATION=`navigation`,e.CREATE=`create`,e}({}),t1=[`navigation`,`create`,`action`];function n1(){let e=q$(),t=Y$(),n=Q$(),r=X$(),i=G$(),a=J$(),o=K$(),s=Z$(),c=$$();return[...e.filter(e=>e.visible),...t.filter(e=>e.visible),...n.filter(e=>e.visible),...r.filter(e=>e.visible),...i.filter(e=>e.visible),...a.filter(e=>e.visible),...o.filter(e=>e.visible),...s.filter(e=>e.visible),...c.filter(e=>e.visible)]}
125function r1({option:e,focus:t,className:n,...r}){let i=e.icon,a=e.type===e1.ACTION;return(0,Z.jsxs)(`div`,{...r,className:m(`flex h-10 cursor-pointer scroll-mt-7 scroll-mb-2 items-center gap-2.5 rounded-lg px-2`,t&&`bg-bg-fill-active`,n),children:[(0,Z.jsx)(i,{className:m(`size-4 shrink-0`,t?`text-icon-default`:`text-icon-secondary-default`)}),(0,Z.jsx)(M,{as:`span`,variant:`bodyMd`,fontWeight:`medium`,truncate:!0,className:`min-w-0`,children:e.label}),(0,Z.jsx)(`span`,{className:`flex-1`}),(0,Z.jsx)(M,{as:`span`,variant:`bodyXs`,tone:`tertiary`,className:`whitespace-nowrap`,children:e.description}),(0,Z.jsx)(`span`,{className:`flex w-6 shrink-0 items-center justify-end`,children:a?(0,Z.jsx)(Gt,{className:`size-3.5 text-icon-secondary-default`}):t&&(0,Z.jsx)(W$,{children:(0,Z.jsx)(zo,{className:`size-3`})})})]})}function i1(){let{t:e}=k(),t=n1(),{isOpen:n,setIsOpen:r}=JQ(),[i,a]=(0,W.useState)(null),[o,s]=(0,W.useState)(``),[c,l]=(0,W.useState)(``),u=(0,W.useRef)(null),d=(0,W.useRef)(null);(0,W.useEffect)(()=>{n&&d.current?.focus()},[n]),(0,W.useEffect)(()=>{i&&u.current?.focus()},[i]),(0,W.useEffect)(()=>{function e(e){e.key!==`k`||!(e.metaKey||e.ctrlKey)||(e.preventDefault(),r?.(e=>!e))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r]);let f=e=>{if(e){if(e.type===e1.ACTION){a(e);return}r(!1),e.handle()}},p=(0,W.useMemo)(()=>{let e=o.trim().toLowerCase();return e?t.find(t=>t.keyword===e)??null:null},[t,o]),m=(0,W.useMemo)(()=>o===``?t:new Na(t,{keys:[`keyword`,`label`,`tags`,{name:`description`,weight:.5}],threshold:.4}).search(o).map(e=>e.item),[t,o]),h=()=>{a(null),l(``),s(``)},g=()=>{i&&(r(!1),i.handle(c))},_=(0,W.useMemo)(()=>{let e=t1.map(e=>{let t=m.filter(t=>t.type===e&&t!==p);return{key:String(e),label:t[0]?.group??``,options:t}}).filter(e=>e.options.length>0);return p?[{key:`keyword`,label:p.group,options:[p]},...e]:e},[m,p]);return(0,Z.jsx)(mW,{show:n,afterLeave:()=>{s(``),l(``),a(null)},children:(0,Z.jsxs)(FW,{static:!0,open:n,style:{zIndex:$a.tooltip+1},onClose:()=>{r(!1)},className:`fixed inset-0 overflow-y-auto p-4 pt-[25vh]`,children:[(0,Z.jsx)(pW,{enter:`transition duration-[120ms] ease-out`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`transition duration-[80ms] ease-in`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,Z.jsx)(NW,{className:`fixed inset-0 bg-black/40`,onClick:()=>r(!1)})}),(0,Z.jsx)(pW,{enter:`transition duration-[120ms] ease-[cubic-bezier(0.16,1,0.3,1)]`,enterFrom:`opacity-0 scale-[0.98] motion-reduce:scale-100`,enterTo:`opacity-100 scale-100`,leave:`transition duration-[80ms] ease-in`,leaveFrom:`opacity-100 scale-100`,leaveTo:`opacity-0 scale-[0.98] motion-reduce:scale-100`,children:(0,Z.jsx)(MW,{className:`relative mx-auto w-full max-w-[40rem] divide-y divide-border-default overflow-hidden rounded-xl border border-border-secondary bg-bg-fill-default shadow-lg`,children:i===null?(0,Z.jsxs)(jU,{immediate:!0,onChange:f,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2.5 pr-3 pl-4`,children:[(0,Z.jsx)(Cn,{className:`size-5 shrink-0 text-icon-secondary-default`}),(0,Z.jsx)(DU,{ref:d,autoFocus:!0,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),r(!1))},displayValue:e=>e?.label,className:`h-12 w-full min-w-0 flex-1 border-0 bg-transparent text-base text-text-default placeholder:text-inputV2-text-placeholder focus:shadow-none focus-visible:outline-hidden`,placeholder:`${e(`search`)}...`}),(0,Z.jsx)(W$,{children:`esc`})]}),_.length>0&&(0,Z.jsx)(kU,{modal:!1,static:!0,className:`max-h-96 overflow-y-auto overscroll-contain px-2 pb-2`,children:_.map(e=>(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(M,{as:`p`,variant:`bodyXs`,fontWeight:`medium`,tone:`tertiary`,className:`sticky top-0 z-1 bg-bg-fill-default px-2 pt-2.5 pb-1`,children:e.label}),e.options.map(e=>(0,Z.jsx)(AU,{as:W.Fragment,value:e,children:({focus:t})=>
125(0,Z.jsx)(r1,{option:e,focus:t})},e.type+e.group+e.label))]},e.key))}),o&&_.length===0&&(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,className:`p-4`,tone:`tertiary`,children:e(`noResultsFound`)}),(0,Z.jsx)(a1,{hints:[{keys:[(0,Z.jsx)(er,{className:`size-3`},`up`),(0,Z.jsx)(tr,{className:`size-3`},`down`)],label:e(`navigate`)},{keys:[(0,Z.jsx)(zo,{className:`size-3`},`enter`)],label:e(`select`)},{keys:[`esc`],label:e(`close`)}]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2.5 px-3`,children:[(0,Z.jsx)(`button`,{type:`button`,onClick:h,className:`flex size-7 shrink-0 items-center justify-center rounded-md text-icon-secondary-default hover:bg-bg-fill-hover hover:text-icon-default`,children:(0,Z.jsx)(zn,{className:`size-4`})}),(0,Z.jsxs)(`span`,{className:`flex h-6 shrink-0 items-center gap-1.5 rounded-md bg-bg-fill-active px-2`,children:[(0,Z.jsx)(i.icon,{className:`size-3.5 text-icon-default`}),(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,fontWeight:`medium`,children:i.label})]}),(0,Z.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault(),g()},children:(0,Z.jsx)(`input`,{ref:u,value:c,onChange:e=>l(e.target.value),onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault(),g();return}if(e.key===`Escape`){e.preventDefault(),h();return}e.key===`Backspace`&&c===``&&(e.preventDefault(),h())},placeholder:i.placeholder,className:`h-12 w-full border-0 bg-transparent text-base text-text-default placeholder:text-inputV2-text-placeholder focus:ring-0 focus-visible:outline-hidden`})}),(0,Z.jsx)(W$,{children:`esc`})]}),(0,Z.jsx)(a1,{hints:[{keys:[(0,Z.jsx)(zo,{className:`size-3`},`enter`)],label:i.label},{keys:[`esc`],label:e(`back`)}]})]})})})]})})}function a1({hints:e}){return(0,Z.jsx)(`div`,{className:`flex h-9 items-center gap-4 bg-bg-fill-secondary-default px-3`,children:e.map(e=>(0,Z.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[e.keys.map((e,t)=>(0,Z.jsx)(W$,{children:e}
125,t)),(0,Z.jsx)(M,{as:`span`,variant:`bodyXs`,tone:`tertiary`,truncate:!0,className:`min-w-0`,children:e.label})]},e.label))})}function o1(e){let[t,n]=(0,W.useState)(!1);return(0,Z.jsx)(qQ.Provider,{value:{isOpen:t,setIsOpen:n},children:e.children})}function s1({entries:e,timezone:t,locale:n}){let{t:r}=k(),i=jQ(e,t);return(0,Z.jsx)(`div`,{className:`flex flex-col gap-4 pt-4`,children:i.map(e=>(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Z.jsx)(M,{as:`h3`,variant:`headingXs`,tone:`secondary`,className:`px-4`,children:MQ(e.key,t,n,r)}),(0,Z.jsx)(`div`,{className:`w-full px-2 pb-2`,children:e.entries.map(e=>(0,Z.jsx)(c1,{entry:e,timezone:t,locale:n},e.id))})]},e.key))})}function c1({entry:e,timezone:t,locale:n}){let{t:r}=k(),i=DQ[e.type],a=i.icon,o=r(i.labelKey);return(0,Z.jsxs)(`div`,{className:`flex w-full cursor-pointer items-start gap-3 rounded px-2 py-2 text-left hover:bg-bg-surface-hover`,children:[(0,Z.jsx)(he,{tone:EQ[e.status],size:`md`,children:(0,Z.jsx)(a,{className:`size-4`})}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Z.jsx)(ai,{to:i.href(e),monochrome:!0,removeUnderline:!0,className:`truncate`,children:(0,Z.jsx)(M,{as:`span`,variant:`bodyMd`,fontWeight:`medium`,children:e.title??o})}),(0,Z.jsxs)(M,{as:`span`,variant:`bodySm`,tone:`secondary`,children:[e.title?`${o} · `:``,e.status===`overdue`?`${NQ(e.at,t,n)}, ${Wn(new Jt(e.at,t),`HH:mm`)}`:Wn(new Jt(e.at,t),`HH:mm`)]})]}),(0,Z.jsx)(O,{tone:OQ[e.status],children:r(kQ[e.status])})]})}var l1=[`7`,`30`,`90`];function u1(){let{t:e}=k(),{account:t}=Fe(),{accountUser:{user:n}}=gn(),r=Rn(n.locale),i=t.timezone,[a,o]=Ln(`agendaSyncs`,tn.withDefault(!1)),[s,c]=Ln(`agendaDays`,Vt(l1).withDefault(`7`)),l=Number(s),{entries:u,hasLoaded:d}=PQ((0,W.useMemo)(()=>{let e=ut(Jt.tz(i)),t=us(ot(Jt.tz(i),l));return{from:ct(e),to:ct(t)}},[i,l])),f=u.filter(e=>a||e.kind===`planned`);return(0,Z.jsxs)(en,{children:[(0,Z.jsx)(Bt,{children:(0,Z.jsxs)(In,{children:[(0,Z.jsx)(Un,{children:e(`upcomingActivity`)}),(0,Z.jsx)(nn,{children:e(`agendaDescription`,{days:l})})]})}),(0,Z.jsxs)(Zt,{fluid:!0,children:[!d&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-2`,children:[0,1,2,3,4].map(e=>(0,Z.jsx)($e,{shape:Kn.SQUARE,className:`h-12 w-full`},e))}),d&&f.length===0&&(0,Z.jsxs)(ge,{children:[(0,Z.jsx)(D,{children:(0,Z.jsx)(Lo,{})}),(0,Z.jsxs)(se,{children:[(0,Z.jsx)(de,{children:e(`agendaEmptyTitle`)}),(0,Z.jsx)(pe,{children:e(a?`agendaEmptyDescription`:`agendaEmptyDescriptionWithoutSyncs`)})]})]}),d&&f.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Va,{className:`flex w-full justify-between`,children:[(0,Z.jsx)(Os,{type:`single`,value:s,onValueChange:e=>{e&&c(e)},children:l1.map(t=>(0,Z.jsx)(Ds,{value:t,children:e(`agendaRangeDays`,{count:Number(t)})},t))}),(0,Z.jsxs)(so,{children:[(0,Z.jsx)(F,{children:e(`agendaShowSyncs`)}),(0,Z.jsx)(Ua,{checked:a,onChange:e=>o(e?!0:null)})]})]}),(0,Z.jsx)(co,{className:`p-0!`,children:(0,Z.jsx)(s1,{entries:f,timezone:i,locale:r})})]})]})]})}function d1({current:e}){let{t}=k(),{push:n}=be();return(0,Z.jsx)(oi,{value:e,onValueChange:e=>n(e===`support`?ti:Fi),children:(0,Z.jsxs)(ui,{children:[(0,Z.jsx)(ji,{value:`assistant`,children:t(`assistant.tabAssistant`,`AI assistant`)}),(0,Z.jsx)(ji,{value:`support`,children:(0,Z.jsx)(Vi,{})})]})})}var f1=`(min-width: 1024px)`;function p1(){let{t:e}=k(),{push:t}=be(),n=wr().is_approved,{conversations:r,conversationsLoading:i,conversationLoading:a,activeId:s,messages:l,isStreaming:u,activeTool:d,error:f,rating:p,handedToSupport:h,conversationLoadId:g,refreshConversations:_,newChat:v,openConversation:y,removeConversation:b,sendMessage:x,rate:S}=Qr(),C=Or(f1),[w,T]=Hr(pi,!1),[E,ee]=(0,W.useState)(!1),D=C?w:E,te=C?T:ee;(0,W.useEffect)(()=>{C&&ee(!1)},[C]);let[O,re]=Ln(`conversation`),[ie,A]=Br(Ci,null),ae=(0,W.useRef)(null),oe=s!==null&&!u&&l.some(e=>e.role===`assistant`&&e.content!==``);(0,W.useEffect)(()=>{n&&_()},[n,_]);let{open:se,prompt:le,clearPrompt:j}=xr(),ue=se?null:le,de=(0,W.useRef)(!1);(0,W.useEffect)(()=>{de.current||(de.current=!0,!O&&ie&&!ue&&re(ie))},[O,ie,ue,re]),(0,W.useEffect)(()=>{A(O)},[O,A]),(0,W.useEffect)(()=>{!n||!O||ae.current!==O&&(ae.current=O,y(O))},[O,n,y]),(0,W.useEffect)(()=>{!s||s===O||(ae.current=s,re(s))},[s,O,re]);let fe=()=>{ae.current=null,v(),re(null)};(0,W.useEffect)(()=>{!n||!ue||u||(j?.(),ae.current=null,v(),re(null),x(ue))},[n,ue,u,j,v,re,x]);let pe=e=>{re(e),C||te(!1)},me=async e=>{await b(e),O===e&&(ae.current=null,re(null))};(0,W.useEffect)(()=>{h&&!u&&t(ne.stringifyUrl({url:ti,query:{conversation:h}}))},[h,u,t]);let he=!!O&&O!==s&&!f,ge=!s&&!he&&l.length===0;return(0,Z.jsxs)(`div`,{className:`relative flex h-full w-full overflow-hidden`,children:[n&&(0,Z.jsx)(`aside`,{inert:!D,className:m(`flex flex-col overflow-hidden border-border-default bg-bg-surface-default`,`absolute inset-0 z-20 lg:static lg:z-auto lg:h-full lg:shrink-0`,E?`w-full`:w?`w-72`:`w-0`,E?`translate-x-0`:`-translate-x-full`,`lg:translate-x-0`,w?`lg:w-72 lg:border-r`:`lg:w-0 lg:border-r-0`,E?`[transition:translate_300ms_ease-in-out,width_0s]`:`[transition:translate_300ms_ease-in-out,width_0s_300ms]`,`lg:[transition:width_300ms_ease-in-out]`),children:(0,Z.jsxs)(`div`,{className:`flex h-full w-full flex-col lg:w-72`,children:[(0,Z.jsxs)(Mr,{className:`flex h-14 flex-row items-center justify-between p-3`,children:[(0,Z.jsx)(M,{as:`h2`,variant:`headingMd`,children:e(`chatHistory`)}),(0,Z.jsx)(o,{ariaLabel:e(`close`),className:`lg:hidden`,onClick:()=>te(!1),children:(0,Z.jsx)(ce,{className:`size-4`})})]}),(0,Z.jsx)(Rr,{conversations:r,loading:i,onOpen:pe,activeId:O,onDelete:me,open:D})]})}),(0,Z.jsx)(`div`,{className:`mx-auto flex h-full w-full flex-col`,children:n?(0,Z.jsxs)(`div`,{className:`relative flex h-full w-full flex-col`,children:[(0,Z.jsxs)(`div`,{className:m(`absolute top-0 left-0 z-10 flex flex-row gap-2 p-3`,`[transition:translate_300ms_ease-in-out,gap_300ms_ease-in-out]`,D&&`lg:-translate-x-16 lg:gap-8`),children:[(0,Z.jsx)(o,{ariaLabel:e(`assistant.chatHistory`),onClick:()=>te(!D),children:(0,Z.jsx)(`span`,{className:`relative inline-flex size-4 items-center justify-center`,children:(0,Z.jsx)(Ki,{initial:!1,children:(0,Z.jsx)(Be.span,{className:`absolute inset-0 flex items-center justify-center`,initial:{opacity:0,scale:.25,filter:`blur(4px)`}
125,animate:{opacity:1,scale:1,filter:`blur(0px)`},exit:{opacity:0,scale:.25,filter:`blur(4px)`},transition:{type:`spring`,duration:.3,bounce:0},children:D?(0,Z.jsx)(KW,{className:`size-4`}):(0,Z.jsx)(an,{className:`size-4`})},D?`close`:`open`)})})}),!ge&&(0,Z.jsx)(o,{ariaLabel:e(`assistant.newChat`),onClick:fe,children:(0,Z.jsx)(yi,{className:`size-4`})}),!ge&&(0,Z.jsx)(zr,{messages:l})]}),(0,Z.jsx)(`div`,{className:`absolute top-0 right-0 z-10 p-3`,children:(0,Z.jsx)(d1,{current:`assistant`})}),he||a?(0,Z.jsx)(Cr,{children:(0,Z.jsx)(c,{accessibilityLabel:e(`assistant.loadingConversation`,`Loading conversation`)})}):(0,Z.jsx)(Gi,{messages:l,isStreaming:u,activeTool:d,error:f,onSend:x,canRate:oe,rating:p,onRate:S,layout:`page`,conversationLoadId:g})]}):(0,Z.jsx)(Wi,{})})]})}function m1({title:e,description:t,to:n,width:r}){return(0,Z.jsx)(nt,{to:n,target:`_blank`,type:`button`,className:`group cursor-pointer rounded-lg bg-bg-fill-secondary-default p-4 shadow-button-default transition-all hover:border-border-hover hover:shadow-button-hover active:shadow-button-active active:shadow-primary-active`,style:{gridColumn:`span ${r}`},children:(0,Z.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Z.jsx)(M,{variant:`headingSm`,as:`h6`,children:e}),(0,Z.jsx)(M,{variant:`bodySm`,as:`p`,tone:`secondary`,children:t})]}),(0,Z.jsx)(zW,{className:`size-5 stroke-icon-default`})]})})}function h1(){let{t:e}=k();return(0,Z.jsxs)(Zt,{fluid:!0,children:[(0,Z.jsx)(Va,{children:(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(Ha,{children:e(`blogPostsTitle`)}),e(`blogPostsSubTitle`)&&(0,Z.jsx)(Ba,{children:e(`blogPostsSubTitle`)})]})}),(0,Z.jsx)(co,{children:(0,Z.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:[{title:`Email Marketing`,description:`Definition, Strategies, and How to Succeed`,to:`https://www.piggy.eu/blog/email-marketing`,width:3},{title:`Measuring Customer Loyalty`,description:`8 Metrics to Measure Customer Loyalty`,to:`https://www.piggy.eu/blog/how-to-measure-customer-loyalty-metrics`,width:1},{title:`Word-of-Mouth Marketing`,description:`Strategies, Benefits, and Examples`,to:`https://www.piggy.eu/blog/word-of-mouth-marketing`,width:1},{title:`The Customer Loyalty Ladder`,description:`Strategies for Building Loyalty`,to:`https://www.piggy.eu/blog/customer-loyalty-ladder`,width:1}].map(e=>(0,Z.jsx)(m1,{...e},e.title))})})]})}var g1=function(e){return e.HOME=`home`,e.CONTACTS=`/crm/contacts`,e.CAMPAIGNS=`/marketing/campaigns`,e.ASSISTANT=`/ai-assistant`,e}({});function _1(){let e=Rt(),{t}=k(),{account:n,mutate:r}=Fe(),{successToast:i,errorToast:a}=y(),o=o=>{e.put(`/accounts/${n.id}/configuration/home/default-page`,{default_page:o}).then(()=>{r(),i(t(`defaultHomepageUpdated`))}).catch(e=>a(e,t(`defaultHomepageUpdateFailed`)))},s=[{value:`home`,label:t(`keepHomepage`)},{value:`/crm/contacts`,label:t(`changeToContacts`)},{value:`/marketing/campaigns`,label:t(`changeToCampaigns`)},{value:`/ai-assistant`,label:t(`changeToAssistant`)}];return(0,Z.jsxs)(Zt,{fluid:!0,children:[(0,Z.jsx)(Va,{children:(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(Ha,{children:t(`homePage`)}),t(`noHomePageYetDescription`)&&(0,Z.jsx)(Ba,{children:t(`noHomePageYetDescription`)})]})}),(0,Z.jsx)(co,{children:(0,Z.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:s.map(e=>(0,Z.jsx)(N,{onClick:()=>o(e.value),children:e.label},e.value))})})]})}var v1=`https://meetings.hubspot.com/niels-levert/demo`;function y1(){let{t:e}=k();return(0,Z.jsxs)(Zt,{fluid:!0,children:[(0,Z.jsx)(Va,{children:(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(Ha,{children:e(`kickstartYourLoyaltyProgram`)}),e(`kickstartYourLoyaltyProgramDescription`)&&(0,Z.jsx)(Ba,{children:e(`kickstartYourLoyaltyProgramDescription`)})]})}),(0,Z.jsx)(co,{children:(0,Z.jsx)(N,{onClick:()=>Bn(v1),children:e(`planDemo`)})})]})}function b1(e){let t=e.percentage===100;return(0,Z.jsxs)(`div`,{className:`rounded-lg bg-bg-surface-secondary-default p-3`,children:[(0,Z.jsxs)(`div`,{className:`mb-2 flex justify-between`,children:[(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,tone:`secondary`,children:e.title}),(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,tone:t?`info`:`secondary`,children:e.description})]}),(0,Z.jsx)(_o,{percentage:e.percentage,className:`h-[4px] rounded-full`})]})}function x1(){let{t:e}=k(),{account:t}=Fe(),[n,r]=(0,W.useState)([]);return vt({url:`/accounts/${t.id}/usages`,dataSetter:r}),n.some(e=>e.has_reached_limit),(0,Z.jsxs)(Zt,{fluid:!0,children:[(0,Z.jsx)(Va,{children:(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(Ha,{children:e(`homeUsagesTitle`,{plan:t.plan.charAt(0).toUpperCase()+t.plan.slice(1).toLowerCase()})}),e(`upgradeForAccessToMore`)&&(0,Z.jsx)(Ba,{children:e(`upgradeForAccessToMore`)})]})}),(0,Z.jsxs)(co,{children:[(0,Z.jsx)(`div`,{className:`mb-3`,children:(0,Z.jsx)(gr,{variant:`primary`,to:`/settings/subscription`,children:e(`upgradeYourPlanButton`)})}),(0,Z.jsx)(Si,{}),(0,Z.jsx)(`div`,{className:`mt-3 grid grid-cols-2 gap-3`,children:n.map(e=>(0,Z.jsx)(b1,{...e},e.id))})]})]})}var S1=e=>(0,Z.jsxs)(`svg`,{width:32,height:32,viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Z.jsx)(`rect`,{width:32,height:32,rx:4,fill:`#E0E2FF`}),(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M16.0004 15.2C18.2084 15.2 20.0004 13.4088 20.0004 11.2C20.0004 8.99121 18.2084 7.20001 16.0004 7.20001C13.7924 7.20001 12.0004 8.99121 12.0004 11.2C12.0004 13.4088 13.7924 15.2 16.0004 15.2Z`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M23.2003 24.8V22.6C23.2003 20.2888 19.9603 18.4 16.0003 18.4C12.0403 18.4 8.80029 20.2888 8.80029 22.6V24.8`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`})]}),C1=e=>(0,Z.jsxs)(`svg`,{width:32,height:32,viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Z.jsx)(`rect`,{width:32,height:32,rx:4,fill:`#E0E2FF`}),(0,Z.jsx)(`path`,{d:`M21.6002 20V23.2C21.6002 24.0832 20.8834 24.8 20.0002 24.8H8.8002C7.917 24.8 7.2002 24.0832 7.2002 23.2V15.2C7.2002 14.3168 7.917 13.6 8.8002 13.6H12.0002`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M7.2002 16.8L13.0594 19.504C13.9106 19.8968 14.8898 19.8968 15.741 19.504L16.0002 19.3848`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.2002 12C15.2002 14.6504 17.3498 16.8 20.0002 16.8C22.6506 16.8 24.8002 14.6504 24.8002 12C24.8002 9.34961 22.6506 7.20001 20.0002 7.20001C17.3498 7.20001 15.2002 9.34961 15.2002 12Z`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M20.0002 10V14`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M18.0002 12H22.0002`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`})]}),w1=e=>(0,Z.jsxs)(`svg`,{width:32,height:32,viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Z.jsx)(`rect`,{width:32,height:32,rx:4,fill:`#E0E2FF`}),(0,Z.jsx)(`path`,{d:`M24.8001 16.8H7.20007`,stroke:`#3430FF`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M19.1998 24.8L19.1998 12`,stroke:`#3430FF`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M23.2001 24.8001H8.80007C7.91687 24.8001 7.20007 24.0833 7.20007 23.2001V13.6001C7.20007 12.7169 7.91687 12.0001 8.80007 12.0001H23.2001C24.0833 12.0001 24.8001 12.7169 24.8001 13.6001V23.2001C24.8001 24.0833 24.0833 24.8001 23.2001 24.8001Z`,stroke:`#3430FF`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M19.2 12V9.6M19.2 9.6C19.2 8.2744 18.1256 7.2 16.8 7.2C15.4744 7.2 14.4 8.2744 14.4 9.6C14.4 10.9256 15.4744 12 16.8 12H21.6C22.9256 12 24 
12510.9256 24 9.6C24 8.2744 22.9256 7.2 21.6 7.2C20.2744 7.2 19.2 8.2744 19.2 9.6Z`,stroke:`#3430FF`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})]}),T1=e=>(0,Z.jsxs)(`svg`,{width:32,height:32,viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Z.jsx)(`rect`,{width:32,height:32,rx:4,fill:`#E0E2FF`}),(0,Z.jsx)(`path`,{d:`M20.8002 24L24.0002 20.8L20.8002 17.6`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M24.0002 20.8H11.2002`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M11.2002 8.00001L8.00024 11.2L11.2002 14.4`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M8.00024 11.2H20.8002`,stroke:`#3430FF`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`})]});function E1(e){let{label:t,to:n}=e;return(0,Z.jsx)(nt,{to:n,type:`button`,className:`group rounded-lg bg-bg-surface-default p-4 shadow-button-default transition-all hover:bg-bg-surface-hover hover:shadow-button-hover active:shadow-button-active`,children:(0,Z.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center space-x-4`,children:[(0,Z.jsx)(e.icon,{className:`size-8`}),(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,children:t})]}),(0,Z.jsx)(zW,{className:`size-5 stroke-icon-default`})]})})}function D1(){let{t:e}=k(),{account:t}=Fe(),n=[{type:`contacts`,label:e(`goToContacts`),icon:S1,to:g1.CONTACTS},{type:`email-template`,label:e(`sendEmailCampaignTitle`),icon:C1,to:g1.CAMPAIGNS},{type:`loyalty-transactions`,label:e(`checkLoyaltyTransactionsTitle`),icon:T1,to:`/loyalty/transactions`},{type:`giftcard-transactions`,label:e(`goToGiftcardTransactionsTitle`),icon:w1,to:`/store/giftcards/transactions`,visible:t.usesFeature(Bs.GIFTCARDS)}];return(0,Z.jsxs)(Zt,{fluid:!0,children:[(0,Z.jsx)(Va,{children:(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(Ha,{children:e(`quickActionsTitle`)}),e(`quickActionsDescription`)&&(0,Z.jsx)(Ba,{children:e(`quickActionsDescription`)})]})}),(0,Z.jsx)(co,{children:(0,Z.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:n.map(e=>(0,Z.jsx)(E1,{...e},e.type))})})]})}function O1(){let{account:e}=Fe(),{accountUser:{user:t}}=gn(),{successToast:n,errorToast:r}=y(),{t:i}=k(),a=Rt();return(0,Z.jsx)(en,{children:(0,Z.jsx)(`div`,{className:`container mx-auto mt-6 lg:mt-12`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[!t.is_verified&&(0,Z.jsx)(`div`,{className:`mb-7 w-full`,children:(0,Z.jsxs)(si,{tone:`warning`,children:[(0,Z.jsx)(Mi,{}),(0,Z.jsxs)(Hi,{children:[(0,Z.jsx)(M,{as:`h3`,variant:`headingSm`,children:i(`pleaseVerifyUser`)}),(0,Z.jsx)(zs,{children:(0,Z.jsx)(N,{onClick:()=>{a.post(`/verify/send`,{email:t.email}).then(()=>n(i(`verificationEmailSent`))).catch(e=>r(e,i(`verificationEmailSendFailed`)))},size:`sm`,children:i(`clickToResendVerification`)})})]}),(0,Z.jsx)(wi,{})]})}),(0,Z.jsxs)(`div`,{className:`flex flex-col pb-8`,children:[(0,Z.jsx)(M,{as:`h2`,variant:`headingLg`,className:`mb-5 ml-2`,children:i(`homeWelcome`,{name:t.firstname})}),(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-4`,children:[e.plan===Fs.FREE&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(y1,{}),(0,Z.jsx)(x1,{})]}),(0,Z.jsx)(D1,{}),!e.is_leat_account&&(0,Z.jsx)(h1,{}),!e.default_home_page&&(0,Z.jsx)(_1,{})]})]})]})})})}function k1(){let{account:e}=Fe();return(0,Z.jsx)(pt,{to:A1(e),replace:!0})}function A1(e){let t=e.default_home_page;return t?.includes(`/crm/contacts`)?gi:t===g1.CAMPAIGNS?g1.CAMPAIGNS:t===g1.ASSISTANT&&e.is_approved?Fi:Q.home}function j1(){let{t:e}=k(),{push:t}=be(),{ask:n}=xr(),{is_approved:r}=wr(),i=Pi(!0),[a,s]=Hr(pi,!0),[l,u]=(0,W.useState)(!1),[d,f]=Ln(`conversation`,wn),[p,h]=Br(fi,null),{open:g,close:_}=i;(0,W.useEffect)(()=>{d?g(d):_()},[d,g,_]);let v=(0,W.useRef)(!1);(0,W.useEffect)(()=>{v.current||(v.current=!0,!d&&p&&f(p))},[d,p,f]),(0,W.useEffect)(()=>{h(d)},[d,h]);let y=e=>{u(!1),f(e)},b=()=>{f(null),u(!0)},x=d?i.current?.id!==d&&!i.error:i.conversationsLoading;return(0,Z.jsxs)(`div`,{className:`relative flex h-full w-full`,children:[(0,Z.jsx)(`aside`,{className:m(`flex h-full shrink-0 flex-col overflow-hidden border-border-default bg-bg-surface-default transition-all duration-300 ease-in-out`,a?`w-72 border-r`:`w-0 border-r-0`),children:(0,Z.jsxs)(`div`,{className:`flex h-full w-72 flex-col`,children:[(0,Z.jsx)(Mr,{className:`flex h-14 flex-row items-center justify-between p-3`,children:(0,Z.jsx)(M,{as:`h2`,variant:`headingMd`,children:e(`support.conversations`,`Conversations`)})}),!i.unavailable&&(0,Z.jsx)(Oi,{conversations:i.conversations,loading:i.conversationsLoading,onOpen:y,activeId:d,onNew:b,emptyState:!1})]})}),(0,Z.jsxs)(`div`,{className:`relative flex h-full w-full flex-col`,children:[(0,Z.jsxs)(`div`,{className:m(`absolute top-0 left-0 z-10 flex flex-row p-3 transition-transform duration-300`,a?`-translate-x-16 gap-8`:`gap-2`),children:[(0,Z.jsx)(o,{ariaLabel:e(`support.conversations`,`Conversations`),onClick:()=>s(!a),children:a?(0,Z.jsx)(KW,{className:`size-4`}):(0,Z.jsx)(an,{className:`size-4`})}),!i.unavailable&&(0,Z.jsx)(o,{ariaLabel:e(`support.newConversation`,`New conversation`),onClick:b,children:(0,Z.jsx)(yi,{className:`size-4`})})]}),(0,Z.jsx)(`div`,{className:`absolute top-0 right-0 z-10 p-3`,children:(0,Z.jsx)(d1,{current:`support`})}),(0,Z.jsx)(xi,{className:`mx-auto w-full max-w-2xl pt-15`}),i.unavailable?(0,Z.jsx)(hi,{}):l&&r?(0,Z.jsx)(ii,{layout:`page`,onSend:e=>{n?.(e,{drawer:!1}),t(Fi)}}):l?(0,Z.jsx)(Li,{layout:`page`,sending:i.sending,error:i.error,onSend:async(e,t,n)=>{await i.start(e,t,n),u(!1)}}):x?(0,Z.jsx)(Cr,{children:(0,Z.jsx)(c,{accessibilityLabel:e(`support.loadingConversations`,`Loading conversations`)})}):i.current?(0,Z.jsx)(ei,{layout:`page`,conversation:i.current,loading:i.loading,sending:i.sending,error:i.error,onReply:i.reply}):(0,Z.jsxs)(Cr,{children:[(0,Z.jsx)(Er,{className:`size-5 text-icon-brand`}),i.conversations.length>0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(M,{as:`h3`,variant:`headingSm`,children:e(`support.pickConversationTitle`,`Select a conversation`)}),(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,tone:`secondary`,children:e(`support.pickConversationDescription`,`Open a conversation from the list, or start a new one.`)})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(M,{as:`h3`,variant:`headingSm`,children:e(`support.emptyTitle`,`Talk to the Leat team`)}),(0,Z.jsx)(M,{as:`p`,variant:`bodySm`,tone:`secondary`,children:e(`support.emptyDescription`,`Something the assistant could not solve? Send us a message and a person will get back to you here.`)})]}),(0,Z.jsxs)(N,{className:`mt-2`,onClick:b,children:[(0,Z.jsx)(yi,{className:`size-4`}),e(`support.newConversation`,`New conversation`)]})]})]})]})}function M1(){let{t:e}=k(),t=Rt(),{successToast:n,errorToast:r}=y(),[i,a]=(0,W.useState)(!1),o=zi(),{accountUser:{user:s}}=gn(),c=zi(),[l,u]=(0,W.useState)(``),[d,f]=(0,W.useState)(!1),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(!1),_=`/users/multi-factor-authentication`,{mutate:v}=vt({url:_,dataSetter:e=>a(e.mfa_is_enabled)});return(0,Z.jsx)(en,{children:(0,Z.jsxs)(St,{children:[(0,Z.jsx)(Bt,{children:(0,Z.jsx)(In,{children:(0,Z.jsx)(Un,{children:e(`multiFactorAuthentication`)})})}),(0,Z.jsx)(Zt,{fluid:!0,children:(0,Z.jsx)(co,{children:(0,Z.jsxs)(`div`,{className:`pointer-events-auto! flex w-full flex-col items-start border-border-default border-b sm:flex-row sm:border-b-0`,children:[(0,Z.jsx)(`div`,{className:`grow`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-row items-center gap-2 py-1`,children:[(0,Z.jsx)(M,{variant:`bodyMd`,as:`h3`,fontWeight:`medium`,children:e(`multiFactorAuthentication`)}),(0,Z.jsx)(O,{tone:i?le.SUCCESS:le.CRITICAL,children:e(i?`enabled`:`disabled`)})]}),(0,Z.jsx)(M,{variant:`bodyMd`,tone:`secondary`,as:`p`,fontWeight:`regular`,className:`text-wrap`,children:e(`multiFactorAuthenticationDescription`)})]})}),(0,Z.jsx)(`div`,{children:i?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ht,{asChild:!0,children:(0,Z.jsx)(N,{children:e(`deactivate`)})}),(0,Z.jsx)(jt,{children:(0,Z.jsxs)(Ye,{children:[(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,Z.jsx)(Lt,{children:e(`disableMFA`)}),(0,Z.jsx)(Tn,{children:e(`areYouSureYouWantToDisableMFA`)})]}),(0,Z.jsxs)(We,{children:[(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{children:e(`cancel`)})}),(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{tone:`critical`,isLoading:p,onClick:()=>{m(!0),t.post(`${_}/disable`).then(()=>{v(),c.close(),n(e(`mfaDisabled`))}).catch(t=>r(t,e(`mfaDisableFailed`))).finally(()=>m(!1))},children:e(`disable`)})})]})]})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ht,{asChild:!0,children:(0,Z.jsx)(N,{onClick:()=>{g(!0),t.post(`${_}/start`).then(e=>{u(e.data.data.qr_code),o.open(),v()}).catch(t=>r(t,e(`mfaStartFailed`))).finally(()=>g(!1))},children:e(`activate`)})}),(0,Z.jsx)(jt,{children:(0,Z.jsxs)(Ye,{className:`w-[800px]! max-w-4xl!`,children:[(0,Z.jsxs)(Nt,{children:[(0,Z.jsx)(Lt,{children:e(`linkAuthApp`)}),(0,Z.jsx)(Tn,{hidden:!0,children:e(`linkAuthAppDescription`)})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-6 p-4`,children:[(0,Z.jsx)(`img`,{className:`size-40 flex-none rounded-lg border border-gray-900/10 p-4`,alt:`qr-code`,src:l}),(0,Z.jsxs)(`div`,{className:`flex flex-col justify-center gap-1 py-2`,children:[(0,Z.jsx)(M,{variant:`bodyMd`,as:`h3`,fontWeight:`medium`,children:e(`scanTheQrCode`)}),(0,Z.jsx)(M,{variant:`bodyMd`,tone:`secondary`,as:`p`,fontWeight:`regular`,className:`text-wrap`,dangerouslySetInnerHTML:{__html:e(`useAuthApp`)}})]})]}),(0,Z.jsxs)(We,{children:[(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{children:e(`cancel`)})}),(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{variant:`primary`,isLoading:d,onClick:()=>{f(!0),t.post(`${_}/enable`).then(()=>{o.close(),v(),n(e(`mfaEnabled`))}).catch(t=>r(t,e(`mfaEnableFailed`))).finally(()=>f(!1))},children:e(`AuthenticatorAppLinkedEnableMFA`)})})]})]})})]})})]})})})]})})}function N1(){let{t:e}=k(),t=Rt(),{successToast:n,errorToast:r}=y(),[i,a]=(0,W.useState)(!1),[o,s]=(0,W.useState)(null),c=lo(s),l=o?.current_password&&o?.new_password&&o?.new_password_confirmation;return(0,Z.jsxs)(en,{children:[(0,Z.jsx)(Bt,{children:(0,Z.jsx)(In,{children:(0,Z.jsxs)(Un,{children:[e(`password`),` `]})})}),(0,Z.jsx)(Zt,{children:(0,Z.jsx)(kn,{className:`max-w-2xl`,children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`currentPassword`)}),(0,Z.jsx)(GG,{value:o?.current_password??``,onChange:e=>c(`current_password`,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`newPassword`)}),(0,Z.jsx)(GG,{value:o?.new_password??``,onChange:e=>c(`new_password`,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`confirmPassword`)}),(0,Z.jsx)(GG,{value:o?.new_password_confirmation??``,onCut:e=>e.preventDefault(),onCopy:e=>e.preventDefault(),onPaste:e=>e.preventDefault(),onChange:e=>c(`new_password_confirmation`,e.target.value)})]}),(0,Z.jsx)(N,{type:`button`,variant:`default`,onClick:()=>{a(!0),t.post(`users/change-password`,o).then(()=>{n(e(`passwordChanged`)),s(null)}
125).catch(t=>r(t,e(`passwordChangeFailed`))).finally(()=>a(!1))},isLoading:i,disabled:!l,children:e(`update`)})]})})})]})}function P1(){let{t:e}=k(),{accountUser:t}=gn(),n=Object.entries(t.permissions).filter(([,e])=>e).map(([e])=>Ht(e)),r=Object.entries(t.permissions).filter(([,e])=>!e).map(([e])=>Ht(e));return(0,Z.jsxs)(en,{children:[(0,Z.jsx)(Bt,{children:(0,Z.jsx)(In,{children:(0,Z.jsx)(Un,{children:e(`permissions`)})})}),(0,Z.jsx)(Zt,{children:(0,Z.jsx)(kn,{className:`max-w-2xl`,children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`currentRole`)}),(0,Z.jsx)(Ya,{children:t.role?.name})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`enabledForYou`)}),(0,Z.jsx)(`div`,{className:`mt-1 flex flex-col gap-1`,children:n.map(e=>(0,Z.jsx)(Ya,{children:e},e))})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`disabledForYou`)}),(0,Z.jsx)(`div`,{className:`mt-1 flex flex-col gap-1`,children:r.map(e=>(0,Z.jsx)(Ya,{children:e},e))})]})]})})})]})}function F1({hasPassword:e,usesMfa:t,onChanged:n}){let{t:r}=k(),i=Rt(),{successToast:a,errorToast:o}=y(),{formatTimeForUser:s}=Oe(),{mutate:c}=gn(),[l,u]=(0,W.useState)(!1),[d,f]=(0,W.useState)(``),[p,m]=(0,W.useState)(``),[h,g]=(0,W.useState)(``),[_,v]=(0,W.useState)(``),[b,x]=(0,W.useState)(null),[S,C]=(0,W.useState)(!1),[w,T]=(0,W.useState)(!1),E={email:d,...e&&{current_password:p},...t&&{mfa_code:h}},ee=e=>{u(e),e||(f(``),m(``),g(``),v(``),x(null))},D=()=>{C(!0),i.post(`users/email`,E).then(e=>x(e.data.data.expires_at)).catch(o).finally(()=>C(!1))},te=()=>{T(!0),i.post(`users/email`,E).then(e=>{x(e.data.data.expires_at),v(``),a(r(`userEmailChangeCodeResent`))}).catch(o).finally(()=>T(!1))},ne=e=>{S||(C(!0),i.post(`users/email/confirm`,{code:e}).then(e=>{a(r(`userEmailChanged`)),ee(!1),n(e.data.data.email),c()}).catch(o).finally(()=>C(!1)))};return(0,Z.jsxs)(St,{open:l,onOpenChange:ee,children:[(0,Z.jsx)(ht,{asChild:!0,children:(0,Z.jsx)(N,{type:`button`,children:r(`changeEmailAddress`)})}),(0,Z.jsxs)(Ye,{children:[(0,Z.jsxs)(Nt,{children:[(0,Z.jsx)(Lt,{children:r(`changeEmailAddress`)}),(0,Z.jsx)(Tn,{children:b?r(`userEmailChangeCodeSent`,{email:d,time:s(b)}):r(`userEmailChangeDescription`)})]}),b?(0,Z.jsxs)(Ga,{onSubmit:()=>ne(_),children:[(0,Z.jsx)(`div`,{className:`p-4`,children:(0,Z.jsx)(Wo,{value:_,onChange:e=>{v(e),e.length===6&&ne(e)},name:`code`,className:`w-full justify-between gap-2`,inputMode:`tel`,fields:6,disabled:S,inputStyle:{width:`48px`,height:`52px`,fontSize:`19px`,borderRadius:`8px`,fontWeight:`500`,borderWidth:`1px`,borderStyle:`solid`,textAlign:`center`}})}),(0,Z.jsxs)(We,{children:[!t&&(0,Z.jsx)(N,{type:`button`,className:`sm:mr-auto`,onClick:te,isLoading:w,disabled:S,children:r(`resendCode`)}),(0,Z.jsx)(N,{type:`button`,onClick:()=>{v(``),x(null)},disabled:S,children:r(`back`)}),(0,Z.jsx)(N,{type:`submit`,variant:`primary`,isLoading:S,disabled:_.length<6,children:r(`changeEmailAddress`)})]})]}):(0,Z.jsxs)(Ga,{onSubmit:D,children:[(0,Z.jsx)(kn,{className:`p-4`,children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:r(`newEmailAddress`)}),(0,Z.jsx)(Pe,{type:`email`,autoComplete:`email`,value:d,onChange:e=>f(e.target.value),disabled:S,autoFocus:!0,required:!0})]}),e&&(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:r(`currentPassword`)}),(0,Z.jsx)(GG,{autoComplete:`current-password`,value:p,onChange:e=>m(e.target.value),disabled:S,required:!0})]}),t&&(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:r(`authenticatorAppCode`)}),(0,Z.jsx)(Pe,{inputMode:`numeric`,autoComplete:`one-time-code`,value:h,onChange:e=>g(e.target.value),disabled:S,required:!0})]})]})}),(0,Z.jsxs)(We,{children:[(0,Z.jsx)(N,{type:`button`,onClick:()=>ee(!1),disabled:S,children:r(`cancel`)}),(0,Z.jsx)(N,{type:`submit`,variant:`primary`,isLoading:S,disabled:!d||e&&!p||t&&!h,children:r(`sendCode`)})]})]})]})]})}var I1=[{value:`iso`,label:`YYYY-MM-DD`,pattern:`yyyy-MM-dd`},{value:`european`,label:`DD-MM-YYYY`,pattern:`dd-MM-yyyy`},{value:`us`,label:`MM/DD/YYYY`,pattern:`MM/dd/yyyy`}];function L1(){let{t:e,changeLanguage:t}=k(),n=Rt(),{successToast:r,errorToast:i}=y(),[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(!1),{languages:l}=Do(),u=lo(o),d=(0,W.useRef)(null),f=a&&JSON.stringify(a)!==JSON.stringify(d.current),p=a?.locale!==d.current?.locale,m=I1.find(e=>e.value===a?.date_format),h=m?{date:Wn(new Date,m.pattern),dateTime:Wn(new Date,`${m.pattern} HH:mm`)}:null;return vt({url:`/users/profile`,dataSetter:e=>{o(e),d.current=e}}),a?(0,Z.jsxs)(en,{children:[(0,Z.jsx)(Bt,{children:(0,Z.jsx)(In,{children:(0,Z.jsx)(Un,{children:e(`profile`)})})}),(0,Z.jsx)(Zt,{children:(0,Z.jsx)(kn,{className:`max-w-2xl`,children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`email`)}),(0,Z.jsxs)(`div`,{"data-slot":`control`,className:`flex items-center gap-2`,children:[(0,Z.jsx)(Ya,{children:a.email}),(0,Z.jsx)(F1,{hasPassword:a.has_password,usesMfa:a.uses_mfa,onChanged:e=>{d.current={...d.current,email:e},o(t=>({...t,email:e}))}})]})]}),(0,Z.jsxs)(xn,{columns:{sm:2},children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`firstName`)}),(0,Z.jsx)(Pe,{value:a.first_name,disabled:s,onChange:e=>u(`first_name`,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`lastName`)}),(0,Z.jsx)(Pe,{value:a.last_name,disabled:s,onChange:e=>u(`last_name`,e.target.value)})]})]}),(0,Z.jsxs)($t,{className:`w-160`,children:[(0,Z.jsx)(F,{children:e(`avatar`)}),(0,Z.jsx)(Ns,{className:`mt-1`,previewUrl:a.avatar_url,disabled:s,onFileSelected:e=>u(`avatar`,e),acceptedFileTypes:{"image/*":[`.jpeg`,`.jpg`,`.png`]}}),(0,Z.jsx)(cn,{"data-slot":`description`,children:`Accepts .jpeg, .jpg, .png`})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`dateFormat`)}),(0,Z.jsxs)(Nn,{value:a.date_format??void 0,onValueChange:e=>u(`date_format`,e),disabled:s,children:[(0,Z.jsx)(qt,{children:(0,Z.jsx)(mn,{placeholder:e(`select`)})}),(0,Z.jsx)(yn,{children:I1.map(e=>(0,Z.jsx)(on,{value:e.value,children:e.label},e.value))})]}),h&&(0,Z.jsxs)(cn,{"data-slot":`description`,children:[e(`exampleDate`),`: `,h.date,` —`,` `,h.dateTime]})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`language`)}),(0,Z.jsxs)(Nn,{value:a.locale,onValueChange:e=>u(`locale`,e),disabled:s,children:[(0,Z.jsx)(qt,{children:(0,Z.jsx)(mn,{placeholder:e(`select`)})}),(0,Z.jsx)(yn,{children:l.map(e=>(0,Z.jsx)(on,{value:e.key,children:e.label},e.key))})]}),p&&(0,Z.jsx)(cn,{"data-slot":`description`,children:e(`localeRefreshNotice`)})]}),f&&(0,Z.jsx)(N,{type:`button`,variant:`primary`,onClick:()=>{c(!0),n.post(`/users/profile`,sn({first_name:a.first_name,last_name:a.last_name,locale:a.locale,avatar:a.avatar??null,date_format:a.date_format??``})).then(()=>
125{if(r(e(`profileUpdated`)),p){t(a.locale),Ne();return}c(!1)}).catch(t=>{i(t,e(`profileUpdateFailed`)),c(!1)})},isLoading:s,children:e(`update`)})]})})})]}):null}function R1(){let{t:e}=k(),{logout:t}=Sn(),[n,r]=(0,W.useState)(!1),{accountUser:{user:i}}=gn();return(0,Z.jsx)(St,{children:(0,Z.jsxs)(Qa,{children:[(0,Z.jsxs)(io,{children:[(0,Z.jsx)(to,{children:(0,Z.jsx)(qi,{className:`mt-4`,title:i.fullName(),subtitle:i.email,imageUrl:i.avatar,children:(0,Z.jsx)(`div`,{className:`flex w-full flex-col gap-2`,children:(0,Z.jsxs)(Yr,{children:[(0,Z.jsx)(Ai,{asChild:!0,children:(0,Z.jsx)(N,{variant:`default`,children:e(`actions`)},`dropdown`)}),(0,Z.jsx)(br,{children:(0,Z.jsx)(ht,{asChild:!0,children:(0,Z.jsxs)(li,{tone:`critical`,children:[(0,Z.jsx)(WW,{size:16}),e(`logout`)]})})})]})})})}),(0,Z.jsx)(Si,{orientation:`horizontal`,tone:`onDark`}),(0,Z.jsx)(Wa,{children:(0,Z.jsxs)(ro,{children:[(0,Z.jsx)(eo,{path:`../profile`,children:(0,Z.jsx)(ao,{children:e(`profile`)})}),(0,Z.jsx)(eo,{path:`../password`,children:(0,Z.jsx)(ao,{children:e(`password`)})}),(0,Z.jsx)(eo,{path:`../permissions`,children:(0,Z.jsx)(ao,{children:e(`permissions`)})}),(0,Z.jsx)(eo,{path:`../multi-factor-authentication`,children:(0,Z.jsx)(ao,{children:e(`multiFactorAuthentication`)})})]})})]}),(0,Z.jsx)(Ka,{children:(0,Z.jsxs)(et,{children:[(0,Z.jsx)(P,{path:`/profile`,element:(0,Z.jsx)(L1,{})}),(0,Z.jsx)(P,{path:`/password`,element:(0,Z.jsx)(N1,{})}),(0,Z.jsx)(P,{path:`/permissions`,element:(0,Z.jsx)(P1,{})}),(0,Z.jsx)(P,{path:`/multi-factor-authentication`,element:(0,Z.jsx)(M1,{})})]})}),(0,Z.jsx)(jt,{children:(0,Z.jsxs)(Ye,{children:[(0,Z.jsxs)(Dt,{className:`p-4`,children:[(0,Z.jsx)(Lt,{children:e(`logout`)}),(0,Z.jsx)(Tn,{children:e(`doYouWantToLogout`)})]}),(0,Z.jsxs)(We,{children:[(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{children:e(`cancel`)})}),(0,Z.jsx)(N,{onClick:()=>{r(!0),t(!0)},variant:`primary`,tone:`critical`,children:e(`logout`)})]})]})})]})})}function z1(e){let{account:t}=(0,W.useContext)(He),{errorToast:n}=y(),{t:r}=k(),i=Rt(),[a,o]=(0,W.useState)(!1),s=()=>{o(!0),i.post(`/accounts/${t.id}/web-shop`,{item:e.id}).then(e=>window.open(e.data.data.url)).catch(n).finally(()=>o(!1))};return(0,Z.jsxs)(`div`,{className:`relative flex w-96 cursor-pointer flex-col rounded-lg border border-gray-200 p-4 transition-all hover:scale-101`,onClick:()=>a?null:s(),children:[(0,Z.jsx)(`img`,{src:e.image,alt:`piggy-keycards`,className:`size-full rounded-md object-cover`}),(0,Z.jsxs)(`div`,{className:`flex justify-between font-medium`,children:[(0,Z.jsx)(`p`,{children:e.name}),(0,Z.jsx)(`p`,{children:e.price})]}),(0,Z.jsx)(`p`,{className:`text-gray-400`,children:r(`250pieces`)}),(0,Z.jsx)(`div`,{className:`absolute top-0 left-0 flex size-full items-center justify-center rounded-lg bg-black/10 ${a?`visible`:`invisible`}`,children:(0,Z.jsx)(c,{})})]})}function B1(){let{account:e}=(0,W.useContext)(He),{t}=k();return(0,Z.jsxs)(en,{children:[(0,Z.jsx)(Bt,{children:(0,Z.jsx)(In,{children:(0,Z.jsx)(Un,{children:t(`webshop`)})})}),(0,Z.jsx)(Zt,{children:e.country==`NL`?(0,Z.jsx)(`div`,{className:`flex gap-4`,children:(0,Z.jsx)(z1,{id:`Piggy-keycards-EUR`,name:`Keycards - Piggy branded`,price:`€99`,image:`https://static.piggy.nl/webshop_afbeeldingen/keycards.jpg`})}):(0,Z.jsxs)(`div`,{className:`flex flex-col justify-center gap-4 p-12`,children:[(0,Z.jsx)(`p`,{children:`This is currently not available in your country.`}),(0,Z.jsx)(`div`,{children:(0,Z.jsx)(Is,{to:Q.home,variant:`primary`,children:`Take me home`})})]})})]})}Yn();var V1=To(()=>Xn(()=>import(`./DataRoutes-ClgHaAhX.js`),__vite__mapDeps([119,1,2,4,5,6,7,8,9,10,11,12,13,120,121,122,34,89,106,109,110,98,99,111,123,97,124,125,126,48,16,127,128,129,130,18,50,51,76,131,19,86,88,132,133,40,41,84,107,134,135,36,37,91,92,67,26,28,95,136,100,137,138,71,74,75,103,104,45,108,139,112,113,114,140,115,141,142,143]))),H1=To(()=>Xn(()=>import(`./AppsRoutes-Dhgt5tvC.js`),__vite__mapDeps([144,1,2,3,4,5,6,7,8,9,10,11,12,13,120,145,146,125,147,47,130,148,33,18,149,50,58,59,17,60,150,51,151,76,152,30,31,32,34,80,85,153,21,86,87,132,53,54,55,154,35,24,135,90,79,81,82,25,155,65,66,91,92,97,41,94,67,156,157,26,27,95,136,39,158,159,96,160,40,98,99,70,100,137,138,101,161]
125))),U1=To(()=>Xn(()=>import(`./StoreRoutes-CEELi3Wl.js`),__vite__mapDeps([162,1,2,4,5,6,7,8,9,10,11,12,13,120,14,121,122,34,89,106,109,110,98,99,111,123,97,124,125,147,16,163,24,55,32,33,44,57,35,58,76,77,152,164,52,88,64,165,134,154,166,23,167,155,91,69,27,95,136,158,159,51,96,138,103,104,45,105,84,139,112,113,116,117,142,168,92,169,170]))),W1=To(()=>Xn(()=>import(`./LoyaltyRoutes-gpL7pITw.js`),__vite__mapDeps([171,1,2,4,5,6,7,8,9,10,11,12,13,120,145,146,125,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,147,172,153,86,47,48,163,55,57,173,91,159,51,84,168,92,105,97,49,50,52,53,54,56,149,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,164,131,85,174,88,133,89,106,107,122,154,166,135,167,175,176,94,156,157,95,136,158,96,160,100,103,104,177,124,113,116,142,178]))),G1=To(()=>Xn(()=>import(`./SettingsRoutes-DAoJlq0v.js`),__vite__mapDeps([179,1,2,4,5,6,7,8,9,180,104,181,10,11,12,13,17,60,149,182,183,39,81,82,42,43,105,97,84,184,125,15,16,18,19,20,21,22,23,24,25,26,27,28,126,185,129,164,85,174,134,155,66,29,30,31,32,33,34,35,36,37,38,40,41,44,45,46,147,186,173,86,91,159,51,55,57,168,92,50,58,59,150,151,76,78,56,79,80,83,87,88,64,154,135,94,67,187,95,136,160,156,100,137,138,103,107,111,114,112,115,116,117,123,98,99,124,141,142,188,170,189]))),K1=To(()=>Xn(()=>import(`./AdvancedRoutes-Icf0J_6_.js`),__vite__mapDeps([190,1,2,4,5,9,12,87,91,92,191,34,72,73,103,104,45,83,113,114,112,140,116,178,188]))),q1=To(()=>Xn(()=>import(`./MarketingRoutes-CsSXU_8i.js`),__vite__mapDeps([192,1,2,4,5,6,7,8,9,180,104,181,10,11,12,13,17,60,149,182,183,39,81,82,42,43,105,97,84,184,172,20,153,86,16,128,130,62,63,44,193,35,34,66,41,94,27,28,95,40,98,99,70,137,138,101,74,75,103,45,177,124,106,139,112,113,116,169]))),J1=To(()=>Xn(()=>import(`./AutomationRoutes-q5EbgXBH.js`),__vite__mapDeps([194,1,2,4,5,6,7,8,9,10,11,12,13,120,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,186,129,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,193,166,175,91,136,137,138,102,177,124]))),Y1=To(()=>Xn(()=>import(`./Overview-D54_Nb-x.js`).then(e=>e.r),__vite__mapDeps([15,1,2,4,5,6,7,16,11,12,13,17,18,19,20,21,22,23,24,25,26,27,28]))),X1=To(()=>Xn(()=>import(`./CRMRoutes-DYC0l0TN.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118])));function Z1(){let{account:e}=Fe(),[t,n]=Hr(`${e.id}_selected_giftcard_program_id`,null),[r,i]=Hr(`${e.id}_selected_stripcard_program_id`,null);return(0,Z.jsx)(kl.Provider,{value:{selectedProgramId:t,setSelectedProgramId:n},children:(0,Z.jsx)(gs.Provider,{value:{selectedProgramId:r,setSelectedProgramId:i},children:(0,Z.jsx)(T$,{children:(0,Z.jsx)(j$,{children:(0,Z.jsx)(M$,{children:(0,Z.jsx)(O$,{children:(0,Z.jsx)(E$,{children:(0,Z.jsx)(A$,{children:(0,Z.jsx)(k$,{children:(0,Z.jsx)(H$,{children:(0,Z.jsx)(I$,{children:(0,Z.jsx)(m$,{children:(0,Z.jsx)(N$,{children:(0,Z.jsx)(z$,{children:(0,Z.jsx)(w$,{children:(0,Z.jsx)(L$,{children:(0,Z.jsx)(h$,{children:(0,Z.jsx)(Dl,{children:(0,Z.jsx)(g$,{children:(0,Z.jsx)(V$,{children:(0,Z.jsx)(F$,{children:(0,Z.jsx)(R$,{children:(0,Z.jsx)(p$,{children:(0,Z.jsx)(P$,{children:(0,Z.jsx)(B$,{children:(0,Z.jsx)(El,{children:(0,Z.jsx)(Ut,{children:(0,Z.jsx)(f$,{children:(0,Z.jsx)(o1,{children:(0,Z.jsx)(C$,{children:(0,Z.jsx)(Q1,{})})})})})})})})})})})})})})})})})})})})})})})})})})})})})})})}function Q1(){let[e,t]=(0,W.useState)(null);return(0,Z.jsxs)(`div`,{className:m(`fixed flex h-dvh w-dvw flex-col bg-nav-bg-surface-default`,`bg-nav-bg-surface-default`,`pr-(--safe-right) pb-(--safe-bottom) pl-(--safe-left)`,`[--frame-gutter:0px] sm:[--frame-gutter:0.5rem]`),children:[(0,Z.jsx)(d$,{}),(0,Z.jsx)(i1,{}),(0,Z.jsx)(S$,{}),(0,Z.jsx)(b$,{}),(0,Z.jsx)(y$,{}),(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-row gap-2 px-(--frame-gutter) pb-(--frame-gutter)`,children:[(0,Z.jsxs)(`div`,{className:`page-container relative min-h-0 min-w-0 flex-1`,children:[(0,Z.jsx)(`div`,{id:`main-page`,className:m(`h-full overflow-auto bg-bg-default outline outline-main-content`,`sm:rounded-xl sm:shadow-card-default`),children:(0,Z.jsx)(Pr,{value:e,children:(0,Z.jsxs)(et,{children:[(0,Z.jsx)(P,{path:`/webshop`,element:(0,Z.jsx)(B1,{})}),(0,Z.jsx)(P,{path:Q.start,element:(0,Z.jsx)(k1,{})}),(0,Z.jsx)(P,{path:Q.home,element:(0,Z.jsx)(O1,{})}),(0,Z.jsx)(P,{path:Fi,element:(0,Z.jsx)(p1,{})}),(0,Z.jsx)(P,{path:ti,element:(0,Z.jsx)(j1,{})}),(0,Z.jsx)(P,{path:Ei,element:(0,Z.jsx)(u1,{})}),(0,Z.jsx)(P,{path:`user`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(R1,{})})}),(0,Z.jsx)(P,{path:`crm`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(X1,{})})})}),(0,Z.jsx)(P,{path:`data`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(V1,{})})})}),(0,Z.jsx)(P,{path:`apps`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(H1,{})})})}),(0,Z.jsx)(P,{path:`store`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(U1,{})})})}),(0,Z.jsx)(P,{path:`loyalty`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(W1,{})})})}),(0,Z.jsx)(P,{path:`settings`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(G1,{})})})}),(0,Z.jsx)(P,{path:`advanced`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(K1,{})})})}),(0,Z.jsx)(P,{path:`marketing`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(q1,{})})})}),(0,Z.jsx)(P,{path:`automation`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(Y1,{})})}),(0,Z.jsx)(P,{path:`automation`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(Ms,{}),children:(0,Z.jsx)(J1,{})})})})]})})}
125),(0,Z.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-x-0 top-0 z-20 h-3 shadow-card-top sm:rounded-t-xl`}),(0,Z.jsx)(`div`,{ref:t,className:`pointer-events-none absolute inset-0 z-30 overflow-hidden [contain:layout] sm:rounded-xl`})]}),(0,Z.jsx)(Ti,{})]}),(0,Z.jsx)(U$,{})]})}function $1(){let e=localStorage.getItem(`currentAccountId`),[t,n]=(0,W.useState)(null),{pending:r,mutate:i}=vt({url:`/accounts/${e}`,dataSetter:e=>n(Object.assign(new Ls,e))});return{account:t,setAccount:n,pending:r,mutate:i}}function e0(e){let{account:t,setAccount:n,mutate:r}=$1();return t?(0,Z.jsx)(He.Provider,{value:{account:t,setAccount:n,mutate:r},children:e.children}):(0,Z.jsx)(CK,{})}var t0=class{constructor(){this.firstname=``,this.lastname=``,this.is_verified=!0}fullName(){return`${this.firstname} ${this.lastname}`.trim()}},n0=class{constructor(){this.user=new t0,this.role=null,this.permissions={}}hasPermission(e){return this.permissions.admin===!0||this.permissions[e]===!0}};function r0(e){let{account:t}=Fe(),n=Yt(),{changeLanguage:r}=k(),[i,a]=(0,W.useState)(new n0),o=window._hsq||[],s=vt({url:`accounts/${t.id}/account-user`,dataSetter:e=>{let t=Object.assign(new t0,e.user),n=new n0;n.user=t,n.role=e.role,n.isAdmin=e.is_admin,n.permissions=e.permissions,a(n),t.locale&&r(t.locale)}});return(0,W.useEffect)(()=>{if(!i.user.id)return;let e=i.user;o.push([`identify`,{email:e.email}]),n.identifyUser(e.id.toString()),by?.identify(e.id.toString(),{email:e.email}),by?.group(`account`,t.id.toString(),{company:t.company})},[i.user]),i.user.id?(0,Z.jsx)(Pn.Provider,{value:{accountUser:i,mutate:s.mutate},children:e.children}):(0,Z.jsx)(CK,{})}var i0=(0,W.createContext)({});function a0(e){let t=Al(),[n,r]=(0,W.useState)(!1),[i,a]=(0,W.useState)({module:``});return(0,Z.jsx)(i0.Provider,{value:{isUpgradeModalVisible:n,setUpgradeModalVisible:r,upgradeModalContent:i,setUpgradeModalContent:a,helpCentre:t},children:e.children})}function o0(){return(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(CK,{}),children:(0,Z.jsx)(a0,{children:(0,Z.jsx)(e0,{children:(0,Z.jsx)(r0,{children:(0,Z.jsx)(Z1,{})})})})})}function s0(e){let{getToken:t}=Mn();return t()?e.children:(console.log(`No token, redirect`),(0,Z.jsx)(pt,{to:`/`}))}function c0(e){let{title:t}=e;return(0,Z.jsxs)(`div`,{className:`border-border-default border-b p-4 pt-6 pb-2`,children:[(0,Z.jsxs)(`div`,{className:`mb-8 flex items-center justify-center gap-4`,children:[(0,Z.jsx)(`img`,{className:`size-16 rounded-xl`,src:`https://storage.googleapis.com/static-nl-prod/business/Leat_Social_Square.png`,alt:`Leat`}),(0,Z.jsx)(ce,{className:`stroke-icon-default`}),(0,Z.jsx)(`img`,{className:`size-16`,src:`https://static.piggy.nl/business/shopify.svg`,alt:`shopify`})]}),(0,Z.jsx)(M,{as:`h2`,variant:`headingLg`,dangerouslySetInnerHTML:{__html:t}})]})}function l0(e){let t=Lr({from:{opacity:0}
125,to:{opacity:1},delay:300});return(0,Z.jsx)(Ui.div,{style:t,className:jn(`flex min-h-fit w-screen grow items-center`,`-mt-[clamp(0px,calc((100vh-700px)*0.24),160px)]`,`sm:max-w-[480px] sm:rounded-lg`,e.className),children:(0,Z.jsx)(Zt,{fluid:!0,children:e.children})})}function u0(e){return(0,Z.jsx)(`main`,{className:`flex min-h-screen flex-col items-center justify-between bg-bg-default py-4`,children:e.children})}var d0=[{type:`account_creation`,path:`create-account`,label:`Create account`},{type:`configuring_account`,path:`configure-account`,label:`Configure account`},{type:`brand_kit`,path:`setup-brandkit`,label:`Setup brandkit`},{type:`select_account`,path:`select-account`,label:`Select account`}];function f0(){let{push:e,queryParams:t}=be(),n=Rt(),{errorToast:r}=y(),{t:i}=k(),[a,o]=(0,W.useState)(null);return(0,W.useEffect)(()=>{n.get(`/after-login`).then(e=>o(e.data.data.step)).catch(e=>r(e,i(`authActionFailed`)))},[]),(0,W.useEffect)(()=>{if(t.stay||!a)return;let n=d0.find(e=>e.type===a);e(`/shopify/${n.path}`)},[a]),(0,Z.jsx)(u0,{children:t.stay&&(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:`Recommended step: ${a}`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-2 gap-3 p-6`,children:d0.map(t=>(0,Z.jsx)(`button`,{type:`button`,onClick:()=>e(`/shopify${t.path}`),className:`rounded-lg border border-border-secondary p-8 shadow-xs hover:scale-101`,children:(0,Z.jsx)(`p`,{className:`text-border-secondary`,children:t.label})},t.type))})]})})}function p0(){let{t:e}=k(),{errorToast:t}=y(),n=Rt(),[r,i]=(0,W.useState)(!1),{id:a}=l(),{get:o,destroy:s}=_n(),[c,u]=(0,W.useState)(null);return vt({url:`/after-login/select-account/${a}`,dataSetter:u}),console.log(c),(0,Z.jsx)(u0,{children:(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(`authorize`)}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,Z.jsx)(M,{as:`p`,children:e(`authorizeDescription`)}),c?(0,Z.jsxs)(`div`,{className:`flex w-full flex-row items-center gap-4 roun
125ded-xs bg-bg-fill-default p-2 shadow-button-default`,children:[(0,Z.jsx)(uo,{className:`size-12`,src:c.image,alt:c.company}),(0,Z.jsx)(M,{as:`p`,variant:`headingMd`,children:c.company})]}):(0,Z.jsx)(`div`,{className:`flex w-full flex-row items-center justify-center gap-4 rounded-xs bg-bg-fill-default p-2 shadow-button-default`,children:(0,Z.jsx)(M,{as:`span`,variant:`headingMd`,children:e(`noValidAccount`)})}),(0,Z.jsx)(N,{isLoading:r,variant:`primary`,onClick:()=>{i(!0),n.post(`/after-login/shopify/authorize`,{account_id:a}).then(e=>{let t=o(`redirectUrl`),n=o(`state`);s(`redirectUrl`),s(`state`),bt(`${t}?token=${e.data.data.token}&state=${n}`)}).catch(n=>{t(n,e(`authActionFailed`)),i(!1)})},disabled:!c,children:e(`allow`)})]})]})})}function m0(){let{t:e}=k(),{errorToast:t}=y(),{push:n}=be(),[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(0),[s,c]=(0,W.useState)(0),l=Rt(),u=`/after-login/configuring-account`,{mutate:d}=vt({url:u,dataSetter:e=>{o(e.progress),i(e.has_completed)},refreshInterval:r?null:1e3}),f=[e(`creatingLoyaltyProgram`),e(`setupInitialBusinessProfile`),e(`creatingContactsPortal`),e(`settingUpAutomatedEmails`),e(`creatingInitialWalletPass`)];return(0,W.useEffect)(()=>{l.post(u).then(()=>d()).catch(n=>t(n,e(`authActionFailed`)))},[]),(0,W.useEffect)(()=>{if(!r){let e=setInterval(()=>{c(e=>(e+1)%f.length)},2e3);return()=>clearInterval(e)}},[r]),(0,Z.jsx)(u0,{children:(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(`configure`)}),(0,Z.jsx)(co,{className:`pt-0!`,children:(0,Z.jsx)(yG,{})}),(0,Z.jsx)(ri,{children:(0,Z.jsxs)(`div`,{className:`flex w-full flex-col items-center gap-4`,children:[(0,Z.jsxs)(`div`,{className:`flex w-full flex-col items-center`,children:[(0,Z.jsx)(`div`,{className:`relative h-16 w-full overflow-hidden py-4`,children:(0,Z.jsx)(Ki,{mode:`wait`,children:(0,Z.jsx)(Be.div,{initial:{y:`100%`,opacity:0},animate:{y:`0%`,opacity:1},exit:{y:`-100%`,opacity:0},transition:{duration:.7,ease:`easeInOut`},className:`absolute w-full text-center text-md text-text-tertiary`,children:r?e(`accountIsReady`):f[s]},s)})}),(0,Z.jsx)(_o,{percentage:a})]}),(0,Z.jsx)(N,{variant:`primary`,onClick:()=>{n(`/shopify/after-login`)},disabled:!r,className:`w-full`,children:e(`continueToDashboard`)})]})})]})})}function h0(){let{t:e}=k(),[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({company:``,industry:`ecommerce`,country:``,website:``,phone:``}),{push:a}=be(),{errorToast:o}=y(),[s,c]=(0,W.useState)(!1),l=Rt(),u=lo(i),{get:d,destroy:f}=_n(),p=`/after-login/create-account`,{pending:m}=vt({url:p,dataSetter:e=>{n(e),i({company:d(`company`)??``,industry:`ecommerce`,phone:``,website:``,country:e.country_value})}}),h=!!(r.company&&r.industry&&r.country&&r.website&&r.phone);return t?(0,Z.jsxs)(u0,{children:[(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:`${e(`welcome`)}, ${t.user.first_name}`}),(0,Z.jsxs)(Ga,{onSubmit:()=>{c(!0),l.post(p,{...r,campaign_url:wG.get(`__gtm_campaign_url`),referrer_url:wG.get(`__gtm_referrer`)}).then(()=>{f(`company`),a(`/shopify/setup-brandkit`)}).catch(t=>{o(t,e(`authActionFailed`)),c(!1)})},className:`flex flex-col gap-3 p-6`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`company`)}),(0,Z.jsx)(Pe,{name:`company`,placeholder:e(`company`),type:`text`,required:!0,onChange:e=>u(e.target.name,e.target.value)})]}),(0,Z.jsx)($t,{children:(0,Z.jsx)(DG,{industryOptions:t.industry_options,loading:m,values:r,onChange:u})}),(0,Z.jsx)($t,{children:(0,Z.jsx)(vo,{countries:t.countries,loading:m,selectedCountry:t.countries.find(e=>e.value===r.country),setSelectedCountry:e=>u(`country`,e.value)})}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`website`)}),(0,Z.jsx)(Pe,{name:`website`,placeholder:e(`website`),type:`text`,required:!0,onChange:e=>u(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`phone`)}),(0,Z.jsx)(Pe,{name:`phone`,placeholder:e(`phone`),type:`text`,required:!0,onChange:e=>u(e.target.name,e.target.value)})]})]})}),(0,Z.jsx)(N,{type:`submit`,variant:`primary`,isLoading:s,disabled:!h,children:e(`continue`)})]})]}),(0,Z.jsx)(TG,{})]}):null}function g0(){let{t:e}=k(),{logout:t}=Sn(),{push:n}=be(),{set:r}=_n(),[i,a]=(0,W.useState)([]);vt({url:`/after-login/select-account`,dataSetter:a});let o=e=>{r(`currentAccountId`,e),n(`/shopify/authorize/${e}`)};return(0,W.useEffect)(()=>{i.length===1&&o(i[0].id)},[i]),(0,Z.jsx)(u0,{children:(0,Z.jsxs)(`div`,{className:`flex grow flex-col items-center justify-center gap-4 p-4`,children:[(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:`Account`}),(0,Z.jsx)(`div`,{className:`p-4`,children:i.map(e=>(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>o(e.id),disabled:!e.active,className:`flex w-full flex-row items-center gap-4 roun
125ded-xs bg-bg-fill-default p-2 ${e.active?`shadow-button-default hover:bg-bg-fill-hover hover:shadow-button-hover active:shadow-button-active`:`border border-border-default opacity-50`}`,children:[(0,Z.jsx)(uo,{className:`size-12`,src:e.image,alt:e.company}),(0,Z.jsx)(M,{as:`p`,variant:`headingMd`,children:e.company})]},e.id))})]}),(0,Z.jsx)(`div`,{className:`flex w-full justify-end`,children:(0,Z.jsx)(N,{variant:`default`,onClick:()=>t(!0),children:e(`logout`)})})]})})}function _0(e){let{logo:t,color:n,onClick:r}=e,{t:i}=k(),a=Lr({from:{opacity:0},to:{opacity:1},delay:300});return(0,Z.jsx)(Ui.div,{style:a,children:(0,Z.jsxs)(`div`,{className:`h-fit flex-col rounded-lg border border-border-default bg-bg-fill-default sm:hidden`,children:[(0,Z.jsx)(`div`,{className:`flex items-center justify-between border-b border-b-border-default p-4`,children:(0,Z.jsxs)(`div`,{className:`flex grow items-center justify-between gap-1`,children:[(0,Z.jsx)(M,{as:`span`,fontWeight:`semibold`,children:i(`preview`)}),(0,Z.jsx)(ce,{className:`size-4 stroke-icon-secondary-default`,onClick:r})]})}),(0,Z.jsx)(`div`,{className:`p-6`,children:(0,Z.jsxs)(`div`,{className:`grid grid-cols-2`,children:[(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,tone:`secondary`,children:i(`toEmail`)}),(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,children:`[email protected]`}),(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,tone:`secondary`,children:i(`subject`)}),(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,children:i(`helloWorld`)})]})}),(0,Z.jsxs)(`div`,{className:`rounded-b-lg p-6`,style:{backgroundColor:n},children:[(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6 bg-white p-4`,children:[t?(0,Z.jsx)(pr,{className:`mx-auto 
125size-12 rounded-xs object-cover`,src:t}):(0,Z.jsx)(M,{as:`span`,variant:`headingXl`,className:`text-center`,children:i(`yourLogo`)}),(0,Z.jsx)(`div`,{className:`h-5 rounded-lg bg-linear-to-l from-gray-900/10`}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Z.jsx)(`div`,{className:`h-3 w-1/2 rounded-lg bg-linear-to-l from-gray-900/10`}),(0,Z.jsx)(`div`,{className:`h-3 rounded-lg bg-linear-to-l from-gray-900/10`}),(0,Z.jsx)(`div`,{className:`h-3 w-3/4 rounded-lg bg-linear-to-l from-gray-900/10`})]}),(0,Z.jsx)(`div`,{className:`h-6 w-1/2 rounded-lg bg-gray-200`,style:{backgroundColor:n}})]}),(0,Z.jsx)(N,{className:`w-full sm:hidden`,onClick:r,children:i(`back`)})]})]})})}function v0(e){let{logo:t,color:n}=e,{t:r}=k(),i=Lr({from:{opacity:0},to:{opacity:1},delay:300});return(0,Z.jsx)(Ui.div,{style:i,className:`hidden w-full sm:block`,children:(0,Z.jsxs)(YW,{className:`w-full`,children:[(0,Z.jsx)(Va,{children:(0,Z.jsx)(`div`,{className:`w-full`,children:(0,Z.jsx)(Ha,{children:r(`preview`)})})}),(0,Z.jsx)(co,{children:(0,Z.jsxs)(`div`,{className:`grid grid-cols-2`,children:[(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,tone:`secondary`,children:r(`toEmail`)}),(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,children:`[email protected]`}),(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,tone:`secondary`,children:r(`subject`)}),(0,Z.jsx)(M,{as:`span`,variant:`bodySm`,children:r(`helloWorld`)})]})}),(0,Z.jsx)(`div`,{className:`rounded-b-lg p-6`,style:{backgroundColor:n},children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6 bg-white p-4`,children:[t?(0,Z.jsx)(pr,{className:`mx-auto 
125size-12 rounded-xs object-cover`,src:t}):(0,Z.jsx)(M,{as:`span`,variant:`headingXl`,className:`text-center`,children:r(`yourLogo`)}),(0,Z.jsx)(`div`,{className:`h-5 rounded-lg bg-linear-to-l from-gray-900/10`}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Z.jsx)(`div`,{className:`h-3 w-1/2 rounded-lg bg-linear-to-l from-gray-900/10`}),(0,Z.jsx)(`div`,{className:`h-3 rounded-lg bg-linear-to-l from-gray-900/10`}),(0,Z.jsx)(`div`,{className:`h-3 w-3/4 rounded-lg bg-linear-to-l from-gray-900/10`})]}),(0,Z.jsx)(`div`,{className:`h-6 w-1/2 rounded-lg bg-gray-200`,style:{backgroundColor:n}})]})})]})})}function y0(){let{t:e}=k(),{errorToast:t}=y(),{push:n}=be(),[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(!1),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),h=Rt(),[g,_]=(0,W.useState)(!1),v=`/after-login/create-brand-kit`,b=!!(p&&l);return vt({url:v,dataSetter:i}),(0,W.useEffect)(()=>{if(l){let e=new FileReader;e.onload=e=>f(e.target.result),e.readAsDataURL(l)}},[l]),r?(0,Z.jsx)(u0,{children:(0,Z.jsxs)(`div`,{className:`flex grow flex-col items-center justify-center gap-4 p-4`,children:[s?(0,Z.jsx)(_0,{color:p,logo:d,onClick:()=>c(!s)}):(0,Z.jsx)(`div`,{className:`flex items-center justify-center gap-4`,children:(0,Z.jsxs)(`div`,{className:`flex items-start justify-center gap-4`,children:[(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(`brandKit`)}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6 p-6`,children:[(0,Z.jsx)(N,{variant:`default`,className:`w-full sm:hidden`,onClick:()=>c(!s),children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Sr,{className:`size-5`}),(0,Z.jsx)(`p`,{children:e(`preview`)})]})}),(0,Z.jsx)(`div`,{className:`border-border-default border-b sm:hidden`}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`logo`)}),(0,Z.jsx)(Ns,{onFileSelected:e=>u(e),onClear:()=>u(``)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`primaryBrandColor`)}),(0,Z.jsx)($r,{onChange:e=>m(e),color:p??``})]}),(0,Z.jsx)(N,{onClick:()=>{o(!0),h.post(v,sn({logo:l,color:p})).then(()=>n(`/shopify/configure-account`)).catch(n=>{t(n,e(`authActionFailed`)),o(!1)})},variant:`primary`,isLoading:a,disabled:!b,className:`w-full`,children:e(`continue`)})]})}),(0,Z.jsx)(N,{onClick:()=>_(!0),variant:`default`,isLoading:a,children:e(`skip`)})]})]})]}),(0,Z.jsx)(v0,{color:p,logo:d})]})}),(0,Z.jsx)(St,{open:g,onOpenChange:_,children:(0,Z.jsx)(jt,{children:(0,Z.jsxs)(Ye,{children:[(0,Z.jsxs)(Dt,{className:`p-4`,children:[(0,Z.jsx)(Lt,{children:e(`continueWithoutSaving`)}),(0,Z.jsx)(Tn,{children:e(`notBeAbleToSetupFunctionalEmailWithColors`)})]}),(0,Z.jsxs)(We,{children:[(0,Z.jsx)(Ie,{asChild:!0,children:(0,Z.jsx)(N,{children:e(`cancel`)})}),(0,Z.jsx)(N,{onClick:()=>{o(!0),h.put(`${v}/skip-step`).then(()=>n(`/shopify/configure-account`)).catch(n=>{t(n,e(`authActionFailed`)),o(!1)})},tone:`critical`,isLoading:a,children:e(`continue`)})]})]})})})]})}):null}function b0(){let{t:e}=k(),{successToast:t,errorToast:n}=y(),r=Rt(),[i,a]=(0,W.useState)(!1),{push:o,queryParams:s}=be(),c=s?.email,{login:l}=Sn(),[u,d]=(0,W.useState)(``),[f,p]=(0,W.useState)(!1),m=window.innerWidth<640,h=()=>{i||(a(!0),r.post(`/verify/send`,{email:c}).then(()=>t(e(`resendVerificationEmail`))).catch(t=>n(t,e(`authActionFailed`))).finally(()=>{setTimeout(()=>{a(!1)},6e4)}))},g=()=>{p(!0),r.post(`/verify/code`,{code:u,email:c}).then(n=>{t(e(`emailVerified`)),l(n.data.data.token),o(`/shopify/after-login`)}).catch(t=>n(t,e(`authActionFailed`))).finally(()=>p(!1))};return(0,W.useEffect)(()=>{u?.length===6&&g()},[u]),(0,W.useEffect)(()=>{c||o(Q.login)},[]),(0,Z.jsxs)(u0,{children:[(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(`emailSentTo`,{email:c})}),(0,Z.jsxs)(co,{children:[(0,Z.jsx)(M,{as:`p`,variant:`bodyMd`,children:e(`pleaseCheckYourInbox`)}),(0,Z.jsx)(Wo,{onChange:e=>d(e),value:u,name:`code`,disabled:f,className:`w-full justify-between space-x-4`,inputMode:`tel`,fields:6,inputStyle:{MozAppearance:`textfield`,width:m?`45px`:`60px`,height:m?`50px`:`65px`,fontSize:m?`16px`:`19px`,borderRadius:`8px`,fontWeight:`400`,borderWidth:`1px`,borderStyle:`solid`,textAlign:`center`}}),(0,Z.jsx)(N,{isLoading:f,variant:`primary`,disabled:u?.length<6,onClick:g,children:e(`verify`)}),(0,Z.jsx)(`button`,{type:`button`,onClick:h,className:`mt-6 text-start text-primary-600 text-xs hover:underline`,children:e(`resendEmail`)})]})]}),(0,Z.jsx)(TG,{})]})}function x0(){let{t:e}=k(),{errorToast:t,successToast:n}=y(),r=Rt(),{push:i}=be(),[a,o]=(0,W.useState)(!1),[s,c]=(0,W.useState)(``);return(0,Z.jsx)(u0,{children:(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(`forgotPassword`)}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-7 p-6`,children:[(0,Z.jsxs)(Ga,{onSubmit:()=>{o(!0),r.post(`/forgot-password`,{email:s}).then(()=>{n(e(`passwordResetEmailSent`)),i(`/login`)}).catch(n=>t(n,e(`authActionFailed`))).finally(()=>o(!1))},className:`flex flex-col gap-3`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsx)(Fn,{children:(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`email`)}),(0,Z.jsx)(Pe,{name:`email`,placeholder:e(`email`),value:s,type:`email`,required:!0,onChange:e=>c(e.target.value)})]})})}),(0,Z.jsx)(N,{isLoading:a,variant:`primary`,disabled:!s||a,type:`submit`,children:e(`send`)})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-sm text-text-default`,children:e(`needHelp`)}),(0,Z.jsx)(`a`,{href:`mailto:${Ke.support}`,className:`text-sm text-text-link-default hover:underline`,children:e(`contactSupport`)})]})]})]})})}function S0(){let{t:e}=k(),{errorToast:t,successToast:n}=y(),r=Rt(),{push:i,queryParams:a}=be(),[o,s]=(0,W.useState)(!1),[c,l]=(0,W.useState)({password:``,password_confirmation:``,token:a.token}),u=lo(l);return(0,W.useEffect)(()=>{r.get(`/reset-password/${a.token}`).catch(()=>i(Q.home))},[]),(0,Z.jsx)(u0,{children:(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(`passwordReset`)}),(0,Z.jsxs)(Ga,{onSubmit:()=>{s(!0),r.post(`/reset-password`,c).then(()=>{localStorage.clear(),n(e(`reset_password_success`)),i(`/`)}).catch(n=>t(n,e(`authActionFailed`))).finally(()=>s(!1))},className:`flex flex-col gap-3 p-6`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`newPassword`)}),(0,Z.jsx)(GG,{name:`password`,placeholder:e(`newPassword`),autoComplete:`new-password`,value:c.password,required:!0,disabled:o,onChange:e=>u(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`confirmPassword`)}),(0,Z.jsx)(GG,{name:`password_confirmation`,placeholder:e(`confirmPassword`),autoComplete:`new-password`,value:c.password_confirmation,required:!0,disabled:o,onChange:e=>u(e.target.name,e.target.value)})]})]})}),(0,Z.jsx)(N,{isLoading:o,variant:`primary`,disabled:!c.password||!c.password_confirmation,t
125ype:`submit`,children:e(`submit`)})]})]})})}function C0(){let{t:e}=k(),t=NG(`/shopify/after-login`),n=Rt(),{isLoggedIn:r}=Sn(),{push:i,queryParams:a}=be(),{successToast:o,errorToast:s}=y(),{get:c,set:l,destroy:u}=_n(),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(``),[_,v]=(0,W.useState)(``),[b,x]=(0,W.useState)(``),[S,C]=(0,W.useState)(!1),w=()=>{u(`firstname`),u(`lastname`),u(`email`),u(`company`)};(0,W.useEffect)(()=>{l(`firstname`,a.firstName??``),l(`lastname`,a.lastName??``),l(`company`,a.company??``),l(`email`,a.email?.toString()??``),l(`state`,a.state??``),l(`redirectUrl`,a.redirectUrl)},[]),(0,W.useEffect)(()=>{r()&&(w(),i(`/shopify/after-login`))},[]),(0,W.useEffect)(()=>{b.length===6&&E()},[b]),(0,W.useEffect)(()=>{let e=c(`state`),t=c(`redirectUrl`);C(!!(e&&t))},[]);let T=()=>{n.post(`/verify/send`,{email:h}).then(()=>o(e(`resendVerificationEmail`))).catch(t=>s(t,e(`authActionFailed`))).finally(()=>f(!1))},E=()=>{h&&_&&(m(!0),n.post(`/login-with-credentials`,{email:h,password:_}).then(e=>{t(e.data.data)}).catch(t=>{if(t.message.includes(`Your account has not been verified yet. Please check your inbox.`)){f(!0),m(!1);return}m(!1),s(t,e(`authActionFailed`))}))};return S?(0,Z.jsxs)(u0,{children:[(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(`logIn`)}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-7 p-6`,children:[d&&(0,Z.jsxs)(di,{tone:`warning`,children:[(0,Z.jsx)(Mi,{tone:`warning`}),(0,Z.jsxs)(Hi,{children:[(0,Z.jsx)(M,{as:`span`,tone:`warning`,children:e(`pleaseVerifyUser`)}),(0,Z.jsx)(zs,{children:(0,Z.jsx)(N,{onClick:T,children:e(`clickToResendVerification`)})})]})]}),(0,Z.jsx)(`div`,{className:`flex w-full justify-center`,children:(0,Z.jsx)(WG,{onError:t=>{s(t,e(`googleAuthFailed`)),console.error(t)},onSuccess:e=>t(e),authUrl:`/social/google/login`})}),(0,Z.jsx)(jl,{text:e(`or`)}),(0,Z.jsxs)(Ga,{onSubmit:E,className:`flex flex-col gap-3`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`email`)}),(0,Z.jsx)(Pe,{name:`email`,placeholder:e(`email`),autoComplete:`email`,value:h,type:`email`,required:!0,onChange:e=>g(e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`password`)}),(0,Z.jsx)(GG,{autoComplete:`current-password`,value:_,required:!0,onChange:e=>v(e.target.value)})]})]})}),(0,Z.jsx)(N,{isLoading:p,variant:`primary`,disabled:!h||!_,type:`submit`,children:e(`onboardingLogin`)}),(0,Z.jsx)(ai,{to:Q.forgotPassword,className:`flex justify-center text-sm`,children:e(`forgotYourPassword`)})]}),(0,Z.jsx)(jl,{}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-gray-900 text-sm`,children:e(`newToPiggy`)}),(0,Z.jsx)(nt,{to:`/shopify/sign-up`,children:(0,Z.jsxs)(`p`,{className:`text-primary-600 text-sm hover:underline`,children:[e(`getStarted`),` →`]})})]})]})]}),(0,Z.jsx)(TG,{})]}):(0,Z.jsx)(u0,{children:(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(`logIn`)}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-7 p-6`,children:[(0,Z.jsx)(M,{as:`p`,variant:`bodyMd`,children:e(`invalidInformation`)}),(0,Z.jsx)(N,{onClick:()=>{w(),i(`/login`)},children:e(`goBack`)})]})]})})}function w0(){let{t:e}=k(),t=dK(),n=Rt(),{push:r}=be(),{successToast:i,errorToast:a}=y(),[o,s]=(0,W.useState)(!1),{get:c,destroy:l}=_n(),[u,d]=(0,W.useState)({firstname:c(`firstname`)??``,lastname:c(`lastname`)??``,email:c(`email`)??``,password:``,password_confirmation:``,terms_and_conditions:!1}),f=lo(d),p=!!(u.firstname&&u.lastname&&u.email&&u.password&&u.password_confirmation&&u.terms_and_conditions);return(0,Z.jsxs)(u0,{children:[(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(`createNewAccount`)}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-7 p-6`,children:[(0,Z.jsxs)(Ga,{onSubmit:()=>{s(!0),n.post(`/sign-up`,u).then(()=>{i(e(`signUpSuccessfulCheckYourInbox`)),l(`firstname`),l(`lastname`),l(`email`),t.push({event:`sign_up`}),r(`/shopify/check-email?email=${hn(u.email)}`)}).catch(t=>{a(t,e(`authActionFailed`)),s(!1)})},className:`flex flex-col gap-3`,children:[(0,Z.jsx)(kn,{children:(0,Z.jsxs)(Fn,{children:[(0,Z.jsxs)(xn,{children:[(0,Z.jsxs)($t,{className:`w-full`,children:[(0,Z.jsx)(F,{children:e(`firstName`)}),(0,Z.jsx)(Pe,{name:`firstname`,placeholder:e(`firstName`),autoComplete:`given-name`,value:u.firstname,type:`text`,required:!0,onChange:e=>f(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{className:`w-full`,children:[(0,Z.jsx)(F,{children:e(`lastName`)}),(0,Z.jsx)(Pe,{name:`lastname`,placeholder:e(`lastName`),autoComplete:`family-name`,value:u.lastname,type:`text`,required:!0,onChange:e=>f(e.target.name,e.target.value)})]})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`email`)}),(0,Z.jsx)(Pe,{name:`email`,placeholder:e(`email`),autoComplete:`email`,value:u.email,type:`email`,required:!0,onChange:e=>f(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`password`)}),(0,Z.jsx)(GG,{name:`password`,placeholder:e(`password`),autoComplete:`new-password`,value:u.password,required:!0,onChange:e=>f(e.target.name,e.target.value)})]}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(F,{children:e(`confirmPassword`)}),(0,Z.jsx)(GG,{name:`password_confirmation`,placeholder:e(`confirmPassword`),autoComplete:`new-password`,value:u.password_confirmation,required:!0,onChange:e=>f(e.target.name,e.target.value)})]}),(0,Z.jsxs)(cr,{children:[(0,Z.jsx)(dr,{name:`terms_and_conditions`,checked:u.terms_and_conditions,onChange:e=>f(`terms_and_conditions`,e)}),(0,Z.jsx)(F,{onClickCapture:e=>e.stopPropagation(),dangerouslySetInnerHTML:{__html:e(`iAgreeWithTheTerms`,{terms:`https://www.leat.com/legal/terms-and-conditions`,privacy:`https://www.leat.com/legal/privacy-policy`})}})]})]})}),(0,Z.jsx)(N,{isLoading:o,variant:`primary`,disabled:!p,type:`submit`,children:e(`create`)})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-sm text-text-default`,children:e(`alreadyHaveAnAccount`)}),(0,Z.jsxs)(ai,{removeUnderline:!0,to:Q.login,className:`inline-flex items-center gap-1 text-sm hover:underline`,children:[e(`logIn`),(0,Z.jsx)(ke,{className:`size-4`})]})]})]})]}),(0,Z.jsx)(TG,{})]})}function T0(){let{t:e}=k(),t=Rt(),{push:n,queryParams:r}=be(),{login:i}=Sn(),{successToast:a,errorToast:o}=y(),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{c(!0),t.get(`/verify`,{token:r.verification_token}).then(t=>{u(!0),a(e(`emailVerified`)),i(t.data.data.token),n(`/shopify/after-login`)}).catch(t=>o(t,e(`authActionFailed`))).finally(()=>c(!1))},[]),(0,Z.jsx)(u0,{children:(0,Z.jsxs)(l0,{children:[(0,Z.jsx)(c0,{title:e(l?`verify`:`verificationFailed`)}),l&&(0,Z.jsx)(M,{as:`p`,variant:`bodyMd`,children:e(`successfullyVerifiedDescription`)}),(0,Z.jsx)(co,{children:(0,Z.jsx)(N,{variant:`primary`,onClick:()=>n(Q.login),isLoading:s,disabled:s,className:`w-full`,children:e(l?`onboardingLogin`:`backToLogin`)})})]})})}function E0(){return(0,Z.jsxs)(et,{children:[(0,Z.jsx)(P,{path:`login`,element:(0,Z.jsx)(C0,{})}),(0,Z.jsx)(P,{path:`sign-up`,element:(0,Z.jsx)(w0,{})}),(0,Z.jsx)(P,{path:`check-email`,element:(0,Z.jsx)(b0,{})}),(0,Z.jsx)(P,{path:`verify`,element:(0,Z.jsx)(T0,{})}),(0,Z.jsx)(P,{path:`forgot-password`,element:(0,Z.jsx)(x0,{})}),(0,Z.jsx)(P,{path:`confirm-reset-password`,element:(0,Z.jsx)(S0,{})}),(0,Z.jsx)(P,{path:`after-login`,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(f0,{})})}),(0,Z.jsx)(P,{path:`create-account`,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(h0,{})})}),(0,Z.jsx)(P,{path:`setup-brandkit`,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(y0,{})})}),(0,Z.jsx)(P,{path:`configure-account`,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(m0,{})})}),(0,Z.jsx)(P,{path:`select-account`,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(g0,{})})}),(0,Z.jsx)(P,{path:`authorize/:id`,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(p0,{})})})]})}function D0(){let[e,t]=(0,W.useState)(null),[n,r]=(0,W.useState)({});return(0,Z.jsx)(Qt.Provider,{value:{data:e,setData:t},children:(0,Z.jsxs)(bn.Provider,{value:{queries:n,setQueries:r},children:[(0,Z.jsx)(vH,{}),(0,Z.jsxs)(et,{children:[(0,Z.jsx)(P,{path:`/login`,element:(0,Z.jsx)(KG,{})}),(0,Z.jsx)(P,{path:Q.loginWithEmailCode,element:(0,Z.jsx)(qG,{})}),(0,Z.jsx)(P,{path:Q.loginWithAuthenticatorCode,element:(0,Z.jsx)(FG,{})}),(0,Z.jsx)(P,{path:`/`,element:(0,Z.jsx)(KG,{})}),(0,Z.jsx)(P,{path:`/admin-login`,element:(0,Z.jsx)(MG,{})}),(0,Z.jsx)(P,{path:Q.signUpAsRoute,element:(0,Z.jsx)(fK,{})}),(0,Z.jsx)(P,{path:Q.signUpRoute,element:(0,Z.jsx)(fK,{})}),(0,Z.jsx)(P,{path:Q.verifyRoute,element:(0,Z.jsx)(hK,{})}),(0,Z.jsx)(P,{path:Q.linkSocialRoute,element:(0,Z.jsx)(mK,{})}),(0,Z.jsx)(P,{path:Q.forgotPassword,element:(0,Z.jsx)(vK,{})}),(0,Z.jsx)(P,{path:Q.checkEmail,element:(0,Z.jsx)(uK,{})}),(0,Z.jsx)(P,{path:`/shopify/*`,element:(0,Z.jsx)(E0,{})}),(0,Z.jsx)(P,{path:`/oauth/authorize`,element:(0,Z.jsx)(sK,{})}),(0,Z.jsx)(P,{path:Q.afterLogin,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(dG,{})})}),(0,Z.jsx)(P,{path:Q.personalizedWebsite,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(kG,{})})}),(0,Z.jsx)(P,{path:Q.createAccount,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(OG,{})})}),(0,Z.jsx)(P,{path:Q.configureAccount,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(bG,{})})}),(0,Z.jsx)(P,{path:Q.selectAccount,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(lK,{})})}),(0,Z.jsx)(P,{path:Q.pendingInvitations,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(cK,{})})}),(0,Z.jsx)(P,{path:`/inactive-account`,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(jG,{})})}),(0,Z.jsx)(P,{path:`/maintenance-mode`,element:(0,Z.jsx)(s0,{children:(0,Z.jsx)(_K,{})})}),(0,Z.jsx)(P,{path:`/confirm-reset-password`,element:(0,Z.jsx)(yK,{})}),(0,Z.jsx)(P,{path:`/invitation/sign-up`,element:(0,Z.jsx)(pK,{})}),(0,Z.jsx)(P,{path:`*`,children:(0,Z.jsx)(P,{path:`*`,element:(0,Z.jsx)(o0,{})})})]})]})})}function O0(){return(0,Z.jsx)(Se,{children:(0,Z.jsxs)(Te,{children:[(0,Z.jsx)(ee,{position:`bottom-center`,toastOptions:{duration:3e3}}),(0,Z.jsx)(Wy,{children:(0,Z.jsx)(_H,{children:(0,Z.jsx)(Qn,{delayDuration:300,children:(0,Z.jsx)(zy,{children:(0,Z.jsx)(D0,{})})})})})]})})}E.use(qo).use(JW).init({fallbackLng:Uo,lng:localStorage.getItem(`language`)??navigator.language?.substring(0,2),debug:!1,backend:{loadPath:`https://storage.googleapis.com/unlokalise-nl-prod/translations/business-dashboard/{{lng}}.json?t=${Date.now()}`},interpolation:{escapeValue:!1}});var k0;function A0(e){k0=e}function j0(){return k0}var M0=(0,W.createContext)({get client(){return j0()},bootstrap:void 0});function N0(e,t,n){if(n===void 0&&(n=new WeakMap),e===t)return!0;
125if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(n.has(e)&&n.get(e)===t)return!0;n.set(e,t);var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0,o=r;a<o.length;a++){var s=o[a];if(!i.includes(s)||!N0(e[s],t[s],n))return!1}return!0}function P0(e){var t=e.children,n=e.client,r=e.apiKey,i=e.options,a=(0,W.useRef)(null),o=(0,W.useMemo)(function(){if(n)return r&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),i&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n;var e=j0();return r||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),e},[n,r,JSON.stringify(i)]);return(0,W.useEffect)(function(){if(!(n||!r)){var e=j0(),t=a.current;t?(r!==t.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),i&&!N0(i,t.options)&&e.set_config(i),a.current={apiKey:r,options:i??{}}):(e.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),e.init(r,i),a.current={apiKey:r,options:i??{}})}},[n,r,JSON.stringify(i)]),W.createElement(M0.Provider,{value:{client:o,bootstrap:i?.bootstrap??n?.config?.bootstrap}},t)}var F0=function(e){return typeof e==`function`},I0=function(e,t){return I0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},I0(e,t)};function L0(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);I0(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var R0={componentStack:null,exceptionEvent:null,error:null},z0={INVALID_FALLBACK:`[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element.`};(function(e){L0(t,e);function t(t){var n=e.call(this,t)||this;return n.state=R0,n}return t.prototype.componentDidCatch=function(e,t){var n=this.props.additionalProperties,r;F0(n)?r=n(e):typeof n==`object`&&(r=n);var i=this.context.client.captureException(e,r),a=t.componentStack;this.setState({error:e,componentStack:a??null,exceptionEvent:i})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.fallback,r=this.state;if(r.componentStack==null)return F0(t)?t():t;var i=F0(n)?W.createElement(n,{error:r.error,componentStack:r.componentStack,exceptionEvent:r.exceptionEvent}):n;return W.isValidElement(i)?i:(console.warn(z0.INVALID_FALLBACK),W.createElement(W.Fragment,null))},t.contextType=M0,t})(W.Component),A0(by);var B0=[`forwarded`,`-ip`,`remote-`,`via`,`-user`],V0={userInfo:!1,cookies:!1,httpHeaders:{request:{deny:B0},response:{deny:B0}},httpBodies:[],urlQueryParams:{deny:B0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,queues:!1,graphQL:{document:!1,variables:!1}};function H0(e){return(0,Z.jsx)(_l,{children:e.children})}window.addEventListener(`vite:preloadError`,e=>{window.sessionStorage.getItem(`lazy-chunk-reloaded`)!==`true`&&(console.warn(`Vite preload error detected. Reloading...`,e),window.sessionStorage.setItem(So,`true`),window.location.reload())}),window.addEventListener(`pageshow`,e=>{e.persisted&&window.location.reload()});{pQ({dsn:`https://[email protected]/1824691`,environment:`production`,release:`faf2b30e3eaa2d91afa37d88c450dfaf623cf3a0`,dataCollection:V0,ignoreErrors:[...tl,`Load failed`,`Unable to preload CSS`,`Illegal invocation`,`No error message`,`Cannot read properties of null (reading 'postMessage')`,"Event `CustomEvent` (type=unhandledrejection) captured as promise rejection",`Can't find variable: gmo`,`NetworkError when attempting to fetch resource.`,`Failed to fetch`,`ResizeObserver loop completed with undelivered notifications.`,`Object captured as promise rejection with keys: code, data, message, stack`,`Non-Error promise rejection captured with value: Object Not Found Matching Id:`,`Object captured as exception with keys: message`]}),Wc(`account`,{accountId:localStorage.getItem(`currentAccountId`)});let e=fn(`PUBLIC_POSTHOG_KEY`,`phc_HxXNqw5GDZflDqSbHYQ4D4dYwd1PtUwQyS4GyZFYGB6`);e&&by.init(e,{api_host:`https://eu.i.posthog.com`,defaults:`2025-05-24`})}Ty.createRoot(document.getElementById(`root`)).render((0,Z.jsx)(yQ,{fallback:Jc,children:(0,Z.jsx)(H0,{children:(0,Z.jsx)(W.Suspense,{fallback:(0,Z.jsx)(js,{}),children:(0,Z.jsx)(P0,{client:by,children:(0,Z.jsx)(O0,{})})})})}));
126//# sourceMappingURL=index-BK9VUuN1.js.map

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.