PageSourceSearch

https://workwithdana.com/_nuxt/Do1nZpFk.js

js workwithdana.com collected 2026-10-04 18:15:23 UTC 2,039,449 bytes, 4,620 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./hnN0wzPz.js","./odLw1Jp_.js","./WBHeYkkR.js","./BHietjK3.js","./BmT7VXuR.js","./DJnNxUKs.js","./BM5aYONo.js","./BackgroundSliderV2.CHwLAJWJ.css","./-8tBiWp6.js","./ao8MkUl6.js","./DZKjVPmg.js","./ShapeDivider.BurQ4r_N.css","./ChoZ3EV4.js","./ActionButton.DPbpzJEv.css","./B7RbCf1l.js","./ButtonLottieIcon.DcEOpJx2.css","./DvJT-m7N.js","./CxHZCQz4.js","./FlexWrapperColV2.D0KMC_gV.css","./CTMfOtnq.js","./BwQdXQwL.js","./pVfIq6ZV.js","./GqpHYmVG.js","./IRO0kIHJ.js","./D1Yhr504.js","./DxvX61I1.js","./FlexWrapperV2.DDTO_rtE.css","./V3.C-QeUVaD.css","./CCd7CVVz.js","./Se49WYkS.js","./CyDlDtLg.js","./Header.DfEt1974.css","./D2ISrKoS.js","./Footer.4gyWRh2T.css","./B1LHqWUq.js","./CeuLrEAZ.js","./Bdcef8cb.js","./_title_.V0A45HW2.css","./WCv4GiF8.js","./Dfydfb_4.js","./CGxf4kbZ.js","./index.CrsJlEPG.css","./CMF-19qF.js","./403.BPx66Blm.css","./DO7_xk5t.js","./C9S_Et39.js","./auth-reset.BxxgcU6C.css","./C4XCa2ZH.js","./mL5PdPRz.js","./BoXiJdU1.js","./index.CyzeOFvU.css","./Bn1GlyUG.js","./Dyw--8_v.js","./login.VAe7dPOB.css","./bUNlgfXu.js","./CdBmHfC5.js","./CnljRIDj.js","./reset-password.CSqFTR9Q.css","./CzK1dpn_.js","./CgP9qIR5.js","./Ctqxywf0.js","./_hash_.DOdsJF11.css","./ighgRPTs.js","./_hash_.dv5ImewK.css","./jlOWumce.js","./maintenance.DrdDZ-JO.css","./D4cuSQgQ.js","./YG1-RQVa.js","./3cbKcuwf.js","./BnMxvwjt.js","./BrUKRosw.js","./5I2M2vCs.js","./Cjhwfryf.js","./CY68-a9m.js","./vJ94fBus.js","./DLy9Y_gb.js","./CfwPZzzJ.js","./BAWn_irm.js","./DhIQN-nW.js","./Ca6dnPIg.js","./D32W_VjA.js","./XMY91GlI.js","./B1KOrQsF.js","./CHM8pq8x.js","./CiXkQZXj.js","./VideoBackground.DnF51VI4.css","./Blank.D9ftIlrw.css","./NUnY1O6o.js","./dyW4FUvd.js","./BackgroundVideoV2.D-ALIXDo.css","./BlankV2.pC8-wT9w.css","./ClzqYp7f.js","./sZ61iXvL.js","./Dropdown.I-mjweZA.css","./CFutRneM.js","./BM32_B00.js","./DwhRLOzU.js","./ElPromo.BrgzFuES.css","./ClDR3y5M.js","./DhPD0UR1.js","./Modal.BdkydmWG.css","./rG_qII_y.js","./dExVy2pC.js","./BfeQ0nLh.js","./CjYkpDGF.js","./91EGfbzc.js","./DjVMMfsH.js","./Modal.OUQLGncy.css","./ForgotPassword.CGtUg8Oq.css","./JZvnEAid.js","./7jrdziBy.js","./SignInModal.CiTAmFxQ.css","./BVmZIfqo.js","./D7feWUma.js","./olWgQKQP.js","./D9vp2FmM.js","./Tooltip.mZ5-C-aG.css","./Badge.JY4MTNiq.css","./BIlJzu9K.js","./Index.CWvfpB9p.css","./Dp-NyRjW.js","./BJaAQc9e.js","./B8CTCy0W.js","./CommentComposer.DPOfzrzt.css","./Reply.BSJKcYed.css","./Comment.DkMXs1bl.css","./CvD81Q11.js","./DJNcXkHB.js","./Comments.DuGFFb45.css","./DaSsFnT3.js","./C-gqtigH.js","./Button.FE5jrDxt.css","./Container.CnuE0thh.css","./C8o9k-m4.js","./C13cT-tf.js","./DrhflEf7.js","./Tooltip.JX_rzGK9.css","./ButtonV2.vcRa-uTo.css","./ContainerV2.DwlZSJnr.css","./BaLedPpU.js","./LikeButton.DLmgRXWM.css","./0JqGwN-9.js","./Pagination.D7HBrgUl.css","./CLujsEry.js","./Register.BjgqBd0E.css","./DlNBbgjy.js","./C_2PYe7y.js","./ClrGYK5L.js","./DHaEJnnE.js","./CBiUQrPu.js","./BCzi1dU5.js","./y0BwXk9u.js","./BsvbXqrm.js","./BMZhEi_g.js","./QQEUxOfm.js","./DSJVJTyK.js","./CTr-6Owk.js","./tEuuOWfQ.js","./DYo5lNTM.js","./BJqEb2va.js","./CKQrUmNx.js","./DV971gO3.js","./Post.B5sGUibi.css","./CVUPHU_l.js","./BITDbPv4.js","./pnfLrVuP.js","./Reply.B3oyFXxr.css","./CyasXceV.js","./D3-lK2r8.js","./Checkbox.BpJlJlbD.css","./Banner.CRnINaUJ.css","./KYLyKWeA.js","./DqOrsXir.js","./Bybh6ZFv.js","./CounterWrapper.C7JJ8h0G.css","./BySKKBoz.js","./7-TSJZYb.js","./CnjYuqLN.js","./CDTlbYOj.js","./BJ0ZAjob.js","./BillingTerms.BR9fvrk5.css","./C9nP4N7o.js","./BCgx2xw5.js","./D7IBDah4.js","./Dvf0lcIP.js","./Carousel.BrIOPr2Y.css","./a9yw37dI.js","./CarouselV2.BB7Vi7Fy.css","./-k4ooxMn.js","./CarouselV3.jkFxFK86.css","./BoqLvFEm.js","./CarouselV4.C-YVscov.css","./CnygIRbq.js","./B37O8pCu.js","./C2d4VswM.js","./mgeRfwhi.js","./CMBiYTiD.js","./MegaMenu.BuEYhdjk.css","./CPKPZGV_.js","./Dropdown.Ll1PNEX9.css","./CkwlsPEw.js","./MenuLinkV4.B22Stpgn.css","./C6qacOuQ.js","./BaSJXDeA.js","./BoKuNdKs.js","./Comments.6z_CzP7-.css","./DSkFztY4.js","./CompareSlider.CRz5J1Um.css","./D_1tWF2a.js","./CompareSliderV2.C145QslM.css","./V6IVJztI.js","./BD5CQ0f-.js","./CounterV2.BVRuYOmx.css","./D3ojorW9.js","./Divider.DQc9qSoX.css","./C6mH8EUP.js","./DrmFlexText.BSP0kcuN.css","./DYn1noL7.js","./BIk35DJ_.js","./ElTableOfContentsItem.CsHR3ZAs.css","./ElTableOfContents.Cy1S8SH9.css","./DWK8scO0.js","./D0bDkto9.js","./V2.BDNaAZEL.css","./ElThreeImages.D-7r-Muf.css","./2EwjOtBN.js","./CR6Rbngt.js","./CGyFmzfa.js","./CNPkVsPS.js","./BU2dbVnH.js","./DIxRGrJO.js","./FeaturedPost.BXo29ti3.css","./BNVmqdin.js","./CHnAzOjX.js","./FeaturedPostInfo.CbWq8hQq.css","./CYpH6nNT.js","./FeaturedPostText.yttlg06f.css","./0BonWXUh.js","./B-3R8G2t.js","./FeaturedPostTitle.D2VQQxnz.css","./MLHzKccQ.js","./FlexText.s-xVGwlm.css","./CwLr99zI.js","./FlipCard.Dx5AyItF.css","./BbBO12lD.js","./D4zIK2eU.js","./Dbftdb9b.js","./Gdpr.BGAiHaXr.css","./BL_8Y2RV.js","./Button.Bb_ulr20.css","./CdyZkjEd.js","./Layout.sv3kyPUJ.css","./Form.CDN1hqx2.css","./CjeLMa2V.js","./BvhdhALP.js","./FormV2.B79w1WjQ.css","./BGYBNJf1.js","./GridCollapse.bfSyG86n.css","./QEMARqXU.js","./GridCollapseV2.D_Nf4ucq.css","./BDVFH7oI.js","./OPZ1EQE_.js","./Icon.BDa3NQA5.css","./B01H4zB0.js","./GridCollapseV3.XK7xqhKD.css","./CVaioMkm.js","./Headline.BxEntuij.css","./CfkvStnU.js","./CbKK8IlM.js","./HeadlineV2.TYBoEItX.css","./BWUchnh5.js","./T8j3wprV.js","./ParagraphV2.5Mo8otNq.css","./IconBox.D58_C3o8.css","./Dx8IFGCv.js","./CtR3cKx-.js","./BKovYRTC.js","./BXZLV6nK.js","./BEyrAXay.js","./CYd7UG8b.js","./CObyp13U.js","./Paragraph.DJOyoaFX.css","./List.CEONbBxT.css","./C0lt5cRE.js","./ListV2.CxA4DbFN.css","./C6mo2kun.js","./Dt-rxKMH.js","./BIguk4Q3.js","./MembersCount.DJOcBlDZ.css","./QsAx-E_k.js","./DPWFATmw.js","./Player.DNDTlDuF.css","./VbMkPLSU.js","./LiveStream.Tfm8al59.css","./IB4TQxae.js","./BSSNzdwr.js","./MediaWrapper.c96dpQG6.css","./XKwkLVLs.js","./BDqVkk9U.js","./KwgBVHAZ.js","./ekn9BgcV.js","./FormWizard.CpR0u-xV.css","./OrderForm.CAZMvWxX.css","./B7Y9LSeE.js","./Cozh1lg9.js","./Bb-53n51.js","./ProgressBarV2.CsFbGTba.css","./Ri_zgebb.js","./Qr.Di1OpY2F.css","./CkyFxg_z.js","./CM9Z8baG.js","./D0lM-lFk.js","./FlyEmojis.DXt2r18R.css","./RealtimeChat.C66v-5XO.css","./BA_qibES.js","./RealtimeChatFirestore.C4hi9iel.css","./COT4ZTZl.js","./RichText.B8FYfvh5.css","./CWIiWYX8.js","./C8vdsVIa.js","./SocialLinks.B4aN_Alp.css","./aCWmUKfY.js","./SocialLinksV2.BAbn8G_k.css","./HxXSdozh.js","./StarRating.D1AkraI7.css","./DNj84Aqf.js","./rt99bgqH.js","./StickySocialShareIcons.BvvOdIil.css","./BzVtziO1.js","./Subheadline.B_k00tWO.css","./BYYAXERi.js","./_A1CZeqN.js","./aCWCzA3g.js","./fJsu0Ijb.js","./BqVluddU.js","./TimeItem1.BrD4FptG.css","./B_Fd-BGD.js","./TimeItem2.Bc3XiwYM.css","./DJG9Xrwx.js","./TimeItem3.DNwCXExs.css","./Cz_st7Je.js","./9-IrZd18.js","./TimeItem4.DYeZOolj.css","./CJztiCZF.js","./TimeItem5.vN4Bj6pn.css","./CGPrvfYA.js","./TimeItem6.CHUER8h1.css","./T8fc7BX3.js","./BdBqGXdF.js","./DNuZo6WB.js","./C_xpPZjs.js","./-q0o4ws3.js","./TimeItemV2.ChTeywNP.css","./BzAuWdO-.js","./C5zyL8ug.js","./TimerV2.Crdbhs9r.css","./DeSl8PoE.js","./Typography.EGYomnrG.css","./BLXYbAxj.js","./Video.C7H0DaHS.css","./PH3nD9mz.js","./Col8tktB.js","./VideoPlaylist.DlAGZ-iz.css","./BGa3uAIb.js","./IR89NCH5.js","./VideoV2.C6E9EioZ.css","./VideoPopup.BoWbmWpX.css","./tHBlo9Tr.js","./VideoPopupV3.Bd77yWiV.css","./DJ_PfpbT.js","./YtShorts.D_x4x2Js.css","./DMFqyLii.js","./AuthorBox.DLQhtcno.css","./DTHRBA0k.js","./Categories.Ca4D1yoT.css","./B-op0bvN.js","./Grid.BbxsYbmM.css","./SXkTSpO7.js","./Search.2PYvlN-s.
1css","./Bej-3spB.js","./d_VideoV2.r4fJGDn6.css","./D2GvjL32.js","./FieldAuth.BMlxTsdM.css","./D81-h5pC.js","./D23O2QxI.js","./Express.BahdIgcS.css","./DcrjQjTF.js","./Element.DxlTssBU.css","./BcZ135KP.js","./DUFu-cE7.js","./x8SFOHF9.js","./Bui8rtkm.js","./FieldCardDetails.BW4SGOHy.css","./DpblQEJe.js","./FieldCheckbox.CHW4r9LL.css","./Cv57gdaz.js","./D31qKqrU.js","./DZn9G31S.js","./F7sHpPqE.js","./PhoneDropdown.BaC8X20Z.css","./BWJbJtfJ.js","./BNwTiDId.js","./DSinNiN2.js","./V9h0cW6W.js","./MenuLink.DxC5lYTV.css","./BT3UbIxE.js","./MenuLinkV3.Bc4xU5KT.css","./a0bLrG0S.js","./CjRS0At8.js","./IA6pZGkE.js","./Tbksbp-v.js","./BxWedE6-.js","./CiwP61Wv.js","./Breadcrumbs.BecRbv0_.css","./zGrBeT9t.js","./Button.Tha4bNIG.css","./VvdyXhKX.js","./CommentsAndLikes.BVzMpf7-.css","./BeOqCXXo.js","./Grid.DeiVE_47.css","./YsOY0skb.js","./Image.D7lyYPxz.css","./MvO4TJYf.js","./List.BK8ZeF9C.css","./DigUD1OL.js","./PostCategories.DL8-Ji0N.css","./CQyO1BQl.js","./PostInfo.DsSRdjac.css","./Dx9CceFn.js","./Text.BrUvdpMO.css","./DWQOShPf.js","./Thumb.Cnnh1oJ0.css","./D1Qcb8ST.js","./Title.CcE7XbBW.css","./D8ahXyE1.js","./DaUx9seF.js","./B3vP2V3D.js","./2EAIfhE8.js","./BIPcfZ1f.js","./OKfbb-p0.js","./Bsw1TAhr.js","./HlsReadyWrapper.Cbq4O6L3.css","./BvMigsmD.js","./CCLLkyQQ.js","./Items5.DlO_tqps.css","./DzCMlmyn.js","./9fp-MTxY.js","./Phone.DVG_Drqx.css","./WfR8JOno.js","./CUSv2qap.js","./CovCY393.js","./ZdN4PNpy.js","./CardExpMonth.RSmzMO-l.css","./BzR4B-1P.js","./CardExpYear.-upwXRPM.css","./D6xtobqm.js","./Bp8EkjoY.js","./PaymentMethod.4uLWioo0.css","./7EpiLa8h.js","./DQVlKNh0.js","./B9CqsbcP.js","./Bn7xawXv.js","./B9wvL4JT.js","./BjfgAI7Y.js","./BJ7gYXaq.js","./ConfigMenu.CtaHFfBH.css","./DKEUAKDf.js","./B83hfRnT.js","./ConfigMenu2.BeviXKUE.css","./Xh7VpZqh.js","./ConfigMenu3.DzNgdz1h.css","./07U34ZdC.js","./EventsLivePlayer5.CN6vYHaZ.css","./DFkFRlXA.js","./BD9Q3ujw.js","./CuoOtGWT.js","./Logo.CwsDazjX.css","./9CCWDhfR.js","./CqX-cACJ.js","./C-5ABQ98.js","./Index.mfgUY_9A.css","./DaPbO9cp.js","./CWYmBeKU.js","./LLHLS.DOopQXI1.css","./7V7WPLjg.js","./D6y5IOzl.js","./C_Lr1dHa.js","./BJHSaV8h.js","./LLHLS3.BmBebqIC.css","./hfcZmhRJ.js","./Bk7sEuPp.js","./DiOoPNWN.js","./Index.CQeiqd2M.css","./B9eUyiVE.js","./Item.BCw7vAB4.css","./WebRTC.q5HesAUU.css","./BuW0loVw.js","./HQoKbGFG.js","./8fpITzH-.js","./Logo.B5YcrAmc.css","./iWlC49ZE.js","./Bl5diYnU.js","./B_tSNzDZ.js","./MenuItems.D1sWlwEX.css","./DIXTnnDz.js","./-NU254rf.js","./V2.C2yzZkOp.css","./DUGnm9J6.js","./K-8VIZH7.js","./Exp.Ddxjr9yz.css","./MFF62AfT.js","./Preview.ywKAfY0F.css","./Ch2sUC-4.js","./B1TVukB2.js","./B8tmy2Ji.js","./CWWEsYIk.js","./D8dtBCRI.js"])))=>i.map(i=>d[i]);
2var cg=Object.defineProperty;var Lc=o=>{throw TypeError(o)};var ug=(o,r,a)=>r in o?cg(o,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[r]=a;var nr=(o,r,a)=>ug(o,typeof r!="symbol"?r+"":r,a),Fc=(o,r,a)=>r.has(o)||Lc("Cannot "+a);var lr=(o,r,a)=>(Fc(o,r,"read from private field"),a?a.call(o):r.get(o)),nn=(o,r,a)=>r.has(o)?Lc("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,a),ki=(o,r,a,l)=>(Fc(o,r,"write to private field"),l?l.call(o,a):r.set(o,a),a);import{_ as __vitePreload,D as Deferred$2,i as isSupportedBrowser}from"./BM5aYONo.js";/**
3* @vue/shared v3.5.13
4* (c) 2018-present Yuxi (Evan) You and Vue contributors
5* @license MIT
6**//*! #__NO_SIDE_EFFECTS__ */function makeMap(o){const r=Object.create(null);for(const a of o.split(","))r[a]=1;return a=>a in r}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=o=>o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&(o.charCodeAt(2)>122||o.charCodeAt(2)<97),isModelListener=o=>o.startsWith("onUpdate:"),extend$1=Object.assign,remove$2=(o,r)=>{const a=o.indexOf(r);a>-1&&o.splice(a,1)},hasOwnProperty$1=Object.prototype.hasOwnProperty,hasOwn=(o,r)=>hasOwnProperty$1.call(o,r),isArray$3=Array.isArray,isMap=o=>toTypeString(o)==="[object Map]",isSet=o=>toTypeString(o)==="[object Set]",isDate$2=o=>toTypeString(o)==="[object Date]",isRegExp=o=>toTypeString(o)==="[object RegExp]",isFunction$1=o=>typeof o=="function",isString$1=o=>typeof o=="string",isSymbol=o=>typeof o=="symbol",isObject$2=o=>o!==null&&typeof o=="object",isPromise$1=o=>(isObject$2(o)||isFunction$1(o))&&isFunction$1(o.then)&&isFunction$1(o.catch),objectToString=Object.prototype.toString,toTypeString=o=>objectToString.call(o),toRawType=o=>toTypeString(o).slice(8,-1),isPlainObject$3=o=>toTypeString(o)==="[object Object]",isIntegerKey=o=>isString$1(o)&&o!=="NaN"&&o[0]!=="-"&&""+parseInt(o,10)===o,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=o=>{const r=Object.create(null);return a=>r[a]||(r[a]=o(a))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(o=>o.replace(camelizeRE,(r,a)=>a?a.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(o=>o.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(o=>o.charAt(0).toUpperCase()+o.slice(1)),toHandlerKey=cacheStringFunction(o=>o?`on${capitalize(o)}`:""),hasChanged=(o,r)=>!Object.is(o,r),invokeArrayFns=(o,...r)=>{for(let a=0;a<o.length;a++)o[a](...r)},def=(o,r,a,l=!1)=>{Object.defineProperty(o,r,{configurable:!0,enumerable:!1,writable:l,value:a})},looseToNumber=o=>{const r=parseFloat(o);return isNaN(r)?o:r},toNumber$2=o=>
vendor: 3,126 bytes, lines 6-9
6{const r=isString$1(o)?Number(o):NaN;return isNaN(r)?o:r};let _globalThis$2;const getGlobalThis=()=>_globalThis$2||(_globalThis$2=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),GLOBALS_ALLOWED="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",isGloballyAllowed=makeMap(GLOBALS_ALLOWED);function normalizeStyle(o){if(isArray$3(o)){const r={};for(let a=0;a<o.length;a++){const l=o[a],c=isString$1(l)?parseStringStyle(l):normalizeStyle(l);if(c)for(const u in c)r[u]=c[u]}return r}else if(isString$1(o)||isObject$2(o))return o}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(o){const r={};return o.replace(styleCommentRE,"").split(listDelimiterRE).forEach(a=>{if(a){const l=a.split(propertyDelimiterRE);l.length>1&&(r[l[0].trim()]=l[1].trim())}}),r}function normalizeClass(o){let r="";if(isString$1(o))r=o;else if(isArray$3(o))for(let a=0;a<o.length;a++){const l=normalizeClass(o[a]);l&&(r+=l+" ")}else if(isObject$2(o))for(const a in o)o[a]&&(r+=a+" ");return r.trim()}function normalizeProps(o){if(!o)return null;let{class:r,style:a}=o;return r&&!isString$1(r)&&(o.class=normalizeClass(r)),a&&(o.style=normalizeStyle(a)),o}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(o){return!!o||o===""}function looseCompareArrays(o,r){if(o.length!==r.length)return!1;let a=!0;for(let l=0;a&&l<o.length;l++)a=looseEqual(o[l],r[l]);return a}function looseEqual(o,r){if(o===r)return!0;let a=isDate$2(o),l=isDate$2(r);if(a||l)return a&&l?o.getTime()===r.getTime():!1;if(a=isSymbol(o),l=isSymbol(r),a||l)return o===r;if(a=isArray$3(o),l=isArray$3(r),a||l)return a&&l?looseCompareArrays(o,r):!1;if(a=isObject$2(o),l=isObject$2(r),a||l){if(!a||!l)return!1;const c=Object.keys(o).length,u=Object.keys(r).length;if(c!==u)return!1;for(const d in o){const f=o.hasOwnProperty(d),m=r.hasOwnProperty(d);if(f&&!m||!f&&m||!looseEqual(o[d],r[d]))return!1}}return String(o)===String(r)}function looseIndexOf(o,r){return o.findIndex(a=>looseEqual(a,r))}const isRef$1=o=>!!(o&&o.__v_isRef===!0),toDisplayString=o=>isString$1(o)?o:o==null?"":isArray$3(o)||isObject$2(o)&&(o.toString===objectToString||!isFunction$1(o.toString))?isRef$1(o)?toDisplayString(o.value):JSON.stringify(o,replacer,2):String(o),replacer=(o,r)=>isRef$1(r)?replacer(o,r.value):isMap(r)?{[`Map(${r.size})`]:[...r.entries()].reduce((a,[l,c],u)=>(a[stringifySymbol(l,u)+" =>"]=c,a),{})}:isSet(r)?{[`Set(${r.size})`]:[...r.values()].map(a=>stringifySymbol(a))}:isSymbol(r)?stringifySymbol(r):isObject$2(r)&&!isArray$3(r)&&!isPlainObject$3(r)?String(r):r,stringifySymbol=(o,r="")=>{var a;return isSymbol(o)?`Symbol(${(a=o.description)!=null?a:r})`:o};/**
7* @vue/reactivity v3.5.13
8* (c) 2018-present Yuxi (Evan) You and Vue contributors
9* @license MIT
vendor: 11,300 bytes, line 10
10**/let activeEffectScope;class EffectScope{constructor(r=!1){this.detached=r,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!r&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let r,a;if(this.scopes)for(r=0,a=this.scopes.length;r<a;r++)this.scopes[r].pause();for(r=0,a=this.effects.length;r<a;r++)this.effects[r].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let r,a;if(this.scopes)for(r=0,a=this.scopes.length;r<a;r++)this.scopes[r].resume();for(r=0,a=this.effects.length;r<a;r++)this.effects[r].resume()}}run(r){if(this._active){const a=activeEffectScope;try{return activeEffectScope=this,r()}finally{activeEffectScope=a}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(r){if(this._active){this._active=!1;let a,l;for(a=0,l=this.effects.length;a<l;a++)this.effects[a].stop();for(this.effects.length=0,a=0,l=this.cleanups.length;a<l;a++)this.cleanups[a]();if(this.cleanups.length=0,this.scopes){for(a=0,l=this.scopes.length;a<l;a++)this.scopes[a].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!r){const c=this.parent.scopes.pop();c&&c!==this&&(this.parent.scopes[this.index]=c,c.index=this.index)}this.parent=void 0}}}function effectScope(o){return new EffectScope(o)}function getCurrentScope(){return activeEffectScope}function onScopeDispose(o,r=!1){activeEffectScope&&activeEffectScope.cleanups.push(o)}let activeSub;const pausedQueueEffects=new WeakSet;class ReactiveEffect{constructor(r){this.fn=r,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,activeEffectScope&&activeEffectScope.active&&activeEffectScope.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,pausedQueueEffects.has(this)&&(pausedQueueEffects.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||batch(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,cleanupEffect(this),prepareDeps(this);const r=activeSub,a=shouldTrack;activeSub=this,shouldTrack=!0;try{return this.fn()}finally{cleanupDeps(this),activeSub=r,shouldTrack=a,this.flags&=-3}}stop(){if(this.flags&1){for(let r=this.deps;r;r=r.nextDep)removeSub(r);this.deps=this.depsTail=void 0,cleanupEffect(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pausedQueueEffects.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){isDirty(this)&&this.run()}get dirty(){return isDirty(this)}}let batchDepth=0,batchedSub,batchedComputed;function batch(o,r=!1){if(o.flags|=8,r){o.next=batchedComputed,batchedComputed=o;return}o.next=batchedSub,batchedSub=o}function startBatch(){batchDepth++}function endBatch(){if(--batchDepth>0)return;if(batchedComputed){let r=batchedComputed;for(batchedComputed=void 0;r;){const a=r.next;r.next=void 0,r.flags&=-9,r=a}}let o;for(;batchedSub;){let r=batchedSub;for(batchedSub=void 0;r;){const a=r.next;if(r.next=void 0,r.flags&=-9,r.flags&1)try{r.trigger()}catch(l){o||(o=l)}r=a}}if(o)throw o}function prepareDeps(o){for(let r=o.deps;r;r=r.nextDep)r.version=-1,r.prevActiveLink=r.dep.activeLink,r.dep.activeLink=r}function cleanupDeps(o){let r,a=o.depsTail,l=a;for(;l;){const c=l.prevDep;l.version===-1?(l===a&&(a=c),removeSub(l),removeDep(l)):r=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=c}o.deps=r,o.depsTail=a}function isDirty(o){for(let r=o.deps;r;r=r.nextDep)if(r.dep.version!==r.version||r.dep.computed&&(refreshComputed(r.dep.computed)||r.dep.version!==r.version))return!0;return!!o._dirty}function refreshComputed(o){if(o.flags&4&&!(o.flags&16)||(o.flags&=-17,o.globalVersion===globalVersion))return;o.globalVersion=globalVersion;const r=o.dep;if(o.flags|=2,r.version>0&&!o.isSSR&&o.deps&&!isDirty(o)){o.flags&=-3;return}const a=activeSub,l=shouldTrack;activeSub=o,shouldTrack=!0;try{prepareDeps(o);const c=o.fn(o._value);(r.version===0||hasChanged(c,o._value))&&(o._value=c,r.version++)}catch(c){throw r.version++,c}finally{activeSub=a,shouldTrack=l,cleanupDeps(o),o.flags&=-3}}function removeSub(o,r=!1){const{dep:a,prevSub:l,nextSub:c}=o;if(l&&(l.nextSub=c,o.prevSub=void 0),c&&(c.prevSub=l,o.nextSub=void 0),a.subs===o&&(a.subs=l,!l&&a.computed)){a.computed.flags&=-5;for(let u=a.computed.deps;u;u=u.nextDep)removeSub(u,!0)}!r&&!--a.sc&&a.map&&a.map.delete(a.key)}function removeDep(o){const{prevDep:r,nextDep:a}=o;r&&(r.nextDep=a,o.prevDep=void 0),a&&(a.prevDep=r,o.nextDep=void 0)}function effect(o,r){o.effect instanceof ReactiveEffect&&(o=o.effect.fn);const a=new ReactiveEffect(o);r&&extend$1(a,r);try{a.run()}catch(c){throw a.stop(),c}const l=a.run.bind(a);return l.effect=a,l}function stop(o){o.effect.stop()}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const o=trackStack.pop();shouldTrack=o===void 0?!0:o}function cleanupEffect(o){const{cleanup:r}=o;if(o.cleanup=void 0,r){const a=activeSub;activeSub=void 0;try{r()}finally{activeSub=a}}}let globalVersion=0,Link$1=class{constructor(r,a){this.sub=r,this.dep=a,this.version=a.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class Dep{constructor(r){this.computed=r,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(r){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let a=this.activeLink;if(a===void 0||a.sub!==activeSub)a=this.activeLink=new Link$1(activeSub,this),activeSub.deps?(a.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=a,activeSub.depsTail=a):activeSub.deps=activeSub.depsTail=a,addSub(a);else if(a.version===-1&&(a.version=this.version,a.nextDep)){const l=a.nextDep;l.prevDep=a.prevDep,a.prevDep&&(a.prevDep.nextDep=l),a.prevDep=activeSub.depsTail,a.nextDep=void 0,activeSub.depsTail.nextDep=a,activeSub.depsTail=a,activeSub.deps===a&&(activeSub.deps=l)}return a}trigger(r){this.version++,globalVersion++,this.notify(r)}notify(r){startBatch();try{for(let a=this.subs;a;a=a.prevSub)a.sub.notify()&&a.sub.dep.notify()}finally{endBatch()}}}function addSub(o){if(o.dep.sc++,o.sub.flags&4){const r=o.dep.computed;if(r&&!o.dep.subs){r.flags|=20;for(let l=r.deps;l;l=l.nextDep)addSub(l)}const a=o.dep.subs;a!==o&&(o.prevSub=a,a&&(a.nextSub=o)),o.dep.subs=o}}const targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol(""),ARRAY_ITERATE_KEY=Symbol("");function track(o,r,a){if(shouldTrack&&activeSub){let l=targetMap.get(o);l||targetMap.set(o,l=new Map);let c=l.get(a);c||(l.set(a,c=new Dep),c.map=l,c.key=a),c.track()}}function trigger(o,r,a,l,c,u){const d=targetMap.get(o);if(!d){globalVersion++;return}const f=m=>{m&&m.trigger()};if(startBatch(),r==="clear")d.forEach(f);else{const m=isArray$3(o),y=m&&isIntegerKey(a);if(m&&a==="length"){const E=Number(l);d.forEach((A,P)=>{(P==="length"||P===ARRAY_ITERATE_KEY||!isSymbol(P)&&P>=E)&&f(A)})}else switch((a!==void 0||d.has(void 0))&&f(d.get(a)),y&&f(d.get(ARRAY_ITERATE_KEY)),r){case"add":m?y&&f(d.get("length")):(f(d.get(ITERATE_KEY)),isMap(o)&&f(d.get(MAP_KEY_ITERATE_KEY)));break;case"delete":m||(f(d.get(ITERATE_KEY)),isMap(o)&&f(d.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(o)&&f(d.get(ITERATE_KEY));break}}endBatch()}function getDepFromReactive(o,r){const a=targetMap.get(o);return a&&a.get(r)}function reactiveReadArray(o){const r=toRaw(o);return r===o?r:(track(r,"iterate",ARRAY_ITERATE_KEY),isShallow(o)?r:r.map(toReactive))}function shallowReadArray(o){return track(o=toRaw(o),"iterate",ARRAY_ITERATE_KEY),o}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator(this,Symbol.iterator,toReactive)},concat(...o){return reactiveReadArray(this).concat(...o.map(r=>isArray$3(r)?reactiveReadArray(r):r))},entries(){return iterator(this,"entries",o=>(o[1]=toReactive(o[1]),o))},every(o,r){return apply(this,"every",o,r,void 0,arguments)},filter(o,r){return apply(this,"filter",o,r,a=>a.map(toReactive),arguments)},find(o,r){return apply(this,"find",o,r,toReactive,arguments)},findIndex(o,r){return apply(this,"findIndex",o,r,void 0,arguments)},findLast(o,r){return apply(this,"findLast",o,r,toReactive,arguments)},findLastIndex(o,r){return apply(this,"findLastIndex",o,r,void 0,arguments)},forEach(o,r){return apply(this,"forEach",o,r,void 0,arguments)},includes(...o){return searchProxy(this,"includes",o)},indexOf(...o){return searchProxy(this,"indexOf",o)},join(o){return reactiveReadArray(this).join(o)},lastIndexOf(...o){return searchProxy(this,"lastIndexOf",o)},map(o,r){return apply(this,"map",o,r,void 0,arguments)},pop(){return noTracking(this,"pop")},push(...o){return noTracking(this,"push",o)},reduce(o,...r){return reduce(this,"reduce",o,r)},reduceRight(o,...r){return reduce(this,"reduceRight",o,r)},shift(){return noTracking(this,"shift")},some(o,r){return apply(this,"some",o,r,void 0,arguments)},splice(...o){return noTracking(this,"splice",o)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(o){return reactiveReadArray(this).toSorted(o)},toSpliced(...o){return reactiveReadArray(this).toSpliced(...o)},unshift(...o){return noTracking(this,"unshift",o)},values(){return iterator(this,"values",toReactive)}};function iterator(o,r,a){const l=shallowReadArray(o),c=l[r]();return l!==o&&!isShallow(o)&&(c._next=c.next,c.next=()=>{const u=c._next();return u.value&&(u.value=a(u.value)),u}),c}const arrayProto=Array.prototype;function apply(o,r,a,l,c,u){const d=shallowReadArray(o),f=d!==o&&!isShallow(o),m=d[r];if(m!==arrayProto[r]){const A=m.apply(o,u);return f?toReactive(A):A}let y=a;d!==o&&(f?y=function(A,P){return a.call(this,toReactive(A),P,o)}:a.length>2&&(y=function(A,P){return a.call(this,A,P,o)}));const E=m.call(d,y,l);return f&&c?c(E):E}function reduce(o,r,a,l){const c=shallowReadArray(o);let u=a;return c!==o&&(isShallow(o)?a.length>3&&(u=function(d,f,m){return a.call(this,d,f,m,o)}):u=function(d,f,m){return a.call(this,d,toReactive(f),m,o)}),c[r](u,...l)}function searchProxy(o,r,a){const l=toRaw(o);track(l,"iterate",ARRAY_ITERATE_KEY);const c=l[r](...a);return(c===-1||c===!1)&&isProxy(a[0])?(a[0]=toRaw(a[0]),l[r](...a)):c}function noTracking(o,r,a=[]){pauseTracking(),startBatch();const l=toRaw(o)[r].apply(o,a);return endBatch(),resetTracking(),l}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(o=>o!=="arguments"&&o!=="caller").map(o=>Symbol[o]).filter(isSymbol));function hasOwnProperty(o){isSymbol(o)||(o=String(o));const r=toRaw(this);return track(r,"has",o),r.hasOwnProperty(o)}class BaseReactiveHandler{constructor(r=!1,a=!1){this._isReadonly=r,this._isShallow=a}get(r,a,l){if(a==="__v_skip")return r.__v_skip;const c=this._isReadonly,u=this._isShallow;if(a==="__v_isReactive")return!c;if(a==="__v_isReadonly")return c;if(a==="__v_isShallow")return u;if(a==="__v_raw")return l===(c?u?shallowReadonlyMap:readonlyMap:u?shallowReactiveMap:reactiveMap).get(r)||Object.getPrototypeOf(r)===Object.getPrototypeOf(l)?r:void 0;const d=isArray$3(r);if(!c){let m;if(d&&(m=arrayInstrumentations[a]))return m;if(a==="hasOwnProperty")return hasOwnProperty}const f=Reflect.get(r,a,isRef(r)?r:l);
vendor: 2,412 bytes, line 10
10return(isSymbol(a)?builtInSymbols.has(a):isNonTrackableKeys(a))||(c||track(r,"get",a),u)?f:isRef(f)?d&&isIntegerKey(a)?f:f.value:isObject$2(f)?c?readonly(f):reactive(f):f}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(r=!1){super(!1,r)}set(r,a,l,c){let u=r[a];if(!this._isShallow){const m=isReadonly(u);if(!isShallow(l)&&!isReadonly(l)&&(u=toRaw(u),l=toRaw(l)),!isArray$3(r)&&isRef(u)&&!isRef(l))return m?!1:(u.value=l,!0)}const d=isArray$3(r)&&isIntegerKey(a)?Number(a)<r.length:hasOwn(r,a),f=Reflect.set(r,a,l,isRef(r)?r:c);return r===toRaw(c)&&(d?hasChanged(l,u)&&trigger(r,"set",a,l):trigger(r,"add",a,l)),f}deleteProperty(r,a){const l=hasOwn(r,a);r[a];const c=Reflect.deleteProperty(r,a);return c&&l&&trigger(r,"delete",a,void 0),c}has(r,a){const l=Reflect.has(r,a);return(!isSymbol(a)||!builtInSymbols.has(a))&&track(r,"has",a),l}ownKeys(r){return track(r,"iterate",isArray$3(r)?"length":ITERATE_KEY),Reflect.ownKeys(r)}}class ReadonlyReactiveHandler extends BaseReactiveHandler{constructor(r=!1){super(!0,r)}set(r,a){return!0}deleteProperty(r,a){return!0}}const mutableHandlers=new MutableReactiveHandler,readonlyHandlers=new ReadonlyReactiveHandler,shallowReactiveHandlers=new MutableReactiveHandler(!0),shallowReadonlyHandlers=new ReadonlyReactiveHandler(!0),toShallow=o=>o,getProto=o=>Reflect.getPrototypeOf(o);function createIterableMethod(o,r,a){return function(...l){const c=this.__v_raw,u=toRaw(c),d=isMap(u),f=o==="entries"||o===Symbol.iterator&&d,m=o==="keys"&&d,y=c[o](...l),E=a?toShallow:r?toReadonly:toReactive;return!r&&track(u,"iterate",m?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:A,done:P}=y.next();return P?{value:A,done:P}:{value:f?[E(A[0]),E(A[1])]:E(A),done:P}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(o){return function(...r){return o==="delete"?!1:o==="clear"?void 0:this}}function createInstrumentations(o,r){const a={get(c){const u=this.__v_raw,d=toRaw(u),f=toRaw(c);o||(hasChanged(c,f)&&track(d,"get",c),track(d,"get",f));const{has:m}=getProto(d),y=r?toShallow:o?toReadonly:toReactive;if(m.call(d,c))return y(u.get(c));if(m.call(d,f))return y(u.get(f));u!==d&&u.get(c)},get size(){const c=this.__v_raw;return!o&&track(toRaw(c),"iterate",ITERATE_KEY),Reflect.get(c,"size",c)},has(c){const u=this.__v_raw,d=toRaw(u),f=toRaw(c);return o||(hasChanged(c,f)&&track(d,"has",c),track(d,"has",f)),c===f?u.has(c):u.has(c)||u.has(f)}
vendor: 8,357 bytes, lines 10-13
10,forEach(c,u){const d=this,f=d.__v_raw,m=toRaw(f),y=r?toShallow:o?toReadonly:toReactive;return!o&&track(m,"iterate",ITERATE_KEY),f.forEach((E,A)=>c.call(u,y(E),y(A),d))}};return extend$1(a,o?{add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear")}:{add(c){!r&&!isShallow(c)&&!isReadonly(c)&&(c=toRaw(c));const u=toRaw(this);return getProto(u).has.call(u,c)||(u.add(c),trigger(u,"add",c,c)),this},set(c,u){!r&&!isShallow(u)&&!isReadonly(u)&&(u=toRaw(u));const d=toRaw(this),{has:f,get:m}=getProto(d);let y=f.call(d,c);y||(c=toRaw(c),y=f.call(d,c));const E=m.call(d,c);return d.set(c,u),y?hasChanged(u,E)&&trigger(d,"set",c,u):trigger(d,"add",c,u),this},delete(c){const u=toRaw(this),{has:d,get:f}=getProto(u);let m=d.call(u,c);m||(c=toRaw(c),m=d.call(u,c)),f&&f.call(u,c);const y=u.delete(c);return m&&trigger(u,"delete",c,void 0),y},clear(){const c=toRaw(this),u=c.size!==0,d=c.clear();return u&&trigger(c,"clear",void 0,void 0),d}}),["keys","values","entries",Symbol.iterator].forEach(c=>{a[c]=createIterableMethod(c,o,r)}),a}function createInstrumentationGetter(o,r){const a=createInstrumentations(o,r);return(l,c,u)=>c==="__v_isReactive"?!o:c==="__v_isReadonly"?o:c==="__v_raw"?l:Reflect.get(hasOwn(a,c)&&c in l?a:l,c,u)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(o){switch(o){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(o){return o.__v_skip||!Object.isExtensible(o)?0:targetTypeMap(toRawType(o))}function reactive(o){return isReadonly(o)?o:createReactiveObject(o,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(o){return createReactiveObject(o,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(o){return createReactiveObject(o,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(o){return createReactiveObject(o,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(o,r,a,l,c){if(!isObject$2(o)||o.__v_raw&&!(r&&o.__v_isReactive))return o;const u=c.get(o);if(u)return u;const d=getTargetType(o);if(d===0)return o;const f=new Proxy(o,d===2?l:a);return c.set(o,f),f}function isReactive(o){return isReadonly(o)?isReactive(o.__v_raw):!!(o&&o.__v_isReactive)}function isReadonly(o){return!!(o&&o.__v_isReadonly)}function isShallow(o){return!!(o&&o.__v_isShallow)}function isProxy(o){return o?!!o.__v_raw:!1}function toRaw(o){const r=o&&o.__v_raw;return r?toRaw(r):o}function markRaw(o){return!hasOwn(o,"__v_skip")&&Object.isExtensible(o)&&def(o,"__v_skip",!0),o}const toReactive=o=>isObject$2(o)?reactive(o):o,toReadonly=o=>isObject$2(o)?readonly(o):o;function isRef(o){return o?o.__v_isRef===!0:!1}function ref$1(o){return createRef(o,!1)}function shallowRef(o){return createRef(o,!0)}function createRef(o,r){return isRef(o)?o:new RefImpl(o,r)}class RefImpl{constructor(r,a){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=a?r:toRaw(r),this._value=a?r:toReactive(r),this.__v_isShallow=a}get value(){return this.dep.track(),this._value}set value(r){const a=this._rawValue,l=this.__v_isShallow||isShallow(r)||isReadonly(r);r=l?r:toRaw(r),hasChanged(r,a)&&(this._rawValue=r,this._value=l?r:toReactive(r),this.dep.trigger())}}function triggerRef(o){o.dep&&o.dep.trigger()}function unref(o){return isRef(o)?o.value:o}function toValue(o){return isFunction$1(o)?o():unref(o)}const shallowUnwrapHandlers={get:(o,r,a)=>r==="__v_raw"?o:unref(Reflect.get(o,r,a)),set:(o,r,a,l)=>{const c=o[r];return isRef(c)&&!isRef(a)?(c.value=a,!0):Reflect.set(o,r,a,l)}};function proxyRefs(o){return isReactive(o)?o:new Proxy(o,shallowUnwrapHandlers)}class CustomRefImpl{constructor(r){this.__v_isRef=!0,this._value=void 0;const a=this.dep=new Dep,{get:l,set:c}=r(a.track.bind(a),a.trigger.bind(a));this._get=l,this._set=c}get value(){return this._value=this._get()}set value(r){this._set(r)}}function customRef(o){return new CustomRefImpl(o)}function toRefs(o){const r=isArray$3(o)?new Array(o.length):{};for(const a in o)r[a]=propertyToRef(o,a);return r}class ObjectRefImpl{constructor(r,a,l){this._object=r,this._key=a,this._defaultValue=l,this.__v_isRef=!0,this._value=void 0}get value(){const r=this._object[this._key];return this._value=r===void 0?this._defaultValue:r}set value(r){this._object[this._key]=r}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}class GetterRefImpl{constructor(r){this._getter=r,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function toRef(o,r,a){return isRef(o)?o:isFunction$1(o)?new GetterRefImpl(o):isObject$2(o)&&arguments.length>1?propertyToRef(o,r,a):ref$1(o)}function propertyToRef(o,r,a){const l=o[r];return isRef(l)?l:new ObjectRefImpl(o,r,a)}class ComputedRefImpl{constructor(r,a,l){this.fn=r,this.setter=a,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!a,this.isSSR=l}notify(){if(this.flags|=16,!(this.flags&8)&&activeSub!==this)return batch(this,!0),!0}get value(){const r=this.dep.track();return refreshComputed(this),r&&(r.version=this.dep.version),this._value}set value(r){this.setter&&this.setter(r)}}function computed$1(o,r,a=!1){let l,c;return isFunction$1(o)?l=o:(l=o.get,c=o.set),new ComputedRefImpl(l,c,a)}const TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function getCurrentWatcher(){return activeWatcher}function onWatcherCleanup(o,r=!1,a=activeWatcher){if(a){let l=cleanupMap.get(a);l||cleanupMap.set(a,l=[]),l.push(o)}}function watch$1(o,r,a=EMPTY_OBJ){const{immediate:l,deep:c,once:u,scheduler:d,augmentJob:f,call:m}=a,y=L=>c?L:isShallow(L)||c===!1||c===0?traverse(L,1):traverse(L);let E,A,P,R,x=!1,M=!1;if(isRef(o)?(A=()=>o.value,x=isShallow(o)):isReactive(o)?(A=()=>y(o),x=!0):isArray$3(o)?(M=!0,x=o.some(L=>isReactive(L)||isShallow(L)),A=()=>o.map(L=>{if(isRef(L))return L.value;if(isReactive(L))return y(L);if(isFunction$1(L))return m?m(L,2):L()})):isFunction$1(o)?r?A=m?()=>m(o,2):o:A=()=>{if(P){pauseTracking();try{P()}finally{resetTracking()}}const L=activeWatcher;activeWatcher=E;try{return m?m(o,3,[R]):o(R)}finally{activeWatcher=L}}:A=NOOP,r&&c){const L=A,F=c===!0?1/0:c;A=()=>traverse(L(),F)}const $=getCurrentScope(),V=()=>{E.stop(),$&&$.active&&remove$2($.effects,E)};if(u&&r){const L=r;r=(...F)=>{L(...F),V()}}let B=M?new Array(o.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const O=L=>{if(!(!(E.flags&1)||!E.dirty&&!L))if(r){const F=E.run();if(c||x||(M?F.some((j,U)=>hasChanged(j,B[U])):hasChanged(F,B))){P&&P();const j=activeWatcher;activeWatcher=E;try{const U=[F,B===INITIAL_WATCHER_VALUE?void 0:M&&B[0]===INITIAL_WATCHER_VALUE?[]:B,R];m?m(r,3,U):r(...U),B=F}finally{activeWatcher=j}}}else E.run()};return f&&f(O),E=new ReactiveEffect(A),E.scheduler=d?()=>d(O,!1):O,R=L=>onWatcherCleanup(L,!1,E),P=E.onStop=()=>{const L=cleanupMap.get(E);if(L){if(m)m(L,4);else for(const F of L)F();cleanupMap.delete(E)}},r?l?O(!0):B=E.run():d?d(O.bind(null,!0),!0):E.run(),V.pause=E.pause.bind(E),V.resume=E.resume.bind(E),V.stop=V,V}function traverse(o,r=1/0,a){if(r<=0||!isObject$2(o)||o.__v_skip||(a=a||new Set,a.has(o)))return o;if(a.add(o),r--,isRef(o))traverse(o.value,r,a);else if(isArray$3(o))for(let l=0;l<o.length;l++)traverse(o[l],r,a);else if(isSet(o)||isMap(o))o.forEach(l=>{traverse(l,r,a)});else if(isPlainObject$3(o)){for(const l in o)traverse(o[l],r,a);for(const l of Object.getOwnPropertySymbols(o))Object.prototype.propertyIsEnumerable.call(o,l)&&traverse(o[l],r,a)}return o}/**
11* @vue/runtime-core v3.5.13
12* (c) 2018-present Yuxi (Evan) You and Vue contributors
13* @license MIT
vendor: 4,979 bytes, lines 14-17
14**/const stack=[];function pushWarningContext(o){stack.push(o)}function popWarningContext(){stack.pop()}let isWarning=!1;function warn$1$1(o,...r){if(isWarning)return;isWarning=!0,pauseTracking();const a=stack.length?stack[stack.length-1].component:null,l=a&&a.appContext.config.warnHandler,c=getComponentTrace();if(l)callWithErrorHandling(l,a,11,[o+r.map(u=>{var d,f;return(f=(d=u.toString)==null?void 0:d.call(u))!=null?f:JSON.stringify(u)}).join(""),a&&a.proxy,c.map(({vnode:u})=>`at <${formatComponentName(a,u.type)}>`).join(`
15`),c]);else{const u=[`[Vue warn]: ${o}`,...r];c.length&&u.push(`
16`,...formatTrace(c)),console.warn(...u)}resetTracking(),isWarning=!1}function getComponentTrace(){let o=stack[stack.length-1];if(!o)return[];const r=[];for(;o;){const a=r[0];a&&a.vnode===o?a.recurseCount++:r.push({vnode:o,recurseCount:0});const l=o.component&&o.component.parent;o=l&&l.vnode}return r}function formatTrace(o){const r=[];return o.forEach((a,l)=>{r.push(...l===0?[]:[`
17`],...formatTraceEntry(a))}),r}function formatTraceEntry({vnode:o,recurseCount:r}){const a=r>0?`... (${r} recursive calls)`:"",l=o.component?o.component.parent==null:!1,c=` at <${formatComponentName(o.component,o.type,l)}`,u=">"+a;return o.props?[c,...formatProps(o.props),u]:[c+u]}function formatProps(o){const r=[],a=Object.keys(o);return a.slice(0,3).forEach(l=>{r.push(...formatProp(l,o[l]))}),a.length>3&&r.push(" ..."),r}function formatProp(o,r,a){return isString$1(r)?(r=JSON.stringify(r),a?r:[`${o}=${r}`]):typeof r=="number"||typeof r=="boolean"||r==null?a?r:[`${o}=${r}`]:isRef(r)?(r=formatProp(o,toRaw(r.value),!0),a?r:[`${o}=Ref<`,r,">"]):isFunction$1(r)?[`${o}=fn${r.name?`<${r.name}>`:""}`]:(r=toRaw(r),a?r:[`${o}=`,r])}function assertNumber(o,r){}const ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},ErrorTypeStrings$1={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function callWithErrorHandling(o,r,a,l){try{return l?o(...l):o()}catch(c){handleError$2(c,r,a)}}function callWithAsyncErrorHandling(o,r,a,l){if(isFunction$1(o)){const c=callWithErrorHandling(o,r,a,l);return c&&isPromise$1(c)&&c.catch(u=>{handleError$2(u,r,a)}),c}if(isArray$3(o)){const c=[];for(let u=0;u<o.length;u++)c.push(callWithAsyncErrorHandling(o[u],r,a,l));return c}}function handleError$2(o,r,a,l=!0){const c=r?r.vnode:null,{errorHandler:u,throwUnhandledErrorInProduction:d}=r&&r.appContext.config||EMPTY_OBJ;if(r){let f=r.parent;const m=r.proxy,y=`https://vuejs.org/error-reference/#runtime-${a}`;for(;f;){const E=f.ec;if(E){for(let A=0;A<E.length;A++)if(E[A](o,m,y)===!1)return}f=f.parent}if(u){pauseTracking(),callWithErrorHandling(u,null,10,[o,m,y]),resetTracking();return}}logError(o,a,c,l,d)}function logError(o,r,a,l=!0,c=!1){if(c)throw o;console.error(o)}const queue=[];let flushIndex=-1;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick(o){const r=currentFlushPromise||resolvedPromise;return o?r.then(this?o.bind(this):o):r}function findInsertionIndex$1(o){let r=flushIndex+1,a=queue.length;for(;r<a;){const l=r+a>>>1,c=queue[l],u=getId(c);u<o||u===o&&c.flags&2?r=l+1:a=l}return r}function queueJob(o){if(!(o.flags&1)){const r=getId(o),a=queue[queue.length-1];!a||!(o.flags&2)&&r>=getId(a)?queue.push(o):queue.splice(findInsertionIndex$1(r),0,o),o.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||(currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(o){isArray$3(o)?pendingPostFlushCbs.push(...o):activePostFlushCbs&&o.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,o):o.flags&1||(pendingPostFlushCbs.push(o),o.flags|=1),queueFlush()}function flushPreFlushCbs(o,r,a=flushIndex+1){for(;a<queue.length;a++){const l=queue[a];if(l&&l.flags&2){if(o&&l.id!==o.uid)continue;
vendor: 37,037 bytes, lines 17-18
17queue.splice(a,1),a--,l.flags&4&&(l.flags&=-2),l(),l.flags&4||(l.flags&=-2)}}}function flushPostFlushCbs(o){if(pendingPostFlushCbs.length){const r=[...new Set(pendingPostFlushCbs)].sort((a,l)=>getId(a)-getId(l));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...r);return}for(activePostFlushCbs=r,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){const a=activePostFlushCbs[postFlushIndex];a.flags&4&&(a.flags&=-2),a.flags&8||a(),a.flags&=-2}activePostFlushCbs=null,postFlushIndex=0}}const getId=o=>o.id==null?o.flags&2?-1:1/0:o.id;function flushJobs(o){try{for(flushIndex=0;flushIndex<queue.length;flushIndex++){const r=queue[flushIndex];r&&!(r.flags&8)&&(r.flags&4&&(r.flags&=-2),callWithErrorHandling(r,r.i,r.i?15:14),r.flags&4||(r.flags&=-2))}}finally{for(;flushIndex<queue.length;flushIndex++){const r=queue[flushIndex];r&&(r.flags&=-2)}flushIndex=-1,queue.length=0,flushPostFlushCbs(),currentFlushPromise=null,(queue.length||pendingPostFlushCbs.length)&&flushJobs()}}let devtools$1,buffer=[];function setDevtoolsHook$1(o,r){var a,l;devtools$1=o,devtools$1?(devtools$1.enabled=!0,buffer.forEach(({event:c,args:u})=>devtools$1.emit(c,...u)),buffer=[]):typeof window<"u"&&window.HTMLElement&&!((l=(a=window.navigator)==null?void 0:a.userAgent)!=null&&l.includes("jsdom"))?((r.__VUE_DEVTOOLS_HOOK_REPLAY__=r.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(u=>{setDevtoolsHook$1(u,r)}),setTimeout(()=>{devtools$1||(r.__VUE_DEVTOOLS_HOOK_REPLAY__=null,buffer=[])},3e3)):buffer=[]}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(o){const r=currentRenderingInstance;return currentRenderingInstance=o,currentScopeId=o&&o.type.__scopeId||null,r}function pushScopeId(o){currentScopeId=o}function popScopeId(){currentScopeId=null}const withScopeId=o=>withCtx;function withCtx(o,r=currentRenderingInstance,a){if(!r||o._n)return o;const l=(...c)=>{l._d&&setBlockTracking(-1);const u=setCurrentRenderingInstance(r);let d;try{d=o(...c)}finally{setCurrentRenderingInstance(u),l._d&&setBlockTracking(1)}return d};return l._n=!0,l._c=!0,l._d=!0,l}function withDirectives(o,r){if(currentRenderingInstance===null)return o;const a=getComponentPublicInstance(currentRenderingInstance),l=o.dirs||(o.dirs=[]);for(let c=0;c<r.length;c++){let[u,d,f,m=EMPTY_OBJ]=r[c];u&&(isFunction$1(u)&&(u={mounted:u,updated:u}),u.deep&&traverse(d),l.push({dir:u,instance:a,value:d,oldValue:void 0,arg:f,modifiers:m}))}return o}function invokeDirectiveHook(o,r,a,l){const c=o.dirs,u=r&&r.dirs;for(let d=0;d<c.length;d++){const f=c[d];u&&(f.oldValue=u[d].value);let m=f.dir[l];m&&(pauseTracking(),callWithAsyncErrorHandling(m,a,8,[o.el,f,o,r]),resetTracking())}}const TeleportEndKey=Symbol("_vte"),isTeleport=o=>o.__isTeleport,isTeleportDisabled=o=>o&&(o.disabled||o.disabled===""),isTeleportDeferred=o=>o&&(o.defer||o.defer===""),isTargetSVG=o=>typeof SVGElement<"u"&&o instanceof SVGElement,isTargetMathML=o=>typeof MathMLElement=="function"&&o instanceof MathMLElement,resolveTarget=(o,r)=>{const a=o&&o.to;return isString$1(a)?r?r(a):null:a},TeleportImpl={name:"Teleport",__isTeleport:!0,process(o,r,a,l,c,u,d,f,m,y){const{mc:E,pc:A,pbc:P,o:{insert:R,querySelector:x,createText:M,createComment:$}}=y,V=isTeleportDisabled(r.props);let{shapeFlag:B,children:O,dynamicChildren:L}=r;if(o==null){const F=r.el=M(""),j=r.anchor=M("");R(F,a,l),R(j,a,l);const U=(Y,te)=>{B&16&&(c&&c.isCE&&(c.ce._teleportTarget=Y),E(O,Y,te,c,u,d,f,m))},G=()=>{const Y=r.target=resolveTarget(r.props,x),te=prepareAnchor(Y,r,M,R);Y&&(d!=="svg"&&isTargetSVG(Y)?d="svg":d!=="mathml"&&isTargetMathML(Y)&&(d="mathml"),V||(U(Y,te),updateCssVars(r,!1)))};V&&(U(a,j),updateCssVars(r,!0)),isTeleportDeferred(r.props)?queuePostRenderEffect(()=>{G(),r.el.__isMounted=!0},u):G()}else{if(isTeleportDeferred(r.props)&&!o.el.__isMounted){queuePostRenderEffect(()=>{TeleportImpl.process(o,r,a,l,c,u,d,f,m,y),delete o.el.__isMounted},u);return}r.el=o.el,r.targetStart=o.targetStart;const F=r.anchor=o.anchor,j=r.target=o.target,U=r.targetAnchor=o.targetAnchor,G=isTeleportDisabled(o.props),Y=G?a:j,te=G?F:U;if(d==="svg"||isTargetSVG(j)?d="svg":(d==="mathml"||isTargetMathML(j))&&(d="mathml"),L?(P(o.dynamicChildren,L,Y,c,u,d,f),traverseStaticChildren(o,r,!0)):m||A(o,r,Y,te,c,u,d,f,!1),V)G?r.props&&o.props&&r.props.to!==o.props.to&&(r.props.to=o.props.to):moveTeleport(r,a,F,y,1);else if((r.props&&r.props.to)!==(o.props&&o.props.to)){const ve=r.target=resolveTarget(r.props,x);ve&&moveTeleport(r,ve,null,y,0)}else G&&moveTeleport(r,j,U,y,1);updateCssVars(r,V)}},remove(o,r,a,{um:l,o:{remove:c}},u){const{shapeFlag:d,children:f,anchor:m,targetStart:y,targetAnchor:E,target:A,props:P}=o;if(A&&(c(y),c(E)),u&&c(m),d&16){const R=u||!isTeleportDisabled(P);for(let x=0;x<f.length;x++){const M=f[x];l(M,r,a,R,!!M.dynamicChildren)}}},move:moveTeleport,hydrate:hydrateTeleport};function moveTeleport(o,r,a,{o:{insert:l},m:c},u=2){u===0&&l(o.targetAnchor,r,a);const{el:d,anchor:f,shapeFlag:m,children:y,props:E}=o,A=u===2;if(A&&l(d,r,a),(!A||isTeleportDisabled(E))&&m&16)for(let P=0;P<y.length;P++)c(y[P],r,a,2);A&&l(f,r,a)}function hydrateTeleport(o,r,a,l,c,u,{o:{nextSibling:d,parentNode:f,querySelector:m,insert:y,createText:E}},A){const P=r.target=resolveTarget(r.props,m);if(P){const R=isTeleportDisabled(r.props),x=P._lpa||P.firstChild;if(r.shapeFlag&16)if(R)r.anchor=A(d(o),r,f(o),a,l,c,u),r.targetStart=x,r.targetAnchor=x&&d(x);else{r.anchor=d(o);let M=x;for(;M;){if(M&&M.nodeType===8){if(M.data==="teleport start anchor")r.targetStart=M;else if(M.data==="teleport anchor"){r.targetAnchor=M,P._lpa=r.targetAnchor&&d(r.targetAnchor);break}}M=d(M)}r.targetAnchor||prepareAnchor(P,r,E,y),A(x&&d(x),r,P,a,l,c,u)}updateCssVars(r,R)}return r.anchor&&d(r.anchor)}const Teleport=TeleportImpl;function updateCssVars(o,r){const a=o.ctx;if(a&&a.ut){let l,c;for(r?(l=o.el,c=o.anchor):(l=o.targetStart,c=o.targetAnchor);l&&l!==c;)l.nodeType===1&&l.setAttribute("data-v-owner",a.uid),l=l.nextSibling;a.ut()}}function prepareAnchor(o,r,a,l){const c=r.targetStart=a(""),u=r.targetAnchor=a("");return c[TeleportEndKey]=u,o&&(l(c,o),l(u,o)),u}const leaveCbKey=Symbol("_leaveCb"),enterCbKey$1=Symbol("_enterCb");function useTransitionState(){const o={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return onMounted(()=>{o.isMounted=!0}),onBeforeUnmount(()=>{o.isUnmounting=!0}),o}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},recursiveGetSubtree=o=>{const r=o.subTree;return r.component?recursiveGetSubtree(r.component):r},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(o,{slots:r}){const a=getCurrentInstance(),l=useTransitionState();return()=>{const c=r.default&&getTransitionRawChildren(r.default(),!0);if(!c||!c.length)return;const u=findNonCommentChild(c),d=toRaw(o),{mode:f}=d;if(l.isLeaving)return emptyPlaceholder(u);const m=getInnerChild$1(u);if(!m)return emptyPlaceholder(u);let y=resolveTransitionHooks(m,d,l,a,A=>y=A);m.type!==Comment&&setTransitionHooks(m,y);let E=a.subTree&&getInnerChild$1(a.subTree);if(E&&E.type!==Comment&&!isSameVNodeType(m,E)&&recursiveGetSubtree(a).type!==Comment){let A=resolveTransitionHooks(E,d,l,a);if(setTransitionHooks(E,A),f==="out-in"&&m.type!==Comment)return l.isLeaving=!0,A.afterLeave=()=>{l.isLeaving=!1,a.job.flags&8||a.update(),delete A.afterLeave,E=void 0},emptyPlaceholder(u);f==="in-out"&&m.type!==Comment?A.delayLeave=(P,R,x)=>{const M=getLeavingNodesForType(l,E);M[String(E.key)]=E,P[leaveCbKey]=()=>{R(),P[leaveCbKey]=void 0,delete y.delayedLeave,E=void 0},y.delayedLeave=()=>{x(),delete y.delayedLeave,E=void 0}}:E=void 0}else E&&(E=void 0);return u}}};function findNonCommentChild(o){let r=o[0];if(o.length>1){for(const a of o)if(a.type!==Comment){r=a;break}}return r}const BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(o,r){const{leavingVNodes:a}=o;let l=a.get(r.type);return l||(l=Object.create(null),a.set(r.type,l)),l}function resolveTransitionHooks(o,r,a,l,c){const{appear:u,mode:d,persisted:f=!1,onBeforeEnter:m,onEnter:y,onAfterEnter:E,onEnterCancelled:A,onBeforeLeave:P,onLeave:R,onAfterLeave:x,onLeaveCancelled:M,onBeforeAppear:$,onAppear:V,onAfterAppear:B,onAppearCancelled:O}=r,L=String(o.key),F=getLeavingNodesForType(a,o),j=(Y,te)=>{Y&&callWithAsyncErrorHandling(Y,l,9,te)},U=(Y,te)=>{const ve=te[1];j(Y,te),isArray$3(Y)?Y.every(J=>J.length<=1)&&ve():Y.length<=1&&ve()},G={mode:d,persisted:f,beforeEnter(Y){let te=m;if(!a.isMounted)if(u)te=$||m;else return;Y[leaveCbKey]&&Y[leaveCbKey](!0);const ve=F[L];ve&&isSameVNodeType(o,ve)&&ve.el[leaveCbKey]&&ve.el[leaveCbKey](),j(te,[Y])},enter(Y){let te=y,ve=E,J=A;if(!a.isMounted)if(u)te=V||y,ve=B||E,J=O||A;else return;let Z=!1;const Me=Y[enterCbKey$1]=ke=>{Z||(Z=!0,ke?j(J,[Y]):j(ve,[Y]),G.delayedLeave&&G.delayedLeave(),Y[enterCbKey$1]=void 0)};te?U(te,[Y,Me]):Me()},leave(Y,te){const ve=String(o.key);if(Y[enterCbKey$1]&&Y[enterCbKey$1](!0),a.isUnmounting)return te();j(P,[Y]);let J=!1;const Z=Y[leaveCbKey]=Me=>{J||(J=!0,te(),Me?j(M,[Y]):j(x,[Y]),Y[leaveCbKey]=void 0,F[ve]===o&&delete F[ve])};F[ve]=o,R?U(R,[Y,Z]):Z()},clone(Y){const te=resolveTransitionHooks(Y,r,a,l,c);return c&&c(te),te}};return G}function emptyPlaceholder(o){if(isKeepAlive(o))return o=cloneVNode(o),o.children=null,o}function getInnerChild$1(o){if(!isKeepAlive(o))return isTeleport(o.type)&&o.children?findNonCommentChild(o.children):o;const{shapeFlag:r,children:a}=o;if(a){if(r&16)return a[0];if(r&32&&isFunction$1(a.default))return a.default()}}function setTransitionHooks(o,r){o.shapeFlag&6&&o.component?(o.transition=r,setTransitionHooks(o.component.subTree,r)):o.shapeFlag&128?(o.ssContent.transition=r.clone(o.ssContent),o.ssFallback.transition=r.clone(o.ssFallback)):o.transition=r}function getTransitionRawChildren(o,r=!1,a){let l=[],c=0;for(let u=0;u<o.length;u++){let d=o[u];const f=a==null?d.key:String(a)+String(d.key!=null?d.key:u);d.type===Fragment?(d.patchFlag&128&&c++,l=l.concat(getTransitionRawChildren(d.children,r,f))):(r||d.type!==Comment)&&l.push(f!=null?cloneVNode(d,{key:f}):d)}if(c>1)for(let u=0;u<l.length;u++)l[u].patchFlag=-2;return l}/*! #__NO_SIDE_EFFECTS__ */function defineComponent(o,r){return isFunction$1(o)?extend$1({name:o.name},r,{setup:o}):o}function useId(){const o=getCurrentInstance();return o?(o.appContext.config.idPrefix||"v")+"-"+o.ids[0]+o.ids[1]++:""}function markAsyncBoundary(o){o.ids=[o.ids[0]+o.ids[2]+++"-",0,0]}function useTemplateRef(o){const r=getCurrentInstance(),a=shallowRef(null);if(r){const c=r.refs===EMPTY_OBJ?r.refs={}:r.refs;Object.defineProperty(c,o,{enumerable:!0,get:()=>a.value,set:u=>a.value=u})}return a}function setRef(o,r,a,l,c=!1){if(isArray$3(o)){o.forEach((x,M)=>setRef(x,r&&(isArray$3(r)?r[M]:r),a,l,c));return}if(isAsyncWrapper(l)&&!c){l.shapeFlag&512&&l.type.__asyncResolved&&l.component.subTree.component&&setRef(o,r,a,l.component.subTree);return}const u=l.shapeFlag&4?getComponentPublicInstance(l.component):l.el,d=c?null:u,{i:f,r:m}=o,y=r&&r.r,E=f.refs===EMPTY_OBJ?f.refs={}:f.refs,A=f.setupState,P=toRaw(A),R=A===EMPTY_OBJ?()=>!1:x=>hasOwn(P,x);if(y!=null&&y!==m&&(isString$1(y)?(E[y]=null,R(y)&&(A[y]=null)):isRef(y)&&(y.value=null)),isFunction$1(m))callWithErrorHandling(m,f,12,[d,E]);else{const x=isString$1(m),M=isRef(m);if(x||M){const $=()=>{if(o.f){const V=x?R(m)?A[m]:E[m]:m.value;c?isArray$3(V)&&remove$2(V,u):isArray$3(V)?V.includes(u)||V.push(u):x?(E[m]=[u],R(m)&&(A[m]=E[m])):(m.value=[u],o.k&&(E[o.k]=m.value))}else x?(E[m]=d,R(m)&&(A[m]=d)):M&&(m.value=d,o.k&&(E[o.k]=d))};d?($.id=-1,queuePostRenderEffect($,a)):$()}}}let hasLoggedMismatchError=!1;const logMismatchError=()=>{hasLoggedMismatchError||(console.error("Hydration completed but contains mismatches."),hasLoggedMismatchError=!0)},isSVGContainer=o=>o.namespaceURI.includes("svg")&&o.tagName!=="foreignObject",isMathMLContainer=o=>o.namespaceURI.includes("MathML"),getContainerType=o=>{if(o.nodeType===1){if(isSVGContainer(o))return"svg";if(isMathMLContainer(o))return"mathml"}},isComment=o=>o.nodeType===8;function createHydrationFunctions(o){const{mt:r,p:a,o:{patchProp:l,createText:c,nextSibling:u,parentNode:d,remove:f,insert:m,createComment:y}}=o,E=(O,L)=>{if(!L.hasChildNodes()){a(null,O,L),flushPostFlushCbs(),L._vnode=O;return}A(L.firstChild,O,null,null,null),flushPostFlushCbs(),L._vnode=O},A=(O,L,F,j,U,G=!1)=>{G=G||!!L.dynamicChildren;const Y=isComment(O)&&O.data==="[",te=()=>M(O,L,F,j,U,Y),{type:ve,ref:J,shapeFlag:Z,patchFlag:Me}=L;let ke=O.nodeType;L.el=O,Me===-2&&(G=!1,L.dynamicChildren=null);let se=null;switch(ve){case Text:ke!==3?L.children===""?(m(L.el=c(""),d(O),O),se=O):se=te():(O.data!==L.children&&(logMismatchError(),O.data=L.children),se=u(O));break;case Comment:B(O)?(se=u(O),V(L.el=O.content.firstChild,O,F)):ke!==8||Y?se=te():se=u(O);break;case Static:if(Y&&(O=u(O),ke=O.nodeType),ke===1||ke===3){se=O;const xe=!L.children.length;for(let Q=0;Q<L.staticCount;Q++)xe&&(L.children+=se.nodeType===1?se.outerHTML:se.data),Q===L.staticCount-1&&(L.anchor=se),se=u(se);return Y?u(se):se}else te();break;case Fragment:Y?se=x(O,L,F,j,U,G):se=te();break;default:if(Z&1)(ke!==1||L.type.toLowerCase()!==O.tagName.toLowerCase())&&!B(O)?se=te():se=P(O,L,F,j,U,G);else if(Z&6){L.slotScopeIds=U;const xe=d(O);if(Y?se=$(O):isComment(O)&&O.data==="teleport start"?se=$(O,O.data,"teleport end"):se=u(O),r(L,xe,null,F,j,getContainerType(xe),G),isAsyncWrapper(L)&&!L.type.__asyncResolved){let Q;Y?(Q=createVNode(Fragment),Q.anchor=se?se.previousSibling:xe.lastChild):Q=O.nodeType===3?createTextVNode(""):createVNode("div"),Q.el=O,L.component.subTree=Q}}else Z&64?ke!==8?se=te():se=L.type.hydrate(O,L,F,j,U,G,o,R):Z&128&&(se=L.type.hydrate(O,L,F,j,getContainerType(d(O)),U,G,o,A))}return J!=null&&setRef(J,null,j,L),se},P=(O,L,F,j,U,G)=>{G=G||!!L.dynamicChildren;const{type:Y,props:te,patchFlag:ve,shapeFlag:J,dirs:Z,transition:Me}=L,ke=Y==="input"||Y==="option";if(ke||ve!==-1){Z&&invokeDirectiveHook(L,null,F,"created");let se=!1;if(B(O)){se=needTransition(null,Me)&&F&&F.vnode.props&&F.vnode.props.appear;const Q=O.content.firstChild;se&&Me.beforeEnter(Q),V(Q,O,F),L.el=O=Q}if(J&16&&!(te&&(te.innerHTML||te.textContent))){let Q=R(O.firstChild,L,O,F,j,U,G);for(;Q;){isMismatchAllowed(O,1)||logMismatchError();const ie=Q;Q=Q.nextSibling,f(ie)}}else if(J&8){let Q=L.children;Q[0]===`
18`&&(O.tagName==="PRE"||O.tagName==="TEXTAREA")&&(Q=Q.slice(1)),O.textContent!==Q&&(isMismatchAllowed(O,0)||logMismatchError(),O.textContent=L.children)}if(te){if(ke||!G||ve&48){const Q=O.tagName.includes("-");for(const ie in te)(ke&&(ie.endsWith("value")||ie==="indeterminate")||isOn(ie)&&!isReservedProp(ie)||ie[0]==="."||Q)&&l(O,ie,null,te[ie],void 0,F)}else if(te.onClick)l(O,"onClick",null,te.onClick,void 0,F);else if(ve&4&&isReactive(te.style))for(const Q in te.style)te.style[Q]}let xe;(xe=te&&te.onVnodeBeforeMount)&&invokeVNodeHook(xe,F,L),Z&&invokeDirectiveHook(L,null,F,"beforeMount"),((xe=te&&te.onVnodeMounted)||Z||se)&&queueEffectWithSuspense(()=>{xe&&invokeVNodeHook(xe,F,L),se&&Me.enter(O),Z&&invokeDirectiveHook(L,null,F,"mounted")},j)}return O.nextSibling},R=(O,L,F,j,U,G,Y)=>{Y=Y||!!L.dynamicChildren;const te=L.children,ve=te.length;for(let J=0;J<ve;J++){const Z=Y?te[J]:te[J]=normalizeVNode(te[J]),Me=Z.type===Text;O?(Me&&!Y&&J+1<ve&&normalizeVNode(te[J+1]).type===Text&&(m(c(O.data.slice(Z.children.length)),F,u(O)),O.data=Z.children),O=A(O,Z,j,U,G,Y)):Me&&!Z.children?m(Z.el=c(""),F):(isMismatchAllowed(F,1)||logMismatchError(),a(null,Z,F,null,j,U,getContainerType(F),G))}return O},x=(O,L,F,j,U,G)=>{const{slotScopeIds:Y}=L;Y&&(U=U?U.concat(Y):Y);const te=d(O),ve=R(u(O),L,te,F,j,U,G);return ve&&isComment(ve)&&ve.data==="]"?u(L.anchor=ve):(logMismatchError(),m(L.anchor=y("]"),te,ve),ve)},M=(O,L,F,j,U,G)=>{if(isMismatchAllowed(O.parentElement,1)||logMismatchError(),L.el=null,G){const ve=$(O);for(;;){const J=u(O);if(J&&J!==ve)f(J);else break}}const Y=u(O),te=d(O);return f(O),a(null,L,te,Y,F,j,getContainerType(te),U),F&&(F.vnode.el=L.el,updateHOCHostEl(F,L.el)),Y},$=(O,L="[",F="]")=>{let j=0;for(;O;)if(O=u(O),O&&isComment(O)&&(O.data===L&&j++,O.data===F)){if(j===0)return u(O);j--}return O},V=(O,L,F)=>{const j=L.parentNode;j&&j.replaceChild(O,L);let U=F;for(;U;)U.vnode.el===L&&(U.vnode.el=U.subTree.el=O),U=U.parent},B=O=>O.nodeType===1&&O.tagName==="TEMPLATE";return[E,A]}const allowMismatchAttr="data-allow-mismatch",MismatchTypeString={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function isMismatchAllowed(o,r){if(r===0||r===1)for(;o&&!o.hasAttribute(allowMismatchAttr);)o=o.parentElement;const a=o&&o.getAttribute(allowMismatchAttr);if(a==null)return!1;if(a==="")return!0;{const l=a.split(",");return r===0&&l.includes("children")?!0:a.split(",").includes(MismatchTypeString[r])}}const requestIdleCallback$1=getGlobalThis().requestIdleCallback||(o=>setTimeout(o,1)),cancelIdleCallback$1=getGlobalThis().cancelIdleCallback||(o=>clearTimeout(o)),hydrateOnIdle=(o=1e4)=>r=>{const a=requestIdleCallback$1(r,{timeout:o});return()=>cancelIdleCallback$1(a)};function elementIsVisibleInViewport(o){const{top:r,left:a,bottom:l,right:c}=o.getBoundingClientRect(),{innerHeight:u,innerWidth:d}=window;return(r>0&&r<u||l>0&&l<u)&&(a>0&&a<d||c>0&&c<d)}const hydrateOnVisible=o=>(r,a)=>{const l=new IntersectionObserver(c=>{for(const u of c)if(u.isIntersecting){l.disconnect(),r();break}},o);return a(c=>{if(c instanceof Element){if(elementIsVisibleInViewport(c))return r(),l.disconnect(),!1;l.observe(c)}}),()=>l.disconnect()},hydrateOnMediaQuery=o=>r=>{if(o){const a=matchMedia(o);if(a.matches)r();else return a.addEventListener("change",r,{once:!0}),()=>a.removeEventListener("change",r)}},hydrateOnInteraction=(o=[])=>(r,a)=>{isString$1(o)&&(o=[o]);let l=!1;const c=d=>{l||(l=!0,u(),r(),d.target.dispatchEvent(new d.constructor(d.type,d)))},u=()=>{a(d=>{for(const f of o)d.removeEventListener(f,c)})};return a(d=>{for(const f of o)d.addEventListener(f,c,{once:!0})}),u};function forEachElement(o,r){if(isComment(o)&&o.data==="["){let a=1,l=o.nextSibling;for(;l;){if(l.nodeType===1){if(r(l)===!1)break}else if(isComment(l))if(l.data==="]"){if(--a===0)break}else l.data==="["&&a++;l=l.nextSibling}}else r(o)}const isAsyncWrapper=o=>!!o.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function defineAsyncComponent(o){isFunction$1(o)&&(o={loader:o});const{loader:r,loadingComponent:a,errorComponent:l,delay:c=200,hydrate:u,timeout:d,suspensible:f=!0,onError:m}=o;let y=null,E,A=0;const P=()=>(A++,y=null,R()),R=()=>{let x;return y||(x=y=r().catch(M=>{if(M=M instanceof Error?M:new Error(String(M)),m)return new Promise(($,V)=>{m(M,()=>$(P()),()=>V(M),A+1)});throw M}).then(M=>x!==y&&y?y:(M&&(M.__esModule||M[Symbol.toStringTag]==="Module")&&(M=M.default),E=M,M)))};return defineComponent({name:"AsyncComponentWrapper",__asyncLoader:R,__asyncHydrate(x,M,$){const V=u?()=>{const B=u($,O=>forEachElement(x,O));B&&(M.bum||(M.bum=[])).push(B)}:$;E?V():R().then(()=>!M.isUnmounted&&V())},get __asyncResolved(){return E},setup(){const x=currentInstance$1;if(markAsyncBoundary(x),E)return()=>createInnerComp(E,x);const M=O=>{y=null,handleError$2(O,x,13,!l)};if(f&&x.suspense||isInSSRComponentSetup)return R().then(O=>()=>createInnerComp(O,x)).catch(O=>(M(O),()=>l?createVNode(l,{error:O}):null));const $=ref$1(!1),V=ref$1(),B=ref$1(!!c);return c&&setTimeout(()=>{B.value=!1},c),d!=null&&setTimeout(()=>{if(!$.value&&!V.value){const O=new Error(`Async component timed out after ${d}ms.`);M(O),V.value=O}},d),R().then(()=>{$.value=!0,x.parent&&isKeepAlive(x.parent.vnode)&&x.parent.update()}).catch(O=>{M(O),V.value=O}),()=>{if($.value&&E)return createInnerComp(E,x);if(V.value&&l)return createVNode(l,{error:V.value});if(a&&!B.value)return createVNode(a)}}})}function createInnerComp(o,r){const{ref:a,props:l,children:c,ce:u}=r.vnode,d=createVNode(o,l,c);return d.ref=a,d.ce=u,delete r.vnode.ce,d}const isKeepAlive=o=>o.type.__isKeepAlive,KeepAliveImpl={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(o,{slots:r}){const a=getCurrentInstance(),l=a.ctx;if(!l.renderer)return()=>{const B=r.default&&r.default();return B&&B.length===1?B[0]:B};const c=new Map,u=new Set;let d=null;const f=a.suspense,{renderer:{p:m,m:y,um:E,o:{createElement:A}}}=l,P=A("div");l.activate=(B,O,L,F,j)=>{const U=B.component;y(B,O,L,0,f),m(U.vnode,B,O,L,U,f,F,B.slotScopeIds,j),queuePostRenderEffect(()=>{U.isDeactivated=!1,U.a&&invokeArrayFns(U.a);const G=B.props&&B.props.onVnodeMounted;G&&invokeVNodeHook(G,U.parent,B)},f)},l.deactivate=B=>{const O=B.component;invalidateMount(O.m),invalidateMount(O.a),y(B,P,null,1,f),queuePostRenderEffect(()=>{O.da&&invokeArrayFns(O.da);const L=B.props&&B.props.onVnodeUnmounted;L&&invokeVNodeHook(L,O.parent,B),O.isDeactivated=!0},f)};function R(B){resetShapeFlag(B),E(B,a,f,!0)}function x(B){c.forEach((O,L)=>{const F=getComponentName(O.type);F&&!B(F)&&M(L)})}function M(B){const O=c.get(B);O&&(!d||!isSameVNodeType(O,d))?R(O):d&&resetShapeFlag(d),c.delete(B),u.delete(B)}watch(()=>[o.include,o.exclude],([B,O])=>{B&&x(L=>matches(B,L)),O&&x(L=>!matches(O,L))},{flush:"post",deep:!0});let $=null;const V=()=>{$!=null&&(isSuspense(a.subTree.type)?queuePostRenderEffect(()=>{c.set($,getInnerChild(a.subTree))},a.subTree.suspense):c.set($,getInnerChild(a.subTree)))};return onMounted(V),onUpdated(V),onBeforeUnmount(()=>{c.forEach(B=>{const{subTree:O,suspense:L}=a,F=getInnerChild(O);if(B.type===F.type&&B.key===F.key){resetShapeFlag(F);const j=F.component.da;j&&queuePostRenderEffect(j,L);return}R(B)})}),()=>{if($=null,!r.default)return d=null;const B=r.default(),O=B[0];if(B.length>1)return d=null,B;if(!isVNode(O)||!(O.shapeFlag&4)&&!(O.shapeFlag&128))return d=null,O;let L=getInnerChild(O);if(L.type===Comment)return d=null,L;const F=L.type,j=getComponentName(isAsyncWrapper(L)?L.type.__asyncResolved||{}:F),{include:U,exclude:G,max:Y}=o;if(U&&(!j||!matches(U,j))||G&&j&&matches(G,j))return L.shapeFlag&=-257,d=L,O;const te=L.key==null?F:L.key,ve=c.get(te);return L.el&&(L=cloneVNode(L),O.shapeFlag&128&&(O.ssContent=L)),$=te,ve?(L.el=ve.el,L.component=ve.component,L.transition&&setTransitionHooks(L,L.transition),L.shapeFlag|=512,u.delete(te),u.add(te)):(u.add(te),Y&&u.size>parseInt(Y,10)&&M(u.values().next().value)),L.shapeFlag|=256,d=L,isSuspense(O.type)?O:L}}},KeepAlive=KeepAliveImpl;function matches(o,r){return isArray$3(o)?o.some(a=>matches(a,r)):isString$1(o)?o.split(",").includes(r):isRegExp(o)?(o.lastIndex=0,o.test(r)):!1}function onActivated(o,r){registerKeepAliveHook(o,"a",r)}function onDeactivated(o,r){registerKeepAliveHook(o,"da",r)}function registerKeepAliveHook(o,r,a=currentInstance$1){const l=o.__wdc||(o.__wdc=()=>{let c=a;for(;c;){if(c.isDeactivated)return;c=c.parent}return o()});if(injectHook(r,l,a),a){let c=a.parent;for(;c&&c.parent;)isKeepAlive(c.parent.vnode)&&injectToKeepAliveRoot(l,r,a,c),c=c.parent}}function injectToKeepAliveRoot(o,r,a,l){const c=injectHook(r,o,l,!0);onUnmounted(()=>{remove$2(l[r],c)},a)}function resetShapeFlag(o){o.shapeFlag&=-257,o.shapeFlag&=-513}function getInnerChild(o){return o.shapeFlag&128?o.ssContent:o}function injectHook(o,r,a=currentInstance$1,l=!1){if(a){const c=a[o]||(a[o]=[]),u=r.__weh||(r.__weh=(...d)=>{pauseTracking();const f=setCurrentInstance(a),m=callWithAsyncErrorHandling(r,a,o,d);return f(),resetTracking(),m});return l?c.unshift(u):c.push(u),u}}const createHook=o=>(r,a=currentInstance$1)=>{(!isInSSRComponentSetup||o==="sp")&&injectHook(o,(...l)=>r(...l),a)},onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(o,r=currentInstance$1){injectHook("ec",o,r)}const COMPONENTS="components",DIRECTIVES="directives";function resolveComponent(o,r){return resolveAsset(COMPONENTS,o,!0,r)||o}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(o){return isString$1(o)?resolveAsset(COMPONENTS,o,!1)||o:o||NULL_DYNAMIC_COMPONENT}function resolveDirective(o){return resolveAsset(DIRECTIVES,o)}function resolveAsset(o,r,a=!0,l=!1){const c=currentRenderingInstance||currentInstance$1;if(c){const u=c.type;if(o===COMPONENTS){const f=getComponentName(u,!1);if(f&&(f===r||f===camelize(r)||f===capitalize(camelize(r))))return u}const d=resolve(c[o]||u[o],r)||resolve(c.appContext[o],r);return!d&&l?u:d}}function resolve(o,r){return o&&(o[r]||o[camelize(r)]||o[capitalize(camelize(r))])}function renderList(o,r,a,l){let c;const u=a&&a[l],d=isArray$3(o);if(d||isString$1(o)){const f=d&&isReactive(o);let m=!1;f&&(m=!isShallow(o),o=shallowReadArray(o)),c=new Array(o.length);for(let y=0,E=o.length;y<E;y++)c[y]=r(m?toReactive(o[y]):o[y],y,void 0,u&&u[y])}else if(typeof o=="number"){c=new Array(o);for(let f=0;f<o;f++)c[f]=r(f+1,f,void 0,u&&u[f])}else if(isObject$2(o))if(o[Symbol.iterator])c=Array.from(o,(f,m)=>r(f,m,void 0,u&&u[m]));else{const f=Object.keys(o);c=new Array(f.length);for(let m=0,y=f.length;m<y;m++){const E=f[m];c[m]=r(o[E],E,m,u&&u[m])}}else c=[];return a&&(a[l]=c),c}function createSlots(o,r){for(let a=0;a<r.length;a++){const l=r[a];if(isArray$3(l))for(let c=0;c<l.length;c++)o[l[c].name]=l[c].fn;else l&&(o[l.name]=l.key?(...c)=>{const u=l.fn(...c);return u&&(u.key=l.key),u}:l.fn)}return o}function renderSlot(o,r,a={},l,c){if(currentRenderingInstance.ce||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&&currentRenderingInstance.parent.ce)return r!=="default"&&(a.name=r),openBlock(),createBlock(Fragment,null,[createVNode("slot",a,l&&l())],64);let u=o[r];u&&u._c&&(u._d=!1),openBlock();const d=u&&ensureValidVNode(u(a)),f=a.key||d&&d.key,m=createBlock(Fragment,{key:(f&&!isSymbol(f)?f:`_${r}`)+(!d&&l?"_fb":"")},d||(l?l():[]),d&&o._===1?64:-2);return!c&&m.scopeId&&(m.slotScopeIds=[m.scopeId+"-s"]),u&&u._c&&(u._d=!0),m}function ensureValidVNode(o){return o.some(r=>isVNode(r)?!(r.type===Comment||r.type===Fragment&&!ensureValidVNode(r.children)):!0)?o:null}function toHandlers(o,r){const a={};for(const l in o)a[r&&/[A-Z]/.test(l)?`on:${l}`:toHandlerKey(l)]=o[l];return a}const getPublicInstance=o=>o?isStatefulComponent(o)?getComponentPublicInstance(o):getPublicInstance(o.parent):null,publicPropertiesMap=extend$1(Object.create(null),{$:o=>o,$el:o=>o.vnode.el,$data:o=>o.data,$props:o=>o.props,$attrs:o=>o.attrs,$slots:o=>o.slots,$refs:o=>o.refs,$parent:o=>getPublicInstance(o.parent),$root:o=>getPublicInstance(o.root),$host:o=>o.ce,$emit:o=>o.emit,$options:o=>resolveMergedOptions(o),$forceUpdate:o=>o.f||(o.f=()=>{queueJob(o.update)}),$nextTick:o=>o.n||(o.n=nextTick.bind(o.proxy)),$watch:o=>instanceWatch.bind(o)}),hasSetupBinding=(o,r)=>o!==EMPTY_OBJ&&!o.__isScriptSetup&&hasOwn(o,r),PublicInstanceProxyHandlers={get({_:o},r){if(r==="__v_skip")return!0;const{ctx:a,setupState:l,data:c,props:u,accessCache:d,type:f,appContext:m}=o;let y;if(r[0]!=="$"){const R=d[r];if(R!==void 0)switch(R){case 1:return l[r];case 2:return c[r];case 4:return a[r];case 3:return u[r]}else{if(hasSetupBinding(l,r))return d[r]=1,l[r];if(c!==EMPTY_OBJ&&hasOwn(c,r))return d[r]=2,c[r];if((y=o.propsOptions[0])&&hasOwn(y,r))return d[r]=3,u[r];if(a!==EMPTY_OBJ&&hasOwn(a,r))return d[r]=4,a[r];shouldCacheAccess&&(d[r]=0)}}const E=publicPropertiesMap[r];let A,P;if(E)return r==="$attrs"&&track(o.attrs,"get",""),E(o);if((A=f.__cssModules)&&(A=A[r]))return A;if(a!==EMPTY_OBJ&&hasOwn(a,r))return d[r]=4,a[r];if(P=m.config.globalProperties,hasOwn(P,r))return P[r]},set({_:o},r,a){const{data:l,setupState:c,ctx:u}=o;return hasSetupBinding(c,r)?(c[r]=a,!0):l!==EMPTY_OBJ&&hasOwn(l,r)?(l[r]=a,!0):hasOwn(o.props,r)||r[0]==="$"&&r.slice(1)in o?!1:(u[r]=a,!0)},has({_:{data:o,setupState:r,accessCache:a,ctx:l,appContext:c,propsOptions:u}},d){let f;return!!a[d]||o!==EMPTY_OBJ&&hasOwn(o,d)||hasSetupBinding(r,d)||(f=u[0])&&hasOwn(f,d)||hasOwn(l,d)||hasOwn(publicPropertiesMap,d)||hasOwn(c.config.globalProperties,d)},defineProperty(o,r,a){return a.get!=null?o._.accessCache[r]=0:hasOwn(a,"value")&&this.set(o,r,a.value,null),Reflect.defineProperty(o,r,a)}},RuntimeCompiledPublicInstanceProxyHandlers=extend$1({},PublicInstanceProxyHandlers,{get(o,r){if(r!==Symbol.unscopables)return PublicInstanceProxyHandlers.get(o,r,o)},has(o,r){return r[0]!=="_"&&!isGloballyAllowed(r)}});function defineProps(){return null}function defineEmits(){return null}function defineExpose(o){}function defineOptions(o){}function defineSlots(){return null}function defineModel(){}function withDefaults(o,r){return null}function useSlots(){return getContext$1().slots}function useAttrs(){return getContext$1().attrs}function getContext$1(){const o=getCurrentInstance();return o.setupContext||(o.setupContext=createSetupContext(o))}function normalizePropsOrEmits(o){return isArray$3(o)?o.reduce((r,a)=>(r[a]=null,r),{}):o}function mergeDefaults(o,r){const a=normalizePropsOrEmits(o);for(const l in r){if(l.startsWith("__skip"))continue;let c=a[l];c?isArray$3(c)||isFunction$1(c)?c=a[l]={type:c,default:r[l]}:c.default=r[l]:c===null&&(c=a[l]={default:r[l]}),c&&r[`__skip_${l}`]&&(c.skipFactory=!0)}return a}function mergeModels(o,r){return!o||!r?o||r:isArray$3(o)&&isArray$3(r)?o.concat(r):extend$1({},normalizePropsOrEmits(o),normalizePropsOrEmits(r))}function createPropsRestProxy(o,r){const a={};for(const l in o)r.includes(l)||Object.defineProperty(a,l,{enumerable:!0,get:()=>o[l]});return a}function withAsyncContext(o){const r=getCurrentInstance();let a=o();return unsetCurrentInstance(),isPromise$1(a)&&(a=a.catch(l=>{throw setCurrentInstance(r),l})),[a,()=>setCurrentInstance(r)]}let shouldCacheAccess=!0;function applyOptions(o){const r=resolveMergedOptions(o),a=o.proxy,l=o.ctx;shouldCacheAccess=!1,r.beforeCreate&&callHook$1(r.beforeCreate,o,"bc");const{data:c,computed:u,methods:d,watch:f,provide:m,inject:y,created:E,beforeMount:A,mounted:P,beforeUpdate:R,updated:x,activated:M,deactivated:$,beforeDestroy:V,beforeUnmount:B,destroyed:O,unmounted:L,render:F,renderTracked:j,renderTriggered:U,errorCaptured:G,serverPrefetch:Y,expose:te,inheritAttrs:ve,components:J,directives:Z,filters:Me}=r;if(y&&resolveInjections(y,l,null),d)for(const xe in d){const Q=d[xe];isFunction$1(Q)&&(l[xe]=Q.bind(a))}if(c){const xe=c.call(a,a);isObject$2(xe)&&(o.data=reactive(xe))}if(shouldCacheAccess=!0,u)for(const xe in u){const Q=u[xe],ie=isFunction$1(Q)?Q.bind(a,a):isFunction$1(Q.get)?Q.get.bind(a,a):NOOP,Fe=!isFunction$1(Q)&&isFunction$1(Q.set)?Q.set.bind(a):NOOP,Ne=computed({get:ie,set:Fe});Object.defineProperty(l,xe,{enumerable:!0,configurable:!0,get:()=>Ne.value,set:nt=>Ne.value=nt})}if(f)for(const xe in f)createWatcher(f[xe],l,a,xe);if(m){const xe=isFunction$1(m)?m.call(a):m;Reflect.ownKeys(xe).forEach(Q=>{provide(Q,xe[Q])})}E&&callHook$1(E,o,"c");function se(xe,Q){isArray$3(Q)?Q.forEach(ie=>xe(ie.bind(a))):Q&&xe(Q.bind(a))}if(se(onBeforeMount,A),se(onMounted,P),se(onBeforeUpdate,R),se(onUpdated,x),se(onActivated,M),se(onDeactivated,$),se(onErrorCaptured,G),se(onRenderTracked,j),se(onRenderTriggered,U),se(onBeforeUnmount,B),se(onUnmounted,L),se(onServerPrefetch,Y),isArray$3(te))if(te.length){const xe=o.exposed||(o.exposed={});te.forEach(Q=>{Object.defineProperty(xe,Q,{get:()=>a[Q],set:ie=>a[Q]=ie})})}else o.exposed||(o.exposed={});F&&o.render===NOOP&&(o.render=F),ve!=null&&(o.inheritAttrs=ve),J&&(o.components=J),Z&&(o.directives=Z),Y&&markAsyncBoundary(o)}function resolveInjections(o,r,a=NOOP){isArray$3(o)&&(o=normalizeInject(o));for(const l in o){const c=o[l];let u;isObject$2(c)?"default"in c?u=inject(c.from||l,c.default,!0):u=inject(c.from||l):u=inject(c),isRef(u)?Object.defineProperty(r,l,{enumerable:!0,configurable:!0,get:()=>u.value,set:d=>u.value=d}):r[l]=u}}function callHook$1(o,r,a){callWithAsyncErrorHandling(isArray$3(o)?o.map(l=>l.bind(r.proxy)):o.bind(r.proxy),r,a)}function createWatcher(o,r,a,l){let c=l.includes(".")?createPathGetter(a,l):()=>a[l];if(isString$1(o)){const u=r[o];isFunction$1(u)&&watch(c,u)}else if(isFunction$1(o))watch(c,o.bind(a));else if(isObject$2(o))if(isArray$3(o))o.forEach(u=>createWatcher(u,r,a,l));else{const u=isFunction$1(o.handler)?o.handler.bind(a):r[o.handler];isFunction$1(u)&&watch(c,u,o)}}function resolveMergedOptions(o){const r=o.type,{mixins:a,extends:l}=r,{mixins:c,optionsCache:u,config:{optionMergeStrategies:d}}=o.appContext,f=u.get(r);let m;return f?m=f:!c.length&&!a&&!l?m=r:(m={},c.length&&c.forEach(y=>mergeOptions$1(m,y,d,!0)),mergeOptions$1(m,r,d)),isObject$2(r)&&u.set(r,m),m}function mergeOptions$1(o,r,a,l=!1){const{mixins:c,extends:u}=r;u&&mergeOptions$1(o,u,a,!0),c&&c.forEach(d=>mergeOptions$1(o,d,a,!0));for(const d in r)if(!(l&&d==="expose")){const f=internalOptionMergeStrats[d]||a&&a[d];o[d]=f?f(o[d],r[d]):r[d]}return o}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(o,r){return r?o?function(){return extend$1(isFunction$1(o)?o.call(this,this):o,isFunction$1(r)?r.call(this,this):r)}:r:o}function mergeInject(o,r){return mergeObjectOptions(normalizeInject(o),normalizeInject(r))}function normalizeInject(o){if(isArray$3(o)){const r={};for(let a=0;a<o.length;a++)r[o[a]]=o[a];return r}return o}function mergeAsArray(o,r){return o?[...new Set([].concat(o,r))]:r}function mergeObjectOptions(o,r){return o?extend$1(Object.create(null),o,r):r}function mergeEmitsOrPropsOptions(o,r){return o?isArray$3(o)&&isArray$3(r)?[...new Set([...o,...r])]:extend$1(Object.create(null),normalizePropsOrEmits(o),normalizePropsOrEmits(r??{})):r}function mergeWatchOptions(o,r){if(!o)return r;if(!r)return o;const a=extend$1(Object.create(null),o);for(const l in r)a[l]=mergeAsArray(o[l],r[l]);return a}function createAppContext(){return{app:null,config:{isNativeTag:NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uid$1=0;function createAppAPI(o,r){return function(l,c=null){isFunction$1(l)||(l=extend$1({},l)),c!=null&&!isObject$2(c)&&(c=null);const u=createAppContext(),d=new WeakSet,f=[];let m=!1;const y=u.app={_uid:uid$1++,_component:l,_props:c,_container:null,_context:u,_instance:null,version:version$9,get config(){return u.config},set config(E){},use(E,...A){return d.has(E)||(E&&isFunction$1(E.install)?(d.add(E),E.install(y,...A)):isFunction$1(E)&&(d.add(E),E(y,...A))),y},mixin(E){return u.mixins.includes(E)||u.mixins.push(E),y},component(E,A){return A?(u.components[E]=A,y):u.components[E]},directive(E,A){return A?(u.directives[E]=A,y):u.directives[E]},mount(E,A,P){if(!m){const R=y._ceVNode||createVNode(l,c);return R.appContext=u,P===!0?P="svg":P===!1&&(P=void 0),A&&r?r(R,E):o(R,E,P),m=!0,y._container=E,E.__vue_app__=y,getComponentPublicInstance(R.component)}},onUnmount(E){f.push(E)},unmount(){m&&(callWithAsyncErrorHandling(f,y._instance,16),o(null,y._container),delete y._container.__vue_app__)},provide(E,A){return u.provides[E]=A,y},runWithContext(E){const A=currentApp;currentApp=y;try{return E()}finally{currentApp=A}}};return y}}let currentApp=null;function provide(o,r){if(currentInstance$1){let a=currentInstance$1.provides;const l=currentInstance$1.parent&&currentInstance$1.parent.provides;l===a&&(a=currentInstance$1.provides=Object.create(l)),a[o]=r}}function inject(o,r,a=!1){const l=currentInstance$1||currentRenderingInstance;if(l||currentApp){const c=currentApp?currentApp._context.provides:l?l.parent==null?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(c&&o in c)return c[o];if(arguments.length>1)return a&&isFunction$1(r)?r.call(l&&l.proxy):r}}function hasInjectionContext(){return!!(currentInstance$1||currentRenderingInstance||currentApp)}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=o=>
vendor: 5,832 bytes, line 18
18Object.getPrototypeOf(o)===internalObjectProto;function initProps(o,r,a,l=!1){const c={},u=createInternalObject();o.propsDefaults=Object.create(null),setFullProps(o,r,c,u);for(const d in o.propsOptions[0])d in c||(c[d]=void 0);a?o.props=l?c:shallowReactive(c):o.type.props?o.props=c:o.props=u,o.attrs=u}function updateProps(o,r,a,l){const{props:c,attrs:u,vnode:{patchFlag:d}}=o,f=toRaw(c),[m]=o.propsOptions;let y=!1;if((l||d>0)&&!(d&16)){if(d&8){const E=o.vnode.dynamicProps;for(let A=0;A<E.length;A++){let P=E[A];if(isEmitListener(o.emitsOptions,P))continue;const R=r[P];if(m)if(hasOwn(u,P))R!==u[P]&&(u[P]=R,y=!0);else{const x=camelize(P);c[x]=resolvePropValue(m,f,x,R,o,!1)}else R!==u[P]&&(u[P]=R,y=!0)}}}else{setFullProps(o,r,c,u)&&(y=!0);let E;for(const A in f)(!r||!hasOwn(r,A)&&((E=hyphenate(A))===A||!hasOwn(r,E)))&&(m?a&&(a[A]!==void 0||a[E]!==void 0)&&(c[A]=resolvePropValue(m,f,A,void 0,o,!0)):delete c[A]);if(u!==f)for(const A in u)(!r||!hasOwn(r,A))&&(delete u[A],y=!0)}y&&trigger(o.attrs,"set","")}function setFullProps(o,r,a,l){const[c,u]=o.propsOptions;let d=!1,f;if(r)for(let m in r){if(isReservedProp(m))continue;const y=r[m];let E;c&&hasOwn(c,E=camelize(m))?!u||!u.includes(E)?a[E]=y:(f||(f={}))[E]=y:isEmitListener(o.emitsOptions,m)||(!(m in l)||y!==l[m])&&(l[m]=y,d=!0)}if(u){const m=toRaw(a),y=f||EMPTY_OBJ;for(let E=0;E<u.length;E++){const A=u[E];a[A]=resolvePropValue(c,m,A,y[A],o,!hasOwn(y,A))}}return d}function resolvePropValue(o,r,a,l,c,u){const d=o[a];if(d!=null){const f=hasOwn(d,"default");if(f&&l===void 0){const m=d.default;if(d.type!==Function&&!d.skipFactory&&isFunction$1(m)){const{propsDefaults:y}=c;if(a in y)l=y[a];else{const E=setCurrentInstance(c);l=y[a]=m.call(null,r),E()}}else l=m;c.ce&&c.ce._setProp(a,l)}d[0]&&(u&&!f?l=!1:d[1]&&(l===""||l===hyphenate(a))&&(l=!0))}return l}const mixinPropsCache=new WeakMap;function normalizePropsOptions(o,r,a=!1){const l=a?mixinPropsCache:r.propsCache,c=l.get(o);if(c)return c;const u=o.props,d={},f=[];let m=!1;if(!isFunction$1(o)){const E=A=>{m=!0;const[P,R]=normalizePropsOptions(A,r,!0);extend$1(d,P),R&&f.push(...R)};!a&&r.mixins.length&&r.mixins.forEach(E),o.extends&&E(o.extends),o.mixins&&o.mixins.forEach(E)}if(!u&&!m)return isObject$2(o)&&l.set(o,EMPTY_ARR),EMPTY_ARR;if(isArray$3(u))for(let E=0;E<u.length;E++){const A=camelize(u[E]);validatePropName(A)&&(d[A]=EMPTY_OBJ)}else if(u)for(const E in u){const A=camelize(E);if(validatePropName(A)){const P=u[E],R=d[A]=isArray$3(P)||isFunction$1(P)?{type:P}:extend$1({},P),x=R.type;let M=!1,$=!0;if(isArray$3(x))for(let V=0;V<x.length;++V){const B=x[V],O=isFunction$1(B)&&B.name;if(O==="Boolean"){M=!0;break}else O==="String"&&($=!1)}else M=isFunction$1(x)&&x.name==="Boolean";R[0]=M,R[1]=$,(M||hasOwn(R,"default"))&&f.push(A)}}const y=[d,f];return isObject$2(o)&&l.set(o,y),y}function validatePropName(o){return o[0]!=="$"&&!isReservedProp(o)}const isInternalKey=o=>o[0]==="_"||o==="$stable",normalizeSlotValue=o=>isArray$3(o)?o.map(normalizeVNode):[normalizeVNode(o)],normalizeSlot$1=(o,r,a)=>{if(r._n)return r;const l=withCtx((...c)=>normalizeSlotValue(r(...c)),a);return l._c=!1,l},normalizeObjectSlots=(o,r,a)=>{const l=o._ctx;for(const c in o){if(isInternalKey(c))continue;const u=o[c];if(isFunction$1(u))r[c]=normalizeSlot$1(c,u,l);else if(u!=null){const d=normalizeSlotValue(u);r[c]=()=>d}}},normalizeVNodeSlots=(o,r)=>{const a=normalizeSlotValue(r);o.slots.default=()=>a},assignSlots=(o,r,a)=>{for(const l in r)(a||l!=="_")&&(o[l]=r[l])},initSlots=(o,r,a)=>{const l=o.slots=createInternalObject();if(o.vnode.shapeFlag&32){const c=r._;c?(assignSlots(l,r,a),a&&def(l,"_",c,!0)):normalizeObjectSlots(r,l)}else r&&normalizeVNodeSlots(o,r)},updateSlots=(o,r,a)=>{const{vnode:l,slots:c}=o;let u=!0,d=EMPTY_OBJ;if(l.shapeFlag&32){const f=r._;f?a&&f===1?u=!1:assignSlots(c,r,a):(u=!r.$stable,normalizeObjectSlots(r,c)),d=r}else r&&(normalizeVNodeSlots(o,r),d={default:1});if(u)for(const f in c)!isInternalKey(f)&&d[f]==null&&delete c[f]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(o){return baseCreateRenderer(o)}function createHydrationRenderer(o){return baseCreateRenderer(o,createHydrationFunctions)}function baseCreateRenderer(o,r){const a=getGlobalThis();a.__VUE__=!0;const{insert:l,remove:c,patchProp:u,createElement:d,createText:f,createComment:m,setText:y,setElementText:E,parentNode:A,nextSibling:P,setScopeId:R=NOOP,insertStaticContent:x}=o,M=(Pe,Se,Le,qe=null,He=null,Ye=null,ot=void 0,et=null,Qe=!!Se.dynamicChildren)=>{if(Pe===Se)return;Pe&&!isSameVNodeType(Pe,Se)&&(qe=je(Pe),nt(Pe,He,Ye,!0),Pe=null),Se.patchFlag===-2&&(Qe=!1,Se.dynamicChildren=null);const{type:Ze,ref:mt,shapeFlag:at}=Se;switch(Ze){case Text:$(Pe,Se,Le,qe);break;case Comment:V(Pe,Se,Le,qe);break;case Static:Pe==null&&B(Se,Le,qe,ot);break;case Fragment:J(Pe,Se,Le,qe,He,Ye,ot,et,Qe);break;default:at&1?F(Pe,Se,Le,qe,He,Ye,ot,et,Qe):at&6?Z(Pe,Se,Le,qe,He,Ye,ot,et,Qe):(at&64||at&128)&&Ze.process(Pe,Se,Le,qe,He,Ye,ot,et,Qe,lt)}mt!=null&&He&&setRef(mt,Pe&&Pe.ref,Ye,Se||Pe,!Se)},$=(Pe,Se,Le,qe)=>{if(Pe==null)l(Se.el=f(Se.children),Le,qe);else{const He=Se.el=Pe.el;Se.children!==Pe.children&&y(He,Se.children)}},V=(Pe,Se,Le,qe)=>{Pe==null?l(Se.el=m(Se.children||""),Le,qe):Se.el=Pe.el},B=(Pe,Se,Le,qe)=>{[Pe.el,Pe.anchor]=x(Pe.children,Se,Le,qe,Pe.el,Pe.anchor)},O=({el:Pe,anchor:Se},Le,qe)=>{let He;for(;Pe&&Pe!==Se;)He=P(Pe),l(Pe,Le,qe),Pe=He;l(Se,Le,qe)},L=({el:Pe,anchor:Se})=>{let Le;for(;Pe&&Pe!==Se;)Le=P(Pe),c(Pe),Pe=Le;c(Se)},F=(Pe,Se,Le,qe,He,Ye,ot,et,Qe)=>{Se.type==="svg"?ot="svg":Se.type==="math"&&(ot="mathml"),Pe==null?j(Se,Le,qe,He,Ye,ot,et,Qe):Y(Pe,Se,He,Ye,ot,et,Qe)},j=(Pe,Se,Le,qe,He,Ye,ot,et)=>{let Qe,Ze;const{props:mt,shapeFlag:at,transition:ht,dirs:dt}=Pe;if(Qe=Pe.el=d(Pe.type,Ye,mt&&mt.is,mt),at&8?E(Qe,Pe.children):at&16&&G(Pe.children,Qe,null,qe,He,resolve
vendor: 6,517 bytes, line 18
18ChildrenNamespace(Pe,Ye),ot,et),dt&&invokeDirectiveHook(Pe,null,qe,"created"),U(Qe,Pe,Pe.scopeId,ot,qe),mt){for(const At in mt)At!=="value"&&!isReservedProp(At)&&u(Qe,At,null,mt[At],Ye,qe);"value"in mt&&u(Qe,"value",null,mt.value,Ye),(Ze=mt.onVnodeBeforeMount)&&invokeVNodeHook(Ze,qe,Pe)}dt&&invokeDirectiveHook(Pe,null,qe,"beforeMount");const bt=needTransition(He,ht);bt&&ht.beforeEnter(Qe),l(Qe,Se,Le),((Ze=mt&&mt.onVnodeMounted)||bt||dt)&&queuePostRenderEffect(()=>{Ze&&invokeVNodeHook(Ze,qe,Pe),bt&&ht.enter(Qe),dt&&invokeDirectiveHook(Pe,null,qe,"mounted")},He)},U=(Pe,Se,Le,qe,He)=>{if(Le&&R(Pe,Le),qe)for(let Ye=0;Ye<qe.length;Ye++)R(Pe,qe[Ye]);if(He){let Ye=He.subTree;if(Se===Ye||isSuspense(Ye.type)&&(Ye.ssContent===Se||Ye.ssFallback===Se)){const ot=He.vnode;U(Pe,ot,ot.scopeId,ot.slotScopeIds,He.parent)}}},G=(Pe,Se,Le,qe,He,Ye,ot,et,Qe=0)=>{for(let Ze=Qe;Ze<Pe.length;Ze++){const mt=Pe[Ze]=et?cloneIfMounted(Pe[Ze]):normalizeVNode(Pe[Ze]);M(null,mt,Se,Le,qe,He,Ye,ot,et)}},Y=(Pe,Se,Le,qe,He,Ye,ot)=>{const et=Se.el=Pe.el;let{patchFlag:Qe,dynamicChildren:Ze,dirs:mt}=Se;Qe|=Pe.patchFlag&16;const at=Pe.props||EMPTY_OBJ,ht=Se.props||EMPTY_OBJ;let dt;if(Le&&toggleRecurse(Le,!1),(dt=ht.onVnodeBeforeUpdate)&&invokeVNodeHook(dt,Le,Se,Pe),mt&&invokeDirectiveHook(Se,Pe,Le,"beforeUpdate"),Le&&toggleRecurse(Le,!0),(at.innerHTML&&ht.innerHTML==null||at.textContent&&ht.textContent==null)&&E(et,""),Ze?te(Pe.dynamicChildren,Ze,et,Le,qe,resolveChildrenNamespace(Se,He),Ye):ot||Q(Pe,Se,et,null,Le,qe,resolveChildrenNamespace(Se,He),Ye,!1),Qe>0){if(Qe&16)ve(et,at,ht,Le,He);else if(Qe&2&&at.class!==ht.class&&u(et,"class",null,ht.class,He),Qe&4&&u(et,"style",at.style,ht.style,He),Qe&8){const bt=Se.dynamicProps;for(let At=0;At<bt.length;At++){const Ct=bt[At],qt=at[Ct],Yt=ht[Ct];(Yt!==qt||Ct==="value")&&u(et,Ct,qt,Yt,He,Le)}}Qe&1&&Pe.children!==Se.children&&E(et,Se.children)}else!ot&&Ze==null&&ve(et,at,ht,Le,He);((dt=ht.onVnodeUpdated)||mt)&&queuePostRenderEffect(()=>{dt&&invokeVNodeHook(dt,Le,Se,Pe),mt&&invokeDirectiveHook(Se,Pe,Le,"updated")},qe)},te=(Pe,Se,Le,qe,He,Ye,ot)=>{for(let et=0;et<Se.length;et++){const Qe=Pe[et],Ze=Se[et],mt=Qe.el&&(Qe.type===Fragment||!isSameVNodeType(Qe,Ze)||Qe.shapeFlag&70)?A(Qe.el):Le;M(Qe,Ze,mt,null,qe,He,Ye,ot,!0)}},ve=(Pe,Se,Le,qe,He)=>{if(Se!==Le){if(Se!==EMPTY_OBJ)for(const Ye in Se)!isReservedProp(Ye)&&!(Ye in Le)&&u(Pe,Ye,Se[Ye],null,He,qe);for(const Ye in Le){if(isReservedProp(Ye))continue;const ot=Le[Ye],et=Se[Ye];ot!==et&&Ye!=="value"&&u(Pe,Ye,et,ot,He,qe)}"value"in Le&&u(Pe,"value",Se.value,Le.value,He)}},J=(Pe,Se,Le,qe,He,Ye,ot,et,Qe)=>{const Ze=Se.el=Pe?Pe.el:f(""),mt=Se.anchor=Pe?Pe.anchor:f("");let{patchFlag:at,dynamicChildren:ht,slotScopeIds:dt}=Se;dt&&(et=et?et.concat(dt):dt),Pe==null?(l(Ze,Le,qe),l(mt,Le,qe),G(Se.children||[],Le,mt,He,Ye,ot,et,Qe)):at>0&&at&64&&ht&&Pe.dynamicChildren?(te(Pe.dynamicChildren,ht,Le,He,Ye,ot,et),(Se.key!=null||He&&Se===He.subTree)&&traverseStaticChildren(Pe,Se,!0)):Q(Pe,Se,Le,mt,He,Ye,ot,et,Qe)},Z=(Pe,Se,Le,qe,He,Ye,ot,et,Qe)=>{Se.slotScopeIds=et,Pe==null?Se.shapeFlag&512?He.ctx.activate(Se,Le,qe,ot,Qe):Me(Se,Le,qe,He,Ye,ot,Qe):ke(Pe,Se,Qe)},Me=(Pe,Se,Le,qe,He,Ye,ot)=>{const et=Pe.component=createComponentInstance(Pe,qe,He);if(isKeepAlive(Pe)&&(et.ctx.renderer=lt),setupComponent(et,!1,ot),et.asyncDep){if(He&&He.registerDep(et,se,ot),!Pe.el){const Qe=et.subTree=createVNode(Comment);V(null,Qe,Se,Le)}}else se(et,Pe,Se,Le,He,Ye,ot)},ke=(Pe,Se,Le)=>{const qe=Se.component=Pe.component;if(shouldUpdateComponent(Pe,Se,Le))if(qe.asyncDep&&!qe.asyncResolved){xe(qe,Se,Le);return}else qe.next=Se,qe.update();else Se.el=Pe.el,qe.vnode=Se},se=(Pe,Se,Le,qe,He,Ye,ot)=>{const et=()=>{if(Pe.isMounted){let{next:at,bu:ht,u:dt,parent:bt,vnode:At}=Pe;{const tr=locateNonHydratedAsyncRoot(Pe);if(tr){at&&(at.el=At.el,xe(Pe,at,ot)),tr.asyncDep.then(()=>{Pe.isUnmounted||et()});return}}let Ct=at,qt;toggleRecurse(Pe,!1),at?(at.el=At.el,xe(Pe,at,ot)):at=At,ht&&invokeArrayFns(ht),(qt=at.props&&at.props.onVnodeBeforeUpdate)&&invokeVNodeHook(qt,bt,at,At),toggleRecurse(Pe,!0);const Yt=renderComponentRoot(Pe),Xt=Pe.subTree;Pe.subTree=Yt,M(Xt,Yt,A(Xt.el),je(Xt),Pe,He,Ye),at.el=Yt.el,Ct===null&&updateHOCHostEl(Pe,Yt.el),dt&&queuePostRenderEffect(dt,He),(qt=at.props&&at.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(qt,bt,at,At),He)}else{let at;const{el:ht,props:dt}=Se,{bm:bt,m:At,parent:Ct,root:qt,type:Yt}=Pe,Xt=isAsyncWrapper(Se);if(toggleRecurse(Pe,!1),bt&&invokeArrayFns(bt),!Xt&&(at=dt&&dt.onVnodeBeforeMount)&&invokeVNodeHook(at,Ct,Se),toggleRecurse(Pe,!0),ht&&ze){const tr=()=>{Pe.subTree=renderComponentRoot(Pe),ze(ht,Pe.subTree,Pe,He,null)};Xt&&Yt.__asyncHydrate?Yt.__asyncHydrate(ht,Pe,tr):tr()}else{qt.ce&&qt.ce._injectChildStyle(Yt);const tr=Pe.subTree=renderComponentRoot(Pe);M(null,tr,Le,qe,Pe,He,Ye),Se.el=tr.el}if(At&&queuePostRenderEffect(At,He),!Xt&&(at=dt&&dt.onVnodeMounted)){const tr=Se;queuePostRenderEffect(()=>invokeVNodeHook(at,Ct,tr),He)}(Se.shapeFlag&256||Ct&&isAsyncWrapper(Ct.vnode)&&Ct.vnode.shapeFlag&256)&&Pe.a&&queuePostRenderEffect(Pe.a,He),Pe.isMounted=!0,Se=Le=qe=null}};Pe.scope.on();const Qe=Pe.effect=new ReactiveEffect(et);Pe.scope.off();const Ze=Pe.update=Qe.run.bind(Qe),mt=Pe.job=Qe.runIfDirty.bind(Qe);mt.i=Pe,mt.id=Pe.uid,Qe.scheduler=()=>queueJob(mt),toggleRecurse(Pe,!0),Ze()},xe=(Pe,Se,Le)=>{Se.component=Pe;const qe=Pe.vnode.props;Pe.vnode=Se,Pe.next=null,updateProps(Pe,Se.props,qe,Le),updateSlots(Pe,Se.children,Le),pauseTracking(),flushPreFlushCbs(Pe),resetTracking()},Q=(Pe,Se,Le,qe,He,Ye,ot,et,Qe=!1)=>{const Ze=Pe&&Pe.children,mt=Pe?Pe.shapeFlag:0,at=Se.children,{patchFlag:ht,shapeFlag:dt}=Se;if(ht>0){if(ht&128){Fe(Ze,at,Le,qe,He,Ye,ot,et,Qe);return}else if(ht&256){ie(Ze,at,Le,qe,He,Ye,ot,et,Qe);return}}dt&8?(mt&16&&yt(Ze,He,Ye),at!==Ze&&E(Le,at)):mt&16?dt&16?Fe(Ze,at,Le,qe,He,Ye,ot,et,Qe):yt(Ze,He,Ye,!0):(mt&8&&E(Le,""),dt&16&&G(at,Le,qe,He,Ye,ot,et,Qe))},ie=(Pe,Se,Le,qe,He,Ye,ot,et,Qe)=>{Pe=Pe||EMPTY_ARR,Se=Se||EMPTY_ARR;const Ze=Pe.length,mt=Se.length,at=Math.min(Ze,mt);let ht;for(ht=0;ht<at;ht++){const dt=Se[ht]=Qe?cloneIfMounted(Se[ht]):normalizeVNode(Se[ht]);M(Pe[ht],dt,Le,null,He,Ye,ot,et,Qe)}Ze>mt?yt(Pe,He,Ye,!0,!1,at):G(Se,Le,qe,He,Ye,ot,et,Qe,at)},Fe=(Pe,Se,Le,qe,He,Ye,ot,et,Qe)=>{let Ze=0;const mt=Se.length;let at=Pe.length-1,ht=mt-1;for(;Ze<=at&&Ze<=ht;){const dt=Pe[Ze],bt=Se[Ze]=Qe?cloneIfMounted(Se[Ze]):normalizeVNode(Se[Ze]);if(isSameVNodeType(dt,bt))M(dt,bt,Le,null,He,Ye,ot,et,Qe);else break;Ze++}for(;Ze<=at&&Ze<=ht;
vendor: 4,740 bytes, line 18
18){const dt=Pe[at],bt=Se[ht]=Qe?cloneIfMounted(Se[ht]):normalizeVNode(Se[ht]);if(isSameVNodeType(dt,bt))M(dt,bt,Le,null,He,Ye,ot,et,Qe);else break;at--,ht--}if(Ze>at){if(Ze<=ht){const dt=ht+1,bt=dt<mt?Se[dt].el:qe;for(;Ze<=ht;)M(null,Se[Ze]=Qe?cloneIfMounted(Se[Ze]):normalizeVNode(Se[Ze]),Le,bt,He,Ye,ot,et,Qe),Ze++}}else if(Ze>ht)for(;Ze<=at;)nt(Pe[Ze],He,Ye,!0),Ze++;else{const dt=Ze,bt=Ze,At=new Map;for(Ze=bt;Ze<=ht;Ze++){const ir=Se[Ze]=Qe?cloneIfMounted(Se[Ze]):normalizeVNode(Se[Ze]);ir.key!=null&&At.set(ir.key,Ze)}let Ct,qt=0;const Yt=ht-bt+1;let Xt=!1,tr=0;const Or=new Array(Yt);for(Ze=0;Ze<Yt;Ze++)Or[Ze]=0;for(Ze=dt;Ze<=at;Ze++){const ir=Pe[Ze];if(qt>=Yt){nt(ir,He,Ye,!0);continue}let pr;if(ir.key!=null)pr=At.get(ir.key);else for(Ct=bt;Ct<=ht;Ct++)if(Or[Ct-bt]===0&&isSameVNodeType(ir,Se[Ct])){pr=Ct;break}pr===void 0?nt(ir,He,Ye,!0):(Or[pr-bt]=Ze+1,pr>=tr?tr=pr:Xt=!0,M(ir,Se[pr],Le,null,He,Ye,ot,et,Qe),qt++)}const Qr=Xt?getSequence(Or):EMPTY_ARR;for(Ct=Qr.length-1,Ze=Yt-1;Ze>=0;Ze--){const ir=bt+Ze,pr=Se[ir],wn=ir+1<mt?Se[ir+1].el:qe;Or[Ze]===0?M(null,pr,Le,wn,He,Ye,ot,et,Qe):Xt&&(Ct<0||Ze!==Qr[Ct]?Ne(pr,Le,wn,2):Ct--)}}},Ne=(Pe,Se,Le,qe,He=null)=>{const{el:Ye,type:ot,transition:et,children:Qe,shapeFlag:Ze}=Pe;if(Ze&6){Ne(Pe.component.subTree,Se,Le,qe);return}if(Ze&128){Pe.suspense.move(Se,Le,qe);return}if(Ze&64){ot.move(Pe,Se,Le,lt);return}if(ot===Fragment){l(Ye,Se,Le);for(let at=0;at<Qe.length;at++)Ne(Qe[at],Se,Le,qe);l(Pe.anchor,Se,Le);return}if(ot===Static){O(Pe,Se,Le);return}if(qe!==2&&Ze&1&&et)if(qe===0)et.beforeEnter(Ye),l(Ye,Se,Le),queuePostRenderEffect(()=>et.enter(Ye),He);else{const{leave:at,delayLeave:ht,afterLeave:dt}=et,bt=()=>l(Ye,Se,Le),At=()=>{at(Ye,()=>{bt(),dt&&dt()})};ht?ht(Ye,bt,At):At()}else l(Ye,Se,Le)},nt=(Pe,Se,Le,qe=!1,He=!1)=>{const{type:Ye,props:ot,ref:et,children:Qe,dynamicChildren:Ze,shapeFlag:mt,patchFlag:at,dirs:ht,cacheIndex:dt}=Pe;if(at===-2&&(He=!1),et!=null&&setRef(et,null,Le,Pe,!0),dt!=null&&(Se.renderCache[dt]=void 0),mt&256){Se.ctx.deactivate(Pe);return}const bt=mt&1&&ht,At=!isAsyncWrapper(Pe);let Ct;if(At&&(Ct=ot&&ot.onVnodeBeforeUnmount)&&invokeVNodeHook(Ct,Se,Pe),mt&6)_t(Pe.component,Le,qe);else{if(mt&128){Pe.suspense.unmount(Le,qe);return}bt&&invokeDirectiveHook(Pe,null,Se,"beforeUnmount"),mt&64?Pe.type.remove(Pe,Se,Le,lt,qe):Ze&&!Ze.hasOnce&&(Ye!==Fragment||at>0&&at&64)?yt(Ze,Se,Le,!1,!0):(Ye===Fragment&&at&384||!He&&mt&16)&&yt(Qe,Se,Le),qe&&ct(Pe)}(At&&(Ct=ot&&ot.onVnodeUnmounted)||bt)&&queuePostRenderEffect(()=>{Ct&&invokeVNodeHook(Ct,Se,Pe),bt&&invokeDirectiveHook(Pe,null,Se,"unmounted")},Le)},ct=Pe=>{const{type:Se,el:Le,anchor:qe,transition:He}=Pe;if(Se===Fragment){pt(Le,qe);return}if(Se===Static){L(Pe);return}const Ye=()=>{c(Le),He&&!He.persisted&&He.afterLeave&&He.afterLeave()};if(Pe.shapeFlag&1&&He&&!He.persisted){const{leave:ot,delayLeave:et}=He,Qe=()=>ot(Le,Ye);et?et(Pe.el,Ye,Qe):Qe()}else Ye()},pt=(Pe,Se)=>{let Le;for(;Pe!==Se;)Le=P(Pe),c(Pe),Pe=Le;c(Se)},_t=(Pe,Se,Le)=>{const{bum:qe,scope:He,job:Ye,subTree:ot,um:et,m:Qe,a:Ze}=Pe;invalidateMount(Qe),invalidateMount(Ze),qe&&invokeArrayFns(qe),He.stop(),Ye&&(Ye.flags|=8,nt(ot,Pe,Se,Le)),et&&queuePostRenderEffect(et,Se),queuePostRenderEffect(()=>{Pe.isUnmounted=!0},Se),Se&&Se.pendingBranch&&!Se.isUnmounted&&Pe.asyncDep&&!Pe.asyncResolved&&Pe.suspenseId===Se.pendingId&&(Se.deps--,Se.deps===0&&Se.resolve())},yt=(Pe,Se,Le,qe=!1,He=!1,Ye=0)=>{for(let ot=Ye;ot<Pe.length;ot++)nt(Pe[ot],Se,Le,qe,He)},je=Pe=>{if(Pe.shapeFlag&6)return je(Pe.component.subTree);if(Pe.shapeFlag&128)return Pe.suspense.next();const Se=P(Pe.anchor||Pe.el),Le=Se&&Se[TeleportEndKey];return Le?P(Le):Se};let it=!1;const st=(Pe,Se,Le)=>{Pe==null?Se._vnode&&nt(Se._vnode,null,null,!0):M(Se._vnode||null,Pe,Se,null,null,null,Le),Se._vnode=Pe,it||(it=!0,flushPreFlushCbs(),flushPostFlushCbs(),it=!1)},lt={p:M,um:nt,m:Ne,r:ct,mt:Me,mc:G,pc:Q,pbc:te,n:je,o};let vt,ze;return r&&([vt,ze]=r(lt)),{render:st,hydrate:vt,createApp:createAppAPI(st,vt)}}function resolveChildrenNamespace({type:o,props:r},a){return a==="svg"&&o==="foreignObject"||a==="mathml"&&o==="annotation-xml"&&r&&r.encoding&&r.encoding.includes("html")?void 0:a}function toggleRecurse({effect:o,job:r},a){a?(o.flags|=32,r.flags|=4):(o.flags&=-33,r.flags&=-5)}function needTransition(o,r){return(!o||o&&!o.pendingBranch)&&r&&!r.persisted}function traverseStaticChildren(o,r,a=!1){const l=o.children,c=r.children;if(isArray$3(l)&&isArray$3(c))for(let u=0;u<l.length;u++){const d=l[u];let f=c[u];f.shapeFlag&1&&!f.dynamicChildren&&((f.patchFlag<=0||f.patchFlag===32)&&(f=c[u]=cloneIfMounted(c[u]),f.el=d.el),!a&&f.patchFlag!==-2&&traverseStaticChildren(d,f)),f.type===Text&&(f.el=d.el)}}function getSequence(o){const r=o.slice(),a=[0];let l,c,u,d,f;
vendor: 5,263 bytes, line 18
18const m=o.length;for(l=0;l<m;l++){const y=o[l];if(y!==0){if(c=a[a.length-1],o[c]<y){r[l]=c,a.push(l);continue}for(u=0,d=a.length-1;u<d;)f=u+d>>1,o[a[f]]<y?u=f+1:d=f;y<o[a[u]]&&(u>0&&(r[l]=a[u-1]),a[u]=l)}}for(u=a.length,d=a[u-1];u-- >0;)a[u]=d,d=r[d];return a}function locateNonHydratedAsyncRoot(o){const r=o.subTree.component;if(r)return r.asyncDep&&!r.asyncResolved?r:locateNonHydratedAsyncRoot(r)}function invalidateMount(o){if(o)for(let r=0;r<o.length;r++)o[r].flags|=8}const ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey);function watchEffect(o,r){return doWatch(o,null,r)}function watchPostEffect(o,r){return doWatch(o,null,{flush:"post"})}function watchSyncEffect(o,r){return doWatch(o,null,{flush:"sync"})}function watch(o,r,a){return doWatch(o,r,a)}function doWatch(o,r,a=EMPTY_OBJ){const{immediate:l,deep:c,flush:u,once:d}=a,f=extend$1({},a),m=r&&l||!r&&u!=="post";let y;if(isInSSRComponentSetup){if(u==="sync"){const R=useSSRContext();y=R.__watcherHandles||(R.__watcherHandles=[])}else if(!m){const R=()=>{};return R.stop=NOOP,R.resume=NOOP,R.pause=NOOP,R}}const E=currentInstance$1;f.call=(R,x,M)=>callWithAsyncErrorHandling(R,E,x,M);let A=!1;u==="post"?f.scheduler=R=>{queuePostRenderEffect(R,E&&E.suspense)}:u!=="sync"&&(A=!0,f.scheduler=(R,x)=>{x?R():queueJob(R)}),f.augmentJob=R=>{r&&(R.flags|=4),A&&(R.flags|=2,E&&(R.id=E.uid,R.i=E))};const P=watch$1(o,r,f);return isInSSRComponentSetup&&(y?y.push(P):m&&P()),P}function instanceWatch(o,r,a){const l=this.proxy,c=isString$1(o)?o.includes(".")?createPathGetter(l,o):()=>l[o]:o.bind(l,l);let u;isFunction$1(r)?u=r:(u=r.handler,a=r);const d=setCurrentInstance(this),f=doWatch(c,u.bind(l),a);return d(),f}function createPathGetter(o,r){const a=r.split(".");return()=>{let l=o;for(let c=0;c<a.length&&l;c++)l=l[a[c]];return l}}function useModel(o,r,a=EMPTY_OBJ){const l=getCurrentInstance(),c=camelize(r),u=hyphenate(r),d=getModelModifiers(o,c),f=customRef((m,y)=>{let E,A=EMPTY_OBJ,P;return watchSyncEffect(()=>{const R=o[c];hasChanged(E,R)&&(E=R,y())}),{get(){return m(),a.get?a.get(E):E},set(R){const x=a.set?a.set(R):R;if(!hasChanged(x,E)&&!(A!==EMPTY_OBJ&&hasChanged(R,A)))return;const M=l.vnode.props;M&&(r in M||c in M||u in M)&&(`onUpdate:${r}`in M||`onUpdate:${c}`in M||`onUpdate:${u}`in M)||(E=R,y()),l.emit(`update:${r}`,x),hasChanged(R,x)&&hasChanged(R,A)&&!hasChanged(x,P)&&y(),A=R,P=x}}});return f[Symbol.iterator]=()=>{let m=0;return{next(){return m<2?{value:m++?d||EMPTY_OBJ:f,done:!1}:{done:!0}}}},f}const getModelModifiers=(o,r)=>r==="modelValue"||r==="model-value"?o.modelModifiers:o[`${r}Modifiers`]||o[`${camelize(r)}Modifiers`]||o[`${hyphenate(r)}Modifiers`];function emit$1(o,r,...a){if(o.isUnmounted)return;const l=o.vnode.props||EMPTY_OBJ;let c=a;const u=r.startsWith("update:"),d=u&&getModelModifiers(l,r.slice(7));d&&(d.trim&&(c=a.map(E=>isString$1(E)?E.trim():E)),d.number&&(c=a.map(looseToNumber)));let f,m=l[f=toHandlerKey(r)]||l[f=toHandlerKey(camelize(r))];!m&&u&&(m=l[f=toHandlerKey(hyphenate(r))]),m&&callWithAsyncErrorHandling(m,o,6,c);const y=l[f+"Once"];if(y){if(!o.emitted)o.emitted={};else if(o.emitted[f])return;o.emitted[f]=!0,callWithAsyncErrorHandling(y,o,6,c)}}function normalizeEmitsOptions(o,r,a=!1){const l=r.emitsCache,c=l.get(o);if(c!==void 0)return c;const u=o.emits;let d={},f=!1;if(!isFunction$1(o)){const m=y=>{const E=normalizeEmitsOptions(y,r,!0);E&&(f=!0,extend$1(d,E))};!a&&r.mixins.length&&r.mixins.forEach(m),o.extends&&m(o.extends),o.mixins&&o.mixins.forEach(m)}return!u&&!f?(isObject$2(o)&&l.set(o,null),null):(isArray$3(u)?u.forEach(m=>d[m]=null):extend$1(d,u),isObject$2(o)&&l.set(o,d),d)}function isEmitListener(o,r){return!o||!isOn(r)?!1:(r=r.slice(2).replace(/Once$/,""),hasOwn(o,r[0].toLowerCase()+r.slice(1))||hasOwn(o,hyphenate(r))||hasOwn(o,r))}function markAttrsAccessed(){}function renderComponentRoot(o){const{type:r,vnode:a,proxy:l,withProxy:c,propsOptions:[u],slots:d,attrs:f,emit:m,render:y,renderCache:E,props:A,data:P,setupState:R,ctx:x,inheritAttrs:M}=o,$=setCurrentRenderingInstance(o);let V,B;try{if(a.shapeFlag&4){const L=c||l,F=L;V=normalizeVNode(y.call(F,L,E,A,R,P,x)),B=f}else{const L=r;V=normalizeVNode(L.length>1?L(A,{attrs:f,slots:d,emit:m}):L(A,null)),B=r.props?f:getFunctionalFallthrough(f)}}catch(L){blockStack.length=0,handleError$2(L,o,1),V=createVNode(Comment)}let O=V;if(B&&M!==!1){const L=Object.keys(B),{shapeFlag:F}=O;L.length&&F&7&&(u&&L.some(isModelListener)&&(B=filterModelListeners(B,u)),O=cloneVNode(O,B,!1,!0))}return a.dirs&&(O=cloneVNode(O,null,!1,!0),O.dirs=O.dirs?O.dirs.concat(a.dirs):a.dirs),a.transition&&setTransitionHooks(O,a.transition),V=O,setCurrentRenderingInstance($),V}function filterSingleRoot(o,r=!0){let a;for(let l=0;l<o.length;l++){const c=o[l];if(isVNode(c)){if(c.type!==Comment||c.children==="v-if"){if(a)return;a=c}}else return}return a}const getFunctionalFallthrough=o=>{let r;for(const a in o)(a==="class"||a==="style"||isOn(a))&&((r||(r={}))[a]=o[a]);return r},filterModelListeners=(o,r)=>{const a={};for(const l in o)(!isModelListener(l)||!(l.slice(9)in r))&&(a[l]=o[l]);return a};function shouldUpdateComponent(o,r,a){const{props:l,children:c,component:u}=o,{props:d,children:f,patchFlag:m}=r,y=u.emitsOptions;if(r.dirs||r.transition)return!0;
vendor: 4,338 bytes, line 18
18if(a&&m>=0){if(m&1024)return!0;if(m&16)return l?hasPropsChanged(l,d,y):!!d;if(m&8){const E=r.dynamicProps;for(let A=0;A<E.length;A++){const P=E[A];if(d[P]!==l[P]&&!isEmitListener(y,P))return!0}}}else return(c||f)&&(!f||!f.$stable)?!0:l===d?!1:l?d?hasPropsChanged(l,d,y):!0:!!d;return!1}function hasPropsChanged(o,r,a){const l=Object.keys(r);if(l.length!==Object.keys(o).length)return!0;for(let c=0;c<l.length;c++){const u=l[c];if(r[u]!==o[u]&&!isEmitListener(a,u))return!0}return!1}function updateHOCHostEl({vnode:o,parent:r},a){for(;r;){const l=r.subTree;if(l.suspense&&l.suspense.activeBranch===o&&(l.el=o.el),l===o)(o=r.vnode).el=a,r=r.parent;else break}}const isSuspense=o=>o.__isSuspense;let suspenseId=0;const SuspenseImpl={name:"Suspense",__isSuspense:!0,process(o,r,a,l,c,u,d,f,m,y){if(o==null)mountSuspense(r,a,l,c,u,d,f,m,y);else{if(u&&u.deps>0&&!o.suspense.isInFallback){r.suspense=o.suspense,r.suspense.vnode=r,r.el=o.el;return}patchSuspense(o,r,a,l,c,d,f,m,y)}},hydrate:hydrateSuspense,normalize:normalizeSuspenseChildren},Suspense=SuspenseImpl;function triggerEvent(o,r){const a=o.props&&o.props[r];isFunction$1(a)&&a()}function mountSuspense(o,r,a,l,c,u,d,f,m){const{p:y,o:{createElement:E}}=m,A=E("div"),P=o.suspense=createSuspenseBoundary(o,c,l,r,A,a,u,d,f,m);y(null,P.pendingBranch=o.ssContent,A,null,l,P,u,d),P.deps>0?(triggerEvent(o,"onPending"),triggerEvent(o,"onFallback"),y(null,o.ssFallback,r,a,l,null,u,d),setActiveBranch(P,o.ssFallback)):P.resolve(!1,!0)}function patchSuspense(o,r,a,l,c,u,d,f,{p:m,um:y,o:{createElement:E}}){const A=r.suspense=o.suspense;A.vnode=r,r.el=o.el;const P=r.ssContent,R=r.ssFallback,{activeBranch:x,pendingBranch:M,isInFallback:$,isHydrating:V}=A;if(M)A.pendingBranch=P,isSameVNodeType(P,M)?(m(M,P,A.hiddenContainer,null,c,A,u,d,f),A.deps<=0?A.resolve():$&&(V||(m(x,R,a,l,c,null,u,d,f),setActiveBranch(A,R)))):(A.pendingId=suspenseId++,V?(A.isHydrating=!1,A.activeBranch=M):y(M,c,A),A.deps=0,A.effects.length=0,A.hiddenContainer=E("div"),$?(m(null,P,A.hiddenContainer,null,c,A,u,d,f),A.deps<=0?A.resolve():(m(x,R,a,l,c,null,u,d,f),setActiveBranch(A,R))):x&&isSameVNodeType(P,x)?(m(x,P,a,l,c,A,u,d,f),A.resolve(!0)):(m(null,P,A.hiddenContainer,null,c,A,u,d,f),A.deps<=0&&A.resolve()));else if(x&&isSameVNodeType(P,x))m(x,P,a,l,c,A,u,d,f),setActiveBranch(A,P);else if(triggerEvent(r,"onPending"),A.pendingBranch=P,P.shapeFlag&512?A.pendingId=P.component.suspenseId:A.pendingId=suspenseId++,m(null,P,A.hiddenContainer,null,c,A,u,d,f),A.deps<=0)A.resolve();else{const{timeout:B,pendingId:O}=A;B>0?setTimeout(()=>{A.pendingId===O&&A.fallback(R)},B):B===0&&A.fallback(R)}}function createSuspenseBoundary(o,r,a,l,c,u,d,f,m,y,E=!1){const{p:A,m:P,um:R,n:x,o:{parentNode:M,remove:$}}=y;let V;const B=isVNodeSuspensible(o);B&&r&&r.pendingBranch&&(V=r.pendingId,r.deps++);const O=o.props?toNumber$2(o.props.timeout):void 0,L=u,F={vnode:o,parent:r,parentComponent:a,namespace:d,container:l,hiddenContainer:c,deps:0,pendingId:suspenseId++,timeout:typeof O=="number"?O:-1,activeBranch:null,pendingBranch:null,isInFallback:!E,isHydrating:E,isUnmounted:!1,effects:[],resolve(j=!1,U=!1){const{vnode:G,activeBranch:Y,pendingBranch:te,pendingId:ve,effects:J,parentComponent:Z,container:Me}=F;let ke=!1;F.isHydrating?F.isHydrating=!1:j||(ke=Y&&te.transition&&te.transition.mode==="out-in",ke&&(Y.transition.afterLeave=()=>{ve===F.pendingId&&(P(te,Me,u===L?x(Y):u,0),queuePostFlushCb(J))}),Y&&(M(Y.el)===Me&&(u=x(Y)),R(Y,Z,F,!0)),ke||P(te,Me,u,0)),setActiveBranch(F,te),F.pendingBranch=null,F.isInFallback=!1;let se=F.parent,xe=!1;for(;se;){if(se.pendingBranch){se.effects.push(...J),xe=!0;break}se=se.parent}!xe&&!ke&&queuePostFlushCb(J),F.effects=[],B&&r&&r.pendingBranch&&V===r.pendingId&&(r.deps--,r.deps===0&&!U&&r.resolve()),triggerEvent(G,"onResolve")},fallback(j){if(!F.pendingBranch)return;const{vnode:U,activeBranch:G,parentComponent:Y,container:te,namespace:ve}=F;triggerEvent(U,"onFallback");const J=x(G),Z=()=>{F.isInFallback&&(A(null,j,te,J,Y,null,ve,f,m),setActiveBranch(F,j))},Me=j.transition&&j.transition.mode==="out-in";Me&&(G.transition.afterLeave=Z),F.isInFallback=!0,R(G,Y,null,!0),Me||Z()},move(j,U,G){F.activeBranch&&P(F.activeBranch,j,U,G),F.container=j},next(){return F.activeBranch&&x(F.activeBranch)},registerDep(j,U,G){const Y=!!F.pendingBranch;Y&&F.deps++;const te=j.vnode.el;
vendor: 1,061 bytes, line 18
18j.asyncDep.catch(ve=>{handleError$2(ve,j,0)}).then(ve=>{if(j.isUnmounted||F.isUnmounted||F.pendingId!==j.suspenseId)return;j.asyncResolved=!0;const{vnode:J}=j;handleSetupResult(j,ve,!1),te&&(J.el=te);const Z=!te&&j.subTree.el;U(j,J,M(te||j.subTree.el),te?null:x(j.subTree),F,d,G),Z&&$(Z),updateHOCHostEl(j,J.el),Y&&--F.deps===0&&F.resolve()})},unmount(j,U){F.isUnmounted=!0,F.activeBranch&&R(F.activeBranch,a,j,U),F.pendingBranch&&R(F.pendingBranch,a,j,U)}};return F}function hydrateSuspense(o,r,a,l,c,u,d,f,m){const y=r.suspense=createSuspenseBoundary(r,l,a,o.parentNode,document.createElement("div"),null,c,u,d,f,!0),E=m(o,y.pendingBranch=r.ssContent,a,y,u,d);return y.deps===0&&y.resolve(!1,!0),E}function normalizeSuspenseChildren(o){const{shapeFlag:r,children:a}=o,l=r&32;o.ssContent=normalizeSuspenseSlot(l?a.default:a),o.ssFallback=l?normalizeSuspenseSlot(a.fallback):createVNode(Comment)}function normalizeSuspenseSlot(o){let r;if(isFunction$1(o)){const a=isBlockTreeEnabled&&o._c;a&&(o._d=!1,openBlock()),o=o(),a&&(o._d=!0,r=currentBlock,closeBlock())}
vendor: 6,622 bytes, line 18
18return isArray$3(o)&&(o=filterSingleRoot(o)),o=normalizeVNode(o),r&&!o.dynamicChildren&&(o.dynamicChildren=r.filter(a=>a!==o)),o}function queueEffectWithSuspense(o,r){r&&r.pendingBranch?isArray$3(o)?r.effects.push(...o):r.effects.push(o):queuePostFlushCb(o)}function setActiveBranch(o,r){o.activeBranch=r;const{vnode:a,parentComponent:l}=o;let c=r.el;for(;!c&&r.component;)r=r.component.subTree,c=r.el;a.el=c,l&&l.subTree===a&&(l.vnode.el=c,updateHOCHostEl(l,c))}function isVNodeSuspensible(o){const r=o.props&&o.props.suspensible;return r!=null&&r!==!1}const Fragment=Symbol.for("v-fgt"),Text=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(o=!1){blockStack.push(currentBlock=o?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(o,r=!1){isBlockTreeEnabled+=o,o<0&&currentBlock&&r&&(currentBlock.hasOnce=!0)}function setupBlock(o){return o.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&&currentBlock&&currentBlock.push(o),o}function createElementBlock(o,r,a,l,c,u){return setupBlock(createBaseVNode(o,r,a,l,c,u,!0))}function createBlock(o,r,a,l,c){return setupBlock(createVNode(o,r,a,l,c,!0))}function isVNode(o){return o?o.__v_isVNode===!0:!1}function isSameVNodeType(o,r){return o.type===r.type&&o.key===r.key}function transformVNodeArgs(o){}const normalizeKey=({key:o})=>o??null,normalizeRef=({ref:o,ref_key:r,ref_for:a})=>(typeof o=="number"&&(o=""+o),o!=null?isString$1(o)||isRef(o)||isFunction$1(o)?{i:currentRenderingInstance,r:o,k:r,f:!!a}:o:null);function createBaseVNode(o,r=null,a=null,l=0,c=null,u=o===Fragment?0:1,d=!1,f=!1){const m={__v_isVNode:!0,__v_skip:!0,type:o,props:r,key:r&&normalizeKey(r),ref:r&&normalizeRef(r),scopeId:currentScopeId,slotScopeIds:null,children:a,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:u,patchFlag:l,dynamicProps:c,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return f?(normalizeChildren(m,a),u&128&&o.normalize(m)):a&&(m.shapeFlag|=isString$1(a)?8:16),isBlockTreeEnabled>0&&!d&&currentBlock&&(m.patchFlag>0||u&6)&&m.patchFlag!==32&&currentBlock.push(m),m}const createVNode=_createVNode;function _createVNode(o,r=null,a=null,l=0,c=null,u=!1){if((!o||o===NULL_DYNAMIC_COMPONENT)&&(o=Comment),isVNode(o)){const f=cloneVNode(o,r,!0);return a&&normalizeChildren(f,a),isBlockTreeEnabled>0&&!u&&currentBlock&&(f.shapeFlag&6?currentBlock[currentBlock.indexOf(o)]=f:currentBlock.push(f)),f.patchFlag=-2,f}if(isClassComponent(o)&&(o=o.__vccOpts),r){r=guardReactiveProps(r);let{class:f,style:m}=r;f&&!isString$1(f)&&(r.class=normalizeClass(f)),isObject$2(m)&&(isProxy(m)&&!isArray$3(m)&&(m=extend$1({},m)),r.style=normalizeStyle(m))}const d=isString$1(o)?1:isSuspense(o)?128:isTeleport(o)?64:isObject$2(o)?4:isFunction$1(o)?2:0;return createBaseVNode(o,r,a,l,c,d,u,!0)}function guardReactiveProps(o){return o?isProxy(o)||isInternalObject(o)?extend$1({},o):o:null}function cloneVNode(o,r,a=!1,l=!1){const{props:c,ref:u,patchFlag:d,children:f,transition:m}=o,y=r?mergeProps(c||{},r):c,E={__v_isVNode:!0,__v_skip:!0,type:o.type,props:y,key:y&&normalizeKey(y),ref:r&&r.ref?a&&u?isArray$3(u)?u.concat(normalizeRef(r)):[u,normalizeRef(r)]:normalizeRef(r):u,scopeId:o.scopeId,slotScopeIds:o.slotScopeIds,children:f,target:o.target,targetStart:o.targetStart,targetAnchor:o.targetAnchor,staticCount:o.staticCount,shapeFlag:o.shapeFlag,patchFlag:r&&o.type!==Fragment?d===-1?16:d|16:d,dynamicProps:o.dynamicProps,dynamicChildren:o.dynamicChildren,appContext:o.appContext,dirs:o.dirs,transition:m,component:o.component,suspense:o.suspense,ssContent:o.ssContent&&cloneVNode(o.ssContent),ssFallback:o.ssFallback&&cloneVNode(o.ssFallback),el:o.el,anchor:o.anchor,ctx:o.ctx,ce:o.ce};return m&&l&&setTransitionHooks(E,m.clone(E)),E}function createTextVNode(o=" ",r=0){return createVNode(Text,null,o,r)}function createStaticVNode(o,r){const a=createVNode(Static,null,o);return a.staticCount=r,a}function createCommentVNode(o="",r=!1){return r?(openBlock(),createBlock(Comment,null,o)):createVNode(Comment,null,o)}function normalizeVNode(o){return o==null||typeof o=="boolean"?createVNode(Comment):isArray$3(o)?createVNode(Fragment,null,o.slice()):isVNode(o)?cloneIfMounted(o):createVNode(Text,null,String(o))}function cloneIfMounted(o){return o.el===null&&o.patchFlag!==-1||o.memo?o:cloneVNode(o)}function normalizeChildren(o,r){let a=0;const{shapeFlag:l}=o;if(r==null)r=null;else if(isArray$3(r))a=16;else if(typeof r=="object")if(l&65){const c=r.default;c&&(c._c&&(c._d=!1),normalizeChildren(o,c()),c._c&&(c._d=!0));return}else{a=32;const c=r._;!c&&!isInternalObject(r)?r._ctx=currentRenderingInstance:c===3&&currentRenderingInstance&&(currentRenderingInstance.slots._===1?r._=1:(r._=2,o.patchFlag|=1024))}else isFunction$1(r)?(r={default:r,_ctx:currentRenderingInstance},a=32):(r=String(r),l&64?(a=16,r=[createTextVNode(r)]):a=8);o.children=r,o.shapeFlag|=a}function mergeProps(...o){const r={};for(let a=0;a<o.length;a++){const l=o[a];for(const c in l)if(c==="class")r.class!==l.class&&(r.class=normalizeClass([r.class,l.class]));else if(c==="style")r.style=normalizeStyle([r.style,l.style]);else if(isOn(c)){const u=r[c],d=l[c];d&&u!==d&&!(isArray$3(u)&&u.includes(d))&&(r[c]=u?[].concat(u,d):d)}else c!==""&&(r[c]=l[c])}return r}function invokeVNodeHook(o,r,a,l=null){callWithAsyncErrorHandling(o,r,7,[a,l])}const emptyAppContext=createAppContext();let uid=0;function createComponentInstance(o,r,a){const l=o.type,c=(r?r.appContext:o.appContext)||emptyAppContext,u={uid:uid++,vnode:o,type:l,parent:r,appContext:c,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new EffectScope(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:r?r.provides:Object.create(c.provides),ids:r?r.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(l,c),emitsOptions:normalizeEmitsOptions(l,c),emit:null,emitted:null,propsDefaults:EMPTY_OBJ,inheritAttrs:l.inheritAttrs,ctx:EMPTY_OBJ,data:EMPTY_OBJ,props:EMPTY_OBJ,attrs:EMPTY_OBJ,slots:EMPTY_OBJ,refs:EMPTY_OBJ,setupState:EMPTY_OBJ,setupContext:null,suspense:a,suspenseId:a?a.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,
vendor: 4,872 bytes, lines 18-21
18sp:null};return u.ctx={_:u},u.root=r?r.root:u,u.emit=emit$1.bind(null,u),o.ce&&o.ce(u),u}let currentInstance$1=null;const getCurrentInstance=()=>currentInstance$1||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const o=getGlobalThis(),r=(a,l)=>{let c;return(c=o[a])||(c=o[a]=[]),c.push(l),u=>{c.length>1?c.forEach(d=>d(u)):c[0](u)}};internalSetCurrentInstance=r("__VUE_INSTANCE_SETTERS__",a=>currentInstance$1=a),setInSSRSetupState=r("__VUE_SSR_SETTERS__",a=>isInSSRComponentSetup=a)}const setCurrentInstance=o=>{const r=currentInstance$1;return internalSetCurrentInstance(o),o.scope.on(),()=>{o.scope.off(),internalSetCurrentInstance(r)}},unsetCurrentInstance=()=>{currentInstance$1&&currentInstance$1.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(o){return o.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(o,r=!1,a=!1){r&&setInSSRSetupState(r);const{props:l,children:c}=o.vnode,u=isStatefulComponent(o);initProps(o,l,u,r),initSlots(o,c,a);const d=u?setupStatefulComponent(o,r):void 0;return r&&setInSSRSetupState(!1),d}function setupStatefulComponent(o,r){const a=o.type;o.accessCache=Object.create(null),o.proxy=new Proxy(o.ctx,PublicInstanceProxyHandlers);const{setup:l}=a;if(l){pauseTracking();const c=o.setupContext=l.length>1?createSetupContext(o):null,u=setCurrentInstance(o),d=callWithErrorHandling(l,o,0,[o.props,c]),f=isPromise$1(d);if(resetTracking(),u(),(f||o.sp)&&!isAsyncWrapper(o)&&markAsyncBoundary(o),f){if(d.then(unsetCurrentInstance,unsetCurrentInstance),r)return d.then(m=>{handleSetupResult(o,m,r)}).catch(m=>{handleError$2(m,o,0)});o.asyncDep=d}else handleSetupResult(o,d,r)}else finishComponentSetup(o,r)}function handleSetupResult(o,r,a){isFunction$1(r)?o.type.__ssrInlineRender?o.ssrRender=r:o.render=r:isObject$2(r)&&(o.setupState=proxyRefs(r)),finishComponentSetup(o,a)}let compile$1,installWithProxy;function registerRuntimeCompiler(o){compile$1=o,installWithProxy=r=>{r.render._rc&&(r.withProxy=new Proxy(r.ctx,RuntimeCompiledPublicInstanceProxyHandlers))}}const isRuntimeOnly=()=>!compile$1;function finishComponentSetup(o,r,a){const l=o.type;if(!o.render){if(!r&&compile$1&&!l.render){const c=l.template||resolveMergedOptions(o).template;if(c){const{isCustomElement:u,compilerOptions:d}=o.appContext.config,{delimiters:f,compilerOptions:m}=l,y=extend$1(extend$1({isCustomElement:u,delimiters:f},d),m);l.render=compile$1(c,y)}}o.render=l.render||NOOP,installWithProxy&&installWithProxy(o)}{const c=setCurrentInstance(o);pauseTracking();try{applyOptions(o)}finally{resetTracking(),c()}}}const attrsProxyHandlers={get(o,r){return track(o,"get",""),o[r]}};function createSetupContext(o){const r=a=>{o.exposed=a||{}};return{attrs:new Proxy(o.attrs,attrsProxyHandlers),slots:o.slots,emit:o.emit,expose:r}}function getComponentPublicInstance(o){return o.exposed?o.exposeProxy||(o.exposeProxy=new Proxy(proxyRefs(markRaw(o.exposed)),{get(r,a){if(a in r)return r[a];if(a in publicPropertiesMap)return publicPropertiesMap[a](o)},has(r,a){return a in r||a in publicPropertiesMap}})):o.proxy}const classifyRE=/(?:^|[-_])(\w)/g,classify=o=>o.replace(classifyRE,r=>r.toUpperCase()).replace(/[-_]/g,"");function getComponentName(o,r=!0){return isFunction$1(o)?o.displayName||o.name:o.name||r&&o.__name}function formatComponentName(o,r,a=!1){let l=getComponentName(r);if(!l&&r.__file){const c=r.__file.match(/([^/\\]+)\.\w+$/);c&&(l=c[1])}if(!l&&o&&o.parent){const c=u=>{for(const d in u)if(u[d]===r)return d};l=c(o.components||o.parent.type.components)||c(o.appContext.components)}return l?classify(l):a?"App":"Anonymous"}function isClassComponent(o){return isFunction$1(o)&&"__vccOpts"in o}const computed=(o,r)=>computed$1(o,r,isInSSRComponentSetup);function h(o,r,a){const l=arguments.length;return l===2?isObject$2(r)&&!isArray$3(r)?isVNode(r)?createVNode(o,null,[r]):createVNode(o,r):createVNode(o,null,r):(l>3?a=Array.prototype.slice.call(arguments,2):l===3&&isVNode(a)&&(a=[a]),createVNode(o,r,a))}function initCustomFormatter(){}function withMemo(o,r,a,l){const c=a[l];if(c&&isMemoSame(c,o))return c;const u=r();return u.memo=o.slice(),u.cacheIndex=l,a[l]=u}function isMemoSame(o,r){const a=o.memo;if(a.length!=r.length)return!1;for(let l=0;l<a.length;l++)if(hasChanged(a[l],r[l]))return!1;return isBlockTreeEnabled>0&&currentBlock&&currentBlock.push(o),!0}const version$9="3.5.13",warn$3=NOOP,ErrorTypeStrings=ErrorTypeStrings$1,devtools=devtools$1,setDevtoolsHook=setDevtoolsHook$1,_ssrUtils={createComponentInstance,setupComponent,renderComponentRoot,setCurrentRenderingInstance,isVNode,normalizeVNode,getComponentPublicInstance,ensureValidVNode,pushWarningContext,popWarningContext},ssrUtils=_ssrUtils,resolveFilter=null,compatUtils=null,DeprecationTypes=null;/**
19* @vue/runtime-dom v3.5.13
20* (c) 2018-present Yuxi (Evan) You and Vue contributors
21* @license MIT
22**/let policy;const tt=typeof window<"u"&&window.trustedTypes;if(tt)try{policy=tt.createPolicy("vue",{createHTML:o=>o})}catch{}const unsafeToTrustedHTML=policy?o=>policy.createHTML(o):o=>o,svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc$1=typeof document<"u"?document:null,templateContainer=doc$1&&doc$1.createElement("template"),nodeOps={insert:(o,r,a)=>{r.insertBefore(o,a||null)},remove:o=>{const r=o.parentNode;r&&r.removeChild(o)},createElement:(o,r,a,l)=>{const c=r==="svg"?doc$1.createElementNS(svgNS,o):r==="mathml"?doc$1.createElementNS(mathmlNS,o):a?doc$1.createElement(o,{is:a}):doc$1.createElement(o);return o==="select"&&l&&l.multiple!=null&&c.setAttribute("multiple",l.multiple),c},createText:o=>doc$1.createTextNode(o),createComment:o=>doc$1.createComment(o),setText:(o,r)=>{o.nodeValue=r},setElementText:(o,r)=>{o.textContent=r},parentNode:o=>o.parentNode,nextSibling:o=>o.nextSibling,querySelector:o=>doc$1.querySelector(o),setScopeId(o,r){o.setAttribute(r,"")},insertStaticContent(o,r,a,l,c,u){const d=a?a.previousSibling:r.lastChild;if(c&&(c===u||c.nextSibling))for(;r.insertBefore(c.cloneNode(!0),a),!(c===u||!(c=c.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(l==="svg"?`<svg>${o}</svg>`:l==="mathml"?`<math>${o}</math>`:o);const f=templateContainer.content;if(l==="svg"||l==="mathml"){const m=f.firstChild;for(;m.firstChild;)f.appendChild(m.firstChild);f.removeChild(m)}r.insertBefore(f,a)}return[d?d.nextSibling:r.firstChild,a?a.previousSibling:r.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$1({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=o=>(o.displayName="Transition",o.props=TransitionPropsValidators,o),Transition=decorate$1((o,{slots:r})=>h(BaseTransition,resolveTransitionProps(o),r)),callHook=(o,r=[])=>{isArray$3(o)?o.forEach(a=>a(...r)):o&&o(...r)},hasExplicitCallback=o=>o?isArray$3(o)?o.some(r=>r.length>1):o.length>1:!1;function resolveTransitionProps(o){const r={};for(const J in o)J in DOMTransitionPropsValidators||(r[J]=o[J]);if(o.css===!1)return r;const{name:a="v",type:l,duration:c,enterFromClass:u=`${a}-enter-from`,enterActiveClass:d=`${a}-enter-active`,enterToClass:f=`${a}-enter-to`,appearFromClass:m=u,appearActiveClass:y=d,appearToClass:E=f,leaveFromClass:A=`${a}-leave-from`,leaveActiveClass:P=`${a}-leave-active`,leaveToClass:R=`${a}-leave-to`}=o,x=normalizeDuration(c),M=x&&x[0],$=x&&x[1],{onBeforeEnter:V,onEnter:B,onEnterCancelled:O,onLeave:L,onLeaveCancelled:F,onBeforeAppear:j=V,onAppear:U=B,onAppearCancelled:G=O}=r,Y=(J,Z,Me,ke)=>{J._enterCancelled=ke,removeTransitionClass(J,Z?E:f),removeTransitionClass(J,Z?y:d),Me&&Me()},te=(J,Z)=>{J._isLeaving=!1,removeTransitionClass(J,A),removeTransitionClass(J,R),removeTransitionClass(J,P),Z&&Z()},ve=J=>(Z,Me)=>{const ke=J?U:B,se=()=>Y(Z,J,Me);callHook(ke,[Z,se]),nextFrame(()=>{removeTransitionClass(Z,J?m:u),addTransitionClass(Z,J?E:f),hasExplicitCallback(ke)||whenTransitionEnds(Z,l,M,se)})};return extend$1(r,{onBeforeEnter(J){callHook(V,[J]),addTransitionClass(J,u),addTransitionClass(J,d)},onBeforeAppear(J){callHook(j,[J]),addTransitionClass(J,m),addTransitionClass(J,y)},onEnter:ve(!1),onAppear:ve(!0),onLeave(J,Z){J._isLeaving=!0;const Me=()=>te(J,Z);addTransitionClass(J,A),J._enterCancelled?(addTransitionClass(J,P),forceReflow()):(forceReflow(),addTransitionClass(J,P)),nextFrame(()=>{J._isLeaving&&(removeTransitionClass(J,A),addTransitionClass(J,R),hasExplicitCallback(L)||whenTransitionEnds(J,l,$,Me))}),callHook(L,[J,Me])},onEnterCancelled(J){Y(J,!1,void 0,!0),callHook(O,[J])},onAppearCancelled(J){Y(J,!0,void 0,!0),callHook(G,[J])},onLeaveCancelled(J){te(J),callHook(F,[J])}})}
vendor: 9,662 bytes, line 22
22function normalizeDuration(o){if(o==null)return null;if(isObject$2(o))return[NumberOf(o.enter),NumberOf(o.leave)];{const r=NumberOf(o);return[r,r]}}function NumberOf(o){return toNumber$2(o)}function addTransitionClass(o,r){r.split(/\s+/).forEach(a=>a&&o.classList.add(a)),(o[vtcKey]||(o[vtcKey]=new Set)).add(r)}function removeTransitionClass(o,r){r.split(/\s+/).forEach(l=>l&&o.classList.remove(l));const a=o[vtcKey];a&&(a.delete(r),a.size||(o[vtcKey]=void 0))}function nextFrame(o){requestAnimationFrame(()=>{requestAnimationFrame(o)})}let endId=0;function whenTransitionEnds(o,r,a,l){const c=o._endId=++endId,u=()=>{c===o._endId&&l()};if(a!=null)return setTimeout(u,a);const{type:d,timeout:f,propCount:m}=getTransitionInfo(o,r);if(!d)return l();const y=d+"end";let E=0;const A=()=>{o.removeEventListener(y,P),u()},P=R=>{R.target===o&&++E>=m&&A()};setTimeout(()=>{E<m&&A()},f+1),o.addEventListener(y,P)}function getTransitionInfo(o,r){const a=window.getComputedStyle(o),l=x=>(a[x]||"").split(", "),c=l(`${TRANSITION}Delay`),u=l(`${TRANSITION}Duration`),d=getTimeout(c,u),f=l(`${ANIMATION}Delay`),m=l(`${ANIMATION}Duration`),y=getTimeout(f,m);let E=null,A=0,P=0;r===TRANSITION?d>0&&(E=TRANSITION,A=d,P=u.length):r===ANIMATION?y>0&&(E=ANIMATION,A=y,P=m.length):(A=Math.max(d,y),E=A>0?d>y?TRANSITION:ANIMATION:null,P=E?E===TRANSITION?u.length:m.length:0);const R=E===TRANSITION&&/\b(transform|all)(,|$)/.test(l(`${TRANSITION}Property`).toString());return{type:E,timeout:A,propCount:P,hasTransform:R}}function getTimeout(o,r){for(;o.length<r.length;)o=o.concat(o);return Math.max(...r.map((a,l)=>toMs(a)+toMs(o[l])))}function toMs(o){return o==="auto"?0:Number(o.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(o,r,a){const l=o[vtcKey];l&&(r=(r?[r,...l]:[...l]).join(" ")),r==null?o.removeAttribute("class"):a?o.setAttribute("class",r):o.className=r}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),vShow={beforeMount(o,{value:r},{transition:a}){o[vShowOriginalDisplay]=o.style.display==="none"?"":o.style.display,a&&r?a.beforeEnter(o):setDisplay(o,r)},mounted(o,{value:r},{transition:a}){a&&r&&a.enter(o)},updated(o,{value:r,oldValue:a},{transition:l}){!r!=!a&&(l?r?(l.beforeEnter(o),setDisplay(o,!0),l.enter(o)):l.leave(o,()=>{setDisplay(o,!1)}):setDisplay(o,r))},beforeUnmount(o,{value:r}){setDisplay(o,r)}};function setDisplay(o,r){o.style.display=r?o[vShowOriginalDisplay]:"none",o[vShowHidden]=!r}function initVShowForSSR(){vShow.getSSRProps=({value:o})=>{if(!o)return{style:{display:"none"}}}}const CSS_VAR_TEXT=Symbol("");function useCssVars(o){const r=getCurrentInstance();if(!r)return;const a=r.ut=(c=o(r.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${r.uid}"]`)).forEach(u=>setVarsOnNode(u,c))},l=()=>{const c=o(r.proxy);r.ce?setVarsOnNode(r.ce,c):setVarsOnVNode(r.subTree,c),a(c)};onBeforeUpdate(()=>{queuePostFlushCb(l)}),onMounted(()=>{watch(l,NOOP,{flush:"post"});const c=new MutationObserver(l);c.observe(r.subTree.el.parentNode,{childList:!0}),onUnmounted(()=>c.disconnect())})}function setVarsOnVNode(o,r){if(o.shapeFlag&128){const a=o.suspense;o=a.activeBranch,a.pendingBranch&&!a.isHydrating&&a.effects.push(()=>{setVarsOnVNode(a.activeBranch,r)})}for(;o.component;)o=o.component.subTree;if(o.shapeFlag&1&&o.el)setVarsOnNode(o.el,r);else if(o.type===Fragment)o.children.forEach(a=>setVarsOnVNode(a,r));else if(o.type===Static){let{el:a,anchor:l}=o;for(;a&&(setVarsOnNode(a,r),a!==l);)a=a.nextSibling}}function setVarsOnNode(o,r){if(o.nodeType===1){const a=o.style;let l="";for(const c in r)a.setProperty(`--${c}`,r[c]),l+=`--${c}: ${r[c]};`;a[CSS_VAR_TEXT]=l}}const displayRE=/(^|;)\s*display\s*:/;function patchStyle(o,r,a){const l=o.style,c=isString$1(a);let u=!1;if(a&&!c){if(r)if(isString$1(r))for(const d of r.split(";")){const f=d.slice(0,d.indexOf(":")).trim();a[f]==null&&setStyle$1(l,f,"")}else for(const d in r)a[d]==null&&setStyle$1(l,d,"");for(const d in a)d==="display"&&(u=!0),setStyle$1(l,d,a[d])}else if(c){if(r!==a){const d=l[CSS_VAR_TEXT];d&&(a+=";"+d),l.cssText=a,u=displayRE.test(a)}}else r&&o.removeAttribute("style");vShowOriginalDisplay in o&&(o[vShowOriginalDisplay]=u?l.display:"",o[vShowHidden]&&(l.display="none"))}const importantRE=/\s*!important$/;function setStyle$1(o,r,a){if(isArray$3(a))a.forEach(l=>setStyle$1(o,r,l));else if(a==null&&(a=""),r.startsWith("--"))o.setProperty(r,a);else{const l=autoPrefix(o,r);importantRE.test(a)?o.setProperty(hyphenate(l),a.replace(importantRE,""),"important"):o[l]=a}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(o,r){const a=prefixCache[r];if(a)return a;let l=camelize(r);if(l!=="filter"&&l in o)return prefixCache[r]=l;l=capitalize(l);for(let c=0;c<prefixes.length;c++){const u=prefixes[c]+l;if(u in o)return prefixCache[r]=u}return r}const xlinkNS="http://www.w3.org/1999/xlink";function patchAttr(o,r,a,l,c,u=isSpecialBooleanAttr(r)){l&&r.startsWith("xlink:")?a==null?o.removeAttributeNS(xlinkNS,r.slice(6,r.length)):o.setAttributeNS(xlinkNS,r,a):a==null||u&&!includeBooleanAttr(a)?o.removeAttribute(r):o.setAttribute(r,u?"":isSymbol(a)?String(a):a)}function patchDOMProp(o,r,a,l,c){if(r==="innerHTML"||r==="textContent"){a!=null&&(o[r]=r==="innerHTML"?unsafeToTrustedHTML(a):a);return}const u=o.tagName;if(r==="value"&&u!=="PROGRESS"&&!u.includes("-")){const f=u==="OPTION"?o.getAttribute("value")||"":o.value,m=a==null?o.type==="checkbox"?"on":"":String(a);(f!==m||!("_value"in o))&&(o.value=m),a==null&&o.removeAttribute(r),o._value=a;return}let d=!1;if(a===""||a==null){const f=typeof o[r];f==="boolean"?a=includeBooleanAttr(a):a==null&&f==="string"?(a="",d=!0):f==="number"&&(a=0,d=!0)}try{o[r]=a}catch{}d&&o.removeAttribute(c||r)}function addEventListener$1(o,r,a,l){o.addEventListener(r,a,l)}function removeEventListener(o,r,a,l){o.removeEventListener(r,a,l)}const veiKey=Symbol("_vei");function patchEvent(o,r,a,l,c=null){const u=o[veiKey]||(o[veiKey]={}),d=u[r];if(l&&d)d.value=l;else{const[f,m]=parseName(r);if(l){const y=u[r]=createInvoker(l,c);addEventListener$1(o,f,y,m)}else d&&(removeEventListener(o,f,d,m),u[r]=void 0)}}const optionsModifierRE=/(?:Once|Passive|Capture)$/;function parseName(o){let r;if(optionsModifierRE.test(o)){r={};let l;for(;l=o.match(optionsModifierRE);)o=o.slice(0,o.length-l[0].length),r[l[0].toLowerCase()]=!0}return[o[2]===":"?o.slice(3):hyphenate(o.slice(2)),r]}let cachedNow=0;const p$1=Promise.resolve(),getNow=()=>cachedNow||(p$1.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(o,r){const a=l=>{if(!l._vts)l._vts=Date.now();else if(l._vts<=a.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(l,a.value),r,5,[l])};return a.value=o,a.attached=getNow(),a}function patchStopImmediatePropagation(o,r){if(isArray$3(r)){const a=o.stopImmediatePropagation;return o.stopImmediatePropagation=()=>{a.call(o),o._stopped=!0},r.map(l=>c=>!c._stopped&&l&&l(c))}else return r}const isNativeOn=o=>o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o.charCodeAt(2)>96&&o.charCodeAt(2)<123,patchProp=(o,r,a,l,c,u)=>{const d=c==="svg";r==="class"?patchClass(o,l,d):r==="style"?patchStyle(o,a,l):isOn(r)?isModelListener(r)||patchEvent(o,r,a,l,u):(r[0]==="."?(r=r.slice(1),!0):r[0]==="^"?(r=r.slice(1),!1):shouldSetAsProp(o,r,l,d))?(patchDOMProp(o,r,l),!o.tagName.includes("-")&&(r==="value"||r==="checked"||r==="selected")&&patchAttr(o,r,l,d,u,r!=="value")):o._isVueCE&&(/[A-Z]/.test(r)||!isString$1(l))?patchDOMProp(o,camelize(r),l,u,r):(r==="true-value"?o._trueValue=l:r==="false-value"&&(o._falseValue=l),patchAttr(o,r,l,d))};function shouldSetAsProp(o,r,a,l){if(l)return!!(r==="innerHTML"||r==="textContent"||r in o&&isNativeOn(r)&&isFunction$1(a));if(r==="spellcheck"||r==="draggable"||r==="translate"||r==="form"||r==="list"&&o.tagName==="INPUT"||r==="type"&&o.tagName==="TEXTAREA")return!1;if(r==="width"||r==="height"){const c=o.tagName;if(c==="IMG"||c==="VIDEO"||c==="CANVAS"||c==="SOURCE")return!1}return isNativeOn(r)&&isString$1(a)?!1:r in o}const REMOVAL={};/*! #__NO_SIDE_EFFECTS__ */function defineCustomElement(o,r,a){const l=defineComponent(o,r);isPlainObject$3(l)&&extend$1(l,r);class c extends VueElement{constructor(d){super(l,d,a)}}return c.def=l,c}/*! #__NO_SIDE_EFFECTS__ */const defineSSRCustomElement=(o,r)=>defineCustomElement(o,r,createSSRApp),BaseClass=typeof HTMLElement<"u"?HTMLElement:class{};class VueElement extends BaseClass{constructor(r,a={},l=createApp){super(),this._def=r,this._props=a,this._createApp=l,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&l!==createApp?this._root=this.shadowRoot:r.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let r=this;for(;r=r&&(r.parentNode||r.host);)if(r instanceof VueElement){this._parent=r;break}this._instance||(this._resolved?(this._setParent(),this._update()):r&&r._pendingResolve?this._pendingResolve=r._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(r=this._parent){r&&(this._instance.parent=r._instance,this._instance.provides=r._instance.provides)}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}
vendor: 1,966 bytes, line 22
22_resolveDef(){if(this._pendingResolve)return;for(let l=0;l<this.attributes.length;l++)this._setAttr(this.attributes[l].name);this._ob=new MutationObserver(l=>{for(const c of l)this._setAttr(c.attributeName)}),this._ob.observe(this,{attributes:!0});const r=(l,c=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:u,styles:d}=l;let f;if(u&&!isArray$3(u))for(const m in u){const y=u[m];(y===Number||y&&y.type===Number)&&(m in this._props&&(this._props[m]=toNumber$2(this._props[m])),(f||(f=Object.create(null)))[camelize(m)]=!0)}this._numberProps=f,c&&this._resolveProps(l),this.shadowRoot&&this._applyStyles(d),this._mount(l)},a=this._def.__asyncLoader;a?this._pendingResolve=a().then(l=>r(this._def=l,!0)):r(this._def)}_mount(r){this._app=this._createApp(r),r.configureApp&&r.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const a=this._instance&&this._instance.exposed;if(a)for(const l in a)hasOwn(this,l)||Object.defineProperty(this,l,{get:()=>unref(a[l])})}_resolveProps(r){const{props:a}=r,l=isArray$3(a)?a:Object.keys(a||{});for(const c of Object.keys(this))c[0]!=="_"&&l.includes(c)&&this._setProp(c,this[c]);for(const c of l.map(camelize))Object.defineProperty(this,c,{get(){return this._getProp(c)},set(u){this._setProp(c,u,!0,!0)}})}_setAttr(r){if(r.startsWith("data-v-"))return;const a=this.hasAttribute(r);let l=a?this.getAttribute(r):REMOVAL;const c=camelize(r);a&&this._numberProps&&this._numberProps[c]&&(l=toNumber$2(l)),this._setProp(c,l,!1,!0)}_getProp(r){return this._props[r]}_setProp(r,a,l=!0,c=!1){if(a!==this._props[r]&&(a===REMOVAL?delete this._props[r]:(this._props[r]=a,r==="key"&&this._app&&(this._app._ceVNode.key=a)),c&&this._instance&&this._update(),l)){const u=this._ob;u&&u.disconnect(),a===!0?this.setAttribute(hyphenate(r),""):typeof a=="string"||typeof a=="number"?this.setAttribute(hyphenate(r),a+""):a||this.removeAttribute(hyphenate(r)),u&&u.observe(this,{attributes:!0})}}
vendor: 8,296 bytes, line 22
22_update(){render$1(this._createVNode(),this._root)}_createVNode(){const r={};this.shadowRoot||(r.onVnodeMounted=r.onVnodeUpdated=this._renderSlots.bind(this));const a=createVNode(this._def,extend$1(r,this._props));return this._instance||(a.ce=l=>{this._instance=l,l.ce=this,l.isCE=!0;const c=(u,d)=>{this.dispatchEvent(new CustomEvent(u,isPlainObject$3(d[0])?extend$1({detail:d},d[0]):{detail:d}))};l.emit=(u,...d)=>{c(u,d),hyphenate(u)!==u&&c(hyphenate(u),d)},this._setParent()}),a}_applyStyles(r,a){if(!r)return;if(a){if(a===this._def||this._styleChildren.has(a))return;this._styleChildren.add(a)}const l=this._nonce;for(let c=r.length-1;c>=0;c--){const u=document.createElement("style");l&&u.setAttribute("nonce",l),u.textContent=r[c],this.shadowRoot.prepend(u)}}_parseSlots(){const r=this._slots={};let a;for(;a=this.firstChild;){const l=a.nodeType===1&&a.getAttribute("slot")||"default";(r[l]||(r[l]=[])).push(a),this.removeChild(a)}}_renderSlots(){const r=(this._teleportTarget||this).querySelectorAll("slot"),a=this._instance.type.__scopeId;for(let l=0;l<r.length;l++){const c=r[l],u=c.getAttribute("name")||"default",d=this._slots[u],f=c.parentNode;if(d)for(const m of d){if(a&&m.nodeType===1){const y=a+"-s",E=document.createTreeWalker(m,1);m.setAttribute(y,"");let A;for(;A=E.nextNode();)A.setAttribute(y,"")}f.insertBefore(m,c)}else for(;c.firstChild;)f.insertBefore(c.firstChild,c);f.removeChild(c)}}_injectChildStyle(r){this._applyStyles(r.styles,r)}_removeChildStyle(r){}}function useHost(o){const r=getCurrentInstance(),a=r&&r.ce;return a||null}function useShadowRoot(){const o=useHost();return o&&o.shadowRoot}function useCssModule(o="$style"){{const r=getCurrentInstance();if(!r)return EMPTY_OBJ;const a=r.type.__cssModules;if(!a)return EMPTY_OBJ;const l=a[o];return l||EMPTY_OBJ}}const positionMap=new WeakMap,newPositionMap=new WeakMap,moveCbKey=Symbol("_moveCb"),enterCbKey=Symbol("_enterCb"),decorate=o=>(delete o.props.mode,o),TransitionGroupImpl=decorate({name:"TransitionGroup",props:extend$1({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(o,{slots:r}){const a=getCurrentInstance(),l=useTransitionState();let c,u;return onUpdated(()=>{if(!c.length)return;const d=o.moveClass||`${o.name||"v"}-move`;if(!hasCSSTransform(c[0].el,a.vnode.el,d))return;c.forEach(callPendingCbs),c.forEach(recordPosition);const f=c.filter(applyTranslation);forceReflow(),f.forEach(m=>{const y=m.el,E=y.style;addTransitionClass(y,d),E.transform=E.webkitTransform=E.transitionDuration="";const A=y[moveCbKey]=P=>{P&&P.target!==y||(!P||/transform$/.test(P.propertyName))&&(y.removeEventListener("transitionend",A),y[moveCbKey]=null,removeTransitionClass(y,d))};y.addEventListener("transitionend",A)})}),()=>{const d=toRaw(o),f=resolveTransitionProps(d);let m=d.tag||Fragment;if(c=[],u)for(let y=0;y<u.length;y++){const E=u[y];E.el&&E.el instanceof Element&&(c.push(E),setTransitionHooks(E,resolveTransitionHooks(E,f,l,a)),positionMap.set(E,E.el.getBoundingClientRect()))}u=r.default?getTransitionRawChildren(r.default()):[];for(let y=0;y<u.length;y++){const E=u[y];E.key!=null&&setTransitionHooks(E,resolveTransitionHooks(E,f,l,a))}return createVNode(m,null,u)}}}),TransitionGroup=TransitionGroupImpl;function callPendingCbs(o){const r=o.el;r[moveCbKey]&&r[moveCbKey](),r[enterCbKey]&&r[enterCbKey]()}function recordPosition(o){newPositionMap.set(o,o.el.getBoundingClientRect())}function applyTranslation(o){const r=positionMap.get(o),a=newPositionMap.get(o),l=r.left-a.left,c=r.top-a.top;if(l||c){const u=o.el.style;return u.transform=u.webkitTransform=`translate(${l}px,${c}px)`,u.transitionDuration="0s",o}}function hasCSSTransform(o,r,a){const l=o.cloneNode(),c=o[vtcKey];c&&c.forEach(f=>{f.split(/\s+/).forEach(m=>m&&l.classList.remove(m))}),a.split(/\s+/).forEach(f=>f&&l.classList.add(f)),l.style.display="none";const u=r.nodeType===1?r:r.parentNode;u.appendChild(l);const{hasTransform:d}=getTransitionInfo(l);return u.removeChild(l),d}const getModelAssigner=o=>{const r=o.props["onUpdate:modelValue"]||!1;return isArray$3(r)?a=>invokeArrayFns(r,a):r};function onCompositionStart(o){o.target.composing=!0}function onCompositionEnd(o){const r=o.target;r.composing&&(r.composing=!1,r.dispatchEvent(new Event("input")))}const assignKey=Symbol("_assign"),vModelText={created(o,{modifiers:{lazy:r,trim:a,number:l}},c){o[assignKey]=getModelAssigner(c);const u=l||c.props&&c.props.type==="number";addEventListener$1(o,r?"change":"input",d=>{if(d.target.composing)return;let f=o.value;a&&(f=f.trim()),u&&(f=looseToNumber(f)),o[assignKey](f)}),a&&addEventListener$1(o,"change",()=>{o.value=o.value.trim()}),r||(addEventListener$1(o,"compositionstart",onCompositionStart),addEventListener$1(o,"compositionend",onCompositionEnd),addEventListener$1(o,"change",onCompositionEnd))},mounted(o,{value:r}){o.value=r??""},beforeUpdate(o,{value:r,oldValue:a,modifiers:{lazy:l,trim:c,number:u}},d){if(o[assignKey]=getModelAssigner(d),o.composing)return;const f=(u||o.type==="number")&&!/^0\d/.test(o.value)?looseToNumber(o.value):o.value,m=r??"";f!==m&&(document.activeElement===o&&o.type!=="range"&&(l&&r===a||c&&o.value.trim()===m)||(o.value=m))}},vModelCheckbox={deep:!0,created(o,r,a){o[assignKey]=getModelAssigner(a),addEventListener$1(o,"change",()=>{const l=o._modelValue,c=getValue(o),u=o.checked,d=o[assignKey];if(isArray$3(l)){const f=looseIndexOf(l,c),m=f!==-1;if(u&&!m)d(l.concat(c));else if(!u&&m){const y=[...l];y.splice(f,1),d(y)}}else if(isSet(l)){const f=new Set(l);u?f.add(c):f.delete(c),d(f)}else d(getCheckboxValue$1(o,u))})},mounted:setChecked,beforeUpdate(o,r,a){o[assignKey]=getModelAssigner(a),setChecked(o,r,a)}};function setChecked(o,{value:r,oldValue:a},l){o._modelValue=r;let c;if(isArray$3(r))c=looseIndexOf(r,l.props.value)>-1;else if(isSet(r))c=r.has(l.props.value);else{if(r===a)return;c=looseEqual(r,getCheckboxValue$1(o,!0))}o.checked!==c&&(o.checked=c)}const vModelRadio={created(o,{value:r},a){o.checked=looseEqual(r,a.props.value),o[assignKey]=getModelAssigner(a),addEventListener$1(o,"change",()=>{o[assignKey](getValue(o))})},beforeUpdate(o,{value:r,oldValue:a},l){o[assignKey]=getModelAssigner(l),r!==a&&(o.checked=looseEqual(r,l.props.value))}},vModelSelect={deep:!0,created(o,{value:r,modifiers:{number:a}},l){const c=isSet(r);addEventListener$1(o,"change",()=>{const u=Array.prototype.filter.call(o.options,d=>d.selected).map(d=>a?looseToNumber(getValue(d)):getValue(d));o[assignKey](o.multiple?c?new Set(u):u:u[0]),o._assigning=!0,nextTick(()=>{o._assigning=!1})}),o[assignKey]=getModelAssigner(l)},mounted(o,{value:r}){setSelected(o,r)},beforeUpdate(o,r,a){o[assignKey]=getModelAssigner(a)},updated(o,{value:r}){o._assigning||setSelected(o,r)}};function setSelected(o,r){const a=o.multiple,l=isArray$3(r);if(!(a&&!l&&!isSet(r))){for(let c=0,u=o.options.length;c<u;c++){const d=o.options[c],f=getValue(d);if(a)if(l){const m=typeof f;m==="string"||m==="number"?d.selected=r.some(y=>String(y)===String(f)):d.selected=looseIndexOf(r,f)>-1}else d.selected=r.has(f);else if(looseEqual(getValue(d),r)){o.selectedIndex!==c&&(o.selectedIndex=c);return}}!a&&o.selectedIndex!==-1&&(o.selectedIndex=-1)}}function getValue(o){return"_value"in o?o._value:o.value}function getCheckboxValue$1(o,r){const a=r?"_trueValue":"_falseValue";return a in o?o[a]:r}const vModelDynamic={created(o,r,a){callModelHook(o,r,a,null,"created")},mounted(o,r,a){callModelHook(o,r,a,null,"mounted")},beforeUpdate(o,r,a,l){callModelHook(o,r,a,l,"beforeUpdate")},updated(o,r,a,l){callModelHook(o,r,a,l,"updated")}};function resolveDynamicModel(o,r){switch(o){case"SELECT":return vModelSelect;case"TEXTAREA":return vModelText;default:switch(r){case"checkbox":return vModelCheckbox;case"radio":return vModelRadio;default:return vModelText}}}function callModelHook(o,r,a,l,c){const d=resolveDynamicModel(o.tagName,a.props&&a.props.type)[c];d&&d(o,r,a,l)}function initVModelForSSR(){vModelText.getSSRProps=({value:o})=>({value:o}),vModelRadio.getSSRProps=({value:o},r)=>{if(r.props&&looseEqual(r.props.value,o))return{checked:!0}},vModelCheckbox.getSSRProps=({value:o},r)=>{if(isArray$3(o)){if(r.props&&looseIndexOf(o,r.props.value)>-1)return{checked:!0}}else if(isSet(o)){if(r.props&&o.has(r.props.value))return{checked:!0}}else if(o)return{checked:!0}},vModelDynamic.getSSRProps=(o,r)=>
vendor: 2,556 bytes, lines 22-25
22{if(typeof r.type!="string")return;const a=resolveDynamicModel(r.type.toUpperCase(),r.props&&r.props.type);if(a.getSSRProps)return a.getSSRProps(o,r)}}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:o=>o.stopPropagation(),prevent:o=>o.preventDefault(),self:o=>o.target!==o.currentTarget,ctrl:o=>!o.ctrlKey,shift:o=>!o.shiftKey,alt:o=>!o.altKey,meta:o=>!o.metaKey,left:o=>"button"in o&&o.button!==0,middle:o=>"button"in o&&o.button!==1,right:o=>"button"in o&&o.button!==2,exact:(o,r)=>systemModifiers.some(a=>o[`${a}Key`]&&!r.includes(a))},withModifiers=(o,r)=>{const a=o._withMods||(o._withMods={}),l=r.join(".");return a[l]||(a[l]=(c,...u)=>{for(let d=0;d<r.length;d++){const f=modifierGuards[r[d]];if(f&&f(c,r))return}return o(c,...u)})},keyNames={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},withKeys=(o,r)=>{const a=o._withKeys||(o._withKeys={}),l=r.join(".");return a[l]||(a[l]=c=>{if(!("key"in c))return;const u=hyphenate(c.key);if(r.some(d=>d===u||keyNames[d]===u))return o(c)})},rendererOptions=extend$1({patchProp},nodeOps);let renderer,enabledHydration=!1;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}function ensureHydrationRenderer(){return renderer=enabledHydration?renderer:createHydrationRenderer(rendererOptions),enabledHydration=!0,renderer}const render$1=(...o)=>{ensureRenderer().render(...o)},hydrate=(...o)=>{ensureHydrationRenderer().hydrate(...o)},createApp=(...o)=>{const r=ensureRenderer().createApp(...o),{mount:a}=r;return r.mount=l=>{const c=normalizeContainer(l);if(!c)return;const u=r._component;!isFunction$1(u)&&!u.render&&!u.template&&(u.template=c.innerHTML),c.nodeType===1&&(c.textContent="");const d=a(c,!1,resolveRootNamespace(c));return c instanceof Element&&(c.removeAttribute("v-cloak"),c.setAttribute("data-v-app","")),d},r},createSSRApp=(...o)=>{const r=ensureHydrationRenderer().createApp(...o),{mount:a}=r;return r.mount=l=>{const c=normalizeContainer(l);if(c)return a(c,!0,resolveRootNamespace(c))},r};function resolveRootNamespace(o){if(o instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&o instanceof MathMLElement)return"mathml"}function normalizeContainer(o){return isString$1(o)?document.querySelector(o):o}let ssrDirectiveInitialized=!1;const initDirectivesForSSR=()=>{ssrDirectiveInitialized||(ssrDirectiveInitialized=!0,initVModelForSSR(),initVShowForSSR())};/**
23* vue v3.5.13
24* (c) 2018-present Yuxi (Evan) You and Vue contributors
25* @license MIT
26**/const compile=()=>{},vue_runtime_esmBundler=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition,BaseTransitionPropsValidators,Comment,DeprecationTypes,EffectScope,ErrorCodes,ErrorTypeStrings,Fragment,KeepAlive,ReactiveEffect,Static,Suspense,Teleport,Text,TrackOpTypes,Transition,TransitionGroup,TriggerOpTypes,VueElement,assertNumber,callWithAsyncErrorHandling,callWithErrorHandling,camelize,capitalize,cloneVNode,compatUtils,compile,computed,createApp,createBlock,createCommentVNode,createElementBlock,createElementVNode:createBaseVNode,createHydrationRenderer,createPropsRestProxy,createRenderer,createSSRApp,createSlots,createStaticVNode,createTextVNode,createVNode,customRef,defineAsyncComponent,defineComponent,defineCustomElement,defineEmits,defineExpose,defineModel,defineOptions,defineProps,defineSSRCustomElement,defineSlots,devtools,effect,effectScope,getCurrentInstance,getCurrentScope,getCurrentWatcher,getTransitionRawChildren,guardReactiveProps,h,handleError:handleError$2,hasInjectionContext,hydrate,hydrateOnIdle,hydrateOnInteraction,hydrateOnMediaQuery,hydrateOnVisible,initCustomFormatter,initDirectivesForSSR,inject,isMemoSame,isProxy,isReactive,isReadonly,isRef,isRuntimeOnly,isShallow,isVNode,markRaw,mergeDefaults,mergeModels,mergeProps,nextTick,normalizeClass,normalizeProps,normalizeStyle,onActivated,onBeforeMount,onBeforeUnmount,onBeforeUpdate,onDeactivated,onErrorCaptured,onMounted,onRenderTracked,onRenderTriggered,onScopeDispose,onServerPrefetch,onUnmounted,onUpdated,onWatcherCleanup,openBlock,popScopeId,provide,proxyRefs,pushScopeId,queuePostFlushCb,reactive,readonly,ref:ref$1,registerRuntimeCompiler,render:render$1,renderList,renderSlot,resolveComponent,resolveDirective,resolveDynamicComponent,resolveFilter,resolveTransitionHooks,setBlockTracking,setDevtoolsHook,setTransitionHooks,shallowReactive,shallowReadonly,shallowRef,ssrContextKey,ssrUtils,stop,toDisplayString,toHandlerKey,toHandlers,toRaw,toRef,toRefs,toValue,transformVNodeArgs,triggerRef,unref,useAttrs,useCssModule,useCssVars,useHost,useId,useModel,useSSRContext,useShadowRoot,useSlots,useTemplateRef,useTransitionState,vModelCheckbox,vModelDynamic,vModelRadio,vModelSelect,vModelText,vShow,version:version$9,warn:warn$3,watch,watchEffect,watchPostEffect,watchSyncEffect,withAsyncContext,withCtx,withDefaults,withDirectives,withKeys,withMemo,withModifiers,withScopeId},Symbol.toStringTag,{value:"Module"})),suspectProtoRx$1=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,suspectConstructorRx$1=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,JsonSigRx$1=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function jsonParseTransform$1(o,r){if(o==="__proto__"||o==="constructor"&&r&&typeof r=="object"&&"prototype"in r){warnKeyDropped$1(o);return}return r}function warnKeyDropped$1(o){console.warn(`[destr] Dropping "${o}" key to prevent prototype pollution.`)}function destr$1(o,r={}){if(typeof o!="string")return o;if(o[0]==='"'&&o[o.length-1]==='"'&&o.indexOf("\\")===-1)return o.slice(1,-1);const a=o.trim();if(a.length<=9)switch(a.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!JsonSigRx$1.test(o)){if(r.strict)throw new SyntaxError("[destr] Invalid JSON");return o}try{if(suspectProtoRx$1.test(o)||suspectConstructorRx$1.test(o)){if(r.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(o,jsonParseTransform$1)}return JSON.parse(o)}catch(l){if(r.strict)throw l;return o}}const HASH_RE$1=/#/g,AMPERSAND_RE$1=/&/g,SLASH_RE$1=/\//g,EQUAL_RE$1=/=/g,PLUS_RE$1=/\+/g,ENC_CARET_RE$1=/%5e/gi,ENC_BACKTICK_RE$1=/%60/gi,ENC_PIPE_RE$1=/%7c/gi,ENC_SPACE_RE$1=/%20/gi;function encode$1(o){return encodeURI(""+o).replace(ENC_PIPE_RE$1,"|")}
26function encodeQueryValue$1(o){return encode$1(typeof o=="string"?o:JSON.stringify(o)).replace(PLUS_RE$1,"%2B").replace(ENC_SPACE_RE$1,"+").replace(HASH_RE$1,"%23").replace(AMPERSAND_RE$1,"%26").replace(ENC_BACKTICK_RE$1,"`").replace(ENC_CARET_RE$1,"^").replace(SLASH_RE$1,"%2F")}function encodeQueryKey$1(o){return encodeQueryValue$1(o).replace(EQUAL_RE$1,"%3D")}function decode$4(o=""){try{return decodeURIComponent(""+o)}catch{return""+o}}function decodeQueryKey(o){return decode$4(o.replace(PLUS_RE$1," "))}function decodeQueryValue(o){return decode$4(o.replace(PLUS_RE$1," "))}function parseQuery$1(o=""){const r=Object.create(null);o[0]==="?"&&(o=o.slice(1));for(const a of o.split("&")){const l=a.match(/([^=]+)=?(.*)/)||[];if(l.length<2)continue;const c=decodeQueryKey(l[1]);if(c==="__proto__"||c==="constructor")continue;const u=decodeQueryValue(l[2]||"");r[c]===void 0?r[c]=u:Array.isArray(r[c])?r[c].push(u):r[c]=[r[c],u]}return r}function encodeQueryItem(o,r){return(typeof r=="number"||typeof r=="boolean")&&(r=String(r)),r?Array.isArray(r)?r.map(a=>`${encodeQueryKey$1(o)}=${encodeQueryValue$1(a)}`).join("&"):`${encodeQueryKey$1(o)}=${encodeQueryValue$1(r)}`:encodeQueryKey$1(o)}function stringifyQuery$1(o){return Object.keys(o).filter(r=>o[r]!==void 0).map(r=>encodeQueryItem(r,o[r])).filter(Boolean).join("&")}const PROTOCOL_STRICT_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,PROTOCOL_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,PROTOCOL_RELATIVE_REGEX=/^([/\\]\s*){2,}[^/\\]/,PROTOCOL_SCRIPT_RE=/^[\s\0]*(blob|data|javascript|vbscript):$/i,TRAILING_SLASH_RE$1=/\/$|\/\?|\/#/,JOIN_LEADING_SLASH_RE=/^\.?\//;function hasProtocol(o,r={}){return typeof r=="boolean"&&(r={acceptRelative:r}),r.strict?PROTOCOL_STRICT_REGEX.test(o):PROTOCOL_REGEX.test(o)||(r.acceptRelative?PROTOCOL_RELATIVE_REGEX.test(o):!1)}function isScriptProtocol(o){return!!o&&PROTOCOL_SCRIPT_RE.test(o)}function hasTrailingSlash(o="",r){return r?TRAILING_SLASH_RE$1.test(o):o.endsWith("/")}function withoutTrailingSlash(o="",r){if(!r)return(hasTrailingSlash(o)?o.slice(0,-1):o)||"/";if(!hasTrailingSlash(o,!0))return o||"/";let a=o,l="";const c=o.indexOf("#");c!==-1&&(a=o.slice(0,c),l=o.slice(c));const[u,...d]=a.split("?");return((u.endsWith("/")?u.slice(0,-1):u)||"/")+(d.length>0?`?${d.join("?")}`:"")+l}function withTrailingSlash(o="",r){if(!r)return o.endsWith("/")?o:o+"/";if(hasTrailingSlash(o,!0))return o||"/";let a=o,l="";const c=o.indexOf("#");if(c!==-1&&(a=o.slice(0,c),l=o.slice(c),!a))return l;const[u,...d]=a.split("?");return u+"/"+(d.length>0?`?${d.join("?")}`:"")+l}function hasLeadingSlash(o=""){return o.startsWith("/")}function withLeadingSlash(o=""){return hasLeadingSlash(o)?o:"/"+o}function withBase(o,r){if(isEmptyURL(r)||hasProtocol(o))return o;const a=withoutTrailingSlash(r);return o.startsWith(a)?o:joinURL(a,o)}function withoutBase(o,r){if(isEmptyURL(r))return o;const a=withoutTrailingSlash(r);if(!o.startsWith(a))return o;const l=o.slice(a.length);return l[0]==="/"?l:"/"+l}function withQuery(o,r){const a=parseURL$1(o),l={...parseQuery$1(a.search),...r};return a.search=stringifyQuery$1(l),stringifyParsedURL(a)}function getQuery$1(o){return parseQuery$1(parseURL$1(o).search)}function isEmptyURL(o){return!o||o==="/"}function isNonEmptyURL(o){return o&&o!=="/"}function joinURL(o,...r){let a=o||"";for(const l of r.filter(c=>isNonEmptyURL(c)))if(a){const c=l.replace(JOIN_LEADING_SLASH_RE,"");a=withTrailingSlash(a)+c}else a=l;return a}function joinRelativeURL(...o){var d,f,m,y;const r=/\/(?!\/)/,a=o.filter(Boolean),l=[];let c=0;for(const E of a)if(!(!E||E==="/")){for(const[A,P]of E.split(r).entries())if(!(!P||P===".")){if(P===".."){if(l.length===1&&hasProtocol(l[0]))continue;l.pop(),c--;continue}if(A===1&&((d=l[l.length-1])!=null&&d.endsWith(":/"))){l[l.length-1]+="/"+P;continue}l.push(P),c++}}let u=l.join("/");return c>=0?(f=a[0])!=null&&f.startsWith("/")&&!u.startsWith("/")?u="/"+u:(m=a[0])!=null&&m.startsWith("./")&&!u.startsWith("./")&&(u="./"+u):u="../".repeat(-1*c)+u,(y=a[a.length-1])!=null&&y.endsWith("/")&&!u.endsWith("/")&&(u+="/"),u}function isEqual$1(o,r,a={}){return a.trailingSlash||(o=withTrailingSlash(o),r=withTrailingSlash(r)),a.leadingSlash||(o=withLeadingSlash(o),r=withLeadingSlash(r)),a.encoding||(o=decode$4(o),r=decode$4(r)),o===r}const protocolRelative=Symbol.for("ufo:protocolRelative");function parseURL$1(o="",r){const a=o.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(a){const[,A,P=""]=a;return{protocol:A.toLowerCase(),pathname:P,href:A+P,auth:"",host:"",search:"",hash:""}}if(!hasProtocol(o,{acceptRelative:!0}))return parsePath(o);const[,l="",c,u=""]=o.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,d="",f=""]=u.match(/([^#/?]*)(.*)?/)||[];l==="file:"&&(f=f.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:m,search:y,hash:E}
26=parsePath(f);return{protocol:l.toLowerCase(),auth:c?c.slice(0,Math.max(0,c.length-1)):"",host:d,pathname:m,search:y,hash:E,[protocolRelative]:!l}}function parsePath(o=""){const[r="",a="",l=""]=(o.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:r,search:a,hash:l}}function stringifyParsedURL(o){const r=o.pathname||"",a=o.search?(o.search.startsWith("?")?"":"?")+o.search:"",l=o.hash||"",c=o.auth?o.auth+"@":"",u=o.host||"";return(o.protocol||o[protocolRelative]?(o.protocol||"")+"//":"")+c+u+r+a+l}class FetchError extends Error{constructor(r,a){super(r,a),this.name="FetchError",a!=null&&a.cause&&!this.cause&&(this.cause=a.cause)}}function createFetchError(o){var m,y,E,A,P;const r=((m=o.error)==null?void 0:m.message)||((y=o.error)==null?void 0:y.toString())||"",a=((E=o.request)==null?void 0:E.method)||((A=o.options)==null?void 0:A.method)||"GET",l=((P=o.request)==null?void 0:P.url)||String(o.request)||"/",c=`[${a}] ${JSON.stringify(l)}`,u=o.response?`${o.response.status} ${o.response.statusText}`:"<no response>",d=`${c}: ${u}${r?` ${r}`:""}`,f=new FetchError(d,o.error?{cause:o.error}:void 0);for(const R of["request","options","response"])Object.defineProperty(f,R,{get(){return o[R]}});for(const[R,x]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(f,R,{get(){return o.response&&o.response[x]}});return f}const payloadMethods=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function isPayloadMethod(o="GET"){return payloadMethods.has(o.toUpperCase())}function isJSONSerializable(o){if(o===void 0)return!1;const r=typeof o;return r==="string"||r==="number"||r==="boolean"||r===null?!0:r!=="object"?!1:Array.isArray(o)?!0:o.buffer||o instanceof FormData||o instanceof URLSearchParams?!1:o.constructor&&o.constructor.name==="Object"||typeof o.toJSON=="function"}const textTypes=new Set(["image/svg","application/xml","application/xhtml","application/html"]),JSON_RE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function detectResponseType(o=""){if(!o)return"json";const r=o.split(";").shift()||"";return JSON_RE.test(r)?"json":r==="text/event-stream"?"stream":textTypes.has(r)||r.startsWith("text/")?"text":"blob"}function resolveFetchOptions(o,r,a,l){const c=mergeHeaders$1((r==null?void 0:r.headers)??(o==null?void 0:o.headers),a==null?void 0:a.headers,l);let u;return(a!=null&&a.query||a!=null&&a.params||r!=null&&r.params||r!=null&&r.query)&&(u={...a==null?void 0:a.params,...a==null?void 0:a.query,...r==null?void 0:r.params,...r==null?void 0:r.query}),{...a,...r,query:u,params:u,headers:c}}function mergeHeaders$1(o,r,a){if(!r)return new a(o);const l=new a(r);if(o)for(const[c,u]of Symbol.iterator in o||Array.isArray(o)?o:new a(o))l.set(c,u);return l}async function callHooks(o,r){if(r)if(Array.isArray(r))for(const a of r)await a(o);else await r(o)}const retryStatusCodes=new Set([408,409,425,429,500,502,503,504]),nullBodyResponses=new Set([101,204,205,304]);function createFetch(o={}){const{fetch:r=globalThis.fetch,Headers:a=globalThis.Headers,AbortController:l=globalThis.AbortController}=o;async function c(f){const m=f.error&&f.error.name==="AbortError"&&!f.options.timeout||!1;if(f.options.retry!==!1&&!m){let E;typeof f.options.retry=="number"?E=f.options.retry:E=isPayloadMethod(f.options.method)?0:1;const A=f.response&&f.response.status||500;if(E>0&&(Array.isArray(f.options.retryStatusCodes)?f.options.retryStatusCodes.includes(A):retryStatusCodes.has(A))){const P=typeof f.options.retryDelay=="function"?f.options.retryDelay(f):f.options.retryDelay||0;return P>0&&await new Promise(R=>setTimeout(R,P)),u(f.request,{...f.options,retry:E-1})}}const y=createFetchError(f);throw Error.captureStackTrace&&Error.captureStackTrace(y,u),y}const u=async function(m,y={}){const E={request:m,options:resolveFetchOptions(m,y,o.defaults,a),response:void 0,error:void 0};if(E.options.method&&(E.options.method=E.options.method.toUpperCase()),E.options.onRequest&&(await callHooks(E,E.options.onRequest),E.options.headers instanceof a||(E.options.headers=new a(E.options.headers||{}))),typeof E.request=="string"&&(E.options.baseURL&&(E.request=withBase(E.request,E.options.baseURL)),E.options.query&&(E.request=withQuery(E.request,E.options.query),delete E.options.query),"query"in E.options&&delete E.options.query,"params"in E.options&&delete E.options.params),E.options.body&&isPayloadMethod(E.options.method))if(isJSONSerializable(E.options.body)){const R=E.options.headers.get("content-type");typeof E.options.body!="string"&&(E.options.body=R==="application/x-www-form-urlencoded"?new URLSearchParams(E.options.body).toString():JSON.stringify(E.options.body)),R||E.options.headers.set("content-type","application/json"),E.options.headers.has("accept")||E.options.headers.set("accept","application/json")}else("pipeTo"in E.options.body&&typeof E.options.body.pipeTo=="function"||typeof E.options.body.pipe=="function")&&("duplex"in E.options||(E.options.duplex="half"));let A;if(!E.options.signal&&E.options.timeout){const R=new l;A=setTimeout(()=>{const x=new Error("[TimeoutError]: The operation was aborted due to timeout");x.name="TimeoutError",x.code=23,R.abort(x)},E.options.timeout),E.options.signal=R.signal}try{E.response=await r(E.request,E.options)}catch(R){return E.error=R,E.options.onRequestError&&await callHooks(E,E.options.onRequestError),await c(E)}finally{A&&clearTimeout(A)}if((E.response.body||E.response._bodyInit)&&!nullBodyResponses.has(E.response.status)&&E.options.method!=="HEAD"){const R=(E.options.parseResponse?"json":E.options.responseType)||detectResponseType(E.response.headers.get("content-type")||"");switch(R){case"json":{const x=await E.response.text(),M=E.options.parseResponse||destr$1;E.response._data=M(x);break}case"stream":{E.response._data=E.response.body||E.response._bodyInit;break}default:E.response._data=await E.response[R]()}}return E.options.onResponse&&await callHooks(E,E.options.onResponse),!E.options.ignoreResponseError&&E.response.status>=400&&E.response.status<600?(E.options.onResponseError&&await callHooks(E,E.options.onResponseError),await c(E)):E.response},d=async function(m,y){return(await u(m,y))._data};return d.raw=u,d.native=(...f)=>r(...f),d.create=(f={},m={})=>createFetch({...o,...m,defaults:{...o.defaults,...m.defaults,...f}}),d}const _globalThis$1=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),fetch$1=_globalThis$1.fetch?(...o)=>_globalThis$1.fetch(...o):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),Headers$1=_globalThis$1.Headers,AbortController$1=_globalThis$1.AbortController,ofetch=createFetch({fetch:fetch$1,Headers:Headers$1,AbortController:AbortController$1}),$fetch$1=ofetch,useRuntimeConfig$1=()=>{var o;return((o=window==null?void 0:window.__NUXT__)==null?void 0:o.config)||{}},appConfig=useRuntimeConfig$1().app,baseURL=()=>appConfig.baseURL,buildAssetsDir=()=>appConfig.buildAssetsDir,buildAssetsURL=(...o)=>joinRelativeURL(publicAssetsURL(),buildAssetsDir(),...o),publicAssetsURL=(...o)=>{const r=appConfig.cdnURL||appConfig.baseURL;return o.length?joinRelativeURL(r,...o):r};globalThis.__buildAssetsURL=buildAssetsURL,globalThis.__publicAssetsURL=publicAssetsURL;globalThis.$fetch||(globalThis.$fetch=$fetch$1.create({baseURL:baseURL()}));function flatHooks(o,r={},a){for(const l in o){const c=o[l],u=a?`${a}:${l}`:l;typeof c=="object"&&c!==null?flatHooks(c,r,u):typeof c=="function"&&(r[u]=c)}return r}const defaultTask={run:o=>o()},_createTask=()=>defaultTask,createTask=typeof console.createTask<"u"?console.createTask:_createTask;function serialTaskCaller(o,r){const a=r.shift(),l=createTask(a);return o.reduce((c,u)=>c.then(()=>l.run(()=>u(...r))),Promise.resolve())}function parallelTaskCaller(o,r){const a=r.shift(),l=createTask(a);return Promise.all(o.map(c=>l.run(()=>c(...r))))}function callEachWith(o,r){for(const a of[...o])a(r)}class Hookable{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(r,a,l={}){if(!r||typeof a!="function")return()=>{};const c=r;let u;for(;this._deprecatedHooks[r];)u=this._deprecatedHooks[r],r=u.to;if(u&&!l.allowDeprecated){let d=u.message;d||(d=`${c} hook has been deprecated`+(u.to?`, please use ${u.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(d)||(console.warn(d),this._deprecatedMessages.add(d))}if(!a.name)try{Object.defineProperty(a,"name",{get:()=>"_"+r.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[r]=this._hooks[r]||[],this._hooks[r].push(a),()=>{a&&(this.removeHook(r,a),a=void 0)}}hookOnce(r,a){let l,c=(...u)=>(typeof l=="function"&&l(),l=void 0,c=void 0,a(...u));return l=this.hook(r,c),l}removeHook(r,a){if(this._hooks[r]){const l=this._hooks[r].indexOf(a);l!==-1&&this._hooks[r].splice(l,1),this._hooks[r].length===0&&delete this._hooks[r]}}
26deprecateHook(r,a){this._deprecatedHooks[r]=typeof a=="string"?{to:a}:a;const l=this._hooks[r]||[];delete this._hooks[r];for(const c of l)this.hook(r,c)}deprecateHooks(r){Object.assign(this._deprecatedHooks,r);for(const a in r)this.deprecateHook(a,r[a])}addHooks(r){const a=flatHooks(r),l=Object.keys(a).map(c=>this.hook(c,a[c]));return()=>{for(const c of l.splice(0,l.length))c()}}removeHooks(r){const a=flatHooks(r);for(const l in a)this.removeHook(l,a[l])}removeAllHooks(){for(const r in this._hooks)delete this._hooks[r]}callHook(r,...a){return a.unshift(r),this.callHookWith(serialTaskCaller,r,...a)}callHookParallel(r,...a){return a.unshift(r),this.callHookWith(parallelTaskCaller,r,...a)}callHookWith(r,a,...l){const c=this._before||this._after?{name:a,args:l,context:{}}:void 0;this._before&&callEachWith(this._before,c);const u=r(a in this._hooks?[...this._hooks[a]]:[],l);return u instanceof Promise?u.finally(()=>{this._after&&c&&callEachWith(this._after,c)}):(this._after&&c&&callEachWith(this._after,c),u)}beforeEach(r){return this._before=this._before||[],this._before.push(r),()=>{if(this._before!==void 0){const a=this._before.indexOf(r);a!==-1&&this._before.splice(a,1)}}}afterEach(r){return this._after=this._after||[],this._after.push(r),()=>{if(this._after!==void 0){const a=this._after.indexOf(r);a!==-1&&this._after.splice(a,1)}}}}function createHooks(){return new Hookable}function createContext(o={}){let r,a=!1;const l=d=>{if(r&&r!==d)throw new Error("Context conflict")};let c;if(o.asyncContext){const d=o.AsyncLocalStorage||globalThis.AsyncLocalStorage;d?c=new d:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const u=()=>{if(c){const d=c.getStore();if(d!==void 0)return d}return r};return{use:()=>{const d=u();if(d===void 0)throw new Error("Context is not available");return d},tryUse:()=>u(),set:(d,f)=>{f||l(d),r=d,a=!0},unset:()=>{r=void 0,a=!1},call:(d,f)=>{l(d),r=d;try{return c?c.run(d,f):f()}finally{a||(r=void 0)}},async callAsync(d,f){r=d;const m=()=>{r=d},y=()=>r===d?m:void 0;asyncHandlers.add(y);try{const E=c?c.run(d,f):f();return a||(r=void 0),await E}finally{asyncHandlers.delete(y)}}}}function createNamespace(o={}){const r={};return{get(a,l={}){return r[a]||(r[a]=createContext({...o,...l})),r[a]}}}const _globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},globalKey$1="__unctx__",defaultNamespace=_globalThis[globalKey$1]||(_globalThis[globalKey$1]=createNamespace()),getContext=(o,r={})=>defaultNamespace.get(o,r),asyncHandlersKey="__unctx_async_handlers__",asyncHandlers=_globalThis[asyncHandlersKey]||(_globalThis[asyncHandlersKey]=new Set);function executeAsync(o){const r=[];for(const c of asyncHandlers){const u=c();u&&r.push(u)}const a=()=>{for(const c of r)c()};let l=o();return l&&typeof l=="object"&&"catch"in l&&(l=l.catch(c=>{throw a(),c})),[l,a]}const appLayoutTransition=!1,appPageTransition=!1,appKeepalive=!1,nuxtLinkDefaults={componentName:"NuxtLink",prefetch:!0,prefetchOn:{visibility:!0}},asyncDataDefaults={value:null,errorValue:null,deep:!0},nuxtDefaultErrorValue=null,fetchDefaults={},vueAppRootContainer="#__nuxt",appId="nuxt-app",chunkErrorEvent="vite:preloadError";function getNuxtAppCtx(o=appId){return getContext(o,{asyncContext:!1})}const NuxtPluginIndicator="__nuxt_plugin";function createNuxtApp(o){var c;let r=0;const a={_id:o.id||appId||"nuxt-app",_scope:effectScope(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.15.4"},get vue(){return a.vueApp.version}},payload:shallowReactive({...((c=o.ssrContext)==null?void 0:c.payload)||{},data:shallowReactive({}),state:reactive({}),once:new Set,_errors:shallowReactive({})}),static:{data:{}},runWithContext(u){return a._scope.active&&!getCurrentScope()?a._scope.run(()=>callWithNuxt(a,u)):callWithNuxt(a,u)},isHydrating:!0,deferHydration(){if(!a.isHydrating)return()=>{};r++;let u=!1;return()=>{if(!u&&(u=!0,r--,r===0))return a.isHydrating=!1,a.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:shallowReactive({}),_payloadRevivers:{},...o};{const u=window.__NUXT__;if(u)for(const d in u)switch(d){case"data":case"state":case"_errors":Object.assign(a.payload[d],u[d]);break;default:a.payload[d]=u[d]}}a.hooks=createHooks(),a.hook=a.hooks.hook,a.callHook=a.hooks.callHook,a.provide=(u,d)=>{const f="$"+u;defineGetter(a,f,d),defineGetter(a.vueApp.config.globalProperties,f,d)},defineGetter(a.vueApp,"$nuxt",a),defineGetter(a.vueApp.config.globalProperties,"$nuxt",a);{window.addEventListener(chunkErrorEvent,d=>{a.callHook("app:chunkError",{error:d.payload}),(a.isHydrating||d.payload.message.includes("Unable to preload CSS"))&&d.preventDefault()}),window.useNuxtApp=window.useNuxtApp||useNuxtApp;const u=a.hook("app:error",(...d)=>{console.error("[nuxt] error caught during app initialization",...d)});a.hook("app:mounted",u)}const l=a.payload.config;return a.provide("config",l),a}function registerPluginHooks(o,r){r.hooks&&o.hooks.addHooks(r.hooks)}async function applyPlugin(o,r){if(typeof r=="function"){const{provide:a}=await o.runWithContext(()=>r(o))||{};if(a&&typeof a=="object")for(const l in a)o.provide(l,a[l])}}async function applyPlugins(o,r){const a=[],l=[],c=[],u=[];let d=0;async function f(m){var E;const y=((E=m.dependsOn)==null?void 0:E.filter(A=>r.some(P=>P._name===A)&&!a.includes(A)))??[];if(y.length>0)l.push([new Set(y),m]);else{const A=applyPlugin(o,m).then(async()=>{m._name&&(a.push(m._name),await Promise.all(l.map(async([P,R])=>{P.has(m._name)&&(P.delete(m._name),P.size===0&&(d++,await f(R)))}
26)))});m.parallel?c.push(A.catch(P=>u.push(P))):await A}}for(const m of r)registerPluginHooks(o,m);for(const m of r)await f(m);if(await Promise.all(c),d)for(let m=0;m<d;m++)await Promise.all(c);if(u.length)throw u[0]}function defineNuxtPlugin(o){if(typeof o=="function")return o;const r=o._name||o.name;return delete o.name,Object.assign(o.setup||(()=>{}),o,{[NuxtPluginIndicator]:!0,_name:r})}function callWithNuxt(o,r,a){const l=()=>r();return getNuxtAppCtx(o._id).set(o),o.vueApp.runWithContext(l)}function tryUseNuxtApp(o){var a;let r;return hasInjectionContext()&&(r=(a=getCurrentInstance())==null?void 0:a.appContext.app.$nuxt),r=r||getNuxtAppCtx(o).tryUse(),r||null}function useNuxtApp(o){const r=tryUseNuxtApp(o);if(!r)throw new Error("[nuxt] instance unavailable");return r}function useRuntimeConfig(o){return useNuxtApp().$config}function defineGetter(o,r,a){Object.defineProperty(o,r,{get:()=>a})}function parse$1(o,r){if(typeof o!="string")throw new TypeError("argument str must be a string");const a={},l=r||{},c=l.decode||decode$3;let u=0;for(;u<o.length;){const d=o.indexOf("=",u);if(d===-1)break;let f=o.indexOf(";",u);if(f===-1)f=o.length;else if(f<d){u=o.lastIndexOf(";",d-1)+1;continue}const m=o.slice(u,d).trim();if(l!=null&&l.filter&&!(l!=null&&l.filter(m))){u=f+1;continue}if(a[m]===void 0){let y=o.slice(d+1,f).trim();y.codePointAt(0)===34&&(y=y.slice(1,-1)),a[m]=tryDecode(y,c)}u=f+1}return a}function decode$3(o){return o.includes("%")?decodeURIComponent(o):o}function tryDecode(o,r){try{return r(o)}catch{return o}}const fieldContentRegExp=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function serialize(o,r,a){const l=a||{},c=l.encode||encodeURIComponent;if(typeof c!="function")throw new TypeError("option encode is invalid");if(!fieldContentRegExp.test(o))throw new TypeError("argument name is invalid");const u=c(r);if(u&&!fieldContentRegExp.test(u))throw new TypeError("argument val is invalid");let d=o+"="+u;if(l.maxAge!==void 0&&l.maxAge!==null){const f=l.maxAge-0;if(Number.isNaN(f)||!Number.isFinite(f))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(f)}if(l.domain){if(!fieldContentRegExp.test(l.domain))throw new TypeError("option domain is invalid");d+="; Domain="+l.domain}if(l.path){if(!fieldContentRegExp.test(l.path))throw new TypeError("option path is invalid");d+="; Path="+l.path}if(l.expires){if(!isDate$1(l.expires)||Number.isNaN(l.expires.valueOf()))throw new TypeError("option expires is invali
26d");d+="; Expires="+l.expires.toUTCString()}if(l.httpOnly&&(d+="; HttpOnly"),l.secure&&(d+="; Secure"),l.priority)switch(typeof l.priority=="string"?l.priority.toLowerCase():l.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(l.sameSite)switch(typeof l.sameSite=="string"?l.sameSite.toLowerCase():l.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return l.partitioned&&(d+="; Partitioned"),d}function isDate$1(o){return Object.prototype.toString.call(o)==="[object Date]"||o instanceof Date}const NODE_TYPES={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function createRouter$1(o={}){const r={options:o,rootNode:createRadixNode(),staticRoutesMap:{}},a=l=>o.strictTrailingSlash?l:l.replace(/\/$/,"")||"/";if(o.routes)for(const l in o.routes)insert(r,a(l),o.routes[l]);return{ctx:r,lookup:l=>lookup(r,a(l)),insert:(l,c)=>insert(r,a(l),c),remove:l=>remove$1(r,a(l))}}function lookup(o,r){const a=o.staticRoutesMap[r];if(a)return a.data;const l=r.split("/"),c={};let u=!1,d=null,f=o.rootNode,m=null;for(let y=0;y<l.length;y++){const E=l[y];f.wildcardChildNode!==null&&(d=f.wildcardChildNode,m=l.slice(y).join("/"));const A=f.children.get(E);if(A===void 0){if(f&&f.placeholderChildren.length>1){const P=l.length-y;f=f.placeholderChildren.find(R=>R.maxDepth===P)||null}else f=f.placeholderChildren[0]||null;if(!f)break;f.paramName&&(c[f.paramName]=E),u=!0}else f=A}return(f===null||f.data===null)&&d!==null&&(f=d,c[f.paramName||"_"]=m,u=!0),f?u?{...f.data,params:u?c:void 0}:f.data:null}function insert(o,r,a){let l=!0;const c=r.split("/");let u=o.rootNode,d=0;const f=[u];for(const m of c){let y;if(y=u.children.get(m))u=y;else{const E=getNodeType(m);y=createRadixNode({type:E,parent:u}),u.children.set(m,y),E===NODE_TYPES.PLACEHOLDER?(y.paramName=m==="*"?`_${d++}`:m.slice(1),u.placeholderChildren.push(y),l=!1):E===NODE_TYPES.WILDCARD&&(u.wildcardChildNode=y,y.paramName=m.slice(3)||"_",l=!1),f.push(y),u=y}}for(const[m,y]of f.entries())y.maxDepth=Math.max(f.length-m,y.maxDepth||0);return u.data=a,l===!0&&(o.staticRoutesMap[r]=u),u}function remove$1(o,r){let a=!1;const l=r.split("/");let c=o.rootNode;for(const u of l)if(c=c.children.get(u),!c)return a;if(c.data){const u=l.at(-1)||"";c.data=null,Object.keys(c.children).length===0&&c.parent&&(c.parent.children.delete(u),c.parent.wildcardChildNode=null,c.parent.placeholderChildren=[]),a=!0}return a}function createRadixNode(o={}){return{type:o.type||NODE_TYPES.NORMAL,maxDepth:0,parent:o.parent||null,children:new Map,data:o.data||null,paramName:o.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function getNodeType(o){return o.startsWith("**")?NODE_TYPES.WILDCARD:o[0]===":"||o==="*"?NODE_TYPES.PLACEHOLDER:NODE_TYPES.NORMAL}function toRouteMatcher(o){const r=_routerNodeToTable("",o.ctx.rootNode);return _createMatcher(r,o.ctx.options.strictTrailingSlash)}function _createMatcher(o,r){return{ctx:{table:o},matchAll:a=>_matchRoutes(a,o,r)}}function _createRouteTable(){return{static:new Map,wildcard:new Map,dynamic:new Map}}function _matchRoutes(o,r,a){a!==!0&&o.endsWith("/")&&(o=o.slice(0,-1)||"/");const l=[];for(const[u,d]of _sortRoutesMap(r.wildcard))(o===u||o.startsWith(u+"/"))&&l.push(d);for(const[u,d]of _sortRoutesMap(r.dynamic))if(o.startsWith(u+"/")){const f="/"+o.slice(u.length).split("/").splice(2).join("/");l.push(..._matchRoutes(f,d))}const c=r.static.get(o);return c&&l.push(c),l.filter(Boolean)}function _sortRoutesMap(o){return[...o.entries()].sort((r,a)=>r[0].length-a[0].length)}function _routerNodeToTable(o,r){const a=_createRouteTable();function l(c,u){if(c){if(u.type===NODE_TYPES.NORMAL&&!(c.includes("*")||c.includes(":")))u.data&&a.static.set(c,u.data);else if(u.type===NODE_TYPES.WILDCARD)a.wildcard.set(c.replace("/**",""),u.data);else if(u.type===NODE_TYPES.PLACEHOLDER){const d=_routerNodeToTable("",u);u.data&&d.static.set("/",u.data),a.dynamic.set(c.replace(/\/\*|\/:\w+/,""),d);return}}for(const[d,f]of u.children.entries())l(`${c}/${d}`.replace("//","/"),f)}return l(o,r),a}function isPlainObject$2(o){if(o===null||typeof o!="object")return!1;
26const r=Object.getPrototypeOf(o);return r!==null&&r!==Object.prototype&&Object.getPrototypeOf(r)!==null||Symbol.iterator in o?!1:Symbol.toStringTag in o?Object.prototype.toString.call(o)==="[object Module]":!0}function _defu(o,r,a=".",l){if(!isPlainObject$2(r))return _defu(o,{},a,l);const c=Object.assign({},r);for(const u in o){if(u==="__proto__"||u==="constructor")continue;const d=o[u];d!=null&&(l&&l(c,u,d,a)||(Array.isArray(d)&&Array.isArray(c[u])?c[u]=[...d,...c[u]]:isPlainObject$2(d)&&isPlainObject$2(c[u])?c[u]=_defu(d,c[u],(a?`${a}.`:"")+u.toString(),l):c[u]=d))}return c}function createDefu(o){return(...r)=>r.reduce((a,l)=>_defu(a,l,"",o),{})}const defu=createDefu();function hasProp(o,r){try{return r in o}catch{return!1}}class H3Error extends Error{constructor(a,l={}){super(a,l);nr(this,"statusCode",500);nr(this,"fatal",!1);nr(this,"unhandled",!1);nr(this,"statusMessage");nr(this,"data");nr(this,"cause");l.cause&&!this.cause&&(this.cause=l.cause)}toJSON(){const a={message:this.message,statusCode:sanitizeStatusCode(this.statusCode,500)};return this.statusMessage&&(a.statusMessage=sanitizeStatusMessage(this.statusMessage)),this.data!==void 0&&(a.data=this.data),a}}nr(H3Error,"__h3_error__",!0);function createError$1(o){if(typeof o=="string")return new H3Error(o);if(isError(o))return o;const r=new H3Error(o.message??o.statusMessage??"",{cause:o.cause||o});if(hasProp(o,"stack"))try{Object.defineProperty(r,"stack",{get(){return o.stack}})}catch{try{r.stack=o.stack}catch{}}if(o.data&&(r.data=o.data),o.statusCode?r.statusCode=sanitizeStatusCode(o.statusCode,r.statusCode):o.status&&(r.statusCode=sanitizeStatusCode(o.status,r.statusCode)),o.statusMessage?r.statusMessage=o.statusMessage:o.statusText&&(r.statusMessage=o.statusText),r.statusMessage){const a=r.statusMessage;sanitizeStatusMessage(r.statusMessage)!==a&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return o.fatal!==void 0&&(r.fatal=o.fatal),o.unhandled!==void 0&&(r.unhandled=o.unhandled),r}function sendError(o,r,a){if(o.handled)return;const l=isError(r)?r:createError$1(r),c={statusCode:l.statusCode,statusMessage:l.statusMessage,stack:[],data:l.data};if(o.handled)return;const u=Number.parseInt(l.statusCode);setResponseStatus(o,u,l.statusMessage),o.node.res.setHeader("content-type",MIMES.json),o.node.res.end(JSON.stringify(c,void 0,2))}function isError(o){var r;return((r=o==null?void 0:o.constructor)==null?void 0:r.__h3_error__)===!0}function getQuery(o){return getQuery$1(o.path||"")}function isMethod(o,r,a){if(typeof r=="string"){if(o.method===r)return!0}else if(r.includes(o.method))return!0;return!1}function assertMethod(o,r,a){if(!isMethod(o,r))throw createError$1({statusCode:405,statusMessage:"HTTP method is not allowed."})}function getRequestHeaders(o){const r={};for(const a in o.node.req.headers){const l=o.node.req.headers[a];r[a]=Array.isArray(l)?l.filter(Boolean).join(", "):l}return r}const RawBodySymbol=Symbol.for("h3RawBody"),PayloadMethods$1=["PATCH","POST","PUT","DELETE"];function readRawBody(o,r="utf8"){var u,d;assertMethod(o,PayloadMethods$1);const a=o._requestBody||((d=(u=o.web)==null?void 0:u.request)==null?void 0:d.body)||o.node.req[RawBodySymbol]||o.node.req.rawBody||o.node.req.body;if(a){const f=Promise.resolve(a).then(m=>Buffer.isBuffer(m)?m:typeof m.pipeTo=="function"?new Promise((y,E)=>{const A=[];m.pipeTo(new WritableStream({write(P){A.push(P)},close(){y(Buffer.concat(A))},abort(P){E(P)}})).catch(E)}):typeof m.pipe=="function"?new Promise((y,E)=>{const A=[];m.on("data",P=>{A.push(P)}).on("end",()=>{y(Buffer.concat(A))}).on("error",E)}):m.constructor===Object?Buffer.from(JSON.stringify(m)):m instanceof URLSearchParams?Buffer.from(m.toString()):m instanceof FormData?new Response(m).bytes().then(y=>Buffer.from(y)):Buffer.from(m));return r?f.then(m=>m.toString(r)):f}if(!Number.parseInt(o.node.req.headers["content-length"]||"")&&!String(o.node.req.headers["transfer-encoding"]??"").split(",").map(f=>f.trim()).filter(Boolean).includes("chunked"))return Promise.resolve(void 0);const l=o.node.req[RawBodySymbol]=new Promise((f,m)=>{const y=[];o.node.req.on("error",E=>{m(E)}).on("data",E=>{y.push(E)}).on("end",()=>{f(Buffer.concat(y))})});return r?l.then(f=>f.toString(r)):l}function getRequestWebStream(o){var l,c;if(!PayloadMethods$1.includes(o.method))return;const r=((c=(l=o.web)==null?void 0:l.request)==null?void 0:c.body)||o._requestBody;return r||(RawBodySymbol in o.node.req||"rawBody"in o.node.req||"body"in o.node.req||"__unenv__"in o.node.req?new ReadableStream({async start(u){const d=await readRawBody(o,!1);d&&u.enqueue(d),u.close()}}):new ReadableStream({start:u=>{o.node.req.on("data",d=>{u.enqueue(d)}),o.node.req.on("end",()=>{u.close()}),o.node.req.on("error",d=>{u.error(d)})}}))}const MIMES={json:"application/json"},DISALLOWED_STATUS_CHARS=/[^\u0009\u0020-\u007E]/g;function sanitizeStatusMessage(o=""){return o.replace(DISALLOWED_STATUS_CHARS,"")}
26function sanitizeStatusCode(o,r=200){return!o||(typeof o=="string"&&(o=Number.parseInt(o,10)),o<100||o>999)?r:o}function splitCookiesString(o){if(Array.isArray(o))return o.flatMap(E=>splitCookiesString(E));if(typeof o!="string")return[];const r=[];let a=0,l,c,u,d,f;const m=()=>{for(;a<o.length&&/\s/.test(o.charAt(a));)a+=1;return a<o.length},y=()=>(c=o.charAt(a),c!=="="&&c!==";"&&c!==",");for(;a<o.length;){for(l=a,f=!1;m();)if(c=o.charAt(a),c===","){for(u=a,a+=1,m(),d=a;a<o.length&&y();)a+=1;a<o.length&&o.charAt(a)==="="?(f=!0,a=d,r.push(o.slice(l,u)),l=a):a=u+1}else a+=1;(!f||a>=o.length)&&r.push(o.slice(l))}return r}typeof setImmediate>"u"||setImmediate;function setResponseStatus(o,r,a){r&&(o.node.res.statusCode=sanitizeStatusCode(r,o.node.res.statusCode)),a&&(o.node.res.statusMessage=sanitizeStatusMessage(a))}function setResponseHeader(o,r,a){o.node.res.setHeader(r,a)}const setHeader=setResponseHeader,PayloadMethods=new Set(["PATCH","POST","PUT","DELETE"]),ignoredHeaders=new Set(["transfer-encoding","accept-encoding","connection","keep-alive","upgrade","expect","host","accept"]);async function proxyRequest(o,r,a={}){var f,m;let l,c;PayloadMethods.has(o.method)&&(a.streamRequest?(l=getRequestWebStream(o),c="half"):l=await readRawBody(o,!1).catch(()=>{}));const u=((f=a.fetchOptions)==null?void 0:f.method)||o.method,d=mergeHeaders(getProxyRequestHeaders(o,{host:r.startsWith("/")}),(m=a.fetchOptions)==null?void 0:m.headers,a.headers);return sendProxy(o,r,{...a,fetchOptions:{method:u,body:l,duplex:c,...a.fetchOptions,headers:d}})}async function sendProxy(o,r,a={}){let l;try{l=await _getFetch(a.fetch)(r,{headers:a.headers,ignoreResponseError:!0,...a.fetchOptions})}catch(u){throw createError$1({status:502,statusMessage:"Bad Gateway",cause:u})}o.node.res.statusCode=sanitizeStatusCode(l.status,o.node.res.statusCode),o.node.res.statusMessage=sanitizeStatusMessage(l.statusText);const c=[];for(const[u,d]of l.headers.entries())if(u!=="content-encoding"&&u!=="content-length"){if(u==="set-cookie"){c.push(...splitCookiesString(d));continue}o.node.res.setHeader(u,d)}if(c.length>0&&o.node.res.setHeader("set-cookie",c.map(u=>(a.cookieDomainRewrite&&(u=rewriteCookieProperty(u,a.cookieDomainRewrite,"domain")),a.cookiePathRewrite&&(u=rewriteCookieProperty(u,a.cookiePathRewrite,"path")),u))),a.onResponse&&await a.onResponse(o,l),l._data!==void 0)return l._data;if(!o.handled){if(a.sendStream===!1){const u=new Uint8Array(await l.arrayBuffer());return o.node.res.end(u)}if(l.body)for await(const u of l.body)o.node.res.write(u);return o.node.res.end()}}function getProxyRequestHeaders(o,r){const a=Object.create(null),l=getRequestHeaders(o);for(const c in l)(!ignoredHeaders.has(c)||c==="host"&&(r!=null&&r.host))&&(a[c]=l[c]);return a}function _getFetch(o){if(o)return o;if(globalThis.fetch)return globalThis.fetch;throw new Error("fetch is not available. Try importing `node-fetch-native/polyfill` for Node.js.")}function rewriteCookieProperty(o,r,a){const l=typeof r=="string"?{"*":r}:r;return o.replace(new RegExp(`(;\\s*${a}=)([^;]+)`,"gi"),(c,u,d)=>{let f;if(d in l)f=l[d];else if("*"in l)f=l["*"];else return c;return f?u+f:""})}function mergeHeaders(o,...r){const a=r.filter(Boolean);if(a.length===0)return o;const l=new Headers(o);for(const c of a){const u=Array.isArray(c)?c:typeof c.entries=="function"?c.entries():Object.entries(c);for(const[d,f]of u)f!==void 0&&l.set(d,f)}return l}function defineEventHandler(o){if(typeof o=="function")return o.__is_handler__=!0,o;const r={onRequest:_normalizeArray(o.onRequest),onBeforeResponse:_normalizeArray(o.onBeforeResponse)},a=l=>_callHandler(l,o.handler,r);return a.__is_handler__=!0,a.__resolve__=o.handler.__resolve__,a.__websocket__=o.websocket,a}function _normalizeArray(o){return o?Array.isArray(o)?o:[o]:void 0}async function _callHandler(o,r,a){if(a.onRequest){for(const u of a.onRequest)if(await u(o),o.handled)return}const c={body:await r(o)};if(a.onBeforeResponse)for(const u of a.onBeforeResponse)await u(o,c);return c.body}const LayoutMetaSymbol=Symbol("layout-meta"),PageRouteSymbol=Symbol("route"),useRouter$1=()=>{var o;return(o=useNuxtApp())==null?void 0:o.$router},useRoute$1=()=>hasInjectionContext()?inject(PageRouteSymbol,useNuxtApp()._route):useNuxtApp()._route;function defineNuxtRouteMiddleware(o){return o}const isProcessingMiddleware=()=>{try{if(useNuxtApp()._processingMiddleware)return!0}catch{return!1}return!1},navigateTo=(o,r)=>
26{o||(o="/");const a=typeof o=="string"?o:"path"in o?resolveRouteObject(o):useRouter$1().resolve(o).href;if(r!=null&&r.open){const{target:m="_blank",windowFeatures:y={}}=r.open,E=Object.entries(y).filter(([A,P])=>P!==void 0).map(([A,P])=>`${A.toLowerCase()}=${P}`).join(", ");return open(a,m,E),Promise.resolve()}const l=hasProtocol(a,{acceptRelative:!0}),c=(r==null?void 0:r.external)||l;if(c){if(!(r!=null&&r.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const{protocol:m}=new URL(a,window.location.href);if(m&&isScriptProtocol(m))throw new Error(`Cannot navigate to a URL with '${m}' protocol.`)}const u=isProcessingMiddleware();if(!c&&u)return r!=null&&r.replace?typeof o=="string"?{path:o,replace:!0}:{...o,replace:!0}:o;const d=useRouter$1(),f=useNuxtApp();return c?(f._scope.stop(),r!=null&&r.replace?location.replace(a):location.href=a,u?f.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):r!=null&&r.replace?d.replace(o):d.push(o)};function resolveRouteObject(o){return withQuery(o.path||"",o.query||{})+(o.hash||"")}const NUXT_ERROR_SIGNATURE="__nuxt_error",useError=()=>toRef(useNuxtApp().payload,"error"),showError=o=>{const r=createError(o);try{const a=useNuxtApp(),l=useError();a.hooks.callHook("app:error",r),l.value=l.value||r}catch{throw r}return r},clearError=async(o={})=>{const r=useNuxtApp(),a=useError();r.callHook("app:error:cleared",o),o.redirect&&await useRouter$1().replace(o.redirect),a.value=nuxtDefaultErrorValue},isNuxtError=o=>!!o&&typeof o=="object"&&NUXT_ERROR_SIGNATURE in o,createError=o=>{const r=createError$1(o);return Object.defineProperty(r,NUXT_ERROR_SIGNATURE,{value:!0,configurable:!1,writable:!1}),r};function decode64(o){const r=asciiToBinary(o),a=new ArrayBuffer(r.length),l=new DataView(a);for(let c=0;c<a.byteLength;c++)l.setUint8(c,r.charCodeAt(c));return a}const KEY_STRING="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function asciiToBinary(o){o.length%4===0&&(o=o.replace(/==?$/,""));let r="",a=0,l=0;for(let c=0;c<o.length;c++)a<<=6,a|=KEY_STRING.indexOf(o[c]),l+=6,l===24&&(r+=String.fromCharCode((a&16711680)>>16),r+=String.fromCharCode((a&65280)>>8),r+=String.fromCharCode(a&255),a=l=0);return l===12?(a>>=4,r+=String.fromCharCode(a)):l===18&&(a>>=2,r+=String.fromCharCode((a&65280)>>8),r+=String.fromCharCode(a&255)),r}const UNDEFINED=-1,HOLE=-2,NAN=-3,POSITIVE_INFINITY=-4,NEGATIVE_INFINITY=-5,NEGATIVE_ZERO=-6;function parse(o,r){return unflatten(JSON.parse(o),r)}function unflatten(o,r){if(typeof o=="number")return c(o,!0);if(!Array.isArray(o)||o.length===0)throw new Error("Invalid input");const a=o,l=Array(a.length);function c(u,d=!1){if(u===UNDEFINED)return;if(u===NAN)return NaN;if(u===POSITIVE_INFINITY)return 1/0;if(u===NEGATIVE_INFINITY)return-1/0;if(u===NEGATIVE_ZERO)return-0;if(d)throw new Error("Invalid input");if(u in l)return l[u];const f=a[u];if(!f||typeof f!="object")l[u]=f;else if(Array.isArray(f))if(typeof f[0]=="string"){const m=f[0],y=r==null?void 0:r[m];if(y)return l[u]=y(c(f[1]));switch(m){case"Date":l[u]=new Date(f[1]);break;case"Set":const E=new Set;l[u]=E;for(let R=1;R<f.length;R+=1)E.add(c(f[R]));break;case"Map":const A=new Map;l[u]=A;for(let R=1;R<f.length;R+=2)A.set(c(f[R]),c(f[R+1]));break;case"RegExp":l[u]=new RegExp(f[1],f[2]);break;case"Object":l[u]=Object(f[1]);break;case"BigInt":l[u]=BigInt(f[1]);break;case"null":const P=Object.create(null);l[u]=P;for(let R=1;R<f.length;R+=2)P[f[R]]=c(f[R+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const R=globalThis[m],x=f[1],M=decode64(x),$=new R(M);l[u]=$;break}case"ArrayBuffer":{const R=f[1],x=decode64(R);l[u]=x;break}default:throw new Error(`Unknown type ${m}`)}}else{const m=new Array(f.length);l[u]=m;for(let y=0;y<f.length;y+=1){const E=f[y];E!==HOLE&&(m[y]=c(E))}}else{const m={};l[u]=m;for(const y in f){const E=f[y];m[y]=c(E)}}return l[u]}return c(0)}function unpackToArray(o,r){const a=[],l=r.resolveKeyData||(u=>u.key),c=r.resolveValueData||(u=>u.value);for(const[u,d]of Object.entries(o))a.push(...(Array.isArray(d)?d:[d]).map(f=>{const m={key:u,value:f},y=c(m);return typeof y=="object"?unpackToArray(y,r):Array.isArray(y)?y:{[typeof r.key=="function"?r.key(m):r.key]:l(m),[typeof r.value=="function"?r.value(m):r.value]:y}}).flat());return a}function unpackToString(o,r){return Object.entries(o).map(([a,l])=>{if(typeof l=="object"&&(l=unpackToString(l,r)),r.resolve){const c=r.resolve({key:a,value:l});if(typeof c<"u")return c}return typeof l=="number"&&(l=l.toString()),typeof l=="string"&&r.wrapValue&&(l=l.replace(new RegExp(r.wrapValue,"g"),`\\${r.wrapValue}`),l=`${r.wrapValue}${l}${r.wrapValue}`),`${a}${r.keyValueSeparator||""}${l}`}).join(r.entrySeparator||"")}const TagsWithInnerContent=new Set(["title","titleTemplate","script","style","noscript"]),HasElementTags=new Set(["base","meta","link","style","script","noscript"]),ValidHeadTags=new Set(["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"]),UniqueTags=new Set(["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"]),TagConfigKeys=new Set(["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"]),IsBrowser=typeof window<"u";function defineHeadPlugin(o){return o}function hashCode(o){let r=9;for(let a=0;a<o.length;)r=Math.imul(r^o.charCodeAt(a++),9**9);return((r^r>>>9)+65536).toString(16).substring(1,8).toLowerCase()}function hashTag(o){if(o._h)return o._h;if(o._d)return hashCode(o._d);let r=`${o.tag}:${o.textContent||o.innerHTML||""}:`;for(const a in o.props)r+=`${a}
26:${String(o.props[a])},`;return hashCode(r)}const p=o=>({keyValue:o,metaKey:"property"}),k=o=>({keyValue:o}),MetaPackingSchema={appleItunesApp:{unpack:{entrySeparator:", ",resolve({key:o,value:r}){return`${fixKeyCase(o)}=${r}`}}},articleExpirationTime:p("article:expiration_time"),articleModifiedTime:p("article:modified_time"),articlePublishedTime:p("article:published_time"),bookReleaseDate:p("book:release_date"),charset:{metaKey:"charset"},contentSecurityPolicy:{unpack:{entrySeparator:"; ",resolve({key:o,value:r}){return`${fixKeyCase(o)} ${r}`}},metaKey:"http-equiv"},contentType:{metaKey:"http-equiv"},defaultStyle:{metaKey:"http-equiv"},fbAppId:p("fb:app_id"),msapplicationConfig:k("msapplication-Config"),msapplicationTileColor:k("msapplication-TileColor"),msapplicationTileImage:k("msapplication-TileImage"),ogAudioSecureUrl:p("og:audio:secure_url"),ogAudioUrl:p("og:audio"),ogImageSecureUrl:p("og:image:secure_url"),ogImageUrl:p("og:image"),ogSiteName:p("og:site_name"),ogVideoSecureUrl:p("og:video:secure_url"),ogVideoUrl:p("og:video"),profileFirstName:p("profile:first_name"),profileLastName:p("profile:last_name"),profileUsername:p("profile:username"),refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve({key:o,value:r}){if(o==="seconds")return`${r}`}}},robots:{unpack:{entrySeparator:", ",resolve({key:o,value:r}){return typeof r=="boolean"?`${fixKeyCase(o)}`:`${fixKeyCase(o)}:${r}`}}},xUaCompatible:{metaKey:"http-equiv"}},openGraphNamespaces=new Set(["og","book","article","profile"]);function resolveMetaKeyType(o){var l;const r=fixKeyCase(o),a=r.indexOf(":");return openGraphNamespaces.has(r.substring(0,a))?"property":((l=MetaPackingSchema[o])==null?void 0:l.metaKey)||"name"}function resolveMetaKeyValue(o){var r;return((r=MetaPackingSchema[o])==null?void 0:r.keyValue)||fixKeyCase(o)}function fixKeyCase(o){const r=o.replace(/([A-Z])/g,"-$1").toLowerCase(),a=r.indexOf("-"),l=r.substring(0,a);return l==="twitter"||openGraphNamespaces.has(l)?o.replace(/([A-Z])/g,":$1").toLowerCase():r}function changeKeyCasingDeep(o){if(Array.isArray(o))return o.map(a=>changeKeyCasingDeep(a));if(typeof o!="object"||Array.isArray(o))return o;const r={};for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[fixKeyCase(a)]=changeKeyCasingDeep(o[a]));return r}function resolvePackedMetaObjectValue(o,r){const a=MetaPackingSchema[r];return r==="refresh"?`${o.seconds};url=${o.url}`:unpackToString(changeKeyCasingDeep(o),{keyValueSeparator:"=",entrySeparator:", ",resolve({value:l,key:c}){if(l===null)return"";if(typeof l=="boolean")return`${c}`},...a==null?void 0:a.unpack})}const ObjectArrayEntries=new Set(["og:image","og:video","og:audio","twitter:image"]);function sanitize(o){const r={};for(const a in o){if(!Object.prototype.hasOwnProperty.call(o,a))continue;const l=o[a];String(l)!=="false"&&a&&(r[a]=l)}return r}function handleObjectEntry(o,r){const a=sanitize(r),l=fixKeyCase(o),c=resolveMetaKeyType(l);if(ObjectArrayEntries.has(l)){const u={};for(const d in a)Object.prototype.hasOwnProperty.call(a,d)&&(u[`${o}${d==="url"?"":`${d[0].toUpperCase()}${d.slice(1)}`}`]=a[d]);return unpackMeta(u).sort((d,f)=>{var m,y;return(((m=d[c])==null?void 0:m.length)||0)-(((y=f[c])==null?void 0:y.length)||0)})}return[{[c]:l,...a}]}function unpackMeta(o){const r=[],a={};for(const c in o){if(!Object.prototype.hasOwnProperty.call(o,c))continue;const u=o[c];if(!Array.isArray(u)){if(typeof u=="object"&&u){if(ObjectArrayEntries.has(fixKeyCase(c))){r.push(...handleObjectEntry(c,u));continue}a[c]=sanitize(u)}else a[c]=u;continue}for(const d of u)r.push(...typeof d=="string"?unpackMeta({[c]:d}):handleObjectEntry(c,d))}const l=unpackToArray(a,{key({key:c}){return resolveMetaKeyType(c)},value({key:c}){return c==="charset"?"charset":"content"},resolveKeyData({key:c}){return resolveMetaKeyValue(c)},resolveValueData({value:c,key:u}){return c===null?"_null":typeof c=="object"?resolvePackedMetaObjectValue(c,u):typeof c=="number"?c.toString():c}});return[...r,...l].map(c=>(c.content==="_null"&&(c.content=null),c))}function thenable(o,r){return o instanceof Promise?o.then(r):r(o)}function normaliseTag(o,r,a,l){const c=l||normaliseProps(typeof r=="object"&&typeof r!="function"&&!(r instanceof Promise)?{...r}:{[o==="script"||o==="noscript"||o==="style"?"innerHTML":"textContent"]:r},o==="templateParams"||o==="titleTemplate");if(c instanceof Promise)return c.then(d=>normaliseTag(o,r,a,d));const u={tag:o,props:c};for(const d of TagConfigKeys){const f=u.props[d]!==void 0?u.props[d]:a[d];f!==void 0&&((!(d==="innerHTML"||d==="textContent"||d==="children")||TagsWithInnerContent.has(u.tag))&&(u[d==="children"?"innerHTML":d]=f),delete u.props[d])}return u.props.body&&(u.tagPosition="bodyClose",delete u.props.body),u.tag==="script"&&typeof u.innerHTML=="object"&&(u.innerHTML=JSON.stringify(u.innerHTML),u.props.type=u.props.type||"application/json"),Array.isArray(u.props.content)?u.props.content.map(d=>({...u,props:{...u.props,content:d}})):u}function normaliseStyleClassProps(o,r){var l;const a=o==="class"?" ":";";return r&&typeof r=="object"&&!Array.isArray(r)&&(r=Object.entries(r).filter(([,c])=>c).map(([c,u])=>o==="style"?`${c}:${u}`:c)),(l=String(Array.isArray(r)?r.join(a):r))==null?void 0:l.split(a).filter(c=>!!c.trim()).join(a)}function nestedNormaliseProps(o,r,a,l){for(let c=l;c<a.length;c+=1){const u=a[c];if(u==="class"||u==="style"){o[u]=normaliseStyleClassProps(u,o[u]);continue}if(o[u]instanceof Promise)return o[u].then(d=>(o[u]=d,nestedNormaliseProps(o,r,a,c)));if(!r&&!TagConfigKeys.has(u)){const d=String(o[u]),f=u.startsWith("data-");d==="true"||d===""?o[u]=f?"true":!0:o[u]||(f&&d==="false"?o[u]="false":delete o[u])}}}function normaliseProps(o,r=!1){const a=nestedNormaliseProps(o,r,Object.keys(o),0);return a instanceof Promise?a.then(()=>o):o}const TagEntityBits=10;function nestedNormaliseEntryTags(o,r,a){for(let l=a;l<r.length;l+=1){const c=r[l];if(c instanceof Promise)return c.then(u=>(r[l]=u,nestedNormaliseEntryTags(o,r,l)));Array.isArray(c)?o.push(...c):o.push(c)}}function normaliseEntryTags(o){const r=[],a=o.resolvedInput;for(const c in a){if(!Object.prototype.hasOwnProperty.call(a,c))continue;const u=a[c];if(!(u===void 0||!ValidHeadTags.has(c))){if(Array.isArray(u)){for(const d of u)r.push(normaliseTag(c,d,o));continue}r.push(normaliseTag(c,u,o))}}if(r.length===0)return[];const l=[];return thenable(nestedNormaliseEntryTags(l,r,0),()=>l.map((c,u)=>(c._e=o._i,o.mode&&(c._m=o.mode),c._p=(o._i<<TagEntityBits)+u,c)))}const NetworkEvents=new Set(["onload","onerror","onabort","onprogress","onloadstart"]),TAG_WEIGHTS={base:-10,title:10},TAG_ALIASES={critical:-80,high:-10,low:20};function tagWeight(o){const r=o.tagPriority;if(typeof r=="number")return r;let a=100;return o.tag==="meta"?o.props["http-equiv"]==="content-security-policy"?a=-30:o.props.charset?a=-20:o.props.name==="viewport"&&(a=-15):o.tag==="link"&&o.props.rel==="preconnect"?a=20:o.tag in TAG_WEIGHTS&&(a=TAG_WEIGHTS[o.tag]),r&&r in TAG_ALIASES?a+TAG_ALIASES[r]:a}const SortModifiers=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}],allowedMetaProperties=["name","property","http-equiv"];function tagDedupeKey(o){const{props:r,tag:a}=o;if(UniqueTags.has(a))return a;
26if(a==="link"&&r.rel==="canonical")return"canonical";if(r.charset)return"charset";if(r.id)return`${a}:id:${r.id}`;for(const l of allowedMetaProperties)if(r[l]!==void 0)return`${a}:${l}:${r[l]}`;return!1}const sepSub="%separator";function sub(o,r,a=!1){var c;let l;if(r==="s"||r==="pageTitle")l=o.pageTitle;else if(r.includes(".")){const u=r.indexOf(".");l=(c=o[r.substring(0,u)])==null?void 0:c[r.substring(u+1)]}else l=o[r];if(l!==void 0)return a?(l||"").replace(/"/g,'\\"'):l||""}const sepSubRe=new RegExp(`${sepSub}(?:\\s*${sepSub})*`,"g");function processTemplateParams(o,r,a,l=!1){if(typeof o!="string"||!o.includes("%"))return o;let c=o;try{c=decodeURI(o)}catch{}const u=c.match(/%\w+(?:\.\w+)?/g);if(!u)return o;const d=o.includes(sepSub);return o=o.replace(/%\w+(?:\.\w+)?/g,f=>{if(f===sepSub||!u.includes(f))return f;const m=sub(r,f.slice(1),l);return m!==void 0?m:f}).trim(),d&&(o.endsWith(sepSub)&&(o=o.slice(0,-sepSub.length)),o.startsWith(sepSub)&&(o=o.slice(sepSub.length)),o=o.replace(sepSubRe,a).trim()),o}function resolveTitleTemplate(o,r){return o==null?r||null:typeof o=="function"?o(r):o}async function renderDOMHead(o,r={}){const a=r.document||o.resolvedOptions.document;if(!a||!o.dirty)return;const l={shouldRender:!0,tags:[]};if(await o.hooks.callHook("dom:beforeRender",l),!!l.shouldRender)return o._domUpdatePromise||(o._domUpdatePromise=new Promise(async c=>{var A;const u=(await o.resolveTags()).map(P=>({tag:P,id:HasElementTags.has(P.tag)?hashTag(P):P.tag,shouldRender:!0}));let d=o._dom;if(!d){d={elMap:{htmlAttrs:a.documentElement,bodyAttrs:a.body}};const P=new Set;for(const R of["body","head"]){const x=(A=a[R])==null?void 0:A.children;for(const M of x){const $=M.tagName.toLowerCase();if(!HasElementTags.has($))continue;const V={tag:$,props:await normaliseProps(M.getAttributeNames().reduce((F,j)=>({...F,[j]:M.getAttribute(j)}),{})),innerHTML:M.innerHTML},B=tagDedupeKey(V);let O=B,L=1;for(;O&&P.has(O);)O=`${B}:${L++}`;O&&(V._d=O,P.add(O)),d.elMap[M.getAttribute("data-hid")||hashTag(V)]=M}}}d.pendingSideEffects={...d.sideEffects},d.sideEffects={};function f(P,R,x){const M=`${P}:${R}`;d.sideEffects[M]=x,delete d.pendingSideEffects[M]}function m({id:P,$el:R,tag:x}){const M=x.tag.endsWith("Attrs");if(d.elMap[P]=R,M||(x.textContent&&x.textContent!==R.textContent&&(R.textContent=x.textContent),x.innerHTML&&x.innerHTML!==R.innerHTML&&(R.innerHTML=x.innerHTML),f(P,"el",()=>{var $;($=d.elMap[P])==null||$.remove(),delete d.elMap[P]})),x._eventHandlers)for(const $ in x._eventHandlers)Object.prototype.hasOwnProperty.call(x._eventHandlers,$)&&R.getAttribute(`data-${$}`)!==""&&((x.tag==="bodyAttrs"?a.defaultView:R).addEventListener($.substring(2),x._eventHandlers[$].bind(R)),R.setAttribute(`data-${$}`,""));for(const $ in x.props){if(!Object.prototype.hasOwnProperty.call(x.props,$))continue;const V=x.props[$],B=`attr:${$}`;if($==="class"){if(!V)continue;for(const O of V.split(" "))M&&f(P,`${B}:${O}`,()=>R.classList.remove(O)),!R.classList.contains(O)&&R.classList.add(O)}else if($==="style"){if(!V)continue;for(const O of V.split(";")){const L=O.indexOf(":"),F=O.substring(0,L).trim(),j=O.substring(L+1).trim();f(P,`${B}:${F}`,()=>{R.style.removeProperty(F)}),R.style.setProperty(F,j)}}else R.getAttribute($)!==V&&R.setAttribute($,V===!0?"":String(V)),M&&f(P,B,()=>R.removeAttribute($))}}const y=[],E={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const P of u){const{tag:R,shouldRender:x,id:M}=P;if(x){if(R.tag==="title"){a.title=R.textContent;continue}P.$el=P.$el||d.elMap[M],P.$el?m(P):HasElementTags.has(R.tag)&&y.push(P)}}for(const P of y){const R=P.tag.tagPosition||"head";P.$el=a.createElement(P.tag.tag),m(P),E[R]=E[R]||a.createDocumentFragment(),E[R].appendChild(P.$el)}for(const P of u)await o.hooks.callHook("dom:renderTag",P,a,f);E.head&&a.head.appendChild(E.head),E.bodyOpen&&a.body.insertBefore(E.bodyOpen,a.body.firstChild),E.bodyClose&&a.body.appendChild(E.bodyClose);for(const P in d.pendingSideEffects)d.pendingSideEffects[P]();o._dom=d,await o.hooks.callHook("dom:rendered",{renders:u}),c()}).finally(()=>{o._domUpdatePromise=void 0,o.dirty=!1}
26)),o._domUpdatePromise}function debouncedRenderDOMHead(o,r={}){const a=r.delayFn||(l=>setTimeout(l,10));return o._domDebouncedUpdatePromise=o._domDebouncedUpdatePromise||new Promise(l=>a(()=>renderDOMHead(o,r).then(()=>{delete o._domDebouncedUpdatePromise,l()})))}function DomPlugin(o){return r=>{var l,c;const a=((c=(l=r.resolvedOptions.document)==null?void 0:l.head.querySelector('script[id="unhead:payload"]'))==null?void 0:c.innerHTML)||!1;return a&&r.push(JSON.parse(a)),{mode:"client",hooks:{"entries:updated":u=>{debouncedRenderDOMHead(u,o)}}}}}const UsesMergeStrategy=new Set(["templateParams","htmlAttrs","bodyAttrs"]),DedupePlugin={hooks:{"tag:normalise":({tag:o})=>{o.props.hid&&(o.key=o.props.hid,delete o.props.hid),o.props.vmid&&(o.key=o.props.vmid,delete o.props.vmid),o.props.key&&(o.key=o.props.key,delete o.props.key);const r=tagDedupeKey(o);r&&!r.startsWith("meta:og:")&&!r.startsWith("meta:twitter:")&&delete o.key;const a=r||(o.key?`${o.tag}:${o.key}`:!1);a&&(o._d=a)},"tags:resolve":o=>{const r=Object.create(null);for(const l of o.tags){const c=(l.key?`${l.tag}:${l.key}`:l._d)||hashTag(l),u=r[c];if(u){let f=l==null?void 0:l.tagDuplicateStrategy;if(!f&&UsesMergeStrategy.has(l.tag)&&(f="merge"),f==="merge"){const m=u.props;m.style&&l.props.style&&(m.style[m.style.length-1]!==";"&&(m.style+=";"),l.props.style=`${m.style} ${l.props.style}`),m.class&&l.props.class?l.props.class=`${m.class} ${l.props.class}`:m.class&&(l.props.class=m.class),r[c].props={...m,...l.props};continue}else if(l._e===u._e){u._duped=u._duped||[],l._d=`${u._d}:${u._duped.length+1}`,u._duped.push(l);continue}else if(tagWeight(l)>tagWeight(u))continue}if(!(l.innerHTML||l.textContent||Object.keys(l.props).length!==0)&&HasElementTags.has(l.tag)){delete r[c];continue}r[c]=l}const a=[];for(const l in r){const c=r[l],u=c._duped;a.push(c),u&&(delete c._duped,a.push(...u))}o.tags=a,o.tags=o.tags.filter(l=>!(l.tag==="meta"&&(l.props.name||l.props.property)&&!l.props.content))}}},ValidEventTags=new Set(["script","link","bodyAttrs"]),EventHandlersPlugin=o=>({hooks:{"tags:resolve":r=>{for(const a of r.tags){if(!ValidEventTags.has(a.tag))continue;const l=a.props;for(const c in l){if(c[0]!=="o"||c[1]!=="n"||!Object.prototype.hasOwnProperty.call(l,c))continue;const u=l[c];typeof u=="function"&&(o.ssr&&NetworkEvents.has(c)?l[c]=`this.dataset.${c}fired = true`:delete l[c],a._eventHandlers=a._eventHandlers||{},a._eventHandlers[c]=u)}o.ssr&&a._eventHandlers&&(a.props.src||a.props.href)&&(a.key=a.key||hashCode(a.props.src||a.props.href))}},"dom:renderTag":({$el:r,tag:a})=>{var c,u;const l=r==null?void 0:r.dataset;if(l)for(const d in l){if(!d.endsWith("fired"))continue;const f=d.slice(0,-5);NetworkEvents.has(f)&&((u=(c=a._eventHandlers)==null?void 0:c[f])==null||u.call(r,new Event(f.substring(2))))}}}}),DupeableTags=new Set(["link","style","script","noscript"]),HashKeyedPlugin={hooks:{"tag:normalise":({tag:o})=>{o.key&&DupeableTags.has(o.tag)&&(o.props["data-hid"]=o._h=hashCode(o.key))}}},PayloadPlugin={mode:"server",hooks:{"tags:beforeResolve":o=>{const r={};let a=!1;for(const l of o.tags)l._m!=="server"||l.tag!=="titleTemplate"&&l.tag!=="templateParams"&&l.tag!=="title"||(r[l.tag]=l.tag==="title"||l.tag==="titleTemplate"?l.textContent:l.props,a=!0);a&&o.tags.push({tag:"script",innerHTML:JSON.stringify(r),props:{id:"unhead:payload",type:"application/json"}})}}},SortPlugin={hooks:{"tags:resolve":o=>{var r;for(const a of o.tags)if(typeof a.tagPriority=="string")for(const{prefix:l,offset:c}of SortModifiers){if(!a.tagPriority.startsWith(l))continue;const u=a.tagPriority.substring(l.length),d=(r=o.tags.find(f=>f._d===u))==null?void 0:r._p;if(d!==void 0){a._p=d+c;break}}o.tags.sort((a,l)=>{const c=tagWeight(a),u=tagWeight(l);return c<u?-1:c>u?1:a._p-l._p})}}},SupportedAttrs={meta:"content",link:"href",htmlAttrs:"lang"},contentAttrs=["innerHTML","textContent"],TemplateParamsPlugin=o=>({hooks:{"tags:resolve":r=>{var d;const{tags:a}=r;let l;for(let f=0;f<a.length;f+=1)a[f].tag==="templateParams"&&(l=r.tags.splice(f,1)[0].props,f-=1);const c=l||{},u=c.separator||"|";delete c.separator,c.pageTitle=processTemplateParams(c.pageTitle||((d=a.find(f=>f.tag==="title"))==null?void 0:d.textContent)||"",c,u);for(const f of a){if(f.processTemplateParams===!1)continue;const m=SupportedAttrs[f.tag];if(m&&typeof f.props[m]=="string")f.props[m]=processTemplateParams(f.props[m],c,u);else if(f.processTemplateParams||f.tag==="titleTemplate"||f.tag==="title")for(const y of contentAttrs)typeof f[y]=="string"&&(f[y]=processTemplateParams(f[y],c,u,f.tag==="script"&&f.props.type.endsWith("json")))}o._templateParams=c,o._separator=u},"tags:afterResolve":({tags:r})=>{let a;for(let l=0;l<r.length;l+=1){const c=r[l];c.tag==="title"&&c.processTemplateParams!==!1&&(a=c)}a!=null&&a.textContent&&(a.textContent=processTemplateParams(a.textContent,o._templateParams,o._separator))}}}),TitleTemplatePlugin={hooks:{"tags:resolve":o=>{const{tags:r}=o;let a,l;for(let c=0;c<r.length;c+=1){const u=r[c];u.tag==="title"?a=u:u.tag==="titleTemplate"&&(l=u)}if(l&&a){const c=resolveTitleTemplate(l.textContent,a.textContent);c!==null?a.textContent=c||a.textContent:o.tags.splice(o.tags.indexOf(a),1)}else if(l){const c=resolveTitleTemplate(l.textContent);c!==null&&(l.textContent=c,l.tag="title",l=void 0)}l&&o.tags.splice(o.tags.indexOf(l),1)}}},XSSPlugin={hooks:{"tags:afterResolve":o=>{for(const r of o.tags)typeof r.innerHTML=="string"&&(r.innerHTML&&(r.props.type==="application/ld+json"||r.props.type==="application/json")?r.innerHTML=r.innerHTML.replace(/</g,"\\u003C"):r.innerHTML=r.innerHTML.replace(new RegExp(`</${r.tag}`,"g"),`<\\/${r.tag}`))}}};let activeHead;function createHead$1(o={}){const r=createHeadCore(o);return r.use(DomPlugin()),activeHead=r}function filterMode(o,r){return!o||o==="server"&&r||o==="client"&&!r}function createHeadCore(o={}){const r=createHooks();r.addHooks(o.hooks||{}),o.document=o.document||(IsBrowser?document:void 0);const a=!o.document,l=()=>{f.dirty=!0,r.callHook("entries:updated",f)};let c=0,u=[];const d=[],f={plugins:d,dirty:!1,resolvedOptions:o,hooks:r,headEntries(){return u},use(m){const y=typeof m=="function"?m(f):m;(!y.key||!d.some(E=>E.key===y.key))&&(d.push(y),filterMode(y.mode,a)&&r.addHooks(y.hooks||{}))},push(m,y){y==null||delete y.head;const E={_i:c++,input:m,...y};return filterMode(E.mode,a)&&(u.push(E),l()),{dispose(){u=u.filter(A=>A._i!==E._i),l()},patch(A){for(const P of u)P._i===E._i&&(P.input=E.input=A);l()}}},async resolveTags(){const m={tags:[],entries:[...u]};await r.callHook("entries:resolve",m);for(const y of m.entries){const E=y.resolvedInput||y.input;if(y.resolvedInput=await(y.transform?y.transform(E):E),y.resolvedInput)for(const A of await normaliseEntryTags(y)){const P={tag:A,entry:y,resolvedOptions:f.resolvedOptions};await r.callHook("tag:normalise",P),m.tags.push(P.tag)}}return await r.callHook("tags:beforeResolve",m),await r.callHook("tags:resolve",m),await r.callHook("tags:afterResolve",m),m.tags},ssr:a};return[DedupePlugin,PayloadPlugin,EventHandlersPlugin,HashKeyedPlugin,SortPlugin,TemplateParamsPlugin,TitleTemplatePlugin,
26XSSPlugin,...(o==null?void 0:o.plugins)||[]].forEach(m=>f.use(m)),f.hooks.callHook("init",f),f}function getActiveHead(){return activeHead}const Vue3=version$9[0]==="3";function resolveUnref(o){return typeof o=="function"?o():unref(o)}function resolveUnrefHeadInput(o){if(o instanceof Promise||o instanceof Date||o instanceof RegExp)return o;const r=resolveUnref(o);if(!o||!r)return r;if(Array.isArray(r))return r.map(a=>resolveUnrefHeadInput(a));if(typeof r=="object"){const a={};for(const l in r)if(Object.prototype.hasOwnProperty.call(r,l)){if(l==="titleTemplate"||l[0]==="o"&&l[1]==="n"){a[l]=unref(r[l]);continue}a[l]=resolveUnrefHeadInput(r[l])}return a}return r}const VueReactivityPlugin={hooks:{"entries:resolve":o=>{for(const r of o.entries)r.resolvedInput=resolveUnrefHeadInput(r.input)}}},headSymbol="usehead";function vueInstall(o){return{install(a){Vue3&&(a.config.globalProperties.$unhead=o,a.config.globalProperties.$head=o,a.provide(headSymbol,o))}}.install}function createHead(o={}){o.domDelayFn=o.domDelayFn||(a=>nextTick(()=>setTimeout(()=>a(),0)));const r=createHead$1(o);return r.use(VueReactivityPlugin),r.install=vueInstall(r),r}const _global=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},globalKey="__unhead_injection_handler__";function setHeadInjectionHandler(o){_global[globalKey]=o}function injectHead(){return globalKey in _global?_global[globalKey]():inject(headSymbol)||getActiveHead()}function useHead(o,r={}){const a=r.head||injectHead();if(a)return a.ssr?a.push(o,r):clientUseHead(a,o,r)}function clientUseHead(o,r,a={}){const l=ref$1(!1),c=ref$1({});watchEffect(()=>{c.value=l.value?{}:resolveUnrefHeadInput(r)});const u=o.push(c.value,a);return watch(c,f=>{u.patch(f)}),getCurrentInstance()&&(onBeforeUnmount(()=>{u.dispose()}),onDeactivated(()=>{l.value=!0}),onActivated(()=>{l.value=!1})),u}function useSeoMeta(o,r){const{title:a,titleTemplate:l,...c}=o;return useHead({title:a,titleTemplate:l,_flatMeta:c},{...r,transform(u){const d=unpackMeta({...u._flatMeta});return delete u._flatMeta,{...u,meta:d}}})}async function loadPayload(o,r={}){const a=await _getPayloadURL(o,r),l=useNuxtApp(),c=l._payloadCache=l._payloadCache||{};return a in c?c[a]||null:(c[a]=isPrerendered(o).then(u=>u?_importPayload(a).then(d=>d||(delete c[a],null)):(c[a]=null,null)),c[a])}const filename="_payload.json";async function _getPayloadURL(o,r={}){const a=new URL(o,"http://localhost");if(a.host!=="localhost"||hasProtocol(a.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+o);const l=useRuntimeConfig(),c=r.hash||(r.fresh?Date.now():l.app.buildId),u=l.app.cdnURL,d=u&&await isPrerendered(o)?u:l.app.baseURL;return joinURL(d,a.pathname,filename+(c?`?${c}`:""))}async function _importPayload(o){const r=fetch(o).then(a=>a.text().then(parsePayload));try{return await r}catch(a){console.warn("[nuxt] Cannot load payload ",o,a)}return null}async function isPrerendered(o=useRoute$1().path){return!!useNuxtApp().payload.prerenderedAt}let payloadCache=null;async function getNuxtClientPayload(){var l;if(payloadCache)return payloadCache;const o=document.getElementById("__NUXT_DATA__");if(!o)return{};const r=await parsePayload(o.textContent||""),a=o.dataset.src?await _importPayload(o.dataset.src):void 0;return payloadCache={...r,...a,...window.__NUXT__},(l=payloadCache.config)!=null&&l.public&&(payloadCache.config.public=reactive(payloadCache.config.public)),payloadCache}async function parsePayload(o){return await parse(o,useNuxtApp()._payloadRevivers)}function definePayloadReviver(o,r){useNuxtApp()._payloadRevivers[o]=r}const revivers=[["NuxtError",o=>createError(o)],["EmptyShallowRef",o=>shallowRef(o==="_"?void 0:o==="0n"?BigInt(0):destr$1(o))],["EmptyRef",o=>ref$1(o==="_"?void 0:o==="0n"?BigInt(0):destr$1(o))],["ShallowRef",o=>shallowRef(o)],["ShallowReactive",o=>shallowReactive(o)],["Ref",o=>ref$1(o)],["Reactive",o=>reactive(o)]],revive_payload_client_QhxXdWjLM0=defineNuxtPlugin({name:"nuxt:revive-payload:client",order:-30,async setup(o){let r,a;
vendor: 18,373 bytes, lines 26-30
26for(const[l,c]of revivers)definePayloadReviver(l,c);Object.assign(o.payload,([r,a]=executeAsync(()=>o.runWithContext(getNuxtClientPayload)),r=await r,a(),r)),window.__NUXT__=o.payload}}),unheadPlugins=[],unhead_lihN7BCnVg=defineNuxtPlugin({name:"nuxt:head",enforce:"pre",setup(o){const r=createHead({plugins:unheadPlugins});setHeadInjectionHandler(()=>useNuxtApp().vueApp._context.provides.usehead),o.vueApp.use(r);{let a=!0;const l=async()=>{a=!1,await renderDOMHead(r)};r.hooks.hook("dom:beforeRender",c=>{c.shouldRender=!a}),o.hooks.hook("page:start",()=>{a=!0}),o.hooks.hook("page:finish",()=>{o.isHydrating||l()}),o.hooks.hook("app:error",l),o.hooks.hook("app:suspense:resolve",l)}}});/*!
27  * vue-router v4.5.0
28  * (c) 2024 Eduardo San Martin Morote
29  * @license MIT
30  */const isBrowser$1=typeof document<"u";function isRouteComponent(o){return typeof o=="object"||"displayName"in o||"props"in o||"__vccOpts"in o}function isESModule(o){return o.__esModule||o[Symbol.toStringTag]==="Module"||o.default&&isRouteComponent(o.default)}const assign$1=Object.assign;function applyToParams(o,r){const a={};for(const l in r){const c=r[l];a[l]=isArray$2(c)?c.map(o):o(c)}return a}const noop$4=()=>{},isArray$2=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(o){return encodeURI(""+o).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(o){return commonEncode(o).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(o){return commonEncode(o).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(o){return encodeQueryValue(o).replace(EQUAL_RE,"%3D")}function encodePath(o){return commonEncode(o).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(o){return o==null?"":encodePath(o).replace(SLASH_RE,"%2F")}function decode$2(o){try{return decodeURIComponent(""+o)}catch{}return""+o}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=o=>o.replace(TRAILING_SLASH_RE,"");function parseURL(o,r,a="/"){let l,c={},u="",d="";const f=r.indexOf("#");let m=r.indexOf("?");return f<m&&f>=0&&(m=-1),m>-1&&(l=r.slice(0,m),u=r.slice(m+1,f>-1?f:r.length),c=o(u)),f>-1&&(l=l||r.slice(0,f),d=r.slice(f,r.length)),l=resolveRelativePath(l??r,a),{fullPath:l+(u&&"?")+u+d,path:l,query:c,hash:decode$2(d)}}function stringifyURL(o,r){const a=r.query?o(r.query):"";return r.path+(a&&"?")+a+(r.hash||"")}function stripBase(o,r){return!r||!o.toLowerCase().startsWith(r.toLowerCase())?o:o.slice(r.length)||"/"}function isSameRouteLocation(o,r,a){const l=r.matched.length-1,c=a.matched.length-1;return l>-1&&l===c&&isSameRouteRecord(r.matched[l],a.matched[c])&&isSameRouteLocationParams(r.params,a.params)&&o(r.query)===o(a.query)&&r.hash===a.hash}function isSameRouteRecord(o,r){return(o.aliasOf||o)===(r.aliasOf||r)}function isSameRouteLocationParams(o,r){if(Object.keys(o).length!==Object.keys(r).length)return!1;for(const a in o)if(!isSameRouteLocationParamsValue(o[a],r[a]))return!1;return!0}function isSameRouteLocationParamsValue(o,r){return isArray$2(o)?isEquivalentArray(o,r):isArray$2(r)?isEquivalentArray(r,o):o===r}function isEquivalentArray(o,r){return isArray$2(r)?o.length===r.length&&o.every((a,l)=>a===r[l]):o.length===1&&o[0]===r}function resolveRelativePath(o,r){if(o.startsWith("/"))return o;if(!o)return r;const a=r.split("/"),l=o.split("/"),c=l[l.length-1];(c===".."||c===".")&&l.push("");let u=a.length-1,d,f;for(d=0;d<l.length;d++)if(f=l[d],f!==".")if(f==="..")u>1&&u--;else break;return a.slice(0,u).join("/")+"/"+l.slice(d).join("/")}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var NavigationType;(function(o){o.pop="pop",o.push="push"})(NavigationType||(NavigationType={}));var NavigationDirection;(function(o){o.back="back",o.forward="forward",o.unknown=""})(NavigationDirection||(NavigationDirection={}));function normalizeBase(o){if(!o)if(isBrowser$1){const r=document.querySelector("base");o=r&&r.getAttribute("href")||"/",o=o.replace(/^\w+:\/\/[^\/]+/,"")}else o="/";return o[0]!=="/"&&o[0]!=="#"&&(o="/"+o),removeTrailingSlash(o)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(o,r){return o.replace(BEFORE_HASH_RE,"#")+r}function getElementPosition(o,r){const a=document.documentElement.getBoundingClientRect(),l=o.getBoundingClientRect();return{behavior:r.behavior,left:l.left-a.left-(r.left||0),top:l.top-a.top-(r.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(o){let r;if("el"in o){const a=o.el,l=typeof a=="string"&&a.startsWith("#"),c=typeof a=="string"?l?document.getElementById(a.slice(1)):document.querySelector(a):a;if(!c)return;r=getElementPosition(c,o)}else r=o;"scrollBehavior"in document.documentElement.style?window.scrollTo(r):window.scrollTo(r.left!=null?r.left:window.scrollX,r.top!=null?r.top:window.scrollY)}function getScrollKey(o,r){return(history.state?history.state.position-r:-1)+o}const scrollPositions=new Map;function saveScrollPosition(o,r){scrollPositions.set(o,r)}function getSavedScrollPosition(o){const r=scrollPositions.get(o);return scrollPositions.delete(o),r}let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation$1(o,r){const{pathname:a,search:l,hash:c}=r,u=o.indexOf("#");if(u>-1){let f=c.includes(o.slice(u))?o.slice(u).length:1,m=c.slice(f);return m[0]!=="/"&&(m="/"+m),stripBase(m,"")}return stripBase(a,o)+l+c}function useHistoryListeners(o,r,a,l){let c=[],u=[],d=null;const f=({state:P})=>{const R=createCurrentLocation$1(o,location),x=a.value,M=r.value;let $=0;if(P){if(a.value=R,r.value=P,d&&d===x){d=null;return}$=M?P.position-M.position:0}else l(R);c.forEach(V=>{V(a.value,x,{delta:$,type:NavigationType.pop,direction:$?$>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function m(){d=a.value}function y(P){c.push(P);const R=()=>{const x=c.indexOf(P);x>-1&&c.splice(x,1)};return u.push(R),R}function E(){const{history:P}=window;P.state&&P.replaceState(assign$1({},P.state,{scroll:computeScrollPosition()}),"")}function A(){for(const P of u)P();u=[],window.removeEventListener("popstate",f),window.removeEventListener("beforeunload",E)}return window.addEventListener("popstate",f),window.addEventListener("beforeunload",E,{passive:!0}),{pauseListeners:m,listen:y,destroy:A}}function buildState(o,r,a,l=!1,c=!1){return{back:o,current:r,forward:a,replaced:l,position:window.history.length,scroll:c?computeScrollPosition():null}}function useHistoryStateNavigation(o){const{history:r,location:a}=window,l={value:createCurrentLocation$1(o,a)},c={value:r.state};c.value||u(l.value,{back:null,current:l.value,forward:null,position:r.length-1,replaced:!0,scroll:null},!0);function u(m,y,E){const A=o.indexOf("#"),P=A>-1?(a.host&&document.querySelector("base")?o:o.slice(A))+m:createBaseLocation()+o+m;try{r[E?"replaceState":"pushState"](y,"",P),c.value=y}catch(R){console.error(R),a[E?"replace":"assign"](P)}}function d(m,y){const E=assign$1({},r.state,buildState(c.value.back,m,c.value.forward,!0),y,{position:c.value.position});u(m,E,!0),l.value=m}function f(m,y){const E=assign$1({},c.value,r.state,{forward:m,scroll:computeScrollPosition()});u(E.current,E,!0);const A=assign$1({},buildState(l.value,m,null),{position:E.position+1},y);u(m,A,!1),l.value=m}return{location:l,state:c,push:f,replace:d}}function createWebHistory(o){o=normalizeBase(o);const r=useHistoryStateNavigation(o),a=useHistoryListeners(o,r.state,r.location,r.replace);function l(u,d=!0){d||a.pauseListeners(),history.go(u)}const c=assign$1({location:"",base:o,go:l,createHref:createHref.bind(null,o)},r,a);return Object.defineProperty(c,"location",{enumerable:!0,get:()=>r.location.value}),Object.defineProperty(c,"state",{enumerable:!0,get:()=>r.state.value}),c}function isRouteLocation(o){return typeof o=="string"||o&&typeof o=="object"}function isRouteName(o){return typeof o=="string"||typeof o=="symbol"}const NavigationFailureSymbol=Symbol("");var NavigationFailureType;(function(o){o[o.aborted=4]="aborted",o[o.cancelled=8]="cancelled",o[o.duplicated=16]="duplicated"})(NavigationFailureType||(NavigationFailureType={}));function createRouterError(o,r){return assign$1(new Error,{type:o,[NavigationFailureSymbol]:!0},r)}function isNavigationFailure(o,r){return o instanceof Error&&NavigationFailureSymbol in o&&(r==null||!!(o.type&r))}const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(o,r){const a=assign$1({},BASE_PATH_PARSER_OPTIONS,r),l=[];let c=a.start?"^":"";const u=[];for(const y of o){const E=y.length?[]:[90];a.strict&&!y.length&&(c+="/");for(let A=0;A<y.length;A++){const P=y[A];let R=40+(a.sensitive?.25:0);if(P.type===0)A||(c+="/"),c+=P.value.replace(REGEX_CHARS_RE,"\\$&"),R+=40;else if(P.type===1){const{value:x,repeatable:M,optional:$,regexp:V}=P;u.push({name:x,repeatable:M,optional:$});const B=V||BASE_PARAM_PATTERN;if(B!==BASE_PARAM_PATTERN){R+=10;try{new RegExp(`(${B})`)}catch(L){throw new Error(`Invalid custom RegExp for param "${x}" (${B}): `+L.message)}}let O=M?`((?:${B})(?:/(?:${B}))*)`:`(${B})`;A||(O=$&&y.length<2?`(?:/${O})`:"/"+O),$&&(O+="?"),c+=O,R+=20,$&&(R+=-8),M&&(R+=-20),B===".*"&&(R+=-50)}E.push(R)}l.push(E)}if(a.strict&&a.end){const y=l.length-1;l[y][l[y].length-1]+=.7000000000000001}a.strict||(c+="/?"),a.end?c+="$":a.strict&&!c.endsWith("/")&&(c+="(?:/|$)");const d=new RegExp(c,a.sensitive?"":"i");function f(y){const E=y.match(d),A={};if(!E)return null;for(let P=1;P<E.length;P++){const R=E[P]||"",x=u[P-1];A[x.name]=R&&x.repeatable?R.split("/"):R}return A}function m(y){let E="",A=!1;for(const P of o){(!A||!E.endsWith("/"))&&(E+="/"),A=!1;for(const R of P)if(R.type===0)E+=R.value;else if(R.type===1){const{value:x,repeatable:M,optional:$}=R,V=x in y?y[x]:"";if(isArray$2(V)&&!M)throw new Error(`Provided param "${x}" is an array but it is not repeatable (* or + modifiers)`);const B=isArray$2(V)?V.join("/"):V;if(!B)if($)P.length<2&&(E.endsWith("/")?E=E.slice(0,-1):A=!0);else throw new Error(`Missing required param "${x}"`);E+=B}}return E||"/"}return{re:d,score:l,keys:u,parse:f,stringify:m}}function compareScoreArray(o,r){let a=0;for(;a<o.length&&a<r.length;){const l=r[a]-o[a];if(l)return l;a++}return o.length<r.length?o.length===1&&o[0]===80?-1:1:o.length>r.length?r.length===1&&r[0]===80?1:-1:0}function comparePathParserScore(o,r){let a=0;const l=o.score,c=r.score;for(;a<l.length&&a<c.length;){const u=compareScoreArray(l[a],c[a]);if(u)return u;a++}if(Math.abs(c.length-l.length)===1){if(isLastScoreNegative(l))return 1;if(isLastScoreNegative(c))return-1}return c.length-l.length}function isLastScoreNegative(o){const r=o[o.length-1];return o.length>0&&r[r.length-1]<0}const ROOT_TOKEN={type:0,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(o){if(!o)return[[]];if(o==="/")return[[ROOT_TOKEN]];if(!o.startsWith("/"))throw new Error(`Invalid path "${o}"`);function r(R){throw new Error(`ERR (${a})/"${y}": ${R}`)}let a=0,l=a;const c=[];let u;function d(){u&&c.push(u),u=[]}let f=0,m,y="",E="";function A(){y&&(a===0?u.push({type:0,value:y}):a===1||a===2||a===3?(u.length>1&&(m==="*"||m==="+")&&r(`A repeatable param (${y}) must be alone in its segment. eg: '/:ids+.`),u.push({type:1,value:y,regexp:E,repeatable:m==="*"||m==="+",optional:m==="*"||m==="?"})):r("Invalid state to consume buffer"),y="")}function P(){y+=m}for(;f<o.length;){if(m=o[f++],m==="\\"&&a!==2){l=a,a=4;continue}switch(a){case 0:m==="/"?(y&&A(),d()):m===":"?(A(),a=1):P();break;case 4:P(),a=l;break;case 1:m==="("?a=2:VALID_PARAM_RE.test(m)?P():(A(),a=0,m!=="*"&&m!=="?"&&m!=="+"&&f--);break;case 2:m===")"?E[E.length-1]=="\\"?E=E.slice(0,-1)+m:a=3:E+=m;break;case 3:A(),a=0,m!=="*"&&m!=="?"&&m!=="+"&&f--,E="";break;default:r("Unknown state");break}}return a===2&&r(`Unfinished custom RegExp for param "${y}"`),A(),d(),c}function createRouteRecordMatcher(o,r,a){const l=tokensToParser(tokenizePath(o.path),a),c=assign$1(l,{record:o,parent:r,children:[],alias:[]});return r&&!c.record.aliasOf==!r.record.aliasOf&&r.children.push(c),c}function createRouterMatcher(o,r){const a=[],l=new Map;r=mergeOptions({strict:!1,end:!0,sensitive:!1},r);function c(A){return l.get(A)}function u(A,P,R){const x=!R,M=normalizeRouteRecord(A);M.aliasOf=R&&R.record;const $=mergeOptions(r,A),V=[M];if("alias"in A){const L=typeof A.alias=="string"?[A.alias]:A.alias;for(const F of L)V.push(normalizeRouteRecord(assign$1({},M,{components:R?R.record.components:M.components,path:F,aliasOf:R?R.record:M})))}let B,O;for(const L of V){const{path:F}=L;if(P&&F[0]!=="/"){const j=P.record.path,U=j[j.length-1]==="/"?"":"/";L.path=P.record.path+(F&&U+F)}if(B=createRouteRecordMatcher(L,P,$),R?R.alias.push(B):(O=O||B,O!==B&&O.alias.push(B),x&&A.name&&!isAliasRecord(B)&&d(A.name)),isMatchable(B)&&m(B),M.children){const j=M.children;for(let U=0;U<j.length;U++)u(j[U],B,R&&R.children[U])}R=R||B}return O?()=>{d(O)}:noop$4}function d(A){if(isRouteName(A)){const P=l.get(A);P&&(l.delete(A),a.splice(a.indexOf(P),1),P.children.forEach(d),P.alias.forEach(d))}else{const P=a.indexOf(A);P>-1&&(a.splice(P,1),A.record.name&&l.delete(A.record.name),A.children.forEach(d),A.alias.forEach(d))}}function f(){return a}function m(A){const P=findInsertionIndex(A,a);a.splice(P,0,A),A.record.name&&!isAliasRecord(A)&&l.set(A.record.name,A)}function y(A,P){let R,x={},M,$;if("name"in A&&A.name){if(R=l.get(A.name),!R)throw createRouterError(1,{location:A});$=R.record.name,x=assign$1(paramsFromLocation(P.params,R.keys.filter(O=>!O.optional).concat(R.parent?R.parent.keys.filter(O=>O.optional):[]).map(O=>O.name)),A.params&&paramsFromLocation(A.params,R.keys.map(O=>O.name))),M=R.stringify(x)}else if(A.path!=null)M=A.path,R=a.find(O=>O.re.test(M)),R&&(x=R.parse(M),$=R.record.name);else{if(R=P.name?l.get(P.name):a.find(O=>O.re.test(P.path)),!R)throw createRouterError(1,{location:A,currentLocation:P});$=R.record.name,x=assign$1({},P.params,A.params),M=R.stringify(x)}const V=[];let B=R;for(;B;)V.unshift(B.record),B=B.parent;return{name:$,path:M,params:x,matched:V,meta:mergeMetaFields(V)}}o.forEach(A=>u(A));function E(){a.length=0,l.clear()}return{addRoute:u,resolve:y,removeRoute:d,clearRoutes:E,getRoutes:f,getRecordMatcher:c}}function paramsFromLocation(o,r){const a={};for(const l of r)l in o&&(a[l]=o[l]);return a}function normalizeRouteRecord(o){const r={path:o.path,redirect:o.redirect,name:o.name,meta:o.meta||{},aliasOf:o.aliasOf,beforeEnter:o.beforeEnter,props:normalizeRecordProps(o),children:o.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in o?o.components||null:o.component&&{default:o.component}};return Object.defineProperty(r,"mods",{value:{}}),r}function normalizeRecordProps(o){const r={},a=o.props||!1;if("component"in o)r.default=a;else for(const l in o.components)r[l]=typeof a=="object"?a[l]:a;return r}function isAliasRecord(o){for(;o;){if(o.record.aliasOf)return!0;o=o.parent}return!1}function mergeMetaFields(o){return o.reduce((r,a)=>assign$1(r,a.meta),{})}function mergeOptions(o,r){const a={};for(const l in o)a[l]=l in r?r[l]:o[l];return a}function findInsertionIndex(o,r){let a=0,l=r.length;for(;a!==l;){const u=a+l>>1;comparePathParserScore(o,r[u])<0?l=u:a=u+1}const c=getInsertionAncestor(o);return c&&(l=r.lastIndexOf(c,l-1)),l}function getInsertionAncestor(o){let r=o;for(;r=r.parent;)if(isMatchable(r)&&comparePathParserScore(o,r)===0)return r}function isMatchable({record:o}){return!!(o.name||o.components&&Object.keys(o.components).length||o.redirect)}function parseQuery(o){const r={};if(o===""||o==="?")return r;const l=(o[0]==="?"?o.slice(1):o).split("&");for(let c=0;c<l.length;++c){const u=l[c].replace(PLUS_RE," "),d=u.indexOf("="),f=decode$2(d<0?u:u.slice(0,d)),m=d<0?null:decode$2(u.slice(d+1));if(f in r){let y=r[f];isArray$2(y)||(y=r[f]=[y]),y.push(m)}else r[f]=m}return r}function stringifyQuery(o){let r="";for(let a in o){const l=o[a];if(a=encodeQueryKey(a),l==null){l!==void 0&&(r+=(r.length?"&":"")+a);continue}(isArray$2(l)?l.map(u=>u&&encodeQueryValue(u)):[l&&encodeQueryValue(l)]).forEach(u=>{u!==void 0&&(r+=(r.length?"&":"")+a,u!=null&&(r+="="+u))})}return r}function normalizeQuery(o){const r={};for(const a in o){const l=o[a];l!==void 0&&(r[a]=isArray$2(l)?l.map(c=>c==null?null:""+c):l==null?l:""+l)}return r}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let o=[];function r(l){return o.push(l),()=>{const c=o.indexOf(l);c>-1&&o.splice(c,1)}}function a(){o=[]}return{add:r,list:()=>o.slice(),reset:a}}function guardToPromiseFn(o,r,a,l,c,u=d=>d()){const d=l&&(l.enterCallbacks[c]=l.enterCallbacks[c]||[]);return()=>new Promise((f,m)=>{const y=P=>{P===!1?m(createRouterError(4,{from:a,to:r})):P instanceof Error?m(P):isRouteLocation(P)?m(createRouterError(2,{from:r,to:P})):(d&&l.enterCallbacks[c]===d&&typeof P=="function"&&d.push(P),f())},E=u(()=>o.call(l&&l.instances[c],r,a,y));let A=Promise.resolve(E);o.length<3&&(A=A.then(y)),A.catch(P=>m(P))})}function extractComponentsGuards(o,r,a,l,c=u=>u()){const u=[];for(const d of o)for(const f in d.components){let m=d.components[f];if(!(r!=="beforeRouteEnter"&&!d.instances[f]))if(isRouteComponent(m)){const E=(m.__vccOpts||m)[r];E&&u.push(guardToPromiseFn(E,a,l,d,f,c))}else{let y=m();u.push(()=>y.then(E=>{if(!E)throw new Error(`Couldn't resolve component "${f}" at "${d.path}"`);const A=isESModule(E)?E.default:E;d.mods[f]=E,d.components[f]=A;const R=(A.__vccOpts||A)[r];return R&&guardToPromiseFn(R,a,l,d,f,c)()}))}}return u}function useLink(o){const r=inject(routerKey),a=inject(routeLocationKey),l=computed(()=>{const m=unref(o.to);return r.resolve(m)}),c=computed(()=>{const{matched:m}=l.value,{length:y}=m,E=m[y-1],A=a.matched;
vendor: 5,754 bytes, line 30
30if(!E||!A.length)return-1;const P=A.findIndex(isSameRouteRecord.bind(null,E));if(P>-1)return P;const R=getOriginalPath(m[y-2]);return y>1&&getOriginalPath(E)===R&&A[A.length-1].path!==R?A.findIndex(isSameRouteRecord.bind(null,m[y-2])):P}),u=computed(()=>c.value>-1&&includesParams(a.params,l.value.params)),d=computed(()=>c.value>-1&&c.value===a.matched.length-1&&isSameRouteLocationParams(a.params,l.value.params));function f(m={}){if(guardEvent(m)){const y=r[unref(o.replace)?"replace":"push"](unref(o.to)).catch(noop$4);return o.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>y),y}return Promise.resolve()}return{route:l,href:computed(()=>l.value.href),isActive:u,isExactActive:d,navigate:f}}function preferSingleVNode(o){return o.length===1?o[0]:o}const RouterLinkImpl=defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink,setup(o,{slots:r}){const a=reactive(useLink(o)),{options:l}=inject(routerKey),c=computed(()=>({[getLinkClass(o.activeClass,l.linkActiveClass,"router-link-active")]:a.isActive,[getLinkClass(o.exactActiveClass,l.linkExactActiveClass,"router-link-exact-active")]:a.isExactActive}));return()=>{const u=r.default&&preferSingleVNode(r.default(a));return o.custom?u:h("a",{"aria-current":a.isExactActive?o.ariaCurrentValue:null,href:a.href,onClick:a.navigate,class:c.value},u)}}}),RouterLink=RouterLinkImpl;function guardEvent(o){if(!(o.metaKey||o.altKey||o.ctrlKey||o.shiftKey)&&!o.defaultPrevented&&!(o.button!==void 0&&o.button!==0)){if(o.currentTarget&&o.currentTarget.getAttribute){const r=o.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(r))return}return o.preventDefault&&o.preventDefault(),!0}}function includesParams(o,r){for(const a in r){const l=r[a],c=o[a];if(typeof l=="string"){if(l!==c)return!1}else if(!isArray$2(c)||c.length!==l.length||l.some((u,d)=>u!==c[d]))return!1}return!0}function getOriginalPath(o){return o?o.aliasOf?o.aliasOf.path:o.path:""}const getLinkClass=(o,r,a)=>o??r??a,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(o,{attrs:r,slots:a}){const l=inject(routerViewLocationKey),c=computed(()=>o.route||l.value),u=inject(viewDepthKey,0),d=computed(()=>{let y=unref(u);const{matched:E}=c.value;let A;for(;(A=E[y])&&!A.components;)y++;return y}),f=computed(()=>c.value.matched[d.value]);provide(viewDepthKey,computed(()=>d.value+1)),provide(matchedRouteKey,f),provide(routerViewLocationKey,c);const m=ref$1();return watch(()=>[m.value,f.value,o.name],([y,E,A],[P,R,x])=>{E&&(E.instances[A]=y,R&&R!==E&&y&&y===P&&(E.leaveGuards.size||(E.leaveGuards=R.leaveGuards),E.updateGuards.size||(E.updateGuards=R.updateGuards))),y&&E&&(!R||!isSameRouteRecord(E,R)||!P)&&(E.enterCallbacks[A]||[]).forEach(M=>M(y))},{flush:"post"}),()=>{const y=c.value,E=o.name,A=f.value,P=A&&A.components[E];if(!P)return normalizeSlot(a.default,{Component:P,route:y});const R=A.props[E],x=R?R===!0?y.params:typeof R=="function"?R(y):R:null,$=h(P,assign$1({},x,r,{onVnodeUnmounted:V=>{V.component.isUnmounted&&(A.instances[E]=null)},ref:m}));return normalizeSlot(a.default,{Component:$,route:y})||$}}});function normalizeSlot(o,r){if(!o)return null;const a=o(r);return a.length===1?a[0]:a}const RouterView=RouterViewImpl;function createRouter(o){const r=createRouterMatcher(o.routes,o),a=o.parseQuery||parseQuery,l=o.stringifyQuery||stringifyQuery,c=o.history,u=useCallbacks(),d=useCallbacks(),f=useCallbacks(),m=shallowRef(START_LOCATION_NORMALIZED);let y=START_LOCATION_NORMALIZED;isBrowser$1&&o.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const E=applyToParams.bind(null,je=>""+je),A=applyToParams.bind(null,encodeParam),P=applyToParams.bind(null,decode$2);function R(je,it){let st,lt;return isRouteName(je)?(st=r.getRecordMatcher(je),lt=it):lt=je,r.addRoute(lt,st)}function x(je){const it=r.getRecordMatcher(je);it&&r.removeRoute(it)}function M(){return r.getRoutes().map(je=>je.record)}function $(je){return!!r.getRecordMatcher(je)}function V(je,it){if(it=assign$1({},it||m.value),typeof je=="string"){const Se=parseURL(a,je,it.path),Le=r.resolve({path:Se.path},it),qe=c.createHref(Se.fullPath);return assign$1(Se,Le,{params:P(Le.params),hash:decode$2(Se.hash),redirectedFrom:void 0,href:qe})}let st;if(je.path!=null)st=assign$1({},je,{path:parseURL(a,je.path,it.path).path});else{const Se=assign$1({},je.params);for(const Le in Se)Se[Le]==null&&delete Se[Le];st=assign$1({},je,{params:A(Se)}),it.params=A(it.params)}const lt=r.resolve(st,it),vt=je.hash||"";lt.params=E(P(lt.params));const ze=stringifyURL(l,assign$1({},je,{hash:encodeHash(vt),path:lt.path})),Pe=c.createHref(ze);return assign$1({fullPath:ze,hash:vt,query:l===stringifyQuery?normalizeQuery(je.query):je.query||{}},lt,{redirectedFrom:void 0,href:Pe})}function B(je){return typeof je=="string"?parseURL(a,je,m.value.path):assign$1({},je)}function O(je,it){if(y!==je)return createRouterError(8,{from:it,to:je})}function L(je){return U(je)}function F(je){return L(assign$1(B(je),{replace:!0}))}function j(je){const it=je.matched[je.matched.length-1];if(it&&it.redirect){const{redirect:st}=it;let lt=typeof st=="function"?st(je):st;return typeof lt=="string"&&(lt=lt.includes("?")||lt.includes("#")?lt=B(lt):{path:lt},lt.params={}),assign$1({query:je.query,hash:je.hash,params:lt.path!=null?{}:je.params},lt)}}function U(je,it){const st=y=V(je),lt=m.value,vt=je.state,ze=je.force,Pe=je.replace===!0,Se=j(st);if(Se)return U(assign$1(B(Se),{state:typeof Se=="object"?assign$1({}
vendor: 5,285 bytes, line 30
30,vt,Se.state):vt,force:ze,replace:Pe}),it||st);const Le=st;Le.redirectedFrom=it;let qe;return!ze&&isSameRouteLocation(l,lt,st)&&(qe=createRouterError(16,{to:Le,from:lt}),Ne(lt,lt,!0,!1)),(qe?Promise.resolve(qe):te(Le,lt)).catch(He=>isNavigationFailure(He)?isNavigationFailure(He,2)?He:Fe(He):Q(He,Le,lt)).then(He=>{if(He){if(isNavigationFailure(He,2))return U(assign$1({replace:Pe},B(He.to),{state:typeof He.to=="object"?assign$1({},vt,He.to.state):vt,force:ze}),it||Le)}else He=J(Le,lt,!0,Pe,vt);return ve(Le,lt,He),He})}function G(je,it){const st=O(je,it);return st?Promise.reject(st):Promise.resolve()}function Y(je){const it=pt.values().next().value;return it&&typeof it.runWithContext=="function"?it.runWithContext(je):je()}function te(je,it){let st;const[lt,vt,ze]=extractChangingRecords(je,it);st=extractComponentsGuards(lt.reverse(),"beforeRouteLeave",je,it);for(const Se of lt)Se.leaveGuards.forEach(Le=>{st.push(guardToPromiseFn(Le,je,it))});const Pe=G.bind(null,je,it);return st.push(Pe),yt(st).then(()=>{st=[];for(const Se of u.list())st.push(guardToPromiseFn(Se,je,it));return st.push(Pe),yt(st)}).then(()=>{st=extractComponentsGuards(vt,"beforeRouteUpdate",je,it);for(const Se of vt)Se.updateGuards.forEach(Le=>{st.push(guardToPromiseFn(Le,je,it))});return st.push(Pe),yt(st)}).then(()=>{st=[];for(const Se of ze)if(Se.beforeEnter)if(isArray$2(Se.beforeEnter))for(const Le of Se.beforeEnter)st.push(guardToPromiseFn(Le,je,it));else st.push(guardToPromiseFn(Se.beforeEnter,je,it));return st.push(Pe),yt(st)}).then(()=>(je.matched.forEach(Se=>Se.enterCallbacks={}),st=extractComponentsGuards(ze,"beforeRouteEnter",je,it,Y),st.push(Pe),yt(st))).then(()=>{st=[];for(const Se of d.list())st.push(guardToPromiseFn(Se,je,it));return st.push(Pe),yt(st)}).catch(Se=>isNavigationFailure(Se,8)?Se:Promise.reject(Se))}function ve(je,it,st){f.list().forEach(lt=>Y(()=>lt(je,it,st)))}function J(je,it,st,lt,vt){const ze=O(je,it);if(ze)return ze;const Pe=it===START_LOCATION_NORMALIZED,Se=isBrowser$1?history.state:{};st&&(lt||Pe?c.replace(je.fullPath,assign$1({scroll:Pe&&Se&&Se.scroll},vt)):c.push(je.fullPath,vt)),m.value=je,Ne(je,it,st,Pe),Fe()}let Z;function Me(){Z||(Z=c.listen((je,it,st)=>{if(!_t.listening)return;const lt=V(je),vt=j(lt);if(vt){U(assign$1(vt,{replace:!0,force:!0}),lt).catch(noop$4);return}y=lt;const ze=m.value;isBrowser$1&&saveScrollPosition(getScrollKey(ze.fullPath,st.delta),computeScrollPosition()),te(lt,ze).catch(Pe=>isNavigationFailure(Pe,12)?Pe:isNavigationFailure(Pe,2)?(U(assign$1(B(Pe.to),{force:!0}),lt).then(Se=>{isNavigationFailure(Se,20)&&!st.delta&&st.type===NavigationType.pop&&c.go(-1,!1)}).catch(noop$4),Promise.reject()):(st.delta&&c.go(-st.delta,!1),Q(Pe,lt,ze))).then(Pe=>{Pe=Pe||J(lt,ze,!1),Pe&&(st.delta&&!isNavigationFailure(Pe,8)?c.go(-st.delta,!1):st.type===NavigationType.pop&&isNavigationFailure(Pe,20)&&c.go(-1,!1)),ve(lt,ze,Pe)}).catch(noop$4)}))}let ke=useCallbacks(),se=useCallbacks(),xe;function Q(je,it,st){Fe(je);const lt=se.list();return lt.length?lt.forEach(vt=>vt(je,it,st)):console.error(je),Promise.reject(je)}function ie(){return xe&&m.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((je,it)=>{ke.add([je,it])})}function Fe(je){return xe||(xe=!je,Me(),ke.list().forEach(([it,st])=>je?st(je):it()),ke.reset()),je}function Ne(je,it,st,lt){const{scrollBehavior:vt}=o;if(!isBrowser$1||!vt)return Promise.resolve();const ze=!st&&getSavedScrollPosition(getScrollKey(je.fullPath,0))||(lt||!st)&&history.state&&history.state.scroll||null;return nextTick().then(()=>vt(je,it,ze)).then(Pe=>Pe&&scrollToPosition(Pe)).catch(Pe=>Q(Pe,je,it))}const nt=je=>c.go(je);let ct;const pt=new Set,_t={currentRoute:m,listening:!0,addRoute:R,removeRoute:x,clearRoutes:r.clearRoutes,hasRoute:$,getRoutes:M,resolve:V,options:o,push:L,replace:F,go:nt,back:()=>nt(-1),forward:()=>nt(1),beforeEach:u.add,beforeResolve:d.add,afterEach:f.add,onError:se.add,isReady:ie,install(je){const it=this;je.component("RouterLink",RouterLink),je.component("RouterView",RouterView),je.config.globalProperties.$router=it,Object.defineProperty(je.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(m)}),isBrowser$1&&!ct&&m.value===START_LOCATION_NORMALIZED&&(ct=!0,L(c.location).catch(vt=>{}));const st={};for(const vt in START_LOCATION_NORMALIZED)Object.defineProperty(st,vt,{get:()=>m.value[vt],enumerable:!0});je.provide(routerKey,it),je.provide(routeLocationKey,shallowReactive(st)),je.provide(routerViewLocationKey,m);const lt=je.unmount;pt.add(je),je.unmount=function(){pt.delete(je),pt.size<1&&(y=START_LOCATION_NORMALIZED,Z&&Z(),Z=null,m.value=START_LOCATION_NORMALIZED,ct=!1,xe=!1),lt()}}};function yt(je){return je.reduce((it,st)=>it.then(()=>Y(st)),Promise.resolve())}return _t}function extractChangingRecords(o,r){const a=[],l=[],c=[],u=Math.max(r.matched.length,o.matched.length);for(let d=0;d<u;d++){const f=r.matched[d];f&&(o.matched.find(y=>isSameRouteRecord(y,f))?l.push(f):a.push(f));const m=o.matched[d];m&&(r.matched.find(y=>isSameRouteRecord(y,m))||c.push(m))}return[a,l,c]}function useRouter(){return inject(routerKey)}function useRoute(o){return inject(routeLocationKey)}const ROUTE_KEY_PARENTHESES_RE$1=/(:\w+)\([^)]+\)/g,ROUTE_KEY_SYMBOLS_RE$1=/(:\w+)[?+*]/g,ROUTE_KEY_NORMAL_RE$1=/:\w+/g,interpolatePath=(o,r)=>
30r.path.replace(ROUTE_KEY_PARENTHESES_RE$1,"$1").replace(ROUTE_KEY_SYMBOLS_RE$1,"$1").replace(ROUTE_KEY_NORMAL_RE$1,a=>{var l;return((l=o.params[a.slice(1)])==null?void 0:l.toString())||""}),generateRouteKey$1=(o,r)=>{const a=o.route.matched.find(c=>{var u;return((u=c.components)==null?void 0:u.default)===o.Component.type}),l=r??(a==null?void 0:a.meta.key)??(a&&interpolatePath(o.route,a));return typeof l=="function"?l(o.route):l},wrapInKeepAlive=(o,r)=>({default:()=>o?h(KeepAlive,o===!0?{}:o,r):r});function toArray$2(o){return Array.isArray(o)?o:[o]}const __nuxt_page_meta$8={middleware:["source-data-server"]},__nuxt_page_meta$7={layout:"blog",middleware:["source-data-server"]},__nuxt_page_meta$6={middleware:["blog"]},__nuxt_page_meta$5={middleware:["reset-password"]},__nuxt_page_meta$4={middleware:["source-data-server"]},__nuxt_page_meta$3={middleware:["member"]},__nuxt_page_meta$2={middleware:["member"]},__nuxt_page_meta$1={middleware:["member"]},__nuxt_page_meta={layout:"blog"};function handleHotUpdate(o,r){}const _routes=[{name:"slug",path:"/:slug(.*)*",meta:__nuxt_page_meta$8||{},component:()=>__vitePreload(()=>import("./hnN0wzPz.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]),import.meta.url)},{name:"blog-title",path:"/:blog()/:title()",meta:__nuxt_page_meta$7||{},component:()=>__vitePreload(()=>import("./CeuLrEAZ.js"),__vite__mapDeps([35,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,36,34,37]),import.meta.url)},{name:"blog",path:"/:blog()",meta:__nuxt_page_meta$6||{},component:()=>__vitePreload(()=>import("./WCv4GiF8.js"),__vite__mapDeps([38,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,36,39,40,41]),import.meta.url)},{name:"403",path:"/403",component:()=>__vitePreload(()=>import("./CMF-19qF.js"),__vite__mapDeps([42,6,43]),import.meta.url)},{name:"404",path:"/404",component:()=>__vitePreload(()=>import("./DO7_xk5t.js"),__vite__mapDeps([44,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]),import.meta.url)},{name:"auth-reset",path:"/auth-reset",meta:__nuxt_page_meta$5||{},component:()=>__vitePreload(()=>import("./C9S_Et39.js"),__vite__mapDeps([45,6,46]),import.meta.url)},{name:"backup-id-hash",path:"/backup/:id()/:hash()",meta:__nuxt_page_meta$4||{},component:()=>__vitePreload(()=>import("./C4XCa2ZH.js"),__vite__mapDeps([47,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]),import.meta.url)},{name:"chat-popup",path:"/chat-popup",component:()=>__vitePreload(()=>import("./mL5PdPRz.js"),__vite__mapDeps([48,6]),import.meta.url)},{name:"legal-page",path:"/legal/:page()",component:()=>__vitePreload(()=>import("./BoXiJdU1.js"),__vite__mapDeps([49,6,50]),import.meta.url)},{name:"member-login",path:"/member/login",meta:__nuxt_page_meta$3||{},component:()=>__vitePreload(()=>import("./Bn1GlyUG.js"),__vite__mapDeps([51,52,6,53]),import.meta.url)},{name:"member-logout",path:"/member/logout",meta:__nuxt_page_meta$2||{},component:()=>__vitePreload(()=>import("./bUNlgfXu.js"),__vite__mapDeps([54,6]),import.meta.url)},{name:"member-reset-password",path:"/member/reset-password",meta:__nuxt_page_meta$1||{},component:()=>__vitePreload(()=>import("./CdBmHfC5.js"),__vite__mapDeps([55,52,56,6,57]),import.meta.url)},{name:"playground-post",path:"/playground/post",meta:__nuxt_page_meta||{},component:()=>__vitePreload(()=>import("./CzK1dpn_.js"),__vite__mapDeps([58,25,34,6]),import.meta.url)},{name:"restriction-group-id",path:"/restriction/:group()/:id()",component:()=>__vitePreload(()=>import("./CgP9qIR5.js"),__vite__mapDeps([59,6]),import.meta.url)},{name:"source-page-hash",path:"/source-page/:hash()",component:()=>__vitePreload(()=>import("./Ctqxywf0.js"),__vite__mapDeps([60,6,61]),import.meta.url)},{name:"source-hash",path:"/source/:hash()",component:()=>__vitePreload(()=>import("./ighgRPTs.js"),__vite__mapDeps([62,6,63]),import.meta.url)},{name:"system-maintenance",path:"/system/maintenance",component:()=>__vitePreload(()=>import("./jlOWumce.js"),__vite__mapDeps([64,6,65]),import.meta.url)},{name:"test-stream-2",path:"/test-stream-2",component:()=>__vitePreload(()=>
30import("./D4cuSQgQ.js"),__vite__mapDeps([66,6]),import.meta.url)},{name:"test-stream",path:"/test-stream",component:()=>__vitePreload(()=>import("./YG1-RQVa.js"),__vite__mapDeps([67,6]),import.meta.url)}],_wrapInTransition=(o,r)=>({default:()=>{var a;return o?h(Transition,o===!0?{}:o,r):(a=r.default)==null?void 0:a.call(r)}}),ROUTE_KEY_PARENTHESES_RE=/(:\w+)\([^)]+\)/g,ROUTE_KEY_SYMBOLS_RE=/(:\w+)[?+*]/g,ROUTE_KEY_NORMAL_RE=/:\w+/g;function generateRouteKey(o){const r=(o==null?void 0:o.meta.key)??o.path.replace(ROUTE_KEY_PARENTHESES_RE,"$1").replace(ROUTE_KEY_SYMBOLS_RE,"$1").replace(ROUTE_KEY_NORMAL_RE,a=>{var l;return((l=o.params[a.slice(1)])==null?void 0:l.toString())||""});return typeof r=="function"?r(o):r}function isChangingPage(o,r){return o===r||r===START_LOCATION_NORMALIZED?!1:generateRouteKey(o)!==generateRouteKey(r)?!0:!o.matched.every((l,c)=>{var u,d;return l.components&&l.components.default===((d=(u=r.matched[c])==null?void 0:u.components)==null?void 0:d.default)})}const routerOptions0={scrollBehavior(o,r,a){var y;const l=useNuxtApp(),c=((y=useRouter$1().options)==null?void 0:y.scrollBehaviorType)??"auto";let u=a||void 0;const d=typeof o.meta.scrollToTop=="function"?o.meta.scrollToTop(o,r):o.meta.scrollToTop;if(!u&&r&&o&&d!==!1&&isChangingPage(o,r)&&(u={left:0,top:0}),o.path===r.path)return r.hash&&!o.hash?{left:0,top:0}:o.hash?{el:o.hash,top:_getHashElementScrollMarginTop(o.hash),behavior:c}:!1;const f=E=>!!(E.meta.pageTransition??appPageTransition),m=f(r)&&f(o)?"page:transition:finish":"page:finish";return new Promise(E=>{l.hooks.hookOnce(m,async()=>{await new Promise(A=>setTimeout(A,0)),o.hash&&(u={el:o.hash,top:_getHashElementScrollMarginTop(o.hash),behavior:c}),E(u)})})}};function _getHashElementScrollMarginTop(o){try{const r=document.querySelector(o);if(r)return(Number.parseFloat(getComputedStyle(r).scrollMarginTop)||0)+(Number.parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop)||0)}catch{}return 0}const configRouterOptions={hashMode:!1,scrollBehaviorType:"auto"},routerOptions={...configRouterOptions,...routerOptions0},validate=async o=>{var m;let r,a;if(!((m=o.meta)!=null&&m.validate))return;const l=useNuxtApp(),c=useRouter$1(),u=([r,a]=executeAsync(()=>Promise.resolve(o.meta.validate(o))),r=await r,a(),r);if(u===!0)return;const d=createError({statusCode:u&&u.statusCode||404,statusMessage:u&&u.statusMessage||`Page Not Found: ${o.fullPath}`,data:{path:o.fullPath}}),f=c.beforeResolve(y=>{if(f(),y===o){const E=c.afterEach(async()=>{E(),await l.runWithContext(()=>showError(d)),window==null||window.history.pushState({},"",o.fullPath)});return!1}})},maintenance_45global=async()=>{if(useRuntimeConfig().public.maintenanceMode==="true")return navigateTo("https://maintenance.estage.com/maintenance",{external:!0})},defaults$1=Object.freeze({ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1,excludeKeys:void 0,excludeValues:void 0,replacer:void 0});function objectHash(o,r){r?r={...defaults$1,...r}:r=defaults$1;const a=createHasher(r);return a.dispatch(o),a.toString()}const defaultPrototypesKeys=Object.freeze(["prototype","__proto__","constructor"]);function createHasher(o){let r="",a=new Map;const l=c=>{r+=c};return{toString(){return r},getContext(){return a},dispatch(c){return o.replacer&&(c=o.replacer(c)),this[c===null?"null":typeof c](c)},object(c){if(c&&typeof c.toJSON=="function")return this.object(c.toJSON());const u=Object.prototype.toString.call(c);let d="";const f=u.length;f<10?d="unknown:["+u+"]":d=u.slice(8,f-1),d=d.toLowerCase();let m=null;if((m=a.get(c))===void 0)a.set(c,a.size);else return this.dispatch("[CIRCULAR:"+m+"]");if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(c))return l("buffer:"),l(c.toString("utf8"));if(d!=="object"&&d!=="function"&&d!=="asyncfunction")this[d]?this[d](c):o.ignoreUnknown||this.unkown(c,d);else{let y=Object.keys(c);o.unorderedObjects&&(y=y.sort());let E=[];o.respectType!==!1&&!isNativeFunction(c)&&(E=defaultPrototypesKeys),o.excludeKeys&&(y=y.filter(P=>!o.excludeKeys(P)),E=E.filter(P=>!o.excludeKeys(P))),l("object:"+(y.length+E.length)+":");const A=P=>{this.dispatch(P),l(":"),o.excludeValues||this.dispatch(c[P]),l(",")};for(const P of y)A(P);for(const P of E)A(P)}},array(c,u){if(u=u===void 0?o.unorderedArrays!==!1:u,l("array:"+c.length+":"),!u||c.length<=1){for(const m of c)this.dispatch(m);return}const d=new Map,f=c.map(m=>{const y=createHasher(o);y.dispatch(m);for(const[E,A]of y.getContext())d.set(E,A);return y.toString()});return a=d,f.sort(),this.array(f,!1)},date(c){return l("date:"+c.toJSON())},symbol(c){return l("symbol:"+c.toString())},unkown(c,u){if(l(u),!!c&&(l(":"),c&&typeof c.entries=="function"))return this.array(Array.from(c.entries()),!0)},error(c){return l("error:"+c.toString())},boolean(c){return l("bool:"+c)}
30,string(c){l("string:"+c.length+":"),l(c)},function(c){l("fn:"),isNativeFunction(c)?this.dispatch("[native]"):this.dispatch(c.toString()),o.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(c.name)),o.respectFunctionProperties&&this.object(c)},number(c){return l("number:"+c)},xml(c){return l("xml:"+c.toString())},null(){return l("Null")},undefined(){return l("Undefined")},regexp(c){return l("regex:"+c.toString())},uint8array(c){return l("uint8array:"),this.dispatch(Array.prototype.slice.call(c))},uint8clampedarray(c){return l("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(c))},int8array(c){return l("int8array:"),this.dispatch(Array.prototype.slice.call(c))},uint16array(c){return l("uint16array:"),this.dispatch(Array.prototype.slice.call(c))},int16array(c){return l("int16array:"),this.dispatch(Array.prototype.slice.call(c))},uint32array(c){return l("uint32array:"),this.dispatch(Array.prototype.slice.call(c))},int32array(c){return l("int32array:"),this.dispatch(Array.prototype.slice.call(c))},float32array(c){return l("float32array:"),this.dispatch(Array.prototype.slice.call(c))},float64array(c){return l("float64array:"),this.dispatch(Array.prototype.slice.call(c))},arraybuffer(c){return l("arraybuffer:"),this.dispatch(new Uint8Array(c))},url(c){return l("url:"+c.toString())},map(c){l("map:");const u=[...c];return this.array(u,o.unorderedSets!==!1)},set(c){l("set:");const u=[...c];return this.array(u,o.unorderedSets!==!1)},file(c){return l("file:"),this.dispatch([c.name,c.size,c.type,c.lastModfied])},blob(){if(o.ignoreUnknown)return l("[blob]");throw new Error(`Hashing Blob objects is currently not supported
31Use "options.replacer" or "options.ignoreUnknown"
32`)},domwindow(){return l("domwindow")},bigint(c){return l("bigint:"+c.toString())},process(){return l("process")},timer(){return l("timer")},pipe(){return l("pipe")},tcp(){return l("tcp")},udp(){return l("udp")},tty(){return l("tty")},statwatcher(){return l("statwatcher")},securecontext(){return l("securecontext")},connection(){return l("connection")},zlib(){return l("zlib")},context(){return l("context")},nodescript(){return l("nodescript")},httpparser(){return l("httpparser")},dataview(){return l("dataview")},signal(){return l("signal")},fsevent(){return l("fsevent")},tlswrap(){return l("tlswrap")}}}const nativeFunc="[native code] }",nativeFuncLength=nativeFunc.length;function isNativeFunction(o){return typeof o!="function"?!1:Function.prototype.toString.call(o).slice(-nativeFuncLength)===nativeFunc}var __defProp$1=Object.defineProperty,__defNormalProp$1=(o,r,a)=>r in o?__defProp$1(o,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[r]=a,__publicField$1=(o,r,a)=>(__defNormalProp$1(o,typeof r!="symbol"?r+"":r,a),a);class WordArray{constructor(r,a){__publicField$1(this,"words"),__publicField$1(this,"sigBytes"),r=this.words=r||[],this.sigBytes=a===void 0?r.length*4:a}toString(r){return(r||Hex).stringify(this)}concat(r){if(this.clamp(),this.sigBytes%4)for(let a=0;a<r.sigBytes;a++){const l=r.words[a>>>2]>>>24-a%4*8&255;this.words[this.sigBytes+a>>>2]|=l<<24-(this.sigBytes+a)%4*8}else for(let a=0;a<r.sigBytes;a+=4)this.words[this.sigBytes+a>>>2]=r.words[a>>>2];return this.sigBytes+=r.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new WordArray([...this.words])}}const Hex={stringify(o){const r=[];for(let a=0;a<o.sigBytes;a++){const l=o.words[a>>>2]>>>24-a%4*8&255;r.push((l>>>4).toString(16),(l&15).toString(16))}return r.join("")}},Base64={stringify(o){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=[];for(let l=0;l<o.sigBytes;l+=3){const c=o.words[l>>>2]>>>24-l%4*8&255,u=o.words[l+1>>>2]>>>24-(l+1)%4*8&255,d=o.words[l+2>>>2]>>>24-(l+2)%4*8&255,f=c<<16|u<<8|d;for(let m=0;m<4&&l*8+m*6<o.sigBytes*8;m++)a.push(r.charAt(f>>>6*(3-m)&63))}return a.join("")}},Latin1={parse(o){const r=o.length,a=[];for(let l=0;l<r;l++)a[l>>>2]|=(o.charCodeAt(l)&255)<<24-l%4*8;return new WordArray(a,r)}},Utf8={parse(o){return Latin1.parse(unescape(encodeURIComponent(o)))}};class BufferedBlockAlgorithm{constructor(){__publicField$1(this,"_data",new WordArray),__publicField$1(this,"_nDataBytes",0),__publicField$1(this,"_minBufferSize",0),__publicField$1(this,"blockSize",512/32)}reset(){this._data=new WordArray,this._nDataBytes=0}_append(r){typeof r=="string"&&(r=Utf8.parse(r)),this._data.concat(r),this._nDataBytes+=r.
32sigBytes}_doProcessBlock(r,a){}_process(r){let a,l=this._data.sigBytes/(this.blockSize*4);r?l=Math.ceil(l):l=Math.max((l|0)-this._minBufferSize,0);const c=l*this.blockSize,u=Math.min(c*4,this._data.sigBytes);if(c){for(let d=0;d<c;d+=this.blockSize)this._doProcessBlock(this._data.words,d);a=this._data.words.splice(0,c),this._data.sigBytes-=u}return new WordArray(a,u)}}class Hasher extends BufferedBlockAlgorithm{update(r){return this._append(r),this._process(),this}finalize(r){r&&this._append(r)}}var __defProp=Object.defineProperty,__defNormalProp=(o,r,a)=>r in o?__defProp(o,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[r]=a,__publicField=(o,r,a)=>(__defNormalProp(o,r+"",a),a);const H=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],K=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],W=[];class SHA256 extends Hasher{constructor(){super(...arguments),__publicField(this,"_hash",new WordArray([...H]))}reset(){super.reset(),this._hash=new WordArray([...H])}_doProcessBlock(r,a){const l=this._hash.words;let c=l[0],u=l[1],d=l[2],f=l[3],m=l[4],y=l[5],E=l[6],A=l[7];for(let P=0;P<64;P++){if(P<16)W[P]=r[a+P]|0;else{const O=W[P-15],L=(O<<25|O>>>7)^(O<<14|O>>>18)^O>>>3,F=W[P-2],j=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10;W[P]=L+W[P-7]+j+W[P-16]}const R=m&y^~m&E,x=c&u^c&d^u&d,M=(c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22),$=(m<<26|m>>>6)^(m<<21|m>>>11)^(m<<7|m>>>25),V=A+$+R+K[P]+W[P],B=M+x;A=E,E=y,y=m,m=f+V|0,f=d,d=u,u=c,c=V+B|0}l[0]=l[0]+c|0,l[1]=l[1]+u|0,l[2]=l[2]+d|0,l[3]=l[3]+f|0,l[4]=l[4]+m|0,l[5]=l[5]+y|0,l[6]=l[6]+E|0,l[7]=l[7]+A|0}finalize(r){super.finalize(r);const a=this._nDataBytes*8,l=this._data.sigBytes*8;return this._data.words[l>>>5]|=128<<24-l%32,this._data.words[(l+64>>>9<<4)+14]=Math.floor(a/4294967296),this._data.words[(l+64>>>9<<4)+15]=a,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function sha256base64(o){return new SHA256().finalize(o).toString(Base64)}function hash(o,r={}){const a=typeof o=="string"?o:objectHash(o,r);return sha256base64(a).slice(0,10)}function isEqual(o,r,a={}){return o===r||objectHash(o,a)===objectHash(r,a)}function klona(o){if(typeof o!="object")return o;var r,a,l=Object.prototype.toString.call(o);if(l==="[object Object]"){if(o.constructor!==Object&&typeof o.constructor=="function"){a=new o.constructor;for(r in o)o.hasOwnProperty(r)&&a[r]!==o[r]&&(a[r]=klona(o[r]))}else{a={};for(r in o)r==="__proto__"?Object.defineProperty(a,r,{value:klona(o[r]),configurable:!0,enumerable:!0,writable:!0}):a[r]=klona(o[r])}return a}if(l==="[object Array]"){for(r=o.length,a=Array(r);r--;)a[r]=klona(o[r]);return a}return l==="[object Set]"?(a=new Set,o.forEach(function(c){a.add(klona(c))}),a):l==="[object Map]"?(a=new Map,o.forEach(function(c,u){a.set(klona(u),klona(c))}),a):l==="[object Date]"?new Date(+o):l==="[object RegExp]"?(a=new RegExp(o.source,o.flags),a.lastIndex=o.lastIndex,a):l==="[object DataView]"?new o.constructor(klona(o.buffer)):l==="[object ArrayBuffer]"?o.slice(0):l.slice(-6)==="Array]"?new o.constructor(o):o}const CookieDefaults={path:"/",watch:!0,decode:o=>destr$1(decodeURIComponent(o)),encode:o=>encodeURIComponent(typeof o=="string"?o:JSON.stringify(o))},store=window.cookieStore;function useCookie(o,r){var m;const a={...CookieDefaults,...r};a.filter??(a.filter=y=>y===o);const l=readRawCookies(a)||{};let c;a.maxAge!==void 0?c=a.maxAge*1e3:a.expires&&(c=a.expires.getTime()-Date.now());const u=c!==void 0&&c<=0,d=klona(u?void 0:l[o]??((m=a.default)==null?void 0:m.call(a))),f=c&&!u?cookieRef(d,c,a.watch&&a.watch!=="shallow"):ref$1(d);{let y=null;try{!store&&typeof BroadcastChannel<"u"&&(y=new BroadcastChannel(`nuxt:cookies:${o}`))}catch{}const E=()=>{a.readonly||isEqual(f.value,l[o])||(writeClientCookie(o,f.value,a),l[o]=klona(f.value),y==null||y.postMessage({value:a.encode(f.value)}))},A=x=>{var $;const M=x.refresh?($=readRawCookies(a))==null?void 0:$[o]:a.decode(x.value);P=!0,f.value=M,l[o]=klona(M),nextTick(()=>{P=!1})};let P=!1;const R=!!getCurrentScope();if(R&&onScopeDispose(()=>{P=!0,E(),y==null||y.close()}),store){const x=M=>{const $=M.changed.find(B=>B.name===o),V=M.deleted.find(B=>B.name===o);$&&A({value:$.value}),V&&A({value:null})};store.addEventListener("change",x),R&&onScopeDispose(()=>store.removeEventListener("change",x))}else y&&(y.onmessage=({data:x})=>A(x));a.watch?watch(f,()=>{P||E()},{deep:a.watch!=="shallow"}):E()}return f}function readRawCookies(o={}){return parse$1(document.cookie,o)}function serializeCookie(o,r,a={}){return r==null?serialize(o,r,{...a,maxAge:-1}):serialize(o,r,a)}function writeClientCookie(o,r,a={}){document.cookie=serializeCookie(o,r,a)}const MAX_TIMEOUT_DELAY=2147483647;function cookieRef(o,r,a){let l,c,u=0;const d=a?ref$1(o):{value:o};return getCurrentScope()&&onScopeDispose(()=>{c==null||c(),clearTimeout(l)}),customRef((f,m)=>{a&&(c=watch(d,m));function y(){u=0,clearTimeout(l);const E=r-u,A=E<MAX_TIMEOUT_DELAY?E:MAX_TIMEOUT_DELAY;l=setTimeout(()=>{if(u+=A,u<r)return y();d.value=void 0,m()},A)}return{get(){return f(),d.value},set(E){y(),d.value=E,m()}}})}const referral_45global=o=>{const r=o.query.ref,a=o.query.ts||o.query.source;if(r){const l=useCookie("referralCode");l.value=r}if(a){const l=useCookie("trafficSource");l.value=a}},globalMiddleware=[validate,maintenance_45global,referral_45global],namedMiddleware={blog:()=>__vitePreload(()=>import("./3cbKcuwf.js"),__vite__mapDeps([68,69,6]),import.meta.url),"bot-detection":()=>__vitePreload(()=>import("./BrUKRosw.js"),__vite__mapDeps([70,69,6]),import.meta.url),member:()=>__vitePreload(()=>import("./5I2M2vCs.js"),__vite__mapDeps([71,69,6]),import.meta.url),page:()=>__vitePreload(()=>import("./Cjhwfryf.js"),__vite__mapDeps([72,6]),import.meta.url),"reset-password":()=>__vitePreload(()=>import("./CY68-a9m.js"),__vite__mapDeps([73,6]),import.meta.url),"secure-asset-get":()=>__vitePreload(()=>import("./vJ94fBus.js"),__vite__mapDeps([74,75,6]),import.meta.url),"security-headers":()=>__vitePreload(()=>import("./CfwPZzzJ.js"),__vite__mapDeps([76,6]),import.meta.url),"sign-asset-get":()=>__vitePreload(()=>import("./BAWn_irm.js"),__vite__mapDeps([77,75,6]),import.meta.url),"source-data-server":()=>__vitePreload(()=>import("./DhIQN-nW.js"),__vite__mapDeps([78,6]),import.meta.url)};function createCurrentLocation(o,r,a){const{pathname:l,search:c,hash:u}=r,d=o.indexOf("#");if(d>-1){const y=u.includes(o.slice(d))?o.slice(d).length:1;let E=u.slice(y);return E[0]!=="/"&&(E="/"+E),withoutBase(E,"")}const f=withoutBase(l,o),m=!a||isEqual$1(f,a,{trailingSlash:!0})?f:a;
32return m+(m.includes("?")?"":c)+u}const plugin$1=defineNuxtPlugin({name:"nuxt:router",enforce:"pre",async setup(o){var $;let r,a,l=useRuntimeConfig().app.baseURL;const c=(($=routerOptions.history)==null?void 0:$.call(routerOptions,l))??createWebHistory(l),u=routerOptions.routes?([r,a]=executeAsync(()=>routerOptions.routes(_routes)),r=await r,a(),r??_routes):_routes;let d;const f=createRouter({...routerOptions,scrollBehavior:(V,B,O)=>{if(B===START_LOCATION_NORMALIZED){d=O;return}if(routerOptions.scrollBehavior){if(f.options.scrollBehavior=routerOptions.scrollBehavior,"scrollRestoration"in window.history){const L=f.beforeEach(()=>{L(),window.history.scrollRestoration="manual"})}return routerOptions.scrollBehavior(V,START_LOCATION_NORMALIZED,d||O)}},history:c,routes:u});routerOptions.routes&&routerOptions.routes,"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),o.vueApp.use(f);const m=shallowRef(f.currentRoute.value);f.afterEach((V,B)=>{m.value=B}),Object.defineProperty(o.vueApp.config.globalProperties,"previousRoute",{get:()=>m.value});const y=createCurrentLocation(l,window.location,o.payload.path),E=shallowRef(f.currentRoute.value),A=()=>{E.value=f.currentRoute.value};o.hook("page:finish",A),f.afterEach((V,B)=>{var O,L,F,j;((L=(O=V.matched[0])==null?void 0:O.components)==null?void 0:L.default)===((j=(F=B.matched[0])==null?void 0:F.components)==null?void 0:j.default)&&A()});const P={};for(const V in E.value)Object.defineProperty(P,V,{get:()=>E.value[V],enumerable:!0});o._route=shallowReactive(P),o._middleware=o._middleware||{global:[],named:{}};const R=useError();f.afterEach(async(V,B,O)=>{delete o._processingMiddleware,!o.isHydrating&&R.value&&await o.runWithContext(clearError),O&&await o.callHook("page:loading:end")});try{[r,a]=executeAsync(()=>f.isReady()),await r,a()}catch(V){[r,a]=executeAsync(()=>o.runWithContext(()=>showError(V))),await r,a()}const x=y!==f.currentRoute.value.fullPath?f.resolve(y):f.currentRoute.value;A();const M=o.payload.state._layout;return f.beforeEach(async(V,B)=>{var O;await o.callHook("page:loading:start"),V.meta=reactive(V.meta),o.isHydrating&&M&&!isReadonly(V.meta.layout)&&(V.meta.layout=M),o._processingMiddleware=!0;{const L=new Set([...globalMiddleware,...o._middleware.global]);for(const F of V.matched){const j=F.meta.middleware;if(j)for(const U of toArray$2(j))L.add(U)}for(const F of L){const j=typeof F=="string"?o._middleware.named[F]||await((O=namedMiddleware[F])==null?void 0:O.call(namedMiddleware).then(G=>G.default||G)):F;if(!j)throw new Error(`Unknown route middleware: '${F}'.`);const U=await o.runWithContext(()=>j(V,B));if(!o.payload.serverRendered&&o.isHydrating&&(U===!1||U instanceof Error)){const G=U||createError$1({statusCode:404,statusMessage:`Page Not Found: ${y}`});return await o.runWithContext(()=>showError(G)),!1}if(U!==!0&&(U||U===!1))return U}}}),f.onError(async()=>{delete o._processingMiddleware,await o.callHook("page:loading:end")}),f.afterEach(async(V,B)=>{V.matched.length===0&&await o.runWithContext(()=>showError(createError$1({statusCode:404,fatal:!1,statusMessage:`Page not found: ${V.fullPath}`,data:{path:V.fullPath}})))}),o.hooks.hookOnce("app:created",async()=>{try{"name"in x&&(x.name=void 0),await f.replace({...x,force:!0}),f.options.scrollBehavior=routerOptions.scrollBehavior}catch(V){await o.runWithContext(()=>showError(V))}}),{provide:{router:f}}}}),requestIdleCallback=globalThis.requestIdleCallback||(o=>{const r=Date.now(),a={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-r))};return setTimeout(()=>{o(a)},1)}),cancelIdleCallback=globalThis.cancelIdleCallback||(o=>{clearTimeout(o)}),onNuxtReady=o=>{const r=useNuxtApp();r.isHydrating?r.hooks.hookOnce("app:suspense:resolve",()=>{requestIdleCallback(()=>o())}):requestIdleCallback(()=>o())},payload_client_2iWSt8t1oS=defineNuxtPlugin({name:"nuxt:payload",setup(o){useRouter$1().beforeResolve(async(r,a)=>{if(r.path===a.path)return;const l=await loadPayload(r.path);l&&Object.assign(o.static.data,l.data)}),onNuxtReady(()=>{o.hooks.hook("link:prefetch",async r=>{const{hostname:a}=new URL(r,window.location.href);a===window.location.hostname&&await loadPayload(r)})})}}),navigation_repaint_client_hME4SMlvhI=defineNuxtPlugin(()=>{const o=useRouter$1();onNuxtReady(()=>
32{o.beforeResolve(async()=>{await new Promise(r=>{setTimeout(r,100),requestAnimationFrame(()=>{setTimeout(r,0)})})})})});function reloadNuxtApp(o={}){const r=o.path||window.location.pathname;let a={};try{a=destr$1(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(o.force||(a==null?void 0:a.path)!==r||(a==null?void 0:a.expires)<Date.now()){try{sessionStorage.setItem("nuxt:reload",JSON.stringify({path:r,expires:Date.now()+(o.ttl??1e4)}))}catch{}if(o.persistState)try{sessionStorage.setItem("nuxt:reload:state",JSON.stringify({state:useNuxtApp().payload.state}))}catch{}window.location.pathname!==r?window.location.href=r:window.location.reload()}}const chunk_reload_client_xDBfISZ1yy=defineNuxtPlugin({name:"nuxt:chunk-reload",setup(o){const r=useRouter$1(),a=useRuntimeConfig(),l=new Set;r.beforeEach(()=>{l.clear()}),o.hook("app:chunkError",({error:u})=>{l.add(u)});function c(u){const f="href"in u&&u.href[0]==="#"?a.app.baseURL+u.href:joinURL(a.app.baseURL,u.fullPath);reloadNuxtApp({path:f,persistState:!0})}o.hook("app:manifest:update",()=>{r.beforeResolve(c)}),r.onError((u,d)=>{l.has(u)&&c(d)})}});/*!
33  * pinia v2.0.11
34  * (c) 2022 Eduardo San Martin Morote
35  * @license MIT
36  */let activePinia;const setActivePinia=o=>activePinia=o,piniaSymbol=Symbol();function isPlainObject$1(o){return o&&typeof o=="object"&&Object.prototype.toString.call(o)==="[object Object]"&&typeof o.toJSON!="function"}var MutationType;(function(o){o.direct="direct",o.patchObject="patch object",o.patchFunction="patch function"})(MutationType||(MutationType={}));function createPinia(){const o=effectScope(!0),r=o.run(()=>ref$1({}));let a=[],l=[];const c=markRaw({install(u){setActivePinia(c),c._a=u,u.provide(piniaSymbol,c),u.config.globalProperties.$pinia=c,l.forEach(d=>a.push(d)),l=[]},use(u){return this._a?a.push(u):l.push(u),this},_p:a,_a:null,_e:o,_s:new Map,state:r});return c}const noop$3=()=>{};function addSubscription(o,r,a,l=noop$3){o.push(r);const c=()=>{const u=o.indexOf(r);u>-1&&(o.splice(u,1),l())};return!a&&getCurrentInstance()&&onUnmounted(c),c}function triggerSubscriptions(o,...r){o.slice().forEach(a=>{a(...r)})}function mergeReactiveObjects(o,r){for(const a in r){const l=r[a],c=o[a];isPlainObject$1(c)&&isPlainObject$1(l)&&!isRef(l)&&!isReactive(l)?o[a]=mergeReactiveObjects(c,l):o[a]=l}return o}const skipHydrateSymbol=Symbol();function shouldHydrate(o){return!isPlainObject$1(o)||!o.hasOwnProperty(skipHydrateSymbol)}const{assign}=Object;function isComputed(o){return!!(isRef(o)&&o.effect)}function createOptionsStore(o,r,a,l){const{state:c,actions:u,getters:d}=r,f=a.state.value[o];let m;function y(){f||(a.state.value[o]=c?c():{});const E=toRefs(a.state.value[o]);return assign(E,u,Object.keys(d||{}).reduce((A,P)=>(A[P]=markRaw(computed(()=>{setActivePinia(a);const R=a._s.get(o);return d[P].call(R,R)})),A),{}))}return m=createSetupStore(o,y,r,a),m.$reset=function(){const A=c?c():{};this.$patch(P=>{assign(P,A)})},m}function createSetupStore(o,r,a={},l,c){let u;const d=a.state,f=assign({actions:{}},a),m={deep:!0};let y,E,A=markRaw([]),P=markRaw([]),R;const x=l.state.value[o];!d&&!x&&(l.state.value[o]={}),ref$1({});function M(j){let U;y=E=!1,typeof j=="function"?(j(l.state.value[o]),U={type:MutationType.patchFunction,storeId:o,events:R}):(mergeReactiveObjects(l.state.value[o],j),U={type:MutationType.patchObject,payload:j,storeId:o,events:R}),nextTick().then(()=>{y=!0}),E=!0,triggerSubscriptions(A,U,l.state.value[o])}const $=noop$3;function V(){u.stop(),A=[],P=[],l._s.delete(o)}function B(j,U){return function(){setActivePinia(l);const G=Array.from(arguments),Y=[],te=[];function ve(Me){Y.push(Me)}function J(Me){te.push(Me)}triggerSubscriptions(P,{args:G,name:j,store:L,after:ve,onError:J});let Z;try{Z=U.apply(this&&this.$id===o?this:L,G)}catch(Me){throw triggerSubscriptions(te,Me),Me}return Z instanceof Promise?Z.then(Me=>(triggerSubscriptions(Y,Me),Me)).catch(Me=>(triggerSubscriptions(te,Me),Promise.reject(Me))):(triggerSubscriptions(Y,Z),Z)}}const O={_p:l,$id:o,$onAction:addSubscription.bind(null,P),$patch:M,$reset:$,$subscribe(j,U={}){const G=addSubscription(A,j,U.detached,()=>Y()),Y=u.run(()=>watch(()=>l.state.value[o],te=>{(U.flush==="sync"?E:y)&&j({storeId:o,type:MutationType.direct,events:R},te)},assign({},m,U)));return G},$dispose:V},L=reactive(assign({},O));l._s.set(o,L);const F=l._e.run(()=>(u=effectScope(),u.run(()=>r())));for(const j in F){const U=F[j];if(isRef(U)&&!isComputed(U)||isReactive(U))d||(x&&shouldHydrate(U)&&(isRef(U)?U.value=x[j]:mergeReactiveObjects(U,x[j])),l.state.value[o][j]=U);else if(typeof U=="function"){const G=B(j,U);F[j]=G,f.actions[j]=U}}return assign(L,F),assign(toRaw(L),F),Object.defineProperty(L,"$state",{get:()=>l.state.value[o],set:j=>{M(U=>{assign(U,j)})}}),l._p.forEach(j=>{assign(L,u.run(()=>j({store:L,app:l._a,pinia:l,options:f})))}),x&&d&&a.hydrate&&a.hydrate(L.$state,x),y=!0,E=!0,L}function defineStore(o,r,a){let l,c;const u=typeof r=="function";
36typeof o=="string"?(l=o,c=u?a:r):(c=o,l=o.id);function d(f,m){const y=getCurrentInstance();return f=f||y&&inject(piniaSymbol),f&&setActivePinia(f),f=activePinia,f._s.has(l)||(u?createSetupStore(l,r,c,f):createOptionsStore(l,c,f)),f._s.get(l)}return d.$id=l,d}const isDefer=o=>o==="defer"||o===!1;function useAsyncData(...o){var M;const r=typeof o[o.length-1]=="string"?o.pop():void 0;typeof o[0]!="string"&&o.unshift(r);let[a,l,c={}]=o;if(typeof a!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof l!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const u=useNuxtApp(),d=l,f=()=>asyncDataDefaults.value,m=()=>u.isHydrating?u.payload.data[a]:u.static.data[a];c.server=c.server??!0,c.default=c.default??f,c.getCachedData=c.getCachedData??m,c.lazy=c.lazy??!1,c.immediate=c.immediate??!0,c.deep=c.deep??asyncDataDefaults.deep,c.dedupe=c.dedupe??"cancel";const y=c.getCachedData(a,u),E=y!=null;if(!u._asyncData[a]||!c.immediate){(M=u.payload._errors)[a]??(M[a]=asyncDataDefaults.errorValue);const $=c.deep?ref$1:shallowRef;u._asyncData[a]={data:$(E?y:c.default()),pending:ref$1(!E),error:toRef(u.payload._errors,a),status:ref$1("idle"),_default:c.default}}const A={...u._asyncData[a]};delete A._default,A.refresh=A.execute=($={})=>{if(u._asyncDataPromises[a]){if(isDefer($.dedupe??c.dedupe))return u._asyncDataPromises[a];u._asyncDataPromises[a].cancelled=!0}if($._initial||u.isHydrating&&$._initial!==!1){const B=$._initial?y:c.getCachedData(a,u);if(B!=null)return Promise.resolve(B)}A.pending.value=!0,A.status.value="pending";const V=new Promise((B,O)=>{try{B(d(u))}catch(L){O(L)}}).then(async B=>{if(V.cancelled)return u._asyncDataPromises[a];let O=B;c.transform&&(O=await c.transform(B)),c.pick&&(O=pick(O,c.pick)),u.payload.data[a]=O,A.data.value=O,A.error.value=asyncDataDefaults.errorValue,A.status.value="success"}).catch(B=>{if(V.cancelled)return u._asyncDataPromises[a];A.error.value=createError(B),A.data.value=unref(c.default()),A.status.value="error"}).finally(()=>{V.cancelled||(A.pending.value=!1,delete u._asyncDataPromises[a])});return u._asyncDataPromises[a]=V,u._asyncDataPromises[a]},A.clear=()=>clearNuxtDataByKey(u,a);const P=()=>A.refresh({_initial:!0}),R=c.server!==!1&&u.payload.serverRendered;{const $=getCurrentInstance();if($&&R&&c.immediate&&!$.sp&&($.sp=[]),$&&!$._nuxtOnBeforeMountCbs){$._nuxtOnBeforeMountCbs=[];const O=$._nuxtOnBeforeMountCbs;onBeforeMount(()=>{O.forEach(L=>{L()}),O.splice(0,O.length)}),onUnmounted(()=>O.splice(0,O.length))}R&&u.isHydrating&&(A.error.value||y!=null)?(A.pending.value=!1,A.status.value=A.error.value?"error":"success"):$&&(u.payload.serverRendered&&u.isHydrating||c.lazy)&&c.immediate?$._nuxtOnBeforeMountCbs.push(P):c.immediate&&P();const V=getCurrentScope();if(c.watch){const O=watch(c.watch,()=>A.refresh());V&&onScopeDispose(O)}const B=u.hook("app:data:refresh",async O=>{(!O||O.includes(a))&&await A.refresh()});V&&onScopeDispose(B)}const x=Promise.resolve(u._asyncDataPromises[a]).then(()=>A);return Object.assign(x,A),x}function clearNuxtDataByKey(o,r){r in o.payload.data&&(o.payload.data[r]=void 0),r in o.payload._errors&&(o.payload._errors[r]=asyncDataDefaults.errorValue),o._asyncData[r]&&(o._asyncData[r].data.value=void 0,o._asyncData[r].error.value=asyncDataDefaults.errorValue,o._asyncData[r].pending.value=!1,o._asyncData[r].status.value="idle"),r in o._asyncDataPromises&&(o._asyncDataPromises[r]&&(o._asyncDataPromises[r].cancelled=!0),o._asyncDataPromises[r]=void 0)}function pick(o,r){const a={};for(const l of r)a[l]=o[l];return a}const useStateKeyPrefix="$s";function useState(...o){const r=typeof o[o.length-1]=="string"?o.pop():void 0;typeof o[0]!="string"&&o.unshift(r);const[a,l]=o;if(!a||typeof a!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+a);if(l!==void 0&&typeof l!="function")throw new Error("[nuxt] [useState] init must be a function: "+l);const c=useStateKeyPrefix+a,u=useNuxtApp(),d=toRef(u.payload.state,c);if(d.value===void 0&&l){const f=l();if(isRef(f))return u.payload.state[c]=f,f;d.value=f}return d}function useFetch(o,r,a){const[l={},c]=typeof r=="string"?[{},r]:[r,a],u=computed(()=>toValue(o)),d=l.key||hash([c,typeof u.value=="string"?u.value:"",...generateOptionSegments(l)]);if(!d||typeof d!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+d);if(!o)throw new Error("[nuxt] [useFetch] request is missing.");const f=d===c?"$f"+d:d;if(!l.baseURL&&typeof u.value=="string"&&u.value[0]==="/"&&u.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');
36const{server:m,lazy:y,default:E,transform:A,pick:P,watch:R,immediate:x,getCachedData:M,deep:$,dedupe:V,...B}=l,O=reactive({...fetchDefaults,...B,cache:typeof l.cache=="boolean"?void 0:l.cache}),L={server:m,lazy:y,default:E,transform:A,pick:P,immediate:x,getCachedData:M,deep:$,dedupe:V,watch:R===!1?[]:[O,u,...R||[]]};let F;return useAsyncData(f,()=>{var te;(te=F==null?void 0:F.abort)==null||te.call(F,new DOMException("Request aborted as another request to the same endpoint was initiated.","AbortError")),F=typeof AbortController<"u"?new AbortController:{};const U=toValue(l.timeout);let G;return U&&(G=setTimeout(()=>F.abort(new DOMException("Request aborted due to timeout.","AbortError")),U),F.signal.onabort=()=>clearTimeout(G)),(l.$fetch||globalThis.$fetch)(u.value,{signal:F.signal,...O}).finally(()=>{clearTimeout(G)})},L)}function generateOptionSegments(o){var a;const r=[((a=toValue(o.method))==null?void 0:a.toUpperCase())||"GET",toValue(o.baseURL)];for(const l of[o.params||o.query]){const c=toValue(l);if(!c)continue;const u={};for(const[d,f]of Object.entries(c))u[toValue(d)]=toValue(f);r.push(u)}return r}const plugin=defineNuxtPlugin(o=>{const r=createPinia();return o.vueApp.use(r),setActivePinia(r),o.payload&&o.payload.pinia&&(r.state.value=o.payload.pinia),{provide:{pinia:r}}}),components_plugin_KR1HBZs4kY=defineNuxtPlugin({name:"nuxt:global-components"}),layouts={blog:defineAsyncComponent(()=>__vitePreload(()=>import("./Ca6dnPIg.js"),__vite__mapDeps([79,6]),import.meta.url).then(o=>o.default||o))},prefetch_client_7nmECofin6=defineNuxtPlugin({name:"nuxt:prefetch",setup(o){const r=useRouter$1();o.hooks.hook("app:mounted",()=>{r.beforeEach(async a=>{var c;const l=(c=a==null?void 0:a.meta)==null?void 0:c.layout;l&&typeof layouts[l]=="function"&&await layouts[l]()})}),o.hooks.hook("link:prefetch",a=>{if(hasProtocol(a))return;const l=r.resolve(a);if(!l)return;const c=l.meta.layout;let u=toArray$2(l.meta.middleware);u=u.filter(d=>typeof d=="string");for(const d of u)typeof namedMiddleware[d]=="function"&&namedMiddleware[d]();c&&typeof layouts[c]=="function"&&layouts[c]()})}}),mode="mount",include=[],exclude=["/_nuxt/**","/api/**","/api/hydration","/_nuxt/**","/api/**"];function createFilter(o={}){const r=o.include||[],a=o.exclude||[];return function(l){for(const c of[{rules:a,result:!1},{rules:r,result:!0}]){if(c.rules.filter(f=>f instanceof RegExp).some(f=>f.test(l)))return c.result;const d=c.rules.filter(f=>typeof f=="string");if(d.length>0){const f={};for(const y of d){if(y===l)return c.result;f[y]=!0}if(toRouteMatcher(createRouter$1({routes:f,...o})).matchAll(l).length>0)return!!c.result}}return r.length===0}}const nuxt_plugin_UNTZVpCIPu=defineNuxtPlugin(async o=>{useState("nuxt-delay-hydration-mode",()=>mode).value==="mount"&&o.hooks.hook("app:created",async()=>{var a,l;(a=o.ssrContext)!=null&&a.noSSR||(l=o.ssrContext)!=null&&l.url&&(include.length||exclude.length)&&!createFilter({include,exclude})(o.ssrContext.url)||await window._$delayHydration})}),suspectProtoRx=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,suspectConstructorRx=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,JsonSigRx=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function jsonParseTransform(o,r){if(o==="__proto__"||o==="constructor"&&r&&typeof r=="object"&&"prototype"in r){warnKeyDropped(o);return}return r}function warnKeyDropped(o){console.warn(`[destr] Dropping "${o}" key to prevent prototype pollution.`)}function destr(o,r={}){if(typeof o!="string")return o;const a=o.trim();if(o[0]==='"'&&o.endsWith('"')&&!o.includes("\\"))return a.slice(1,-1);if(a.length<=9){const l=a.toLowerCase();if(l==="true")return!0;if(l==="false")return!1;if(l==="undefined")return;if(l==="null")return null;if(l==="nan")return Number.NaN;if(l==="infinity")return Number.POSITIVE_INFINITY;if(l==="-infinity")return Number.NEGATIVE_INFINITY}if(!JsonSigRx.test(o)){if(r.strict)throw new SyntaxError("[destr] Invalid JSON");return o}
36try{if(suspectProtoRx.test(o)||suspectConstructorRx.test(o)){if(r.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(o,jsonParseTransform)}return JSON.parse(o)}catch(l){if(r.strict)throw l;return o}}function get$4(o,r){if(o==null)return;let a=o;for(let l=0;l<r.length;l++){if(a==null||a[r[l]]==null)return;a=a[r[l]]}return a}function set$3(o,r,a){if(a.length===0)return r;const l=a[0];return a.length>1&&(r=set$3(typeof o!="object"||o===null||!Object.prototype.hasOwnProperty.call(o,l)?Number.isInteger(Number(a[1]))?[]:{}:o[l],r,Array.prototype.slice.call(a,1))),Number.isInteger(Number(l))&&Array.isArray(o)?o.slice()[l]:Object.assign({},o,{[l]:r})}function unset(o,r){if(o==null||r.length===0)return o;if(r.length===1){if(o==null)return o;if(Number.isInteger(r[0])&&Array.isArray(o))return Array.prototype.slice.call(o,0).splice(r[0],1);const a={};for(const l in o)a[l]=o[l];return delete a[r[0]],a}if(o[r[0]]==null){if(Number.isInteger(r[0])&&Array.isArray(o))return Array.prototype.concat.call([],o);const a={};for(const l in o)a[l]=o[l];return a}return set$3(o,unset(o[r[0]],Array.prototype.slice.call(r,1)),[r[0]])}function deepPickUnsafe(o,r){return r.map(a=>a.split(".")).map(a=>[a,get$4(o,a)]).filter(a=>a[1]!==void 0).reduce((a,l)=>set$3(a,l[1],l[0]),{})}function deepOmitUnsafe(o,r){return r.map(a=>a.split(".")).reduce((a,l)=>unset(a,l),o)}function hydrateStore(o,{storage:r,serializer:a,key:l,debug:c,pick:u,omit:d,beforeHydrate:f,afterHydrate:m},y,E=!0){try{E&&(f==null||f(y));const A=r.getItem(l);if(A){const P=a.deserialize(A),R=u?deepPickUnsafe(P,u):P,x=d?deepOmitUnsafe(R,d):R;o.$patch(x)}E&&(m==null||m(y))}catch(A){c&&console.error("[pinia-plugin-persistedstate]",A)}}function persistState(o,{storage:r,serializer:a,key:l,debug:c,pick:u,omit:d}){try{const f=u?deepPickUnsafe(o,u):o,m=d?deepOmitUnsafe(f,d):f,y=a.serialize(m);r.setItem(l,y)}catch(f){c&&console.error("[pinia-plugin-persistedstate]",f)}}function createPersistence(o,r,a){const{pinia:l,store:c,options:{persist:u=a}}=o;if(!u)return;if(!(c.$id in l.state.value)){const m=l._s.get(c.$id.replace("__hot:",""));m&&Promise.resolve().then(()=>m.$persist());return}const f=(Array.isArray(u)?u:u===!0?[{}]:[u]).map(r);c.$hydrate=({runHooks:m=!0}={})=>{f.forEach(y=>{hydrateStore(c,y,o,m)})},c.$persist=()=>{f.forEach(m=>{persistState(c.$state,m)})},f.forEach(m=>{hydrateStore(c,m,o),c.$subscribe((y,E)=>persistState(E,m),{detached:!0})})}function cookies(o){return{getItem:r=>useCookie(r,{...o??useRuntimeConfig().public.piniaPluginPersistedstate.cookieOptions??{},decode:decodeURIComponent,readonly:!0}).value,setItem:(r,a)=>useCookie(r,{...o??useRuntimeConfig().public.piniaPluginPersistedstate.cookieOptions??{},encode:encodeURIComponent}).value=a}}function localStorage$1(){return{getItem:o=>window.localStorage.getItem(o),setItem:(o,r)=>window.localStorage.setItem(o,r)}}function sessionStorage$1(){return{getItem:o=>window.sessionStorage.getItem(o),setItem:(o,r)=>window.sessionStorage.setItem(o,r)}}const storages={cookies,localStorage:localStorage$1,sessionStorage:sessionStorage$1};function piniaPlugin(o){const a=useRuntimeConfig().public.piniaPluginPersistedstate;createPersistence(o,l=>({key:a.key?a.key.replace(/%id/g,l.key??o.store.$id):l.key??o.store.$id,debug:l.debug??a.debug??!1,serializer:l.serializer??{serialize:c=>JSON.stringify(c),deserialize:c=>destr(c)},storage:l.storage??(a.storage?a.storage==="cookies"?storages.cookies(a.cookieOptions):storages[a.storage]():storages.cookies()),beforeHydrate:l.beforeHydrate,afterHydrate:l.afterHydrate,pick:l.pick,omit:l.omit}),a.auto??!1)}const plugin_cKjbZu64EM=defineNuxtPlugin({name:"pinia-plugin-persistedstate",setup({$pinia:o}){o.use(piniaPlugin)}}),REGEX_CRAWLER=new RegExp(/Googlebot\/|Googlebot-Mobile|Googlebot-Image|Googlebot-News|Googlebot-Video|AdsBot-Google([^-]|$)|AdsBot-Google-Mobile|Feedfetcher-Google|Mediapartners-Google|Mediapartners \(Googlebot\)|APIs-Google|Google-InspectionTool|Storebot-Google|GoogleOther|bingbot|Slurp|[wW]get|LinkedInBot|Python-urllib|python-requests|aiohttp|httpx|libwww-perl|httpunit|Nutch|Go-http-client|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|BIGLOTRON|Teoma|convera|seekbot|Gigabot|Gigablast|exabot|ia_archiver|GingerCrawler|webmon |HTTrack|grub\.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|findlink|msrbot|panscient|yacybot|AISearchBot|ips-agent|tagoobot|MJ12bot|woriobot|yanga|buzzbot|mlbot|yandex\.com\/bots|purebot|Linguee Bot|CyberPatrol|voilabot|Baiduspider|citeseerxbot|spbot|twengabot|postrank|Turnitin|scribdbot|page2rss|sitebot|linkdex|Adidxbot|ezooms|dotbot|Mail\.RU_Bot|discobot|heritrix|findthatfile|europarchive\.org|NerdByNature\.Bot|(sistrix|SISTRIX) [cC]rawler|Ahrefs(Bot|SiteAudit)|fuelbot|CrunchBot|IndeedBot|mappydata|woobot|ZoominfoBot|PrivacyAwareBot|Multiviewbot|SWIMGBot|Grobbot|eright|Apercite|semanticbot|Aboundex|domaincrawler|wbsearchbot|summify|CCBot|edisterbot|SeznamBot|ec2linkfinder|gslfbot|aiHitBot|intelium_bot|facebookexternalhit|Yeti|RetrevoPageAnalyzer|lb-spider|Sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net\.com\.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|it2media-domain-crawler|ip-web-crawler\.com|siteexplorer\.info|elisabot|proximic|changedetection|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|CC Metadata Scaper|g00g1e\.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Twitterbot|cXensebot|smtbot|bnf\.fr_bot|A6-Indexer|ADmantX|Facebot|OrangeBot\/|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive\.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|S[eE][mM]rushBot|yoozBot|lipperhey|Y!J|Domain Re-Animator Bot|AddThis|Screaming Frog SEO Spider|MetaURI|Scrapy|Livelap[bB]ot|OpenHoseBot|CapsuleChecker|collection@infegy\.com|IstellaBot|DeuSu\/|betaBot|Cliqzbot\/|MojeekBot\/|netEstate NE Crawler|SafeSearch microdata crawler|Gluten Free Crawler\/|Sonic|Sysomos|Trove|deadlinkchecker|Slack-ImgProxy|Embedly|RankActiveLinkBot|iskanie|SafeDNSBot|SkypeUriPreview|Veoozbot|Slackbot|redditbot|datagnionbot|Google-Adwords-Instant|adbeat_bot|WhatsApp|contxbot|pinterest\.com\/bot|electricmonk|GarlikCrawler|BingPreview\/|vebidoobot|FemtosearchBot|Yahoo Link Preview|MetaJobBot|DomainStatsBot|mindUpBot|Daum\/|Jugendschutzprogramm-Crawler|Xenu Link Sleuth|Pcore-HTTP|moatbot|KosmioBot|[pP]ingdom|AppInsights|PhantomJS|Gowikibot|PiplBot|Discordbot|TelegramBot|Jetslide|newsharecounts|James BOT|Bark[rR]owler|TinEye|SocialRankIOBot|trendictionbot|Ocarinabot|epicbot|Primalbot|DuckDuckGo-Favicons-Bot|GnowitNewsbot|Leikibot|LinkArchiver|YaK\/|PaperLiBot|Digg Deeper|dcrawl|Snacktory|AndersPinkBot|Fyrebot|EveryoneSocialBot|Mediatoolkitbot|Luminator-robots|ExtLinksBot|SurveyBot|NING\/|okhttp|Nuzzel|omgili|PocketParser|YisouSpider|um-LN|ToutiaoSpider|MuckRack|Jamie's Spider|AHC\/|NetcraftSurveyAgent|Laserlikebot|^Apache-HttpClient|AppEngine-Google|Jetty|Upflow|Thinklab|Traackr\.com|Twurly|Mastodon|http_get|DnyzBot|botify|007ac9 Crawler|BehloolBot|BrandVerity|check_http|BDCbot|ZumBot|EZID|ICC-Crawler|ArchiveBot|^LCC |filterdb\.iss\.net\/crawler|BLP_bbot|BomboraBot|Buck\/|Companybook-Crawler|Genieo|magpie-crawler|Meltw
36aterNews|Moreover|newspaper\/|ScoutJet|(^| )sentry\/|StorygizeBot|UptimeRobot|OutclicksBot|seoscanners|Hatena|Google Web Preview|MauiBot|AlphaBot|SBL-BOT|IAS crawler|adscanner|Netvibes|acapbot|Baidu-YunGuanCe|bitlybot|blogmuraBot|Bot\.AraTurka\.com|bot-pge\.chlooe\.com|BoxcarBot|BTWebClient|ContextAd Bot|Digincore bot|Disqus|Feedly|Fetch\/|Fever|Flamingo_SearchEngine|FlipboardProxy|g2reader-bot|G2 Web Services|imrbot|K7MLWCBot|Kemvibot|Landau-Media-Spider|linkapediabot|vkShare|Siteimprove\.com|BLEXBot\/|DareBoost|ZuperlistBot\/|Miniflux\/|Feedspot|Diffbot\/|SEOkicks|tracemyfile|Nimbostratus-Bot|zgrab|PR-CY\.RU|AdsTxtCrawler|Datafeedwatch|Zabbix|TangibleeBot|google-xrawler|axios|Amazon CloudFront|Pulsepoint|CloudFlare-AlwaysOnline|Google-Structured-Data-Testing-Tool|WordupInfoSearch|WebDataStats|HttpUrlConnection|ZoomBot|VelenPublicWebCrawler|MoodleBot|jpg-newsbot|outbrain|W3C_Validator|Validator\.nu|W3C-checklink|W3C-mobileOK|W3C_I18n-Checker|FeedValidator|W3C_CSS_Validator|W3C_Unicorn|Google-PhysicalWeb|Blackboard|ICBot\/|BazQux|Twingly|Rivva|Experibot|awesomecrawler|Dataprovider\.com|GroupHigh\/|theoldreader\.com|AnyEvent|Uptimebot\.org|Nmap Scripting Engine|2ip\.ru|Clickagy|Caliperbot|MBCrawler|online-webceo-bot|B2B Bot|AddSearchBot|Google Favicon|HubSpot|Chrome-Lighthouse|HeadlessChrome|CheckMarkNetwork\/|www\.uptime\.com|Streamline3Bot\/|serpstatbot\/|MixnodeCache\/|^curl|SimpleScraper|RSSingBot|Jooblebot|fedoraplanet|Friendica|NextCloud|Tiny Tiny RSS|RegionStuttgartBot|Bytespider|Datanyze|Google-Site-Verification|TrendsmapResolver|tweetedtimes|NTENTbot|Gwene|SimplePie|SearchAtlas|Superfeedr|feedbot|UT-Dorkbot|Amazonbot|SerendeputyBot|Eyeotabot|officestorebot|Neticle Crawler|SurdotlyBot|LinkisBot|AwarioSmartBot|AwarioRssBot|RyteBot|FreeWebMonitoring SiteChecker|AspiegelBot|NAVER Blog Rssbot|zenback bot|SentiBot|Domains Project\/|Pandalytics|VKRobot|bidswitchbot|tigerbot|NIXStatsbot|Atom Feed Robot|[Cc]urebot|PagePeeker\/|Vigil\/|rssbot\/|startmebot\/|JobboerseBot|seewithkids|NINJA bot|Cutbot|BublupBot|BrandONbot|RidderBot|Taboolabot|Dubbotbot|FindITAnswersbot|infoobot|Refindbot|BlogTraffic\/\d\.\d+ Feed-Fetcher|SeobilityBot|Cincraw|Dragonbot|VoluumDSP-content-bot|FreshRSS|BitBot|^PHP-Curl-Class|Google-Certificates-Bridge|centurybot|Viber|e\.ventures Investment Crawler|evc-batch|PetalBot|virustotal|(^| )PTST\/|minicrawler|Cookiebot|trovitBot|seostar\.co|IonCrawl|Uptime-Kuma|Seekport|FreshpingBot|Feedbin|CriteoBot|Snap URL Preview Service|Better Uptime Bot|RuxitSynthetic|Google-Read-Aloud|Valve\/Steam|OdklBot\/|GPTBot|ChatGPT-User|YandexRenderResourcesBot\/|LightspeedSystemsCrawler|ev-crawler\/|BitSightBot\/|woorankreview\/|Google-Safety|AwarioBot|DataForSeoBot|Linespider|WellKnownBot|A Patent Crawler|StractBot|search\.marginalia\.nu|YouBot|Nicecrawler|Neevabot|BrightEdge Crawler|SiteCheckerBotCrawler|TombaPublicWebCrawler|CrawlyProjectCrawler|KomodiaBot|KStandBot|CISPA Webcrawler|MTRobot|hyscore\.io|AlexandriaOrgBot|2ip bot|Yellowbrandprotectionbot|SEOlizer|vuhuvBot|INETDEX-BOT|Synapse|t3versionsBot|deepnoc|Cocolyzebot|hypestat|ReverseEngineeringBot|sempi\.tech|Iframely|MetaInspector|node-fetch|lkxscan|python-opengraph|OpenGraphCheck|developers\.google\.com\/\+\/web\/snippet|SenutoBot|MaCoCu|NewsBlur|inoreader|NetSystemsResearch|PageThing|WordPress\/|PhxBot|ImagesiftBot|Expanse|InternetMeasurement|^BW\/|GeedoBot|Audisto Crawler|PerplexityBot\/|[cC]laude[bB]ot|Monsidobot|GroupMeBot|Vercelbot|vercel-screenshot/),REGEX_MOBILE1=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|FBAN|FBAV|fennec|hiptop|iemobile|ip(hone|od)|Instagram|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,REGEX_MOBILE2=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
36sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,REGEX_MOBILE_OR_TABLET1=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|FBAN|FBAV|fennec|hiptop|iemobile|ip(hone|od)|Instagram|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,REGEX_MOBILE_OR_TABLET2=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;function isMobile(o){return REGEX_MOBILE1.test(o)||REGEX_MOBILE2.test(o.slice(0,4))}function isMobileOrTablet(o){return REGEX_MOBILE_OR_TABLET1.test(o)||REGEX_MOBILE_OR_TABLET2.test(o.slice(0,4))}function isIos(o){return/iPad|iPhone|iPod/.test(o)}function isAndroid(o){return/android/i.test(o)}function isWindows(o){return/Windows/.test(o)}function isMacOS(o){return/Mac OS X/.test(o)}const browsers=[{name:"Samsung",regex:/SamsungBrowser/i},{name:"Edge",regex:/edg(?:[ea]|ios)?\//i},{name:"Firefox",regex:/firefox|iceweasel|fxios/i},{name:"Chrome",regex:/chrome|crios|crmo/i},{name:"Safari",regex:/safari|applewebkit/i}];function getBrowserName(o){for(const r of browsers)if(r.regex.test(o))return r.name;return""}function generateFlags(o,r={}){let a=!1,l=!1,c=!1,u=!1;if(o==="Amazon CloudFront")r["cloudfront-is-mobile-viewer"]==="true"&&(a=!0,l=!0),r["cloudfront-is-tablet-viewer"]==="true"&&(a=!1,l=!0),r["cloudfront-is-desktop-viewer"]==="true"&&(a=!1,l=!1),r["cloudfront-is-ios-viewer"]==="true"&&(c=!0),r["cloudfront-is-android-viewer"]==="true"&&(u=!0);else if(r&&r["cf-device-type"])switch(r["cf-device-type"]){case"mobile":a=!0,l=!0;break;case"tablet":a=!1,l=!0;break;case"desktop":a=!1,l=!1;break}else a=isMobile(o),l=isMobileOrTablet(o),c=isIos(o),u=isAndroid(o);const d=isWindows(o),f=isMacOS(o),m=getBrowserName(o),y=m==="Safari",E=m==="Firefox",A=m==="Edge",P=m==="Chrome",R=m==="Samsung",x=REGEX_CRAWLER.test(o);return{userAgent:o,isMobile:a,isMobileOrTablet:l,isTablet:!a&&l,isDesktop:!l,isIos:c,isAndroid:u,isWindows:d,isMacOS:f,isApple:f||c,isDesktopOrTablet:!a,isSafari:y,isFirefox:E,isEdge:A,isChrome:P,isSamsung:R,isCrawler:x}}const plugin_wy0B721ODc=defineNuxtPlugin(()=>{const o=useRuntimeConfig(),r=o.public.device.defaultUserAgent;let a;{const l=navigator.userAgent||r;a=reactive(generateFlags(l)),o.public.device.refreshOnResize&&window.addEventListener("resize",()=>{setTimeout(()=>{const c=generateFlags(navigator.userAgent||l);
36Object.entries(c).forEach(([u,d])=>{a[u]=d})},50)})}return{provide:{device:a}}}),componentMap={ActionButton:()=>__vitePreload(()=>import("./ChoZ3EV4.js"),__vite__mapDeps([12,6,13]),import.meta.url),Blank:()=>__vitePreload(()=>import("./D32W_VjA.js"),__vite__mapDeps([80,81,5,6,7,82,12,13,10,83,84,85,8,9,11,16,28,86]),import.meta.url),BlankV2:()=>__vitePreload(()=>import("./NUnY1O6o.js"),__vite__mapDeps([87,14,6,15,4,5,7,8,9,10,11,12,13,88,89,16,90]),import.meta.url),Dropdown:()=>__vitePreload(()=>import("./ClzqYp7f.js"),__vite__mapDeps([91,92,21,6,93]),import.meta.url),ElPromo:()=>__vitePreload(()=>import("./CFutRneM.js"),__vite__mapDeps([94,95,81,5,6,7,8,9,10,11,96,82,12,13,16,28,30,17,97]),import.meta.url),ElPromoV2:()=>__vitePreload(()=>import("./ClDR3y5M.js"),__vite__mapDeps([98,22,8,9,6,10,11,12,13,14,15,23,24,25,3,4,5,7,16,17,18,26,97]),import.meta.url),Footer:()=>__vitePreload(()=>import("./D2ISrKoS.js"),__vite__mapDeps([32,29,6,33]),import.meta.url),Header:()=>__vitePreload(()=>import("./odLw1Jp_.js"),__vite__mapDeps([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]),import.meta.url),Modal:()=>__vitePreload(()=>import("./DhPD0UR1.js"),__vite__mapDeps([99,30,10,28,16,6,100]),import.meta.url),PromoDockedWrapper:()=>__vitePreload(()=>import("./rG_qII_y.js"),__vite__mapDeps([101,6]),import.meta.url),AboutUs1:()=>__vitePreload(()=>import("./dExVy2pC.js"),__vite__mapDeps([102,103,16,10,28,6]),import.meta.url),ActionItem3:()=>__vitePreload(()=>import("./CjYkpDGF.js"),__vite__mapDeps([104,6]),import.meta.url),AuthForgotPassword:()=>__vitePreload(()=>import("./91EGfbzc.js"),__vite__mapDeps([105,106,6,107,108]),import.meta.url),AuthSignInModal:()=>__vitePreload(()=>import("./JZvnEAid.js"),__vite__mapDeps([109,106,6,107,110,111]),import.meta.url),BadgesBadge:()=>__vitePreload(()=>import("./BVmZIfqo.js"),__vite__mapDeps([112,113,114,115,6,116,117]),import.meta.url),BadgesIndex:()=>__vitePreload(()=>import("./BIlJzu9K.js"),__vite__mapDeps([118,112,113,114,115,6,116,117,119]),import.meta.url),BlogComment:()=>__vitePreload(()=>import("./Dp-NyRjW.js"),__vite__mapDeps([120,121,122,6,123,124,125]),import.meta.url),BlogCommentComposer:()=>__vitePreload(()=>import("./B8CTCy0W.js"),__vite__mapDeps([122,6,123]),import.meta.url),BlogComments:()=>__vitePreload(()=>import("./CvD81Q11.js"),__vite__mapDeps([126,122,6,123,120,121,124,125,127,128]),import.meta.url),BlogContainer:()=>__vitePreload(()=>import("./DaSsFnT3.js"),__vite__mapDeps([129,103,16,10,28,6,5,130,12,13,131,127,132]),import.meta.url),BlogContainerV2:()=>__vitePreload(()=>import("./C8o9k-m4.js"),__vite__mapDeps([133,134,14,6,15,135,115,136,23,24,10,16,137,138]),import.meta.url),BlogLikeButton:()=>__vitePreload(()=>import("./BaLedPpU.js"),__vite__mapDeps([139,6,140]),import.meta.url),BlogPagination:()=>__vitePreload(()=>import("./0JqGwN-9.js"),__vite__mapDeps([141,6,142]),import.meta.url),BlogRegister:()=>__vitePreload(()=>import("./CLujsEry.js"),__vite__mapDeps([143,6,144]),import.meta.url),BlogReply:()=>__vitePreload(()=>import("./BJaAQc9e.js"),__vite__mapDeps([121,122,6,123,124]),import.meta.url),BlogGrid3GridThreeWrapper:()=>__vitePreload(()=>import("./DlNBbgjy.js"),__vite__mapDeps([145,146,10,6,147,148,149,5,127,150,151,152,153,154,155]),import.meta.url),BlogGrid3ComponentsAd:()=>__vitePreload(()=>import("./BCzi1dU5.js"),__vite__mapDeps([150,6]),import.meta.url),BlogGrid3ComponentsCategories:()=>__vitePreload(()=>import("./BMZhEi_g.js"),__vite__mapDeps([153,6]),import.meta.url),BlogGrid3ComponentsHero:()=>__vitePreload(()=>import("./C_2PYe7y.js"),__vite__mapDeps([146,10,6]),import.meta.url),BlogGrid3ComponentsLatestPosts:()=>__vitePreload(()=>import("./QQEUxOfm.js"),__vite__mapDeps([154,6]),import.meta.url),BlogGrid3ComponentsMostPopular:()=>__vitePreload(()=>import("./BsvbXqrm.js"),__vite__mapDeps([152,6]),import.meta.url),BlogGrid3ComponentsPost:()=>__vitePreload(()=>import("./CBiUQrPu.js"),__vite__mapDeps([149,5,127,6]),import.meta.url),BlogGrid3ComponentsPostContainer:()=>__vitePreload(()=>import("./DHaEJnnE.js"),__vite__mapDeps([148,149,5,127,6,150]),import.meta.url),BlogGrid3ComponentsSearch:()=>__vitePreload(()=>import("./ClrGYK5L.js"),__vite__mapDeps([147,6]),import.meta.url),BlogGrid3ComponentsSidebarWrapper:()=>__vitePreload(()=>import("./y0BwXk9u.js"),__vite__mapDeps([151,152,6,147,153,154,155]),import.meta.url),BlogHorizontalListHoriztonalListWrapper:()=>__vitePreload(()=>import("./CTr-6Owk.js"),__vite__mapDeps([156,146,10,6,147,157,158,5,127,151,152,153,154,155]),import.meta.url),BlogHorizontalListComponentsPost:()=>__vitePreload(()=>import("./DYo5lNTM.js"),__vite__mapDeps([158,5,127,6]),import.meta.url),BlogHorizontalListComponentsPostContainer:()=>__vitePreload(()=>import("./tEuuOWfQ.js"),__vite__mapDeps([157,158,5,127,6]),import.meta.url),BlogLargeFeatureLargeFeaturesWrapper:()=>__vitePreload(()=>import("./BJqEb2va.js"),__vite__mapDeps([159,146,10,6,147,160,161,5,127,162,155,141,142,151,152,153,154]),import.meta.url),BlogLargeFeatureComponentsAd:()=>__vitePreload(()=>import("./DSJVJTyK.js"),__vite__mapDeps([155,6]),import.meta.url),BlogLargeFeatureComponentsPost:()=>__vitePreload(()=>
36import("./DV971gO3.js"),__vite__mapDeps([161,5,127,6,162]),import.meta.url),BlogLargeFeatureComponentsPostContainer:()=>__vitePreload(()=>import("./CKQrUmNx.js"),__vite__mapDeps([160,161,5,127,6,162,155,141,142]),import.meta.url),CommentsContainerComment:()=>__vitePreload(()=>import("./CVUPHU_l.js"),__vite__mapDeps([163,127,6]),import.meta.url),CommentsContainerComposer:()=>__vitePreload(()=>import("./BITDbPv4.js"),__vite__mapDeps([164,6]),import.meta.url),CommentsContainerReply:()=>__vitePreload(()=>import("./pnfLrVuP.js"),__vite__mapDeps([165,163,127,6,166]),import.meta.url),CookieBanner:()=>__vitePreload(()=>import("./CyasXceV.js"),__vite__mapDeps([167,168,6,169,170]),import.meta.url),CounterElementCounter:()=>__vitePreload(()=>import("./KYLyKWeA.js"),__vite__mapDeps([171,6]),import.meta.url),CounterElementCounterText:()=>__vitePreload(()=>import("./DqOrsXir.js"),__vite__mapDeps([172,10,6]),import.meta.url),CounterElementCounterWrapper:()=>__vitePreload(()=>import("./Bybh6ZFv.js"),__vite__mapDeps([173,10,16,28,6,174]),import.meta.url),ElAvatar:()=>__vitePreload(()=>import("./BySKKBoz.js"),__vite__mapDeps([175,12,6,13,16,10]),import.meta.url),ElBadge:()=>__vitePreload(()=>import("./7-TSJZYb.js"),__vite__mapDeps([176,16,10,28,6]),import.meta.url),ElBillingTerms:()=>__vitePreload(()=>import("./CnjYuqLN.js"),__vite__mapDeps([177,178,56,179,16,10,6,180]),import.meta.url),ElButton:()=>__vitePreload(()=>import("./C-gqtigH.js"),__vite__mapDeps([130,12,6,13,16,10,28,131]),import.meta.url),ElButtonLottieIcon:()=>__vitePreload(()=>import("./B7RbCf1l.js"),__vite__mapDeps([14,6,15]),import.meta.url),ElButtonV2:()=>__vitePreload(()=>import("./C13cT-tf.js"),__vite__mapDeps([134,14,6,15,135,115,136,23,24,10,16,137]),import.meta.url),ElCard:()=>__vitePreload(()=>import("./C9nP4N7o.js"),__vite__mapDeps([181,81,5,6,7,82,12,13,10,8,9,11,16,28,30]),import.meta.url),ElCardCarousel:()=>__vitePreload(()=>import("./BCgx2xw5.js"),__vite__mapDeps([182,6]),import.meta.url),ElCarousel:()=>__vitePreload(()=>import("./D7IBDah4.js"),__vite__mapDeps([183,184,16,10,28,6,185]),import.meta.url),ElCarouselV2:()=>__vitePreload(()=>import("./a9yw37dI.js"),__vite__mapDeps([186,184,6,187]),import.meta.url),ElCarouselV3:()=>__vitePreload(()=>import("./-k4ooxMn.js"),__vite__mapDeps([188,5,184,16,10,6,189]),import.meta.url),ElCarouselV4:()=>__vitePreload(()=>import("./BoqLvFEm.js"),__vite__mapDeps([190,6,16,10,191]),import.meta.url),ElCollapsableMenuLinks:()=>__vitePreload(()=>import("./CnygIRbq.js"),__vite__mapDeps([192,193,194,195,10,196,6,197,198,28,16,199,200,201,19,20,21]),import.meta.url),ElCollapse:()=>__vitePreload(()=>import("./C6qacOuQ.js"),__vite__mapDeps([202,28,10,16,30,6]),import.meta.url),ElCollapseV2:()=>__vitePreload(()=>import("./BaSJXDeA.js"),__vite__mapDeps([203,19,20,21,6,16,10]),import.meta.url),ElComments:()=>__vitePreload(()=>import("./BoKuNdKs.js"),__vite__mapDeps([204,165,163,127,6,166,164,205]),import.meta.url),ElCompareSlider:()=>__vitePreload(()=>import("./DSkFztY4.js"),__vite__mapDeps([206,16,10,6,207]),import.meta.url),ElCompareSliderV2:()=>__vitePreload(()=>import("./D_1tWF2a.js"),__vite__mapDeps([208,16,10,6,209]),import.meta.url),ElCounter:()=>__vitePreload(()=>import("./V6IVJztI.js"),__vite__mapDeps([210,5,16,10,6]),import.meta.url),ElCounterV2:()=>__vitePreload(()=>import("./BD5CQ0f-.js"),__vite__mapDeps([211,5,16,10,6,212]),import.meta.url),ElDivider:()=>__vitePreload(()=>import("./D3ojorW9.js"),__vite__mapDeps([213,10,16,6,214]),import.meta.url),ElDrmFlexText:()=>__vitePreload(()=>import("./C6mH8EUP.js"),__vite__mapDeps([215,16,10,6,216]),import.meta.url),ElElTableOfContents:()=>__vitePreload(()=>import("./DYn1noL7.js"),__vite__mapDeps([217,218,6,219,16,10,220]),import.meta.url),ElElTableOfContentsItem:()=>__vitePreload(()=>import("./BIk35DJ_.js"),__vite__mapDeps([218,6,219]),import.meta.url),ElElThreeImages:()=>__vitePreload(()=>import("./DWK8scO0.js"),__vite__mapDeps([221,222,12,6,13,5,16,10,28,223,103,224]),import.meta.url),ElEmbed:()=>__vitePreload(()=>import("./2EwjOtBN.js"),__vite__mapDeps([225,16,10,6]),import.meta.url),ElEstageEmbedComponent:()=>__vitePreload(()=>import("./CR6Rbngt.js"),__vite__mapDeps([226,6]),import.meta.url),ElEstageInternalEmbed:()=>__vitePreload(()=>import("./CGyFmzfa.js"),__vite__mapDeps([227,6]),import.meta.url),ElFeaturedPost:()=>__vitePreload(()=>import("./CNPkVsPS.js"),__vite__mapDeps([228,229,230,127,6,231]),import.meta.url),ElFeaturedPostInfo:()=>__vitePreload(()=>import("./BNVmqdin.js"),__vite__mapDeps([232,233,230,127,6,234]),import.meta.url),ElFeaturedPostText:()=>__vitePreload(()=>import("./CYpH6nNT.js"),__vite__mapDeps([235,233,230,6,236]),import.meta.url),ElFeaturedPostThumb:()=>__vitePreload(()=>import("./0BonWXUh.js"),__vite__mapDeps([237,233,230,6]),import.meta.url),ElFeaturedPostTitle:()=>__vitePreload(()=>import("./B-3R8G2t.js"),__vite__mapDeps([238,233,230,6,239]),import.meta.url),ElFlexText:()=>__vitePreload(()=>import("./MLHzKccQ.js"),__vite__mapDeps([240,16,10,6,241]),import.meta.url),ElFlexWrapper:()=>__vitePreload(()=>import("./BM32_B00.js"),__vite__mapDeps([95,81,5,6,7,8,9,10,11,96,82,12,13,16,28,30,17]),import.meta.url),ElFlexWrapperCol:()=>__vitePreload(()=>import("./DwhRLOzU.js").then(o=>o.F),__vite__mapDeps([96,81,5,6,7,82,12,13,10,8,9,11,16,28,30,17]),import.meta.url),ElFlexWrapperColV2:()=>__vitePreload(()=>import("./BHietjK3.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url),ElFlexWrapperV2:()=>__vitePreload(()=>import("./GqpHYmVG.js"),__vite__mapDeps([22,8,9,6,10,11,12,13,14,15,23,24,25,3,4,5,7,16,17,18,26]),import.meta.url),ElFlipCard:()=>__vitePreload(()=>import("./CwLr99zI.js"),__vite__mapDeps([242,10,6,243]),import.meta.url),ElForm:()=>__vitePreload(()=>import("./BbBO12lD.js"),__vite__mapDeps([244,245,246,168,6,169,10,247,130,12,13,16,28,131,248,249,250,251,252]),import.meta.url),ElFormV2:()=>__vitePreload(()=>import("./CjeLMa2V.js"),__vite__mapDeps([253,254,246,168,6,169,10,247,134,14,15,135,115,136,23,24,16,137,250,251,28,255]),import.meta.url),ElGridCollapse:()=>__vitePreload(()=>import("./BGYBNJf1.js"),__vite__mapDeps([256,16,10,28,6,257]),import.meta.url),ElGridCollapseV2:()=>__vitePreload(()=>import("./QEMARqXU.js"),__vite__mapDeps([258,95,81,5,6,7,8,9,10,11,96,82,12,13,16,28,30,17,259]),import.meta.url),ElGridCollapseV3:()=>__vitePreload(()=>import("./BDVFH7oI.js"),__vite__mapDeps([260,261,14,6,15,12,13,16,10,28,262,263,135,115,136,264]),import.meta.url),ElHeadline:()=>__vitePreload(()=>import("./CVaioMkm.js"),__vite__mapDeps([265,6,266]),import.meta.url),ElHeadlineV2:()=>__vitePreload(()=>import("./CfkvStnU.js"),__vite__mapDeps([267,16,10,268,6,269]),import.meta.url),ElIcon:()=>__vitePreload(()=>import("./OPZ1EQE_.js"),__vite__mapDeps([261,14,6,15,12,13,16,10,28,262]),import.meta.url),ElIconBox:()=>__vitePreload(()=>import("./BWUchnh5.js"),__vite__mapDeps([270,14,6,15,12,13,271,16,10,268,272,273]),import.meta.url),ElImage:()=>__vitePreload(()=>import("./BfeQ0nLh.js"),__vite__mapDeps([103,16,10,28,6]),import.meta.url),ElImageGallery:()=>__vitePreload(()=>import("./Dx8IFGCv.js"),__vite__mapDeps([274,6]),import.meta.url),ElImagePopup:()=>__vitePreload(()=>import("./CtR3cKx-.js"),__vite__mapDeps([275,222,12,6,13,5,16,10,28,223,103]),import.meta.url),ElImagePopupV2:()=>__vitePreload(()=>import("./BKovYRTC.js"),__vite__mapDeps([276,263,135,115,6,136,12,13,16,10]),import.meta.url),ElInlineWrapper:()=>__vitePreload(()=>import("./BXZLV6nK.js"),__vite__mapDeps([277,10,28,16,6]),import.meta.url),ElInternalEmbedBlock:()=>__vitePreload(()=>import("./BEyrAXay.js"),__vite__mapDeps([278,6]),import.meta.url),ElList:()=>__vitePreload(()=>import("./CYd7UG8b.js"),__vite__mapDeps([279,280,5,16,10,268,28,6,281,282]),import.meta.url),ElListV2:()=>__vitePreload(()=>import("./C0lt5cRE.js"),__vite__mapDeps([283,14,6,15,271,16,10,268,272,284]),import.meta.url),ElLiveStream:()=>__vitePreload(()=>import("./C6mo2kun.js"),__vite__mapDeps([285,286,287,6,288,289,290,291,16,10,292,293]),import.meta.url),ElLottie:()=>__vitePreload(()=>import("./IB4TQxae.js"),__vite__mapDeps([294,12,6,13,16,10]),import.meta.url),ElMediaWrapper:()=>__vitePreload(()=>import("./BSSNzdwr.js"),__vite__mapDeps([295,16,10,28,6,296]),import.meta.url),ElMenuLinks:()=>__vitePreload(()=>import("./XKwkLVLs.js"),__vite__mapDeps([297,200,16,10,28,6]),import.meta.url),ElOrderForm:()=>__vitePreload(()=>import("./BDqVkk9U.js"),__vite__mapDeps([298,299,300,246,168,6,169,10,247,250,179,178,56,16,301,28,302]),import.meta.url),ElParagraph:()=>__vitePreload(()=>import("./CObyp13U.js"),__vite__mapDeps([280,5,16,10,268,28,6,281]),import.meta.url),ElParagraphV2:()=>__vitePreload(()=>import("./T8j3wprV.js"),__vite__mapDeps([271,16,10,268,6,272]),import.meta.url),ElPreviewsButton:()=>__vitePreload(()=>import("./B7Y9LSeE.js"),__vite__mapDeps([303,179,16,10,6]),import.meta.url),ElProgressBar:()=>__vitePreload(()=>import("./Cozh1lg9.js"),__vite__mapDeps([304,16,10,28,6]),import.meta.url),ElProgressBarV2:()=>__vitePreload(()=>import("./Bb-53n51.js"),__vite__mapDeps([305,16,10,6,306]),import.meta.url),ElQr:()=>__vitePreload(()=>import("./Ri_zgebb.js"),__vite__mapDeps([307,16,10,6,308]),import.meta.url),ElRealtimeChat:()=>__vitePreload(()=>import("./CkyFxg_z.js"),__vite__mapDeps([309,5,310,311,6,312,127,287,313]),import.meta.url),ElRealtimeChatFirestore:()=>__vitePreload(()=>import("./BA_qibES.js"),__vite__mapDeps([314,5,310,6,315]),import.meta.url),ElRichText:()=>__vitePreload(()=>import("./COT4ZTZl.js"),__vite__mapDeps([316,16,10,6,317]),import.meta.url),ElRow:()=>__vitePreload(()=>import("./CWIiWYX8.js"),__vite__mapDeps([318,81,5,6,7,8,9,10,11,16,28,30]),import.meta.url),ElSocialLinks:()=>__vitePreload(()=>import("./C8vdsVIa.js"),__vite__mapDeps([319,16,10,28,6,320]),import.meta.url),ElSocialLinksV2:()=>__vitePreload(()=>import("./aCWmUKfY.js"),__vite__mapDeps([321,6,322]),import.meta.url),ElStarRating:()=>__vitePreload(()=>import("./HxXSdozh.js"),__vite__mapDeps([323,16,10,28,6,324]),import.meta.url),ElStarRatingV2:()=>__vitePreload(()=>import("./DNj84Aqf.js"),__vite__mapDeps([325,16,10,6]),import.meta.url),ElStickySocialShareIcons:()=>__vitePreload(()=>import("./rt99bgqH.js"),__vite__mapDeps([326,6,327]),import.meta.url),ElSubheadline:()=>__vitePreload(()=>import("./BzVtziO1.js"),__vite__mapDeps([328,5,16,10,268,28,6,329]),import.meta.url),ElSubheadlineV2:()=>__vitePreload(()=>import("./BYYAXERi.js"),__vite__mapDeps([330,16,10,268,6,281]),import.meta.url),ElTestimonial3:()=>__vitePreload(()=>import("./_A1CZeqN.js"),__vite__mapDeps([331,16,10,28,6]),import.meta.url),ElTestimonial4:()=>__vitePreload(()=>import("./aCWCzA3g.js"),__vite__mapDeps([332,175,12,6,13,16,10,28]),import.meta.url),ElTimeItem1:()=>__vitePreload(()=>import("./fJsu0Ijb.js"),__vite__mapDeps([333,16,10,28,334,25,6,335]),import.meta.url),ElTimeItem2:()=>__vitePreload(()=>import("./B_Fd-BGD.js"),__vite__mapDeps([336,16,10,28,334,25,6,337]),import.meta.url),ElTimeItem3:()=>__vitePreload(()=>import("./DJG9Xrwx.js"),__vite__mapDeps([338,16,10,28,334,25,6,339]),import.meta.url),ElTimeItem4:()=>__vitePreload(()=>import("./Cz_st7Je.js"),__vite__mapDeps([340,341,6,16,10,28,334,25,342]),import.meta.url),ElTimeItem5:()=>__vitePreload(()=>import("./CJztiCZF.js"),__vite__mapDeps([343,16,10,28,334,25,6,344]),import.meta.url),ElTimeItem6:()=>__vitePreload(()=>import("./CGPrvfYA.js"),__vite__mapDeps([345,16,10,28,334,25,6,346]),import.meta.url),ElTimeItemV2:()=>__vitePreload(()=>import("./T8fc7BX3.js"),__vite__mapDeps([347,348,349,21,6,10,16,350,25,351,352]),import.meta.url),ElTimer:()=>__vitePreload(()=>import("./BzAuWdO-.js"),__vite__mapDeps([353,5,16,10,28,6]),import.meta.url),ElTimerDis
36play:()=>__vitePreload(()=>import("./BdBqGXdF.js"),__vite__mapDeps([348,349,21,6]),import.meta.url),ElTimerV2:()=>__vitePreload(()=>import("./C5zyL8ug.js"),__vite__mapDeps([354,348,349,21,6,10,16,350,25,351,355]),import.meta.url),ElTooltip:()=>__vitePreload(()=>import("./DrhflEf7.js"),__vite__mapDeps([135,115,6,136]),import.meta.url),ElTypography:()=>__vitePreload(()=>import("./DeSl8PoE.js"),__vite__mapDeps([356,16,10,268,28,6,357]),import.meta.url),ElVideo:()=>__vitePreload(()=>import("./BLXYbAxj.js"),__vite__mapDeps([358,359]),import.meta.url),ElVideoAnimation:()=>__vitePreload(()=>import("./PH3nD9mz.js"),__vite__mapDeps([360,16,10,6]),import.meta.url),ElVideoPlaylist:()=>__vitePreload(()=>import("./Col8tktB.js"),__vite__mapDeps([361,6,362]),import.meta.url),ElVideoPopup:()=>__vitePreload(()=>import("./BGa3uAIb.js"),__vite__mapDeps([363,222,12,6,13,5,16,10,28,223,103,364,23,292,365,366]),import.meta.url),ElVideoPopupV3:()=>__vitePreload(()=>import("./tHBlo9Tr.js"),__vite__mapDeps([367,364,23,292,16,10,6,365,368]),import.meta.url),ElVideoV2:()=>__vitePreload(()=>import("./IR89NCH5.js"),__vite__mapDeps([364,23,292,16,10,6,365]),import.meta.url),ElYtShorts:()=>__vitePreload(()=>import("./DJ_PfpbT.js"),__vite__mapDeps([369,6,370]),import.meta.url),ElBlogAuthorBox:()=>__vitePreload(()=>import("./DMFqyLii.js"),__vite__mapDeps([371,6,372]),import.meta.url),ElBlogCategories:()=>__vitePreload(()=>import("./DTHRBA0k.js"),__vite__mapDeps([373,39,6,374]),import.meta.url),ElBlogGrid:()=>__vitePreload(()=>import("./B-op0bvN.js"),__vite__mapDeps([375,40,6,376]),import.meta.url),ElBlogSearch:()=>__vitePreload(()=>import("./SXkTSpO7.js"),__vite__mapDeps([377,39,6,378]),import.meta.url),ElDVideoV2:()=>__vitePreload(()=>import("./Bej-3spB.js"),__vite__mapDeps([379,84,16,10,28,6,380]),import.meta.url),ElFieldFieldAuth:()=>__vitePreload(()=>import("./D2GvjL32.js"),__vite__mapDeps([381,179,178,56,16,10,110,6,382]),import.meta.url),ElFieldFieldCardDetails:()=>__vitePreload(()=>import("./D81-h5pC.js"),__vite__mapDeps([383,384,178,56,179,6,385,386,387,388,246,168,169,10,247,134,14,15,135,115,136,23,24,16,137,389,390,391,392]),import.meta.url),ElFieldFieldCheckbox:()=>__vitePreload(()=>import("./DpblQEJe.js"),__vite__mapDeps([393,179,16,10,6,394]),import.meta.url),ElFieldFieldInput:()=>__vitePreload(()=>import("./Cv57gdaz.js"),__vite__mapDeps([395,179,16,10,6]),import.meta.url),ElFieldFieldNumber:()=>__vitePreload(()=>import("./D31qKqrU.js"),__vite__mapDeps([396,179,16,10,6]),import.meta.url),ElFieldFieldPhone:()=>__vitePreload(()=>import("./DZn9G31S.js"),__vite__mapDeps([397,398,92,21,6,399,400,16,10]),import.meta.url),ElFieldFieldTextarea:()=>__vitePreload(()=>import("./BNwTiDId.js"),__vite__mapDeps([401,179,16,10,6]),import.meta.url),ElImageV2:()=>__vitePreload(()=>import("./D0bDkto9.js"),__vite__mapDeps([222,12,6,13,5,16,10,28,223]),import.meta.url),ElImageV3:()=>__vitePreload(()=>import("./B01H4zB0.js"),__vite__mapDeps([263,135,115,6,136,12,13,16,10]),import.meta.url),ElImageV4:()=>__vitePreload(()=>import("./DSinNiN2.js"),__vite__mapDeps([402,135,115,6,136,12,13,16,10]),import.meta.url),ElMenuLinksMenuLink:()=>__vitePreload(()=>import("./V9h0cW6W.js"),__vite__mapDeps([403,10,6,404]),import.meta.url),ElMenuLinksMenuLinkV3:()=>__vitePreload(()=>import("./BT3UbIxE.js"),__vite__mapDeps([405,198,10,28,16,196,6,199,200,406]),import.meta.url),ElMenuLinksMenuLinkV4:()=>__vitePreload(()=>import("./C2d4VswM.js"),__vite__mapDeps([194,195,10,196,6,197,198,28,16,199,200,201]),import.meta.url),ElMenuLinksV2:()=>__vitePreload(()=>import("./a0bLrG0S.js"),__vite__mapDeps([407,403,10,6,404,16,28]),import.meta.url),ElMenuLinksV3:()=>__vitePreload(()=>import("./CjRS0At8.js"),__vite__mapDeps([408,405,198,10,28,16,196,6,199,200,406]),import.meta.url),ElMenuLinksV4:()=>__vitePreload(()=>import("./B37O8pCu.js"),__vite__mapDeps([193,194,195,10,196,6,197,198,28,16,199,200,201]),import.meta.url),ElPaymentPaymentProvider:()=>__vitePreload(()=>import("./IA6pZGkE.js"),__vite__mapDeps([409,179,178,56,16,10,6]),import.meta.url),ElPaymentPaymentSummary:()=>__vitePreload(()=>import("./Tbksbp-v.js"),__vite__mapDeps([410,411,179,178,56,16,10,6]),import.meta.url),ElPostBreadcrumbs:()=>__vitePreload(()=>import("./CiwP61Wv.js"),__vite__mapDeps([412,6,413]),import.meta.url),ElPostButton:()=>__vitePreload(()=>import("./zGrBeT9t.js"),__vite__mapDeps([414,229,6,415]),import.meta.url),ElPostCommentsAndLikes:()=>__vitePreload(()=>import("./VvdyXhKX.js"),__vite__mapDeps([416,6,417]),import.meta.url),ElPostGrid:()=>__vitePreload(()=>import("./BeOqCXXo.js"),__vite__mapDeps([418,141,6,142,39,419]),import.meta.url),ElPostImage:()=>__vitePreload(()=>import("./YsOY0skb.js"),__vite__mapDeps([420,6,421]),import.meta.url),ElPostList:()=>__vitePreload(()=>import("./MvO4TJYf.js"),__vite__mapDeps([422,127,6,423]),import.meta.url),ElPostPostCategories:()=>__vitePreload(()=>import("./DigUD1OL.js"),__vite__mapDeps([424,6,425]),import.meta.url),ElPostPostInfo:()=>__vitePreload(()=>import("./CQyO1BQl.js"),__vite__mapDeps([426,416,6,417,127,427]),import.meta.url),ElPostText:()=>__vitePreload(()=>import("./Dx9CceFn.js"),__vite__mapDeps([428,230,6,429]),import.meta.url),ElPostThumb:()=>__vitePreload(()=>import("./DWQOShPf.js"),__vite__mapDeps([430,6,431]),import.meta.url),ElPostTitle:()=>__vitePreload(()=>import("./D1Qcb8ST.js"),__vite__mapDeps([432,230,6,433]),import.meta.url),ElProductProductCover:()=>__vitePreload(()=>import("./D8ahXyE1.js"),__vite__mapDeps([434,178,56,179,16,10,6]),import.meta.url),ElProductProductDescription:()=>__vitePreload(()=>import("./DaUx9seF.js"),__vite__mapDeps([435,178,56,179,16,10,6]),import.meta.url),ElProductProductTitle:()=>__vitePreload(()=>import("./B3vP2V3D.js"),__vite__mapDeps([436,178,56,179,16,10,6]),import.meta.url),ElProductProductVariant:()=>__vitePreload(()=>import("./2EAIfhE8.js"),__vite__mapDeps([437,411,179,178,56,16,10,6]),import.meta.url),ElTimerFlipTracker:()=>__vitePreload(()=>import("./9-IrZd18.js"),__vite__mapDeps([341,6]),import.meta.url),EsCollapse:()=>__vitePreload(()=>import("./CTMfOtnq.js"),__vite__mapDeps([19,20,21,6]),import.meta.url),EsCustomImage:()=>__vitePreload(()=>import("./BIPcfZ1f.js"),__vite__mapDeps([438,6]),import.meta.url),EsDropdown:()=>__vitePreload(()=>import("./CPKPZGV_.js"),__vite__mapDeps([198,10,28,16,196,6,199]),import.meta.url),EsPhoneDropdown:()=>__vitePreload(()=>import("./F7sHpPqE.js"),__vite__mapDeps([398,92,21,6,399]),import.meta.url),EventsLiveHlsReadyWrapper:()=>__vitePreload(()=>import("./OKfbb-p0.js"),__vite__mapDeps([439,440,6,441]),import.meta.url),FeaturedItems3:()=>__vitePreload(()=>import("./BvMigsmD.js"),__vite__mapDeps([442,103,16,10,28,6]),import.meta.url),FeaturedItems5:()=>__vitePreload(()=>import("./CCLLkyQQ.js"),__vite__mapDeps([443,5,16,10,28,6,444]),import.meta.url),FormButton:()=>__vitePreload(()=>import("./BL_8Y2RV.js"),__vite__mapDeps([248,10,6,249]),import.meta.url),FormCheckbox:()=>__vitePreload(()=>import("./D3-lK2r8.js"),__vite__mapDeps([168,6,169]),import.meta.url),FormGdpr:()=>__vitePreload(()=>import("./Dbftdb9b.js"),__vite__mapDeps([246,168,6,169,10,247]),import.meta.url),FormInput:()=>__vitePreload(()=>import("./DzCMlmyn.js"),__vite__mapDeps([445,6]),import.meta.url),FormLayout:()=>__vitePreload(()=>import("./D4zIK2eU.js"),__vite__mapDeps([245,246,168,6,169,10,247,130,12,13,16,28,131,248,249,250,251]),import.meta.url),FormLayoutV2:()=>__vitePreload(()=>import("./BvhdhALP.js"),__vite__mapDeps([254,246,168,6,169,10,247,134,14,15,135,115,136,23,24,16,137,250,251]),import.meta.url),FormPhone:()=>__vitePreload(()=>import("./9fp-MTxY.js"),__vite__mapDeps([446,398,92,21,6,399,400,447]),import.meta.url),FormTextarea:()=>__vitePreload(()=>import("./WfR8JOno.js"),__vite__mapDeps([448,10,28,16,6]),import.meta.url),FormOrderFormWizard:()=>__vitePreload(()=>import("./KwgBVHAZ.js"),__vite__mapDeps([299,300,246,168,6,169,10,247,250,179,178,56,16,301]),import.meta.url),FormOrderLayoutV3:()=>__vitePreload(()=>import("./CUSv2qap.js"),__vite__mapDeps([449,246,168,6,169,10,247,134,14,15,135,115,136,23,24,16,137,250,178,56,179,450,451,452,453,454,455,456,457,251]),import.meta.url),FormOrderOrderFormLayout:()=>__vitePreload(()=>import("./ekn9BgcV.js"),__vite__mapDeps([300,246,168,6,169,10,247,250,179,178,56]),import.meta.url),FormOrderCheckoutTemplate1:()=>__vitePreload(()=>import("./7EpiLa8h.js"),__vite__mapDeps([458,6]),import.meta.url),FormOrderCheckoutTemplate2:()=>__vitePreload(()=>import("./DQVlKNh0.js"),__vite__mapDeps([459,6]),import.meta.url),FormOrderCheckoutTemplate3:()=>__vitePreload(()=>import("./B9CqsbcP.js"),__vite__mapDeps([460,6]),import.meta.url),FormOrderControlsCardCvc:()=>__vitePreload(()=>import("./CovCY393.js"),__vite__mapDeps([450,6]),import.meta.url),FormOrderControlsCardExpMonth:()=>__vitePreload(()=>import("./ZdN4PNpy.js"),__vite__mapDeps([451,6,452]),import.meta.url),FormOrderControlsCardExpYear:()=>__vitePreload(()=>import("./BzR4B-1P.js"),__vite__mapDeps([453,6,454]),import.meta.url),FormOrderControlsCardNumber:()=>__vitePreload(()=>import("./D6xtobqm.js"),__vite__mapDeps([455,6]),import.meta.url),FormOrderControlsPaymentMethod:()=>__vitePreload(()=>import("./Bp8EkjoY.js"),__vite__mapDeps([456,6,457]),import.meta.url),HeroItem5:()=>__vitePreload(()=>import("./Bn7xawXv.js"),__vite__mapDeps([461,103,16,10,28,6]),import.meta.url),LiveC
36onfigMenu:()=>__vitePreload(()=>import("./B9wvL4JT.js"),__vite__mapDeps([462,463,21,464,389,390,6,20,349,465]),import.meta.url),LiveConfigMenu2:()=>__vitePreload(()=>import("./DKEUAKDf.js"),__vite__mapDeps([466,463,21,467,6,468]),import.meta.url),LiveConfigMenu3:()=>__vitePreload(()=>import("./Xh7VpZqh.js"),__vite__mapDeps([469,349,21,6,470]),import.meta.url),LiveEventsLivePlayer5:()=>__vitePreload(()=>import("./07U34ZdC.js"),__vite__mapDeps([471,469,349,21,6,470,290,472]),import.meta.url),LiveEventsLivePlayer5Ios:()=>__vitePreload(()=>import("./DFkFRlXA.js"),__vite__mapDeps([473,469,349,21,6,470]),import.meta.url),LiveIndex:()=>__vitePreload(()=>import("./BD9Q3ujw.js"),__vite__mapDeps([474,6,475,476,5,286,287,288,477,114,115,478,390,391,479,16,10,480]),import.meta.url),LiveLLHLS:()=>__vitePreload(()=>import("./DaPbO9cp.js"),__vite__mapDeps([481,482,6,483]),import.meta.url),LiveLLHLS2:()=>__vitePreload(()=>import("./7V7WPLjg.js"),__vite__mapDeps([484,479,478,390,391,6,477,114,115,485,351,467,486]),import.meta.url),LiveLLHLS3:()=>__vitePreload(()=>import("./BJHSaV8h.js"),__vite__mapDeps([487,482,462,463,21,464,389,390,6,20,349,465,488]),import.meta.url),LiveLogo:()=>__vitePreload(()=>import("./CuoOtGWT.js"),__vite__mapDeps([475,6,476]),import.meta.url),LiveMembersCount:()=>__vitePreload(()=>import("./Dt-rxKMH.js"),__vite__mapDeps([286,287,6,288]),import.meta.url),LiveMembersCount2:()=>__vitePreload(()=>import("./hfcZmhRJ.js"),__vite__mapDeps([489,287,6]),import.meta.url),LivePlayer:()=>__vitePreload(()=>import("./QsAx-E_k.js"),__vite__mapDeps([289,6,290,291]),import.meta.url),LiveWebRTC:()=>__vitePreload(()=>import("./Bk7sEuPp.js"),__vite__mapDeps([490,6,491,114,115,478,390,391,492,493,494,467,486,495]),import.meta.url),Navbar1:()=>__vitePreload(()=>import("./BuW0loVw.js"),__vite__mapDeps([496,6]),import.meta.url),Navbar2:()=>__vitePreload(()=>import("./HQoKbGFG.js"),__vite__mapDeps([497,498,10,6,499,500,501,502,200,503,130,12,13,16,28,131]),import.meta.url),Navbar3:()=>__vitePreload(()=>import("./DIXTnnDz.js"),__vite__mapDeps([504,498,10,6,499,130,12,13,16,28,131,500,501,502,200,503]),import.meta.url),NavbarDropdownMenu:()=>__vitePreload(()=>import("./Bl5diYnU.js"),__vite__mapDeps([501,502,200,6]),import.meta.url),NavbarLogo:()=>__vitePreload(()=>import("./8fpITzH-.js"),__vite__mapDeps([498,10,6,499]),import.meta.url),NavbarMegaMenu:()=>__vitePreload(()=>import("./mgeRfwhi.js"),__vite__mapDeps([195,10,196,6,197]),import.meta.url),NavbarMenuItems:()=>__vitePreload(()=>import("./iWlC49ZE.js"),__vite__mapDeps([500,501,502,200,6,10,503]),import.meta.url),NavbarMenuItemsLink:()=>__vitePreload(()=>import("./B_tSNzDZ.js"),__vite__mapDeps([502,200,6]),import.meta.url),NavbarV2:()=>__vitePreload(()=>import("./-NU254rf.js"),__vite__mapDeps([505,96,81,5,6,7,82,12,13,10,8,9,11,16,28,30,17,19,20,21,95,506]),import.meta.url),NavbarV3:()=>__vitePreload(()=>import("./WBHeYkkR.js"),__vite__mapDeps([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]),import.meta.url),ProfileExp:()=>__vitePreload(()=>import("./DUGnm9J6.js"),__vite__mapDeps([507,5,440,508,6,509]),import.meta.url),ProfilePreview:()=>__vitePreload(()=>import("./MFF62AfT.js"),__vite__mapDeps([510,5,118,112,113,114,115,6,116,117,119,508,485,351,511]),import.meta.url),RealtimeChatFlyEmojis:()=>__vitePreload(()=>import("./D0lM-lFk.js"),__vite__mapDeps([311,6,312]),import.meta.url),StripeElement:()=>__vitePreload(()=>import("./DcrjQjTF.js"),__vite__mapDeps([386,6,387]),import.meta.url),StripeElements:()=>__vitePreload(()=>import("./BcZ135KP.js"),__vite__mapDeps([388,178,56,179,6]),import.meta.url),StripeExpress:()=>__vitePreload(()=>import("./D23O2QxI.js"),__vite__mapDeps([384,178,56,179,6,385]),import.meta.url),TwDropdownIndex:()=>__vitePreload(()=>import("./DiOoPNWN.js"),__vite__mapDeps([491,114,115,478,390,391,6,492]),import.meta.url),TwDropdownItem:()=>__vitePreload(()=>import("./Ch2sUC-4.js"),__vite__mapDeps([512,493,478,390,391,494,6]),import.meta.url),UiModal:()=>__vitePreload(()=>import("./DjVMMfsH.js"),__vite__mapDeps([106,6,107]),import.meta.url),UiPrice:()=>__vitePreload(()=>
36import("./B1TVukB2.js"),__vite__mapDeps([513,411,6]),import.meta.url),UiToggle:()=>__vitePreload(()=>import("./BJ7gYXaq.js"),__vite__mapDeps([464,389,390,6]),import.meta.url),UiTooltip:()=>__vitePreload(()=>import("./D7feWUma.js"),__vite__mapDeps([113,114,115,6,116]),import.meta.url),UiDropdownIndex:()=>__vitePreload(()=>import("./9CCWDhfR.js"),__vite__mapDeps([477,114,115,478,390,391,6]),import.meta.url),UiDropdownItem:()=>__vitePreload(()=>import("./C-5ABQ98.js"),__vite__mapDeps([479,478,390,391,6]),import.meta.url),UtilsBackgroundSlider:()=>__vitePreload(()=>import("./XMY91GlI.js"),__vite__mapDeps([81,5,6,7]),import.meta.url),UtilsBackgroundSliderV2:()=>__vitePreload(()=>import("./BmT7VXuR.js"),__vite__mapDeps([4,5,6,7]),import.meta.url),UtilsBackgroundVideoV2:()=>__vitePreload(()=>import("./dyW4FUvd.js"),__vite__mapDeps([88,10,6,89]),import.meta.url),UtilsFloatImage:()=>__vitePreload(()=>import("./B1KOrQsF.js"),__vite__mapDeps([82,12,6,13,10]),import.meta.url),UtilsVideoBackground:()=>__vitePreload(()=>import("./CHM8pq8x.js"),__vite__mapDeps([83,5,84,10,6,85]),import.meta.url),UtilsShapeDividerShape:()=>__vitePreload(()=>import("./ao8MkUl6.js"),__vite__mapDeps([9,6]),import.meta.url),UtilsShapeDividerShapeDivider:()=>__vitePreload(()=>import("./-8tBiWp6.js"),__vite__mapDeps([8,9,6,10,11]),import.meta.url),VideoItem3:()=>__vitePreload(()=>import("./B8tmy2Ji.js"),__vite__mapDeps([514,358,359,265,6,266,515,280,5,16,10,268,28,281]),import.meta.url),VideoPreview:()=>__vitePreload(()=>import("./CWWEsYIk.js"),__vite__mapDeps([515,358,359,280,5,16,10,268,28,6,281]),import.meta.url),WealthTemaplteElVerticalMenu:()=>__vitePreload(()=>import("./D8dtBCRI.js"),__vite__mapDeps([516,16,10,28,6]),import.meta.url),ElTableOfContents:()=>__vitePreload(()=>import("./DYn1noL7.js"),__vite__mapDeps([217,218,6,219,16,10,220]),import.meta.url),ElTableOfContentsItem:()=>__vitePreload(()=>import("./BIk35DJ_.js"),__vite__mapDeps([218,6,219]),import.meta.url),ElThreeImages:()=>__vitePreload(()=>import("./DWK8scO0.js"),__vite__mapDeps([221,222,12,6,13,5,16,10,28,223,103,224]),import.meta.url),ElFieldAuth:()=>__vitePreload(()=>import("./D2GvjL32.js"),__vite__mapDeps([381,179,178,56,16,10,110,6,382]),import.meta.url),ElFieldCardDetails:()=>__vitePreload(()=>import("./D81-h5pC.js"),__vite__mapDeps([383,384,178,56,179,6,385,386,387,388,246,168,169,10,247,134,14,15,135,115,136,23,24,16,137,389,390,391,392]),import.meta.url),ElFieldCheckbox:()=>__vitePreload(()=>import("./DpblQEJe.js"),__vite__mapDeps([393,179,16,10,6,394]),import.meta.url),ElFieldInput:()=>__vitePreload(()=>import("./Cv57gdaz.js"),__vite__mapDeps([395,179,16,10,6]),import.meta.url),ElFieldNumber:()=>__vitePreload(()=>import("./D31qKqrU.js"),__vite__mapDeps([396,179,16,10,6]),import.meta.url),ElFieldPhone:()=>__vitePreload(()=>import("./DZn9G31S.js"),__vite__mapDeps([397,398,92,21,6,399,400,16,10]),import.meta.url),ElFieldTextarea:()=>__vitePreload(()=>import("./BNwTiDId.js"),__vite__mapDeps([401,179,16,10,6]),import.meta.url),ElPaymentProvider:()=>__vitePreload(()=>import("./IA6pZGkE.js"),__vite__mapDeps([409,179,178,56,16,10,6]),import.meta.url),ElPaymentSummary:()=>__vitePreload(()=>import("./Tbksbp-v.js"),__vite__mapDeps([410,411,179,178,56,16,10,6]),import.meta.url),ElPostCategories:()=>__vitePreload(()=>import("./DigUD1OL.js"),__vite__mapDeps([424,6,425]),import.meta.url),ElPostInfo:()=>__vitePreload(()=>import("./CQyO1BQl.js"),__vite__mapDeps([426,416,6,417,127,427]),import.meta.url),ElProductCover:()=>__vitePreload(()=>import("./D8ahXyE1.js"),__vite__mapDeps([434,178,56,179,16,10,6]),import.meta.url),ElProductDescription:()=>__vitePreload(()=>import("./DaUx9seF.js"),__vite__mapDeps([435,178,56,179,16,10,6]),import.meta.url),ElProductTitle:()=>__vitePreload(()=>import("./B3vP2V3D.js"),__vite__mapDeps([436,178,56,179,16,10,6]),import.meta.url),ElProductVariant:()=>__vitePreload(()=>import("./2EAIfhE8.js"),__vite__mapDeps([437,411,179,178,56,16,10,6]),import.meta.url),FormOrderFormLayout:()=>__vitePreload(()=>import("./ekn9BgcV.js"),__vite__mapDeps([300,246,168,6,169,10,247,250,179,178,56]),import.meta.url)},component_resolver_xxPFjJyTvq=defineNuxtPlugin(o=>{console.debug(`[component-resolver] registering ${Object.keys(componentMap).length} lazy components`);for(const[r,a]of Object.entries(componentMap))o.vueApp.component(r,defineAsyncComponent({loader:a,suspensible:!1}));console.debug("[component-resolver] all components registered (lazy)")}),aosDirective={beforeMount(o,r){const a=r.arg;o.parentElement&&(o.parentElement.classList.add(a),document.addEventListener("aos:in",l=>{l.detail===o&&setTimeout(()=>{o.parentElement.classList.remove(a)},parseInt(o.getAttribute("data-aos-duration")))}),document.addEventListener("aos:out",()=>{event.detail===o&&o.parentElement.classList.add(a)}))}},ClickOutsideDirective={beforeMount(o,r,a){o.clickOutsideEvent=function(l){o===l.target||o.contains(l.target)||r.value(l)},document.addEventListener("click",o.clickOutsideEvent,!0)},unmounted(o){document.removeEventListener("click",o.clickOutsideEvent,!0)}},Mask={beforeMount(o,r){function a(c){let u="",d=0;for(let f=0;f<c.length&&!(d>=r.value.length);f++)r.value[d]==="#"?/\d/.test(c[f])&&(u+=c[f],d++):(u+=r.value[d],d++,f--);return u}const l=c=>{const u=c.target.value,d=a(u);u!==d&&(c.target.value=d,c.target.dispatchEvent(new Event("input")))};
36o.__updateValue__=l,o.addEventListener("input",l)},unmounted(o){o.removeEventListener("input",o.__updateValue__),delete o.__updateValue__}},directives_GDwrTGmylM=defineNuxtPlugin(o=>{o.vueApp.directive("aos",aosDirective),o.vueApp.directive("click-outside",ClickOutsideDirective),o.vueApp.directive("mask",Mask)}),event_bus_JNcXIfrhYt=defineNuxtPlugin(o=>{{const r=new EventTarget;o.provide("bus",r)}});var define_process_env_default$2={};/**
37 * @license
38 * Copyright 2017 Google LLC
39 *
40 * Licensed under the Apache License, Version 2.0 (the "License");
41 * you may not use this file except in compliance with the License.
42 * You may obtain a copy of the License at
43 *
44 *   http://www.apache.org/licenses/LICENSE-2.0
45 *
46 * Unless required by applicable law or agreed to in writing, software
47 * distributed under the License is distributed on an "AS IS" BASIS,
48 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49 * See the License for the specific language governing permissions and
50 * limitations under the License.
51 */const CONSTANTS={NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"};/**
52 * @license
53 * Copyright 2017 Google LLC
54 *
55 * Licensed under the Apache License, Version 2.0 (the "License");
56 * you may not use this file except in compliance with the License.
57 * You may obtain a copy of the License at
58 *
59 *   http://www.apache.org/licenses/LICENSE-2.0
60 *
61 * Unless required by applicable law or agreed to in writing, software
62 * distributed under the License is distributed on an "AS IS" BASIS,
63 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
64 * See the License for the specific language governing permissions and
65 * limitations under the License.
66 */const assert=function(o,r){if(!o)throw assertionError(r)},assertionError=function(o){return new Error("Firebase Database ("+CONSTANTS.SDK_VERSION+") INTERNAL ASSERT FAILED: "+o)};/**
67 * @license
68 * Copyright 2017 Google LLC
69 *
70 * Licensed under the Apache License, Version 2.0 (the "License");
71 * you may not use this file except in compliance with the License.
72 * You may obtain a copy of the License at
73 *
74 *   http://www.apache.org/licenses/LICENSE-2.0
75 *
76 * Unless required by applicable law or agreed to in writing, software
77 * distributed under the License is distributed on an "AS IS" BASIS,
78 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
79 * See the License for the specific language governing permissions and
80 * limitations under the License.
81 */const stringToByteArray$1=function(o){const r=[];let a=0;for(let l=0;l<o.length;l++){let c=o.charCodeAt(l);c<128?r[a++]=c:c<2048?(r[a++]=c>>6|192,r[a++]=c&63|128):(c&64512)===55296&&l+1<o.length&&(o.charCodeAt(l+1)&64512)===56320?(c=65536+((c&1023)<<10)+(o.charCodeAt(++l)&1023),r[a++]=c>>18|240,r[a++]=c>>12&63|128,r[a++]=c>>6&63|128,r[a++]=c&63|128):(r[a++]=c>>12|224,r[a++]=c>>6&63|128,r[a++]=c&63|128)}return r},byteArrayToString=function(o){const r=[];let a=0,l=0;for(;a<o.length;){const c=o[a++];if(c<128)r[l++]=String.fromCharCode(c);else if(c>191&&c<224){const u=o[a++];r[l++]=String.fromCharCode((c&31)<<6|u&63)}else if(c>239&&c<365){const u=o[a++],d=o[a++],f=o[a++],m=((c&7)<<18|(u&63)<<12|(d&63)<<6|f&63)-65536;r[l++]=String.fromCharCode(55296+(m>>10)),r[l++]=String.fromCharCode(56320+(m&1023))}else{const u=o[a++],d=o[a++];r[l++]=String.fromCharCode((c&15)<<12|(u&63)<<6|d&63)}}return r.join("")},base64={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(o,r){if(!Array.isArray(o))throw Error("encodeByteArray takes an array as a parameter");this.init_();const a=r?this.byteToCharMapWebSafe_:this.byteToCharMap_,l=[];for(let c=0;c<o.length;c+=3){const u=o[c],d=c+1<o.length,f=d?o[c+1]:0,m=c+2<o.length,y=m?o[c+2]:0,E=u>>2,A=(u&3)<<4|f>>4;let P=(f&15)<<2|y>>6,R=y&63;m||(R=64,d||(P=64)),l.push(a[E],a[A],a[P],a[R])}return l.join("")},encodeString(o,r){return this.HAS_NATIVE_SUPPORT&&!r?btoa(o):this.encodeByteArray(stringToByteArray$1(o),r)},decodeString(o,r){return this.HAS_NATIVE_SUPPORT&&!r?atob(o):byteArrayToString(this.decodeStringToByteArray(o,r))},decodeStringToByteArray(o,r){this.init_();const a=r?this.charToByteMapWebSafe_:this.charToByteMap_,l=[];for(let c=0;c<o.length;){const u=a[o.charAt(c++)],f=c<o.length?a[o.charAt(c)]:0;++c;const y=c<o.length?a[o.charAt(c)]:64;++c;const A=c<o.length?a[o.charAt(c)]:64;if(++c,u==null||f==null||y==null||A==null)throw new DecodeBase64StringError;
81const P=u<<2|f>>4;if(l.push(P),y!==64){const R=f<<4&240|y>>2;if(l.push(R),A!==64){const x=y<<6&192|A;l.push(x)}}}return l},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let o=0;o<this.ENCODED_VALS.length;o++)this.byteToCharMap_[o]=this.ENCODED_VALS.charAt(o),this.charToByteMap_[this.byteToCharMap_[o]]=o,this.byteToCharMapWebSafe_[o]=this.ENCODED_VALS_WEBSAFE.charAt(o),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[o]]=o,o>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(o)]=o,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(o)]=o)}}};class DecodeBase64StringError extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const base64Encode=function(o){const r=stringToByteArray$1(o);return base64.encodeByteArray(r,!0)},base64urlEncodeWithoutPadding=function(o){return base64Encode(o).replace(/\./g,"")},base64Decode=function(o){try{return base64.decodeString(o,!0)}catch(r){console.error("base64Decode failed: ",r)}return null};/**
82 * @license
83 * Copyright 2017 Google LLC
84 *
85 * Licensed under the Apache License, Version 2.0 (the "License");
86 * you may not use this file except in compliance with the License.
87 * You may obtain a copy of the License at
88 *
89 *   http://www.apache.org/licenses/LICENSE-2.0
90 *
91 * Unless required by applicable law or agreed to in writing, software
92 * distributed under the License is distributed on an "AS IS" BASIS,
93 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
94 * See the License for the specific language governing permissions and
95 * limitations under the License.
96 */function deepCopy(o){return deepExtend(void 0,o)}function deepExtend(o,r){if(!(r instanceof Object))return r;switch(r.constructor){case Date:const a=r;return new Date(a.getTime());case Object:o===void 0&&(o={});break;case Array:o=[];break;default:return r}for(const a in r)!r.hasOwnProperty(a)||!isValidKey$1(a)||(o[a]=deepExtend(o[a],r[a]));return o}function isValidKey$1(o){return o!=="__proto__"}/**
97 * @license
98 * Copyright 2022 Google LLC
99 *
100 * Licensed under the Apache License, Version 2.0 (the "License");
101 * you may not use this file except in compliance with the License.
102 * You may obtain a copy of the License at
103 *
104 *   http://www.apache.org/licenses/LICENSE-2.0
105 *
106 * Unless required by applicable law or agreed to in writing, software
107 * distributed under the License is distributed on an "AS IS" BASIS,
108 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
109 * See the License for the specific language governing permissions and
110 * limitations under the License.
111 */function getGlobal(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
112 * @license
113 * Copyright 2022 Google LLC
114 *
115 * Licensed under the Apache License, Version 2.0 (the "License");
116 * you may not use this file except in compliance with the License.
117 * You may obtain a copy of the License at
118 *
119 *   http://www.apache.org/licenses/LICENSE-2.0
120 *
121 * Unless required by applicable law or agreed to in writing, software
122 * distributed under the License is distributed on an "AS IS" BASIS,
123 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
124 * See the License for the specific language governing permissions and
125 * limitations under the License.
126 */const getDefaultsFromGlobal=()=>getGlobal().__FIREBASE_DEFAULTS__,getDefaultsFromEnvVariable=()=>{if(typeof process>"u"||typeof define_process_env_default$2>"u")return;const o=define_process_env_default$2.__FIREBASE_DEFAULTS__;if(o)return JSON.parse(o)},getDefaultsFromCookie=()=>{if(typeof document>"u")return;let o;try{o=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const r=o&&base64Decode(o[1]);return r&&JSON.parse(r)},getDefaults=()=>{try{return getDefaultsFromGlobal()||getDefaultsFromEnvVariable()||getDefaultsFromCookie()}catch(o){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${o}`);return}},getDefaultEmulatorHost=o=>{var r,a;return(a=(r=getDefaults())===null||r===void 0?void 0:r.emulatorHosts)===null||a===void 0?void 0:a[o]},getDefaultEmulatorHostnameAndPort=o=>{const r=getDefaultEmulatorHost(o);if(!r)return;const a=r.lastIndexOf(":");if(a<=0||a+1===r.length)throw new Error(`Invalid host ${r}
126 with no separate hostname and port!`);const l=parseInt(r.substring(a+1),10);return r[0]==="["?[r.substring(1,a-1),l]:[r.substring(0,a),l]},getDefaultAppConfig=()=>{var o;return(o=getDefaults())===null||o===void 0?void 0:o.config},getExperimentalSetting=o=>{var r;return(r=getDefaults())===null||r===void 0?void 0:r[`_${o}`]};/**
127 * @license
128 * Copyright 2017 Google LLC
129 *
130 * Licensed under the Apache License, Version 2.0 (the "License");
131 * you may not use this file except in compliance with the License.
132 * You may obtain a copy of the License at
133 *
134 *   http://www.apache.org/licenses/LICENSE-2.0
135 *
136 * Unless required by applicable law or agreed to in writing, software
137 * distributed under the License is distributed on an "AS IS" BASIS,
138 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
139 * See the License for the specific language governing permissions and
140 * limitations under the License.
141 */let Deferred$1=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((r,a)=>{this.resolve=r,this.reject=a})}wrapCallback(r){return(a,l)=>{a?this.reject(a):this.resolve(l),typeof r=="function"&&(this.promise.catch(()=>{}),r.length===1?r(a):r(a,l))}}};/**
142 * @license
143 * Copyright 2021 Google LLC
144 *
145 * Licensed under the Apache License, Version 2.0 (the "License");
146 * you may not use this file except in compliance with the License.
147 * You may obtain a copy of the License at
148 *
149 *   http://www.apache.org/licenses/LICENSE-2.0
150 *
151 * Unless required by applicable law or agreed to in writing, software
152 * distributed under the License is distributed on an "AS IS" BASIS,
153 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
154 * See the License for the specific language governing permissions and
155 * limitations under the License.
156 */function createMockUserToken(o,r){if(o.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const a={alg:"none",type:"JWT"},l=r||"demo-project",c=o.iat||0,u=o.sub||o.user_id;if(!u)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const d=Object.assign({iss:`https://securetoken.google.com/${l}`,aud:l,iat:c,exp:c+3600,auth_time:c,sub:u,user_id:u,firebase:{sign_in_provider:"custom",identities:{}}},o);return[base64urlEncodeWithoutPadding(JSON.stringify(a)),base64urlEncodeWithoutPadding(JSON.stringify(d)),""].join(".")}/**
157 * @license
158 * Copyright 2017 Google LLC
159 *
160 * Licensed under the Apache License, Version 2.0 (the "License");
161 * you may not use this file except in compliance with the License.
162 * You may obtain a copy of the License at
163 *
164 *   http://www.apache.org/licenses/LICENSE-2.0
165 *
166 * Unless required by applicable law or agreed to in writing, software
167 * distributed under the License is distributed on an "AS IS" BASIS,
168 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
169 * See the License for the specific language governing permissions and
170 * limitations under the License.
171 */function getUA(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function isMobileCordova(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA())}function isNode(){var o;const r=(o=getDefaults())===null||o===void 0?void 0:o.forceEnvironment;if(r==="node")return!0;if(r==="browser")return!1;try{return Object.prototype.toString.call(globalThis.process)==="[object process]"}catch{return!1}}function isCloudflareWorker(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function isBrowserExtension(){const o=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof o=="object"&&o.id!==void 0}function isReactNative(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function isIE(){const o=getUA();return o.indexOf("MSIE ")>=0||o.indexOf("Trident/")>=0}function isNodeSdk(){return CONSTANTS.NODE_ADMIN===!0}function isSafari(){return!isNode()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function isIndexedDBAvailable(){try{return typeof indexedDB=="object"}catch{return!1}}function validateIndexedDBOpenable(){return new Promise((o,r)=>{try{let a=!0;const l="validate-browser-context-for-indexeddb-analytics-module",c=self.indexedDB.open(l);c.onsuccess=()=>{c.result.close(),a||self.indexedDB.deleteDatabase(l),o(!0)},c.onupgradeneeded=()=>{a=!1},c.onerror=()=>{var u;r(((u=c.error)===null||u===void 0?void 0:u.message)||"")}}catch(a){r(a)}})}/**
172 * @license
173 * Copyright 2017 Google LLC
174 *
175 * Licensed under the Apache License, Version 2.0 (the "License");
176 * you may not use this file except in compliance with the License.
177 * You may obtain a copy of the License at
178 *
179 *   http://www.apache.org/licenses/LICENSE-2.0
180 *
181 * Unless required by applicable law or agreed to in writing, software
182 * distributed under the License is distributed on an "AS IS" BASIS,
183 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
184 * See the License for the specific language governing permissions and
185 * limitations under the License.
186 */const ERROR_NAME="FirebaseError";class FirebaseError extends Error{constructor(r,a,l){super(a),this.code=r,this.customData=l,this.name=ERROR_NAME,Object.setPrototypeOf(this,FirebaseError.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ErrorFactory.prototype.create)}}class ErrorFactory{constructor(r,a,l){this.service=r,this.serviceName=a,this.errors=l}create(r,...a){const l=a[0]||{},c=`${this.service}/${r}`,u=this.errors[r],d=u?replaceTemplate(u,l):"Error",f=`${this.serviceName}: ${d} (${c}).`;return new FirebaseError(c,f,l)}}function replaceTemplate(o,r){return o.replace(PATTERN,(a,l)=>{const c=r[l];return c!=null?String(c):`<${l}?>`})}const PATTERN=/\{\$([^}]+)}/g;/**
187 * @license
188 * Copyright 2017 Google LLC
189 *
190 * Licensed under the Apache License, Version 2.0 (the "License");
191 * you may not use this file except in compliance with the License.
192 * You may obtain a copy of the License at
193 *
194 *   http://www.apache.org/licenses/LICENSE-2.0
195 *
196 * Unless required by applicable law or agreed to in writing, software
197 * distributed under the License is distributed on an "AS IS" BASIS,
198 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199 * See the License for the specific language governing permissions and
200 * limitations under the License.
201 */function jsonEval(o){return JSON.parse(o)}function stringify(o){return JSON.stringify(o)}/**
202 * @license
203 * Copyright 2017 Google LLC
204 *
205 * Licensed under the Apache License, Version 2.0 (the "License");
206 * you may not use this file except in compliance with the License.
207 * You may obtain a copy of the License at
208 *
209 *   http://www.apache.org/licenses/LICENSE-2.0
210 *
211 * Unless required by applicable law or agreed to in writing, software
212 * distributed under the License is distributed on an "AS IS" BASIS,
213 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
214 * See the License for the specific language governing permissions and
215 * limitations under the License.
216 */const decode$1=function(o){let r={},a={},l={},c="";try{const u=o.split(".");r=jsonEval(base64Decode(u[0])||""),a=jsonEval(base64Decode(u[1])||""),c=u[2],l=a.d||{},delete a.d}catch{}return{header:r,claims:a,data:l,signature:c}},isValidFormat=function(o){const r=decode$1(o),a=r.claims;return!!a&&typeof a=="object"&&a.hasOwnProperty("iat")},isAdmin=function(o){const r=decode$1(o).claims;return typeof r=="object"&&r.admin===!0};/**
217 * @license
218 * Copyright 2017 Google LLC
219 *
220 * Licensed under the Apache License, Version 2.0 (the "License");
221 * you may not use this file except in compliance with the License.
222 * You may obtain a copy of the License at
223 *
224 *   http://www.apache.org/licenses/LICENSE-2.0
225 *
226 * Unless required by applicable law or agreed to in writing, software
227 * distributed under the License is distributed on an "AS IS" BASIS,
228 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
229 * See the License for the specific language governing permissions and
230 * limitations under the License.
231 */function contains(o,r){return Object.prototype.hasOwnProperty.call(o,r)}function safeGet(o,r){if(Object.prototype.hasOwnProperty.call(o,r))return o[r]}function isEmpty$1(o){for(const r in o)if(Object.prototype.hasOwnProperty.call(o,r))return!1;return!0}function map$1(o,r,a){const l={};for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&(l[c]=r.call(a,o[c],c,o));return l}function deepEqual(o,r){if(o===r)return!0;const a=Object.keys(o),l=Object.keys(r);for(const c of a){if(!l.includes(c))return!1;const u=o[c],d=r[c];if(isObject$1(u)&&isObject$1(d)){if(!deepEqual(u,d))return!1}else if(u!==d)return!1}for(const c of l)if(!a.includes(c))return!1;return!0}function isObject$1(o){return o!==null&&typeof o=="object"}/**
232 * @license
233 * Copyright 2017 Google LLC
234 *
235 * Licensed under the Apache License, Version 2.0 (the "License");
236 * you may not use this file except in compliance with the License.
237 * You may obtain a copy of the License at
238 *
239 *   http://www.apache.org/licenses/LICENSE-2.0
240 *
241 * Unless required by applicable law or agreed to in writing, software
242 * distributed under the License is distributed on an "AS IS" BASIS,
243 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
244 * See the License for the specific language governing permissions and
245 * limitations under the License.
246 */function querystring(o){const r=[];for(const[a,l]of Object.entries(o))Array.isArray(l)?l.forEach(c=>{r.push(encodeURIComponent(a)+"="+encodeURIComponent(c))}):r.push(encodeURIComponent(a)+"="+encodeURIComponent(l));return r.length?"&"+r.join("&"):""}/**
247 * @license
248 * Copyright 2017 Google LLC
249 *
250 * Licensed under the Apache License, Version 2.0 (the "License");
251 * you may not use this file except in compliance with the License.
252 * You may obtain a copy of the License at
253 *
254 *   http://www.apache.org/licenses/LICENSE-2.0
255 *
256 * Unless required by applicable law or agreed to in writing, software
257 * distributed under the License is distributed on an "AS IS" BASIS,
258 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
259 * See the License for the specific language governing permissions and
260 * limitations under the License.
261 */class Sha1{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=512/8,this.pad_[0]=128;for(let r=1;r<this.blockSize;++r)this.pad_[r]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(r,a){a||(a=0);const l=this.W_;if(typeof r=="string")for(let A=0;A<16;A++)l[A]=r.charCodeAt(a)<<24|r.charCodeAt(a+1)<<16|r.charCodeAt(a+2)<<8|r.charCodeAt(a+3),a+=4;else for(let A=0;A<16;A++)l[A]=r[a]<<24|r[a+1]<<16|r[a+2]<<8|r[a+3],a+=4;for(let A=16;A<80;A++){const P=l[A-3]^l[A-8]^l[A-14]^l[A-16];l[A]=(P<<1|P>>>31)&4294967295}let c=this.chain_[0],u=this.chain_[1],d=this.chain_[2],f=this.chain_[3],m=this.chain_[4],y,E;for(let A=0;A<80;A++){A<40?A<20?(y=f^u&(d^f),E=1518500249):(y=u^d^f,E=1859775393):A<60?(y=u&d|f&(u|d),E=2400959708):(y=u^d^f,E=3395469782);const P=(c<<5|c>>>27)+y+m+E+l[A]&4294967295;m=f,f=d,d=(u<<30|u>>>2)&4294967295,u=c,c=P}this.chain_[0]=this.chain_[0]+c&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+d&4294967295,this.chain_[3]=this.chain_[3]+f&4294967295,this.chain_[4]=this.chain_[4]+m&4294967295}update(r,a){if(r==null)return;a===void 0&&(a=r.length);const l=a-this.blockSize;let c=0;const u=this.buf_;let d=this.inbuf_;for(;c<a;){if(d===0)for(;c<=l;)this.compress_(r,c),c+=this.blockSize;if(typeof r=="string"){for(;c<a;)if(u[d]=r.charCodeAt(c),++d,++c,d===this.blockSize){this.compress_(u),d=0;break}}else for(;c<a;)if(u[d]=r[c],++d,++c,d===this.blockSize){this.compress_(u),d=0;break}}this.inbuf_=d,this.total_+=a}digest(){const r=[];let a=this.total_*8;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let c=this.blockSize-1;c>=56;c--)this.buf_[c]=a&255,a/=256;this.compress_(this.buf_);let l=0;for(let c=0;c<5;c++)for(let u=24;u>=0;u-=8)r[l]=this.chain_[c]>>u&255,++l;return r}}function createSubscribe(o,r){const a=new ObserverProxy(o,r);return a.subscribe.bind(a)}class ObserverProxy{constructor(r,a){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=a,this.task.then(()=>{r(this)}).catch(l=>{this.error(l)})}next(r){this.forEachObserver(a=>{a.next(r)})}error(r){this.forEachObserver(a=>{a.error(r)}),this.close(r)}complete(){this.forEachObserver(r=>{r.complete()}),this.close()}subscribe(r,a,l){let c;if(r===void 0&&a===void 0&&l===void 0)throw new Error("Missing Observer.");implementsAnyMethods(r,["next","error","complete"])?c=r:c={next:r,error:a,complete:l},c.next===void 0&&(c.next=noop$2),c.error===void 0&&(c.error=noop$2),c.complete===void 0&&(c.complete=noop$2);const u=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?c.error(this.finalError):c.complete()}catch{}}),this.observers.push(c),u}
261unsubscribeOne(r){this.observers===void 0||this.observers[r]===void 0||(delete this.observers[r],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(r){if(!this.finalized)for(let a=0;a<this.observers.length;a++)this.sendOne(a,r)}sendOne(r,a){this.task.then(()=>{if(this.observers!==void 0&&this.observers[r]!==void 0)try{a(this.observers[r])}catch(l){typeof console<"u"&&console.error&&console.error(l)}})}close(r){this.finalized||(this.finalized=!0,r!==void 0&&(this.finalError=r),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function implementsAnyMethods(o,r){if(typeof o!="object"||o===null)return!1;for(const a of r)if(a in o&&typeof o[a]=="function")return!0;return!1}function noop$2(){}function errorPrefix(o,r){return`${o} failed: ${r} argument `}/**
262 * @license
263 * Copyright 2017 Google LLC
264 *
265 * Licensed under the Apache License, Version 2.0 (the "License");
266 * you may not use this file except in compliance with the License.
267 * You may obtain a copy of the License at
268 *
269 *   http://www.apache.org/licenses/LICENSE-2.0
270 *
271 * Unless required by applicable law or agreed to in writing, software
272 * distributed under the License is distributed on an "AS IS" BASIS,
273 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
274 * See the License for the specific language governing permissions and
275 * limitations under the License.
276 */const stringToByteArray=function(o){const r=[];let a=0;for(let l=0;l<o.length;l++){let c=o.charCodeAt(l);if(c>=55296&&c<=56319){const u=c-55296;l++,assert(l<o.length,"Surrogate pair missing trail surrogate.");const d=o.charCodeAt(l)-56320;c=65536+(u<<10)+d}c<128?r[a++]=c:c<2048?(r[a++]=c>>6|192,r[a++]=c&63|128):c<65536?(r[a++]=c>>12|224,r[a++]=c>>6&63|128,r[a++]=c&63|128):(r[a++]=c>>18|240,r[a++]=c>>12&63|128,r[a++]=c>>6&63|128,r[a++]=c&63|128)}return r},stringLength=function(o){let r=0;for(let a=0;a<o.length;a++){const l=o.charCodeAt(a);l<128?r++:l<2048?r+=2:l>=55296&&l<=56319?(r+=4,a++):r+=3}return r};/**
277 * @license
278 * Copyright 2021 Google LLC
279 *
280 * Licensed under the Apache License, Version 2.0 (the "License");
281 * you may not use this file except in compliance with the License.
282 * You may obtain a copy of the License at
283 *
284 *   http://www.apache.org/licenses/LICENSE-2.0
285 *
286 * Unless required by applicable law or agreed to in writing, software
287 * distributed under the License is distributed on an "AS IS" BASIS,
288 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
289 * See the License for the specific language governing permissions and
290 * limitations under the License.
291 */function getModularInstance(o){return o&&o._delegate?o._delegate:o}class Component{constructor(r,a,l){this.name=r,this.instanceFactory=a,this.type=l,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(r){return this.instantiationMode=r,this}setMultipleInstances(r){return this.multipleInstances=r,this}setServiceProps(r){return this.serviceProps=r,this}setInstanceCreatedCallback(r){return this.onInstanceCreated=r,this}}/**
292 * @license
293 * Copyright 2019 Google LLC
294 *
295 * Licensed under the Apache License, Version 2.0 (the "License");
296 * you may not use this file except in compliance with the License.
297 * You may obtain a copy of the License at
298 *
299 *   http://www.apache.org/licenses/LICENSE-2.0
300 *
301 * Unless required by applicable law or agreed to in writing, software
302 * distributed under the License is distributed on an "AS IS" BASIS,
303 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
304 * See the License for the specific language governing permissions and
305 * limitations under the License.
306 */const DEFAULT_ENTRY_NAME$1="[DEFAULT]";/**
307 * @license
308 * Copyright 2019 Google LLC
309 *
310 * Licensed under the Apache License, Version 2.0 (the "License");
311 * you may not use this file except in compliance with the License.
312 * You may obtain a copy of the License at
313 *
314 *   http://www.apache.org/licenses/LICENSE-2.0
315 *
316 * Unless required by applicable law or agreed to in writing, softw
316are
317 * distributed under the License is distributed on an "AS IS" BASIS,
318 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
319 * See the License for the specific language governing permissions and
320 * limitations under the License.
321 */class Provider{constructor(r,a){this.name=r,this.container=a,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(r){const a=this.normalizeInstanceIdentifier(r);if(!this.instancesDeferred.has(a)){const l=new Deferred$1;if(this.instancesDeferred.set(a,l),this.isInitialized(a)||this.shouldAutoInitialize())try{const c=this.getOrInitializeService({instanceIdentifier:a});c&&l.resolve(c)}catch{}}return this.instancesDeferred.get(a).promise}getImmediate(r){var a;const l=this.normalizeInstanceIdentifier(r==null?void 0:r.identifier),c=(a=r==null?void 0:r.optional)!==null&&a!==void 0?a:!1;if(this.isInitialized(l)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:l})}catch(u){if(c)return null;throw u}else{if(c)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(r){if(r.name!==this.name)throw Error(`Mismatching Component ${r.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=r,!!this.shouldAutoInitialize()){if(isComponentEager(r))try{this.getOrInitializeService({instanceIdentifier:DEFAULT_ENTRY_NAME$1})}catch{}for(const[a,l]of this.instancesDeferred.entries()){const c=this.normalizeInstanceIdentifier(a);try{const u=this.getOrInitializeService({instanceIdentifier:c});l.resolve(u)}catch{}}}}clearInstance(r=DEFAULT_ENTRY_NAME$1){this.instancesDeferred.delete(r),this.instancesOptions.delete(r),this.instances.delete(r)}async delete(){const r=Array.from(this.instances.values());await Promise.all([...r.filter(a=>"INTERNAL"in a).map(a=>a.INTERNAL.delete()),...r.filter(a=>"_delete"in a).map(a=>a._delete())])}isComponentSet(){return this.component!=null}isInitialized(r=DEFAULT_ENTRY_NAME$1){return this.instances.has(r)}getOptions(r=DEFAULT_ENTRY_NAME$1){return this.instancesOptions.get(r)||{}}initialize(r={}){const{options:a={}}=r,l=this.normalizeInstanceIdentifier(r.instanceIdentifier);if(this.isInitialized(l))throw Error(`${this.name}(${l}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const c=this.getOrInitializeService({instanceIdentifier:l,options:a});for(const[u,d]of this.instancesDeferred.entries()){const f=this.normalizeInstanceIdentifier(u);l===f&&d.resolve(c)}return c}onInit(r,a){var l;const c=this.normalizeInstanceIdentifier(a),u=(l=this.onInitCallbacks.get(c))!==null&&l!==void 0?l:new Set;u.add(r),this.onInitCallbacks.set(c,u);const d=this.instances.get(c);return d&&r(d,c),()=>{u.delete(r)}}invokeOnInitCallbacks(r,a){const l=this.onInitCallbacks.get(a);if(l)for(const c of l)try{c(r,a)}catch{}}getOrInitializeService({instanceIdentifier:r,options:a={}}){let l=this.instances.get(r);if(!l&&this.component&&(l=this.component.instanceFactory(this.container,{instanceIdentifier:normalizeIdentifierForFactory(r),options:a}),this.instances.set(r,l),this.instancesOptions.set(r,a),this.invokeOnInitCallbacks(l,r),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,r,l)}catch{}return l||null}normalizeInstanceIdentifier(r=DEFAULT_ENTRY_NAME$1){return this.component?this.component.multipleInstances?r:DEFAULT_ENTRY_NAME$1:r}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function normalizeIdentifierForFactory(o){return o===DEFAULT_ENTRY_NAME$1?void 0:o}function isComponentEager(o){return o.instantiationMode==="EAGER"}/**
322 * @license
323 * Copyright 2019 Google LLC
324 *
325 * Licensed under the Apache License, Version 2.0 (the "License");
326 * you may not use this file except in compliance with the License.
327 * You may obtain a copy of the License at
328 *
329 *   http://www.apache.org/licenses/LICENSE-2.0
330 *
331 * Unless required by applicable law or agreed to in writing, softw
331are
332 * distributed under the License is distributed on an "AS IS" BASIS,
333 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
334 * See the License for the specific language governing permissions and
335 * limitations under the License.
336 */class ComponentContainer{constructor(r){this.name=r,this.providers=new Map}addComponent(r){const a=this.getProvider(r.name);if(a.isComponentSet())throw new Error(`Component ${r.name} has already been registered with ${this.name}`);a.setComponent(r)}addOrOverwriteComponent(r){this.getProvider(r.name).isComponentSet()&&this.providers.delete(r.name),this.addComponent(r)}getProvider(r){if(this.providers.has(r))return this.providers.get(r);const a=new Provider(r,this);return this.providers.set(r,a),a}getProviders(){return Array.from(this.providers.values())}}/**
337 * @license
338 * Copyright 2017 Google LLC
339 *
340 * Licensed under the Apache License, Version 2.0 (the "License");
341 * you may not use this file except in compliance with the License.
342 * You may obtain a copy of the License at
343 *
344 *   http://www.apache.org/licenses/LICENSE-2.0
345 *
346 * Unless required by applicable law or agreed to in writing, software
347 * distributed under the License is distributed on an "AS IS" BASIS,
348 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
349 * See the License for the specific language governing permissions and
350 * limitations under the License.
351 */var LogLevel;(function(o){o[o.DEBUG=0]="DEBUG",o[o.VERBOSE=1]="VERBOSE",o[o.INFO=2]="INFO",o[o.WARN=3]="WARN",o[o.ERROR=4]="ERROR",o[o.SILENT=5]="SILENT"})(LogLevel||(LogLevel={}));const levelStringToEnum={debug:LogLevel.DEBUG,verbose:LogLevel.VERBOSE,info:LogLevel.INFO,warn:LogLevel.WARN,error:LogLevel.ERROR,silent:LogLevel.SILENT},defaultLogLevel=LogLevel.INFO,ConsoleMethod={[LogLevel.DEBUG]:"log",[LogLevel.VERBOSE]:"log",[LogLevel.INFO]:"info",[LogLevel.WARN]:"warn",[LogLevel.ERROR]:"error"},defaultLogHandler=(o,r,...a)=>{if(r<o.logLevel)return;const l=new Date().toISOString(),c=ConsoleMethod[r];if(c)console[c](`[${l}]  ${o.name}:`,...a);else throw new Error(`Attempted to log a message with an invalid logType (value: ${r})`)};class Logger{constructor(r){this.name=r,this._logLevel=defaultLogLevel,this._logHandler=defaultLogHandler,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(r){if(!(r in LogLevel))throw new TypeError(`Invalid value "${r}" assigned to \`logLevel\``);this._logLevel=r}setLogLevel(r){this._logLevel=typeof r=="string"?levelStringToEnum[r]:r}get logHandler(){return this._logHandler}set logHandler(r){if(typeof r!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=r}get userLogHandler(){return this._userLogHandler}set userLogHandler(r){this._userLogHandler=r}debug(...r){this._userLogHandler&&this._userLogHandler(this,LogLevel.DEBUG,...r),this._logHandler(this,LogLevel.DEBUG,...r)}log(...r){this._userLogHandler&&this._userLogHandler(this,LogLevel.VERBOSE,...r),this._logHandler(this,LogLevel.VERBOSE,...r)}info(...r){this._userLogHandler&&this._userLogHandler(this,LogLevel.INFO,...r),this._logHandler(this,LogLevel.INFO,...r)}warn(...r){this._userLogHandler&&this._userLogHandler(this,LogLevel.WARN,...r),this._logHandler(this,LogLevel.WARN,...r)}error(...r){this._userLogHandler&&this._userLogHandler(this,LogLevel.ERROR,...r),this._logHandler(this,LogLevel.ERROR,...r)}}const instanceOfAny=(o,r)=>r.some(a=>o instanceof a);let idbProxyableTypes,cursorAdvanceMethods;function getIdbProxyableTypes(){return idbProxyableTypes||(idbProxyableTypes=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function getCursorAdvanceMethods(){return cursorAdvanceMethods||(cursorAdvanceMethods=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const cursorRequestMap=new WeakMap,transactionDoneMap=new WeakMap,transactionStoreNamesMap=new WeakMap,transformCache=new WeakMap,reverseTransformCache=new WeakMap;function promisifyRequest(o){const r=new Promise((a,l)=>{const c=()=>{o.removeEventListener("success",u),o.removeEventListener("error",d)},u=()=>{a(wrap(o.result)),c()},d=()=>{l(o.error),c()};o.addEventListener("success",u),o.addEventListener("error",d)});return r.then(a=>{a instanceof IDBCursor&&cursorRequestMap.set(a,o)}).catch(()=>{}),reverseTransformCache.set(r,o),r}
vendor: 4,126 bytes, lines 351-370
351function cacheDonePromiseForTransaction(o){if(transactionDoneMap.has(o))return;const r=new Promise((a,l)=>{const c=()=>{o.removeEventListener("complete",u),o.removeEventListener("error",d),o.removeEventListener("abort",d)},u=()=>{a(),c()},d=()=>{l(o.error||new DOMException("AbortError","AbortError")),c()};o.addEventListener("complete",u),o.addEventListener("error",d),o.addEventListener("abort",d)});transactionDoneMap.set(o,r)}let idbProxyTraps={get(o,r,a){if(o instanceof IDBTransaction){if(r==="done")return transactionDoneMap.get(o);if(r==="objectStoreNames")return o.objectStoreNames||transactionStoreNamesMap.get(o);if(r==="store")return a.objectStoreNames[1]?void 0:a.objectStore(a.objectStoreNames[0])}return wrap(o[r])},set(o,r,a){return o[r]=a,!0},has(o,r){return o instanceof IDBTransaction&&(r==="done"||r==="store")?!0:r in o}};function replaceTraps(o){idbProxyTraps=o(idbProxyTraps)}function wrapFunction(o){return o===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(r,...a){const l=o.call(unwrap(this),r,...a);return transactionStoreNamesMap.set(l,r.sort?r.sort():[r]),wrap(l)}:getCursorAdvanceMethods().includes(o)?function(...r){return o.apply(unwrap(this),r),wrap(cursorRequestMap.get(this))}:function(...r){return wrap(o.apply(unwrap(this),r))}}function transformCachableValue(o){return typeof o=="function"?wrapFunction(o):(o instanceof IDBTransaction&&cacheDonePromiseForTransaction(o),instanceOfAny(o,getIdbProxyableTypes())?new Proxy(o,idbProxyTraps):o)}function wrap(o){if(o instanceof IDBRequest)return promisifyRequest(o);if(transformCache.has(o))return transformCache.get(o);const r=transformCachableValue(o);return r!==o&&(transformCache.set(o,r),reverseTransformCache.set(r,o)),r}const unwrap=o=>reverseTransformCache.get(o);function openDB(o,r,{blocked:a,upgrade:l,blocking:c,terminated:u}={}){const d=indexedDB.open(o,r),f=wrap(d);return l&&d.addEventListener("upgradeneeded",m=>{l(wrap(d.result),m.oldVersion,m.newVersion,wrap(d.transaction),m)}),a&&d.addEventListener("blocked",m=>a(m.oldVersion,m.newVersion,m)),f.then(m=>{u&&m.addEventListener("close",()=>u()),c&&m.addEventListener("versionchange",y=>c(y.oldVersion,y.newVersion,y))}).catch(()=>{}),f}const readMethods=["get","getKey","getAll","getAllKeys","count"],writeMethods=["put","add","delete","clear"],cachedMethods=new Map;function getMethod(o,r){if(!(o instanceof IDBDatabase&&!(r in o)&&typeof r=="string"))return;if(cachedMethods.get(r))return cachedMethods.get(r);const a=r.replace(/FromIndex$/,""),l=r!==a,c=writeMethods.includes(a);if(!(a in(l?IDBIndex:IDBObjectStore).prototype)||!(c||readMethods.includes(a)))return;const u=async function(d,...f){const m=this.transaction(d,c?"readwrite":"readonly");let y=m.store;return l&&(y=y.index(f.shift())),(await Promise.all([y[a](...f),c&&m.done]))[0]};return cachedMethods.set(r,u),u}replaceTraps(o=>({...o,get:(r,a,l)=>getMethod(r,a)||o.get(r,a,l),has:(r,a)=>!!getMethod(r,a)||o.has(r,a)}));/**
352 * @license
353 * Copyright 2019 Google LLC
354 *
355 * Licensed under the Apache License, Version 2.0 (the "License");
356 * you may not use this file except in compliance with the License.
357 * You may obtain a copy of the License at
358 *
359 *   http://www.apache.org/licenses/LICENSE-2.0
360 *
361 * Unless required by applicable law or agreed to in writing, software
362 * distributed under the License is distributed on an "AS IS" BASIS,
363 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
364 * See the License for the specific language governing permissions and
365 * limitations under the License.
366 */class PlatformLoggerServiceImpl{constructor(r){this.container=r}getPlatformInfoString(){return this.container.getProviders().map(a=>{if(isVersionServiceProvider(a)){const l=a.getImmediate();return`${l.library}/${l.version}`}else return null}).filter(a=>a).join(" ")}}function isVersionServiceProvider(o){const r=o.getComponent();return(r==null?void 0:r.type)==="VERSION"}const name$q="@firebase/app",version$1$1="0.10.13";/**
367 * @license
368 * Copyright 2019 Google LLC
369 *
370 * Licensed under the Apache License, Version 2.0 (the "License");
371 * you may not use this file except in compliance with the License.
372 * You may obtain a copy of the License at
373 *
374 *   http://www.apache.org/licenses/LICENSE-2.0
375 *
376 * Unless required by applicable law or agreed to in writing, software
377 * distributed under the License is distributed on an "AS IS" BASIS,
378 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
379 * See the License for the specific language governing permissions and
380 * limitations under the License.
381 */const logger$1=new Logger("@firebase/app"),name$p="@firebase/app-compat",name$o="@firebase/analytics-compat",name$n="@firebase/analytics",name$m="@firebase/app-check-compat",name$l="@firebase/app-check",name$k="@firebase/auth",name$j="@firebase/auth-compat",name$i="@firebase/database",name$h="@firebase/data-connect",name$g="@firebase/database-compat",name$f="@firebase/functions",name$e="@firebase/functions-compat",name$d="@firebase/installations",name$c="@firebase/installations-compat",name$b="@firebase/messaging",name$a="@firebase/messaging-compat",name$9="@firebase/performance",name$8="@firebase/performance-compat",name$7="@firebase/remote-config",name$6="@firebase/remote-config-compat",name$5="@firebase/storage",name$4="@firebase/storage-compat",name$3$1="@firebase/firestore",name$2$1="@firebase/vertexai-preview",name$1$1="@firebase/firestore-compat",name$r="firebase",version$8="10.14.1";/**
382 * @license
383 * Copyright 2019 Google LLC
384 *
385 * Licensed under the Apache License, Version 2.0 (the "License");
386 * you may not use this file except in compliance with the License.
387 * You may obtain a copy of the License at
388 *
389 *   http://www.apache.org/licenses/LICENSE-2.0
390 *
391 * Unless required by applicable law or agreed to in writing, software
392 * distributed under the License is distributed on an "AS IS" BASIS,
393 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
394 * See the License for the specific language governing permissions and
395 * limitations under the License.
396 */const DEFAULT_ENTRY_NAME="[DEFAULT]",PLATFORM_LOG_STRING={[name$q]:"fire-core",[name$p]:"fire-core-compat",[name$n]:"fire-analytics",[name$o]:"fire-analytics-compat",[name$l]:"fire-app-check",[name$m]:"fire-app-check-compat",[name$k]:"fire-auth",[name$j]:"fire-auth-compat",[name$i]:"fire-rtdb",[name$h]:"fire-data-connect",[name$g]:"fire-rtdb-compat",[name$f]:"fire-fn",[name$e]:"fire-fn-compat",[name$d]:"fire-iid",[name$c]:"fire-iid-compat",[name$b]:"fire-fcm",[name$a]:"fire-fcm-compat",[name$9]:"fire-perf",[name$8]:"fire-perf-compat",[name$7]:"fire-rc",[name$6]:"fire-rc-compat",[name$5]:"fire-gcs",[name$4]:"fire-gcs-compat",[name$3$1]:"fire-fst",[name$1$1]:"fire-fst-compat",[name$2$1]:"fire-vertex","fire-js":"fire-js",[name$r]:"fire-js-all"};/**
397 * @license
398 * Copyright 2019 Google LLC
399 *
400 * Licensed under the Apache License, Version 2.0 (the "License");
401 * you may not use this file except in compliance with the License.
402 * You may obtain a copy of the License at
403 *
404 *   http://www.apache.org/licenses/LICENSE-2.0
405 *
406 * Unless required by applicable law or agreed to in writing, software
407 * distributed under the License is distributed on an "AS IS" BASIS,
408 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
409 * See the License for the specific language governing permissions and
410 * limitations under the License.
411 */const _apps=new Map,_serverApps=new Map,_components=new Map;function _addComponent(o,r){try{o.container.addComponent(r)}catch(a){logger$1.debug(`Component ${r.name} failed to register with FirebaseApp ${o.name}`,a)}}function _registerComponent(o){const r=o.name;if(_components.has(r))return logger$1.debug(`There were multiple attempts to register component ${r}.`),!1;_components.set(r,o);for(const a of _apps.values())_addComponent(a,o);for(const a of _serverApps.values())_addComponent(a,o);return!0}function _getProvider(o,r){const a=o.container.getProvider("heartbeat").getImmediate({optional:!0});return a&&a.triggerHeartbeat(),o.container.getProvider(r)}function _isFirebaseServerApp(o){return o.settings!==void 0}/**
412 * @license
413 * Copyright 2019 Google LLC
414 *
415 * Licensed under the Apache License, Version 2.0 (the "License");
416 * you may not use this file except in compliance with the License.
417 * You may obtain a copy of the License at
418 *
419 *   http://www.apache.org/licenses/LICENSE-2.0
420 *
421 * Unless required by applicable law or agreed to in writing, software
422 * distributed under the License is distributed on an "AS IS" BASIS,
423 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
424 * See the License for the specific language governing permissions and
425 * limitations under the License.
426 */const ERRORS={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
426d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},ERROR_FACTORY=new ErrorFactory("app","Firebase",ERRORS);/**
427 * @license
428 * Copyright 2019 Google LLC
429 *
430 * Licensed under the Apache License, Version 2.0 (the "License");
431 * you may not use this file except in compliance with the License.
432 * You may obtain a copy of the License at
433 *
434 *   http://www.apache.org/licenses/LICENSE-2.0
435 *
436 * Unless required by applicable law or agreed to in writing, software
437 * distributed under the License is distributed on an "AS IS" BASIS,
438 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
439 * See the License for the specific language governing permissions and
440 * limitations under the License.
441 */class FirebaseAppImpl{constructor(r,a,l){this._isDeleted=!1,this._options=Object.assign({},r),this._config=Object.assign({},a),this._name=a.name,this._automaticDataCollectionEnabled=a.automaticDataCollectionEnabled,this._container=l,this.container.addComponent(new Component("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(r){this.checkDestroyed(),this._automaticDataCollectionEnabled=r}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(r){this._isDeleted=r}checkDestroyed(){if(this.isDeleted)throw ERROR_FACTORY.create("app-deleted",{appName:this._name})}}/**
442 * @license
443 * Copyright 2019 Google LLC
444 *
445 * Licensed under the Apache License, Version 2.0 (the "License");
446 * you may not use this file except in compliance with the License.
447 * You may obtain a copy of the License at
448 *
449 *   http://www.apache.org/licenses/LICENSE-2.0
450 *
451 * Unless required by applicable law or agreed to in writing, software
452 * distributed under the License is distributed on an "AS IS" BASIS,
453 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
454 * See the License for the specific language governing permissions and
455 * limitations under the License.
456 */const SDK_VERSION$1=version$8;function initializeApp(o,r={}){let a=o;typeof r!="object"&&(r={name:r});const l=Object.assign({name:DEFAULT_ENTRY_NAME,automaticDataCollectionEnabled:!1},r),c=l.name;if(typeof c!="string"||!c)throw ERROR_FACTORY.create("bad-app-name",{appName:String(c)});if(a||(a=getDefaultAppConfig()),!a)throw ERROR_FACTORY.create("no-options");const u=_apps.get(c);if(u){if(deepEqual(a,u.options)&&deepEqual(l,u.config))return u;throw ERROR_FACTORY.create("duplicate-app",{appName:c})}const d=new ComponentContainer(c);for(const m of _components.values())d.addComponent(m);const f=new FirebaseAppImpl(a,l,d);return _apps.set(c,f),f}function getApp(o=DEFAULT_ENTRY_NAME){const r=_apps.get(o);if(!r&&o===DEFAULT_ENTRY_NAME&&getDefaultAppConfig())return initializeApp();if(!r)throw ERROR_FACTORY.create("no-app",{appName:o});return r}function registerVersion(o,r,a){var l;let c=(l=PLATFORM_LOG_STRING[o])!==null&&l!==void 0?l:o;a&&(c+=`-${a}`);const u=c.match(/\s|\//),d=r.match(/\s|\//);if(u||d){const f=[`Unable to register library "${c}" with version "${r}":`];u&&f.push(`library name "${c}" contains illegal characters (whitespace or "/")`),u&&d&&f.push("and"),d&&f.push(`version name "${r}" contains illegal characters (whitespace or "/")`),logger$1.warn(f.join(" "));return}_registerComponent(new Component(`${c}-version`,()=>({library:c,version:r}),"VERSION"))}/**
457 * @license
458 * Copyright 2021 Google LLC
459 *
460 * Licensed under the Apache License, Version 2.0 (the "License");
461 * you may not use this file except in compliance with the License.
462 * You may obtain a copy of the License at
463 *
464 *   http://www.apache.org/licenses/LICENSE-2.0
465 *
466 * Unless required by applicable law or agreed to in writing, software
467 * distributed under the License is distributed on an "AS IS" BASIS,
468 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
469 * See the License for the specific language governing permissions and
470 * limitations under the License.
471 */const DB_NAME$1="firebase-heartbeat-database",DB_VERSION$1=1,STORE_NAME="firebase-heartbeat-store";let dbPromise=null;function getDbPromise(){return dbPromise||(dbPromise=openDB(DB_NAME$1,DB_VERSION$1,{upgrade:(o,r)=>{switch(r){case 0:try{o.createObjectStore(STORE_NAME)}catch(a){console.warn(a)}}}}).catch(o=>{throw ERROR_FACTORY.create("idb-open",{originalErrorMessage:o.message})})),dbPromise}async function readHeartbeatsFromIndexedDB(o){try{const a=(await getDbPromise()).transaction(STORE_NAME),l=await a.objectStore(STORE_NAME).get(computeKey(o));return await a.done,l}catch(r){if(r instanceof FirebaseError)logger$1.warn(r.message);else{const a=ERROR_FACTORY.create("idb-get",{originalErrorMessage:r==null?void 0:r.message});logger$1.warn(a.message)}}}async function writeHeartbeatsToIndexedDB(o,r){try{const l=(await getDbPromise()).transaction(STORE_NAME,"readwrite");await l.objectStore(STORE_NAME).put(r,computeKey(o)),await l.done}catch(a){if(a instanceof FirebaseError)logger$1.warn(a.message);else{const l=ERROR_FACTORY.create("idb-set",{originalErrorMessage:a==null?void 0:a.message});logger$1.warn(l.message)}}}function computeKey(o){return`${o.name}!${o.options.appId}`}/**
472 * @license
473 * Copyright 2021 Google LLC
474 *
475 * Licensed under the Apache License, Version 2.0 (the "License");
476 * you may not use this file except in compliance with the License.
477 * You may obtain a copy of the License at
478 *
479 *   http://www.apache.org/licenses/LICENSE-2.0
480 *
481 * Unless required by applicable law or agreed to in writing, software
482 * distributed under the License is distributed on an "AS IS" BASIS,
483 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
484 * See the License for the specific language governing permissions and
485 * limitations under the License.
486 */const MAX_HEADER_BYTES=1024,STORED_HEARTBEAT_RETENTION_MAX_MILLIS=30*24*60*60*1e3;class HeartbeatServiceImpl{constructor(r){this.container=r,this._heartbeatsCache=null;const a=this.container.getProvider("app").getImmediate();this._storage=new HeartbeatStorageImpl(a),this._heartbeatsCachePromise=this._storage.read().then(l=>(this._heartbeatsCache=l,l))}async triggerHeartbeat(){var r,a;try{const c=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),u=getUTCDateString();return((r=this._heartbeatsCache)===null||r===void 0?void 0:r.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((a=this._heartbeatsCache)===null||a===void 0?void 0:a.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===u||this._heartbeatsCache.heartbeats.some(d=>d.date===u)?void 0:(this._heartbeatsCache.heartbeats.push({date:u,agent:c}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(d=>{const f=new Date(d.date).valueOf();return Date.now()-f<=STORED_HEARTBEAT_RETENTION_MAX_MILLIS}),this._storage.overwrite(this._heartbeatsCache))}catch(l){logger$1.warn(l)}}async getHeartbeatsHeader(){var r;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((r=this._heartbeatsCache)===null||r===void 0?void 0:r.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const a=getUTCDateString(),{heartbeatsToSend:l,unsentEntries:c}=extractHeartbeatsForHeader(this._heartbeatsCache.heartbeats),u=base64urlEncodeWithoutPadding(JSON.stringify({version:2,heartbeats:l}));return this._heartbeatsCache.lastSentHeartbeatDate=a,c.length>0?(this._heartbeatsCache.heartbeats=c,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),u}catch(a){return logger$1.warn(a),""}}}function getUTCDateString(){return new Date().toISOString().substring(0,10)}function extractHeartbeatsForHeader(o,r=MAX_HEADER_BYTES){const a=[];let l=o.slice();for(const c of o){const u=a.find(d=>d.agent===c.agent);if(u){if(u.dates.push(c.date),countBytes(a)>r){u.dates.pop();break}}else if(a.push({agent:c.agent,dates:[c.date]}),countBytes(a)>r){a.pop();break}l=l.slice(1)}return{heartbeatsToSend:a,unsentEntries:l}}class HeartbeatStorageImpl{constructor(r){this.app=r,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return isIndexedDBAvailable()?validateIndexedDBOpenable().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const a=await readHeartbeatsFromIndexedDB(this.app);return a!=null&&a.heartbeats?a:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(r){var a;if(await this._canUseIndexedDBPromise){const c=await this.read();return writeHeartbeatsToIndexedDB(this.app,{lastSentHeartbeatDate:(a=r.lastSentHeartbeatDate)!==null&&a!==void 0?a:c.lastSentHeartbeatDate,heartbeats:r.heartbeats})}else return}async add(r){var a;if(await this._canUseIndexedDBPromise){const c=await this.read();return writeHeartbeatsToIndexedDB(this.app,{lastSentHeartbeatDate:(a=r.lastSentHeartbeatDate)!==null&&a!==void 0?a:c.lastSentHeartbeatDate,heartbeats:[...c.heartbeats,...r.heartbeats]})}else return}}function countBytes(o){return base64urlEncodeWithoutPadding(JSON.stringify({version:2,heartbeats:o})).length}/**
487 * @license
488 * Copyright 2019 Google LLC
489 *
490 * Licensed under the Apache License, Version 2.0 (the "License");
491 * you may not use this file except in compliance with the License.
492 * You may obtain a copy of the License at
493 *
494 *   http://www.apache.org/licenses/LICENSE-2.0
495 *
496 * Unless required by applicable law or agreed to in writing, software
497 * distributed under the License is distributed on an "AS IS" BASIS,
498 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
499 * See the License for the specific language governing permissions and
500 * limitations under the License.
501 */function registerCoreComponents(o){_registerComponent(new Component("platform-logger",r=>new PlatformLoggerServiceImpl(r),"PRIVATE")),_registerComponent(new Component("heartbeat",r=>new HeartbeatServiceImpl(r),"PRIVATE")),registerVersion(name$q,version$1$1,o),registerVersion(name$q,version$1$1,"esm2017"),registerVersion("fire-js","")}registerCoreComponents("");var name$3="firebase",version$7="10.14.1";/**
502 * @license
503 * Copyright 2020 Google LLC
504 *
505 * Licensed under the Apache License, Version 2.0 (the "License");
506 * you may not use this file except in compliance with the License.
507 * You may obtain a copy of the License at
508 *
509 *   http://www.apache.org/licenses/LICENSE-2.0
510 *
511 * Unless required by applicable law or agreed to in writing, software
512 * distributed under the License is distributed on an "AS IS" BASIS,
513 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
514 * See the License for the specific language governing permissions and
515 * limitations under the License.
516 */registerVersion(name$3,version$7,"app");function __rest(o,r){var a={};for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&r.indexOf(l)<0&&(a[l]=o[l]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(o);c<l.length;c++)r.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(o,l[c])&&(a[l[c]]=o[l[c]]);return a}function __awaiter(o,r,a,l){function c(u){return u instanceof a?u:new a(function(d){d(u)})}return new(a||(a=Promise))(function(u,d){function f(E){try{y(l.next(E))}catch(A){d(A)}}function m(E){try{y(l.throw(E))}catch(A){d(A)}}function y(E){E.done?u(E.value):c(E.value).then(f,m)}y((l=l.apply(o,r||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function _prodErrorMap(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const prodErrorMap=_prodErrorMap,_DEFAULT_AUTH_ERROR_FACTORY=new ErrorFactory("auth","Firebase",_prodErrorMap());/**
517 * @license
518 * Copyright 2020 Google LLC
519 *
520 * Licensed under the Apache License, Version 2.0 (the "License");
521 * you may not use this file except in compliance with the License.
522 * You may obtain a copy of the License at
523 *
524 *   http://www.apache.org/licenses/LICENSE-2.0
525 *
526 * Unless required by applicable law or agreed to in writing, software
527 * distributed under the License is distributed on an "AS IS" BASIS,
528 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
529 * See the License for the specific language governing permissions and
530 * limitations under the License.
531 */const logClient$1=new Logger("@firebase/auth");function _logWarn(o,...r){logClient$1.logLevel<=LogLevel.WARN&&logClient$1.warn(`Auth (${SDK_VERSION$1}): ${o}`,...r)}function _logError(o,...r){logClient$1.logLevel<=LogLevel.ERROR&&logClient$1.error(`Auth (${SDK_VERSION$1}): ${o}`,...r)}/**
532 * @license
533 * Copyright 2020 Google LLC
534 *
535 * Licensed under the Apache License, Version 2.0 (the "License");
536 * you may not use this file except in compliance with the License.
537 * You may obtain a copy of the License at
538 *
539 *   http://www.apache.org/licenses/LICENSE-2.0
540 *
541 * Unless required by applicable law or agreed to in writing, software
542 * distributed under the License is distributed on an "AS IS" BASIS,
543 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
544 * See the License for the specific language governing permissions and
545 * limitations under the License.
546 */function _fail(o,...r){throw createErrorInternal(o,...r)}function _createError(o,...r){return createErrorInternal(o,...r)}function _errorWithCustomMessage(o,r,a){const l=Object.assign(Object.assign({},prodErrorMap()),{[r]:a});return new ErrorFactory("auth","Firebase",l).create(r,{appName:o.name})}function _serverAppCurrentUserOperationNotSupportedError(o){return _errorWithCustomMessage(o,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function createErrorInternal(o,...r){if(typeof o!="string"){const a=r[0],l=[...r.slice(1)];return l[0]&&(l[0].appName=o.name),o._errorFactory.create(a,...l)}return _DEFAULT_AUTH_ERROR_FACTORY.create(o,...r)}function _assert(o,r,...a){if(!o)throw createErrorInternal(r,...a)}
546function debugFail(o){const r="INTERNAL ASSERTION FAILED: "+o;throw _logError(r),new Error(r)}function debugAssert(o,r){o||debugFail(r)}/**
547 * @license
548 * Copyright 2020 Google LLC
549 *
550 * Licensed under the Apache License, Version 2.0 (the "License");
551 * you may not use this file except in compliance with the License.
552 * You may obtain a copy of the License at
553 *
554 *   http://www.apache.org/licenses/LICENSE-2.0
555 *
556 * Unless required by applicable law or agreed to in writing, software
557 * distributed under the License is distributed on an "AS IS" BASIS,
558 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
559 * See the License for the specific language governing permissions and
560 * limitations under the License.
561 */function _getCurrentUrl(){var o;return typeof self<"u"&&((o=self.location)===null||o===void 0?void 0:o.href)||""}function _isHttpOrHttps(){return _getCurrentScheme()==="http:"||_getCurrentScheme()==="https:"}function _getCurrentScheme(){var o;return typeof self<"u"&&((o=self.location)===null||o===void 0?void 0:o.protocol)||null}/**
562 * @license
563 * Copyright 2020 Google LLC
564 *
565 * Licensed under the Apache License, Version 2.0 (the "License");
566 * you may not use this file except in compliance with the License.
567 * You may obtain a copy of the License at
568 *
569 *   http://www.apache.org/licenses/LICENSE-2.0
570 *
571 * Unless required by applicable law or agreed to in writing, software
572 * distributed under the License is distributed on an "AS IS" BASIS,
573 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
574 * See the License for the specific language governing permissions and
575 * limitations under the License.
576 */function _isOnline(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(_isHttpOrHttps()||isBrowserExtension()||"connection"in navigator)?navigator.onLine:!0}function _getUserLanguage(){if(typeof navigator>"u")return null;const o=navigator;return o.languages&&o.languages[0]||o.language||null}/**
577 * @license
578 * Copyright 2020 Google LLC
579 *
580 * Licensed under the Apache License, Version 2.0 (the "License");
581 * you may not use this file except in compliance with the License.
582 * You may obtain a copy of the License at
583 *
584 *   http://www.apache.org/licenses/LICENSE-2.0
585 *
586 * Unless required by applicable law or agreed to in writing, software
587 * distributed under the License is distributed on an "AS IS" BASIS,
588 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
589 * See the License for the specific language governing permissions and
590 * limitations under the License.
591 */class Delay{constructor(r,a){this.shortDelay=r,this.longDelay=a,debugAssert(a>r,"Short delay should be less than long delay!"),this.isMobile=isMobileCordova()||isReactNative()}get(){return _isOnline()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
592 * @license
593 * Copyright 2020 Google LLC
594 *
595 * Licensed under the Apache License, Version 2.0 (the "License");
596 * you may not use this file except in compliance with the License.
597 * You may obtain a copy of the License at
598 *
599 *   http://www.apache.org/licenses/LICENSE-2.0
600 *
601 * Unless required by applicable law or agreed to in writing, software
602 * distributed under the License is distributed on an "AS IS" BASIS,
603 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
604 * See the License for the specific language governing permissions and
605 * limitations under the License.
606 */function _emulatorUrl(o,r){debugAssert(o.emulator,"Emulator should always be set here");const{url:a}=o.emulator;return r?`${a}${r.startsWith("/")?r.slice(1):r}`:a}/**
607 * @license
608 * Copyright 2020 Google LLC
609 *
610 * Licensed under the Apache License, Version 2.0 (the "License");
611 * you may not use this file except in compliance with the License.
612 * You may obtain a copy of the License at
613 *
614 *   http://www.apache.org/licenses/LICENSE-2.0
615 *
616 * Unless required by applicable law or agreed to in writing, software
617 * distributed under the License is distributed on an "AS IS" BASIS,
618 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
619 * See the License for the specific language governing permissions and
620 * limitations under the License.
621 */class FetchProvider{static initialize(r,a,l){this.fetchImpl=r,a&&(this.headersImpl=a),l&&(this.responseImpl=l)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;debugFail("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;debugFail("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;debugFail("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
622 * @license
623 * Copyright 2020 Google LLC
624 *
625 * Licensed under the Apache License, Version 2.0 (the "License");
626 * you may not use this file except in compliance with the License.
627 * You may obtain a copy of the License at
628 *
629 *   http://www.apache.org/licenses/LICENSE-2.0
630 *
631 * Unless required by applicable law or agreed to in writing, software
632 * distributed under the License is distributed on an "AS IS" BASIS,
633 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
634 * See the License for the specific language governing permissions and
635 * limitations under the License.
636 */const SERVER_ERROR_MAP={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/**
637 * @license
638 * Copyright 2020 Google LLC
639 *
640 * Licensed under the Apache License, Version 2.0 (the "License");
641 * you may not use this file except in compliance with the License.
642 * You may obtain a copy of the License at
643 *
644 *   http://www.apache.org/licenses/LICENSE-2.0
645 *
646 * Unless required by applicable law or agreed to in writing, software
647 * distributed under the License is distributed on an "AS IS" BASIS,
648 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
649 * See the License for the specific language governing permissions and
650 * limitations under the License.
651 */const DEFAULT_API_TIMEOUT_MS=new Delay(3e4,6e4);function _addTidIfNecessary(o,r){return o.tenantId&&!r.tenantId?Object.assign(Object.assign({},r),{tenantId:o.tenantId}):r}async function _performApiRequest(o,r,a,l,c={}){return _performFetchWithErrorHandling(o,c,async()=>{let u={},d={};l&&(r==="GET"?d=l:u={body:JSON.stringify(l)});const f=querystring(Object.assign({key:o.config.apiKey},d)).slice(1),m=await o._getAdditionalHeaders();m["Content-Type"]="application/json",o.languageCode&&(m["X-Firebase-Locale"]=o.languageCode);const y=Object.assign({method:r,headers:m},u);return isCloudflareWorker()||(y.referrerPolicy="no-referrer"),FetchProvider.fetch()(_getFinalTarget(o,o.config.apiHost,a,f),y)})}async function _performFetchWithErrorHandling(o,r,a){o._canInitEmulator=!1;const l=Object.assign(Object.assign({},SERVER_ERROR_MAP),r);try{const c=new NetworkTimeout(o),u=await Promise.race([a(),c.promise]);c.clearNetworkTimeout();const d=await u.json();if("needConfirmation"in d)throw _makeTaggedError(o,"account-exists-with-different-credential",d);if(u.ok&&!("errorMessage"in d))return d;{const f=u.ok?d.errorMessage:d.error.message,[m,y]=f.split(" : ");if(m==="FEDERATED_USER_ID_ALREADY_LINKED")throw _makeTaggedError(o,"credential-already-in-use",d);if(m==="EMAIL_EXISTS")throw _makeTaggedError(o,"email-already-in-use",d);if(m==="USER_DISABLED")throw _makeTaggedError(o,"user-disabled",d);const E=l[m]||m.toLowerCase().replace(/[_\s]+/g,"-");if(y)throw _errorWithCustomMessage(o,E,y);_fail(o,E)}}catch(c){if(c instanceof FirebaseError)throw c;_fail(o,"network-request-failed",{message:String(c)})}}async function _performSignInRequest(o,r,a,l,c={}){const u=await _performApiRequest(o,r,a,l,c);return"mfaPendingCredential"in u&&_fail(o,"multi-factor-auth-required",{_serverResponse:u}),u}function _getFinalTarget(o,r,a,l){const c=`${r}${a}?${l}`;return o.config.emulator?_emulatorUrl(o.config,c):`${o.config.apiScheme}://${c}`}class NetworkTimeout{constructor(r){this.auth=r,this.timer=null,this.promise=new Promise((a,l)=>{this.timer=setTimeout(()=>l(_createError(this.auth,"network-request-failed")),DEFAULT_API_TIMEOUT_MS.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function _makeTaggedError(o,r,a){const l={appName:o.name};a.email&&(l.email=a.email),a.phoneNumber&&(l.phoneNumber=a.phoneNumber);const c=_createError(o,r,l);return c.customData._tokenResponse=a,c}/**
652 * @license
653 * Copyright 2020 Google LLC
654 *
655 * Licensed under the Apache License, Version 2.0 (the "License");
656 * you may not use this file except in compliance with the License.
657 * You may obtain a copy of the License at
658 *
659 *   http://www.apache.org/licenses/LICENSE-2.0
660 *
661 * Unless required by applicable law or agreed to in writing, software
662 * distributed under the License is distributed on an "AS IS" BASIS,
663 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
664 * See the License for the specific language governing permissions and
665 * limitations under the License.
666 */async function deleteAccount(o,r){return _performApiRequest(o,"POST","/v1/accounts:delete",r)}async function getAccountInfo(o,r){return _performApiRequest(o,"POST","/v1/accounts:lookup",r)}/**
667 * @license
668 * Copyright 2020 Google LLC
669 *
670 * Licensed under the Apache License, Version 2.0 (the "License");
671 * you may not use this file except in compliance with the License.
672 * You may obtain a copy of the License at
673 *
674 *   http://www.apache.org/licenses/LICENSE-2.0
675 *
676 * Unless required by applicable law or agreed to in writing, software
677 * distributed under the License is distributed on an "AS IS" BASIS,
678 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
679 * See the License for the specific language governing permissions and
680 * limitations under the License.
681 */function utcTimestampToDateString(o){if(o)try{const r=new Date(Number(o));if(!isNaN(r.getTime()))return r.toUTCString()}catch{}}async function getIdTokenResult(o,r=!1){const a=getModularInstance(o),l=await a.getIdToken(r),c=_parseToken(l);_assert(c&&c.exp&&c.auth_time&&c.iat,a.auth,"internal-error");const u=typeof c.firebase=="object"?c.firebase:void 0,d=u==null?void 0:u.sign_in_provider;return{claims:c,token:l,authTime:utcTimestampToDateString(secondsStringToMilliseconds(c.auth_time)),issuedAtTime:utcTimestampToDateString(secondsStringToMilliseconds(c.iat)),expirationTime:utcTimestampToDateString(secondsStringToMilliseconds(c.exp)),signInProvider:d||null,signInSecondFactor:(u==null?void 0:u.sign_in_second_factor)||null}}function secondsStringToMilliseconds(o){return Number(o)*1e3}function _parseToken(o){const[r,a,l]=o.split(".");if(r===void 0||a===void 0||l===void 0)return _logError("JWT malformed, contained fewer than 3 sections"),null;try{const c=base64Decode(a);return c?JSON.parse(c):(_logError("Failed to decode base64 JWT payload"),null)}catch(c){return _logError("Caught error parsing JWT payload as JSON",c==null?void 0:c.toString()),null}}function _tokenExpiresIn(o){const r=_parseToken(o);return _assert(r,"internal-error"),_assert(typeof r.exp<"u","internal-error"),_assert(typeof r.iat<"u","internal-error"),Number(r.exp)-Number(r.iat)}
681/**
682 * @license
683 * Copyright 2020 Google LLC
684 *
685 * Licensed under the Apache License, Version 2.0 (the "License");
686 * you may not use this file except in compliance with the License.
687 * You may obtain a copy of the License at
688 *
689 *   http://www.apache.org/licenses/LICENSE-2.0
690 *
691 * Unless required by applicable law or agreed to in writing, software
692 * distributed under the License is distributed on an "AS IS" BASIS,
693 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
694 * See the License for the specific language governing permissions and
695 * limitations under the License.
696 */async function _logoutIfInvalidated(o,r,a=!1){if(a)return r;try{return await r}catch(l){throw l instanceof FirebaseError&&isUserInvalidated(l)&&o.auth.currentUser===o&&await o.auth.signOut(),l}}function isUserInvalidated({code:o}){return o==="auth/user-disabled"||o==="auth/user-token-expired"}/**
697 * @license
698 * Copyright 2020 Google LLC
699 *
700 * Licensed under the Apache License, Version 2.0 (the "License");
701 * you may not use this file except in compliance with the License.
702 * You may obtain a copy of the License at
703 *
704 *   http://www.apache.org/licenses/LICENSE-2.0
705 *
706 * Unless required by applicable law or agreed to in writing, software
707 * distributed under the License is distributed on an "AS IS" BASIS,
708 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
709 * See the License for the specific language governing permissions and
710 * limitations under the License.
711 */class ProactiveRefresh{constructor(r){this.user=r,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(r){var a;if(r){const l=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),l}else{this.errorBackoff=3e4;const c=((a=this.user.stsTokenManager.expirationTime)!==null&&a!==void 0?a:0)-Date.now()-3e5;return Math.max(0,c)}}schedule(r=!1){if(!this.isRunning)return;const a=this.getInterval(r);this.timerId=setTimeout(async()=>{await this.iteration()},a)}async iteration(){try{await this.user.getIdToken(!0)}catch(r){(r==null?void 0:r.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
712 * @license
713 * Copyright 2020 Google LLC
714 *
715 * Licensed under the Apache License, Version 2.0 (the "License");
716 * you may not use this file except in compliance with the License.
717 * You may obtain a copy of the License at
718 *
719 *   http://www.apache.org/licenses/LICENSE-2.0
720 *
721 * Unless required by applicable law or agreed to in writing, software
722 * distributed under the License is distributed on an "AS IS" BASIS,
723 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
724 * See the License for the specific language governing permissions and
725 * limitations under the License.
726 */class UserMetadata{constructor(r,a){this.createdAt=r,this.lastLoginAt=a,this._initializeTime()}_initializeTime(){this.lastSignInTime=utcTimestampToDateString(this.lastLoginAt),this.creationTime=utcTimestampToDateString(this.createdAt)}_copy(r){this.createdAt=r.createdAt,this.lastLoginAt=r.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
727 * @license
728 * Copyright 2019 Google LLC
729 *
730 * Licensed under the Apache License, Version 2.0 (the "License");
731 * you may not use this file except in compliance with the License.
732 * You may obtain a copy of the License at
733 *
734 *   http://www.apache.org/licenses/LICENSE-2.0
735 *
736 * Unless required by applicable law or agreed to in writing, software
737 * distributed under the License is distributed on an "AS IS" BASIS,
738 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
739 * See the License for the specific language governing permissions and
740 * limitations under the License.
741 */async function _reloadWithoutSaving(o){var r;const a=o.auth,l=await o.getIdToken(),c=await _logoutIfInvalidated(o,getAccountInfo(a,{idToken:l}));_assert(c==null?void 0:c.users.length,a,"internal-error");const u=c.users[0];o._notifyReloadListener(u);const d=!((r=u.providerUserInfo)===null||r===void 0)&&r.length?extractProviderData(u.providerUserInfo):[],f=mergeProviderData(o.providerData,d),m=o.isAnonymous,y=!(o.email&&u.passwordHash)&&!(f!=null&&f.length),E=m?y:!1,A={uid:u.localId,displayName:u.dis
741playName||null,photoURL:u.photoUrl||null,email:u.email||null,emailVerified:u.emailVerified||!1,phoneNumber:u.phoneNumber||null,tenantId:u.tenantId||null,providerData:f,metadata:new UserMetadata(u.createdAt,u.lastLoginAt),isAnonymous:E};Object.assign(o,A)}async function reload(o){const r=getModularInstance(o);await _reloadWithoutSaving(r),await r.auth._persistUserIfCurrent(r),r.auth._notifyListenersIfCurrent(r)}function mergeProviderData(o,r){return[...o.filter(l=>!r.some(c=>c.providerId===l.providerId)),...r]}function extractProviderData(o){return o.map(r=>{var{providerId:a}=r,l=__rest(r,["providerId"]);return{providerId:a,uid:l.rawId||"",displayName:l.displayName||null,email:l.email||null,phoneNumber:l.phoneNumber||null,photoURL:l.photoUrl||null}})}/**
742 * @license
743 * Copyright 2020 Google LLC
744 *
745 * Licensed under the Apache License, Version 2.0 (the "License");
746 * you may not use this file except in compliance with the License.
747 * You may obtain a copy of the License at
748 *
749 *   http://www.apache.org/licenses/LICENSE-2.0
750 *
751 * Unless required by applicable law or agreed to in writing, software
752 * distributed under the License is distributed on an "AS IS" BASIS,
753 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
754 * See the License for the specific language governing permissions and
755 * limitations under the License.
756 */async function requestStsToken(o,r){const a=await _performFetchWithErrorHandling(o,{},async()=>{const l=querystring({grant_type:"refresh_token",refresh_token:r}).slice(1),{tokenApiHost:c,apiKey:u}=o.config,d=_getFinalTarget(o,c,"/v1/token",`key=${u}`),f=await o._getAdditionalHeaders();return f["Content-Type"]="application/x-www-form-urlencoded",FetchProvider.fetch()(d,{method:"POST",headers:f,body:l})});return{accessToken:a.access_token,expiresIn:a.expires_in,refreshToken:a.refresh_token}}async function revokeToken(o,r){return _performApiRequest(o,"POST","/v2/accounts:revokeToken",_addTidIfNecessary(o,r))}/**
757 * @license
758 * Copyright 2020 Google LLC
759 *
760 * Licensed under the Apache License, Version 2.0 (the "License");
761 * you may not use this file except in compliance with the License.
762 * You may obtain a copy of the License at
763 *
764 *   http://www.apache.org/licenses/LICENSE-2.0
765 *
766 * Unless required by applicable law or agreed to in writing, software
767 * distributed under the License is distributed on an "AS IS" BASIS,
768 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
769 * See the License for the specific language governing permissions and
770 * limitations under the License.
771 */class StsTokenManager{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(r){_assert(r.idToken,"internal-error"),_assert(typeof r.idToken<"u","internal-error"),_assert(typeof r.refreshToken<"u","internal-error");const a="expiresIn"in r&&typeof r.expiresIn<"u"?Number(r.expiresIn):_tokenExpiresIn(r.idToken);this.updateTokensAndExpiration(r.idToken,r.refreshToken,a)}updateFromIdToken(r){_assert(r.length!==0,"internal-error");const a=_tokenExpiresIn(r);this.updateTokensAndExpiration(r,null,a)}async getToken(r,a=!1){return!a&&this.accessToken&&!this.isExpired?this.accessToken:(_assert(this.refreshToken,r,"user-token-expired"),this.refreshToken?(await this.refresh(r,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(r,a){const{accessToken:l,refreshToken:c,expiresIn:u}=await requestStsToken(r,a);this.updateTokensAndExpiration(l,c,Number(u))}updateTokensAndExpiration(r,a,l){this.refreshToken=a||null,this.accessToken=r||null,this.expirationTime=Date.now()+l*1e3}static fromJSON(r,a){const{refreshToken:l,accessToken:c,expirationTime:u}=a,d=new StsTokenManager;return l&&(_assert(typeof l=="string","internal-error",{appName:r}),d.refreshToken=l),c&&(_assert(typeof c=="string","internal-error",{appName:r}),d.accessToken=c),u&&(_assert(typeof u=="number","internal-error",{appName:r}),d.expirationTime=u),d}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(r){this.accessToken=r.accessToken,this.refreshToken=r.refreshToken,this.expirationTime=r.expirationTime}_clone(){return Object.assign(new StsTokenManager,this.toJSON())}_performRefresh(){return debugFail("not implemented")}}/**
772 * @license
773 * Copyright 2020 Google LLC
774 *
775 * Licensed under the Apache License, Version 2.0 (the "License");
776 * you may not use this file except in compliance with the License.
777 * You may obtain a copy of the License at
778 *
779 *   http://www.apache.org/licenses/LICENSE-2.0
780 *
781 * Unless required by applicable law or agreed to in writing, software
782 * distributed under the License is distributed on an "AS IS" BASIS,
783 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
784 * See the License for the specific language governing permissions and
785 * limitations under the License.
786 */function assertStringOrUndefined(o,r){_assert(typeof o=="string"||typeof o>"u","internal-error",{appName:r})}class UserImpl{constructor(r){var{uid:a,auth:l,stsTokenManager:c}=r,u=__rest(r,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new ProactiveRefresh(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=a,this.auth=l,this.stsTokenManager=c,this.accessToken=c.accessToken,this.displayName=u.displayName||null,this.email=u.email||null,this.emailVerified=u.emailVerified||!1,this.phoneNumber=u.phoneNumber||null,this.photoURL=u.photoURL||null,this.isAnonymous=u.isAnonymous||!1,this.tenantId=u.tenantId||null,this.providerData=u.providerData?[...u.providerData]:[],this.metadata=new UserMetadata(u.createdAt||void 0,u.lastLoginAt||void 0)}async getIdToken(r){const a=await _logoutIfInvalidated(this,this.stsTokenManager.getToken(this.auth,r));return _assert(a,this.auth,"internal-error"),this.accessToken!==a&&(this.accessToken=a,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),a}getIdTokenResult(r){return getIdTokenResult(this,r)}reload(){return reload(this)}_assign(r){this!==r&&(_assert(this.uid===r.uid,this.auth,"internal-error"),this.displayName=r.displayName,this.photoURL=r.photoURL,this.email=r.email,this.emailVerified=r.emailVerified,this.phoneNumber=r.phoneNumber,this.isAnonymous=r.isAnonymous,this.tenantId=r.tenantId,this.providerData=r.providerData.map(a=>Object.assign({},a)),this.metadata._copy(r.metadata),this.stsTokenManager._assign(r.stsTokenManager))}_clone(r){const a=new UserImpl(Object.assign(Object.assign({},this),{auth:r,stsTokenManager:this.stsTokenManager._clone()}));return a.metadata._copy(this.metadata),a}_onReload(r){_assert(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=r,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(r){this.reloadListener?this.reloadListener(r):this.reloadUserInfo=r}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(r,a=!1){let l=!1;r.idToken&&r.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(r),l=!0),a&&await _reloadWithoutSaving(this),await this.auth._persistUserIfCurrent(this),l&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(_isFirebaseServerApp(this.auth.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this.auth));const r=await this.getIdToken();return await _logoutIfInvalidated(this,deleteAccount(this.auth,{idToken:r})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(r=>Object.assign({},r)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(r,a){var l,c,u,d,f,m,y,E;const A=(l=a.displayName)!==null&&l!==void 0?l:void 0,P=(c=a.email)!==null&&c!==void 0?c:void 0,R=(u=a.phoneNumber)!==null&&u!==void 0?u:void 0,x=(d=a.photoURL)!==null&&d!==void 0?d:void 0,M=(f=a.tenantId)!==null&&f!==void 0?f:void 0,$=(m=a._redirectEventId)!==null&&m!==void 0?m:void 0,V=(y=a.createdAt)!==null&&y!==void 0?y:void 0,B=(E=a.lastLoginAt)!==null&&E!==void 0?E:void 0,{uid:O,emailVerified:L,isAnonymous:F,providerData:j,stsTokenManager:U}=a;_assert(O&&U,r,"internal-error");const G=StsTokenManager.fromJSON(this.name,U);_assert(typeof O=="string",r,"internal-error"),assertStringOrUndefined(A,r.name),assertStringOrUndefined(P,r.name),_assert(typeof L=="boolean",r,"internal-error"),_assert(typeof F=="boolean",r,"internal-error"),assertStringOrUndefined(R,r.name),assertStringOrUndefined(x,r.name),assertStringOrUndefined(M,r.name),assertStringOrUndefined($,r.name),assertStringOrUndefined(V,r.name),assertStringOrUndefined(B,r.name);const Y=new UserImpl({uid:O,auth:r,email:P,emailVerified:L,displayName:A,isAnonymous:F,photoURL:x,phoneNumber:
786R,tenantId:M,stsTokenManager:G,createdAt:V,lastLoginAt:B});return j&&Array.isArray(j)&&(Y.providerData=j.map(te=>Object.assign({},te))),$&&(Y._redirectEventId=$),Y}static async _fromIdTokenResponse(r,a,l=!1){const c=new StsTokenManager;c.updateFromServerResponse(a);const u=new UserImpl({uid:a.localId,auth:r,stsTokenManager:c,isAnonymous:l});return await _reloadWithoutSaving(u),u}static async _fromGetAccountInfoResponse(r,a,l){const c=a.users[0];_assert(c.localId!==void 0,"internal-error");const u=c.providerUserInfo!==void 0?extractProviderData(c.providerUserInfo):[],d=!(c.email&&c.passwordHash)&&!(u!=null&&u.length),f=new StsTokenManager;f.updateFromIdToken(l);const m=new UserImpl({uid:c.localId,auth:r,stsTokenManager:f,isAnonymous:d}),y={uid:c.localId,displayName:c.displayName||null,photoURL:c.photoUrl||null,email:c.email||null,emailVerified:c.emailVerified||!1,phoneNumber:c.phoneNumber||null,tenantId:c.tenantId||null,providerData:u,metadata:new UserMetadata(c.createdAt,c.lastLoginAt),isAnonymous:!(c.email&&c.passwordHash)&&!(u!=null&&u.length)};return Object.assign(m,y),m}}/**
787 * @license
788 * Copyright 2020 Google LLC
789 *
790 * Licensed under the Apache License, Version 2.0 (the "License");
791 * you may not use this file except in compliance with the License.
792 * You may obtain a copy of the License at
793 *
794 *   http://www.apache.org/licenses/LICENSE-2.0
795 *
796 * Unless required by applicable law or agreed to in writing, software
797 * distributed under the License is distributed on an "AS IS" BASIS,
798 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
799 * See the License for the specific language governing permissions and
800 * limitations under the License.
801 */const instanceCache=new Map;function _getInstance(o){debugAssert(o instanceof Function,"Expected a class definition");let r=instanceCache.get(o);return r?(debugAssert(r instanceof o,"Instance stored in cache mismatched with class"),r):(r=new o,instanceCache.set(o,r),r)}/**
802 * @license
803 * Copyright 2019 Google LLC
804 *
805 * Licensed under the Apache License, Version 2.0 (the "License");
806 * you may not use this file except in compliance with the License.
807 * You may obtain a copy of the License at
808 *
809 *   http://www.apache.org/licenses/LICENSE-2.0
810 *
811 * Unless required by applicable law or agreed to in writing, software
812 * distributed under the License is distributed on an "AS IS" BASIS,
813 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
814 * See the License for the specific language governing permissions and
815 * limitations under the License.
816 */class InMemoryPersistence{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(r,a){this.storage[r]=a}async _get(r){const a=this.storage[r];return a===void 0?null:a}async _remove(r){delete this.storage[r]}_addListener(r,a){}_removeListener(r,a){}}InMemoryPersistence.type="NONE";const inMemoryPersistence=InMemoryPersistence;/**
817 * @license
818 * Copyright 2019 Google LLC
819 *
820 * Licensed under the Apache License, Version 2.0 (the "License");
821 * you may not use this file except in compliance with the License.
822 * You may obtain a copy of the License at
823 *
824 *   http://www.apache.org/licenses/LICENSE-2.0
825 *
826 * Unless required by applicable law or agreed to in writing, software
827 * distributed under the License is distributed on an "AS IS" BASIS,
828 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
829 * See the License for the specific language governing permissions and
830 * limitations under the License.
831 */function _persistenceKeyName(o,r,a){return`firebase:${o}:${r}:${a}`}class PersistenceUserManager{constructor(r,a,l){this.persistence=r,this.auth=a,this.userKey=l;const{config:c,name:u}=this.auth;this.fullUserKey=_persistenceKeyName(this.userKey,c.apiKey,u),this.fullPersistenceKey=_persistenceKeyName("persistence",c.apiKey,u),this.boundEventHandler=a._onStorageEvent.bind(a),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(r){return this.persistence._set(this.fullUserKey,r.toJSON())}async getCurrentUser(){const r=await this.persistence._get(this.fullUserKey);return r?UserImpl._fromJSON(this.auth,r):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(r){if(this.persistence===r)return;const a=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=r,a)return this.setCurrentUser(a)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(r,a,l="authUser"){if(!a.length)return new PersistenceUserManager(_getInstance(inMemoryPersistence),r,l);const c=(await Promise.all(a.map(async y=>{if(await y._isAvailable())return y}
831))).filter(y=>y);let u=c[0]||_getInstance(inMemoryPersistence);const d=_persistenceKeyName(l,r.config.apiKey,r.name);let f=null;for(const y of a)try{const E=await y._get(d);if(E){const A=UserImpl._fromJSON(r,E);y!==u&&(f=A),u=y;break}}catch{}const m=c.filter(y=>y._shouldAllowMigration);return!u._shouldAllowMigration||!m.length?new PersistenceUserManager(u,r,l):(u=m[0],f&&await u._set(d,f.toJSON()),await Promise.all(a.map(async y=>{if(y!==u)try{await y._remove(d)}catch{}})),new PersistenceUserManager(u,r,l))}}/**
832 * @license
833 * Copyright 2020 Google LLC
834 *
835 * Licensed under the Apache License, Version 2.0 (the "License");
836 * you may not use this file except in compliance with the License.
837 * You may obtain a copy of the License at
838 *
839 *   http://www.apache.org/licenses/LICENSE-2.0
840 *
841 * Unless required by applicable law or agreed to in writing, software
842 * distributed under the License is distributed on an "AS IS" BASIS,
843 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
844 * See the License for the specific language governing permissions and
845 * limitations under the License.
846 */function _getBrowserName(o){const r=o.toLowerCase();if(r.includes("opera/")||r.includes("opr/")||r.includes("opios/"))return"Opera";if(_isIEMobile(r))return"IEMobile";if(r.includes("msie")||r.includes("trident/"))return"IE";if(r.includes("edge/"))return"Edge";if(_isFirefox(r))return"Firefox";if(r.includes("silk/"))return"Silk";if(_isBlackBerry(r))return"Blackberry";if(_isWebOS(r))return"Webos";if(_isSafari(r))return"Safari";if((r.includes("chrome/")||_isChromeIOS(r))&&!r.includes("edge/"))return"Chrome";if(_isAndroid(r))return"Android";{const a=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,l=o.match(a);if((l==null?void 0:l.length)===2)return l[1]}return"Other"}function _isFirefox(o=getUA()){return/firefox\//i.test(o)}function _isSafari(o=getUA()){const r=o.toLowerCase();return r.includes("safari/")&&!r.includes("chrome/")&&!r.includes("crios/")&&!r.includes("android")}function _isChromeIOS(o=getUA()){return/crios\//i.test(o)}function _isIEMobile(o=getUA()){return/iemobile/i.test(o)}function _isAndroid(o=getUA()){return/android/i.test(o)}function _isBlackBerry(o=getUA()){return/blackberry/i.test(o)}function _isWebOS(o=getUA()){return/webos/i.test(o)}function _isIOS(o=getUA()){return/iphone|ipad|ipod/i.test(o)||/macintosh/i.test(o)&&/mobile/i.test(o)}function _isIOSStandalone(o=getUA()){var r;return _isIOS(o)&&!!(!((r=window.navigator)===null||r===void 0)&&r.standalone)}function _isIE10(){return isIE()&&document.documentMode===10}function _isMobileBrowser(o=getUA()){return _isIOS(o)||_isAndroid(o)||_isWebOS(o)||_isBlackBerry(o)||/windows phone/i.test(o)||_isIEMobile(o)}/**
847 * @license
848 * Copyright 2020 Google LLC
849 *
850 * Licensed under the Apache License, Version 2.0 (the "License");
851 * you may not use this file except in compliance with the License.
852 * You may obtain a copy of the License at
853 *
854 *   http://www.apache.org/licenses/LICENSE-2.0
855 *
856 * Unless required by applicable law or agreed to in writing, software
857 * distributed under the License is distributed on an "AS IS" BASIS,
858 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
859 * See the License for the specific language governing permissions and
860 * limitations under the License.
861 */function _getClientVersion(o,r=[]){let a;switch(o){case"Browser":a=_getBrowserName(getUA());break;case"Worker":a=`${_getBrowserName(getUA())}-${o}`;break;default:a=o}const l=r.length?r.join(","):"FirebaseCore-web";return`${a}/JsCore/${SDK_VERSION$1}/${l}`}/**
862 * @license
863 * Copyright 2022 Google LLC
864 *
865 * Licensed under the Apache License, Version 2.0 (the "License");
866 * you may not use this file except in compliance with the License.
867 * You may obtain a copy of the License at
868 *
869 *   http://www.apache.org/licenses/LICENSE-2.0
870 *
871 * Unless required by applicable law or agreed to in writing, software
872 * distributed under the License is distributed on an "AS IS" BASIS,
873 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
874 * See the License for the specific language governing permissions and
875 * limitations under the License.
876 */class AuthMiddlewareQueue{constructor(r){this.auth=r,this.queue=[]}pushCallback(r,a){const l=u=>new Promise((d,f)=>{try{const m=r(u);d(m)}catch(m){f(m)}});l.onAbort=a,this.queue.push(l);const c=this.queue.length-1;return()=>{this.queue[c]=()=>Promise.resolve()}}async runMiddleware(r){if(this.auth.currentUser===r)return;const a=[];try{for(const l of this.queue)await l(r),l.onAbort&&a.push(l.onAbort)}catch(l){a.reverse();for(const c of a)try{c()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:l==null?void 0:l.message})}}}/**
877 * @license
878 * Copyright 2023 Google LLC
879 *
880 * Licensed under the Apache License, Version 2.0 (the "License");
881 * you may not use this file except in compliance with the License.
882 * You may obtain a copy of the License at
883 *
884 *   http://www.apache.org/licenses/LICENSE-2.0
885 *
886 * Unless required by applicable law or agreed to in writing, software
887 * distributed under the License is distributed on an "AS IS" BASIS,
888 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
889 * See the License for the specific language governing permissions and
890 * limitations under the License.
891 */async function _getPasswordPolicy(o,r={}){return _performApiRequest(o,"GET","/v2/passwordPolicy",_addTidIfNecessary(o,r))}/**
892 * @license
893 * Copyright 2023 Google LLC
894 *
895 * Licensed under the Apache License, Version 2.0 (the "License");
896 * you may not use this file except in compliance with the License.
897 * You may obtain a copy of the License at
898 *
899 *   http://www.apache.org/licenses/LICENSE-2.0
900 *
901 * Unless required by applicable law or agreed to in writing, software
902 * distributed under the License is distributed on an "AS IS" BASIS,
903 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
904 * See the License for the specific language governing permissions and
905 * limitations under the License.
906 */const MINIMUM_MIN_PASSWORD_LENGTH=6;class PasswordPolicyImpl{constructor(r){var a,l,c,u;const d=r.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(a=d.minPasswordLength)!==null&&a!==void 0?a:MINIMUM_MIN_PASSWORD_LENGTH,d.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=d.maxPasswordLength),d.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=d.containsLowercaseCharacter),d.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=d.containsUppercaseCharacter),d.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=d.containsNumericCharacter),d.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=d.containsNonAlphanumericCharacter),this.enforcementState=r.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(c=(l=r.allowedNonAlphanumericCharacters)===null||l===void 0?void 0:l.join(""))!==null&&c!==void 0?c:"",this.forceUpgradeOnSignin=(u=r.forceUpgradeOnSignin)!==null&&u!==void 0?u:!1,this.schemaVersion=r.schemaVersion}validatePassword(r){var a,l,c,u,d,f;const m={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(r,m),this.validatePasswordCharacterOptions(r,m),m.isValid&&(m.isValid=(a=m.meetsMinPasswordLength)!==null&&a!==void 0?a:!0),m.isValid&&(m.isValid=(l=m.meetsMaxPasswordLength)!==null&&l!==void 0?l:!0),m.isValid&&(m.isValid=(c=m.containsLowercaseLetter)!==null&&c!==void 0?c:!0),m.isValid&&(m.isValid=(u=m.containsUppercaseLetter)!==null&&u!==void 0?u:!0),m.isValid&&(m.isValid=(d=m.containsNumericCharacter)!==null&&d!==void 0?d:!0),m.isValid&&(m.isValid=(f=m.containsNonAlphanumericCharacter)!==null&&f!==void 0?f:!0),m}validatePasswordLengthOptions(r,a){const l=this.customStrengthOptions.minPasswordLength,c=this.customStrengthOptions.maxPasswordLength;l&&(a.meetsMinPasswordLength=r.length>=l),c&&(a.meetsMaxPasswordLength=r.length<=c)}validatePasswordCharacterOptions(r,a){this.updatePasswordCharacterOptionsStatuses(a,!1,!1,!1,!1);let l;for(let c=0;c<r.length;c++)l=r.charAt(c),this.updatePasswordCharacterOptionsStatuses(a,l>="a"&&l<="z",l>="A"&&l<="Z",l>="0"&&l<="9",this.allowedNonAlphanumericCharacters.includes(l))}updatePasswordCharacterOptionsStatuses(r,a,l,c,u){this.customStrengthOptions.containsLowercaseLetter&&(r.containsLowercaseLetter||(r.containsLowercaseLetter=a)),this.customStrengthOptions.containsUppercaseLetter&&(r.containsUppercaseLetter||(r.containsUppercaseLetter=l)),this.customStrengthOptions.containsNumericCharacter&&(r.containsNumericCharacter||(r.containsNumericCharacter=c)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(r.containsNonAlphanumericCharacter||(r.containsNonAlphanumericCharacter=u))}}/**
907 * @license
908 * Copyright 2020 Google LLC
909 *
910 * Licensed under the Apache License, Version 2.0 (the "License");
911 * you may not use this file except in compliance with the License.
912 * You may obtain a copy of the License at
913 *
914 *   http://www.apache.org/licenses/LICENSE-2.0
915 *
916 * Unless required by applicable law or agreed to in writing, software
917 * distributed under the License is distributed on an "AS IS" BASIS,
918 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
919 * See the License for the specific language governing permissions and
920 * limitations under the License.
921 */class AuthImpl{constructor(r,a,l,c){this.app=r,this.heartbeatServiceProvider=a,this.appCheckServiceProvider=l,this.config=c,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Subscription(this),this.idTokenSubscription=new Subscription(this),this.beforeStateQueue=new AuthMiddlewareQueue(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=_DEFAULT_AUTH_ERROR_FACTORY,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=r.name,this.clientVersion=c.sdkClientVersion}_initializeWithPersistence(r,a){return a&&(this._popupRedirectResolver=_getInstance(a)),this._initializationPromise=this.queue(async()=>{var l,c;if(!this._deleted&&(this.persistenceManager=await PersistenceUserManager.create(this,r),!this._deleted)){if(!((l=this._popupRedirectResolver)===null||l===void 0)&&l._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(a),this.lastNotifiedUid=((c=this.currentUser)===null||c===void 0?void 0:c.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const r=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!r)){if(this.currentUser&&r&&this.currentUser.uid===r.uid){this._currentUser._assign(r),await this.currentUser.getIdToken();return}await this._updateCurrentUser(r,!0)}}async initializeCurrentUserFromIdToken(r){try{const a=await getAccountInfo(this,{idToken:r}),l=await UserImpl._fromGetAccountInfoResponse(this,a,r);await this.directlySetCurrentUser(l)}catch(a){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",a),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(r){var a;if(_isFirebaseServerApp(this.app)){const d=this.app.settings.authIdToken;return d?new Promise(f=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(d).then(f,f))}):this.directlySetCurrentUser(null)}const l=await this.assertedPersistence.getCurrentUser();let c=l,u=!1;if(r&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const d=(a=this.redirectUser)===null||a===void 0?void 0:a._redirectEventId,f=c==null?void 0:c._redirectEventId,m=await this.tryRedirectSignIn(r);(!d||d===f)&&(m!=null&&m.user)&&(c=m.user,u=!0)}if(!c)return this.directlySetCurrentUser(null);if(!c._redirectEventId){if(u)try{await this.beforeStateQueue.runMiddleware(c)}catch(d){c=l,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(d))}return c?this.reloadAndSetCurrentUserOrClear(c):this.directlySetCurrentUser(null)}return _assert(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===c._redirectEventId?this.directlySetCurrentUser(c):this.reloadAndSetCurrentUserOrClear(c)}async tryRedirectSignIn(r){let a=null;try{a=await this._popupRedirectResolver._completeRedirectFn(this,r,!0)}catch{await this._setRedirectUser(null)}return a}
921async reloadAndSetCurrentUserOrClear(r){try{await _reloadWithoutSaving(r)}catch(a){if((a==null?void 0:a.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(r)}useDeviceLanguage(){this.languageCode=_getUserLanguage()}async _delete(){this._deleted=!0}async updateCurrentUser(r){if(_isFirebaseServerApp(this.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this));const a=r?getModularInstance(r):null;return a&&_assert(a.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(a&&a._clone(this))}async _updateCurrentUser(r,a=!1){if(!this._deleted)return r&&_assert(this.tenantId===r.tenantId,this,"tenant-id-mismatch"),a||await this.beforeStateQueue.runMiddleware(r),this.queue(async()=>{await this.directlySetCurrentUser(r),this.notifyAuthListeners()})}async signOut(){return _isFirebaseServerApp(this.app)?Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(r){return _isFirebaseServerApp(this.app)?Promise.reject(_serverAppCurrentUserOperationNotSupportedError(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(_getInstance(r))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(r){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const a=this._getPasswordPolicyInternal();return a.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):a.validatePassword(r)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const r=await _getPasswordPolicy(this),a=new PasswordPolicyImpl(r);this.tenantId===null?this._projectPasswordPolicy=a:this._tenantPasswordPolicies[this.tenantId]=a}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(r){this._errorFactory=new ErrorFactory("auth","Firebase",r())}onAuthStateChanged(r,a,l){return this.registerStateListener(this.authStateSubscription,r,a,l)}beforeAuthStateChanged(r,a){return this.beforeStateQueue.pushCallback(r,a)}onIdTokenChanged(r,a,l){return this.registerStateListener(this.idTokenSubscription,r,a,l)}authStateReady(){return new Promise((r,a)=>{if(this.currentUser)r();else{const l=this.onAuthStateChanged(()=>{l(),r()},a)}})}async revokeAccessToken(r){if(this.currentUser){const a=await this.currentUser.getIdToken(),l={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:r,idToken:a};this.tenantId!=null&&(l.tenantId=this.tenantId),await revokeToken(this,l)}}toJSON(){var r;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(r=this._currentUser)===null||r===void 0?void 0:r.toJSON()}}async _setRedirectUser(r,a){const l=await this.getOrInitRedirectPersistenceManager(a);return r===null?l.removeCurrentUser():l.setCurrentUser(r)}async getOrInitRedirectPersistenceManager(r){if(!this.redirectPersistenceManager){const a=r&&_getInstance(r)||this._popupRedirectResolver;_assert(a,this,"argument-error"),this.redirectPersistenceManager=await PersistenceUserManager.create(this,[_getInstance(a._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(r){var a,l;return this._isInitialized&&await this.queue(async()=>{}),((a=this._currentUser)===null||a===void 0?void 0:a._redirectEventId)===r?this._currentUser:((l=this.redirectUser)===null||l===void 0?void 0:l._redirectEventId)===r?this.redirectUser:null}async _persistUserIfCurrent(r){if(r===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(r))}_notifyListenersIfCurrent(r){r===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var r,a;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const l=(a=(r=this.currentUser)===null||r===void 0?void 0:r.uid)!==null&&a!==void 0?a:null;this.lastNotifiedUid!==l&&(this.lastNotifiedUid=l,this.authStateSubscription.next(this.currentUser))}registerStateListener(r,a,l,c){if(this._deleted)return()=>{};const u=typeof a=="function"?a:a.next.bind(a);let d=!1;const f=this._isInitialized?Promise.resolve():this._initializationPromise;if(_assert(f,this,"internal-error"),f.then(()=>{d||u(this.currentUser)}),typeof a=="function"){const m=r.addObserver(a,l,c);return()=>{d=!0,m()}}else{const m=r.addObserver(a);return()=>{d=!0,m()}}}async directlySetCurrentUser(r){this.currentUser&&this.currentUser!==r&&this._currentUser._stopProactiveRefresh(),r&&this.isProactiveRefreshEnabled&&r._startProactiveRefresh(),this.currentUser=r,r?await this.assertedPersistence.setCurrentUser(r):await this.assertedPersistence.removeCurrentUser()}queue(r){return this.operations=this.operations.then(r,r),this.operations}get assertedPersistence(){return _assert(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(r){!r||this.frameworks.includes(r)||(this.frameworks.push(r),this.frameworks.sort(),this.clientVersion=_getClientVersion(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var r;const a={"X-Client-Version":this.clientVersion};this.app.options.appId&&(a["X-Firebase-gmpid"]=this.app.options.appId);const l=await((r=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||r===void 0?void 0:r.getHeartbeatsHeader());l&&(a["X-Firebase-Client"]=l);const c=await this._getAppCheckToken();return c&&(a["X-Firebase-AppCheck"]=c),a}async _getAppCheckToken(){var r;const a=await((r=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||r===void 0?void 0:r.getToken());return a!=null&&a.error&&_logWarn(`Error while retrieving App Check token: ${a.error}`),a==null?void 0:a.token}}function _castAuth(o){return getModularInstance(o)}class Subscription{constructor(r){this.auth=r,this.observer=null,this.addObserver=createSubscribe(a=>this.observer=a)}get next(){return _assert(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
922 * @license
923 * Copyright 2020 Google LLC
924 *
925 * Licensed under the Apache License, Version 2.0 (the "License");
926 * you may not use this file except in compliance with the License.
927 * You may obtain a copy of the License at
928 *
929 *   http://www.apache.org/licenses/LICENSE-2.0
930 *
931 * Unless required by applicable law or agreed to in writing, software
932 * distributed under the License is distributed on an "AS IS" BASIS,
933 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
934 * See the License for the specific language governing permissions and
935 * limitations under the License.
936 */let externalJSProvider={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function _setExternalJSProvider(o){externalJSProvider=o}function _loadJS(o){return externalJSProvider.loadJS(o)}function _gapiScriptUrl(){return externalJSProvider.gapiScript}function _generateCallbackName(o){return`__${o}${Math.floor(Math.random()*1e6)}`}/**
937 * @license
938 * Copyright 2020 Google LLC
939 *
940 * Licensed under the Apache License, Version 2.0 (the "License");
941 * you may not use this file except in compliance with the License.
942 * You may obtain a copy of the License at
943 *
944 *   http://www.apache.org/licenses/LICENSE-2.0
945 *
946 * Unless required by applicable law or agreed to in writing, software
947 * distributed under the License is distributed on an "AS IS" BASIS,
948 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
949 * See the License for the specific language governing permissions and
950 * limitations under the License.
951 */function initializeAuth(o,r){const a=_getProvider(o,"auth");if(a.isInitialized()){const c=a.getImmediate(),u=a.getOptions();if(deepEqual(u,r??{}))return c;_fail(c,"already-initialized")}return a.initialize({options:r})}function _initializeAuthInstance(o,r){const a=(r==null?void 0:r.persistence)||[],l=(Array.isArray(a)?a:[a]).map(_getInstance);r!=null&&r.errorMap&&o._updateErrorMap(r.errorMap),o._initializeWithPersistence(l,r==null?void 0:r.popupRedirectResolver)}function connectAuthEmulator(o,r,a){const l=_castAuth(o);_assert(l._canInitEmulator,l,"emulator-config-failed"),_assert(/^https?:\/\//.test(r),l,"invalid-emulator-scheme");const c=!1,u=extractProtocol(r),{host:d,port:f}=extractHostAndPort(r),m=f===null?"":`:${f}`;l.config.emulator={url:`${u}//${d}${m}/`},l.settings.appVerificationDisabledForTesting=!0,l.emulatorConfig=Object.freeze({host:d,port:f,protocol:u.replace(":",""),options:Object.freeze({disableWarnings:c})}),emitEmulatorWarning()}function extractProtocol(o){const r=o.indexOf(":");return r<0?"":o.substr(0,r+1)}function extractHostAndPort(o){const r=extractProtocol(o),a=/(\/\/)?([^?#/]+)/.exec(o.substr(r.length));if(!a)return{host:"",port:null};const l=a[2].split("@").pop()||"",c=/^(\[[^\]]+\])(:|$)/.exec(l);if(c){const u=c[1];return{host:u,port:parsePort(l.substr(u.length+1))}}else{const[u,d]=l.split(":");return{host:u,port:parsePort(d)}}}function parsePort(o){if(!o)return null;const r=Number(o);return isNaN(r)?null:r}function emitEmulatorWarning(){function o(){const r=document.createElement("p"),a=r.style;r.innerText="Running in emulator mode. Do not use with production credentials.",a.position="fixed",a.width="100%",a.backgroundColor="#ffffff",a.border=".1em solid #000000",a.color="#b50000",a.bottom="0px",a.left="0px",a.margin="0px",a.zIndex="10000",a.textAlign="center",r.classList.add("firebase-emulator-warning"),document.body.appendChild(r)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",o):o())}/**
952 * @license
953 * Copyright 2020 Google LLC
954 *
955 * Licensed under the Apache License, Version 2.0 (the "License");
956 * you may not use this file except in compliance with the License.
957 * You may obtain a copy of the License at
958 *
959 *   http://www.apache.org/licenses/LICENSE-2.0
960 *
961 * Unless required by applicable law or agreed to in writing, software
962 * distributed under the License is distributed on an "AS IS" BASIS,
963 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
964 * See the License for the specific language governing permissions and
965 * limitations under the License.
966 */class AuthCredential{constructor(r,a){this.providerId=r,this.signInMethod=a}toJSON(){return debugFail("not implemented")}_getIdTokenResponse(r){return debugFail("not implemented")}_linkToIdToken(r,a){return debugFail("not implemented")}_getReauthenticationResolver(r){return debugFail("not implemented")}}/**
967 * @license
968 * Copyright 2020 Google LLC
969 *
970 * Licensed under the Apache License, Version 2.0 (the "License");
971 * you may not use this file except in compliance with the License.
972 * You may obtain a copy of the License at
973 *
974 *   http://www.apache.org/licenses/LICENSE-2.0
975 *
976 * Unless required by applicable law or agreed to in writing, software
977 * distributed under the License is distributed on an "AS IS" BASIS,
978 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
979 * See the License for the specific language governing permissions and
980 * limitations under the License.
981 */async function signInWithIdp(o,r){return _performSignInRequest(o,"POST","/v1/accounts:signInWithIdp",_addTidIfNecessary(o,r))}/**
982 * @license
983 * Copyright 2020 Google LLC
984 *
985 * Licensed under the Apache License, Version 2.0 (the "License");
986 * you may not use this file except in compliance with the License.
987 * You may obtain a copy of the License at
988 *
989 *   http://www.apache.org/licenses/LICENSE-2.0
990 *
991 * Unless required by applicable law or agreed to in writing, software
992 * distributed under the License is distributed on an "AS IS" BASIS,
993 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
994 * See the License for the specific language governing permissions and
995 * limitations under the License.
996 */const IDP_REQUEST_URI$1="http://localhost";class OAuthCredential extends AuthCredential{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(r){const a=new OAuthCredential(r.providerId,r.signInMethod);return r.idToken||r.accessToken?(r.idToken&&(a.idToken=r.idToken),r.accessToken&&(a.accessToken=r.accessToken),r.nonce&&!r.pendingToken&&(a.nonce=r.nonce),r.pendingToken&&(a.pendingToken=r.pendingToken)):r.oauthToken&&r.oauthTokenSecret?(a.accessToken=r.oauthToken,a.secret=r.oauthTokenSecret):_fail("argument-error"),a}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
996once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(r){const a=typeof r=="string"?JSON.parse(r):r,{providerId:l,signInMethod:c}=a,u=__rest(a,["providerId","signInMethod"]);if(!l||!c)return null;const d=new OAuthCredential(l,c);return d.idToken=u.idToken||void 0,d.accessToken=u.accessToken||void 0,d.secret=u.secret,d.nonce=u.nonce,d.pendingToken=u.pendingToken||null,d}_getIdTokenResponse(r){const a=this.buildRequest();return signInWithIdp(r,a)}_linkToIdToken(r,a){const l=this.buildRequest();return l.idToken=a,signInWithIdp(r,l)}_getReauthenticationResolver(r){const a=this.buildRequest();return a.autoCreate=!1,signInWithIdp(r,a)}buildRequest(){const r={requestUri:IDP_REQUEST_URI$1,returnSecureToken:!0};if(this.pendingToken)r.pendingToken=this.pendingToken;else{const a={};this.idToken&&(a.id_token=this.idToken),this.accessToken&&(a.access_token=this.accessToken),this.secret&&(a.oauth_token_secret=this.secret),a.providerId=this.providerId,this.nonce&&!this.pendingToken&&(a.nonce=this.nonce),r.postBody=querystring(a)}return r}}/**
997 * @license
998 * Copyright 2020 Google LLC
999 *
1000 * Licensed under the Apache License, Version 2.0 (the "License");
1001 * you may not use this file except in compliance with the License.
1002 * You may obtain a copy of the License at
1003 *
1004 *   http://www.apache.org/licenses/LICENSE-2.0
1005 *
1006 * Unless required by applicable law or agreed to in writing, software
1007 * distributed under the License is distributed on an "AS IS" BASIS,
1008 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1009 * See the License for the specific language governing permissions and
1010 * limitations under the License.
1011 */class FederatedAuthProvider{constructor(r){this.providerId=r,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(r){this.defaultLanguageCode=r}setCustomParameters(r){return this.customParameters=r,this}getCustomParameters(){return this.customParameters}}/**
1012 * @license
1013 * Copyright 2019 Google LLC
1014 *
1015 * Licensed under the Apache License, Version 2.0 (the "License");
1016 * you may not use this file except in compliance with the License.
1017 * You may obtain a copy of the License at
1018 *
1019 *   http://www.apache.org/licenses/LICENSE-2.0
1020 *
1021 * Unless required by applicable law or agreed to in writing, software
1022 * distributed under the License is distributed on an "AS IS" BASIS,
1023 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1024 * See the License for the specific language governing permissions and
1025 * limitations under the License.
1026 */class BaseOAuthProvider extends FederatedAuthProvider{constructor(){super(...arguments),this.scopes=[]}addScope(r){return this.scopes.includes(r)||this.scopes.push(r),this}getScopes(){return[...this.scopes]}}/**
1027 * @license
1028 * Copyright 2020 Google LLC
1029 *
1030 * Licensed under the Apache License, Version 2.0 (the "License");
1031 * you may not use this file except in compliance with the License.
1032 * You may obtain a copy of the License at
1033 *
1034 *   http://www.apache.org/licenses/LICENSE-2.0
1035 *
1036 * Unless required by applicable law or agreed to in writing, software
1037 * distributed under the License is distributed on an "AS IS" BASIS,
1038 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1039 * See the License for the specific language governing permissions and
1040 * limitations under the License.
1041 */class FacebookAuthProvider extends BaseOAuthProvider{constructor(){super("facebook.com")}static credential(r){return OAuthCredential._fromParams({providerId:FacebookAuthProvider.PROVIDER_ID,signInMethod:FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD,accessToken:r})}static credentialFromResult(r){return FacebookAuthProvider.credentialFromTaggedObject(r)}static credentialFromError(r){return FacebookAuthProvider.credentialFromTaggedObject(r.customData||{})}static credentialFromTaggedObject({_tokenResponse:r}){if(!r||!("oauthAccessToken"in r)||!r.oauthAccessToken)return null;try{return FacebookAuthProvider.credential(r.oauthAccessToken)}catch{return null}}}FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD="facebook.com";FacebookAuthProvider.PROVIDER_ID="facebook.com";/**
1042 * @license
1043 * Copyright 2020 Google LLC
1044 *
1045 * Licensed under the Apache License, Version 2.0 (the "License");
1046 * you may not use this file except in compliance with the License.
1047 * You may obtain a copy of the License at
1048 *
1049 *   http://www.apache.org/licenses/LICENSE-2.0
1050 *
1051 * Unless required by applicable law or agreed to in writing, software
1052 * distributed under the License is distributed on an "AS IS" BASIS,
1053 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1054 * See the License for the specific language governing permissions and
1055 * limitations under the License.
1056 */class GoogleAuthProvider extends BaseOAuthProvider{constructor(){super("google.com"),this.addScope("profile")}static credential(r,a){return OAuthCredential._fromParams({providerId:GoogleAuthProvider.PROVIDER_ID,signInMethod:GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,idToken:r,accessToken:a})}static credentialFromResult(r){return GoogleAuthProvider.credentialFromTaggedObject(r)}static credentialFromError(r){return GoogleAuthProvider.credentialFromTaggedObject(r.customData||{})}static credentialFromTaggedObject({_tokenResponse:r}){if(!r)return null;const{oauthIdToken:a,oauthAccessToken:l}=r;if(!a&&!l)return null;try{return GoogleAuthProvider.credential(a,l)}catch{return null}}}GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD="google.com";GoogleAuthProvider.PROVIDER_ID="google.com";/**
1057 * @license
1058 * Copyright 2020 Google LLC
1059 *
1060 * Licensed under the Apache License, Version 2.0 (the "License");
1061 * you may not use this file except in compliance with the License.
1062 * You may obtain a copy of the License at
1063 *
1064 *   http://www.apache.org/licenses/LICENSE-2.0
1065 *
1066 * Unless required by applicable law or agreed to in writing, software
1067 * distributed under the License is distributed on an "AS IS" BASIS,
1068 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1069 * See the License for the specific language governing permissions and
1070 * limitations under the License.
1071 */class GithubAuthProvider extends BaseOAuthProvider{constructor(){super("github.com")}static credential(r){return OAuthCredential._fromParams({providerId:GithubAuthProvider.PROVIDER_ID,signInMethod:GithubAuthProvider.GITHUB_SIGN_IN_METHOD,accessToken:r})}static credentialFromResult(r){return GithubAuthProvider.credentialFromTaggedObject(r)}static credentialFromError(r){return GithubAuthProvider.credentialFromTaggedObject(r.customData||{})}static credentialFromTaggedObject({_tokenResponse:r}){if(!r||!("oauthAccessToken"in r)||!r.oauthAccessToken)return null;try{return GithubAuthProvider.credential(r.oauthAccessToken)}catch{return null}}}GithubAuthProvider.GITHUB_SIGN_IN_METHOD="github.com";GithubAuthProvider.PROVIDER_ID="github.com";/**
1072 * @license
1073 * Copyright 2020 Google LLC
1074 *
1075 * Licensed under the Apache License, Version 2.0 (the "License");
1076 * you may not use this file except in compliance with the License.
1077 * You may obtain a copy of the License at
1078 *
1079 *   http://www.apache.org/licenses/LICENSE-2.0
1080 *
1081 * Unless required by applicable law or agreed to in writing, software
1082 * distributed under the License is distributed on an "AS IS" BASIS,
1083 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1084 * See the License for the specific language governing permissions and
1085 * limitations under the License.
1086 */class TwitterAuthProvider extends BaseOAuthProvider{constructor(){super("twitter.com")}static credential(r,a){return OAuthCredential._fromParams({providerId:TwitterAuthProvider.PROVIDER_ID,signInMethod:TwitterAuthProvider.TWITTER_SIGN_IN_METHOD,oauthToken:r,oauthTokenSecret:a})}static credentialFromResult(r){return TwitterAuthProvider.credentialFromTaggedObject(r)}static credentialFromError(r){return TwitterAuthProvider.credentialFromTaggedObject(r.customData||{})}static credentialFromTaggedObject({_tokenResponse:r}){if(!r)return null;const{oauthAccessToken:a,oauthTokenSecret:l}=r;if(!a||!l)return null;try{return TwitterAuthProvider.credential(a,l)}catch{return null}}}TwitterAuthProvider.TWITTER_SIGN_IN_METHOD="twitter.com";TwitterAuthProvider.PROVIDER_ID="twitter.com";/**
1087 * @license
1088 * Copyright 2020 Google LLC
1089 *
1090 * Licensed under the Apache License, Version 2.0 (the "License");
1091 * you may not use this file except in compliance with the License.
1092 * You may obtain a copy of the License at
1093 *
1094 *   http://www.apache.org/licenses/LICENSE-2.0
1095 *
1096 * Unless required by applicable law or agreed to in writing, software
1097 * distributed under the License is distributed on an "AS IS" BASIS,
1098 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1099 * See the License for the specific language governing permissions and
1100 * limitations under the License.
1101 */class UserCredentialImpl{constructor(r){this.user=r.user,this.providerId=r.providerId,this._tokenResponse=r._tokenResponse,this.operationType=r.operationType}static async _fromIdTokenResponse(r,a,l,c=!1){const u=await UserImpl._fromIdTokenResponse(r,l,c),d=providerIdForResponse(l);return new UserCredentialImpl({user:u,providerId:d,_tokenResponse:l,operationType:a})}static async _forOperation(r,a,l){await r._updateTokensIfNecessary(l,!0);const c=providerIdForResponse(l);return new UserCredentialImpl({user:r,providerId:c,_tokenResponse:l,operationType:a})}}function providerIdForResponse(o){return o.providerId?o.providerId:"phoneNumber"in o?"phone":null}/**
1102 * @license
1103 * Copyright 2020 Google LLC
1104 *
1105 * Licensed under the Apache License, Version 2.0 (the "License");
1106 * you may not use this file except in compliance with the License.
1107 * You may obtain a copy of the License at
1108 *
1109 *   http://www.apache.org/licenses/LICENSE-2.0
1110 *
1111 * Unless required by applicable law or agreed to in writing, software
1112 * distributed under the License is distributed on an "AS IS" BASIS,
1113 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1114 * See the License for the specific language governing permissions and
1115 * limitations under the License.
1116 */class MultiFactorError extends FirebaseError{constructor(r,a,l,c){var u;super(a.code,a.message),this.operationType=l,this.user=c,Object.setPrototypeOf(this,MultiFactorError.prototype),this.customData={appName:r.name,tenantId:(u=r.tenantId)!==null&&u!==void 0?u:void 0,_serverResponse:a.customData._serverResponse,operationType:l}}static _fromErrorAndOperation(r,a,l,c){return new MultiFactorError(r,a,l,c)}}function _processCredentialSavingMfaContextIfNecessary(o,r,a,l){return(r==="reauthenticate"?a._getReauthenticationResolver(o):a._getIdTokenResponse(o)).catch(u=>{throw u.code==="auth/multi-factor-auth-required"?MultiFactorError._fromErrorAndOperation(o,u,r,l):u})}async function _link$1(o,r,a=!1){const l=await _logoutIfInvalidated(o,r._linkToIdToken(o.auth,await o.getIdToken()),a);return UserCredentialImpl._forOperation(o,"link",l)}/**
1117 * @license
1118 * Copyright 2019 Google LLC
1119 *
1120 * Licensed under the Apache License, Version 2.0 (the "License");
1121 * you may not use this file except in compliance with the License.
1122 * You may obtain a copy of the License at
1123 *
1124 *   http://www.apache.org/licenses/LICENSE-2.0
1125 *
1126 * Unless required by applicable law or agreed to in writing, software
1127 * distributed under the License is distributed on an "AS IS" BASIS,
1128 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1129 * See the License for the specific language governing permissions and
1130 * limitations under the License.
1131 */async function _reauthenticate(o,r,a=!1){const{auth:l}=o;if(_isFirebaseServerApp(l.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(l));const c="reauthenticate";try{const u=await _logoutIfInvalidated(o,_processCredentialSavingMfaContextIfNecessary(l,c,r,o),a);_assert(u.idToken,l,"internal-error");const d=_parseToken(u.idToken);_assert(d,l,"internal-error");const{sub:f}=d;return _assert(o.uid===f,l,"user-mismatch"),UserCredentialImpl._forOperation(o,c,u)}catch(u){throw(u==null?void 0:u.code)==="auth/user-not-found"&&_fail(l,"user-mismatch"),u}}/**
1132 * @license
1133 * Copyright 2020 Google LLC
1134 *
1135 * Licensed under the Apache License, Version 2.0 (the "License");
1136 * you may not use this file except in compliance with the License.
1137 * You may obtain a copy of the License at
1138 *
1139 *   http://www.apache.org/licenses/LICENSE-2.0
1140 *
1141 * Unless required by applicable law or agreed to in writing, softw
1141are
1142 * distributed under the License is distributed on an "AS IS" BASIS,
1143 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1144 * See the License for the specific language governing permissions and
1145 * limitations under the License.
1146 */async function _signInWithCredential(o,r,a=!1){if(_isFirebaseServerApp(o.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(o));const l="signIn",c=await _processCredentialSavingMfaContextIfNecessary(o,l,r),u=await UserCredentialImpl._fromIdTokenResponse(o,l,c);return a||await o._updateCurrentUser(u.user),u}/**
1147 * @license
1148 * Copyright 2020 Google LLC
1149 *
1150 * Licensed under the Apache License, Version 2.0 (the "License");
1151 * you may not use this file except in compliance with the License.
1152 * You may obtain a copy of the License at
1153 *
1154 *   http://www.apache.org/licenses/LICENSE-2.0
1155 *
1156 * Unless required by applicable law or agreed to in writing, software
1157 * distributed under the License is distributed on an "AS IS" BASIS,
1158 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1159 * See the License for the specific language governing permissions and
1160 * limitations under the License.
1161 */async function signInWithCustomToken$1(o,r){return _performSignInRequest(o,"POST","/v1/accounts:signInWithCustomToken",_addTidIfNecessary(o,r))}/**
1162 * @license
1163 * Copyright 2020 Google LLC
1164 *
1165 * Licensed under the Apache License, Version 2.0 (the "License");
1166 * you may not use this file except in compliance with the License.
1167 * You may obtain a copy of the License at
1168 *
1169 *   http://www.apache.org/licenses/LICENSE-2.0
1170 *
1171 * Unless required by applicable law or agreed to in writing, software
1172 * distributed under the License is distributed on an "AS IS" BASIS,
1173 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1174 * See the License for the specific language governing permissions and
1175 * limitations under the License.
1176 */async function signInWithCustomToken(o,r){if(_isFirebaseServerApp(o.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(o));const a=_castAuth(o),l=await signInWithCustomToken$1(a,{token:r,returnSecureToken:!0}),c=await UserCredentialImpl._fromIdTokenResponse(a,"signIn",l);return await a._updateCurrentUser(c.user),c}function onIdTokenChanged(o,r,a,l){return getModularInstance(o).onIdTokenChanged(r,a,l)}function beforeAuthStateChanged(o,r,a){return getModularInstance(o).beforeAuthStateChanged(r,a)}function onAuthStateChanged(o,r,a,l){return getModularInstance(o).onAuthStateChanged(r,a,l)}function signOut(o){return getModularInstance(o).signOut()}const STORAGE_AVAILABLE_KEY="__sak";/**
1177 * @license
1178 * Copyright 2019 Google LLC
1179 *
1180 * Licensed under the Apache License, Version 2.0 (the "License");
1181 * you may not use this file except in compliance with the License.
1182 * You may obtain a copy of the License at
1183 *
1184 *   http://www.apache.org/licenses/LICENSE-2.0
1185 *
1186 * Unless required by applicable law or agreed to in writing, software
1187 * distributed under the License is distributed on an "AS IS" BASIS,
1188 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1189 * See the License for the specific language governing permissions and
1190 * limitations under the License.
1191 */class BrowserPersistenceClass{constructor(r,a){this.storageRetriever=r,this.type=a}_isAvailable(){try{return this.storage?(this.storage.setItem(STORAGE_AVAILABLE_KEY,"1"),this.storage.removeItem(STORAGE_AVAILABLE_KEY),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(r,a){return this.storage.setItem(r,JSON.stringify(a)),Promise.resolve()}_get(r){const a=this.storage.getItem(r);return Promise.resolve(a?JSON.parse(a):null)}_remove(r){return this.storage.removeItem(r),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
1192 * @license
1193 * Copyright 2020 Google LLC
1194 *
1195 * Licensed under the Apache License, Version 2.0 (the "License");
1196 * you may not use this file except in compliance with the License.
1197 * You may obtain a copy of the License at
1198 *
1199 *   http://www.apache.org/licenses/LICENSE-2.0
1200 *
1201 * Unless required by applicable law or agreed to in writing, softw
1201are
1202 * distributed under the License is distributed on an "AS IS" BASIS,
1203 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1204 * See the License for the specific language governing permissions and
1205 * limitations under the License.
1206 */const _POLLING_INTERVAL_MS$1=1e3,IE10_LOCAL_STORAGE_SYNC_DELAY=10;class BrowserLocalPersistence extends BrowserPersistenceClass{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(r,a)=>this.onStorageEvent(r,a),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=_isMobileBrowser(),this._shouldAllowMigration=!0}forAllChangedKeys(r){for(const a of Object.keys(this.listeners)){const l=this.storage.getItem(a),c=this.localCache[a];l!==c&&r(a,c,l)}}onStorageEvent(r,a=!1){if(!r.key){this.forAllChangedKeys((d,f,m)=>{this.notifyListeners(d,m)});return}const l=r.key;a?this.detachListener():this.stopPolling();const c=()=>{const d=this.storage.getItem(l);!a&&this.localCache[l]===d||this.notifyListeners(l,d)},u=this.storage.getItem(l);_isIE10()&&u!==r.newValue&&r.newValue!==r.oldValue?setTimeout(c,IE10_LOCAL_STORAGE_SYNC_DELAY):c()}notifyListeners(r,a){this.localCache[r]=a;const l=this.listeners[r];if(l)for(const c of Array.from(l))c(a&&JSON.parse(a))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((r,a,l)=>{this.onStorageEvent(new StorageEvent("storage",{key:r,oldValue:a,newValue:l}),!0)})},_POLLING_INTERVAL_MS$1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(r,a){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[r]||(this.listeners[r]=new Set,this.localCache[r]=this.storage.getItem(r)),this.listeners[r].add(a)}_removeListener(r,a){this.listeners[r]&&(this.listeners[r].delete(a),this.listeners[r].size===0&&delete this.listeners[r]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(r,a){await super._set(r,a),this.localCache[r]=JSON.stringify(a)}async _get(r){const a=await super._get(r);return this.localCache[r]=JSON.stringify(a),a}async _remove(r){await super._remove(r),delete this.localCache[r]}}BrowserLocalPersistence.type="LOCAL";const browserLocalPersistence=BrowserLocalPersistence;/**
1207 * @license
1208 * Copyright 2020 Google LLC
1209 *
1210 * Licensed under the Apache License, Version 2.0 (the "License");
1211 * you may not use this file except in compliance with the License.
1212 * You may obtain a copy of the License at
1213 *
1214 *   http://www.apache.org/licenses/LICENSE-2.0
1215 *
1216 * Unless required by applicable law or agreed to in writing, software
1217 * distributed under the License is distributed on an "AS IS" BASIS,
1218 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1219 * See the License for the specific language governing permissions and
1220 * limitations under the License.
1221 */class BrowserSessionPersistence extends BrowserPersistenceClass{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(r,a){}_removeListener(r,a){}}BrowserSessionPersistence.type="SESSION";const browserSessionPersistence=BrowserSessionPersistence;/**
1222 * @license
1223 * Copyright 2019 Google LLC
1224 *
1225 * Licensed under the Apache License, Version 2.0 (the "License");
1226 * you may not use this file except in compliance with the License.
1227 * You may obtain a copy of the License at
1228 *
1229 *   http://www.apache.org/licenses/LICENSE-2.0
1230 *
1231 * Unless required by applicable law or agreed to in writing, software
1232 * distributed under the License is distributed on an "AS IS" BASIS,
1233 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1234 * See the License for the specific language governing permissions and
1235 * limitations under the License.
1236 */function _allSettled(o){return Promise.all(o.map(async r=>{try{return{fulfilled:!0,value:await r}}catch(a){return{fulfilled:!1,reason:a}}}))}/**
1237 * @license
1238 * Copyright 2019 Google LLC
1239 *
1240 * Licensed under the Apache License, Version 2.0 (the "License");
1241 * you may not use this file except in compliance with the License.
1242 * You may obtain a copy of the License at
1243 *
1244 *   http://www.apache.org/licenses/LICENSE-2.0
1245 *
1246 * Unless required by applicable law or agreed to in writing, software
1247 * distributed under the License is distributed on an "AS IS" BASIS,
1248 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1249 * See the License for the specific language governing permissions and
1250 * limitations under the License.
1251 */class Receiver{constructor(r){this.eventTarget=r,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(r){const a=this.receivers.find(c=>c.isListeningto(r));if(a)return a;const l=new Receiver(r);return this.receivers.push(l),l}isListeningto(r){return this.eventTarget===r}async handleEvent(r){const a=r,{eventId:l,eventType:c,data:u}=a.data,d=this.handlersMap[c];if(!(d!=null&&d.size))return;a.ports[0].postMessage({status:"ack",eventId:l,eventType:c});const f=Array.from(d).map(async y=>y(a.origin,u)),m=await _allSettled(f);a.ports[0].postMessage({status:"done",eventId:l,eventType:c,response:m})}_subscribe(r,a){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[r]||(this.handlersMap[r]=new Set),this.handlersMap[r].add(a)}_unsubscribe(r,a){this.handlersMap[r]&&a&&this.handlersMap[r].delete(a),(!a||this.handlersMap[r].size===0)&&delete this.handlersMap[r],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Receiver.receivers=[];/**
1252 * @license
1253 * Copyright 2020 Google LLC
1254 *
1255 * Licensed under the Apache License, Version 2.0 (the "License");
1256 * you may not use this file except in compliance with the License.
1257 * You may obtain a copy of the License at
1258 *
1259 *   http://www.apache.org/licenses/LICENSE-2.0
1260 *
1261 * Unless required by applicable law or agreed to in writing, software
1262 * distributed under the License is distributed on an "AS IS" BASIS,
1263 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1264 * See the License for the specific language governing permissions and
1265 * limitations under the License.
1266 */function _generateEventId(o="",r=10){let a="";for(let l=0;l<r;l++)a+=Math.floor(Math.random()*10);return o+a}/**
1267 * @license
1268 * Copyright 2019 Google LLC
1269 *
1270 * Licensed under the Apache License, Version 2.0 (the "License");
1271 * you may not use this file except in compliance with the License.
1272 * You may obtain a copy of the License at
1273 *
1274 *   http://www.apache.org/licenses/LICENSE-2.0
1275 *
1276 * Unless required by applicable law or agreed to in writing, software
1277 * distributed under the License is distributed on an "AS IS" BASIS,
1278 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1279 * See the License for the specific language governing permissions and
1280 * limitations under the License.
1281 */class Sender{constructor(r){this.target=r,this.handlers=new Set}removeMessageHandler(r){r.messageChannel&&(r.messageChannel.port1.removeEventListener("message",r.onMessage),r.messageChannel.port1.close()),this.handlers.delete(r)}async _send(r,a,l=50){const c=typeof MessageChannel<"u"?new MessageChannel:null;if(!c)throw new Error("connection_unavailable");let u,d;return new Promise((f,m)=>{const y=_generateEventId("",20);c.port1.start();const E=setTimeout(()=>{m(new Error("unsupported_event"))},l);d={messageChannel:c,onMessage(A){const P=A;if(P.data.eventId===y)switch(P.data.status){case"ack":clearTimeout(E),u=setTimeout(()=>{m(new Error("timeout"))},3e3);break;case"done":clearTimeout(u),f(P.data.response);break;default:clearTimeout(E),clearTimeout(u),m(new Error("invalid_response"));break}}},this.handlers.add(d),c.port1.addEventListener("message",d.onMessage),this.target.postMessage({eventType:r,eventId:y,data:a},[c.port2])}).finally(()=>{d&&this.removeMessageHandler(d)})}}/**
1282 * @license
1283 * Copyright 2020 Google LLC
1284 *
1285 * Licensed under the Apache License, Version 2.0 (the "License");
1286 * you may not use this file except in compliance with the License.
1287 * You may obtain a copy of the License at
1288 *
1289 *   http://www.apache.org/licenses/LICENSE-2.0
1290 *
1291 * Unless required by applicable law or agreed to in writing, softw
1291are
1292 * distributed under the License is distributed on an "AS IS" BASIS,
1293 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1294 * See the License for the specific language governing permissions and
1295 * limitations under the License.
1296 */function _window(){return window}function _setWindowLocation(o){_window().location.href=o}/**
1297 * @license
1298 * Copyright 2020 Google LLC.
1299 *
1300 * Licensed under the Apache License, Version 2.0 (the "License");
1301 * you may not use this file except in compliance with the License.
1302 * You may obtain a copy of the License at
1303 *
1304 *   http://www.apache.org/licenses/LICENSE-2.0
1305 *
1306 * Unless required by applicable law or agreed to in writing, software
1307 * distributed under the License is distributed on an "AS IS" BASIS,
1308 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1309 * See the License for the specific language governing permissions and
1310 * limitations under the License.
1311 */function _isWorker(){return typeof _window().WorkerGlobalScope<"u"&&typeof _window().importScripts=="function"}async function _getActiveServiceWorker(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function _getServiceWorkerController(){var o;return((o=navigator==null?void 0:navigator.serviceWorker)===null||o===void 0?void 0:o.controller)||null}function _getWorkerGlobalScope(){return _isWorker()?self:null}/**
1312 * @license
1313 * Copyright 2019 Google LLC
1314 *
1315 * Licensed under the Apache License, Version 2.0 (the "License");
1316 * you may not use this file except in compliance with the License.
1317 * You may obtain a copy of the License at
1318 *
1319 *   http://www.apache.org/licenses/LICENSE-2.0
1320 *
1321 * Unless required by applicable law or agreed to in writing, software
1322 * distributed under the License is distributed on an "AS IS" BASIS,
1323 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1324 * See the License for the specific language governing permissions and
1325 * limitations under the License.
1326 */const DB_NAME="firebaseLocalStorageDb",DB_VERSION=1,DB_OBJECTSTORE_NAME="firebaseLocalStorage",DB_DATA_KEYPATH="fbase_key";class DBPromise{constructor(r){this.request=r}toPromise(){return new Promise((r,a)=>{this.request.addEventListener("success",()=>{r(this.request.result)}),this.request.addEventListener("error",()=>{a(this.request.error)})})}}function getObjectStore(o,r){return o.transaction([DB_OBJECTSTORE_NAME],r?"readwrite":"readonly").objectStore(DB_OBJECTSTORE_NAME)}function _deleteDatabase(){const o=indexedDB.deleteDatabase(DB_NAME);return new DBPromise(o).toPromise()}function _openDatabase(){const o=indexedDB.open(DB_NAME,DB_VERSION);return new Promise((r,a)=>{o.addEventListener("error",()=>{a(o.error)}),o.addEventListener("upgradeneeded",()=>{const l=o.result;try{l.createObjectStore(DB_OBJECTSTORE_NAME,{keyPath:DB_DATA_KEYPATH})}catch(c){a(c)}}),o.addEventListener("success",async()=>{const l=o.result;l.objectStoreNames.contains(DB_OBJECTSTORE_NAME)?r(l):(l.close(),await _deleteDatabase(),r(await _openDatabase()))})})}async function _putObject(o,r,a){const l=getObjectStore(o,!0).put({[DB_DATA_KEYPATH]:r,value:a});return new DBPromise(l).toPromise()}async function getObject(o,r){const a=getObjectStore(o,!1).get(r),l=await new DBPromise(a).toPromise();return l===void 0?null:l.value}function _deleteObject(o,r){const a=getObjectStore(o,!0).delete(r);return new DBPromise(a).toPromise()}const _POLLING_INTERVAL_MS=800,_TRANSACTION_RETRY_COUNT=3;class IndexedDBLocalPersistence{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await _openDatabase(),this.db)}async _withRetries(r){let a=0;for(;;)try{const l=await this._openDb();return await r(l)}catch(l){if(a++>_TRANSACTION_RETRY_COUNT)throw l;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return _isWorker()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Receiver._getInstance(_getWorkerGlobalScope()),this.receiver._subscribe("keyChanged",async(r,a)=>({keyProcessed:(await this._poll()).includes(a.key)})),this.receiver._subscribe("ping",async(r,a)=>["keyChanged"])}async initializeSender(){var r,a;if(this.activeServiceWorker=await _getActiveServiceWorker(),!this.activeServiceWorker)return;this.sender=new Sender(this.activeServiceWorker);const l=await this.sender._send("ping",{},800);l&&!((r=l[0])===null||r===void 0)&&r.fulfilled&&!((a=l[0])===null||a===void 0)&&a.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(r){if(!(!this.sender||!this.activeServiceWorker||_getServiceWorkerController()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:r},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const r=await _openDatabase();return await _putObject(r,STORAGE_AVAILABLE_KEY,"1"),await _deleteObject(r,STORAGE_AVAILABLE_KEY),!0}catch{}return!1}async _withPendingWrite(r){this.pendingWrites++;try{await r()}finally{this.pendingWrites--}}async _set(r,a){return this._withPendingWrite(async()=>(await this._withRetries(l=>_putObject(l,r,a)),this.localCache[r]=a,this.notifyServiceWorker(r)))}async _get(r){const a=await this._withRetries(l=>getObject(l,r));return this.localCache[r]=a,a}async _remove(r){return this._withPendingWrite(async()=>(await this._withRetries(a=>_deleteObject(a,r)),delete this.localCache[r],this.notifyServiceWorker(r)))}async _poll(){const r=await this._withRetries(c=>{const u=getObjectStore(c,!1).getAll();
1326return new DBPromise(u).toPromise()});if(!r)return[];if(this.pendingWrites!==0)return[];const a=[],l=new Set;if(r.length!==0)for(const{fbase_key:c,value:u}of r)l.add(c),JSON.stringify(this.localCache[c])!==JSON.stringify(u)&&(this.notifyListeners(c,u),a.push(c));for(const c of Object.keys(this.localCache))this.localCache[c]&&!l.has(c)&&(this.notifyListeners(c,null),a.push(c));return a}notifyListeners(r,a){this.localCache[r]=a;const l=this.listeners[r];if(l)for(const c of Array.from(l))c(a)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),_POLLING_INTERVAL_MS)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(r,a){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[r]||(this.listeners[r]=new Set,this._get(r)),this.listeners[r].add(a)}_removeListener(r,a){this.listeners[r]&&(this.listeners[r].delete(a),this.listeners[r].size===0&&delete this.listeners[r]),Object.keys(this.listeners).length===0&&this.stopPolling()}}IndexedDBLocalPersistence.type="LOCAL";const indexedDBLocalPersistence=IndexedDBLocalPersistence;new Delay(3e4,6e4);/**
1327 * @license
1328 * Copyright 2021 Google LLC
1329 *
1330 * Licensed under the Apache License, Version 2.0 (the "License");
1331 * you may not use this file except in compliance with the License.
1332 * You may obtain a copy of the License at
1333 *
1334 *   http://www.apache.org/licenses/LICENSE-2.0
1335 *
1336 * Unless required by applicable law or agreed to in writing, software
1337 * distributed under the License is distributed on an "AS IS" BASIS,
1338 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1339 * See the License for the specific language governing permissions and
1340 * limitations under the License.
1341 */function _withDefaultResolver(o,r){return r?_getInstance(r):(_assert(o._popupRedirectResolver,o,"argument-error"),o._popupRedirectResolver)}/**
1342 * @license
1343 * Copyright 2019 Google LLC
1344 *
1345 * Licensed under the Apache License, Version 2.0 (the "License");
1346 * you may not use this file except in compliance with the License.
1347 * You may obtain a copy of the License at
1348 *
1349 *   http://www.apache.org/licenses/LICENSE-2.0
1350 *
1351 * Unless required by applicable law or agreed to in writing, software
1352 * distributed under the License is distributed on an "AS IS" BASIS,
1353 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1354 * See the License for the specific language governing permissions and
1355 * limitations under the License.
1356 */class IdpCredential extends AuthCredential{constructor(r){super("custom","custom"),this.params=r}_getIdTokenResponse(r){return signInWithIdp(r,this._buildIdpRequest())}_linkToIdToken(r,a){return signInWithIdp(r,this._buildIdpRequest(a))}_getReauthenticationResolver(r){return signInWithIdp(r,this._buildIdpRequest())}_buildIdpRequest(r){const a={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return r&&(a.idToken=r),a}}function _signIn(o){return _signInWithCredential(o.auth,new IdpCredential(o),o.bypassAuthState)}function _reauth(o){const{auth:r,user:a}=o;return _assert(a,r,"internal-error"),_reauthenticate(a,new IdpCredential(o),o.bypassAuthState)}async function _link(o){const{auth:r,user:a}=o;return _assert(a,r,"internal-error"),_link$1(a,new IdpCredential(o),o.bypassAuthState)}/**
1357 * @license
1358 * Copyright 2020 Google LLC
1359 *
1360 * Licensed under the Apache License, Version 2.0 (the "License");
1361 * you may not use this file except in compliance with the License.
1362 * You may obtain a copy of the License at
1363 *
1364 *   http://www.apache.org/licenses/LICENSE-2.0
1365 *
1366 * Unless required by applicable law or agreed to in writing, software
1367 * distributed under the License is distributed on an "AS IS" BASIS,
1368 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1369 * See the License for the specific language governing permissions and
1370 * limitations under the License.
1371 */class AbstractPopupRedirectOperation{constructor(r,a,l,c,u=!1){this.auth=r,this.resolver=l,this.user=c,this.bypassAuthState=u,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(a)?a:[a]}execute(){return new Promise(async(r,a)=>{this.pendingPromise={resolve:r,reject:a};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(l){this.reject(l)}})}async onAuthEvent(r){const{urlResponse:a,sessionId:l,postBody:c,tenantId:u,error:d,type:f}=r;if(d){this.reject(d);return}const m={auth:this.auth,requestUri:a,sessionId:l,tenantId:u||void 0,postBody:c||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(f)(m))}catch(y){this.reject(y)}}onError(r){this.reject(r)}getIdpTask(r){switch(r){case"signInViaPopup":case"signInViaRedirect":return _signIn;case"linkViaPopup":case"linkViaRedirect":return _link;case"reauthViaPopup":case"reauthViaRedirect":return _reauth;default:_fail(this.auth,"internal-error")}}resolve(r){debugAssert(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(r),this.unregisterAndCleanUp()}reject(r){debugAssert(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(r),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
1372 * @license
1373 * Copyright 2020 Google LLC
1374 *
1375 * Licensed under the Apache License, Version 2.0 (the "License");
1376 * you may not use this file except in compliance with the License.
1377 * You may obtain a copy of the License at
1378 *
1379 *   http://www.apache.org/licenses/LICENSE-2.0
1380 *
1381 * Unless required by applicable law or agreed to in writing, software
1382 * distributed under the License is distributed on an "AS IS" BASIS,
1383 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1384 * See the License for the specific language governing permissions and
1385 * limitations under the License.
1386 */const _POLL_WINDOW_CLOSE_TIMEOUT=new Delay(2e3,1e4);class PopupOperation extends AbstractPopupRedirectOperation{constructor(r,a,l,c,u){super(r,a,c,u),this.provider=l,this.authWindow=null,this.pollId=null,PopupOperation.currentPopupAction&&PopupOperation.currentPopupAction.cancel(),PopupOperation.currentPopupAction=this}async executeNotNull(){const r=await this.execute();return _assert(r,this.auth,"internal-error"),r}async onExecution(){debugAssert(this.filter.length===1,"Popup operations only handle one event");const r=_generateEventId();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],r),this.authWindow.associatedEvent=r,this.resolver._originValidation(this.auth).catch(a=>{this.reject(a)}),this.resolver._isIframeWebStorageSupported(this.auth,a=>{a||this.reject(_createError(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var r;return((r=this.authWindow)===null||r===void 0?void 0:r.associatedEvent)||null}cancel(){this.reject(_createError(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,PopupOperation.currentPopupAction=null}pollUserCancellation(){const r=()=>{var a,l;if(!((l=(a=this.authWindow)===null||a===void 0?void 0:a.window)===null||l===void 0)&&l.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(_createError(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(r,_POLL_WINDOW_CLOSE_TIMEOUT.get())};r()}}PopupOperation.currentPopupAction=null;/**
1387 * @license
1388 * Copyright 2020 Google LLC
1389 *
1390 * Licensed under the Apache License, Version 2.0 (the "License");
1391 * you may not use this file except in compliance with the License.
1392 * You may obtain a copy of the License at
1393 *
1394 *   http://www.apache.org/licenses/LICENSE-2.0
1395 *
1396 * Unless required by applicable law or agreed to in writing, software
1397 * distributed under the License is distributed on an "AS IS" BASIS,
1398 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1399 * See the License for the specific language governing permissions and
1400 * limitations under the License.
1401 */const PENDING_REDIRECT_KEY="pendingRedirect",redirectOutcomeMap=new Map;class RedirectAction extends AbstractPopupRedirectOperation{constructor(r,a,l=!1){super(r,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],a,void 0,l),this.eventId=null}async execute(){let r=redirectOutcomeMap.get(this.auth._key());if(!r){try{const l=await _getAndClearPendingRedirectStatus(this.resolver,this.auth)?await super.execute():null;r=()=>Promise.resolve(l)}catch(a){r=()=>Promise.reject(a)}redirectOutcomeMap.set(this.auth._key(),r)}return this.bypassAuthState||redirectOutcomeMap.set(this.auth._key(),()=>Promise.resolve(null)),r()}async onAuthEvent(r){if(r.type==="signInViaRedirect")return super.onAuthEvent(r);if(r.type==="unknown"){this.resolve(null);return}if(r.eventId){const a=await this.auth._redirectUserForId(r.eventId);if(a)return this.user=a,super.onAuthEvent(r);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function _getAndClearPendingRedirectStatus(o,r){const a=pendingRedirectKey(r),l=resolverPersistence(o);if(!await l._isAvailable())return!1;const c=await l._get(a)==="true";return await l._remove(a),c}function _overrideRedirectResult(o,r){redirectOutcomeMap.set(o._key(),r)}function resolverPersistence(o){return _getInstance(o._redirectPersistence)}function pendingRedirectKey(o){return _persistenceKeyName(PENDING_REDIRECT_KEY,o.config.apiKey,o.name)}async function _getRedirectResult(o,r,a=!1){if(_isFirebaseServerApp(o.app))return Promise.reject(_serverAppCurrentUserOperationNotSupportedError(o));const l=_castAuth(o),c=_withDefaultResolver(l,r),d=await new RedirectAction(l,c,a).execute();return d&&!a&&(delete d.user._redirectEventId,await l._persistUserIfCurrent(d.user),await l._setRedirectUser(null,r)),d}/**
1402 * @license
1403 * Copyright 2020 Google LLC
1404 *
1405 * Licensed under the Apache License, Version 2.0 (the "License");
1406 * you may not use this file except in compliance with the License.
1407 * You may obtain a copy of the License at
1408 *
1409 *   http://www.apache.org/licenses/LICENSE-2.0
1410 *
1411 * Unless required by applicable law or agreed to in writing, software
1412 * distributed under the License is distributed on an "AS IS" BASIS,
1413 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414 * See the License for the specific language governing permissions and
1415 * limitations under the License.
1416 */const EVENT_DUPLICATION_CACHE_DURATION_MS=10*60*1e3;class AuthEventManager{constructor(r){this.auth=r,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(r){this.consumers.add(r),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,r)&&(this.sendToConsumer(this.queuedRedirectEvent,r),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(r){this.consumers.delete(r)}onEvent(r){if(this.hasEventBeenHandled(r))return!1;let a=!1;return this.consumers.forEach(l=>{this.isEventForConsumer(r,l)&&(a=!0,this.sendToConsumer(r,l),this.saveEventToCache(r))}),this.hasHandledPotentialRedirect||!isRedirectEvent(r)||(this.hasHandledPotentialRedirect=!0,a||(this.queuedRedirectEvent=r,a=!0)),a}sendToConsumer(r,a){var l;if(r.error&&!isNullRedirectEvent(r)){const c=((l=r.error.code)===null||l===void 0?void 0:l.split("auth/")[1])||"internal-error";a.onError(_createError(this.auth,c))}else a.onAuthEvent(r)}isEventForConsumer(r,a){const l=a.eventId===null||!!r.eventId&&r.eventId===a.eventId;return a.filter.includes(r.type)&&l}hasEventBeenHandled(r){return Date.now()-this.lastProcessedEventTime>=EVENT_DUPLICATION_CACHE_DURATION_MS&&this.cachedEventUids.clear(),this.cachedEventUids.has(eventUid(r))}saveEventToCache(r){this.cachedEventUids.add(eventUid(r)),this.lastProcessedEventTime=Date.now()}}function eventUid(o){return[o.type,o.eventId,o.sessionId,o.tenantId].filter(r=>r).join("-")}function isNullRedirectEvent({type:o,error:r}){return o==="unknown"&&(r==null?void 0:r.code)==="auth/no-auth-event"}function isRedirectEvent(o){switch(o.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return isNullRedirectEvent(o);default:return!1}}/**
1417 * @license
1418 * Copyright 2020 Google LLC
1419 *
1420 * Licensed under the Apache License, Version 2.0 (the "License");
1421 * you may not use this file except in compliance with the License.
1422 * You may obtain a copy of the License at
1423 *
1424 *   http://www.apache.org/licenses/LICENSE-2.0
1425 *
1426 * Unless required by applicable law or agreed to in writing, software
1427 * distributed under the License is distributed on an "AS IS" BASIS,
1428 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1429 * See the License for the specific language governing permissions and
1430 * limitations under the License.
1431 */async function _getProjectConfig(o,r={}){return _performApiRequest(o,"GET","/v1/projects",r)}/**
1432 * @license
1433 * Copyright 2020 Google LLC
1434 *
1435 * Licensed under the Apache License, Version 2.0 (the "License");
1436 * you may not use this file except in compliance with the License.
1437 * You may obtain a copy of the License at
1438 *
1439 *   http://www.apache.org/licenses/LICENSE-2.0
1440 *
1441 * Unless required by applicable law or agreed to in writing, software
1442 * distributed under the License is distributed on an "AS IS" BASIS,
1443 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1444 * See the License for the specific language governing permissions and
1445 * limitations under the License.
1446 */const IP_ADDRESS_REGEX=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,HTTP_REGEX=/^https?/;async function _validateOrigin(o){if(o.config.emulator)return;const{authorizedDomains:r}=await _getProjectConfig(o);for(const a of r)try{if(matchDomain(a))return}catch{}_fail(o,"unauthorized-domain")}function matchDomain(o){const r=_getCurrentUrl(),{protocol:a,hostname:l}=new URL(r);if(o.startsWith("chrome-extension://")){const d=new URL(o);return d.hostname===""&&l===""?a==="chrome-extension:"&&o.replace("chrome-extension://","")===r.replace("chrome-extension://",""):a==="chrome-extension:"&&d.hostname===l}if(!HTTP_REGEX.test(a))return!1;if(IP_ADDRESS_REGEX.test(o))return l===o;const c=o.replace(/\./g,"\\.");return new RegExp("^(.+\\."+c+"|"+c+")$","i").test(l)}/**
1447 * @license
1448 * Copyright 2020 Google LLC.
1449 *
1450 * Licensed under the Apache License, Version 2.0 (the "License");
1451 * you may not use this file except in compliance with the License.
1452 * You may obtain a copy of the License at
1453 *
1454 *   http://www.apache.org/licenses/LICENSE-2.0
1455 *
1456 * Unless required by applicable law or agreed to in writing, software
1457 * distributed under the License is distributed on an "AS IS" BASIS,
1458 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1459 * See the License for the specific language governing permissions and
1460 * limitations under the License.
1461 */const NETWORK_TIMEOUT=new Delay(3e4,6e4);function resetUnloadedGapiModules(){const o=_window().___jsl;if(o!=null&&o.H){for(const r of Object.keys(o.H))if(o.H[r].r=o.H[r].r||[],o.H[r].L=o.H[r].L||[],o.H[r].r=[...o.H[r].L],o.CP)for(let a=0;a<o.CP.length;a++)o.CP[a]=null}}function loadGapi(o){return new Promise((r,a)=>{var l,c,u;function d(){resetUnloadedGapiModules(),gapi.load("gapi.iframes",{callback:()=>{r(gapi.iframes.getContext())},ontimeout:()=>{resetUnloadedGapiModules(),a(_createError(o,"network-request-failed"))},timeout:NETWORK_TIMEOUT.get()})}if(!((c=(l=_window().gapi)===null||l===void 0?void 0:l.iframes)===null||c===void 0)&&c.Iframe)r(gapi.iframes.getContext());else if(!((u=_window().gapi)===null||u===void 0)&&u.load)d();else{const f=_generateCallbackName("iframefcb");return _window()[f]=()=>{gapi.load?d():a(_createError(o,"network-request-failed"))},_loadJS(`${_gapiScriptUrl()}?onload=${f}`).catch(m=>a(m))}}).catch(r=>{throw cachedGApiLoader=null,r})}let cachedGApiLoader=null;function _loadGapi(o){return cachedGApiLoader=cachedGApiLoader||loadGapi(o),cachedGApiLoader}/**
1462 * @license
1463 * Copyright 2020 Google LLC.
1464 *
1465 * Licensed under the Apache License, Version 2.0 (the "License");
1466 * you may not use this file except in compliance with the License.
1467 * You may obtain a copy of the License at
1468 *
1469 *   http://www.apache.org/licenses/LICENSE-2.0
1470 *
1471 * Unless required by applicable law or agreed to in writing, software
1472 * distributed under the License is distributed on an "AS IS" BASIS,
1473 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1474 * See the License for the specific language governing permissions and
1475 * limitations under the License.
1476 */const PING_TIMEOUT=new Delay(5e3,15e3),IFRAME_PATH="__/auth/iframe",EMULATED_IFRAME_PATH="emulator/auth/iframe",IFRAME_ATTRIBUTES={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},EID_FROM_APIHOST=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function getIframeUrl(o){const r=o.config;_assert(r.authDomain,o,"auth-domain-config-required");const a=r.emulator?_emulatorUrl(r,EMULATED_IFRAME_PATH):`https://${o.config.authDomain}/${IFRAME_PATH}`,l={apiKey:r.apiKey,appName:o.name,v:SDK_VERSION$1},c=EID_FROM_APIHOST.get(o.config.apiHost);c&&(l.eid=c);const u=o._getFrameworks();return u.length&&(l.fw=u.join(",")),`${a}?${querystring(l).slice(1)}`}async function _openIframe(o){const r=await _loadGapi(o),a=_window().gapi;return _assert(a,o,"internal-error"),r.open({where:document.body,url:getIframeUrl(o),messageHandlersFilter:a.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:IFRAME_ATTRIBUTES,dontclear:!0},l=>new Promise(async(c,u)=>{await l.restyle({setHideOnLeave:!1});const d=_createError(o,"network-request-failed"),f=_window().setTimeout(()=>{u(d)},PING_TIMEOUT.get());function m(){_window().clearTimeout(f),c(l)}l.ping(m).then(m,()=>{u(d)})}))}/**
1477 * @license
1478 * Copyright 2020 Google LLC.
1479 *
1480 * Licensed under the Apache License, Version 2.0 (the "License");
1481 * you may not use this file except in compliance with the License.
1482 * You may obtain a copy of the License at
1483 *
1484 *   http://www.apache.org/licenses/LICENSE-2.0
1485 *
1486 * Unless required by applicable law or agreed to in writing, software
1487 * distributed under the License is distributed on an "AS IS" BASIS,
1488 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1489 * See the License for the specific language governing permissions and
1490 * limitations under the License.
1491 */const BASE_POPUP_OPTIONS={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},DEFAULT_WIDTH=500,DEFAULT_HEIGHT=600,TARGET_BLANK="_blank",FIREFOX_EMPTY_URL="http://localhost";class AuthPopup{constructor(r){this.window=r,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function _open(o,r,a,l=DEFAULT_WIDTH,c=DEFAULT_HEIGHT){const u=Math.max((window.screen.availHeight-c)/2,0).toString(),d=Math.max((window.screen.availWi
1491dth-l)/2,0).toString();let f="";const m=Object.assign(Object.assign({},BASE_POPUP_OPTIONS),{width:l.toString(),height:c.toString(),top:u,left:d}),y=getUA().toLowerCase();a&&(f=_isChromeIOS(y)?TARGET_BLANK:a),_isFirefox(y)&&(r=r||FIREFOX_EMPTY_URL,m.scrollbars="yes");const E=Object.entries(m).reduce((P,[R,x])=>`${P}${R}=${x},`,"");if(_isIOSStandalone(y)&&f!=="_self")return openAsNewWindowIOS(r||"",f),new AuthPopup(null);const A=window.open(r||"",f,E);_assert(A,o,"popup-blocked");try{A.focus()}catch{}return new AuthPopup(A)}function openAsNewWindowIOS(o,r){const a=document.createElement("a");a.href=o,a.target=r;const l=document.createEvent("MouseEvent");l.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),a.dispatchEvent(l)}/**
1492 * @license
1493 * Copyright 2021 Google LLC
1494 *
1495 * Licensed under the Apache License, Version 2.0 (the "License");
1496 * you may not use this file except in compliance with the License.
1497 * You may obtain a copy of the License at
1498 *
1499 *   http://www.apache.org/licenses/LICENSE-2.0
1500 *
1501 * Unless required by applicable law or agreed to in writing, software
1502 * distributed under the License is distributed on an "AS IS" BASIS,
1503 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1504 * See the License for the specific language governing permissions and
1505 * limitations under the License.
1506 */const WIDGET_PATH="__/auth/handler",EMULATOR_WIDGET_PATH="emulator/auth/handler",FIREBASE_APP_CHECK_FRAGMENT_ID=encodeURIComponent("fac");async function _getRedirectUrl(o,r,a,l,c,u){_assert(o.config.authDomain,o,"auth-domain-config-required"),_assert(o.config.apiKey,o,"invalid-api-key");const d={apiKey:o.config.apiKey,appName:o.name,authType:a,redirectUrl:l,v:SDK_VERSION$1,eventId:c};if(r instanceof FederatedAuthProvider){r.setDefaultLanguage(o.languageCode),d.providerId=r.providerId||"",isEmpty$1(r.getCustomParameters())||(d.customParameters=JSON.stringify(r.getCustomParameters()));for(const[E,A]of Object.entries({}))d[E]=A}if(r instanceof BaseOAuthProvider){const E=r.getScopes().filter(A=>A!=="");E.length>0&&(d.scopes=E.join(","))}o.tenantId&&(d.tid=o.tenantId);const f=d;for(const E of Object.keys(f))f[E]===void 0&&delete f[E];const m=await o._getAppCheckToken(),y=m?`#${FIREBASE_APP_CHECK_FRAGMENT_ID}=${encodeURIComponent(m)}`:"";return`${getHandlerBase(o)}?${querystring(f).slice(1)}${y}`}function getHandlerBase({config:o}){return o.emulator?_emulatorUrl(o,EMULATOR_WIDGET_PATH):`https://${o.authDomain}/${WIDGET_PATH}`}/**
1507 * @license
1508 * Copyright 2020 Google LLC
1509 *
1510 * Licensed under the Apache License, Version 2.0 (the "License");
1511 * you may not use this file except in compliance with the License.
1512 * You may obtain a copy of the License at
1513 *
1514 *   http://www.apache.org/licenses/LICENSE-2.0
1515 *
1516 * Unless required by applicable law or agreed to in writing, software
1517 * distributed under the License is distributed on an "AS IS" BASIS,
1518 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1519 * See the License for the specific language governing permissions and
1520 * limitations under the License.
1521 */const WEB_STORAGE_SUPPORT_KEY="webStorageSupport";class BrowserPopupRedirectResolver{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=browserSessionPersistence,this._completeRedirectFn=_getRedirectResult,this._overrideRedirectResult=_overrideRedirectResult}async _openPopup(r,a,l,c){var u;debugAssert((u=this.eventManagers[r._key()])===null||u===void 0?void 0:u.manager,"_initialize() not called before _openPopup()");const d=await _getRedirectUrl(r,a,l,_getCurrentUrl(),c);return _open(r,d,_generateEventId())}async _openRedirect(r,a,l,c){await this._originValidation(r);const u=await _getRedirectUrl(r,a,l,_getCurrentUrl(),c);return _setWindowLocation(u),new Promise(()=>{})}_initialize(r){const a=r._key();if(this.eventManagers[a]){const{manager:c,promise:u}=this.eventManagers[a];return c?Promise.resolve(c):(debugAssert(u,"If manager is not set, promise should be"),u)}const l=this.initAndGetManager(r);return this.eventManagers[a]={promise:l},l.catch(()=>{delete this.eventManagers[a]}),l}async initAndGetManager(r){const a=await _openIframe(r),l=new AuthEventManager(r);return a.register("authEvent",c=>
1521(_assert(c==null?void 0:c.authEvent,r,"invalid-auth-event"),{status:l.onEvent(c.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[r._key()]={manager:l},this.iframes[r._key()]=a,l}_isIframeWebStorageSupported(r,a){this.iframes[r._key()].send(WEB_STORAGE_SUPPORT_KEY,{type:WEB_STORAGE_SUPPORT_KEY},c=>{var u;const d=(u=c==null?void 0:c[0])===null||u===void 0?void 0:u[WEB_STORAGE_SUPPORT_KEY];d!==void 0&&a(!!d),_fail(r,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(r){const a=r._key();return this.originValidationPromises[a]||(this.originValidationPromises[a]=_validateOrigin(r)),this.originValidationPromises[a]}get _shouldInitProactively(){return _isMobileBrowser()||_isSafari()||_isIOS()}}const browserPopupRedirectResolver=BrowserPopupRedirectResolver;var name$2="@firebase/auth",version$6="1.7.9";/**
1522 * @license
1523 * Copyright 2020 Google LLC
1524 *
1525 * Licensed under the Apache License, Version 2.0 (the "License");
1526 * you may not use this file except in compliance with the License.
1527 * You may obtain a copy of the License at
1528 *
1529 *   http://www.apache.org/licenses/LICENSE-2.0
1530 *
1531 * Unless required by applicable law or agreed to in writing, software
1532 * distributed under the License is distributed on an "AS IS" BASIS,
1533 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1534 * See the License for the specific language governing permissions and
1535 * limitations under the License.
1536 */class AuthInterop{constructor(r){this.auth=r,this.internalListeners=new Map}getUid(){var r;return this.assertAuthConfigured(),((r=this.auth.currentUser)===null||r===void 0?void 0:r.uid)||null}async getToken(r){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(r)}:null}addAuthTokenListener(r){if(this.assertAuthConfigured(),this.internalListeners.has(r))return;const a=this.auth.onIdTokenChanged(l=>{r((l==null?void 0:l.stsTokenManager.accessToken)||null)});this.internalListeners.set(r,a),this.updateProactiveRefresh()}removeAuthTokenListener(r){this.assertAuthConfigured();const a=this.internalListeners.get(r);a&&(this.internalListeners.delete(r),a(),this.updateProactiveRefresh())}assertAuthConfigured(){_assert(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
1537 * @license
1538 * Copyright 2020 Google LLC
1539 *
1540 * Licensed under the Apache License, Version 2.0 (the "License");
1541 * you may not use this file except in compliance with the License.
1542 * You may obtain a copy of the License at
1543 *
1544 *   http://www.apache.org/licenses/LICENSE-2.0
1545 *
1546 * Unless required by applicable law or agreed to in writing, software
1547 * distributed under the License is distributed on an "AS IS" BASIS,
1548 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1549 * See the License for the specific language governing permissions and
1550 * limitations under the License.
1551 */function getVersionForPlatform(o){switch(o){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function registerAuth(o){_registerComponent(new Component("auth",(r,{options:a})=>{const l=r.getProvider("app").getImmediate(),c=r.getProvider("heartbeat"),u=r.getProvider("app-check-internal"),{apiKey:d,authDomain:f}=l.options;_assert(d&&!d.includes(":"),"invalid-api-key",{appName:l.name});const m={apiKey:d,authDomain:f,clientPlatform:o,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:_getClientVersion(o)},y=new AuthImpl(l,c,u,m);return _initializeAuthInstance(y,a),y},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,a,l)=>{r.getProvider("auth-internal").initialize()})),_registerComponent(new Component("auth-internal",r=>{const a=_castAuth(r.getProvider("auth").getImmediate());return(l=>new AuthInterop(l))(a)},"PRIVATE").setInstantiationMode("EXPLICIT")),registerVersion(name$2,version$6,getVersionForPlatform(o)),registerVersion(name$2,version$6,"esm2017")}/**
1552 * @license
1553 * Copyright 2021 Google LLC
1554 *
1555 * Licensed under the Apache License, Version 2.0 (the "License");
1556 * you may not use this file except in compliance with the License.
1557 * You may obtain a copy of the License at
1558 *
1559 *   http://www.apache.org/licenses/LICENSE-2.0
1560 *
1561 * Unless required by applicable law or agreed to in writing, software
1562 * distributed under the License is distributed on an "AS IS" BASIS,
1563 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1564 * See the License for the specific language governing permissions and
1565 * limitations under the License.
1566 */const DEFAULT_ID_TOKEN_MAX_AGE=5*60,authIdTokenMaxAge=getExperimentalSetting("authIdTokenMaxAge")||DEFAULT_ID_TOKEN_MAX_AGE;let lastPostedIdToken=null;const mintCookieFactory=o=>async r=>{const a=r&&await r.getIdTokenResult(),l=a&&(new Date().getTime()-Date.parse(a.issuedAtTime))/1e3;if(l&&l>authIdTokenMaxAge)return;const c=a==null?void 0:a.token;lastPostedIdToken!==c&&(lastPostedIdToken=c,await fetch(o,{method:c?"POST":"DELETE",headers:c?{Authorization:`Bearer ${c}`}:{}}))};function getAuth(o=getApp()){const r=_getProvider(o,"auth");if(r.isInitialized())return r.getImmediate();const a=initializeAuth(o,{popupRedirectResolver:browserPopupRedirectResolver,persistence:[indexedDBLocalPersistence,browserLocalPersistence,browserSessionPersistence]}),l=getExperimentalSetting("authTokenSyncURL");if(l&&typeof isSecureContext=="boolean"&&isSecureContext){const u=new URL(l,location.origin);if(location.origin===u.origin){const d=mintCookieFactory(u.toString());beforeAuthStateChanged(a,d,()=>d(a.currentUser)),onIdTokenChanged(a,f=>d(f))}}const c=getDefaultEmulatorHost("auth");return c&&connectAuthEmulator(a,`http://${c}`),a}function getScriptParentElement(){var o,r;return(r=(o=document.getElementsByTagName("head"))===null||o===void 0?void 0:o[0])!==null&&r!==void 0?r:document}_setExternalJSProvider({loadJS(o){return new Promise((r,a)=>{const l=document.createElement("script");l.setAttribute("src",o),l.onload=r,l.onerror=c=>{const u=_createError("internal-error");u.customData=c,a(u)},l.type="text/javascript",l.charset="UTF-8",getScriptParentElement().appendChild(l)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});registerAuth("Browser");var define_process_env_default$1={};const name$1="@firebase/database",version$5="1.0.8";/**
1567 * @license
1568 * Copyright 2019 Google LLC
1569 *
1570 * Licensed under the Apache License, Version 2.0 (the "License");
1571 * you may not use this file except in compliance with the License.
1572 * You may obtain a copy of the License at
1573 *
1574 *   http://www.apache.org/licenses/LICENSE-2.0
1575 *
1576 * Unless required by applicable law or agreed to in writing, software
1577 * distributed under the License is distributed on an "AS IS" BASIS,
1578 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1579 * See the License for the specific language governing permissions and
1580 * limitations under the License.
1581 */let SDK_VERSION="";function setSDKVersion(o){SDK_VERSION=o}/**
1582 * @license
1583 * Copyright 2017 Google LLC
1584 *
1585 * Licensed under the Apache License, Version 2.0 (the "License");
1586 * you may not use this file except in compliance with the License.
1587 * You may obtain a copy of the License at
1588 *
1589 *   http://www.apache.org/licenses/LICENSE-2.0
1590 *
1591 * Unless required by applicable law or agreed to in writing, software
1592 * distributed under the License is distributed on an "AS IS" BASIS,
1593 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1594 * See the License for the specific language governing permissions and
1595 * limitations under the License.
1596 */class DOMStorageWrapper{constructor(r){this.domStorage_=r,this.prefix_="firebase:"}set(r,a){a==null?this.domStorage_.removeItem(this.prefixedName_(r)):this.domStorage_.setItem(this.prefixedName_(r),stringify(a))}get(r){const a=this.domStorage_.getItem(this.prefixedName_(r));return a==null?null:jsonEval(a)}remove(r){this.domStorage_.removeItem(this.prefixedName_(r))}prefixedName_(r){return this.prefix_+r}toString(){return this.domStorage_.toString()}}/**
1597 * @license
1598 * Copyright 2017 Google LLC
1599 *
1600 * Licensed under the Apache License, Version 2.0 (the "License");
1601 * you may not use this file except in compliance with the License.
1602 * You may obtain a copy of the License at
1603 *
1604 *   http://www.apache.org/licenses/LICENSE-2.0
1605 *
1606 * Unless required by applicable law or agreed to in writing, software
1607 * distributed under the License is distributed on an "AS IS" BASIS,
1608 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1609 * See the License for the specific language governing permissions and
1610 * limitations under the License.
1611 */class MemoryStorage{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(r,a){a==null?delete this.cache_[r]:this.cache_[r]=a}get(r){return contains(this.cache_,r)?this.cache_[r]:null}remove(r){delete this.cache_[r]}}/**
1612 * @license
1613 * Copyright 2017 Google LLC
1614 *
1615 * Licensed under the Apache License, Version 2.0 (the "License");
1616 * you may not use this file except in compliance with the License.
1617 * You may obtain a copy of the License at
1618 *
1619 *   http://www.apache.org/licenses/LICENSE-2.0
1620 *
1621 * Unless required by applicable law or agreed to in writing, software
1622 * distributed under the License is distributed on an "AS IS" BASIS,
1623 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1624 * See the License for the specific language governing permissions and
1625 * limitations under the License.
1626 */const createStoragefor=function(o){try{if(typeof window<"u"&&typeof window[o]<"u"){const r=window[o];return r.setItem("firebase:sentinel","cache"),r.removeItem("firebase:sentinel"),new DOMStorageWrapper(r)}}catch{}return new MemoryStorage},PersistentStorage=createStoragefor("localStorage"),SessionStorage=createStoragefor("sessionStorage");/**
1627 * @license
1628 * Copyright 2017 Google LLC
1629 *
1630 * Licensed under the Apache License, Version 2.0 (the "License");
1631 * you may not use this file except in compliance with the License.
1632 * You may obtain a copy of the License at
1633 *
1634 *   http://www.apache.org/licenses/LICENSE-2.0
1635 *
1636 * Unless required by applicable law or agreed to in writing, software
1637 * distributed under the License is distributed on an "AS IS" BASIS,
1638 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1639 * See the License for the specific language governing permissions and
1640 * limitations under the License.
1641 */const logClient=new Logger("@firebase/database"),LUIDGenerator=function(){let o=1;return function(){return o++}}(),sha1=function(o){const r=stringToByteArray(o),a=new Sha1;a.update(r);const l=a.digest();return base64.encodeByteArray(l)},buildLogMessage_=function(...o){let r="";for(let a=0;a<o.length;a++){const l=o[a];Array.isArray(l)||l&&typeof l=="object"&&typeof l.length=="number"?r+=buildLogMessage_.apply(null,l):typeof l=="object"?r+=stringify(l):r+=l,r+=" "}return r};let logger=null,firstLog_=!0;const enableLogging$1=function(o,r){assert(!0,"Can't turn on custom loggers persistently."),logClient.logLevel=LogLevel.VERBOSE,logger=logClient.log.bind(logClient)},log=function(...o){if(firstLog_===!0&&(firstLog_=!1,logger===null&&SessionStorage.get("logging_enabled")===!0&&enableLogging$1()),logger){const r=buildLogMessage_.apply(null,o);logger(r)}},logWrapper=function(o){return function(...r){log(o,...r)}},error$1=function(...o){const r="FIREBASE INTERNAL ERROR: "+buildLogMessage_(...o);logClient.error(r)},fatal=function(...o){const r=`FIREBASE FATAL ERROR: ${buildLogMessage_(...o)}`;throw logClient.error(r),new Error(r)},warn$2=function(...o){const r="FIREBASE WARNING: "+buildLogMessage_(...o);logClient.warn(r)},warnIfPageIsSecure=function(){typeof window<"u"&&window.location&&window.location.protocol&&window.location.protocol.indexOf("https:")!==-1&&warn$2("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},isInvalidJSONNumber=function(o){return typeof o=="number"&&(o!==o||o===Number.POSITIVE_INFINITY||o===Number.NEGATIVE_INFINITY)},executeWhenDOMReady=function(o){if(document.readyState==="complete")o();else{let r=!1;const a=function(){if(!document.body){setTimeout(a,Math.floor(10));return}r||(r=!0,o())};document.addEventListener?(document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",()=>{document.readyState==="complete"&&a()}),window.attachEvent("onload",a))}},MIN_NAME="[MIN_NAME]",MAX_NAME="[MAX_NAME]",nameCompare=function(o,r){if(o===r)return 0;if(o===MIN_NAME||r===MAX_NAME)return-1;if(r===MIN_NAME||o===MAX_NAME)return 1;{const a=tryParseInt(o),l=tryParseInt(r);
1641return a!==null?l!==null?a-l===0?o.length-r.length:a-l:-1:l!==null?1:o<r?-1:1}},stringCompare=function(o,r){return o===r?0:o<r?-1:1},requireKey=function(o,r){if(r&&o in r)return r[o];throw new Error("Missing required key ("+o+") in object: "+stringify(r))},ObjectToUniqueKey=function(o){if(typeof o!="object"||o===null)return stringify(o);const r=[];for(const l in o)r.push(l);r.sort();let a="{";for(let l=0;l<r.length;l++)l!==0&&(a+=","),a+=stringify(r[l]),a+=":",a+=ObjectToUniqueKey(o[r[l]]);return a+="}",a},splitStringBySize=function(o,r){const a=o.length;if(a<=r)return[o];const l=[];for(let c=0;c<a;c+=r)c+r>a?l.push(o.substring(c,a)):l.push(o.substring(c,c+r));return l};function each(o,r){for(const a in o)o.hasOwnProperty(a)&&r(a,o[a])}const doubleToIEEE754String=function(o){assert(!isInvalidJSONNumber(o),"Invalid JSON number");const r=11,a=52,l=(1<<r-1)-1;let c,u,d,f,m;o===0?(u=0,d=0,c=1/o===-1/0?1:0):(c=o<0,o=Math.abs(o),o>=Math.pow(2,1-l)?(f=Math.min(Math.floor(Math.log(o)/Math.LN2),l),u=f+l,d=Math.round(o*Math.pow(2,a-f)-Math.pow(2,a))):(u=0,d=Math.round(o/Math.pow(2,1-l-a))));const y=[];for(m=a;m;m-=1)y.push(d%2?1:0),d=Math.floor(d/2);for(m=r;m;m-=1)y.push(u%2?1:0),u=Math.floor(u/2);y.push(c?1:0),y.reverse();const E=y.join("");let A="";for(m=0;m<64;m+=8){let P=parseInt(E.substr(m,8),2).toString(16);P.length===1&&(P="0"+P),A=A+P}return A.toLowerCase()},isChromeExtensionContentScript=function(){return!!(typeof window=="object"&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))},isWindowsStoreApp=function(){return typeof Windows=="object"&&typeof Windows.UI=="object"};function errorForServerCode(o,r){let a="Unknown Error";o==="too_big"?a="The data requested exceeds the maximum size that can be accessed with a single request.":o==="permission_denied"?a="Client doesn't have permission to access the desired data.":o==="unavailable"&&(a="The service is unavailable");const l=new Error(o+" at "+r._path.toString()+": "+a);return l.code=o.toUpperCase(),l}const INTEGER_REGEXP_=new RegExp("^-?(0*)\\d{1,10}$"),INTEGER_32_MIN=-2147483648,INTEGER_32_MAX=2147483647,tryParseInt=function(o){if(INTEGER_REGEXP_.test(o)){const r=Number(o);if(r>=INTEGER_32_MIN&&r<=INTEGER_32_MAX)return r}return null},exceptionGuard=function(o){try{o()}catch(r){setTimeout(()=>{const a=r.stack||"";throw warn$2("Exception was thrown by user callback.",a),r},Math.floor(0))}},beingCrawled=function(){return(typeof window=="object"&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},setTimeoutNonBlocking=function(o,r){const a=setTimeout(o,r);return typeof a=="number"&&typeof Deno<"u"&&Deno.unrefTimer?Deno.unrefTimer(a):typeof a=="object"&&a.unref&&a.unref(),a};/**
1642 * @license
1643 * Copyright 2021 Google LLC
1644 *
1645 * Licensed under the Apache License, Version 2.0 (the "License");
1646 * you may not use this file except in compliance with the License.
1647 * You may obtain a copy of the License at
1648 *
1649 *   http://www.apache.org/licenses/LICENSE-2.0
1650 *
1651 * Unless required by applicable law or agreed to in writing, software
1652 * distributed under the License is distributed on an "AS IS" BASIS,
1653 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1654 * See the License for the specific language governing permissions and
1655 * limitations under the License.
1656 */class AppCheckTokenProvider{constructor(r,a){this.appName_=r,this.appCheckProvider=a,this.appCheck=a==null?void 0:a.getImmediate({optional:!0}),this.appCheck||a==null||a.get().then(l=>this.appCheck=l)}getToken(r){return this.appCheck?this.appCheck.getToken(r):new Promise((a,l)=>{setTimeout(()=>{this.appCheck?this.getToken(r).then(a,l):a(null)},0)})}addTokenChangeListener(r){var a;(a=this.appCheckProvider)===null||a===void 0||a.get().then(l=>l.addTokenListener(r))}notifyForInvalidToken(){warn$2(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}/**
1657 * @license
1658 * Copyright 2017 Google LLC
1659 *
1660 * Licensed under the Apache License, Version 2.0 (the "License");
1661 * you may not use this file except in compliance with the License.
1662 * You may obtain a copy of the License at
1663 *
1664 *   http://www.apache.org/licenses/LICENSE-2.0
1665 *
1666 * Unless required by applicable law or agreed to in writing, software
1667 * distributed under the License is distributed on an "AS IS" BASIS,
1668 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1669 * See the License for the specific language governing permissions and
1670 * limitations under the License.
1671 */class FirebaseAuthTokenProvider{constructor(r,a,l){this.appName_=r,this.firebaseOptions_=a,this.authProvider_=l,this.auth_=null,this.auth_=l.getImmediate({optional:!0}),this.auth_||l.onInit(c=>this.auth_=c)}getToken(r){return this.auth_?this.auth_.getToken(r).catch(a=>a&&a.code==="auth/token-not-initialized"?(log("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(a)):new Promise((a,l)=>{setTimeout(()=>{this.auth_?this.getToken(r).then(a,l):a(null)},0)})}addTokenChangeListener(r){this.auth_?this.auth_.addAuthTokenListener(r):this.authProvider_.get().then(a=>a.addAuthTokenListener(r))}removeTokenChangeListener(r){this.authProvider_.get().then(a=>a.removeAuthTokenListener(r))}notifyForInvalidToken(){let r='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?r+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?r+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':r+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',warn$2(r)}}class EmulatorTokenProvider{constructor(r){this.accessToken=r}getToken(r){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(r){r(this.accessToken)}removeTokenChangeListener(r){}notifyForInvalidToken(){}}EmulatorTokenProvider.OWNER="owner";/**
1672 * @license
1673 * Copyright 2017 Google LLC
1674 *
1675 * Licensed under the Apache License, Version 2.0 (the "License");
1676 * you may not use this file except in compliance with the License.
1677 * You may obtain a copy of the License at
1678 *
1679 *   http://www.apache.org/licenses/LICENSE-2.0
1680 *
1681 * Unless required by applicable law or agreed to in writing, software
1682 * distributed under the License is distributed on an "AS IS" BASIS,
1683 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1684 * See the License for the specific language governing permissions and
1685 * limitations under the License.
1686 */const PROTOCOL_VERSION="5",VERSION_PARAM="v",TRANSPORT_SESSION_PARAM="s",REFERER_PARAM="r",FORGE_REF="f",FORGE_DOMAIN_RE=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,LAST_SESSION_PARAM="ls",APPLICATION_ID_PARAM="p",APP_CHECK_TOKEN_PARAM="ac",WEBSOCKET="websocket",LONG_POLLING="long_polling";/**
1687 * @license
1688 * Copyright 2017 Google LLC
1689 *
1690 * Licensed under the Apache License, Version 2.0 (the "License");
1691 * you may not use this file except in compliance with the License.
1692 * You may obtain a copy of the License at
1693 *
1694 *   http://www.apache.org/licenses/LICENSE-2.0
1695 *
1696 * Unless required by applicable law or agreed to in writing, software
1697 * distributed under the License is distributed on an "AS IS" BASIS,
1698 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1699 * See the License for the specific language governing permissions and
1700 * limitations under the License.
1701 */class RepoInfo{constructor(r,a,l,c,u=!1,d="",f=!1,m=!1){this.secure=a,this.namespace=l,this.webSocketOnly=c,this.nodeAdmin=u,this.persistenceKey=d,this.includeNamespaceInQueryParams=f,this.isUsingEmulator=m,this._host=r.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=PersistentStorage.get("host:"+r)||this._host}isCacheableHost(){return this.internalHost.substr(0,2)==="s-"}isCustomHost(){return this._domain!=="firebaseio.com"&&this._domain!=="firebaseio-demo.com"}get host(){return this._host}set host(r){r!==this.internalHost&&(this.internalHost=r,this.isCacheableHost()&&PersistentStorage.set("host:"+this._host,this.internalHost))}toString(){let r=this.toURLString();return this.persistenceKey&&(r+="<"+this.persistenceKey+">"),r}toURLString(){const r=this.secure?"https://":"http://",a=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${r}${this.host}/${a}`}}function repoInfoNeedsQueryParam(o){return o.host!==o.internalHost||o.isCustomHost()||o.includeNamespaceInQueryParams}function repoInfoConnectionURL(o,r,a){assert(typeof r=="string","typeof type must == string"),assert(typeof a=="object","typeof params must == object");let l;if(r===WEBSOCKET)l=(o.secure?"wss://":"ws://")+o.internalHost+"/.ws?";else if(r===LONG_POLLING)l=(o.secure?"https://":"http://")+o.internalHost+"/.lp?";else throw new Error("Unknown connection type: "+r);repoInfoNeedsQueryParam(o)&&(a.ns=o.namespace);const c=[];return each(a,(u,d)=>{c.push(u+"="+d)}),l+c.join("&")}/**
1702 * @license
1703 * Copyright 2017 Google LLC
1704 *
1705 * Licensed under the Apache License, Version 2.0 (the "License");
1706 * you may not use this file except in compliance with the License.
1707 * You may obtain a copy of the License at
1708 *
1709 *   http://www.apache.org/licenses/LICENSE-2.0
1710 *
1711 * Unless required by applicable law or agreed to in writing, software
1712 * distributed under the License is distributed on an "AS IS" BASIS,
1713 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1714 * See the License for the specific language governing permissions and
1715 * limitations under the License.
1716 */class StatsCollection{constructor(){this.counters_={}}incrementCounter(r,a=1){contains(this.counters_,r)||(this.counters_[r]=0),this.counters_[r]+=a}get(){return deepCopy(this.counters_)}}/**
1717 * @license
1718 * Copyright 2017 Google LLC
1719 *
1720 * Licensed under the Apache License, Version 2.0 (the "License");
1721 * you may not use this file except in compliance with the License.
1722 * You may obtain a copy of the License at
1723 *
1724 *   http://www.apache.org/licenses/LICENSE-2.0
1725 *
1726 * Unless required by applicable law or agreed to in writing, software
1727 * distributed under the License is distributed on an "AS IS" BASIS,
1728 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1729 * See the License for the specific language governing permissions and
1730 * limitations under the License.
1731 */const collections={},reporters={};function statsManagerGetCollection(o){const r=o.toString();return collections[r]||(collections[r]=new StatsCollection),collections[r]}function statsManagerGetOrCreateReporter(o,r){const a=o.toString();return reporters[a]||(reporters[a]=r()),reporters[a]}/**
1732 * @license
1733 * Copyright 2017 Google LLC
1734 *
1735 * Licensed under the Apache License, Version 2.0 (the "License");
1736 * you may not use this file except in compliance with the License.
1737 * You may obtain a copy of the License at
1738 *
1739 *   http://www.apache.org/licenses/LICENSE-2.0
1740 *
1741 * Unless required by applicable law or agreed to in writing, software
1742 * distributed under the License is distributed on an "AS IS" BASIS,
1743 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1744 * See the License for the specific language governing permissions and
1745 * limitations under the License.
1746 */class PacketReceiver{constructor(r){this.onMessage_=r,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(r,a){this.closeAfterResponse=r,this.onClose=a,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)}handleResponse(r,a){for(this.pendingResponses[r]=a;this.pendingResponses[this.currentResponseNum];){const l=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let c=0;c<l.length;++c)l[c]&&exceptionGuard(()=>{this.onMessage_(l[c])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}/**
1747 * @license
1748 * Copyright 2017 Google LLC
1749 *
1750 * Licensed under the Apache License, Version 2.0 (the "License");
1751 * you may not use this file except in compliance with the License.
1752 * You may obtain a copy of the License at
1753 *
1754 *   http://www.apache.org/licenses/LICENSE-2.0
1755 *
1756 * Unless required by applicable law or agreed to in writing, software
1757 * distributed under the License is distributed on an "AS IS" BASIS,
1758 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1759 * See the License for the specific language governing permissions and
1760 * limitations under the License.
1761 */const FIREBASE_LONGPOLL_START_PARAM="start",FIREBASE_LONGPOLL_CLOSE_COMMAND="close",FIREBASE_LONGPOLL_COMMAND_CB_NAME="pLPCommand",FIREBASE_LONGPOLL_DATA_CB_NAME="pRTLPCB",FIREBASE_LONGPOLL_ID_PARAM="id",FIREBASE_LONGPOLL_PW_PARAM="pw",FIREBASE_LONGPOLL_SERIAL_PARAM="ser",FIREBASE_LONGPOLL_CALLBACK_ID_PARAM="cb",FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM="seg",FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET="ts",FIREBASE_LONGPOLL_DATA_PARAM="d",FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM="dframe",MAX_URL_DATA_SIZE=1870,SEG_HEADER_SIZE=30,MAX_PAYLOAD_SIZE=MAX_URL_DATA_SIZE-SEG_HEADER_SIZE,KEEPALIVE_REQUEST_INTERVAL=25e3,LP_CONNECT_TIMEOUT=3e4;class BrowserPollConnection{constructor(r,a,l,c,u,d,f){this.connId=r,this.repoInfo=a,this.applicationId=l,this.appCheckToken=c,this.authToken=u,this.transportSessionId=d,this.lastSessionId=f,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=logWrapper(r),this.stats_=statsManagerGetCollection(a),this.urlFn=m=>(this.appCheckToken&&(m[APP_CHECK_TOKEN_PARAM]=this.appCheckToken),repoInfoConnectionURL(a,LONG_POLLING,m))}open(r,a){this.curSegmentNum=0,this.onDisconnect_=a,this.myPacketOrderer=new PacketReceiver(r),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(LP_CONNECT_TIMEOUT)),executeWhenDOMReady(()=>
vendor: 4,107 bytes, line 1761
1761{if(this.isClosed_)return;this.scriptTagHolder=new FirebaseIFrameScriptHolder((...u)=>{const[d,f,m,y,E]=u;if(this.incrementIncomingBytes_(u),!!this.scriptTagHolder)if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,d===FIREBASE_LONGPOLL_START_PARAM)this.id=f,this.password=m;else if(d===FIREBASE_LONGPOLL_CLOSE_COMMAND)f?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(f,()=>{this.onClosed_()})):this.onClosed_();else throw new Error("Unrecognized command received: "+d)},(...u)=>{const[d,f]=u;this.incrementIncomingBytes_(u),this.myPacketOrderer.handleResponse(d,f)},()=>{this.onClosed_()},this.urlFn);const l={};l[FIREBASE_LONGPOLL_START_PARAM]="t",l[FIREBASE_LONGPOLL_SERIAL_PARAM]=Math.floor(Math.random()*1e8),this.scriptTagHolder.uniqueCallbackIdentifier&&(l[FIREBASE_LONGPOLL_CALLBACK_ID_PARAM]=this.scriptTagHolder.uniqueCallbackIdentifier),l[VERSION_PARAM]=PROTOCOL_VERSION,this.transportSessionId&&(l[TRANSPORT_SESSION_PARAM]=this.transportSessionId),this.lastSessionId&&(l[LAST_SESSION_PARAM]=this.lastSessionId),this.applicationId&&(l[APPLICATION_ID_PARAM]=this.applicationId),this.appCheckToken&&(l[APP_CHECK_TOKEN_PARAM]=this.appCheckToken),typeof location<"u"&&location.hostname&&FORGE_DOMAIN_RE.test(location.hostname)&&(l[REFERER_PARAM]=FORGE_REF);const c=this.urlFn(l);this.log_("Connecting via long-poll to "+c),this.scriptTagHolder.addTag(c,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){BrowserPollConnection.forceAllow_=!0}static forceDisallow(){BrowserPollConnection.forceDisallow_=!0}static isAvailable(){return BrowserPollConnection.forceAllow_?!0:!BrowserPollConnection.forceDisallow_&&typeof document<"u"&&document.createElement!=null&&!isChromeExtensionContentScript()&&!isWindowsStoreApp()}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(r){const a=stringify(r);this.bytesSent+=a.length,this.stats_.incrementCounter("bytes_sent",a.length);const l=base64Encode(a),c=splitStringBySize(l,MAX_PAYLOAD_SIZE);for(let u=0;u<c.length;u++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,c.length,c[u]),this.curSegmentNum++}addDisconnectPingFrame(r,a){this.myDisconnFrame=document.createElement("iframe");const l={};l[FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM]="t",l[FIREBASE_LONGPOLL_ID_PARAM]=r,l[FIREBASE_LONGPOLL_PW_PARAM]=a,this.myDisconnFrame.src=this.urlFn(l),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}incrementIncomingBytes_(r){const a=stringify(r).length;this.bytesReceived+=a,this.stats_.incrementCounter("bytes_received",a)}}class FirebaseIFrameScriptHolder{constructor(r,a,l,c){this.onDisconnect=l,this.urlFn=c,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(Math.random()*1e8),this.sendNewPolls=!0;{this.uniqueCallbackIdentifier=LUIDGenerator(),window[FIREBASE_LONGPOLL_COMMAND_CB_NAME+this.uniqueCallbackIdentifier]=r,window[FIREBASE_LONGPOLL_DATA_CB_NAME+this.uniqueCallbackIdentifier]=a,this.myIFrame=FirebaseIFrameScriptHolder.createIFrame_();let u="";this.myIFrame.src&&this.myIFrame.src.substr(0,11)==="javascript:"&&(u='<script>document.domain="'+document.domain+'";<\/script>');const d="<html><body>"+u+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(d),this.myIFrame.doc.close()}catch(f){log("frame writing exception"),f.stack&&log(f.stack),log(f)}}}static createIFrame_(){const r=document.createElement("iframe");
1761if(r.style.display="none",document.body){document.body.appendChild(r);try{r.contentWindow.document||log("No IE domain setting required")}catch{const l=document.domain;r.src="javascript:void((function(){document.open();document.domain='"+l+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return r.contentDocument?r.doc=r.contentDocument:r.contentWindow?r.doc=r.contentWindow.document:r.document&&(r.doc=r.document),r}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{this.myIFrame!==null&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));const r=this.onDisconnect;r&&(this.onDisconnect=null,r())}startLongPoll(r,a){for(this.myID=r,this.myPW=a,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const r={};r[FIREBASE_LONGPOLL_ID_PARAM]=this.myID,r[FIREBASE_LONGPOLL_PW_PARAM]=this.myPW,r[FIREBASE_LONGPOLL_SERIAL_PARAM]=this.currentSerial;let a=this.urlFn(r),l="",c=0;for(;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+SEG_HEADER_SIZE+l.length<=MAX_URL_DATA_SIZE;){const d=this.pendingSegs.shift();l=l+"&"+FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM+c+"="+d.seg+"&"+FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET+c+"="+d.ts+"&"+FIREBASE_LONGPOLL_DATA_PARAM+c+"="+d.d,c++}return a=a+l,this.addLongPollTag_(a,this.currentSerial),!0}else return!1}enqueueSegment(r,a,l){this.pendingSegs.push({seg:r,ts:a,d:l}),this.alive&&this.newRequest_()}addLongPollTag_(r,a){this.outstandingRequests.add(a);const l=()=>{this.outstandingRequests.delete(a),this.newRequest_()},c=setTimeout(l,Math.floor(KEEPALIVE_REQUEST_INTERVAL)),u=()=>{clearTimeout(c),l()};this.addTag(r,u)}addTag(r,a){setTimeout(()=>{try{if(!this.sendNewPolls)return;const l=this.myIFrame.doc.createElement("script");l.type="text/javascript",l.async=!0,l.src=r,l.onload=l.onreadystatechange=function(){const c=l.readyState;(!c||c==="loaded"||c==="complete")&&(l.onload=l.onreadystatechange=null,l.parentNode&&l.parentNode.removeChild(l),a())},l.onerror=()=>{log("Long-poll script failed to load: "+r),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(l)}catch{}},Math.floor(1))}}/**
1762 * @license
1763 * Copyright 2017 Google LLC
1764 *
1765 * Licensed under the Apache License, Version 2.0 (the "License");
1766 * you may not use this file except in compliance with the License.
1767 * You may obtain a copy of the License at
1768 *
1769 *   http://www.apache.org/licenses/LICENSE-2.0
1770 *
1771 * Unless required by applicable law or agreed to in writing, software
1772 * distributed under the License is distributed on an "AS IS" BASIS,
1773 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1774 * See the License for the specific language governing permissions and
1775 * limitations under the License.
1776 */const WEBSOCKET_MAX_FRAME_SIZE=16384,WEBSOCKET_KEEPALIVE_INTERVAL=45e3;let WebSocketImpl=null;typeof MozWebSocket<"u"?WebSocketImpl=MozWebSocket:typeof WebSocket<"u"&&(WebSocketImpl=WebSocket);class WebSocketConnection{constructor(r,a,l,c,u,d,f){this.connId=r,this.applicationId=l,this.appCheckToken=c,this.authToken=u,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=logWrapper(this.connId),this.stats_=statsManagerGetCollection(a),this.connURL=WebSocketConnection.connectionURL_(a,d,f,c,l),this.nodeAdmin=a.nodeAdmin}static connectionURL_(r,a,l,c,u){const d={};return d[VERSION_PARAM]=PROTOCOL_VERSION,typeof location<"u"&&location.hostname&&FORGE_DOMAIN_RE.test(location.hostname)&&(d[REFERER_PARAM]=FORGE_REF),a&&(d[TRANSPORT_SESSION_PARAM]=a),l&&(d[LAST_SESSION_PARAM]=l),c&&(d[APP_CHECK_TOKEN_PARAM]=c),u&&(d[APPLICATION_ID_PARAM]=u),repoInfoConnectionURL(r,WEBSOCKET,d)}open(r,a){this.onDisconnect=a,this.onMessage=r,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,PersistentStorage.set("previous_websocket_failure",!0);try{let l;isNodeSdk(),this.mySock=new WebSocketImpl(this.connURL,[],l)}catch(l){this.log_("Error instantiating WebSocket.");const c=l.message||l.data;c&&this.log_(c),this.onClosed_();return}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0}
vendor: 4,348 bytes, lines 1776-1795
1776,this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=l=>{this.handleIncomingFrame(l)},this.mySock.onerror=l=>{this.log_("WebSocket error.  Closing connection.");const c=l.message||l.data;c&&this.log_(c),this.onClosed_()}}start(){}static forceDisallow(){WebSocketConnection.forceDisallow_=!0}static isAvailable(){let r=!1;if(typeof navigator<"u"&&navigator.userAgent){const a=/Android ([0-9]{0,}\.[0-9]{0,})/,l=navigator.userAgent.match(a);l&&l.length>1&&parseFloat(l[1])<4.4&&(r=!0)}return!r&&WebSocketImpl!==null&&!WebSocketConnection.forceDisallow_}static previouslyFailed(){return PersistentStorage.isInMemoryStorage||PersistentStorage.get("previous_websocket_failure")===!0}markConnectionHealthy(){PersistentStorage.remove("previous_websocket_failure")}appendFrame_(r){if(this.frames.push(r),this.frames.length===this.totalFrames){const a=this.frames.join("");this.frames=null;const l=jsonEval(a);this.onMessage(l)}}handleNewFrameCount_(r){this.totalFrames=r,this.frames=[]}extractFrameCount_(r){if(assert(this.frames===null,"We already have a frame buffer"),r.length<=6){const a=Number(r);if(!isNaN(a))return this.handleNewFrameCount_(a),null}return this.handleNewFrameCount_(1),r}handleIncomingFrame(r){if(this.mySock===null)return;const a=r.data;if(this.bytesReceived+=a.length,this.stats_.incrementCounter("bytes_received",a.length),this.resetKeepAlive(),this.frames!==null)this.appendFrame_(a);else{const l=this.extractFrameCount_(a);l!==null&&this.appendFrame_(l)}}send(r){this.resetKeepAlive();const a=stringify(r);this.bytesSent+=a.length,this.stats_.incrementCounter("bytes_sent",a.length);const l=splitStringBySize(a,WEBSOCKET_MAX_FRAME_SIZE);l.length>1&&this.sendString_(String(l.length));for(let c=0;c<l.length;c++)this.sendString_(l[c])}shutdown_(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)}onClosed_(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))}close(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())}resetKeepAlive(){clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(()=>{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(WEBSOCKET_KEEPALIVE_INTERVAL))}sendString_(r){try{this.mySock.send(r)}catch(a){this.log_("Exception thrown from WebSocket.send():",a.message||a.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}WebSocketConnection.responsesRequiredToBeHealthy=2;WebSocketConnection.healthyTimeout=3e4;/**
1777 * @license
1778 * Copyright 2017 Google LLC
1779 *
1780 * Licensed under the Apache License, Version 2.0 (the "License");
1781 * you may not use this file except in compliance with the License.
1782 * You may obtain a copy of the License at
1783 *
1784 *   http://www.apache.org/licenses/LICENSE-2.0
1785 *
1786 * Unless required by applicable law or agreed to in writing, software
1787 * distributed under the License is distributed on an "AS IS" BASIS,
1788 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1789 * See the License for the specific language governing permissions and
1790 * limitations under the License.
1791 */class TransportManager{constructor(r){this.initTransports_(r)}static get ALL_TRANSPORTS(){return[BrowserPollConnection,WebSocketConnection]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(r){const a=WebSocketConnection&&WebSocketConnection.isAvailable();let l=a&&!WebSocketConnection.previouslyFailed();if(r.webSocketOnly&&(a||warn$2("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),l=!0),l)this.transports_=[WebSocketConnection];else{const c=this.transports_=[];for(const u of TransportManager.ALL_TRANSPORTS)u&&u.isAvailable()&&c.push(u);TransportManager.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}TransportManager.globalTransportInitialized_=!1;/**
1792 * @license
1793 * Copyright 2017 Google LLC
1794 *
1795 * Licensed under the Apache License, Version 2.0 (the "License");
1796 * you may not use this file except in compliance with the License.
1797 * You may obtain a copy of the License at
1798 *
1799 *   http://www.apache.org/licenses/LICENSE-2.0
1800 *
1801 * Unless required by applicable law or agreed to in writing, software
1802 * distributed under the License is distributed on an "AS IS" BASIS,
1803 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1804 * See the License for the specific language governing permissions and
1805 * limitations under the License.
1806 */const UPGRADE_TIMEOUT=6e4,DELAY_BEFORE_SENDING_EXTRA_REQUESTS=5e3,BYTES_SENT_HEALTHY_OVERRIDE=10*1024,BYTES_RECEIVED_HEALTHY_OVERRIDE=100*1024,MESSAGE_TYPE="t",MESSAGE_DATA="d",CONTROL_SHUTDOWN="s",CONTROL_RESET="r",CONTROL_ERROR="e",CONTROL_PONG="o",SWITCH_ACK="a",END_TRANSMISSION="n",PING="p",SERVER_HELLO="h";class Connection{constructor(r,a,l,c,u,d,f,m,y,E){this.id=r,this.repoInfo_=a,this.applicationId_=l,this.appCheckToken_=c,this.authToken_=u,this.onMessage_=d,this.onReady_=f,this.onDisconnect_=m,this.onKill_=y,this.lastSessionId=E,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=logWrapper("c:"+this.id+":"),this.transportManager_=new TransportManager(a),this.log_("Connection created"),this.start_()}start_(){const r=this.transportManager_.initialTransport();this.conn_=new r(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=r.responsesRequiredToBeHealthy||0;const a=this.connReceiver_(this.conn_),l=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(a,l)},Math.floor(0));const c=r.healthyTimeout||0;c>0&&(this.healthyTimeout_=setTimeoutNonBlocking(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>BYTES_RECEIVED_HEALTHY_OVERRIDE?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes.  Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>BYTES_SENT_HEALTHY_OVERRIDE?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes.  Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(c)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(r){return a=>{r===this.conn_?this.onConnectionLost_(a):r===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(r){return a=>{this.state_!==2&&(r===this.rx_?this.onPrimaryMessageReceived_(a):r===this.secondaryConn_?this.onSecondaryMessageReceived_(a):this.log_("message on old connection"))}}sendRequest(r){const a={t:"d",d:r};this.sendData_(a)}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(r){if(MESSAGE_TYPE in r){const a=r[MESSAGE_TYPE];a===SWITCH_ACK?this.upgradeIfSecondaryHealthy_():a===CONTROL_RESET?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):a===CONTROL_PONG&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(r){const a=requireKey("t",r),l=requireKey("d",r);if(a==="c")this.onSecondaryControl_(l);else if(a==="d")this.pendingDataMessages.push(l);else throw new Error("Unknown protocol layer: "+a)}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:PING,d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t
vendor: 4,161 bytes, lines 1806-1810
1806:"c",d:{t:SWITCH_ACK,d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:END_TRANSMISSION,d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(r){const a=requireKey("t",r),l=requireKey("d",r);a==="c"?this.onControl_(l):a==="d"&&this.onDataMessage_(l)}onDataMessage_(r){this.onPrimaryResponse_(),this.onMessage_(r)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(r){const a=requireKey(MESSAGE_TYPE,r);if(MESSAGE_DATA in r){const l=r[MESSAGE_DATA];if(a===SERVER_HELLO){const c=Object.assign({},l);this.repoInfo_.isUsingEmulator&&(c.h=this.repoInfo_.host),this.onHandshake_(c)}else if(a===END_TRANSMISSION){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let c=0;c<this.pendingDataMessages.length;++c)this.onDataMessage_(this.pendingDataMessages[c]);this.pendingDataMessages=[],this.tryCleanupConnection()}else a===CONTROL_SHUTDOWN?this.onConnectionShutdown_(l):a===CONTROL_RESET?this.onReset_(l):a===CONTROL_ERROR?error$1("Server Error: "+l):a===CONTROL_PONG?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):error$1("Unknown control packet command: "+a)}}onHandshake_(r){const a=r.ts,l=r.v,c=r.h;this.sessionId=r.s,this.repoInfo_.host=c,this.state_===0&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,a),PROTOCOL_VERSION!==l&&warn$2("Protocol version mismatch detected"),this.tryStartUpgrade_())}tryStartUpgrade_(){const r=this.transportManager_.upgradeTransport();r&&this.startUpgrade_(r)}startUpgrade_(r){this.secondaryConn_=new r(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=r.responsesRequiredToBeHealthy||0;const a=this.connReceiver_(this.secondaryConn_),l=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(a,l),setTimeoutNonBlocking(()=>{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(UPGRADE_TIMEOUT))}onReset_(r){this.log_("Reset packet received.  New host: "+r),this.repoInfo_.host=r,this.state_===1?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(r,a){this.log_("Realtime connection established."),this.conn_=r,this.state_=1,this.onReady_&&(this.onReady_(a,this.sessionId),this.onReady_=null),this.primaryResponsesRequired_===0?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):setTimeoutNonBlocking(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(DELAY_BEFORE_SENDING_EXTRA_REQUESTS))}sendPingOnPrimaryIfNecessary_(){!this.isHealthy_&&this.state_===1&&(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:PING,d:{}}}))}onSecondaryConnectionLost_(){const r=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===r||this.rx_===r)&&this.close()}onConnectionLost_(r){this.conn_=null,!r&&this.state_===0?(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(PersistentStorage.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)):this.state_===1&&this.log_("Realtime connection lost."),this.close()}onConnectionShutdown_(r){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(r),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(r){if(this.state_!==1)throw"Connection is not connected";this.tx_.send(r)}close(){this.state_!==2&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}/**
1807 * @license
1808 * Copyright 2017 Google LLC
1809 *
1810 * Licensed under the Apache License, Version 2.0 (the "License");
1811 * you may not use this file except in compliance with the License.
1812 * You may obtain a copy of the License at
1813 *
1814 *   http://www.apache.org/licenses/LICENSE-2.0
1815 *
1816 * Unless required by applicable law or agreed to in writing, software
1817 * distributed under the License is distributed on an "AS IS" BASIS,
1818 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1819 * See the License for the specific language governing permissions and
1820 * limitations under the License.
1821 */class ServerActions{put(r,a,l,c){}merge(r,a,l,c){}refreshAuthToken(r){}refreshAppCheckToken(r){}onDisconnectPut(r,a,l){}onDisconnectMerge(r,a,l){}onDisconnectCancel(r,a){}reportStats(r){}}/**
1822 * @license
1823 * Copyright 2017 Google LLC
1824 *
1825 * Licensed under the Apache License, Version 2.0 (the "License");
1826 * you may not use this file except in compliance with the License.
1827 * You may obtain a copy of the License at
1828 *
1829 *   http://www.apache.org/licenses/LICENSE-2.0
1830 *
1831 * Unless required by applicable law or agreed to in writing, software
1832 * distributed under the License is distributed on an "AS IS" BASIS,
1833 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1834 * See the License for the specific language governing permissions and
1835 * limitations under the License.
1836 */let EventEmitter$1=class{constructor(r){this.allowedEvents_=r,this.listeners_={},assert(Array.isArray(r)&&r.length>0,"Requires a non-empty array")}trigger(r,...a){if(Array.isArray(this.listeners_[r])){const l=[...this.listeners_[r]];for(let c=0;c<l.length;c++)l[c].callback.apply(l[c].context,a)}}on(r,a,l){this.validateEventType_(r),this.listeners_[r]=this.listeners_[r]||[],this.listeners_[r].push({callback:a,context:l});const c=this.getInitialEvent(r);c&&a.apply(l,c)}off(r,a,l){this.validateEventType_(r);const c=this.listeners_[r]||[];for(let u=0;u<c.length;u++)if(c[u].callback===a&&(!l||l===c[u].context)){c.splice(u,1);return}}validateEventType_(r){assert(this.allowedEvents_.find(a=>a===r),"Unknown event: "+r)}};/**
1837 * @license
1838 * Copyright 2017 Google LLC
1839 *
1840 * Licensed under the Apache License, Version 2.0 (the "License");
1841 * you may not use this file except in compliance with the License.
1842 * You may obtain a copy of the License at
1843 *
1844 *   http://www.apache.org/licenses/LICENSE-2.0
1845 *
1846 * Unless required by applicable law or agreed to in writing, software
1847 * distributed under the License is distributed on an "AS IS" BASIS,
1848 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1849 * See the License for the specific language governing permissions and
1850 * limitations under the License.
1851 */class OnlineMonitor extends EventEmitter$1{constructor(){super(["online"]),this.online_=!0,typeof window<"u"&&typeof window.addEventListener<"u"&&!isMobileCordova()&&(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}static getInstance(){return new OnlineMonitor}getInitialEvent(r){return assert(r==="online","Unknown event type: "+r),[this.online_]}currentlyOnline(){return this.online_}}/**
1852 * @license
1853 * Copyright 2017 Google LLC
1854 *
1855 * Licensed under the Apache License, Version 2.0 (the "License");
1856 * you may not use this file except in compliance with the License.
1857 * You may obtain a copy of the License at
1858 *
1859 *   http://www.apache.org/licenses/LICENSE-2.0
1860 *
1861 * Unless required by applicable law or agreed to in writing, software
1862 * distributed under the License is distributed on an "AS IS" BASIS,
1863 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1864 * See the License for the specific language governing permissions and
1865 * limitations under the License.
1866 */const MAX_PATH_DEPTH=32,MAX_PATH_LENGTH_BYTES=768;class Path{constructor(r,a){if(a===void 0){this.pieces_=r.split("/");let l=0;for(let c=0;c<this.pieces_.length;c++)this.pieces_[c].length>0&&(this.pieces_[l]=this.pieces_[c],l++);this.pieces_.length=l,this.pieceNum_=0}else this.pieces_=r,this.pieceNum_=a}toString(){let r="";for(let a=this.pieceNum_;a<this.pieces_.length;a++)this.pieces_[a]!==""&&(r+="/"+this.pieces_[a]);return r||"/"}}function newEmptyPath(){return new Path("")}function pathGetFront(o){return o.pieceNum_>=o.pieces_.length?null:o.pieces_[o.pieceNum_]}function pathGetLength(o){return o.pieces_.length-o.pieceNum_}function pathPopFront(o){let r=o.pieceNum_;return r<o.pieces_.length&&r++,new Path(o.pieces_,r)}function pathGetBack(o){return o.pieceNum_<o.pieces_.length?o.pieces_[o.pieces_.length-1]:null}function pathToUrlEncodedString(o){let r="";for(let a=o.pieceNum_;a<o.pieces_.length;a++)o.pieces_[a]!==""&&(r+="/"+encodeURIComponent(String(o.pieces_[a])));return r||"/"}function pathSlice(o,r=0){return o.pieces_.slice(o.pieceNum_+r)}function pathParent(o){if(o.pieceNum_>=o.pieces_.length)return null;const r=[];for(let a=o.pieceNum_;a<o.pieces_.length-1;a++)r.push(o.pieces_[a]);return new Path(r,0)}function pathChild(o,r){const a=[];for(let l=o.pieceNum_;l<o.pieces_.length;l++)a.push(o.pieces_[l]);if(r instanceof Path)for(let l=r.pieceNum_;l<r.pieces_.length;l++)a.push(r.pieces_[l]);else{const l=r.split("/");for(let c=0;c<l.length;c++)l[c].length>0&&a.push(l[c])}return new Path(a,0)}function pathIsEmpty(o){return o.pieceNum_>=o.pieces_.length}function newRelativePath(o,r){const a=pathGetFront(o),l=pathGetFront(r);if(a===null)return r;if(a===l)return newRelativePath(pathPopFront(o),pathPopFront(r));
vendor: 12,975 bytes, lines 1866-1897
1866throw new Error("INTERNAL ERROR: innerPath ("+r+") is not within outerPath ("+o+")")}function pathCompare(o,r){const a=pathSlice(o,0),l=pathSlice(r,0);for(let c=0;c<a.length&&c<l.length;c++){const u=nameCompare(a[c],l[c]);if(u!==0)return u}return a.length===l.length?0:a.length<l.length?-1:1}function pathEquals(o,r){if(pathGetLength(o)!==pathGetLength(r))return!1;for(let a=o.pieceNum_,l=r.pieceNum_;a<=o.pieces_.length;a++,l++)if(o.pieces_[a]!==r.pieces_[l])return!1;return!0}function pathContains(o,r){let a=o.pieceNum_,l=r.pieceNum_;if(pathGetLength(o)>pathGetLength(r))return!1;for(;a<o.pieces_.length;){if(o.pieces_[a]!==r.pieces_[l])return!1;++a,++l}return!0}class ValidationPath{constructor(r,a){this.errorPrefix_=a,this.parts_=pathSlice(r,0),this.byteLength_=Math.max(1,this.parts_.length);for(let l=0;l<this.parts_.length;l++)this.byteLength_+=stringLength(this.parts_[l]);validationPathCheckValid(this)}}function validationPathPush(o,r){o.parts_.length>0&&(o.byteLength_+=1),o.parts_.push(r),o.byteLength_+=stringLength(r),validationPathCheckValid(o)}function validationPathPop(o){const r=o.parts_.pop();o.byteLength_-=stringLength(r),o.parts_.length>0&&(o.byteLength_-=1)}function validationPathCheckValid(o){if(o.byteLength_>MAX_PATH_LENGTH_BYTES)throw new Error(o.errorPrefix_+"has a key path longer than "+MAX_PATH_LENGTH_BYTES+" bytes ("+o.byteLength_+").");if(o.parts_.length>MAX_PATH_DEPTH)throw new Error(o.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+MAX_PATH_DEPTH+") or object contains a cycle "+validationPathToErrorString(o))}function validationPathToErrorString(o){return o.parts_.length===0?"":"in property '"+o.parts_.join(".")+"'"}/**
1867 * @license
1868 * Copyright 2017 Google LLC
1869 *
1870 * Licensed under the Apache License, Version 2.0 (the "License");
1871 * you may not use this file except in compliance with the License.
1872 * You may obtain a copy of the License at
1873 *
1874 *   http://www.apache.org/licenses/LICENSE-2.0
1875 *
1876 * Unless required by applicable law or agreed to in writing, software
1877 * distributed under the License is distributed on an "AS IS" BASIS,
1878 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1879 * See the License for the specific language governing permissions and
1880 * limitations under the License.
1881 */class VisibilityMonitor extends EventEmitter$1{constructor(){super(["visible"]);let r,a;typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(a="visibilitychange",r="hidden"):typeof document.mozHidden<"u"?(a="mozvisibilitychange",r="mozHidden"):typeof document.msHidden<"u"?(a="msvisibilitychange",r="msHidden"):typeof document.webkitHidden<"u"&&(a="webkitvisibilitychange",r="webkitHidden")),this.visible_=!0,a&&document.addEventListener(a,()=>{const l=!document[r];l!==this.visible_&&(this.visible_=l,this.trigger("visible",l))},!1)}static getInstance(){return new VisibilityMonitor}getInitialEvent(r){return assert(r==="visible","Unknown event type: "+r),[this.visible_]}}/**
1882 * @license
1883 * Copyright 2017 Google LLC
1884 *
1885 * Licensed under the Apache License, Version 2.0 (the "License");
1886 * you may not use this file except in compliance with the License.
1887 * You may obtain a copy of the License at
1888 *
1889 *   http://www.apache.org/licenses/LICENSE-2.0
1890 *
1891 * Unless required by applicable law or agreed to in writing, software
1892 * distributed under the License is distributed on an "AS IS" BASIS,
1893 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1894 * See the License for the specific language governing permissions and
1895 * limitations under the License.
1896 */const RECONNECT_MIN_DELAY=1e3,RECONNECT_MAX_DELAY_DEFAULT=60*5*1e3,RECONNECT_MAX_DELAY_FOR_ADMINS=30*1e3,RECONNECT_DELAY_MULTIPLIER=1.3,RECONNECT_DELAY_RESET_TIMEOUT=3e4,SERVER_KILL_INTERRUPT_REASON="server_kill",INVALID_TOKEN_THRESHOLD=3;class PersistentConnection extends ServerActions{constructor(r,a,l,c,u,d,f,m){if(super(),this.repoInfo_=r,this.applicationId_=a,this.onDataUpdate_=l,this.onConnectStatus_=c,this.onServerInfoUpdate_=u,this.authTokenProvider_=d,this.appCheckTokenProvider_=f,this.authOverride_=m,this.id=PersistentConnection.nextPersistentConnectionId_++,this.log_=logWrapper("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=RECONNECT_MIN_DELAY,this.maxReconnectDelay_=RECONNECT_MAX_DELAY_DEFAULT,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,m)throw new Error("Auth override specified in options, but not supported on non Node.js platforms");VisibilityMonitor.getInstance().on("visible",this.onVisible_,this),r.host.indexOf("fblocal")===-1&&OnlineMonitor.getInstance().on("online",this.onOnline_,this)}sendRequest(r,a,l){const c=++this.requestNumber_,u={r:c,a:r,b:a};this.log_(stringify(u)),assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(u),l&&(this.requestCBHash_[c]=l)}get(r){this.initConnection_();const a=new Deferred$1,c={action:"g",request:{p:r._path.toString(),q:r._queryObject},onComplete:d=>{const f=d.d;d.s==="ok"?a.resolve(f):a.reject(f)}};this.outstandingGets_.push(c),this.outstandingGetCount_++;const u=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(u),a.promise}listen(r,a,l,c){this.initConnection_();const u=r._queryIdentifier,d=r._path.toString();this.log_("Listen called for "+d+" "+u),this.listens.has(d)||this.listens.set(d,new Map),assert(r._queryParams.isDefault()||!r._queryParams.loadsAllData(),"listen() called for non-default but complete query"),assert(!this.listens.get(d).has(u),"listen() called twice for same path/queryId.");const f={onComplete:c,hashFn:a,query:r,tag:l};this.listens.get(d).set(u,f),this.connected_&&this.sendListen_(f)}sendGet_(r){const a=this.outstandingGets_[r];this.sendRequest("g",a.request,l=>{delete this.outstandingGets_[r],this.outstandingGetCount_--,this.outstandingGetCount_===0&&(this.outstandingGets_=[]),a.onComplete&&a.onComplete(l)})}sendListen_(r){const a=r.query,l=a._path.toString(),c=a._queryIdentifier;this.log_("Listen on "+l+" for "+c);const u={p:l},d="q";r.tag&&(u.q=a._queryObject,u.t=r.tag),u.h=r.hashFn(),this.sendRequest(d,u,f=>{const m=f.d,y=f.s;PersistentConnection.warnOnListenWarnings_(m,a),(this.listens.get(l)&&this.listens.get(l).get(c))===r&&(this.log_("listen response",f),y!=="ok"&&this.removeListen_(l,c),r.onComplete&&r.onComplete(y,m))})}static warnOnListenWarnings_(r,a){if(r&&typeof r=="object"&&contains(r,"w")){const l=safeGet(r,"w");if(Array.isArray(l)&&~l.indexOf("no_index")){const c='".indexOn": "'+a._queryParams.getIndex().toString()+'"',u=a._path.toString();warn$2(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${c} at ${u} to your security rules for better performance.`)}}}refreshAuthToken(r){this.authToken_=r,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(r)}reduceReconnectDelayIfAdminCredential_(r){(r&&r.length===40||isAdmin(r))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=RECONNECT_MAX_DELAY_FOR_ADMINS)}refreshAppCheckToken(r){this.appCheckToken_=r,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){const r=this.authToken_,a=isValidFormat(r)?"auth":"gauth",l={cred:r};this.authOverride_===null?l.noauth=!0:typeof this.authOverride_=="object"&&(l.authvar=this.authOverride_),this.sendRequest(a,l,c=>{const u=c.s,d=c.d||"error";this.authToken_===r&&(u==="ok"?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(u,d))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},r=>{const a=r.s,l=r.d||"error";a==="ok"?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(a,l)})}unlisten(r,a){const l=r._path.toString(),c=r._queryIdentifier;this.log_("Unlisten called for "+l+" "+c),assert(r._queryParams.isDefault()||!r._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(l,c)&&this.connected_&&this.sendUnlisten_(l,c,r._queryObject,a)}sendUnlisten_(r,a,l,c){this.log_("Unlisten on "+r+" for "+a);const u={p:r},d="n";c&&(u.q=l,u.t=c),this.sendRequest(d,u)}onDisconnectPut(r,a,l){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",r,a,l):this.onDisconnectRequestQueue_.push({pathString:r,action:"o",data:a,onComplete:l})}onDisconnectMerge(r,a,l){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",r,a,l):this.onDisconnectRequestQueue_.push({pathString:r,action:"om",data:a,onComplete:l})}onDisconnectCancel(r,a){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",r,null,a):this.onDisconnectRequestQueue_.push({pathString:r,action:"oc",data:null,onComplete:a})}sendOnDisconnect_(r,a,l,c){const u={p:a,d:l};this.log_("onDisconnect "+r,u),this.sendRequest(r,u,d=>{c&&setTimeout(()=>{c(d.s,d.d)},Math.floor(0))})}put(r,a,l,c){this.putInternal("p",r,a,l,c)}merge(r,a,l,c){this.putInternal("m",r,a,l,c)}putInternal(r,a,l,c,u){this.initConnection_();const d={p:a,d:l};u!==void 0&&(d.h=u),this.outstandingPuts_.push({action:r,request:d,onComplete:c}),this.outstandingPutCount_++;const f=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(f):this.log_("Buffering put: "+a)}sendPut_(r){const a=this.outstandingPuts_[r].action,l=this.outstandingPuts_[r].request,c=this.outstandingPuts_[r].onComplete;this.outstandingPuts_[r].queued=this.connected_,this.sendRequest(a,l,u=>{this.log_(a+" response",u),delete this.outstandingPuts_[r],this.outstandingPutCount_--,this.outstandingPutCount_===0&&(this.outstandingPuts_=[]),c&&c(u.s,u.d)})}reportStats(r){if(this.connected_){const a={c:r};this.log_("reportStats",a),this.sendRequest("s",a,l=>{if(l.s!=="ok"){const u=l.d;this.log_("reportStats","Error sending stats: "+u)}})}}onDataMessage_(r){if("r"in r){this.log_("from server: "+stringify(r));const a=r.r,l=this.requestCBHash_[a];l&&(delete this.requestCBHash_[a],l(r.b))}else{if("error"in r)throw"A server-side error has occurred: "+r.error;"a"in r&&this.onDataPush_(r.a,r.b)}}onDataPush_(r,a){this.log_("handleServerMessage",r,a),r==="d"?this.onDataUpdate_(a.p,a.d,!1,a.t):r==="m"?this.onDataUpdate_(a.p,a.d,!0,a.t):r==="c"?this.onListenRevoked_(a.p,a.q):r==="ac"?this.onAuthRevoked_(a.s,a.d):r==="apc"?this.onAppCheckRevoked_(a.s,a.d):r==="sd"?this.onSecurityDebugPacket_(a):error$1("Unrecognized action received from server: "+stringify(r)+`
1897Are you using the latest client?`)}onReady_(r,a){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(r),this.lastSessionId=a,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(r){assert(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(r))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(r){r&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=RECONNECT_MIN_DELAY,this.realtime_||this.scheduleConnect_(0)),this.visible_=r}onOnline_(r){r?(this.log_("Browser went online."),this.reconnectDelay_=RECONNECT_MIN_DELAY,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&(new Date().getTime()-this.lastConnectionEstablishedTime_>RECONNECT_DELAY_RESET_TIMEOUT&&(this.reconnectDelay_=RECONNECT_MIN_DELAY),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime());const r=new Date().getTime()-this.lastConnectionAttemptTime_;let a=Math.max(0,this.reconnectDelay_-r);
1897a=Math.random()*a,this.log_("Trying to reconnect in "+a+"ms"),this.scheduleConnect_(a),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,this.reconnectDelay_*RECONNECT_DELAY_MULTIPLIER)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null;const r=this.onDataMessage_.bind(this),a=this.onReady_.bind(this),l=this.onRealtimeDisconnect_.bind(this),c=this.id+":"+PersistentConnection.nextConnectionId_++,u=this.lastSessionId;let d=!1,f=null;const m=function(){f?f.close():(d=!0,l())},y=function(A){assert(f,"sendRequest call when we're not connected not allowed."),f.sendRequest(A)};this.realtime_={close:m,sendRequest:y};const E=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[A,P]=await Promise.all([this.authTokenProvider_.getToken(E),this.appCheckTokenProvider_.getToken(E)]);d?log("getToken() completed but was canceled"):(log("getToken() completed. Creating connection."),this.authToken_=A&&A.accessToken,this.appCheckToken_=P&&P.token,f=new Connection(c,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,r,a,l,R=>{warn$2(R+" ("+this.repoInfo_.toString()+")"),this.interrupt(SERVER_KILL_INTERRUPT_REASON)},u))}catch(A){this.log_("Failed to get token: "+A),d||(this.repoInfo_.nodeAdmin&&warn$2(A),m())}}}interrupt(r){log("Interrupting connection for reason: "+r),this.interruptReasons_[r]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(r){log("Resuming connection for reason: "+r),delete this.interruptReasons_[r],isEmpty$1(this.interruptReasons_)&&(this.reconnectDelay_=RECONNECT_MIN_DELAY,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(r){const a=r-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:a})}cancelSentTransactions_(){for(let r=0;r<this.outstandingPuts_.length;r++){const a=this.outstandingPuts_[r];a&&"h"in a.request&&a.queued&&(a.onComplete&&a.onComplete("disconnect"),delete this.outstandingPuts_[r],this.outstandingPutCount_--)}this.outstandingPutCount_===0&&(this.outstandingPuts_=[])}onListenRevoked_(r,a){let l;a?l=a.map(u=>ObjectToUniqueKey(u)).join("$"):l="default";const c=this.removeListen_(r,l);c&&c.onComplete&&c.onComplete("permission_denied")}removeListen_(r,a){const l=new Path(r).toString();let c;if(this.listens.has(l)){const u=this.listens.get(l);c=u.get(a),u.delete(a),u.size===0&&this.listens.delete(l)}else c=void 0;return c}onAuthRevoked_(r,a){log("Auth token revoked: "+r+"/"+a),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),(r==="invalid_token"||r==="permission_denied")&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=INVALID_TOKEN_THRESHOLD&&(this.reconnectDelay_=RECONNECT_MAX_DELAY_FOR_ADMINS,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(r,a){log("App check token revoked: "+r+"/"+a),this.appCheckToken_=null,this.forceTokenRefresh_=!0,(r==="invalid_token"||r==="permission_denied")&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=INVALID_TOKEN_THRESHOLD&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(r){this.securityDebugCallback_?this.securityDebugCallback_(r):"msg"in r&&console.log("FIREBASE: "+r.msg.replace(`
1898`,`
1899FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const r of this.listens.values())for(const a of r.values())this.sendListen_(a);for(let r=0;r<this.outstandingPuts_.length;r++)this.outstandingPuts_[r]&&this.sendPut_(r);for(;this.onDisconnectRequestQueue_.length;){const r=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(r.action,r.pathString,r.data,r.onComplete)}for(let r=0;r<this.outstandingGets_.length;r++)this.outstandingGets_[r]&&this.sendGet_(r)}sendConnectStats_(){const r={};let a="js";r["sdk."+a+"."+SDK_VERSION.replace(/\./g,"-")]=1,isMobileCordova()?r["framework.cordova"]=1:isReactNative()&&(r["framework.reactnative"]=1),this.reportStats(r)}shouldReconnect_(){const r=OnlineMonitor.getInstance().currentlyOnline();return isEmpty$1(this.interruptReasons_)&&r}}PersistentConnection.nextPersistentConnectionId_=0;PersistentConnection.nextConnectionId_=0;/**
1900 * @license
1901 * Copyright 2017 Google LLC
1902 *
1903 * Licensed under the Apache License, Version 2.0 (the "License");
vendor: 10,803 bytes, lines 1904-1993
1904 * you may not use this file except in compliance with the License.
1905 * You may obtain a copy of the License at
1906 *
1907 *   http://www.apache.org/licenses/LICENSE-2.0
1908 *
1909 * Unless required by applicable law or agreed to in writing, software
1910 * distributed under the License is distributed on an "AS IS" BASIS,
1911 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1912 * See the License for the specific language governing permissions and
1913 * limitations under the License.
1914 */class NamedNode{constructor(r,a){this.name=r,this.node=a}static Wrap(r,a){return new NamedNode(r,a)}}/**
1915 * @license
1916 * Copyright 2017 Google LLC
1917 *
1918 * Licensed under the Apache License, Version 2.0 (the "License");
1919 * you may not use this file except in compliance with the License.
1920 * You may obtain a copy of the License at
1921 *
1922 *   http://www.apache.org/licenses/LICENSE-2.0
1923 *
1924 * Unless required by applicable law or agreed to in writing, software
1925 * distributed under the License is distributed on an "AS IS" BASIS,
1926 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1927 * See the License for the specific language governing permissions and
1928 * limitations under the License.
1929 */class Index{getCompare(){return this.compare.bind(this)}indexedValueChanged(r,a){const l=new NamedNode(MIN_NAME,r),c=new NamedNode(MIN_NAME,a);return this.compare(l,c)!==0}minPost(){return NamedNode.MIN}}/**
1930 * @license
1931 * Copyright 2017 Google LLC
1932 *
1933 * Licensed under the Apache License, Version 2.0 (the "License");
1934 * you may not use this file except in compliance with the License.
1935 * You may obtain a copy of the License at
1936 *
1937 *   http://www.apache.org/licenses/LICENSE-2.0
1938 *
1939 * Unless required by applicable law or agreed to in writing, software
1940 * distributed under the License is distributed on an "AS IS" BASIS,
1941 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1942 * See the License for the specific language governing permissions and
1943 * limitations under the License.
1944 */let __EMPTY_NODE;class KeyIndex extends Index{static get __EMPTY_NODE(){return __EMPTY_NODE}static set __EMPTY_NODE(r){__EMPTY_NODE=r}compare(r,a){return nameCompare(r.name,a.name)}isDefinedOn(r){throw assertionError("KeyIndex.isDefinedOn not expected to be called.")}indexedValueChanged(r,a){return!1}minPost(){return NamedNode.MIN}maxPost(){return new NamedNode(MAX_NAME,__EMPTY_NODE)}makePost(r,a){return assert(typeof r=="string","KeyIndex indexValue must always be a string."),new NamedNode(r,__EMPTY_NODE)}toString(){return".key"}}const KEY_INDEX=new KeyIndex;/**
1945 * @license
1946 * Copyright 2017 Google LLC
1947 *
1948 * Licensed under the Apache License, Version 2.0 (the "License");
1949 * you may not use this file except in compliance with the License.
1950 * You may obtain a copy of the License at
1951 *
1952 *   http://www.apache.org/licenses/LICENSE-2.0
1953 *
1954 * Unless required by applicable law or agreed to in writing, software
1955 * distributed under the License is distributed on an "AS IS" BASIS,
1956 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1957 * See the License for the specific language governing permissions and
1958 * limitations under the License.
1959 */let SortedMapIterator$1=class{constructor(r,a,l,c,u=null){this.isReverse_=c,this.resultGenerator_=u,this.nodeStack_=[];let d=1;for(;!r.isEmpty();)if(r=r,d=a?l(r.key,a):1,c&&(d*=-1),d<0)this.isReverse_?r=r.left:r=r.right;else if(d===0){this.nodeStack_.push(r);break}else this.nodeStack_.push(r),this.isReverse_?r=r.right:r=r.left}getNext(){if(this.nodeStack_.length===0)return null;let r=this.nodeStack_.pop(),a;if(this.resultGenerator_?a=this.resultGenerator_(r.key,r.value):a={key:r.key,value:r.value},this.isReverse_)for(r=r.left;!r.isEmpty();)this.nodeStack_.push(r),r=r.right;else for(r=r.right;!r.isEmpty();)this.nodeStack_.push(r),r=r.left;return a}hasNext(){return this.nodeStack_.length>0}peek(){if(this.nodeStack_.length===0)return null;const r=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(r.key,r.value):{key:r.key,value:r.value}}},LLRBNode$1=class ps{constructor(r,a,l,c,u){this.key=r,this.value=a,this.color=l??ps.RED,this.left=c??SortedMap$1.EMPTY_NODE,this.right=u??SortedMap$1.EMPTY_NODE}copy(r,a,l,c,u){return new ps(r??this.key,a??this.value,l??this.color,c??this.left,u??this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(r){return this.left.inorderTraversal(r)||!!r(this.key,this.value)||this.right.inorderTraversal(r)}reverseTraversal(r){return this.right.reverseTraversal(r)||r(this.key,this.value)||this.left.reverseTraversal(r)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(r,a,l){let c=this;const u=l(r,c.key);return u<0?c=c.copy(null,null,null,c.left.insert(r,a,l),null):u===0?c=c.copy(null,a,null,null,null):c=c.copy(null,null,null,null,c.right.insert(r,a,l)),c.fixUp_()}removeMin_(){if(this.left.isEmpty())return SortedMap$1.EMPTY_NODE;let r=this;return!r.left.isRed_()&&!r.left.left.isRed_()&&(r=r.moveRedLeft_()),r=r.copy(null,null,null,r.left.removeMin_(),null),r.fixUp_()}remove(r,a){let l,c;if(l=this,a(r,l.key)<0)!l.left.isEmpty()&&!l.left.isRed_()&&!l.left.left.isRed_()&&(l=l.moveRedLeft_()),l=l.copy(null,null,null,l.left.remove(r,a),null);else{if(l.left.isRed_()&&(l=l.rotateRight_()),!l.right.isEmpty()&&!l.right.isRed_()&&!l.right.left.isRed_()&&(l=l.moveRedRight_()),a(r,l.key)===0){if(l.right.isEmpty())return SortedMap$1.EMPTY_NODE;c=l.right.min_(),l=l.copy(c.key,c.value,null,null,l.right.removeMin_())}l=l.copy(null,null,null,null,l.right.remove(r,a))}return l.fixUp_()}isRed_(){return this.color}fixUp_(){let r=this;return r.right.isRed_()&&!r.left.isRed_()&&(r=r.rotateLeft_()),r.left.isRed_()&&r.left.left.isRed_()&&(r=r.rotateRight_()),r.left.isRed_()&&r.right.isRed_()&&(r=r.colorFlip_()),r}moveRedLeft_(){let r=this.colorFlip_();return r.right.left.isRed_()&&(r=r.copy(null,null,null,null,r.right.rotateRight_()),r=r.rotateLeft_(),r=r.colorFlip_()),r}moveRedRight_(){let r=this.colorFlip_();return r.left.left.isRed_()&&(r=r.rotateRight_(),r=r.colorFlip_()),r}rotateLeft_(){const r=this.copy(null,null,ps.RED,null,this.right.left);return this.right.copy(null,null,this.color,r,null)}rotateRight_(){const r=this.copy(null,null,ps.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,r)}colorFlip_(){const r=this.left.copy(null,null,!this.left.color,null,null),a=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,r,a)}checkMaxDepth_(){const r=this.check_();return Math.pow(2,r)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const r=this.left.check_();if(r!==this.right.check_())throw new Error("Black depths differ");return r+(this.isRed_()?0:1)}};LLRBNode$1.RED=!0;LLRBNode$1.BLACK=!1;class LLRBEmptyNode{copy(r,a,l,c,u){return this}insert(r,a,l){return new LLRBNode$1(r,a,null)}remove(r,a){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(r){return!1}reverseTraversal(r){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}}let SortedMap$1=class Vo{constructor(r,a=Vo.EMPTY_NODE){this.comparator_=r,this.root_=a}insert(r,a){return new Vo(this.comparator_,this.root_.insert(r,a,this.comparator_).copy(null,null,LLRBNode$1.BLACK,null,null))}remove(r){return new Vo(this.comparator_,this.root_.remove(r,this.comparator_).copy(null,null,LLRBNode$1.BLACK,null,null))}get(r){let a,l=this.root_;for(;!l.isEmpty();){if(a=this.comparator_(r,l.key),a===0)return l.value;a<0?l=l.left:a>0&&(l=l.right)}return null}getPredecessorKey(r){let a,l=this.root_,c=null;for(;!l.isEmpty();)if(a=this.comparator_(r,l.key),a===0){if(l.left.isEmpty())return c?c.key:null;for(l=l.left;!l.right.isEmpty();)l=l.right;return l.key}else a<0?l=l.left:a>0&&(c=l,l=l.right);throw new Error("Attempted to find predecessor key for a nonexistent key.  What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(r){return this.root_.inorderTraversal(r)}reverseTraversal(r){return this.root_.reverseTraversal(r)}getIterator(r){return new SortedMapIterator$1(this.root_,null,this.comparator_,!1,r)}getIteratorFrom(r,a){return new SortedMapIterator$1(this.root_,r,this.comparator_,!1,a)}getReverseIteratorFrom(r,a){return new SortedMapIterator$1(this.root_,r,this.comparator_,!0,a)}getReverseIterator(r){return new SortedMapIterator$1(this.root_,null,this.comparator_,!0,r)}};SortedMap$1.EMPTY_NODE=new LLRBEmptyNode;/**
1960 * @license
1961 * Copyright 2017 Google LLC
1962 *
1963 * Licensed under the Apache License, Version 2.0 (the "License");
1964 * you may not use this file except in compliance with the License.
1965 * You may obtain a copy of the License at
1966 *
1967 *   http://www.apache.org/licenses/LICENSE-2.0
1968 *
1969 * Unless required by applicable law or agreed to in writing, software
1970 * distributed under the License is distributed on an "AS IS" BASIS,
1971 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1972 * See the License for the specific language governing permissions and
1973 * limitations under the License.
1974 */function NAME_ONLY_COMPARATOR(o,r){return nameCompare(o.name,r.name)}function NAME_COMPARATOR(o,r){return nameCompare(o,r)}/**
1975 * @license
1976 * Copyright 2017 Google LLC
1977 *
1978 * Licensed under the Apache License, Version 2.0 (the "License");
1979 * you may not use this file except in compliance with the License.
1980 * You may obtain a copy of the License at
1981 *
1982 *   http://www.apache.org/licenses/LICENSE-2.0
1983 *
1984 * Unless required by applicable law or agreed to in writing, software
1985 * distributed under the License is distributed on an "AS IS" BASIS,
1986 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1987 * See the License for the specific language governing permissions and
1988 * limitations under the License.
1989 */let MAX_NODE$2;function setMaxNode$1(o){MAX_NODE$2=o}const priorityHashText=function(o){return typeof o=="number"?"number:"+doubleToIEEE754String(o):"string:"+o},validatePriorityNode=function(o){if(o.isLeafNode()){const r=o.val();assert(typeof r=="string"||typeof r=="number"||typeof r=="object"&&contains(r,".sv"),"Priority must be a string or number.")}else assert(o===MAX_NODE$2||o.isEmpty(),"priority of unexpected type.");assert(o===MAX_NODE$2||o.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};/**
1990 * @license
1991 * Copyright 2017 Google LLC
1992 *
1993 * Licensed under the Apache License, Version 2.0 (the "License");
1994 * you may not use this file except in compliance with the License.
1995 * You may obtain a copy of the License at
1996 *
1997 *   http://www.apache.org/licenses/LICENSE-2.0
1998 *
1999 * Unless required by applicable law or agreed to in writing, software
2000 * distributed under the License is distributed on an "AS IS" BASIS,
2001 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2002 * See the License for the specific language governing permissions and
2003 * limitations under the License.
2004 */let __childrenNodeConstructor;class LeafNode{constructor(r,a=LeafNode.__childrenNodeConstructor.EMPTY_NODE){this.value_=r,this.priorityNode_=a,this.lazyHash_=null,assert(this.value_!==void 0&&this.value_!==null,"LeafNode shouldn't be created with null/undefined value."),validatePriorityNode(this.priorityNode_)}static set __childrenNodeConstructor(r){__childrenNodeConstructor=r}static get __childrenNodeConstructor(){return __childrenNodeConstructor}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(r){return new LeafNode(this.value_,r)}getImmediateChild(r){return r===".priority"?this.priorityNode_:LeafNode.__childrenNodeConstructor.EMPTY_NODE}getChild(r){return pathIsEmpty(r)?this:pathGetFront(r)===".priority"?this.priorityNode_:LeafNode.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(r,a){return null}updateImmediateChild(r,a){return r===".priority"?this.updatePriority(a):a.isEmpty()&&r!==".priority"?this:LeafNode.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(r,a).updatePriority(this.priorityNode_)}updateChild(r,a){const l=pathGetFront(r);return l===null?a:a.isEmpty()&&l!==".priority"?this:(assert(l!==".priority"||pathGetLength(r)===1,".priority must be the last token in a path"),this.updateImmediateChild(l,LeafNode.__childrenNodeConstructor.EMPTY_NODE.updateChild(pathPopFront(r),a)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(r,a){return!1}val(r){return r&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(this.lazyHash_===null){let r="";this.priorityNode_.isEmpty()||(r+="priority:"+priorityHashText(this.priorityNode_.val())+":");const a=typeof this.value_;r+=a+":",a==="number"?r+=doubleToIEEE754String(this.value_):r+=this.value_,this.lazyHash_=sha1(r)}return this.lazyHash_}getValue(){return this.value_}compareTo(r){return r===LeafNode.__childrenNodeConstructor.EMPTY_NODE?1:r instanceof LeafNode.__childrenNodeConstructor?-1:(assert(r.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(r))}compareToLeafNode_(r){const a=typeof r.value_,l=typeof this.value_,c=LeafNode.VALUE_TYPE_ORDER.indexOf(a),u=LeafNode.VALUE_TYPE_ORDER.indexOf(l);return assert(c>=0,"Unknown leaf type: "+a),assert(u>=0,"Unknown leaf type: "+l),c===u?l==="object"?0:this.value_<r.value_?-1:this.value_===r.value_?0:1:u-c}withIndex(){return this}isIndexed(){return!0}equals(r){if(r===this)return!0;if(r.isLeafNode()){const a=r;return this.value_===a.value_&&this.priorityNode_.equals(a.priorityNode_)}else return!1}}LeafNode.VALUE_TYPE_ORDER=["object","boolean","number","string"];/**
2005 * @license
2006 * Copyright 2017 Google LLC
2007 *
2008 * Licensed under the Apache License, Version 2.0 (the "License");
2009 * you may not use this file except in compliance with the License.
2010 * You may obtain a copy of the License at
2011 *
2012 *   http://www.apache.org/licenses/LICENSE-2.0
2013 *
2014 * Unless required by applicable law or agreed to in writing, software
2015 * distributed under the License is distributed on an "AS IS" BASIS,
2016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2017 * See the License for the specific language governing permissions and
2018 * limitations under the License.
2019 */let nodeFromJSON$1,MAX_NODE$1;function setNodeFromJSON(o){nodeFromJSON$1=o}function setMaxNode(o){MAX_NODE$1=o}class PriorityIndex extends Index{compare(r,a){const l=r.node.getPriority(),c=a.node.getPriority(),u=l.compareTo(c);return u===0?nameCompare(r.name,a.name):u}isDefinedOn(r){return!r.getPriority().isEmpty()}indexedValueChanged(r,a){return!r.getPriority().equals(a.getPriority())}
2019minPost(){return NamedNode.MIN}maxPost(){return new NamedNode(MAX_NAME,new LeafNode("[PRIORITY-POST]",MAX_NODE$1))}makePost(r,a){const l=nodeFromJSON$1(r);return new NamedNode(a,new LeafNode("[PRIORITY-POST]",l))}toString(){return".priority"}}const PRIORITY_INDEX=new PriorityIndex;/**
2020 * @license
2021 * Copyright 2017 Google LLC
2022 *
2023 * Licensed under the Apache License, Version 2.0 (the "License");
2024 * you may not use this file except in compliance with the License.
2025 * You may obtain a copy of the License at
2026 *
2027 *   http://www.apache.org/licenses/LICENSE-2.0
2028 *
2029 * Unless required by applicable law or agreed to in writing, software
2030 * distributed under the License is distributed on an "AS IS" BASIS,
2031 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2032 * See the License for the specific language governing permissions and
2033 * limitations under the License.
2034 */const LOG_2=Math.log(2);class Base12Num{constructor(r){const a=u=>parseInt(Math.log(u)/LOG_2,10),l=u=>parseInt(Array(u+1).join("1"),2);this.count=a(r+1),this.current_=this.count-1;const c=l(this.count);this.bits_=r+1&c}nextBitIsOne(){const r=!(this.bits_&1<<this.current_);return this.current_--,r}}const buildChildSet=function(o,r,a,l){o.sort(r);const c=function(m,y){const E=y-m;let A,P;if(E===0)return null;if(E===1)return A=o[m],P=a?a(A):A,new LLRBNode$1(P,A.node,LLRBNode$1.BLACK,null,null);{const R=parseInt(E/2,10)+m,x=c(m,R),M=c(R+1,y);return A=o[R],P=a?a(A):A,new LLRBNode$1(P,A.node,LLRBNode$1.BLACK,x,M)}},u=function(m){let y=null,E=null,A=o.length;const P=function(x,M){const $=A-x,V=A;A-=x;const B=c($+1,V),O=o[$],L=a?a(O):O;R(new LLRBNode$1(L,O.node,M,null,B))},R=function(x){y?(y.left=x,y=x):(E=x,y=x)};for(let x=0;x<m.count;++x){const M=m.nextBitIsOne(),$=Math.pow(2,m.count-(x+1));M?P($,LLRBNode$1.BLACK):(P($,LLRBNode$1.BLACK),P($,LLRBNode$1.RED))}return E},d=new Base12Num(o.length),f=u(d);return new SortedMap$1(l||r,f)};/**
2035 * @license
2036 * Copyright 2017 Google LLC
2037 *
2038 * Licensed under the Apache License, Version 2.0 (the "License");
2039 * you may not use this file except in compliance with the License.
2040 * You may obtain a copy of the License at
2041 *
2042 *   http://www.apache.org/licenses/LICENSE-2.0
2043 *
2044 * Unless required by applicable law or agreed to in writing, software
2045 * distributed under the License is distributed on an "AS IS" BASIS,
2046 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2047 * See the License for the specific language governing permissions and
2048 * limitations under the License.
2049 */let _defaultIndexMap;const fallbackObject={};class IndexMap{constructor(r,a){this.indexes_=r,this.indexSet_=a}static get Default(){return assert(fallbackObject&&PRIORITY_INDEX,"ChildrenNode.ts has not been loaded"),_defaultIndexMap=_defaultIndexMap||new IndexMap({".priority":fallbackObject},{".priority":PRIORITY_INDEX}),_defaultIndexMap}get(r){const a=safeGet(this.indexes_,r);if(!a)throw new Error("No index defined for "+r);return a instanceof SortedMap$1?a:null}hasIndex(r){return contains(this.indexSet_,r.toString())}addIndex(r,a){assert(r!==KEY_INDEX,"KeyIndex always exists and isn't meant to be added to the IndexMap.");const l=[];let c=!1;const u=a.getIterator(NamedNode.Wrap);let d=u.getNext();for(;d;)c=c||r.isDefinedOn(d.node),l.push(d),d=u.getNext();let f;c?f=buildChildSet(l,r.getCompare()):f=fallbackObject;const m=r.toString(),y=Object.assign({},this.indexSet_);y[m]=r;const E=Object.assign({},this.indexes_);return E[m]=f,new IndexMap(E,y)}addToIndexes(r,a){const l=map$1(this.indexes_,(c,u)=>{const d=safeGet(this.indexSet_,u);if(assert(d,"Missing index implementation for "+u),c===fallbackObject)if(d.isDefinedOn(r.node)){const f=[],m=a.getIterator(NamedNode.Wrap);let y=m.getNext();for(;y;)y.name!==r.name&&f.push(y),y=m.getNext();return f.push(r),buildChildSet(f,d.getCompare())}else return fallbackObject;else{const f=a.get(r.name);let m=c;return f&&(m=m.remove(new NamedNode(r.name,f))),m.insert(r,r.node)}});return new IndexMap(l,this.indexSet_)}removeFromIndexes(r,a){const l=map$1(this.indexes_,c=>{if(c===fallbackObject)return c;{const u=a.get(r.name);return u?c.remove(new NamedNode(r.name,u)):c}});return new IndexMap(l,this.indexSet_)}}/**
2050 * @license
2051 * Copyright 2017 Google LLC
2052 *
2053 * Licensed under the Apache License, Version 2.0 (the "License");
2054 * you may not use this file except in compliance with the License.
2055 * You may obtain a copy of the License at
2056 *
2057 *   http://www.apache.org/licenses/LICENSE-2.0
2058 *
2059 * Unless required by applicable law or agreed to in writing, software
2060 * distributed under the License is distributed on an "AS IS" BASIS,
2061 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2062 * See the License for the specific language governing permissions and
2063 * limitations under the License.
2064 */let EMPTY_NODE;class ChildrenNode{constructor(r,a,l){this.children_=r,this.priorityNode_=a,this.indexMap_=l,this.lazyHash_=null,this.priorityNode_&&validatePriorityNode(this.priorityNode_),this.children_.isEmpty()&&assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return EMPTY_NODE||(EMPTY_NODE=new ChildrenNode(new SortedMap$1(NAME_COMPARATOR),null,IndexMap.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||EMPTY_NODE}updatePriority(r){return this.children_.isEmpty()?this:new ChildrenNode(this.children_,r,this.indexMap_)}getImmediateChild(r){if(r===".priority")return this.getPriority();{const a=this.children_.get(r);return a===null?EMPTY_NODE:a}}getChild(r){const a=pathGetFront(r);return a===null?this:this.getImmediateChild(a).getChild(pathPopFront(r))}hasChild(r){return this.children_.get(r)!==null}updateImmediateChild(r,a){if(assert(a,"We should always be passing snapshot nodes"),r===".priority")return this.updatePriority(a);{const l=new NamedNode(r,a);let c,u;a.isEmpty()?(c=this.children_.remove(r),u=this.indexMap_.removeFromIndexes(l,this.children_)):(c=this.children_.insert(r,a),u=this.indexMap_.addToIndexes(l,this.children_));const d=c.isEmpty()?EMPTY_NODE:this.priorityNode_;return new ChildrenNode(c,d,u)}}updateChild(r,a){const l=pathGetFront(r);if(l===null)return a;{assert(pathGetFront(r)!==".priority"||pathGetLength(r)===1,".priority must be the last token in a path");const c=this.getImmediateChild(l).updateChild(pathPopFront(r),a);return this.updateImmediateChild(l,c)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(r){if(this.isEmpty())return null;const a={};let l=0,c=0,u=!0;if(this.forEachChild(PRIORITY_INDEX,(d,f)=>{a[d]=f.val(r),l++,u&&ChildrenNode.INTEGER_REGEXP_.test(d)?c=Math.max(c,Number(d)):u=!1}),!r&&u&&c<2*l){const d=[];for(const f in a)d[f]=a[f];return d}else return r&&!this.getPriority().isEmpty()&&(a[".priority"]=this.getPriority().val()),a}hash(){if(this.lazyHash_===null){let r="";this.getPriority().isEmpty()||(r+="priority:"+priorityHashText(this.getPriority().val())+":"),this.forEachChild(PRIORITY_INDEX,(a,l)=>{const c=l.hash();c!==""&&(r+=":"+a+":"+c)}),this.lazyHash_=r===""?"":sha1(r)}return this.lazyHash_}getPredecessorChildName(r,a,l){const c=this.resolveIndex_(l);if(c){const u=c.getPredecessorKey(new NamedNode(r,a));return u?u.name:null}else return this.children_.getPredecessorKey(r)}getFirstChildName(r){const a=this.resolveIndex_(r);if(a){const l=a.minKey();return l&&l.name}else return this.children_.minKey()}getFirstChild(r){const a=this.getFirstChildName(r);return a?new NamedNode(a,this.children_.get(a)):null}getLastChildName(r){const a=this.resolveIndex_(r);if(a){const l=a.maxKey();return l&&l.name}else return this.children_.maxKey()}getLastChild(r){const a=this.getLastChildName(r);return a?new NamedNode(a,this.children_.get(a)):null}forEachChild(r,a){const l=this.resolveIndex_(r);return l?l.inorderTraversal(c=>a(c.name,c.node)):this.children_.inorderTraversal(a)}getIterator(r){return this.getIteratorFrom(r.minPost(),r)}getIteratorFrom(r,a){const l=this.resolveIndex_(a);if(l)return l.getIteratorFrom(r,c=>c);{const c=this.children_.getIteratorFrom(r.name,NamedNode.Wrap);let u=c.peek();for(;u!=null&&a.compare(u,r)<0;)c.getNext(),u=c.peek();return c}}getReverseIterator(r){return this.getReverseIteratorFrom(r.maxPost(),r)}getReverseIteratorFrom(r,a){const l=this.resolveIndex_(a);if(l)return l.getReverseIteratorFrom(r,c=>c);{const c=this.children_.getReverseIteratorFrom(r.name,NamedNode.Wrap);let u=c.peek();for(;u!=null&&a.compare(u,r)>0;)c.getNext(),u=c.peek();return c}}compareTo(r){return this.isEmpty()?r.isEmpty()?0:-1:r.isLeafNode()||r.isEmpty()?1:r===MAX_NODE?-1:0}withIndex(r){if(r===KEY_INDEX||this.indexMap_.hasIndex(r))return this;{const a=this.indexMap_.addIndex(r,this.children_);return new ChildrenNode(this.children_,this.priorityNode_,a)}}isIndexed(r){return r===KEY_INDEX||this.indexMap_.hasIndex(r)}equals(r){if(r===this)return!0;
2064if(r.isLeafNode())return!1;{const a=r;if(this.getPriority().equals(a.getPriority()))if(this.children_.count()===a.children_.count()){const l=this.getIterator(PRIORITY_INDEX),c=a.getIterator(PRIORITY_INDEX);let u=l.getNext(),d=c.getNext();for(;u&&d;){if(u.name!==d.name||!u.node.equals(d.node))return!1;u=l.getNext(),d=c.getNext()}return u===null&&d===null}else return!1;else return!1}}resolveIndex_(r){return r===KEY_INDEX?null:this.indexMap_.get(r.toString())}}ChildrenNode.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;class MaxNode extends ChildrenNode{constructor(){super(new SortedMap$1(NAME_COMPARATOR),ChildrenNode.EMPTY_NODE,IndexMap.Default)}compareTo(r){return r===this?0:1}equals(r){return r===this}getPriority(){return this}getImmediateChild(r){return ChildrenNode.EMPTY_NODE}isEmpty(){return!1}}const MAX_NODE=new MaxNode;Object.defineProperties(NamedNode,{MIN:{value:new NamedNode(MIN_NAME,ChildrenNode.EMPTY_NODE)},MAX:{value:new NamedNode(MAX_NAME,MAX_NODE)}});KeyIndex.__EMPTY_NODE=ChildrenNode.EMPTY_NODE;LeafNode.__childrenNodeConstructor=ChildrenNode;setMaxNode$1(MAX_NODE);setMaxNode(MAX_NODE);/**
2065 * @license
2066 * Copyright 2017 Google LLC
2067 *
2068 * Licensed under the Apache License, Version 2.0 (the "License");
2069 * you may not use this file except in compliance with the License.
2070 * You may obtain a copy of the License at
2071 *
2072 *   http://www.apache.org/licenses/LICENSE-2.0
2073 *
2074 * Unless required by applicable law or agreed to in writing, software
2075 * distributed under the License is distributed on an "AS IS" BASIS,
2076 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2077 * See the License for the specific language governing permissions and
2078 * limitations under the License.
2079 */const USE_HINZE=!0;function nodeFromJSON(o,r=null){if(o===null)return ChildrenNode.EMPTY_NODE;if(typeof o=="object"&&".priority"in o&&(r=o[".priority"]),assert(r===null||typeof r=="string"||typeof r=="number"||typeof r=="object"&&".sv"in r,"Invalid priority type found: "+typeof r),typeof o=="object"&&".value"in o&&o[".value"]!==null&&(o=o[".value"]),typeof o!="object"||".sv"in o){const a=o;return new LeafNode(a,nodeFromJSON(r))}if(!(o instanceof Array)&&USE_HINZE){const a=[];let l=!1;if(each(o,(d,f)=>{if(d.substring(0,1)!=="."){const m=nodeFromJSON(f);m.isEmpty()||(l=l||!m.getPriority().isEmpty(),a.push(new NamedNode(d,m)))}}),a.length===0)return ChildrenNode.EMPTY_NODE;const u=buildChildSet(a,NAME_ONLY_COMPARATOR,d=>d.name,NAME_COMPARATOR);if(l){const d=buildChildSet(a,PRIORITY_INDEX.getCompare());return new ChildrenNode(u,nodeFromJSON(r),new IndexMap({".priority":d},{".priority":PRIORITY_INDEX}))}else return new ChildrenNode(u,nodeFromJSON(r),IndexMap.Default)}else{let a=ChildrenNode.EMPTY_NODE;return each(o,(l,c)=>{if(contains(o,l)&&l.substring(0,1)!=="."){const u=nodeFromJSON(c);(u.isLeafNode()||!u.isEmpty())&&(a=a.updateImmediateChild(l,u))}}),a.updatePriority(nodeFromJSON(r))}}setNodeFromJSON(nodeFromJSON);/**
2080 * @license
2081 * Copyright 2017 Google LLC
2082 *
2083 * Licensed under the Apache License, Version 2.0 (the "License");
2084 * you may not use this file except in compliance with the License.
2085 * You may obtain a copy of the License at
2086 *
2087 *   http://www.apache.org/licenses/LICENSE-2.0
2088 *
2089 * Unless required by applicable law or agreed to in writing, software
2090 * distributed under the License is distributed on an "AS IS" BASIS,
2091 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2092 * See the License for the specific language governing permissions and
2093 * limitations under the License.
2094 */class PathIndex extends Index{constructor(r){super(),this.indexPath_=r,assert(!pathIsEmpty(r)&&pathGetFront(r)!==".priority","Can't create PathIndex with empty path or .priority key")}extractChild(r){return r.getChild(this.indexPath_)}isDefinedOn(r){return!r.getChild(this.indexPath_).isEmpty()}compare(r,a){const l=this.extractChild(r.node),c=this.extractChild(a.node),u=l.compareTo(c);return u===0?nameCompare(r.name,a.name):u}makePost(r,a){const l=nodeFromJSON(r),c=ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_,l);return new NamedNode(a,c)}maxPost(){const r=ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_,MAX_NODE);return new NamedNode(MAX_NAME,r)}toString(){return pathSlice(this.indexPath_,0).join("/")}}/**
2095 * @license
2096 * Copyright 2017 Google LLC
2097 *
2098 * Licensed under the Apache License, Version 2.0 (the "License");
2099 * you may not use this file except in compliance with the License.
2100 * You may obtain a copy of the License at
2101 *
2102 *   http://www.apache.org/licenses/LICENSE-2.0
2103 *
2104 * Unless required by applicable law or agreed to in writing, software
2105 * distributed under the License is distributed on an "AS IS" BASIS,
2106 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2107 * See the License for the specific language governing permissions and
2108 * limitations under the License.
2109 */class ValueIndex extends Index{compare(r,a){const l=r.node.compareTo(a.node);return l===0?nameCompare(r.name,a.name):l}isDefinedOn(r){return!0}indexedValueChanged(r,a){return!r.equals(a)}minPost(){return NamedNode.MIN}maxPost(){return NamedNode.MAX}makePost(r,a){const l=nodeFromJSON(r);return new NamedNode(a,l)}toString(){return".value"}}const VALUE_INDEX=new ValueIndex;/**
2110 * @license
2111 * Copyright 2017 Google LLC
2112 *
2113 * Licensed under the Apache License, Version 2.0 (the "License");
2114 * you may not use this file except in compliance with the License.
2115 * You may obtain a copy of the License at
2116 *
2117 *   http://www.apache.org/licenses/LICENSE-2.0
2118 *
2119 * Unless required by applicable law or agreed to in writing, software
2120 * distributed under the License is distributed on an "AS IS" BASIS,
2121 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2122 * See the License for the specific language governing permissions and
2123 * limitations under the License.
2124 */function changeValue(o){return{type:"value",snapshotNode:o}}function changeChildAdded(o,r){return{type:"child_added",snapshotNode:r,childName:o}}function changeChildRemoved(o,r){return{type:"child_removed",snapshotNode:r,childName:o}}function changeChildChanged(o,r,a){return{type:"child_changed",snapshotNode:r,childName:o,oldSnap:a}}function changeChildMoved(o,r){return{type:"child_moved",snapshotNode:r,childName:o}}/**
2125 * @license
2126 * Copyright 2017 Google LLC
2127 *
2128 * Licensed under the Apache License, Version 2.0 (the "License");
2129 * you may not use this file except in compliance with the License.
2130 * You may obtain a copy of the License at
2131 *
2132 *   http://www.apache.org/licenses/LICENSE-2.0
2133 *
2134 * Unless required by applicable law or agreed to in writing, software
2135 * distributed under the License is distributed on an "AS IS" BASIS,
2136 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2137 * See the License for the specific language governing permissions and
2138 * limitations under the License.
2139 */class IndexedFilter{constructor(r){this.index_=r}updateChild(r,a,l,c,u,d){assert(r.isIndexed(this.index_),"A node must be indexed if only a child is updated");const f=r.getImmediateChild(a);return f.getChild(c).equals(l.getChild(c))&&f.isEmpty()===l.isEmpty()||(d!=null&&(l.isEmpty()?r.hasChild(a)?d.trackChildChange(changeChildRemoved(a,f)):assert(r.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):f.isEmpty()?d.trackChildChange(changeChildAdded(a,l)):d.trackChildChange(changeChildChanged(a,l,f))),r.isLeafNode()&&l.isEmpty())?r:r.updateImmediateChild(a,l).withIndex(this.index_)}updateFullNode(r,a,l){return l!=null&&(r.isLeafNode()||r.forEachChild(PRIORITY_INDEX,(c,u)=>{a.hasChild(c)||l.trackChildChange(changeChildRemoved(c,u))}),a.isLeafNode()||a.forEachChild(PRIORITY_INDEX,(c,u)=>{if(r.hasChild(c)){const d=r.getImmediateChild(c);d.equals(u)||l.trackChildChange(changeChildChanged(c,u,d))}else l.trackChildChange(changeChildAdded(c,u))})),a.withIndex(this.index_)}updatePriority(r,a){return r.isEmpty()?ChildrenNode.EMPTY_NODE:r.updatePriority(a)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}/**
2140 * @license
2141 * Copyright 2017 Google LLC
2142 *
2143 * Licensed under the Apache License, Version 2.0 (the "License");
2144 * you may not use this file except in compliance with the License.
2145 * You may obtain a copy of the License at
2146 *
2147 *   http://www.apache.org/licenses/LICENSE-2.0
2148 *
2149 * Unless required by applicable law or agreed to in writing, software
2150 * distributed under the License is distributed on an "AS IS" BASIS,
2151 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2152 * See the License for the specific language governing permissions and
2153 * limitations under the License.
2154 */class RangedFilter{constructor(r){this.indexedFilter_=new IndexedFilter(r.getIndex()),this.index_=r.getIndex(),this.startPost_=RangedFilter.getStartPost_(r),this.endPost_=RangedFilter.getEndPost_(r),this.startIsInclusive_=!r.startAfterSet_,this.endIsInclusive_=!r.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(r){const a=this.startIsInclusive_?this.index_.compare(this.getStartPost(),r)<=0:this.index_.compare(this.getStartPost(),r)<0,l=this.endIsInclusive_?this.index_.compare(r,this.getEndPost())<=0:this.index_.compare(r,this.getEndPost())<0;return a&&l}updateChild(r,a,l,c,u,d){return this.matches(new NamedNode(a,l))||(l=ChildrenNode.EMPTY_NODE),this.indexedFilter_.updateChild(r,a,l,c,u,d)}updateFullNode(r,a,l){a.isLeafNode()&&(a=ChildrenNode.EMPTY_NODE);let c=a.withIndex(this.index_);c=c.updatePriority(ChildrenNode.EMPTY_NODE);const u=this;return a.forEachChild(PRIORITY_INDEX,(d,f)=>{u.matches(new NamedNode(d,f))||(c=c.updateImmediateChild(d,ChildrenNode.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(r,c,l)}updatePriority(r,a){return r}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(r){if(r.hasStart()){const a=r.getIndexStartName();return r.getIndex().makePost(r.getIndexStartValue(),a)}else return r.getIndex().minPost()}static getEndPost_(r){if(r.hasEnd()){const a=r.getIndexEndName();return r.getIndex().makePost(r.getIndexEndValue(),a)}else return r.getIndex().maxPost()}}/**
2155 * @license
2156 * Copyright 2017 Google LLC
2157 *
2158 * Licensed under the Apache License, Version 2.0 (the "License");
2159 * you may not use this file except in compliance with the License.
2160 * You may obtain a copy of the License at
2161 *
2162 *   http://www.apache.org/licenses/LICENSE-2.0
2163 *
2164 * Unless required by applicable law or agreed to in writing, software
2165 * distributed under the License is distributed on an "AS IS" BASIS,
2166 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2167 * See the License for the specific language governing permissions and
2168 * limitations under the License.
2169 */class LimitedFilter{constructor(r){this.withinDirectionalStart=a=>this.reverse_?this.withinEndPost(a):this.withinStartPost(a),this.withinDirectionalEnd=a=>this.reverse_?this.withinStartPost(a):this.withinEndPost(a),this.withinStartPost=a=>{const l=this.index_.compare(this.rangedFilter_.getStartPost(),a);return this.startIsInclusive_?l<=0:l<0},this.withinEndPost=a=>{const l=this.index_.compare(a,this.rangedFilter_.getEndPost());return this.endIsInclusive_?l<=0:l<0},this.rangedFilter_=new RangedFilter(r),this.index_=r.getIndex(),this.limit_=r.getLimit(),this.reverse_=!r.isViewFromLeft(),this.startIsInclusive_=!r.startAfterSet_,this.endIsInclusive_=!r.endBeforeSet_}updateChild(r,a,l,c,u,d){return this.rangedFilter_.matches(new NamedNode(a,l))||(l=ChildrenNode.EMPTY_NODE),r.getImmediateChild(a).equals(l)?r:r.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(r,a,l,c,u,d):this.fullLimitUpdateChild_(r,a,l,u,d)}updateFullNode(r,a,l){let c;if(a.isLeafNode()||a.isEmpty())c=ChildrenNode.EMPTY_NODE.withIndex(this.index_);else if(this.limit_*2<a.numChildren()&&a.isIndexed(this.index_)){c=ChildrenNode.EMPTY_NODE.withIndex(this.index_);let u;this.reverse_?u=a.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):u=a.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);let d=0;for(;u.hasNext()&&d<this.limit_;){const f=u.getNext();if(this.withinDirectionalStart(f))if(this.withinDirectionalEnd(f))c=c.updateImmediateChild(f.name,f.node),d++;else break;else continue}}else{c=a.withIndex(this.index_),c=c.updatePriority(ChildrenNode.EMPTY_NODE);let u;this.reverse_?u=c.getReverseIterator(this.index_):u=c.getIterator(this.index_);let d=0;for(;u.hasNext();){const f=u.getNext();d<this.limit_&&this.withinDirectionalStart(f)&&this.withinDirectionalEnd(f)?d++:c=c.updateImmediateChild(f.name,ChildrenNode.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(r,c,l)}updatePriority(r,a){return r}filtersNodes(){return!0}getIndexedFilter(){return this.rangedFilter_.getIndexedFilter()}getIndex(){return this.index_}
2169fullLimitUpdateChild_(r,a,l,c,u){let d;if(this.reverse_){const A=this.index_.getCompare();d=(P,R)=>A(R,P)}else d=this.index_.getCompare();const f=r;assert(f.numChildren()===this.limit_,"");const m=new NamedNode(a,l),y=this.reverse_?f.getFirstChild(this.index_):f.getLastChild(this.index_),E=this.rangedFilter_.matches(m);if(f.hasChild(a)){const A=f.getImmediateChild(a);let P=c.getChildAfterChild(this.index_,y,this.reverse_);for(;P!=null&&(P.name===a||f.hasChild(P.name));)P=c.getChildAfterChild(this.index_,P,this.reverse_);const R=P==null?1:d(P,m);if(E&&!l.isEmpty()&&R>=0)return u!=null&&u.trackChildChange(changeChildChanged(a,l,A)),f.updateImmediateChild(a,l);{u!=null&&u.trackChildChange(changeChildRemoved(a,A));const M=f.updateImmediateChild(a,ChildrenNode.EMPTY_NODE);return P!=null&&this.rangedFilter_.matches(P)?(u!=null&&u.trackChildChange(changeChildAdded(P.name,P.node)),M.updateImmediateChild(P.name,P.node)):M}}else return l.isEmpty()?r:E&&d(y,m)>=0?(u!=null&&(u.trackChildChange(changeChildRemoved(y.name,y.node)),u.trackChildChange(changeChildAdded(a,l))),f.updateImmediateChild(a,l).updateImmediateChild(y.name,ChildrenNode.EMPTY_NODE)):r}}/**
2170 * @license
2171 * Copyright 2017 Google LLC
2172 *
2173 * Licensed under the Apache License, Version 2.0 (the "License");
2174 * you may not use this file except in compliance with the License.
2175 * You may obtain a copy of the License at
2176 *
2177 *   http://www.apache.org/licenses/LICENSE-2.0
2178 *
2179 * Unless required by applicable law or agreed to in writing, software
2180 * distributed under the License is distributed on an "AS IS" BASIS,
2181 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2182 * See the License for the specific language governing permissions and
2183 * limitations under the License.
2184 */class QueryParams{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=PRIORITY_INDEX}hasStart(){return this.startSet_}isViewFromLeft(){return this.viewFrom_===""?this.startSet_:this.viewFrom_==="l"}getIndexStartValue(){return assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:MIN_NAME}hasEnd(){return this.endSet_}getIndexEndValue(){return assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:MAX_NAME}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&this.viewFrom_!==""}getLimit(){return assert(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===PRIORITY_INDEX}copy(){const r=new QueryParams;return r.limitSet_=this.limitSet_,r.limit_=this.limit_,r.startSet_=this.startSet_,r.startAfterSet_=this.startAfterSet_,r.indexStartValue_=this.indexStartValue_,r.startNameSet_=this.startNameSet_,r.indexStartName_=this.indexStartName_,r.endSet_=this.endSet_,r.endBeforeSet_=this.endBeforeSet_,r.indexEndValue_=this.indexEndValue_,r.endNameSet_=this.endNameSet_,r.indexEndName_=this.indexEndName_,r.index_=this.index_,r.viewFrom_=this.viewFrom_,r}}function queryParamsGetNodeFilter(o){return o.loadsAllData()?new IndexedFilter(o.getIndex()):o.hasLimit()?new LimitedFilter(o):new RangedFilter(o)}function queryParamsToRestQueryStringParameters(o){const r={};if(o.isDefault())return r;let a;if(o.index_===PRIORITY_INDEX?a="$priority":o.index_===VALUE_INDEX?a="$value":o.index_===KEY_INDEX?a="$key":(assert(o.index_ instanceof PathIndex,"Unrecognized index type!"),a=o.index_.toString()),r.orderBy=stringify(a),o.startSet_){const l=o.startAfterSet_?"startAfter":"startAt";r[l]=stringify(o.indexStartValue_),o.startNameSet_&&(r[l]+=","+stringify(o.indexStartName_))}if(o.endSet_){const l=o.endBeforeSet_?"endBefore":"endAt";r[l]=stringify(o.indexEndValue_),o.endNameSet_&&(r[l]+=","+stringify(o.indexEndName_))}return o.limitSet_&&(o.isViewFromLeft()?r.limitToFirst=o.limit_:r.limitToLast=o.limit_),r}function queryParamsGetQueryObject(o){const r={};if(o.startSet_&&(r.sp=o.indexStartValue_,o.startNameSet_&&(r.sn=o.indexStartName_),r.sin=!o.startAfterSet_),o.endSet_&&(r.ep=o.indexEndValue_,o.endNameSet_&&(r.en=o.indexEndName_),r.ein=!o.endBeforeSet_),o.limitSet_){r.l=o.limit_;let a=o.viewFrom_;a===""&&(o.isViewFromLeft()?a="l":a="r"),r.vf=a}return o.index_!==PRIORITY_INDEX&&(r.i=o.index_.toString()),r}/**
2185 * @license
2186 * Copyright 2017 Google LLC
2187 *
2188 * Licensed under the Apache License, Version 2.0 (the "License");
2189 * you may not use this file except in compliance with the License.
2190 * You may obtain a copy of the License at
2191 *
2192 *   http://www.apache.org/licenses/LICENSE-2.0
2193 *
2194 * Unless required by applicable law or agreed to in writing, software
2195 * distributed under the License is distributed on an "AS IS" BASIS,
2196 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2197 * See the License for the specific language governing permissions and
2198 * limitations under the License.
2199 */class ReadonlyRestClient extends ServerActions{constructor(r,a,l,c){super(),this.repoInfo_=r,this.onDataUpdate_=a,this.authTokenProvider_=l,this.appCheckTokenProvider_=c,this.log_=logWrapper("p:rest:"),this.listens_={}}reportStats(r){throw new Error("Method not implemented.")}static getListenId_(r,a){return a!==void 0?"tag$"+a:(assert(r._queryParams.isDefault(),"should have a tag if it's not a default query."),r._path.toString())}listen(r,a,l,c){const u=r._path.toString();this.log_("Listen called for "+u+" "+r._queryIdentifier);const d=ReadonlyRestClient.getListenId_(r,l),f={};this.listens_[d]=f;const m=queryParamsToRestQueryStringParameters(r._queryParams);this.restRequest_(u+".json",m,(y,E)=>{let A=E;if(y===404&&(A=null,y=null),y===null&&this.onDataUpdate_(u,A,!1,l),safeGet(this.listens_,d)===f){let P;y?y===401?P="permission_denied":P="rest_error:"+y:P="ok",c(P,null)}})}unlisten(r,a){const l=ReadonlyRestClient.getListenId_(r,a);delete this.listens_[l]}get(r){const a=queryParamsToRestQueryStringParameters(r._queryParams),l=r._path.toString(),c=new Deferred$1;return this.restRequest_(l+".json",a,(u,d)=>{let f=d;u===404&&(f=null,u=null),u===null?(this.onDataUpdate_(l,f,!1,null),c.resolve(f)):c.reject(new Error(f))}),c.promise}refreshAuthToken(r){}restRequest_(r,a={},l){return a.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([c,u])=>{c&&c.accessToken&&(a.auth=c.accessToken),u&&u.token&&(a.ac=u.token);const d=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+r+"?ns="+this.repoInfo_.namespace+querystring(a);this.log_("Sending REST request for "+d);const f=new XMLHttpRequest;f.onreadystatechange=()=>{if(l&&f.readyState===4){this.log_("REST Response for "+d+" received. status:",f.status,"response:",f.responseText);let m=null;if(f.status>=200&&f.status<300){try{m=jsonEval(f.responseText)}catch{warn$2("Failed to parse JSON response for "+d+": "+f.responseText)}l(null,m)}else f.status!==401&&f.status!==404&&warn$2("Got unsuccessful REST response for "+d+" Status: "+f.status),l(f.status);l=null}},f.open("GET",d,!0),f.send()})}}/**
2200 * @license
2201 * Copyright 2017 Google LLC
2202 *
2203 * Licensed under the Apache License, Version 2.0 (the "License");
2204 * you may not use this file except in compliance with the License.
2205 * You may obtain a copy of the License at
2206 *
2207 *   http://www.apache.org/licenses/LICENSE-2.0
2208 *
2209 * Unless required by applicable law or agreed to in writing, software
2210 * distributed under the License is distributed on an "AS IS" BASIS,
2211 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2212 * See the License for the specific language governing permissions and
2213 * limitations under the License.
2214 */class SnapshotHolder{constructor(){this.rootNode_=ChildrenNode.EMPTY_NODE}getNode(r){return this.rootNode_.getChild(r)}updateSnapshot(r,a){this.rootNode_=this.rootNode_.updateChild(r,a)}}/**
2215 * @license
2216 * Copyright 2017 Google LLC
2217 *
2218 * Licensed under the Apache License, Version 2.0 (the "License");
2219 * you may not use this file except in compliance with the License.
2220 * You may obtain a copy of the License at
2221 *
2222 *   http://www.apache.org/licenses/LICENSE-2.0
2223 *
2224 * Unless required by applicable law or agreed to in writing, software
2225 * distributed under the License is distributed on an "AS IS" BASIS,
2226 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2227 * See the License for the specific language governing permissions and
2228 * limitations under the License.
2229 */function newSparseSnapshotTree(){return{value:null,children:new Map}}function sparseSnapshotTreeRemember(o,r,a){if(pathIsEmpty(r))o.value=a,o.children.clear();else if(o.value!==null)o.value=o.value.updateChild(r,a);else{const l=pathGetFront(r);o.children.has(l)||o.children.set(l,newSparseSnapshotTree());const c=o.children.get(l);r=pathPopFront(r),sparseSnapshotTreeRemember(c,r,a)}}function sparseSnapshotTreeForget(o,r){if(pathIsEmpty(r))return o.value=null,o.children.clear(),!0;if(o.value!==null){if(o.value.isLeafNode())return!1;{const a=o.value;return o.value=null,a.forEachChild(PRIORITY_INDEX,(l,c)=>{sparseSnapshotTreeRemember(o,new Path(l),c)}),sparseSnapshotTreeForget(o,r)}}else if(o.children.size>0){const a=pathGetFront(r);return r=pathPopFront(r),o.children.has(a)&&sparseSnapshotTreeForget(o.children.get(a),r)&&o.children.delete(a),o.children.size===0}else return!0}function sparseSnapshotTreeForEachTree(o,r,a){o.value!==null?a(r,o.value):sparseSnapshotTreeForEachChild(o,(l,c)=>{const u=new Path(r.toString()+"/"+l);sparseSnapshotTreeForEachTree(c,u,a)})}
2229function sparseSnapshotTreeForEachChild(o,r){o.children.forEach((a,l)=>{r(l,a)})}/**
2230 * @license
2231 * Copyright 2017 Google LLC
2232 *
2233 * Licensed under the Apache License, Version 2.0 (the "License");
2234 * you may not use this file except in compliance with the License.
2235 * You may obtain a copy of the License at
2236 *
2237 *   http://www.apache.org/licenses/LICENSE-2.0
2238 *
2239 * Unless required by applicable law or agreed to in writing, software
2240 * distributed under the License is distributed on an "AS IS" BASIS,
2241 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2242 * See the License for the specific language governing permissions and
2243 * limitations under the License.
2244 */class StatsListener{constructor(r){this.collection_=r,this.last_=null}get(){const r=this.collection_.get(),a=Object.assign({},r);return this.last_&&each(this.last_,(l,c)=>{a[l]=a[l]-c}),this.last_=r,a}}/**
2245 * @license
2246 * Copyright 2017 Google LLC
2247 *
2248 * Licensed under the Apache License, Version 2.0 (the "License");
2249 * you may not use this file except in compliance with the License.
2250 * You may obtain a copy of the License at
2251 *
2252 *   http://www.apache.org/licenses/LICENSE-2.0
2253 *
2254 * Unless required by applicable law or agreed to in writing, software
2255 * distributed under the License is distributed on an "AS IS" BASIS,
2256 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2257 * See the License for the specific language governing permissions and
2258 * limitations under the License.
2259 */const FIRST_STATS_MIN_TIME=10*1e3,FIRST_STATS_MAX_TIME=30*1e3,REPORT_STATS_INTERVAL=5*60*1e3;class StatsReporter{constructor(r,a){this.server_=a,this.statsToReport_={},this.statsListener_=new StatsListener(r);const l=FIRST_STATS_MIN_TIME+(FIRST_STATS_MAX_TIME-FIRST_STATS_MIN_TIME)*Math.random();setTimeoutNonBlocking(this.reportStats_.bind(this),Math.floor(l))}reportStats_(){const r=this.statsListener_.get(),a={};let l=!1;each(r,(c,u)=>{u>0&&contains(this.statsToReport_,c)&&(a[c]=u,l=!0)}),l&&this.server_.reportStats(a),setTimeoutNonBlocking(this.reportStats_.bind(this),Math.floor(Math.random()*2*REPORT_STATS_INTERVAL))}}/**
2260 * @license
2261 * Copyright 2017 Google LLC
2262 *
2263 * Licensed under the Apache License, Version 2.0 (the "License");
2264 * you may not use this file except in compliance with the License.
2265 * You may obtain a copy of the License at
2266 *
2267 *   http://www.apache.org/licenses/LICENSE-2.0
2268 *
2269 * Unless required by applicable law or agreed to in writing, software
2270 * distributed under the License is distributed on an "AS IS" BASIS,
2271 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2272 * See the License for the specific language governing permissions and
2273 * limitations under the License.
2274 */var OperationType;(function(o){o[o.OVERWRITE=0]="OVERWRITE",o[o.MERGE=1]="MERGE",o[o.ACK_USER_WRITE=2]="ACK_USER_WRITE",o[o.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"})(OperationType||(OperationType={}));function newOperationSourceUser(){return{fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}function newOperationSourceServer(){return{fromUser:!1,fromServer:!0,queryId:null,tagged:!1}}function newOperationSourceServerTaggedQuery(o){return{fromUser:!1,fromServer:!0,queryId:o,tagged:!0}}/**
2275 * @license
2276 * Copyright 2017 Google LLC
2277 *
2278 * Licensed under the Apache License, Version 2.0 (the "License");
2279 * you may not use this file except in compliance with the License.
2280 * You may obtain a copy of the License at
2281 *
2282 *   http://www.apache.org/licenses/LICENSE-2.0
2283 *
2284 * Unless required by applicable law or agreed to in writing, software
2285 * distributed under the License is distributed on an "AS IS" BASIS,
2286 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2287 * See the License for the specific language governing permissions and
2288 * limitations under the License.
2289 */class AckUserWrite{constructor(r,a,l){this.path=r,this.affectedTree=a,this.revert=l,this.type=OperationType.ACK_USER_WRITE,this.source=newOperationSourceUser()}operationForChild(r){if(pathIsEmpty(this.path)){if(this.affectedTree.value!=null)return assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const a=this.affectedTree.subtree(new Path(r));return new AckUserWrite(newEmptyPath(),a,this.revert)}}else return assert(pathGetFront(this.path)===r,"operationForChild called for unrelated child."),new AckUserWrite(pathPopFront(this.path),this.affectedTree,this.revert)}}/**
2290 * @license
2291 * Copyright 2017 Google LLC
2292 *
2293 * Licensed under the Apache License, Version 2.0 (the "License");
2294 * you may not use this file except in compliance with the License.
2295 * You may obtain a copy of the License at
2296 *
2297 *   http://www.apache.org/licenses/LICENSE-2.0
2298 *
2299 * Unless required by applicable law or agreed to in writing, software
2300 * distributed under the License is distributed on an "AS IS" BASIS,
2301 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2302 * See the License for the specific language governing permissions and
2303 * limitations under the License.
2304 */class ListenComplete{constructor(r,a){this.source=r,this.path=a,this.type=OperationType.LISTEN_COMPLETE}operationForChild(r){return pathIsEmpty(this.path)?new ListenComplete(this.source,newEmptyPath()):new ListenComplete(this.source,pathPopFront(this.path))}}/**
2305 * @license
2306 * Copyright 2017 Google LLC
2307 *
2308 * Licensed under the Apache License, Version 2.0 (the "License");
2309 * you may not use this file except in compliance with the License.
2310 * You may obtain a copy of the License at
2311 *
2312 *   http://www.apache.org/licenses/LICENSE-2.0
2313 *
2314 * Unless required by applicable law or agreed to in writing, software
2315 * distributed under the License is distributed on an "AS IS" BASIS,
2316 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2317 * See the License for the specific language governing permissions and
2318 * limitations under the License.
2319 */class Overwrite{constructor(r,a,l){this.source=r,this.path=a,this.snap=l,this.type=OperationType.OVERWRITE}operationForChild(r){return pathIsEmpty(this.path)?new Overwrite(this.source,newEmptyPath(),this.snap.getImmediateChild(r)):new Overwrite(this.source,pathPopFront(this.path),this.snap)}}/**
2320 * @license
2321 * Copyright 2017 Google LLC
2322 *
2323 * Licensed under the Apache License, Version 2.0 (the "License");
2324 * you may not use this file except in compliance with the License.
2325 * You may obtain a copy of the License at
2326 *
2327 *   http://www.apache.org/licenses/LICENSE-2.0
2328 *
2329 * Unless required by applicable law or agreed to in writing, software
2330 * distributed under the License is distributed on an "AS IS" BASIS,
2331 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2332 * See the License for the specific language governing permissions and
2333 * limitations under the License.
2334 */class Merge{constructor(r,a,l){this.source=r,this.path=a,this.children=l,this.type=OperationType.MERGE}operationForChild(r){if(pathIsEmpty(this.path)){const a=this.children.subtree(new Path(r));return a.isEmpty()?null:a.value?new Overwrite(this.source,newEmptyPath(),a.value):new Merge(this.source,newEmptyPath(),a)}else return assert(pathGetFront(this.path)===r,"Can't get a merge for a child not on the path of the operation"),new Merge(this.source,pathPopFront(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}/**
2335 * @license
2336 * Copyright 2017 Google LLC
2337 *
2338 * Licensed under the Apache License, Version 2.0 (the "License");
2339 * you may not use this file except in compliance with the License.
2340 * You may obtain a copy of the License at
2341 *
2342 *   http://www.apache.org/licenses/LICENSE-2.0
2343 *
2344 * Unless required by applicable law or agreed to in writing, software
2345 * distributed under the License is distributed on an "AS IS" BASIS,
2346 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2347 * See the License for the specific language governing permissions and
2348 * limitations under the License.
2349 */class CacheNode{constructor(r,a,l){this.node_=r,this.fullyInitialized_=a,this.filtered_=l}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(r){if(pathIsEmpty(r))return this.isFullyInitialized()&&!this.filtered_;const a=pathGetFront(r);return this.isCompleteForChild(a)}isCompleteForChild(r){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(r)}getNode(){return this.node_}}/**
2350 * @license
2351 * Copyright 2017 Google LLC
2352 *
2353 * Licensed under the Apache License, Version 2.0 (the "License");
2354 * you may not use this file except in compliance with the License.
2355 * You may obtain a copy of the License at
2356 *
2357 *   http://www.apache.org/licenses/LICENSE-2.0
2358 *
2359 * Unless required by applicable law or agreed to in writing, softw
2359are
2360 * distributed under the License is distributed on an "AS IS" BASIS,
2361 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2362 * See the License for the specific language governing permissions and
2363 * limitations under the License.
2364 */class EventGenerator{constructor(r){this.query_=r,this.index_=this.query_._queryParams.getIndex()}}function eventGeneratorGenerateEventsForChanges(o,r,a,l){const c=[],u=[];return r.forEach(d=>{d.type==="child_changed"&&o.index_.indexedValueChanged(d.oldSnap,d.snapshotNode)&&u.push(changeChildMoved(d.childName,d.snapshotNode))}),eventGeneratorGenerateEventsForType(o,c,"child_removed",r,l,a),eventGeneratorGenerateEventsForType(o,c,"child_added",r,l,a),eventGeneratorGenerateEventsForType(o,c,"child_moved",u,l,a),eventGeneratorGenerateEventsForType(o,c,"child_changed",r,l,a),eventGeneratorGenerateEventsForType(o,c,"value",r,l,a),c}function eventGeneratorGenerateEventsForType(o,r,a,l,c,u){const d=l.filter(f=>f.type===a);d.sort((f,m)=>eventGeneratorCompareChanges(o,f,m)),d.forEach(f=>{const m=eventGeneratorMaterializeSingleChange(o,f,u);c.forEach(y=>{y.respondsTo(f.type)&&r.push(y.createEvent(m,o.query_))})})}function eventGeneratorMaterializeSingleChange(o,r,a){return r.type==="value"||r.type==="child_removed"||(r.prevName=a.getPredecessorChildName(r.childName,r.snapshotNode,o.index_)),r}function eventGeneratorCompareChanges(o,r,a){if(r.childName==null||a.childName==null)throw assertionError("Should only compare child_ events.");const l=new NamedNode(r.childName,r.snapshotNode),c=new NamedNode(a.childName,a.snapshotNode);return o.index_.compare(l,c)}/**
2365 * @license
2366 * Copyright 2017 Google LLC
2367 *
2368 * Licensed under the Apache License, Version 2.0 (the "License");
2369 * you may not use this file except in compliance with the License.
2370 * You may obtain a copy of the License at
2371 *
2372 *   http://www.apache.org/licenses/LICENSE-2.0
2373 *
2374 * Unless required by applicable law or agreed to in writing, software
2375 * distributed under the License is distributed on an "AS IS" BASIS,
2376 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2377 * See the License for the specific language governing permissions and
2378 * limitations under the License.
2379 */function newViewCache(o,r){return{eventCache:o,serverCache:r}}function viewCacheUpdateEventSnap(o,r,a,l){return newViewCache(new CacheNode(r,a,l),o.serverCache)}function viewCacheUpdateServerSnap(o,r,a,l){return newViewCache(o.eventCache,new CacheNode(r,a,l))}function viewCacheGetCompleteEventSnap(o){return o.eventCache.isFullyInitialized()?o.eventCache.getNode():null}function viewCacheGetCompleteServerSnap(o){return o.serverCache.isFullyInitialized()?o.serverCache.getNode():null}/**
2380 * @license
2381 * Copyright 2017 Google LLC
2382 *
2383 * Licensed under the Apache License, Version 2.0 (the "License");
2384 * you may not use this file except in compliance with the License.
2385 * You may obtain a copy of the License at
2386 *
2387 *   http://www.apache.org/licenses/LICENSE-2.0
2388 *
2389 * Unless required by applicable law or agreed to in writing, software
2390 * distributed under the License is distributed on an "AS IS" BASIS,
2391 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2392 * See the License for the specific language governing permissions and
2393 * limitations under the License.
2394 */let emptyChildrenSingleton;const EmptyChildren=()=>(emptyChildrenSingleton||(emptyChildrenSingleton=new SortedMap$1(stringCompare)),emptyChildrenSingleton);class ImmutableTree{constructor(r,a=EmptyChildren()){this.value=r,this.children=a}static fromObject(r){let a=new ImmutableTree(null);return each(r,(l,c)=>{a=a.set(new Path(l),c)}),a}isEmpty(){return this.value===null&&this.children.isEmpty()}findRootMostMatchingPathAndValue(r,a){if(this.value!=null&&a(this.value))return{path:newEmptyPath(),value:this.value};if(pathIsEmpty(r))return null;{const l=pathGetFront(r),c=this.children.get(l);if(c!==null){const u=c.findRootMostMatchingPathAndValue(pathPopFront(r),a);return u!=null?{path:pathChild(new Path(l),u.path),value:u.value}:null}else return null}}findRootMostValueAndPath(r){return this.findRootMostMatchingPathAndValue(r,()=>!0)}subtree(r){if(pathIsEmpty(r))return this;{const a=pathGetFront(r),l=this.children.get(a);return l!==null?l.subtree(pathPopFront(r)):new ImmutableTree(null)}}set(r,a){if(pathIsEmpty(r))return new ImmutableTree(a,this.children);{const l=pathGetFront(r),u=(this.children.get(l)||new ImmutableTree(null)).set(pathPopFront(r),a),d=this.children.insert(l,u);return new ImmutableTree(this.value,d)}}remove(r){if(pathIsEmpty(r))return this.children.isEmpty()?new ImmutableTree(null):new ImmutableTree(null,this.children);{const a=pathGetFront(r),l=this.children.get(a);if(l){const c=l.remove(pathPopFront(r));let u;return c.isEmpty()?u=this.children.remove(a):u=this.children.insert(a,c),this.value===null&&u.isEmpty()?new ImmutableTree(null):new ImmutableTree(this.value,u)}else return this}}get(r){if(pathIsEmpty(r))return this.value;{const a=pathGetFront(r),l=this.children.get(a);return l?l.get(pathPopFront(r)):null}}setTree(r,a){if(pathIsEmpty(r))return a;{const l=pathGetFront(r),u=(this.children.get(l)||new ImmutableTree(null)).setTree(pathPopFront(r),a);let d;return u.isEmpty()?d=this.children.remove(l):d=this.children.insert(l,u),new ImmutableTree(this.value,d)}}fold(r){return this.fold_(newEmptyPath(),r)}fold_(r,a){const l={};return this.children.inorderTraversal((c,u)=>{l[c]=u.fold_(pathChild(r,c),a)}),a(r,this.value,l)}findOnPath(r,a){return this.findOnPath_(r,newEmptyPath(),a)}findOnPath_(r,a,l){const c=this.value?l(a,this.value):!1;if(c)return c;if(pathIsEmpty(r))return null;{const u=pathGetFront(r),d=this.children.get(u);return d?d.findOnPath_(pathPopFront(r),pathChild(a,u),l):null}}foreachOnPath(r,a){return this.foreachOnPath_(r,newEmptyPath(),a)}foreachOnPath_(r,a,l){if(pathIsEmpty(r))return this;{this.value&&l(a,this.value);const c=pathGetFront(r),u=this.children.get(c);return u?u.foreachOnPath_(pathPopFront(r),pathChild(a,c),l):new ImmutableTree(null)}}foreach(r){this.foreach_(newEmptyPath(),r)}foreach_(r,a){this.children.inorderTraversal((l,c)=>{c.foreach_(pathChild(r,l),a)}),this.value&&a(r,this.value)}foreachChild(r){this.children.inorderTraversal((a,l)=>{l.value&&r(a,l.value)})}}/**
2395 * @license
2396 * Copyright 2017 Google LLC
2397 *
2398 * Licensed under the Apache License, Version 2.0 (the "License");
2399 * you may not use this file except in compliance with the License.
2400 * You may obtain a copy of the License at
2401 *
2402 *   http://www.apache.org/licenses/LICENSE-2.0
2403 *
2404 * Unless required by applicable law or agreed to in writing, software
2405 * distributed under the License is distributed on an "AS IS" BASIS,
2406 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2407 * See the License for the specific language governing permissions and
2408 * limitations under the License.
2409 */class CompoundWrite{constructor(r){this.writeTree_=r}static empty(){return new CompoundWrite(new ImmutableTree(null))}}function compoundWriteAddWrite(o,r,a){if(pathIsEmpty(r))return new CompoundWrite(new ImmutableTree(a));{const l=o.writeTree_.findRootMostValueAndPath(r);if(l!=null){const c=l.path;let u=l.value;const d=newRelativePath(c,r);return u=u.updateChild(d,a),new CompoundWrite(o.writeTree_.set(c,u))}else{const c=new ImmutableTree(a),u=o.writeTree_.setTree(r,c);return new CompoundWrite(u)}}}function compoundWriteAddWrites(o,r,a){let l=o;return each(a,(c,u)=>{l=compoundWriteAddWrite(l,pathChild(r,c),u)}),l}function compoundWriteRemoveWrite(o,r){if(pathIsEmpty(r))return CompoundWrite.empty();{const a=o.writeTree_.setTree(r,new ImmutableTree(null));return new CompoundWrite(a)}}function compoundWriteHasCompleteWrite(o,r){return compoundWriteGetCompleteNode(o,r)!=null}function compoundWriteGetCompleteNode(o,r){const a=o.writeTree_.findRootMostValueAndPath(r);return a!=null?o.writeTree_.get(a.path).getChild(newRelativePath(a.path,r)):null}function compoundWriteGetCompleteChildren(o){const r=[],a=o.writeTree_.value;return a!=null?a.isLeafNode()||a.forEachChild(PRIORITY_INDEX,(l,c)=>{r.push(new NamedNode(l,c))}):o.writeTree_.children.inorderTraversal((l,c)=>{c.value!=null&&r.push(new NamedNode(l,c.value))}),r}function compoundWriteChildCompoundWrite(o,r){if(pathIsEmpty(r))return o;{const a=compoundWriteGetCompleteNode(o,r);return a!=null?new CompoundWrite(new ImmutableTree(a)):new CompoundWrite(o.writeTree_.subtree(r))}}function compoundWriteIsEmpty(o){return o.writeTree_.isEmpty()}function compoundWriteApply(o,r){return applySubtreeWrite(newEmptyPath(),o.writeTree_,r)}function applySubtreeWrite(o,r,a){if(r.value!=null)return a.updateChild(o,r.value);{let l=null;return r.children.inorderTraversal((c,u)=>{c===".priority"?(assert(u.value!==null,"Priority writes must always be leaf nodes"),l=u.value):a=applySubtreeWrite(pathChild(o,c),u,a)}),!a.getChild(o).isEmpty()&&l!==null&&(a=a.updateChild(pathChild(o,".priority"),l)),a}}/**
2410 * @license
2411 * Copyright 2017 Google LLC
2412 *
2413 * Licensed under the Apache License, Version 2.0 (the "License");
2414 * you may not use this file except in compliance with the License.
2415 * You may obtain a copy of the License at
2416 *
2417 *   http://www.apache.org/licenses/LICENSE-2.0
2418 *
2419 * Unless required by applicable law or agreed to in writing, software
2420 * distributed under the License is distributed on an "AS IS" BASIS,
2421 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2422 * See the License for the specific language governing permissions and
2423 * limitations under the License.
2424 */function writeTreeChildWrites(o,r){return newWriteTreeRef(r,o)}function writeTreeAddOverwrite(o,r,a,l,c){assert(l>o.lastWriteId,"Stacking an older write on top of newer ones"),c===void 0&&(c=!0),o.allWrites.push({path:r,snap:a,writeId:l,visible:c}),c&&(o.visibleWrites=compoundWriteAddWrite(o.visibleWrites,r,a)),o.lastWriteId=l}function writeTreeGetWrite(o,r){for(let a=0;a<o.allWrites.length;a++){const l=o.allWrites[a];if(l.writeId===r)return l}return null}function writeTreeRemoveWrite(o,r){const a=o.allWrites.findIndex(f=>f.writeId===r);assert(a>=0,"removeWrite called with nonexistent writeId.");const l=o.allWrites[a];o.allWrites.splice(a,1);let c=l.visible,u=!1,d=o.allWrites.length-1;for(;c&&d>=0;){const f=o.allWrites[d];f.visible&&(d>=a&&writeTreeRecordContainsPath_(f,l.path)?c=!1:pathContains(l.path,f.path)&&(u=!0)),d--}if(c){if(u)return writeTreeResetTree_(o),!0;if(l.snap)o.visibleWrites=compoundWriteRemoveWrite(o.visibleWrites,l.path);else{const f=l.children;each(f,m=>{o.visibleWrites=compoundWriteRemoveWrite(o.visibleWrites,pathChild(l.path,m))})}return!0}else return!1}function writeTreeRecordContainsPath_(o,r){if(o.snap)return pathContains(o.path,r);for(const a in o.children)if(o.children.hasOwnProperty(a)&&pathContains(pathChild(o.path,a),r))return!0;return!1}function writeTreeResetTree_(o){o.visibleWrites=writeTreeLayerTree_(o.allWrites,writeTreeDefaultFilter_,newEmptyPath()),o.allWrites.length>0?o.lastWriteId=o.allWrites[o.allWrites.length-1].writeId:o.lastWriteId=-1}function writeTreeDefaultFilter_(o){return o.visible}function writeTreeLayerTree_(o,r,a){let l=CompoundWrite.empty();for(let c=0;c<o.length;++c){const u=o[c];if(r(u)){const d=u.path;let f;if(u.snap)pathContains(a,d)?(f=newRelativePath(a,d),l=compoundWriteAddWrite(l,f,u.snap)):pathContains(d,a)&&(f=newRelativePath(d,a),l=compoundWriteAddWrite(l,newEmptyPath(),u.snap.getChild(f)));else if(u.children){if(pathContains(a,d))f=newRelativePath(a,d),l=compoundWriteAddWrites(l,f,u.children);
2424else if(pathContains(d,a))if(f=newRelativePath(d,a),pathIsEmpty(f))l=compoundWriteAddWrites(l,newEmptyPath(),u.children);else{const m=safeGet(u.children,pathGetFront(f));if(m){const y=m.getChild(pathPopFront(f));l=compoundWriteAddWrite(l,newEmptyPath(),y)}}}else throw assertionError("WriteRecord should have .snap or .children")}}return l}function writeTreeCalcCompleteEventCache(o,r,a,l,c){if(!l&&!c){const u=compoundWriteGetCompleteNode(o.visibleWrites,r);if(u!=null)return u;{const d=compoundWriteChildCompoundWrite(o.visibleWrites,r);if(compoundWriteIsEmpty(d))return a;if(a==null&&!compoundWriteHasCompleteWrite(d,newEmptyPath()))return null;{const f=a||ChildrenNode.EMPTY_NODE;return compoundWriteApply(d,f)}}}else{const u=compoundWriteChildCompoundWrite(o.visibleWrites,r);if(!c&&compoundWriteIsEmpty(u))return a;if(!c&&a==null&&!compoundWriteHasCompleteWrite(u,newEmptyPath()))return null;{const d=function(y){return(y.visible||c)&&(!l||!~l.indexOf(y.writeId))&&(pathContains(y.path,r)||pathContains(r,y.path))},f=writeTreeLayerTree_(o.allWrites,d,r),m=a||ChildrenNode.EMPTY_NODE;return compoundWriteApply(f,m)}}}function writeTreeCalcCompleteEventChildren(o,r,a){let l=ChildrenNode.EMPTY_NODE;const c=compoundWriteGetCompleteNode(o.visibleWrites,r);if(c)return c.isLeafNode()||c.forEachChild(PRIORITY_INDEX,(u,d)=>{l=l.updateImmediateChild(u,d)}),l;if(a){const u=compoundWriteChildCompoundWrite(o.visibleWrites,r);return a.forEachChild(PRIORITY_INDEX,(d,f)=>{const m=compoundWriteApply(compoundWriteChildCompoundWrite(u,new Path(d)),f);l=l.updateImmediateChild(d,m)}),compoundWriteGetCompleteChildren(u).forEach(d=>{l=l.updateImmediateChild(d.name,d.node)}),l}else{const u=compoundWriteChildCompoundWrite(o.visibleWrites,r);return compoundWriteGetCompleteChildren(u).forEach(d=>{l=l.updateImmediateChild(d.name,d.node)}),l}}function writeTreeCalcEventCacheAfterServerOverwrite(o,r,a,l,c){assert(l||c,"Either existingEventSnap or existingServerSnap must exist");const u=pathChild(r,a);if(compoundWriteHasCompleteWrite(o.visibleWrites,u))return null;{const d=compoundWriteChildCompoundWrite(o.visibleWrites,u);return compoundWriteIsEmpty(d)?c.getChild(a):compoundWriteApply(d,c.getChild(a))}}function writeTreeCalcCompleteChild(o,r,a,l){const c=pathChild(r,a),u=compoundWriteGetCompleteNode(o.visibleWrites,c);if(u!=null)return u;if(l.isCompleteForChild(a)){const d=compoundWriteChildCompoundWrite(o.visibleWrites,c);return compoundWriteApply(d,l.getNode().getImmediateChild(a))}else return null}function writeTreeShadowingWrite(o,r){return compoundWriteGetCompleteNode(o.visibleWrites,r)}function writeTreeCalcIndexedSlice(o,r,a,l,c,u,d){let f;const m=compoundWriteChildCompoundWrite(o.visibleWrites,r),y=compoundWriteGetCompleteNode(m,newEmptyPath());if(y!=null)f=y;else if(a!=null)f=compoundWriteApply(m,a);else return[];if(f=f.withIndex(d),!f.isEmpty()&&!f.isLeafNode()){const E=[],A=d.getCompare(),P=u?f.getReverseIteratorFrom(l,d):f.getIteratorFrom(l,d);let R=P.getNext();for(;R&&E.length<c;)A(R,l)!==0&&E.push(R),R=P.getNext();return E}else return[]}function newWriteTree(){return{visibleWrites:CompoundWrite.empty(),allWrites:[],lastWriteId:-1}}function writeTreeRefCalcCompleteEventCache(o,r,a,l){return writeTreeCalcCompleteEventCache(o.writeTree,o.treePath,r,a,l)}function writeTreeRefCalcCompleteEventChildren(o,r){return writeTreeCalcCompleteEventChildren(o.writeTree,o.treePath,r)}function writeTreeRefCalcEventCacheAfterServerOverwrite(o,r,a,l){return writeTreeCalcEventCacheAfterServerOverwrite(o.writeTree,o.treePath,r,a,l)}function writeTreeRefShadowingWrite(o,r){return writeTreeShadowingWrite(o.writeTree,pathChild(o.treePath,r))}function writeTreeRefCalcIndexedSlice(o,r,a,l,c,u){return writeTreeCalcIndexedSlice(o.writeTree,o.treePath,r,a,l,c,u)}function writeTreeRefCalcCompleteChild(o,r,a){return writeTreeCalcCompleteChild(o.writeTree,o.treePath,r,a)}function writeTreeRefChild(o,r){return newWriteTreeRef(pathChild(o.treePath,r),o.writeTree)}function newWriteTreeRef(o,r){return{treePath:o,writeTree:r}}/**
2425 * @license
2426 * Copyright 2017 Google LLC
2427 *
2428 * Licensed under the Apache License, Version 2.0 (the "License");
2429 * you may not use this file except in compliance with the License.
2430 * You may obtain a copy of the License at
2431 *
2432 *   http://www.apache.org/licenses/LICENSE-2.0
2433 *
2434 * Unless required by applicable law or agreed to in writing, software
2435 * distributed under the License is distributed on an "AS IS" BASIS,
2436 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2437 * See the License for the specific language governing permissions and
2438 * limitations under the License.
2439 */class ChildChangeAccumulator{constructor(){this.changeMap=new Map}trackChildChange(r){const a=r.type,l=r.childName;assert(a==="child_added"||a==="child_changed"||a==="child_removed","Only child changes supported for tracking"),assert(l!==".priority","Only non-priority child changes can be tracked.");const c=this.changeMap.get(l);if(c){const u=c.type;if(a==="child_added"&&u==="child_removed")this.changeMap.set(l,changeChildChanged(l,r.snapshotNode,c.snapshotNode));else if(a==="child_removed"&&u==="child_added")this.changeMap.delete(l);else if(a==="child_removed"&&u==="child_changed")this.changeMap.set(l,changeChildRemoved(l,c.oldSnap));else if(a==="child_changed"&&u==="child_added")this.changeMap.set(l,changeChildAdded(l,r.snapshotNode));else if(a==="child_changed"&&u==="child_changed")this.changeMap.set(l,changeChildChanged(l,r.snapshotNode,c.oldSnap));else throw assertionError("Illegal combination of changes: "+r+" occurred after "+c)}else this.changeMap.set(l,r)}getChanges(){return Array.from(this.changeMap.values())}}/**
2440 * @license
2441 * Copyright 2017 Google LLC
2442 *
2443 * Licensed under the Apache License, Version 2.0 (the "License");
2444 * you may not use this file except in compliance with the License.
2445 * You may obtain a copy of the License at
2446 *
2447 *   http://www.apache.org/licenses/LICENSE-2.0
2448 *
2449 * Unless required by applicable law or agreed to in writing, software
2450 * distributed under the License is distributed on an "AS IS" BASIS,
2451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2452 * See the License for the specific language governing permissions and
2453 * limitations under the License.
2454 */class NoCompleteChildSource_{getCompleteChild(r){return null}getChildAfterChild(r,a,l){return null}}const NO_COMPLETE_CHILD_SOURCE=new NoCompleteChildSource_;class WriteTreeCompleteChildSource{constructor(r,a,l=null){this.writes_=r,this.viewCache_=a,this.optCompleteServerCache_=l}getCompleteChild(r){const a=this.viewCache_.eventCache;if(a.isCompleteForChild(r))return a.getNode().getImmediateChild(r);{const l=this.optCompleteServerCache_!=null?new CacheNode(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return writeTreeRefCalcCompleteChild(this.writes_,r,l)}
2454}getChildAfterChild(r,a,l){const c=this.optCompleteServerCache_!=null?this.optCompleteServerCache_:viewCacheGetCompleteServerSnap(this.viewCache_),u=writeTreeRefCalcIndexedSlice(this.writes_,c,a,1,l,r);return u.length===0?null:u[0]}}/**
2455 * @license
2456 * Copyright 2017 Google LLC
2457 *
2458 * Licensed under the Apache License, Version 2.0 (the "License");
2459 * you may not use this file except in compliance with the License.
2460 * You may obtain a copy of the License at
2461 *
2462 *   http://www.apache.org/licenses/LICENSE-2.0
2463 *
2464 * Unless required by applicable law or agreed to in writing, software
2465 * distributed under the License is distributed on an "AS IS" BASIS,
2466 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2467 * See the License for the specific language governing permissions and
2468 * limitations under the License.
2469 */function newViewProcessor(o){return{filter:o}}function viewProcessorAssertIndexed(o,r){assert(r.eventCache.getNode().isIndexed(o.filter.getIndex()),"Event snap not indexed"),assert(r.serverCache.getNode().isIndexed(o.filter.getIndex()),"Server snap not indexed")}function viewProcessorApplyOperation(o,r,a,l,c){const u=new ChildChangeAccumulator;let d,f;if(a.type===OperationType.OVERWRITE){const y=a;y.source.fromUser?d=viewProcessorApplyUserOverwrite(o,r,y.path,y.snap,l,c,u):(assert(y.source.fromServer,"Unknown source."),f=y.source.tagged||r.serverCache.isFiltered()&&!pathIsEmpty(y.path),d=viewProcessorApplyServerOverwrite(o,r,y.path,y.snap,l,c,f,u))}else if(a.type===OperationType.MERGE){const y=a;y.source.fromUser?d=viewProcessorApplyUserMerge(o,r,y.path,y.children,l,c,u):(assert(y.source.fromServer,"Unknown source."),f=y.source.tagged||r.serverCache.isFiltered(),d=viewProcessorApplyServerMerge(o,r,y.path,y.children,l,c,f,u))}else if(a.type===OperationType.ACK_USER_WRITE){const y=a;y.revert?d=viewProcessorRevertUserWrite(o,r,y.path,l,c,u):d=viewProcessorAckUserWrite(o,r,y.path,y.affectedTree,l,c,u)}else if(a.type===OperationType.LISTEN_COMPLETE)d=viewProcessorListenComplete(o,r,a.path,l,u);else throw assertionError("Unknown operation type: "+a.type);const m=u.getChanges();return viewProcessorMaybeAddValueEvent(r,d,m),{viewCache:d,changes:m}}function viewProcessorMaybeAddValueEvent(o,r,a){const l=r.eventCache;if(l.isFullyInitialized()){const c=l.getNode().isLeafNode()||l.getNode().isEmpty(),u=viewCacheGetCompleteEventSnap(o);(a.length>0||!o.eventCache.isFullyInitialized()||c&&!l.getNode().equals(u)||!l.getNode().getPriority().equals(u.getPriority()))&&a.push(changeValue(viewCacheGetCompleteEventSnap(r)))}}function viewProcessorGenerateEventCacheAfterServerEvent(o,r,a,l,c,u){const d=r.eventCache;if(writeTreeRefShadowingWrite(l,a)!=null)return r;{let f,m;if(pathIsEmpty(a))if(assert(r.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),r.serverCache.isFiltered()){const y=viewCacheGetCompleteServerSnap(r),E=y instanceof ChildrenNode?y:ChildrenNode.EMPTY_NODE,A=writeTreeRefCalcCompleteEventChildren(l,E);f=o.filter.updateFullNode(r.eventCache.getNode(),A,u)}else{const y=writeTreeRefCalcCompleteEventCache(l,viewCacheGetCompleteServerSnap(r));f=o.filter.updateFullNode(r.eventCache.getNode(),y,u)}else{const y=pathGetFront(a);if(y===".priority"){assert(pathGetLength(a)===1,"Can't have a priority with additional path components");const E=d.getNode();m=r.serverCache.getNode();const A=writeTreeRefCalcEventCacheAfterServerOverwrite(l,a,E,m);A!=null?f=o.filter.updatePriority(E,A):f=d.getNode()}else{const E=pathPopFront(a);let A;if(d.isCompleteForChild(y)){m=r.serverCache.getNode();const P=writeTreeRefCalcEventCacheAfterServerOverwrite(l,a,d.getNode(),m);P!=null?A=d.getNode().getImmediateChild(y).updateChild(E,P):A=d.getNode().getImmediateChild(y)}else A=writeTreeRefCalcCompleteChild(l,y,r.serverCache);A!=null?f=o.filter.updateChild(d.getNode(),y,A,E,c,u):f=d.getNode()}}return viewCacheUpdateEventSnap(r,f,d.isFullyInitialized()||pathIsEmpty(a),o.filter.filtersNodes())}}function viewProcessorApplyServerOverwrite(o,r,a,l,c,u,d,f){const m=r.serverCache;let y;const E=d?o.filter:o.filter.getIndexedFilter();if(pathIsEmpty(a))y=E.updateFullNode(m.getNode(),l,null);else if(E.filtersNodes()&&!m.isFiltered()){const R=m.getNode().updateChild(a,l);y=E.updateFullNode(m.getNode(),R,null)}else{const R=pathGetFront(a);if(!m.isCompleteForPath(a)&&pathGetLength(a)>1)return r;const x=pathPopFront(a),$=m.getNode().getImmediateChild(R).updateChild(x,l);R===".priority"?y=E.updatePriority(m.getNode(),$):y=E.updateChild(m.getNode(),R,$,x,NO_COMPLETE_CHILD_SOURCE,null)}const A=viewCacheUpdateServerSnap(r,y,m.isFullyInitialized()||pathIsEmpty(a),E.filtersNodes()),P=new WriteTreeCompleteChildSource(c,A,u);return viewProcessorGenerateEventCacheAfterServerEvent(o,A,a,c,P,f)}function viewProcessorApplyUserOverwrite(o,r,a,l,c,u,d){const f=r.eventCache;let m,y;const E=new WriteTreeCompleteChildSource(c,r,u);if(pathIsEmpty(a))y=o.filter.updateFullNode(r.eventCache.getNode(),l,d),m=viewCacheUpdateEventSnap(r,y,!0,o.filter.filtersNodes());else{const A=pathGetFront(a);if(A===".priority")y=o.filter.updatePriority(r.eventCache.getNode(),l),m=viewCacheUpdateEventSnap(r,y,f.isFullyInitialized(),f.isFiltered());else{const P=pathPopFront(a),R=f.getNode().getImmediateChild(A);let x;if(pathIsEmpty(P))x=l;else{const M=E.getCompleteChild(A);M!=null?pathGetBack(P)===".priority"&&M.getChild(pathParent(P)).isEmpty()?x=M:x=M.updateChild(P,l):x=ChildrenNode.EMPTY_NODE}if(R.equals(x))m=r;else{const M=o.filter.updateChild(f.getNode(),A,x,P,E,d);m=viewCacheUpdateEventSnap(r,M,f.isFullyInitialized(),o.filter.filtersNodes())}}}return m}function viewProcessorCacheHasChild(o,r){return o.eventCache.isCompleteForChild(r)}function viewProcessorApplyUserMerge(o,r,a,l,c,u,d){let f=r;return l.foreach((m,y)=>{const E=pathChild(a,m);viewProcessorCacheHasChild(r,pathGetFront(E))&&(f=viewProcessorApplyUserOverwrite(o,f,E,y,c,u,d))}),l.foreach((m,y)=>{const E=pathChild(a,m);
vendor: 4,855 bytes, lines 2469-2484
2469viewProcessorCacheHasChild(r,pathGetFront(E))||(f=viewProcessorApplyUserOverwrite(o,f,E,y,c,u,d))}),f}function viewProcessorApplyMerge(o,r,a){return a.foreach((l,c)=>{r=r.updateChild(l,c)}),r}function viewProcessorApplyServerMerge(o,r,a,l,c,u,d,f){if(r.serverCache.getNode().isEmpty()&&!r.serverCache.isFullyInitialized())return r;let m=r,y;pathIsEmpty(a)?y=l:y=new ImmutableTree(null).setTree(a,l);const E=r.serverCache.getNode();return y.children.inorderTraversal((A,P)=>{if(E.hasChild(A)){const R=r.serverCache.getNode().getImmediateChild(A),x=viewProcessorApplyMerge(o,R,P);m=viewProcessorApplyServerOverwrite(o,m,new Path(A),x,c,u,d,f)}}),y.children.inorderTraversal((A,P)=>{const R=!r.serverCache.isCompleteForChild(A)&&P.value===null;if(!E.hasChild(A)&&!R){const x=r.serverCache.getNode().getImmediateChild(A),M=viewProcessorApplyMerge(o,x,P);m=viewProcessorApplyServerOverwrite(o,m,new Path(A),M,c,u,d,f)}}),m}function viewProcessorAckUserWrite(o,r,a,l,c,u,d){if(writeTreeRefShadowingWrite(c,a)!=null)return r;const f=r.serverCache.isFiltered(),m=r.serverCache;if(l.value!=null){if(pathIsEmpty(a)&&m.isFullyInitialized()||m.isCompleteForPath(a))return viewProcessorApplyServerOverwrite(o,r,a,m.getNode().getChild(a),c,u,f,d);if(pathIsEmpty(a)){let y=new ImmutableTree(null);return m.getNode().forEachChild(KEY_INDEX,(E,A)=>{y=y.set(new Path(E),A)}),viewProcessorApplyServerMerge(o,r,a,y,c,u,f,d)}else return r}else{let y=new ImmutableTree(null);return l.foreach((E,A)=>{const P=pathChild(a,E);m.isCompleteForPath(P)&&(y=y.set(E,m.getNode().getChild(P)))}),viewProcessorApplyServerMerge(o,r,a,y,c,u,f,d)}}function viewProcessorListenComplete(o,r,a,l,c){const u=r.serverCache,d=viewCacheUpdateServerSnap(r,u.getNode(),u.isFullyInitialized()||pathIsEmpty(a),u.isFiltered());return viewProcessorGenerateEventCacheAfterServerEvent(o,d,a,l,NO_COMPLETE_CHILD_SOURCE,c)}function viewProcessorRevertUserWrite(o,r,a,l,c,u){let d;if(writeTreeRefShadowingWrite(l,a)!=null)return r;{const f=new WriteTreeCompleteChildSource(l,r,c),m=r.eventCache.getNode();let y;if(pathIsEmpty(a)||pathGetFront(a)===".priority"){let E;if(r.serverCache.isFullyInitialized())E=writeTreeRefCalcCompleteEventCache(l,viewCacheGetCompleteServerSnap(r));else{const A=r.serverCache.getNode();assert(A instanceof ChildrenNode,"serverChildren would be complete if leaf node"),E=writeTreeRefCalcCompleteEventChildren(l,A)}E=E,y=o.filter.updateFullNode(m,E,u)}else{const E=pathGetFront(a);let A=writeTreeRefCalcCompleteChild(l,E,r.serverCache);A==null&&r.serverCache.isCompleteForChild(E)&&(A=m.getImmediateChild(E)),A!=null?y=o.filter.updateChild(m,E,A,pathPopFront(a),f,u):r.eventCache.getNode().hasChild(E)?y=o.filter.updateChild(m,E,ChildrenNode.EMPTY_NODE,pathPopFront(a),f,u):y=m,y.isEmpty()&&r.serverCache.isFullyInitialized()&&(d=writeTreeRefCalcCompleteEventCache(l,viewCacheGetCompleteServerSnap(r)),d.isLeafNode()&&(y=o.filter.updateFullNode(y,d,u)))}return d=r.serverCache.isFullyInitialized()||writeTreeRefShadowingWrite(l,newEmptyPath())!=null,viewCacheUpdateEventSnap(r,y,d,o.filter.filtersNodes())}}/**
2470 * @license
2471 * Copyright 2017 Google LLC
2472 *
2473 * Licensed under the Apache License, Version 2.0 (the "License");
2474 * you may not use this file except in compliance with the License.
2475 * You may obtain a copy of the License at
2476 *
2477 *   http://www.apache.org/licenses/LICENSE-2.0
2478 *
2479 * Unless required by applicable law or agreed to in writing, software
2480 * distributed under the License is distributed on an "AS IS" BASIS,
2481 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2482 * See the License for the specific language governing permissions and
2483 * limitations under the License.
2484 */class View{constructor(r,a){this.query_=r,this.eventRegistrations_=[];const l=this.query_._queryParams,c=new IndexedFilter(l.getIndex()),u=queryParamsGetNodeFilter(l);this.processor_=newViewProcessor(u);const d=a.serverCache,f=a.eventCache,m=c.updateFullNode(ChildrenNode.EMPTY_NODE,d.getNode(),null),y=u.updateFullNode(ChildrenNode.EMPTY_NODE,f.getNode(),null),E=new CacheNode(m,d.isFullyInitialized(),c.filtersNodes()),A=new CacheNode(y,f.isFullyInitialized(),u.filtersNodes());this.viewCache_=newViewCache(A,E),this.eventGenerator_=new EventGenerator(this.query_)}get query(){return this.query_}}function viewGetServerCache(o){return o.viewCache_.serverCache.getNode()}function viewGetCompleteNode(o){return viewCacheGetCompleteEventSnap(o.viewCache_)}function viewGetCompleteServerCache(o,r){const a=viewCacheGetCompleteServerSnap(o.viewCache_);return a&&(o.query._queryParams.loadsAllData()||!pathIsEmpty(r)&&!a.getImmediateChild(pathGetFront(r)).isEmpty())?a.getChild(r):null}function viewIsEmpty(o){return o.eventRegistrations_.length===0}function viewAddEventRegistration(o,r){o.eventRegistrations_.push(r)}function viewRemoveEventRegistration(o,r,a){const l=[];
2484if(a){assert(r==null,"A cancel should cancel all event registrations.");const c=o.query._path;o.eventRegistrations_.forEach(u=>{const d=u.createCancelEvent(a,c);d&&l.push(d)})}if(r){let c=[];for(let u=0;u<o.eventRegistrations_.length;++u){const d=o.eventRegistrations_[u];if(!d.matches(r))c.push(d);else if(r.hasAnyCallback()){c=c.concat(o.eventRegistrations_.slice(u+1));break}}o.eventRegistrations_=c}else o.eventRegistrations_=[];return l}function viewApplyOperation(o,r,a,l){r.type===OperationType.MERGE&&r.source.queryId!==null&&(assert(viewCacheGetCompleteServerSnap(o.viewCache_),"We should always have a full cache before handling merges"),assert(viewCacheGetCompleteEventSnap(o.viewCache_),"Missing event cache, even though we have a server cache"));const c=o.viewCache_,u=viewProcessorApplyOperation(o.processor_,c,r,a,l);return viewProcessorAssertIndexed(o.processor_,u.viewCache),assert(u.viewCache.serverCache.isFullyInitialized()||!c.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),o.viewCache_=u.viewCache,viewGenerateEventsForChanges_(o,u.changes,u.viewCache.eventCache.getNode(),null)}function viewGetInitialEvents(o,r){const a=o.viewCache_.eventCache,l=[];return a.getNode().isLeafNode()||a.getNode().forEachChild(PRIORITY_INDEX,(u,d)=>{l.push(changeChildAdded(u,d))}),a.isFullyInitialized()&&l.push(changeValue(a.getNode())),viewGenerateEventsForChanges_(o,l,a.getNode(),r)}function viewGenerateEventsForChanges_(o,r,a,l){const c=l?[l]:o.eventRegistrations_;return eventGeneratorGenerateEventsForChanges(o.eventGenerator_,r,a,c)}/**
2485 * @license
2486 * Copyright 2017 Google LLC
2487 *
2488 * Licensed under the Apache License, Version 2.0 (the "License");
2489 * you may not use this file except in compliance with the License.
2490 * You may obtain a copy of the License at
2491 *
2492 *   http://www.apache.org/licenses/LICENSE-2.0
2493 *
2494 * Unless required by applicable law or agreed to in writing, software
2495 * distributed under the License is distributed on an "AS IS" BASIS,
2496 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2497 * See the License for the specific language governing permissions and
2498 * limitations under the License.
2499 */let referenceConstructor$1;class SyncPoint{constructor(){this.views=new Map}}function syncPointSetReferenceConstructor(o){assert(!referenceConstructor$1,"__referenceConstructor has already been defined"),referenceConstructor$1=o}function syncPointGetReferenceConstructor(){return assert(referenceConstructor$1,"Reference.ts has not been loaded"),referenceConstructor$1}function syncPointIsEmpty(o){return o.views.size===0}function syncPointApplyOperation(o,r,a,l){const c=r.source.queryId;if(c!==null){const u=o.views.get(c);return assert(u!=null,"SyncTree gave us an op for an invalid query."),viewApplyOperation(u,r,a,l)}else{let u=[];for(const d of o.views.values())u=u.concat(viewApplyOperation(d,r,a,l));return u}}function syncPointGetView(o,r,a,l,c){const u=r._queryIdentifier,d=o.views.get(u);if(!d){let f=writeTreeRefCalcCompleteEventCache(a,c?l:null),m=!1;f?m=!0:l instanceof ChildrenNode?(f=writeTreeRefCalcCompleteEventChildren(a,l),m=!1):(f=ChildrenNode.EMPTY_NODE,m=!1);const y=newViewCache(new CacheNode(f,m,!1),new CacheNode(l,c,!1));return new View(r,y)}return d}function syncPointAddEventRegistration(o,r,a,l,c,u){const d=syncPointGetView(o,r,l,c,u);return o.views.has(r._queryIdentifier)||o.views.set(r._queryIdentifier,d),viewAddEventRegistration(d,a),viewGetInitialEvents(d,a)}function syncPointRemoveEventRegistration(o,r,a,l){const c=r._queryIdentifier,u=[];let d=[];const f=syncPointHasCompleteView(o);if(c==="default")for(const[m,y]of o.views.entries())d=d.concat(viewRemoveEventRegistration(y,a,l)),viewIsEmpty(y)&&(o.views.delete(m),y.query._queryParams.loadsAllData()||u.push(y.query));else{const m=o.views.get(c);m&&(d=d.concat(viewRemoveEventRegistration(m,a,l)),viewIsEmpty(m)&&(o.views.delete(c),m.query._queryParams.loadsAllData()||u.push(m.query)))}return f&&!syncPointHasCompleteView(o)&&u.push(new(syncPointGetReferenceConstructor())(r._repo,r._path)),{removed:u,events:d}}function syncPointGetQueryViews(o){const r=[];for(const a of o.views.values())a.query._queryParams.loadsAllData()||r.push(a);return r}function syncPointGetCompleteServerCache(o,r){let a=null;for(const l of o.views.values())a=a||viewGetCompleteServerCache(l,r);return a}function syncPointViewForQuery(o,r){if(r._queryParams.loadsAllData())return syncPointGetCompleteView(o);{const l=r._queryIdentifier;return o.views.get(l)}}function syncPointViewExistsForQuery(o,r){return syncPointViewForQuery(o,r)!=null}function syncPointHasCompleteView(o){return syncPointGetCompleteView(o)!=null}function syncPointGetCompleteView(o){for(const r of o.views.values())if(r.query._queryParams.loadsAllData())return r;return null}/**
2500 * @license
2501 * Copyright 2017 Google LLC
2502 *
2503 * Licensed under the Apache License, Version 2.0 (the "License");
2504 * you may not use this file except in compliance with the License.
2505 * You may obtain a copy of the License at
2506 *
2507 *   http://www.apache.org/licenses/LICENSE-2.0
2508 *
2509 * Unless required by applicable law or agreed to in writing, software
2510 * distributed under the License is distributed on an "AS IS" BASIS,
2511 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2512 * See the License for the specific language governing permissions and
2513 * limitations under the License.
2514 */let referenceConstructor;function syncTreeSetReferenceConstructor(o){assert(!referenceConstructor,"__referenceConstructor has already been defined"),referenceConstructor=o}function syncTreeGetReferenceConstructor(){return assert(referenceConstructor,"Reference.ts has not been loaded"),referenceConstructor}let syncTreeNextQueryTag_=1;class SyncTree{constructor(r){this.listenProvider_=r,this.syncPointTree_=new ImmutableTree(null),this.pendingWriteTree_=newWriteTree(),this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function syncTreeApplyUserOverwrite(o,r,a,l,c){return writeTreeAddOverwrite(o.pendingWriteTree_,r,a,l,c),c?syncTreeApplyOperationToSyncPoints_(o,new Overwrite(newOperationSourceUser(),r,a)):[]}function syncTreeAckUserWrite(o,r,a=!1){const l=writeTreeGetWrite(o.pendingWriteTree_,r);if(writeTreeRemoveWrite(o.pendingWriteTree_,r)){let u=new ImmutableTree(null);return l.snap!=null?u=u.set(newEmptyPath(),!0):each(l.children,d=>{u=u.set(new Path(d),!0)}),syncTreeApplyOperationToSyncPoints_(o,new AckUserWrite(l.path,u,a))}else return[]}function syncTreeApplyServerOverwrite(o,r,a){return syncTreeApplyOperationToSyncPoints_(o,new Overwrite(newOperationSourceServer(),r,a))}function syncTreeApplyServerMerge(o,r,a){const l=ImmutableTree.fromObject(a);return syncTreeApplyOperationToSyncPoints_(o,new Merge(newOperationSourceServer(),r,l))}function syncTreeApplyListenComplete(o,r){return syncTreeApplyOperationToSyncPoints_(o,new ListenComplete(newOperationSourceServer(),r))}function syncTreeApplyTaggedListenComplete(o,r,a){const l=syncTreeQueryKeyForTag_(o,a);if(l){const c=syncTreeParseQueryKey_(l),u=c.path,d=c.queryId,f=newRelativePath(u,r),m=new ListenComplete(newOperationSourceServerTaggedQuery(d),f);return syncTreeApplyTaggedOperation_(o,u,m)}else return[]}function syncTreeRemoveEventRegistration(o,r,a,l,c=!1){const u=r._path,d=o.syncPointTree_.get(u);let f=[];if(d&&(r._queryIdentifier==="default"||syncPointViewExistsForQuery(d,r))){const m=syncPointRemoveEventRegistration(d,r,a,l);syncPointIsEmpty(d)&&(o.syncPointTree_=o.syncPointTree_.remove(u));const y=m.removed;if(f=m.events,!c){const E=y.findIndex(P=>P._queryParams.loadsAllData())!==-1,A=o.syncPointTree_.findOnPath(u,(P,R)=>syncPointHasCompleteView(R));if(E&&!A){const P=o.syncPointTree_.subtree(u);if(!P.isEmpty()){const R=syncTreeCollectDistinctViewsForSubTree_(P);for(let x=0;x<R.length;++x){const M=R[x],$=M.query,V=syncTreeCreateListenerForView_(o,M);o.listenProvider_.startListening(syncTreeQueryForListening_($),syncTreeTagForQuery(o,$),V.hashFn,V.onComplete)}}}!A&&y.length>0&&!l&&(E?o.listenProvider_.stopListening(syncTreeQueryForListening_(r),null):y.forEach(P=>{const R=o.queryToTagMap.get(syncTreeMakeQueryKey_(P));o.listenProvider_.stopListening(syncTreeQueryForListening_(P),R)}))}syncTreeRemoveTags_(o,y)}return f}function syncTreeApplyTaggedQueryOverwrite(o,r,a,l){const c=syncTreeQueryKeyForTag_(o,l);if(c!=null){const u=syncTreeParseQueryKey_(c),d=u.path,f=u.queryId,m=newRelativePath(d,r),y=new Overwrite(newOperationSourceServerTaggedQuery(f),m,a);return syncTreeApplyTaggedOperation_(o,d,y)}else return[]}function syncTreeApplyTaggedQueryMerge(o,r,a,l){const c=syncTreeQueryKeyForTag_(o,l);if(c){const u=syncTreeParseQueryKey_(c),d=u.path,f=u.queryId,m=newRelativePath(d,r),y=ImmutableTree.fromObject(a),E=new Merge(newOperationSourceServerTaggedQuery(f),m,y);return syncTreeApplyTaggedOperation_(o,d,E)}else return[]}function syncTreeAddEventRegistration(o,r,a,l=!1){const c=r._path;let u=null,d=!1;o.syncPointTree_.foreachOnPath(c,(P,R)=>{const x=newRelativePath(P,c);u=u||syncPointGetCompleteServerCache(R,x),d=d||syncPointHasCompleteView(R)});let f=o.syncPointTree_.get(c);f?(d=d||syncPointHasCompleteView(f),u=u||syncPointGetCompleteServerCache(f,newEmptyPath())):(f=new SyncPoint,o.syncPointTree_=o.syncPointTree_.set(c,f));let m;u!=null?m=!0:(m=!1,u=ChildrenNode.EMPTY_NODE,o.syncPointTree_.subtree(c).foreachChild((R,x)=>{const M=syncPointGetCompleteServerCache(x,newEmptyPath());M&&(u=u.updateImmediateChild(R,M))}));const y=syncPointViewExistsForQuery(f,r);if(!y&&!r._queryParams.loadsAllData()){const P=syncTreeMakeQueryKey_(r);assert(!o.queryToTagMap.has(P),"View does not exist, but we have a tag");const R=syncTreeGetNextQueryTag_();o.queryToTagMap.set(P,R),o.tagToQueryMap.set(R,P)}const E=writeTreeChildWrites(o.pendingWriteTree_,c);let A=syncPointAddEventRegistration(f,r,a,E,u,m);if(!y&&!d&&!l){const P=syncPointViewForQuery(f,r);A=A.concat(syncTreeSetupListener_(o,r,P))}return A}function syncTreeCalcCompleteEventCache(o,r,a){const c=o.pendingWriteTree_,u=o.syncPointTree_.findOnPath(r,(d,f)=>{const m=newRelativePath(d,r),y=syncPointGetCompleteServerCache(f,m);if(y)return y});return writeTreeCalcCompleteEventCache(c,r,u,a,!0)}
vendor: 2,939 bytes, line 2514
2514function syncTreeGetServerValue(o,r){const a=r._path;let l=null;o.syncPointTree_.foreachOnPath(a,(y,E)=>{const A=newRelativePath(y,a);l=l||syncPointGetCompleteServerCache(E,A)});let c=o.syncPointTree_.get(a);c?l=l||syncPointGetCompleteServerCache(c,newEmptyPath()):(c=new SyncPoint,o.syncPointTree_=o.syncPointTree_.set(a,c));const u=l!=null,d=u?new CacheNode(l,!0,!1):null,f=writeTreeChildWrites(o.pendingWriteTree_,r._path),m=syncPointGetView(c,r,f,u?d.getNode():ChildrenNode.EMPTY_NODE,u);return viewGetCompleteNode(m)}function syncTreeApplyOperationToSyncPoints_(o,r){return syncTreeApplyOperationHelper_(r,o.syncPointTree_,null,writeTreeChildWrites(o.pendingWriteTree_,newEmptyPath()))}function syncTreeApplyOperationHelper_(o,r,a,l){if(pathIsEmpty(o.path))return syncTreeApplyOperationDescendantsHelper_(o,r,a,l);{const c=r.get(newEmptyPath());a==null&&c!=null&&(a=syncPointGetCompleteServerCache(c,newEmptyPath()));let u=[];const d=pathGetFront(o.path),f=o.operationForChild(d),m=r.children.get(d);if(m&&f){const y=a?a.getImmediateChild(d):null,E=writeTreeRefChild(l,d);u=u.concat(syncTreeApplyOperationHelper_(f,m,y,E))}return c&&(u=u.concat(syncPointApplyOperation(c,o,l,a))),u}}function syncTreeApplyOperationDescendantsHelper_(o,r,a,l){const c=r.get(newEmptyPath());a==null&&c!=null&&(a=syncPointGetCompleteServerCache(c,newEmptyPath()));let u=[];return r.children.inorderTraversal((d,f)=>{const m=a?a.getImmediateChild(d):null,y=writeTreeRefChild(l,d),E=o.operationForChild(d);E&&(u=u.concat(syncTreeApplyOperationDescendantsHelper_(E,f,m,y)))}),c&&(u=u.concat(syncPointApplyOperation(c,o,l,a))),u}function syncTreeCreateListenerForView_(o,r){const a=r.query,l=syncTreeTagForQuery(o,a);return{hashFn:()=>(viewGetServerCache(r)||ChildrenNode.EMPTY_NODE).hash(),onComplete:c=>{if(c==="ok")return l?syncTreeApplyTaggedListenComplete(o,a._path,l):syncTreeApplyListenComplete(o,a._path);{const u=errorForServerCode(c,a);return syncTreeRemoveEventRegistration(o,a,null,u)}}}}function syncTreeTagForQuery(o,r){const a=syncTreeMakeQueryKey_(r);return o.queryToTagMap.get(a)}function syncTreeMakeQueryKey_(o){return o._path.toString()+"$"+o._queryIdentifier}function syncTreeQueryKeyForTag_(o,r){return o.tagToQueryMap.get(r)}function syncTreeParseQueryKey_(o){const r=o.indexOf("$");return assert(r!==-1&&r<o.length-1,"Bad queryKey."),{queryId:o.substr(r+1),path:new Path(o.substr(0,r))}}function syncTreeApplyTaggedOperation_(o,r,a){const l=o.syncPointTree_.get(r);assert(l,"Missing sync point for query tag that we're tracking");const c=writeTreeChildWrites(o.pendingWriteTree_,r);return syncPointApplyOperation(l,a,c,null)}function syncTreeCollectDistinctViewsForSubTree_(o){return o.fold((r,a,l)=>{if(a&&syncPointHasCompleteView(a))return[syncPointGetCompleteView(a)];{let c=[];return a&&(c=syncPointGetQueryViews(a)),each(l,(u,d)=>{c=c.concat(d)}),c}})}function syncTreeQueryForListening_(o){return o._queryParams.loadsAllData()&&
2514!o._queryParams.isDefault()?new(syncTreeGetReferenceConstructor())(o._repo,o._path):o}function syncTreeRemoveTags_(o,r){for(let a=0;a<r.length;++a){const l=r[a];if(!l._queryParams.loadsAllData()){const c=syncTreeMakeQueryKey_(l),u=o.queryToTagMap.get(c);o.queryToTagMap.delete(c),o.tagToQueryMap.delete(u)}}}function syncTreeGetNextQueryTag_(){return syncTreeNextQueryTag_++}function syncTreeSetupListener_(o,r,a){const l=r._path,c=syncTreeTagForQuery(o,r),u=syncTreeCreateListenerForView_(o,a),d=o.listenProvider_.startListening(syncTreeQueryForListening_(r),c,u.hashFn,u.onComplete),f=o.syncPointTree_.subtree(l);if(c)assert(!syncPointHasCompleteView(f.value),"If we're adding a query, it shouldn't be shadowed");else{const m=f.fold((y,E,A)=>{if(!pathIsEmpty(y)&&E&&syncPointHasCompleteView(E))return[syncPointGetCompleteView(E).query];{let P=[];return E&&(P=P.concat(syncPointGetQueryViews(E).map(R=>R.query))),each(A,(R,x)=>{P=P.concat(x)}),P}});for(let y=0;y<m.length;++y){const E=m[y];o.listenProvider_.stopListening(syncTreeQueryForListening_(E),syncTreeTagForQuery(o,E))}}return d}/**
2515 * @license
2516 * Copyright 2017 Google LLC
2517 *
2518 * Licensed under the Apache License, Version 2.0 (the "License");
2519 * you may not use this file except in compliance with the License.
2520 * You may obtain a copy of the License at
2521 *
2522 *   http://www.apache.org/licenses/LICENSE-2.0
2523 *
2524 * Unless required by applicable law or agreed to in writing, software
2525 * distributed under the License is distributed on an "AS IS" BASIS,
2526 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2527 * See the License for the specific language governing permissions and
2528 * limitations under the License.
2529 */class ExistingValueProvider{constructor(r){this.node_=r}getImmediateChild(r){const a=this.node_.getImmediateChild(r);return new ExistingValueProvider(a)}node(){return this.node_}}class DeferredValueProvider{constructor(r,a){this.syncTree_=r,this.path_=a}getImmediateChild(r){const a=pathChild(this.path_,r);return new DeferredValueProvider(this.syncTree_,a)}node(){return syncTreeCalcCompleteEventCache(this.syncTree_,this.path_)}}const generateWithValues=function(o){return o=o||{},o.timestamp=o.timestamp||new Date().getTime(),o},resolveDeferredLeafValue=function(o,r,a){if(!o||typeof o!="object")return o;if(assert(".sv"in o,"Unexpected leaf node or priority contents"),typeof o[".sv"]=="string")return resolveScalarDeferredValue(o[".sv"],r,a);if(typeof o[".sv"]=="object")return resolveComplexDeferredValue(o[".sv"],r);assert(!1,"Unexpected server value: "+JSON.stringify(o,null,2))},resolveScalarDeferredValue=function(o,r,a){switch(o){case"timestamp":return a.timestamp;default:assert(!1,"Unexpected server value: "+o)}},resolveComplexDeferredValue=function(o,r,a){o.hasOwnProperty("increment")||assert(!1,"Unexpected server value: "+JSON.stringify(o,null,2));const l=o.increment;typeof l!="number"&&assert(!1,"Unexpected increment value: "+l);const c=r.node();if(assert(c!==null&&typeof c<"u","Expected ChildrenNode.EMPTY_NODE for nulls"),!c.isLeafNode())return l;const d=c.getValue();return typeof d!="number"?l:d+l},resolveDeferredValueTree=function(o,r,a,l){return resolveDeferredValue(r,new DeferredValueProvider(a,o),l)},resolveDeferredValueSnapshot=function(o,r,a){return resolveDeferredValue(o,new ExistingValueProvider(r),a)};function resolveDeferredValue(o,r,a){const l=o.getPriority().val(),c=resolveDeferredLeafValue(l,r.getImmediateChild(".priority"),a);let u;if(o.isLeafNode()){const d=o,f=resolveDeferredLeafValue(d.getValue(),r,a);return f!==d.getValue()||c!==d.getPriority().val()?new LeafNode(f,nodeFromJSON(c)):o}else{const d=o;return u=d,c!==d.getPriority().val()&&(u=u.updatePriority(new LeafNode(c))),d.forEachChild(PRIORITY_INDEX,(f,m)=>{const y=resolveDeferredValue(m,r.getImmediateChild(f),a);y!==m&&(u=u.updateImmediateChild(f,y))}),u}}/**
2530 * @license
2531 * Copyright 2017 Google LLC
2532 *
2533 * Licensed under the Apache License, Version 2.0 (the "License");
2534 * you may not use this file except in compliance with the License.
2535 * You may obtain a copy of the License at
2536 *
2537 *   http://www.apache.org/licenses/LICENSE-2.0
2538 *
2539 * Unless required by applicable law or agreed to in writing, softw
2539are
2540 * distributed under the License is distributed on an "AS IS" BASIS,
2541 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2542 * See the License for the specific language governing permissions and
2543 * limitations under the License.
2544 */class Tree{constructor(r="",a=null,l={children:{},childCount:0}){this.name=r,this.parent=a,this.node=l}}function treeSubTree(o,r){let a=r instanceof Path?r:new Path(r),l=o,c=pathGetFront(a);for(;c!==null;){const u=safeGet(l.node.children,c)||{children:{},childCount:0};l=new Tree(c,l,u),a=pathPopFront(a),c=pathGetFront(a)}return l}function treeGetValue(o){return o.node.value}function treeSetValue(o,r){o.node.value=r,treeUpdateParents(o)}function treeHasChildren(o){return o.node.childCount>0}function treeIsEmpty(o){return treeGetValue(o)===void 0&&!treeHasChildren(o)}function treeForEachChild(o,r){each(o.node.children,(a,l)=>{r(new Tree(a,o,l))})}function treeForEachDescendant(o,r,a,l){a&&r(o),treeForEachChild(o,c=>{treeForEachDescendant(c,r,!0)})}function treeForEachAncestor(o,r,a){let l=o.parent;for(;l!==null;){if(r(l))return!0;l=l.parent}return!1}function treeGetPath(o){return new Path(o.parent===null?o.name:treeGetPath(o.parent)+"/"+o.name)}function treeUpdateParents(o){o.parent!==null&&treeUpdateChild(o.parent,o.name,o)}function treeUpdateChild(o,r,a){const l=treeIsEmpty(a),c=contains(o.node.children,r);l&&c?(delete o.node.children[r],o.node.childCount--,treeUpdateParents(o)):!l&&!c&&(o.node.children[r]=a.node,o.node.childCount++,treeUpdateParents(o))}/**
2545 * @license
2546 * Copyright 2017 Google LLC
2547 *
2548 * Licensed under the Apache License, Version 2.0 (the "License");
2549 * you may not use this file except in compliance with the License.
2550 * You may obtain a copy of the License at
2551 *
2552 *   http://www.apache.org/licenses/LICENSE-2.0
2553 *
2554 * Unless required by applicable law or agreed to in writing, software
2555 * distributed under the License is distributed on an "AS IS" BASIS,
2556 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2557 * See the License for the specific language governing permissions and
2558 * limitations under the License.
2559 */const INVALID_KEY_REGEX_=/[\[\].#$\/\u0000-\u001F\u007F]/,INVALID_PATH_REGEX_=/[\[\].#$\u0000-\u001F\u007F]/,MAX_LEAF_SIZE_=10*1024*1024,isValidKey=function(o){return typeof o=="string"&&o.length!==0&&!INVALID_KEY_REGEX_.test(o)},isValidPathString=function(o){return typeof o=="string"&&o.length!==0&&!INVALID_PATH_REGEX_.test(o)},isValidRootPathString=function(o){return o&&(o=o.replace(/^\/*\.info(\/|$)/,"/")),isValidPathString(o)},isValidPriority=function(o){return o===null||typeof o=="string"||typeof o=="number"&&!isInvalidJSONNumber(o)||o&&typeof o=="object"&&contains(o,".sv")},validateFirebaseDataArg=function(o,r,a,l){l&&r===void 0||validateFirebaseData(errorPrefix(o,"value"),r,a)},validateFirebaseData=function(o,r,a){const l=a instanceof Path?new ValidationPath(a,o):a;if(r===void 0)throw new Error(o+"contains undefined "+validationPathToErrorString(l));if(typeof r=="function")throw new Error(o+"contains a function "+validationPathToErrorString(l)+" with contents = "+r.toString());if(isInvalidJSONNumber(r))throw new Error(o+"contains "+r.toString()+" "+validationPathToErrorString(l));if(typeof r=="string"&&r.length>MAX_LEAF_SIZE_/3&&stringLength(r)>MAX_LEAF_SIZE_)throw new Error(o+"contains a string greater than "+MAX_LEAF_SIZE_+" utf8 bytes "+validationPathToErrorString(l)+" ('"+r.substring(0,50)+"...')");if(r&&typeof r=="object"){let c=!1,u=!1;if(each(r,(d,f)=>{if(d===".value")c=!0;else if(d!==".priority"&&d!==".sv"&&(u=!0,!isValidKey(d)))throw new Error(o+" contains an invalid key ("+d+") "+validationPathToErrorString(l)+`.  Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`);validationPathPush(l,d),validateFirebaseData(o,f,l),validationPathPop(l)}),c&&u)throw new Error(o+' contains ".value" child '+validationPathToErrorString(l)+" in addition to actual children.")}},validateFirebaseMergePaths=function(o,r){let a,l;for(a=0;a<r.length;a++){l=r[a];const u=pathSlice(l);for(let d=0;d<u.length;d++)if(!(u[d]===".priority"&&d===u.length-1)){if(!isValidKey(u[d]))throw new Error(o+"contains an invali
2559d key ("+u[d]+") in path "+l.toString()+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`)}}r.sort(pathCompare);let c=null;for(a=0;a<r.length;a++){if(l=r[a],c!==null&&pathContains(c,l))throw new Error(o+"contains a path "+c.toString()+" that is ancestor of another path "+l.toString());c=l}},validateFirebaseMergeDataArg=function(o,r,a,l){const c=errorPrefix(o,"values");if(!(r&&typeof r=="object")||Array.isArray(r))throw new Error(c+" must be an object containing the children to replace.");const u=[];each(r,(d,f)=>{const m=new Path(d);if(validateFirebaseData(c,f,pathChild(a,m)),pathGetBack(m)===".priority"&&!isValidPriority(f))throw new Error(c+"contains an invalid value for '"+m.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");u.push(m)}),validateFirebaseMergePaths(c,u)},validatePriority=function(o,r,a){if(isInvalidJSONNumber(r))throw new Error(errorPrefix(o,"priority")+"is "+r.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!isValidPriority(r))throw new Error(errorPrefix(o,"priority")+"must be a valid Firebase priority (a string, finite number, server value, or null).")},validatePathString=function(o,r,a,l){if(!isValidPathString(a))throw new Error(errorPrefix(o,r)+'was an invalid path = "'+a+`". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"`)},validateRootPathString=function(o,r,a,l){a&&(a=a.replace(/^\/*\.info(\/|$)/,"/")),validatePathString(o,r,a)},validateWritablePath=function(o,r){if(pathGetFront(r)===".info")throw new Error(o+" failed = Can't modify data under /.info/")}
vendor: 6,041 bytes, lines 2559-2589
2559,validateUrl=function(o,r){const a=r.path.toString();if(typeof r.repoInfo.host!="string"||r.repoInfo.host.length===0||!isValidKey(r.repoInfo.namespace)&&r.repoInfo.host.split(":")[0]!=="localhost"||a.length!==0&&!isValidRootPathString(a))throw new Error(errorPrefix(o,"url")+`must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]".`)};/**
2560 * @license
2561 * Copyright 2017 Google LLC
2562 *
2563 * Licensed under the Apache License, Version 2.0 (the "License");
2564 * you may not use this file except in compliance with the License.
2565 * You may obtain a copy of the License at
2566 *
2567 *   http://www.apache.org/licenses/LICENSE-2.0
2568 *
2569 * Unless required by applicable law or agreed to in writing, software
2570 * distributed under the License is distributed on an "AS IS" BASIS,
2571 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2572 * See the License for the specific language governing permissions and
2573 * limitations under the License.
2574 */class EventQueue{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function eventQueueQueueEvents(o,r){let a=null;for(let l=0;l<r.length;l++){const c=r[l],u=c.getPath();a!==null&&!pathEquals(u,a.path)&&(o.eventLists_.push(a),a=null),a===null&&(a={events:[],path:u}),a.events.push(c)}a&&o.eventLists_.push(a)}function eventQueueRaiseEventsAtPath(o,r,a){eventQueueQueueEvents(o,a),eventQueueRaiseQueuedEventsMatchingPredicate(o,l=>pathEquals(l,r))}function eventQueueRaiseEventsForChangedPath(o,r,a){eventQueueQueueEvents(o,a),eventQueueRaiseQueuedEventsMatchingPredicate(o,l=>pathContains(l,r)||pathContains(r,l))}function eventQueueRaiseQueuedEventsMatchingPredicate(o,r){o.recursionDepth_++;let a=!0;for(let l=0;l<o.eventLists_.length;l++){const c=o.eventLists_[l];if(c){const u=c.path;r(u)?(eventListRaise(o.eventLists_[l]),o.eventLists_[l]=null):a=!1}}a&&(o.eventLists_=[]),o.recursionDepth_--}function eventListRaise(o){for(let r=0;r<o.events.length;r++){const a=o.events[r];if(a!==null){o.events[r]=null;const l=a.getEventRunner();logger&&log("event: "+a.toString()),exceptionGuard(l)}}}/**
2575 * @license
2576 * Copyright 2017 Google LLC
2577 *
2578 * Licensed under the Apache License, Version 2.0 (the "License");
2579 * you may not use this file except in compliance with the License.
2580 * You may obtain a copy of the License at
2581 *
2582 *   http://www.apache.org/licenses/LICENSE-2.0
2583 *
2584 * Unless required by applicable law or agreed to in writing, software
2585 * distributed under the License is distributed on an "AS IS" BASIS,
2586 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2587 * See the License for the specific language governing permissions and
2588 * limitations under the License.
2589 */const INTERRUPT_REASON="repo_interrupt",MAX_TRANSACTION_RETRIES=25;class Repo{constructor(r,a,l,c){this.repoInfo_=r,this.forceRestClient_=a,this.authTokenProvider_=l,this.appCheckProvider_=c,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new EventQueue,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=newSparseSnapshotTree(),this.transactionQueueTree_=new Tree,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}toString(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host}}function repoStart(o,r,a){if(o.stats_=statsManagerGetCollection(o.repoInfo_),o.forceRestClient_||beingCrawled())o.server_=new ReadonlyRestClient(o.repoInfo_,(l,c,u,d)=>{repoOnDataUpdate(o,l,c,u,d)},o.authTokenProvider_,o.appCheckProvider_),setTimeout(()=>repoOnConnectStatus(o,!0),0);else{if(typeof a<"u"&&a!==null){if(typeof a!="object")throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{stringify(a)}catch(l){throw new Error("Invalid authOverride provided: "+l)}}o.persistentConnection_=new PersistentConnection(o.repoInfo_,r,(l,c,u,d)=>{repoOnDataUpdate(o,l,c,u,d)},l=>{repoOnConnectStatus(o,l)},l=>{repoOnServerInfoUpdate(o,l)},o.authTokenProvider_,o.appCheckProvider_,a),o.server_=o.persistentConnection_}o.authTokenProvider_.addTokenChangeListener(l=>{o.server_.refreshAuthToken(l)}),o.appCheckProvider_.addTokenChangeListener(l=>{o.server_.refreshAppCheckToken(l.token)}),o.statsReporter_=statsManagerGetOrCreateReporter(o.repoInfo_,()=>new StatsReporter(o.stats_,o.server_)),o.infoData_=new SnapshotHolder,o.infoSyncTree_=new SyncTree({startListening:(l,c,u,d)=>{let f=[];const m=o.infoData_.getNode(l._path);return m.isEmpty()||(f=syncTreeApplyServerOverwrite(o.infoSyncTree_,l._path,m),setTimeout(()=>{d("ok")},0)),f},stopListening:()=>{}}),repoUpdateInfo(o,"connected",!1),o.serverSyncTree_=new SyncTree({startListening:(l,c,u,d)=>(o.server_.listen(l,u,c,(f,m)=>{const y=d(f,m);eventQueueRaiseEventsForChangedPath(o.eventQueue_,l._path,y)}),[]),stopListening:(l,c)=>{o.server_.unlisten(l,c)}})}function repoServerTime(o){const a=o.infoData_.getNode(new Path(".info/serverTimeOffset")).val()||0;return new Date().getTime()+a}function repoGenerateServerValues(o){return generateWithValues({timestamp:repoServerTime(o)})}function repoOnDataUpdate(o,r,a,l,c){o.dataUpdateCount++;const u=new Path(r);a=o.interceptServerDataCallback_?o.interceptServerDataCallback_(r,a):a;let d=[];if(c)if(l){const m=map$1(a,y=>nodeFromJSON(y));d=syncTreeApplyTaggedQueryMerge(o.serverSyncTree_,u,m,c)}else{const m=nodeFromJSON(a);d=syncTreeApplyTaggedQueryOverwrite(o.serverSyncTree_,u,m,c)}else if(l){const m=map$1(a,y=>nodeFromJSON(y));d=syncTreeApplyServerMerge(o.serverSyncTree_,u,m)}else{const m=nodeFromJSON(a);d=syncTreeApplyServerOverwrite(o.serverSyncTree_,u,m)}let f=u;d.length>0&&(f=repoRerunTransactions(o,u)),eventQueueRaiseEventsForChangedPath(o.eventQueue_,f,d)}function repoOnConnectStatus(o,r){repoUpdateInfo(o,"connected",r),r===!1&&repoRunOnDisconnectEvents(o)}function repoOnServerInfoUpdate(o,r){each(r,(a,l)=>{repoUpdateInfo(o,a,l)})}function repoUpdateInfo(o,r,a){const l=new Path("/.info/"+r),c=nodeFromJSON(a);o.infoData_.updateSnapshot(l,c);const u=syncTreeApplyServerOverwrite(o.infoSyncTree_,l,c);eventQueueRaiseEventsForChangedPath(o.eventQueue_,l,u)}
2589function repoGetNextWriteId(o){return o.nextWriteId_++}function repoGetValue(o,r,a){const l=syncTreeGetServerValue(o.serverSyncTree_,r);return l!=null?Promise.resolve(l):o.server_.get(r).then(c=>{const u=nodeFromJSON(c).withIndex(r._queryParams.getIndex());syncTreeAddEventRegistration(o.serverSyncTree_,r,a,!0);let d;if(r._queryParams.loadsAllData())d=syncTreeApplyServerOverwrite(o.serverSyncTree_,r._path,u);else{const f=syncTreeTagForQuery(o.serverSyncTree_,r);d=syncTreeApplyTaggedQueryOverwrite(o.serverSyncTree_,r._path,u,f)}return eventQueueRaiseEventsForChangedPath(o.eventQueue_,r._path,d),syncTreeRemoveEventRegistration(o.serverSyncTree_,r,a,null,!0),u},c=>(repoLog(o,"get for query "+stringify(r)+" failed: "+c),Promise.reject(new Error(c))))}function repoSetWithPriority(o,r,a,l,c){repoLog(o,"set",{path:r.toString(),value:a,priority:l});const u=repoGenerateServerValues(o),d=nodeFromJSON(a,l),f=syncTreeCalcCompleteEventCache(o.serverSyncTree_,r),m=resolveDeferredValueSnapshot(d,f,u),y=repoGetNextWriteId(o),E=syncTreeApplyUserOverwrite(o.serverSyncTree_,r,m,y,!0);eventQueueQueueEvents(o.eventQueue_,E),o.server_.put(r.toString(),d.val(!0),(P,R)=>{const x=P==="ok";x||warn$2("set at "+r+" failed: "+P);const M=syncTreeAckUserWrite(o.serverSyncTree_,y,!x);eventQueueRaiseEventsForChangedPath(o.eventQueue_,r,M),repoCallOnCompleteCallback(o,c,P,R)});const A=repoAbortTransactions(o,r);repoRerunTransactions(o,A),eventQueueRaiseEventsForChangedPath(o.eventQueue_,A,[])}function repoRunOnDisconnectEvents(o){repoLog(o,"onDisconnectEvents");const r=repoGenerateServerValues(o),a=newSparseSnapshotTree();sparseSnapshotTreeForEachTree(o.onDisconnect_,newEmptyPath(),(c,u)=>{const d=resolveDeferredValueTree(c,u,o.serverSyncTree_,r);sparseSnapshotTreeRemember(a,c,d)});let l=[];sparseSnapshotTreeForEachTree(a,newEmptyPath(),(c,u)=>{l=l.concat(syncTreeApplyServerOverwrite(o.serverSyncTree_,c,u));const d=repoAbortTransactions(o,c);repoRerunTransactions(o,d)}),o.onDisconnect_=newSparseSnapshotTree(),eventQueueRaiseEventsForChangedPath(o.eventQueue_,newEmptyPath(),l)}function repoOnDisconnectCancel(o,r,a){o.server_.onDisconnectCancel(r.toString(),(l,c)=>{l==="ok"&&sparseSnapshotTreeForget(o.onDisconnect_,r),repoCallOnCompleteCallback(o,a,l,c)})}function repoOnDisconnectSet(o,r,a,l){const c=nodeFromJSON(a);o.server_.onDisconnectPut(r.toString(),c.val(!0),(u,d)=>{u==="ok"&&sparseSnapshotTreeRemember(o.onDisconnect_,r,c),repoCallOnCompleteCallback(o,l,u,d)})}function repoOnDisconnectSetWithPriority(o,r,a,l,c){const u=nodeFromJSON(a,l);o.server_.onDisconnectPut(r.toString(),u.val(!0),(d,f)=>{d==="ok"&&sparseSnapshotTreeRemember(o.onDisconnect_,r,u),repoCallOnCompleteCallback(o,c,d,f)})}function repoOnDisconnectUpdate(o,r,a,l){if(isEmpty$1(a)){log("onDisconnect().update() called with empty data.  Don't do anything."),repoCallOnCompleteCallback(o,l,"ok",void 0);return}o.server_.onDisconnectMerge(r.toString(),a,(c,u)=>{c==="ok"&&each(a,(d,f)=>{const m=nodeFromJSON(f);sparseSnapshotTreeRemember(o.onDisconnect_,pathChild(r,d),m)}),repoCallOnCompleteCallback(o,l,c,u)})}function repoAddEventCallbackForQuery(o,r,a){let l;pathGetFront(r._path)===".info"?l=syncTreeAddEventRegistration(o.infoSyncTree_,r,a):l=syncTreeAddEventRegistration(o.serverSyncTree_,r,a),eventQueueRaiseEventsAtPath(o.eventQueue_,r._path,l)}function repoRemoveEventCallbackForQuery(o,r,a){let l;pathGetFront(r._path)===".info"?l=syncTreeRemoveEventRegistration(o.infoSyncTree_,r,a):l=syncTreeRemoveEventRegistration(o.serverSyncTree_,r,a),eventQueueRaiseEventsAtPath(o.eventQueue_,r._path,l)}function repoInterrupt(o){o.persistentConnection_&&o.persistentConnection_.interrupt(INTERRUPT_REASON)}function repoLog(o,...r){let a="";o.persistentConnection_&&(a=o.persistentConnection_.id+":"),log(a,...r)}function repoCallOnCompleteCallback(o,r,a,l){r&&exceptionGuard(()=>{if(a==="ok")r(null);else{const c=(a||"error").toUpperCase();let u=c;l&&(u+=": "+l);const d=new Error(u);d.code=c,r(d)}})}function repoStartTransaction(o,r,a,l,c,u){repoLog(o,"transaction on "+r);const d={path:r,update:a,onComplete:l,status:null,order:LUIDGenerator(),applyLocally:u,retryCount:0,unwatcher:c,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null}
vendor: 9,024 bytes, lines 2589-2608
2589,f=repoGetLatestState(o,r,void 0);d.currentInputSnapshot=f;const m=d.update(f.val());if(m===void 0)d.unwatcher(),d.currentOutputSnapshotRaw=null,d.currentOutputSnapshotResolved=null,d.onComplete&&d.onComplete(null,!1,d.currentInputSnapshot);else{validateFirebaseData("transaction failed: Data returned ",m,d.path),d.status=0;const y=treeSubTree(o.transactionQueueTree_,r),E=treeGetValue(y)||[];E.push(d),treeSetValue(y,E);let A;typeof m=="object"&&m!==null&&contains(m,".priority")?(A=safeGet(m,".priority"),assert(isValidPriority(A),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):A=(syncTreeCalcCompleteEventCache(o.serverSyncTree_,r)||ChildrenNode.EMPTY_NODE).getPriority().val();const P=repoGenerateServerValues(o),R=nodeFromJSON(m,A),x=resolveDeferredValueSnapshot(R,f,P);d.currentOutputSnapshotRaw=R,d.currentOutputSnapshotResolved=x,d.currentWriteId=repoGetNextWriteId(o);const M=syncTreeApplyUserOverwrite(o.serverSyncTree_,r,x,d.currentWriteId,d.applyLocally);eventQueueRaiseEventsForChangedPath(o.eventQueue_,r,M),repoSendReadyTransactions(o,o.transactionQueueTree_)}}function repoGetLatestState(o,r,a){return syncTreeCalcCompleteEventCache(o.serverSyncTree_,r,a)||ChildrenNode.EMPTY_NODE}function repoSendReadyTransactions(o,r=o.transactionQueueTree_){if(r||repoPruneCompletedTransactionsBelowNode(o,r),treeGetValue(r)){const a=repoBuildTransactionQueue(o,r);assert(a.length>0,"Sending zero length transaction queue"),a.every(c=>c.status===0)&&repoSendTransactionQueue(o,treeGetPath(r),a)}else treeHasChildren(r)&&treeForEachChild(r,a=>{repoSendReadyTransactions(o,a)})}function repoSendTransactionQueue(o,r,a){const l=a.map(y=>y.currentWriteId),c=repoGetLatestState(o,r,l);let u=c;const d=c.hash();for(let y=0;y<a.length;y++){const E=a[y];assert(E.status===0,"tryToSendTransactionQueue_: items in queue should all be run."),E.status=1,E.retryCount++;const A=newRelativePath(r,E.path);u=u.updateChild(A,E.currentOutputSnapshotRaw)}const f=u.val(!0),m=r;o.server_.put(m.toString(),f,y=>{repoLog(o,"transaction put response",{path:m.toString(),status:y});let E=[];if(y==="ok"){const A=[];for(let P=0;P<a.length;P++)a[P].status=2,E=E.concat(syncTreeAckUserWrite(o.serverSyncTree_,a[P].currentWriteId)),a[P].onComplete&&A.push(()=>a[P].onComplete(null,!0,a[P].currentOutputSnapshotResolved)),a[P].unwatcher();repoPruneCompletedTransactionsBelowNode(o,treeSubTree(o.transactionQueueTree_,r)),repoSendReadyTransactions(o,o.transactionQueueTree_),eventQueueRaiseEventsForChangedPath(o.eventQueue_,r,E);for(let P=0;P<A.length;P++)exceptionGuard(A[P])}else{if(y==="datastale")for(let A=0;A<a.length;A++)a[A].status===3?a[A].status=4:a[A].status=0;else{warn$2("transaction at "+m.toString()+" failed: "+y);for(let A=0;A<a.length;A++)a[A].status=4,a[A].abortReason=y}repoRerunTransactions(o,r)}},d)}function repoRerunTransactions(o,r){const a=repoGetAncestorTransactionNode(o,r),l=treeGetPath(a),c=repoBuildTransactionQueue(o,a);return repoRerunTransactionQueue(o,c,l),l}function repoRerunTransactionQueue(o,r,a){if(r.length===0)return;const l=[];let c=[];const d=r.filter(f=>f.status===0).map(f=>f.currentWriteId);for(let f=0;f<r.length;f++){const m=r[f],y=newRelativePath(a,m.path);let E=!1,A;if(assert(y!==null,"rerunTransactionsUnderNode_: relativePath should not be null."),m.status===4)E=!0,A=m.abortReason,c=c.concat(syncTreeAckUserWrite(o.serverSyncTree_,m.currentWriteId,!0));else if(m.status===0)if(m.retryCount>=MAX_TRANSACTION_RETRIES)E=!0,A="maxretry",c=c.concat(syncTreeAckUserWrite(o.serverSyncTree_,m.currentWriteId,!0));else{const P=repoGetLatestState(o,m.path,d);m.currentInputSnapshot=P;const R=r[f].update(P.val());if(R!==void 0){validateFirebaseData("transaction failed: Data returned ",R,m.path);let x=nodeFromJSON(R);typeof R=="object"&&R!=null&&contains(R,".priority")||(x=x.updatePriority(P.getPriority()));const $=m.currentWriteId,V=repoGenerateServerValues(o),B=resolveDeferredValueSnapshot(x,P,V);m.currentOutputSnapshotRaw=x,m.currentOutputSnapshotResolved=B,m.currentWriteId=repoGetNextWriteId(o),d.splice(d.indexOf($),1),c=c.concat(syncTreeApplyUserOverwrite(o.serverSyncTree_,m.path,B,m.currentWriteId,m.applyLocally)),c=c.concat(syncTreeAckUserWrite(o.serverSyncTree_,$,!0))}else E=!0,A="nodata",c=c.concat(syncTreeAckUserWrite(o.serverSyncTree_,m.currentWriteId,!0))}eventQueueRaiseEventsForChangedPath(o.eventQueue_,a,c),c=[],E&&(r[f].status=2,function(P){setTimeout(P,Math.floor(0))}(r[f].unwatcher),r[f].onComplete&&(A==="nodata"?l.push(()=>r[f].onComplete(null,!1,r[f].currentInputSnapshot)):l.push(()=>r[f].onComplete(new Error(A),!1,null))))}repoPruneCompletedTransactionsBelowNode(o,o.transactionQueueTree_);for(let f=0;f<l.length;f++)exceptionGuard(l[f]);repoSendReadyTransactions(o,o.transactionQueueTree_)}function repoGetAncestorTransactionNode(o,r){let a,l=o.transactionQueueTree_;for(a=pathGetFront(r);a!==null&&treeGetValue(l)===void 0;)l=treeSubTree(l,a),r=pathPopFront(r),a=pathGetFront(r);return l}function repoBuildTransactionQueue(o,r){const a=[];return repoAggregateTransactionQueuesForNode(o,r,a),a.sort((l,c)=>l.order-c.order),a}function repoAggregateTransactionQueuesForNode(o,r,a){const l=treeGetValue(r);if(l)for(let c=0;c<l.length;c++)a.push(l[c]);treeForEachChild(r,c=>{repoAggregateTransactionQueuesForNode(o,c,a)})}function repoPruneCompletedTransactionsBelowNode(o,r){const a=treeGetValue(r);if(a){let l=0;for(let c=0;c<a.length;c++)a[c].status!==2&&(a[l]=a[c],l++);a.length=l,treeSetValue(r,a.length>0?a:void 0)}treeForEachChild(r,l=>{repoPruneCompletedTransactionsBelowNode(o,l)})}function repoAbortTransactions(o,r){const a=treeGetPath(repoGetAncestorTransactionNode(o,r)),l=treeSubTree(o.transactionQueueTree_,r);return treeForEachAncestor(l,c=>{repoAbortTransactionsOnNode(o,c)}),repoAbortTransactionsOnNode(o,l),treeForEachDescendant(l,c=>{repoAbortTransactionsOnNode(o,c)}),a}function repoAbortTransactionsOnNode(o,r){const a=treeGetValue(r);if(a){const l=[];let c=[],u=-1;for(let d=0;d<a.length;d++)a[d].status===3||(a[d].status===1?(assert(u===d-1,"All SENT items should be at beginning of queue."),u=d,a[d].status=3,a[d].abortReason="set"):(assert(a[d].status===0,"Unexpected transaction status in abort"),a[d].unwatcher(),c=c.concat(syncTreeAckUserWrite(o.serverSyncTree_,a[d].currentWriteId,!0)),a[d].onComplete&&l.push(a[d].onComplete.bind(null,new Error("set"),!1,null))));u===-1?treeSetValue(r,void 0):a.length=u+1,eventQueueRaiseEventsForChangedPath(o.eventQueue_,treeGetPath(r),c);for(let d=0;d<l.length;d++)exceptionGuard(l[d])}}/**
2590 * @license
2591 * Copyright 2017 Google LLC
2592 *
2593 * Licensed under the Apache License, Version 2.0 (the "License");
2594 * you may not use this file except in compliance with the License.
2595 * You may obtain a copy of the License at
2596 *
2597 *   http://www.apache.org/licenses/LICENSE-2.0
2598 *
2599 * Unless required by applicable law or agreed to in writing, software
2600 * distributed under the License is distributed on an "AS IS" BASIS,
2601 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2602 * See the License for the specific language governing permissions and
2603 * limitations under the License.
2604 */function decodePath(o){let r="";const a=o.split("/");for(let l=0;l<a.length;l++)if(a[l].length>0){let c=a[l];try{c=decodeURIComponent(c.replace(/\+/g," "))}catch{}r+="/"+c}return r}function decodeQuery(o){const r={};o.charAt(0)==="?"&&(o=o.substring(1));for(const a of o.split("&")){if(a.length===0)continue;const l=a.split("=");l.length===2?r[decodeURIComponent(l[0])]=decodeURIComponent(l[1]):warn$2(`Invalid query segment '${a}' in query '${o}'`)}return r}const parseRepoInfo=function(o,r){const a=parseDatabaseURL(o),l=a.namespace;a.domain==="firebase.com"&&fatal(a.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),(!l||l==="undefined")&&a.domain!=="localhost"&&fatal("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),a.secure||warnIfPageIsSecure();const c=a.scheme==="ws"||a.scheme==="wss";return{repoInfo:new RepoInfo(a.host,a.secure,l,c,r,"",l!==a.subdomain),path:new Path(a.pathString)}},parseDatabaseURL=function(o){let r="",a="",l="",c="",u="",d=!0,f="https",m=443;if(typeof o=="string"){let y=o.indexOf("//");y>=0&&(f=o.substring(0,y-1),o=o.substring(y+2));let E=o.indexOf("/");E===-1&&(E=o.length);let A=o.indexOf("?");A===-1&&(A=o.length),r=o.substring(0,Math.min(E,A)),E<A&&(c=decodePath(o.substring(E,A)));const P=decodeQuery(o.substring(Math.min(o.length,A)));y=r.indexOf(":"),y>=0?(d=f==="https"||f==="wss",m=parseInt(r.substring(y+1),10)):y=r.length;const R=r.slice(0,y);if(R.toLowerCase()==="localhost")a="localhost";else if(R.split(".").length<=2)a=R;else{const x=r.indexOf(".");l=r.substring(0,x).toLowerCase(),a=r.substring(x+1),u=l}"ns"in P&&(u=P.ns)}return{host:r,port:m,domain:a,subdomain:l,secure:d,scheme:f,pathString:c,namespace:u}};/**
2605 * @license
2606 * Copyright 2017 Google LLC
2607 *
2608 * Licensed under the Apache License, Version 2.0 (the "License");
2609 * you may not use this file except in compliance with the License.
2610 * You may obtain a copy of the License at
2611 *
2612 *   http://www.apache.org/licenses/LICENSE-2.0
2613 *
2614 * Unless required by applicable law or agreed to in writing, software
2615 * distributed under the License is distributed on an "AS IS" BASIS,
2616 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2617 * See the License for the specific language governing permissions and
2618 * limitations under the License.
2619 */const PUSH_CHARS="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",nextPushId=function(){let o=0;const r=[];return function(a){const l=a===o;o=a;let c;const u=new Array(8);for(c=7;c>=0;c--)u[c]=PUSH_CHARS.charAt(a%64),a=Math.floor(a/64);assert(a===0,"Cannot push at time == 0");let d=u.join("");if(l){for(c=11;c>=0&&r[c]===63;c--)r[c]=0;r[c]++}else for(c=0;c<12;c++)r[c]=Math.floor(Math.random()*64);for(c=0;c<12;c++)d+=PUSH_CHARS.charAt(r[c]);return assert(d.length===20,"nextPushId: Length should be 20."),d}}();/**
2620 * @license
2621 * Copyright 2017 Google LLC
2622 *
2623 * Licensed under the Apache License, Version 2.0 (the "License");
2624 * you may not use this file except in compliance with the License.
2625 * You may obtain a copy of the License at
2626 *
2627 *   http://www.apache.org/licenses/LICENSE-2.0
2628 *
2629 * Unless required by applicable law or agreed to in writing, software
2630 * distributed under the License is distributed on an "AS IS" BASIS,
2631 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2632 * See the License for the specific language governing permissions and
2633 * limitations under the License.
2634 */class DataEvent{constructor(r,a,l,c){this.eventType=r,this.eventRegistration=a,this.snapshot=l,this.prevName=c}getPath(){const r=this.snapshot.ref;return this.eventType==="value"?r._path:r.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+stringify(this.snapshot.exportVal())}}class CancelEvent{constructor(r,a,l){this.eventRegistration=r,this.error=a,this.path=l}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}/**
2635 * @license
2636 * Copyright 2017 Google LLC
2637 *
2638 * Licensed under the Apache License, Version 2.0 (the "License");
2639 * you may not use this file except in compliance with the License.
2640 * You may obtain a copy of the License at
2641 *
2642 *   http://www.apache.org/licenses/LICENSE-2.0
2643 *
2644 * Unless required by applicable law or agreed to in writing, software
2645 * distributed under the License is distributed on an "AS IS" BASIS,
2646 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2647 * See the License for the specific language governing permissions and
2648 * limitations under the License.
2649 */class CallbackContext{constructor(r,a){this.snapshotCallback=r,this.cancelCallback=a}onValue(r,a){this.snapshotCallback.call(null,r,a)}onCancel(r){return assert(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,r)}get hasCancelCallback(){return!!this.cancelCallback}matches(r){return this.snapshotCallback===r.snapshotCallback||this.snapshotCallback.userCallback!==void 0&&this.snapshotCallback.userCallback===r.snapshotCallback.userCallback&&this.snapshotCallback.context===r.snapshotCallback.context}}/**
2650 * @license
2651 * Copyright 2021 Google LLC
2652 *
2653 * Licensed under the Apache License, Version 2.0 (the "License");
2654 * you may not use this file except in compliance with the License.
2655 * You may obtain a copy of the License at
2656 *
2657 *   http://www.apache.org/licenses/LICENSE-2.0
2658 *
2659 * Unless required by applicable law or agreed to in writing, software
2660 * distributed under the License is distributed on an "AS IS" BASIS,
2661 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2662 * See the License for the specific language governing permissions and
2663 * limitations under the License.
2664 */class OnDisconnect{constructor(r,a){this._repo=r,this._path=a}cancel(){const r=new Deferred$1;return repoOnDisconnectCancel(this._repo,this._path,r.wrapCallback(()=>{})),r.promise}remove(){validateWritablePath("OnDisconnect.remove",this._path);const r=new Deferred$1;return repoOnDisconnectSet(this._repo,this._path,null,r.wrapCallback(()=>{})),r.promise}set(r){validateWritablePath("OnDisconnect.set",this._path),validateFirebaseDataArg("OnDisconnect.set",r,this._path,!1);const a=new Deferred$1;return repoOnDisconnectSet(this._repo,this._path,r,a.wrapCallback(()=>{})),a.promise}setWithPriority(r,a){validateWritablePath("OnDisconnect.setWithPriority",this._path),validateFirebaseDataArg("OnDisconnect.setWithPriority",r,this._path,!1),validatePriority("OnDisconnect.setWithPriority",a);const l=new Deferred$1;return repoOnDisconnectSetWithPriority(this._repo,this._path,r,a,l.wrapCallback(()=>{})),l.promise}update(r){validateWritablePath("OnDisconnect.update",this._path),validateFirebaseMergeDataArg("OnDisconnect.update",r,this._path);const a=new Deferred$1;return repoOnDisconnectUpdate(this._repo,this._path,r,a.wrapCallback(()=>{})),a.promise}}/**
2665 * @license
2666 * Copyright 2020 Google LLC
2667 *
2668 * Licensed under the Apache License, Version 2.0 (the "License");
2669 * you may not use this file except in compliance with the License.
2670 * You may obtain a copy of the License at
2671 *
2672 *   http://www.apache.org/licenses/LICENSE-2.0
2673 *
2674 * Unless required by applicable law or agreed to in writing, software
2675 * distributed under the License is distributed on an "AS IS" BASIS,
2676 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2677 * See the License for the specific language governing permissions and
2678 * limitations under the License.
2679 */class QueryImpl{constructor(r,a,l,c){this._repo=r,this._path=a,this._queryParams=l,this._orderByCalled=c}get key(){return pathIsEmpty(this._path)?null:pathGetBack(this._path)}get ref(){return new ReferenceImpl(this._repo,this._path)}get _queryIdentifier(){const r=queryParamsGetQueryObject(this._queryParams),a=ObjectToUniqueKey(r);return a==="{}"?"default":a}get _queryObject(){return queryParamsGetQueryObject(this._queryParams)}isEqual(r){if(r=getModularInstance(r),!(r instanceof QueryImpl))return!1;const a=this._repo===r._repo,l=pathEquals(this._path,r._path),c=this._queryIdentifier===r._queryIdentifier;return a&&l&&c}toJSON(){return this.toString()}toString(){return this._repo.toString()+pathToUrlEncodedString(this._path)}}class ReferenceImpl extends QueryImpl{constructor(r,a){super(r,a,new QueryParams,!1)}get parent(){const r=pathParent(this._path);return r===null?null:new ReferenceImpl(this._repo,r)}get root(){let r=this;for(;r.parent!==null;)r=r.parent;return r}}class DataSnapshot{constructor(r,a,l){this._node=r,this.ref=a,this._index=l}get priority(){return this._node.getPriority().val()}get key(){return this.ref.key}get size(){return this._node.numChildren()}child(r){const a=new Path(r),l=child(this.ref,r);return new DataSnapshot(this._node.getChild(a),l,PRIORITY_INDEX)}exists(){return!this._node.isEmpty()}exportVal(){return this._node.val(!0)}forEach(r){return this._node.isLeafNode()?!1:!!this._node.forEachChild(this._index,(l,c)=>r(new DataSnapshot(c,child(this.ref,l),PRIORITY_INDEX)))}hasChild(r){const a=new Path(r);return!this._node.getChild(a).isEmpty()}hasChildren(){return this._node.isLeafNode()?!1:!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function ref(o,r){return o=getModularInstance(o),o._checkNotDeleted("ref"),r!==void 0?child(o._root,r):o._root}function refFromURL(o,r){o=getModularInstance(o),o._checkNotDeleted("refFromURL");const a=parseRepoInfo(r,o._repo.repoInfo_.nodeAdmin);validateUrl("refFromURL",a);const l=a.repoInfo;return!o._repo.repoInfo_.isCustomHost()&&l.host!==o._repo.repoInfo_.host&&fatal("refFromURL: Host name does not match the current database: (found "+l.host+" but expected "+o._repo.repoInfo_.host+")"),ref(o,a.path.toString())}function child(o,r){return o=getModularInstance(o),pathGetFront(o._path)===null?validateRootPathString("child","path",r):validatePathString("child","path",r),new ReferenceImpl(o._repo,pathChild(o._path,r))}function onDisconnect(o){return o=getModularInstance(o),new OnDisconnect(o._repo,o._path)}function push(o,r){o=getModularInstance(o),validateWritablePath("push",o._path),validateFirebaseDataArg("push",r,o._path,!0);const a=repoServerTime(o._repo),l=nextPushId(a),c=child(o,l),u=child(o,l);let d;return r!=null?d=set$2(u,r).then(()=>u):d=Promise.resolve(u),c.then=d.then.bind(d),c.catch=d.then.bind(d,void 0),c}function set$2(o,r){o=getModularInstance(o),validateWritablePath("set",o._path),validateFirebaseDataArg("set",r,o._path,!1);const a=new Deferred$1;return repoSetWithPriority(o._repo,o._path,r,null,a.wrapCallback(()=>{})),a.promise}function get$3(o){o=getModularInstance(o);const r=new CallbackContext(()=>{}),a=new ValueEventRegistration(r);return repoGetValue(o._repo,o,a).then(l=>new DataSnapshot(l,new ReferenceImpl(o._repo,o._path),o._queryParams.getIndex()))}class ValueEventRegistration{constructor(r){this.callbackContext=r}respondsTo(r){return r==="value"}createEvent(r,a){const l=a._queryParams.getIndex();return new DataEvent("value",this,new DataSnapshot(r.snapshotNode,new ReferenceImpl(a._repo,a._path),l))}getEventRunner(r){return r.getEventType()==="cancel"?()=>this.callbackContext.onCancel(r.error):()=>this.callbackContext.onValue(r.snapshot,null)}createCancelEvent(r,a){return this.callbackContext.hasCancelCallback?new CancelEvent(this,r,a):null}matches(r){return r instanceof ValueEventRegistration?!r.callbackContext||!this.callbackContext?!0:r.callbackContext.matches(this.callbackContext):!1}hasAnyCallback(){return this.callbackContext!==null}}class ChildEventRegistration{constructor(r,a){this.eventType=r,this.callbackContext=a}respondsTo(r){let a=r==="children_added"?"child_added":r;return a=a==="children_removed"?"child_removed":a,this.eventType===a}createCancelEvent(r,a){return this.callbackContext.hasCancelCallback?new CancelEvent(this,r,a):null}createEvent(r,a){assert(r.childName!=null,"Child events should have a childName.");const l=child(new ReferenceImpl(a._repo,a._path),r.childName),c=a._queryParams.getIndex();return new DataEvent(r.type,this,new DataSnapshot(r.snapshotNode,l,c),r.prevName)}getEventRunner(r){return r.getEventType()==="cancel"?()=>this.callbackContext.onCancel(r.error):()=>this.callbackContext.onValue(r.snapshot,r.prevName)}matches(r){return r instanceof ChildEventRegistration?this.eventType===r.eventType&&(!this.callbackContext||!r.callbackContext||this.callbackContext.matches(r.callbackContext)):!1}hasAnyCallback(){return!!this.callbackContext}}function addEventListener(o,r,a,l,c){let u;if(typeof l=="object"&&(u=void 0,c=l),typeof l=="function"&&(u=l),c&&c.onlyOnce){const m=a,y=(E,A)=>{repoRemoveEventCallbackForQuery(o._repo,o,f),m(E,A)};y.userCallback=a.userCallback,y.context=a.context,a=y}const d=new CallbackContext(a,u||void 0),f=r==="value"?new ValueEventRegistration(d):new ChildEventRegistration(r,d);return repoAddEventCallbackForQuery(o._repo,o,f),()=>repoRemoveEventCallbackForQuery(o._repo,o,f)}function onValue(o,r,a,l){return addEventListener(o,"value",r,a,l)}function onChildAdded(o,r,a,l){return addEventListener(o,"child_added",r,a,l)}syncPointSetReferenceConstructor(ReferenceImpl);syncTreeSetReferenceConstructor(ReferenceImpl);/**
2680 * @license
2681 * Copyright 2020 Google LLC
2682 *
2683 * Licensed under the Apache License, Version 2.0 (the "License");
2684 * you may not use this file except in compliance with the License.
2685 * You may obtain a copy of the License at
2686 *
2687 *   http://www.apache.org/licenses/LICENSE-2.0
2688 *
2689 * Unless required by applicable law or agreed to in writing, software
2690 * distributed under the License is distributed on an "AS IS" BASIS,
2691 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2692 * See the License for the specific language governing permissions and
2693 * limitations under the License.
2694 */const FIREBASE_DATABASE_EMULATOR_HOST_VAR="FIREBASE_DATABASE_EMULATOR_HOST",repos={};let useRestClient=!1;function repoManagerApplyEmulatorSettings(o,r,a,l){o.repoInfo_=new RepoInfo(`${r}:${a}`,!1,o.repoInfo_.namespace,o.repoInfo_.webSocketOnly,o.repoInfo_.nodeAdmin,o.repoInfo_.persistenceKey,o.repoInfo_.includeNamespaceInQueryParams,!0),l&&(o.authTokenProvider_=l)}function repoManagerDatabaseFromApp(o,r,a,l,c){let u=l||o.options.databaseURL;u===void 0&&(o.options.projectId||fatal("Can't determine Firebase Database URL. Be sure to include  a Project ID when calling firebase.initializeApp()."),log("Using default host for project ",o.options.projectId),u=`${o.options.projectId}-default-rtdb.firebaseio.com`);let d=parseRepoInfo(u,c),f=d.repoInfo,m;typeof process<"u"&&define_process_env_default$1&&(m=define_process_env_default$1[FIREBASE_DATABASE_EMULATOR_HOST_VAR]),m?(u=`http://${m}?ns=${f.namespace}`,d=parseRepoInfo(u,c),f=d.repoInfo):d.repoInfo.secure;const y=new FirebaseAuthTokenProvider(o.name,o.options,r);validateUrl("Invalid Firebase Database URL",d),pathIsEmpty(d.path)||fatal("Database URL must point to the root of a Firebase Database (not including a child path).");const E=repoManagerCreateRepo(f,o,y,new AppCheckTokenProvider(o.name,a));return new Database(E,o)}function repoManagerDeleteRepo(o,r){const a=repos[r];(!a||a[o.key]!==o)&&fatal(`Database ${r}(${o.repoInfo_}) has already been deleted.`),repoInterrupt(o),delete a[o.key]}function repoManagerCreateRepo(o,r,a,l){let c=repos[r.name];c||(c={},repos[r.name]=c);let u=c[o.toURLString()];return u&&fatal("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),u=new Repo(o,useRestClient,a,l),c[o.toURLString()]=u,u}class Database{constructor(r,a){this._repoInternal=r,this.app=a,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(repoStart(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new ReferenceImpl(this._repo,newEmptyPath())),this._rootInternal}_delete(){return this._rootInternal!==null&&(repoManagerDeleteRepo(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(r){this._rootInternal===null&&fatal("Cannot call "+r+" on a deleted database.")}}function getDatabase(o=getApp(),r){const a=_getProvider(o,"database").getImmediate({identifier:r});if(!a._instanceStarted){const l=getDefaultEmulatorHostnameAndPort("database");l&&connectDatabaseEmulator(a,...l)}return a}function connectDatabaseEmulator(o,r,a,l={}){o=getModularInstance(o),o._checkNotDeleted("useEmulator"),o._instanceStarted&&fatal("Cannot call useEmulator() after instance has already been initialized.");const c=o._repoInternal;let u;if(c.repoInfo_.nodeAdmin)l.mockUserToken&&fatal('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),u=new EmulatorTokenProvider(EmulatorTokenProvider.OWNER);else if(l.mockUserToken){const d=typeof l.mockUserToken=="string"?l.mockUserToken:createMockUserToken(l.mockUserToken,o.app.options.projectId);u=new EmulatorTokenProvider(d)}repoManagerApplyEmulatorSettings(c,r,a,u)}/**
2695 * @license
2696 * Copyright 2021 Google LLC
2697 *
2698 * Licensed under the Apache License, Version 2.0 (the "License");
2699 * you may not use this file except in compliance with the License.
2700 * You may obtain a copy of the License at
2701 *
2702 *   http://www.apache.org/licenses/LICENSE-2.0
2703 *
2704 * Unless required by applicable law or agreed to in writing, softw
2704are
2705 * distributed under the License is distributed on an "AS IS" BASIS,
2706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2707 * See the License for the specific language governing permissions and
2708 * limitations under the License.
2709 */function registerDatabase(o){setSDKVersion(SDK_VERSION$1),_registerComponent(new Component("database",(r,{instanceIdentifier:a})=>{const l=r.getProvider("app").getImmediate(),c=r.getProvider("auth-internal"),u=r.getProvider("app-check-internal");return repoManagerDatabaseFromApp(l,c,u,a)},"PUBLIC").setMultipleInstances(!0)),registerVersion(name$1,version$5,o),registerVersion(name$1,version$5,"esm2017")}/**
2710 * @license
2711 * Copyright 2020 Google LLC
2712 *
2713 * Licensed under the Apache License, Version 2.0 (the "License");
2714 * you may not use this file except in compliance with the License.
2715 * You may obtain a copy of the License at
2716 *
2717 *   http://www.apache.org/licenses/LICENSE-2.0
2718 *
2719 * Unless required by applicable law or agreed to in writing, software
2720 * distributed under the License is distributed on an "AS IS" BASIS,
2721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2722 * See the License for the specific language governing permissions and
2723 * limitations under the License.
2724 */class TransactionResult{constructor(r,a){this.committed=r,this.snapshot=a}toJSON(){return{committed:this.committed,snapshot:this.snapshot.toJSON()}}}function runTransaction(o,r,a){var l;if(o=getModularInstance(o),validateWritablePath("Reference.transaction",o._path),o.key===".length"||o.key===".keys")throw"Reference.transaction failed: "+o.key+" is a read-only object.";const c=(l=a==null?void 0:a.applyLocally)!==null&&l!==void 0?l:!0,u=new Deferred$1,d=(m,y,E)=>{let A=null;m?u.reject(m):(A=new DataSnapshot(E,new ReferenceImpl(o._repo,o._path),PRIORITY_INDEX),u.resolve(new TransactionResult(y,A)))},f=onValue(o,()=>{});return repoStartTransaction(o._repo,o._path,r,d,f,c),u.promise}PersistentConnection.prototype.simpleListen=function(o,r){this.sendRequest("q",{p:o},r)};PersistentConnection.prototype.echo=function(o,r){this.sendRequest("echo",{d:o},r)};registerDatabase();var commonjsGlobal$2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
2725Copyright The Closure Library Authors.
2726SPDX-License-Identifier: Apache-2.0
2727*/var Integer,Md5;(function(){var o;/** @license
2728
2729 Copyright The Closure Library Authors.
2730 SPDX-License-Identifier: Apache-2.0
2731*/function r(U,G){function Y(){}Y.prototype=G.prototype,U.D=G.prototype,U.prototype=new Y,U.prototype.constructor=U,U.C=function(te,ve,J){for(var Z=Array(arguments.length-2),Me=2;Me<arguments.length;Me++)Z[Me-2]=arguments[Me];return G.prototype[ve].apply(te,Z)}}function a(){this.blockSize=-1}function l(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}r(l,a),l.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function c(U,G,Y){Y||(Y=0);var te=Array(16);if(typeof G=="string")for(var ve=0;16>ve;++ve)te[ve]=G.charCodeAt(Y++)|G.charCodeAt(Y++)<<8|G.charCodeAt(Y++)<<16|G.charCodeAt(Y++)<<24;else for(ve=0;16>ve;++ve)te[ve]=G[Y++]|G[Y++]<<8|G[Y++]<<16|G[Y++]<<24;G=U.g[0],Y=U.g[1],ve=U.g[2];var J=U.g[3],Z=G+(J^Y&(ve^J))+te[0]+3614090360&4294967295;G=Y+(Z<<7&4294967295|Z>>>25),Z=J+(ve^G&(Y^ve))+te[1]+3905402710&4294967295,J=G+(Z<<12&4294967295|Z>>>20),Z=ve+(Y^J&(G^Y))+te[2]+606105819&4294967295,ve=J+(Z<<17&4294967295|Z>>>15),Z=Y+(G^ve&(J^G))+te[3]+3250441966&4294967295,Y=ve+(Z<<22&4294967295|Z>>>10),Z=G+(J^Y&(ve^J))+te[4]+4118548399&4294967295,G=Y+(Z<<7&4294967295|Z>>>25),Z=J+(ve^G&(Y^ve))+te[5]+1200080426&4294967295,J=G+(Z<<12&4294967295|Z>>>20),Z=ve+(Y^J&(G^Y))+te[6]+2821735955&4294967295,ve=J+(Z<<17&4294967295|Z>>>15),Z=Y+(G^ve&(J^G))+te[7]+4249261313&4294967295,Y=ve+(Z<<22&4294967295|Z>>>10),Z=G+(J^Y&(ve^J))+te[8]+1770035416&4294967295,G=Y+(Z<<7&4294967295|Z>>>25),Z=J+(ve^G&(Y^ve))+te[9]+2336552879&4294967295,J=G+(Z<<12&4294967295|Z>>>20),Z=ve+(Y^J&(G^Y))+te[10]+4294925233&4294967295,ve=J+(Z<<17&4294967295|Z>>>15),Z=Y+(G^ve&(J^G))+te[11]+2304563134&4294967295,Y=ve+(Z<<22&4294967295|Z>>>10),Z=G+(J^Y&(ve^J))+te[12]+1804603682&4294967295,G=Y+(Z<<7&4294967295|Z>>>25),Z=J+(ve^G&(Y^ve))+te[13]+4254626195&4294967295,J=G+(Z<<12&4294967295|Z>>>20),Z=ve+(Y^J&(G^Y))+te[14]+2792965006&4294967295,ve=J+(Z<<17&4294967295|Z>>>15),Z=Y+(G^ve&(J^G))+te[15]+1236535329&4294967295,Y=ve+(Z<<22&4294967295|Z>>>10),Z=G+(ve^J&(Y^ve))+te[1]+4129170786&4294967295,G=Y+(Z<<5&4294967295|Z>>>27),Z=J+(Y^ve&(G^Y))+te[6]+3225465664&4294967295,J=G+(Z<<9&4294967295|Z>>>23),Z=ve+(G^Y&(J^G))+te[11]+643717713&4294967295,ve=J+(Z<<14&4294967295|Z>>>18),Z=Y+(J^G&(ve^J))+te[0]+3921069994&4294967295,Y=ve+(Z<<20&4294967295|Z>>>12),Z=G+(ve^J&(Y^ve))+te[5]+3593408605&4294967295,G=Y+(Z<<5&4294967295|Z>>>27),Z=J+(Y^ve&(G^Y))+te[10]+38016083&4294967295,J=G+(Z<<9&4294967295|Z>>>23),Z=ve+(G^Y&(J^G))+te[15]+3634488961&4294967295,ve=J+(Z<<14&4294967295|Z>>>18),Z=Y+(J^G&(ve^J))+te[4]+3889429448&4294967295,Y=ve+(Z<<20&4294967295|Z>>>12),Z=G+(ve^J&(Y^ve))+te[9]+568446438&4294967295,G=Y+(Z<<5&4294967295|Z>>>27),Z=J+(Y^ve&(G^Y))+te[14]+3275163606&4294967295,J=G+(Z<<9&4294967295|Z>>>23),Z=ve+(G^Y&(J^G))+te[3]+4107603335&4294967295,ve=J+(Z<<14&4294967295|Z>>>18),Z=Y+(J^G&(ve^J))+te[8]+1163531501&4294967295,Y=ve+(Z<<20&4294967295|Z>>>12),Z=G+(ve^J&(Y^ve))+te[13]+2850285829&4294967295,G=Y+(Z<<5&4294967295|Z>>>27),Z=J+(Y^ve&(G^Y))+te[2]+4243563512&4294967295,J=G+(Z<<9&4294967295|Z>>>23),Z=ve+(G^Y&(J^G))+te[7]+1735328473&4294967295,ve=J+(Z<<14&4294967295|Z>>>18),Z=Y+(J^G&(ve^J))+te[12]+2368359562&4294967295,Y=ve+(Z<<20&4294967295|Z>>>12),Z=G+(Y^ve^J)+te[5]+4294588738&4294967295,G=Y+(Z<<4&4294967295|Z>>>28),Z=J+(G^Y^ve)+te[8]+2272392833&4294967295,J=G+(Z<<11&4294967295|Z>>>21),Z=ve+(J^G^Y)+te[11]+1839030562&4294967295,ve=J+(Z<<16&4294967295|Z>>>16),Z=Y+(ve^J^G)+te[14]+4259657740&4294967295,Y=ve+(Z<<23&4294967295|Z>>>9),Z=G+(Y^ve^J)+te[1]+2763975236&4294967295,G=Y+(Z<<4&4294967295|Z>>>28),Z=J+(G^Y^ve)+te[4]+1272893353&4294967295,J=G+(Z<<11&4294967295|Z>>>21),Z=ve+(J^G^Y)+te[7]+4139469664&4294967295,ve=J+(Z<<16&4294967295|Z>>>16),Z=Y+(ve^J^G)+te[10]+3200236656&4294967295,Y=ve+(Z<<23&4294967295|Z>>>9),Z=G+(Y^ve^J)+te[13]+681279174&4294967295,G=Y+(Z<<4&4294967295|Z>>>28),Z=J+(G^Y^ve)+te[0]+3936430074&4294967295,J=G+(Z<<11&4294967295|Z>>>21),Z=ve+(J^G^Y)+te[3]+3572445317&4294967295,ve=J+(Z<<16&4294967295|Z>>>16),Z=Y+(ve^J^G)+te[6]+76029189&4294967295,Y=ve+(Z<<23&4294967295|Z>>>9),Z=G+(Y^ve^J)+te[9]+3654602809&4294967295,G=Y+(Z<<4&4294967295|Z>>>28),Z=J+(G^Y^ve)+te[12]+3873151461&4294967295,J=G+(Z<<11&4294967295|Z>>>21),Z=ve+(J^G^Y)+te[15]+530742520&4294967295,ve=J+(Z<<16&4294967295|Z>>>16),Z=Y+(ve^J^G)+te[2]+3299628645&4294967295,Y=ve+(Z<<23&4294967295|Z>>>9),Z=G+(ve^(Y|~J))+te[0]+4096336452&4294967295,G=Y+(Z<<6&4294967295|Z>>>26),Z=J+(Y^(G|~ve))+te[7]+1126891415&4294967295,J=G+(Z<<10&4294967295|Z>>>22),Z=ve+(G^(J|~Y))+te[14]+2878612391&4294967295,ve=J+(Z<<15&4294967295|Z>>>17),Z=Y+(J^(ve|~G))+te[5]+4237533241&4294967295,Y=ve+(Z<<21&4294967295|Z>>>11),Z=G+(ve^(Y|~J))+te[12]+1700485571&4294967295,G=Y+(Z<<6&4294967295|Z>>>26),Z=J+(Y^(G|~ve))+te[3]+2399980690&4294967295,J=G+(Z<<10&4294967295|Z>>>22),Z=ve+(G^(J|~Y))+te[10]+4293915773&4294967295,ve=J+(Z<<15&4294967295|Z>>>17),Z=Y+(J^(ve|~G))+te[1]+2240044497&4294967295,Y=ve+(Z<<21&4294967295|Z>>>11),Z=G+(ve^(Y|~J))+te[8]+1873313359&4294967295,G=Y+(Z<<6&4294967295|Z>>>26),Z=J+(Y^(G|~ve))+te[15]+4264355552&4294967295,J=G+(Z<<10&4294967295|Z>>>22),Z=ve+(G^(J|~Y))+te[6]+2734768916&4294967295,ve=J+(Z<<15&4294967295|Z>>>17),Z=Y+(J^(ve|~G))+te[13]+1309151649&4294967295,Y=ve+(Z<<21&4294967295|Z>>>11),Z=G+(ve^(Y|~J))+te[4]+4149444226&4294967295,G=Y+(Z<<6&4294967295|Z>>>26),Z=J+(Y^(G|~ve))+te[11]+3174756917&4294967295,J=G+(Z<<10&4294967295|Z>>>22),Z=ve+(G^(J|~Y))+te[2]+718787259&4294967295,ve=J+(Z<<15&4294967295|Z>>>17),Z=Y+(J^(ve|~G))+te[9]+3951481745&4294967295,U.g[0]=U.g[0]+G&4294967295,U.g[1]=U.g[1]+(ve+(Z<<21&4294967295|Z>>>11))&4294967295,U.g[2]=U.g[2]+ve&4294967295,U.g[3]=U.g[3]+J&4294967295}l.prototype.u=function(U,G){G===void 0&&(G=U.length);for(var Y=G-this.blockSize,te=this.B,ve=this.h,J=0;J<G;){if(ve==0)for(;J<=Y;)c(this,U,J),J+=this.blockSize;if(typeof U=="string"){for(;J<G;)if(te[ve++]=U.charCodeAt(J++),ve==this.blockSize){c(this,te),ve=0;break}}else for(;J<G;)if(te[ve++]=U[J++],ve==this.blockSize){c(this,te),ve=0;break}}this.h=ve,this.o+=G},l.prototype.v=function(){var U=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);U[0]=128;for(var G=1;G<U.length-8;++G)U[G]=0;var Y=8*this.o;for(G=U.length-8;G<U.length;++G)U[G]=Y&255,Y/=256;for(this.u(U),U=Array(16),G=Y=0;4>G;++G)for(var te=0;32>te;te+=8)U[Y++]=this.g[G]>>>te&255;return U};function u(U,G){var Y=f;return Object.prototype.hasOwnProperty.call(Y,U)?Y[U]:Y[U]=G(U)}function d(U,G){this.h=G;for(var Y=[],te=!0,ve=U.length-1;0<=ve;ve--){var J=U[ve]|0;te&&J==G||(Y[ve]=J,te=!1)}this.g=Y}var f={};function m(U){return-128<=U&&128>U?u(U,function(G){return new d([G|0],0>G?-1:0)}):new d([U|0],0>U?-1:0)}function y(U){if(isNaN(U)||!isFinite(U))return A;if(0>U)return $(y(-U));for(var G=[],Y=1,te=0;U>=Y;te++)G[te]=U/Y|0,Y*=4294967296;return new d(G,0)}function E(U,G){if(U.length==0)throw Error("number format error: empty string");if(G=G||10,2>G||36<G)throw Error("radix out of range: "+G);if(U.charAt(0)=="-")return $(E(U.substring(1),G));if(0<=U.indexOf("-"))throw Error('number format error: interior "-" character');for(var Y=y(Math.pow(G,8)),te=A,ve=0;ve<U.length;ve+=8){var J=Math.min(8,U.length-ve),Z=parseInt(U.substring(ve,ve+J),G);8>J?(J=y(Math.pow(G,J)),te=te.j(J).add(y(Z))):(te=te.j(Y),te=te.add(y(Z)))}return te}var A=m(0),P=m(1),R=m(16777216);o=d.prototype,o.m=function(){if(M(this))return-$(this).m();for(var U=0,G=1,Y=0;Y<this.g.length;Y++){var te=this.i(Y);U+=(0<=te?te:4294967296+te)*G,G*=4294967296}return U}
vendor: 47,855 bytes, lines 2731-2786
2731,o.toString=function(U){if(U=U||10,2>U||36<U)throw Error("radix out of range: "+U);if(x(this))return"0";if(M(this))return"-"+$(this).toString(U);for(var G=y(Math.pow(U,6)),Y=this,te="";;){var ve=L(Y,G).g;Y=V(Y,ve.j(G));var J=((0<Y.g.length?Y.g[0]:Y.h)>>>0).toString(U);if(Y=ve,x(Y))return J+te;for(;6>J.length;)J="0"+J;te=J+te}},o.i=function(U){return 0>U?0:U<this.g.length?this.g[U]:this.h};function x(U){if(U.h!=0)return!1;for(var G=0;G<U.g.length;G++)if(U.g[G]!=0)return!1;return!0}function M(U){return U.h==-1}o.l=function(U){return U=V(this,U),M(U)?-1:x(U)?0:1};function $(U){for(var G=U.g.length,Y=[],te=0;te<G;te++)Y[te]=~U.g[te];return new d(Y,~U.h).add(P)}o.abs=function(){return M(this)?$(this):this},o.add=function(U){for(var G=Math.max(this.g.length,U.g.length),Y=[],te=0,ve=0;ve<=G;ve++){var J=te+(this.i(ve)&65535)+(U.i(ve)&65535),Z=(J>>>16)+(this.i(ve)>>>16)+(U.i(ve)>>>16);te=Z>>>16,J&=65535,Z&=65535,Y[ve]=Z<<16|J}return new d(Y,Y[Y.length-1]&-2147483648?-1:0)};function V(U,G){return U.add($(G))}o.j=function(U){if(x(this)||x(U))return A;if(M(this))return M(U)?$(this).j($(U)):$($(this).j(U));if(M(U))return $(this.j($(U)));if(0>this.l(R)&&0>U.l(R))return y(this.m()*U.m());for(var G=this.g.length+U.g.length,Y=[],te=0;te<2*G;te++)Y[te]=0;for(te=0;te<this.g.length;te++)for(var ve=0;ve<U.g.length;ve++){var J=this.i(te)>>>16,Z=this.i(te)&65535,Me=U.i(ve)>>>16,ke=U.i(ve)&65535;Y[2*te+2*ve]+=Z*ke,B(Y,2*te+2*ve),Y[2*te+2*ve+1]+=J*ke,B(Y,2*te+2*ve+1),Y[2*te+2*ve+1]+=Z*Me,B(Y,2*te+2*ve+1),Y[2*te+2*ve+2]+=J*Me,B(Y,2*te+2*ve+2)}for(te=0;te<G;te++)Y[te]=Y[2*te+1]<<16|Y[2*te];for(te=G;te<2*G;te++)Y[te]=0;return new d(Y,0)};function B(U,G){for(;(U[G]&65535)!=U[G];)U[G+1]+=U[G]>>>16,U[G]&=65535,G++}function O(U,G){this.g=U,this.h=G}function L(U,G){if(x(G))throw Error("division by zero");if(x(U))return new O(A,A);if(M(U))return G=L($(U),G),new O($(G.g),$(G.h));if(M(G))return G=L(U,$(G)),new O($(G.g),G.h);if(30<U.g.length){if(M(U)||M(G))throw Error("slowDivide_ only works with positive integers.");for(var Y=P,te=G;0>=te.l(U);)Y=F(Y),te=F(te);var ve=j(Y,1),J=j(te,1);for(te=j(te,2),Y=j(Y,2);!x(te);){var Z=J.add(te);0>=Z.l(U)&&(ve=ve.add(Y),J=Z),te=j(te,1),Y=j(Y,1)}return G=V(U,ve.j(G)),new O(ve,G)}for(ve=A;0<=U.l(G);){for(Y=Math.max(1,Math.floor(U.m()/G.m())),te=Math.ceil(Math.log(Y)/Math.LN2),te=48>=te?1:Math.pow(2,te-48),J=y(Y),Z=J.j(G);M(Z)||0<Z.l(U);)Y-=te,J=y(Y),Z=J.j(G);x(J)&&(J=P),ve=ve.add(J),U=V(U,Z)}return new O(ve,U)}o.A=function(U){return L(this,U).h},o.and=function(U){for(var G=Math.max(this.g.length,U.g.length),Y=[],te=0;te<G;te++)Y[te]=this.i(te)&U.i(te);return new d(Y,this.h&U.h)},o.or=function(U){for(var G=Math.max(this.g.length,U.g.length),Y=[],te=0;te<G;te++)Y[te]=this.i(te)|U.i(te);return new d(Y,this.h|U.h)},o.xor=function(U){for(var G=Math.max(this.g.length,U.g.length),Y=[],te=0;te<G;te++)Y[te]=this.i(te)^U.i(te);return new d(Y,this.h^U.h)};function F(U){for(var G=U.g.length+1,Y=[],te=0;te<G;te++)Y[te]=U.i(te)<<1|U.i(te-1)>>>31;return new d(Y,U.h)}function j(U,G){var Y=G>>5;G%=32;for(var te=U.g.length-Y,ve=[],J=0;J<te;J++)ve[J]=0<G?U.i(J+Y)>>>G|U.i(J+Y+1)<<32-G:U.i(J+Y);return new d(ve,U.h)}l.prototype.digest=l.prototype.v,l.prototype.reset=l.prototype.s,l.prototype.update=l.prototype.u,Md5=l,d.prototype.add=d.prototype.add,d.prototype.multiply=d.prototype.j,d.prototype.modulo=d.prototype.A,d.prototype.compare=d.prototype.l,d.prototype.toNumber=d.prototype.m,d.prototype.toString=d.prototype.toString,d.prototype.getBits=d.prototype.i,d.fromNumber=y,d.fromString=E,Integer=d}).apply(typeof commonjsGlobal$2<"u"?commonjsGlobal$2:typeof self<"u"?self:typeof window<"u"?window:{});var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
2732Copyright The Closure Library Authors.
2733SPDX-License-Identifier: Apache-2.0
2734*/var XhrIo,WebChannel,EventType,ErrorCode,Stat,Event$1,getStatEventTarget,createWebChannelTransport;(function(){var o,r=typeof Object.defineProperties=="function"?Object.defineProperty:function(I,q,X){return I==Array.prototype||I==Object.prototype||(I[q]=X.value),I};function a(I){I=[typeof globalThis=="object"&&globalThis,I,typeof window=="object"&&window,typeof self=="object"&&self,typeof commonjsGlobal$1=="object"&&commonjsGlobal$1];for(var q=0;q<I.length;++q){var X=I[q];if(X&&X.Math==Math)return X}throw Error("Cannot find global object")}var l=a(this);function c(I,q){if(q)e:{var X=l;I=I.split(".");for(var Ce=0;Ce<I.length-1;Ce++){var Ue=I[Ce];if(!(Ue in X))break e;X=X[Ue]}I=I[I.length-1],Ce=X[I],q=q(Ce),q!=Ce&&q!=null&&r(X,I,{configurable:!0,writable:!0,value:q})}}function u(I,q){I instanceof String&&(I+="");var X=0,Ce=!1,Ue={next:function(){if(!Ce&&X<I.length){var Ge=X++;return{value:q(Ge,I[Ge]),done:!1}}return Ce=!0,{done:!0,value:void 0}}};return Ue[Symbol.iterator]=function(){return Ue},Ue}c("Array.prototype.values",function(I){return I||function(){return u(this,function(q,X){return X})}});/** @license
2735
2736 Copyright The Closure Library Authors.
2737 SPDX-License-Identifier: Apache-2.0
2738*/var d=d||{},f=this||self;function m(I){var q=typeof I;return q=q!="object"?q:I?Array.isArray(I)?"array":q:"null",q=="array"||q=="object"&&typeof I.length=="number"}function y(I){var q=typeof I;return q=="object"&&I!=null||q=="function"}function E(I,q,X){return I.call.apply(I.bind,arguments)}function A(I,q,X){if(!I)throw Error();if(2<arguments.length){var Ce=Array.prototype.slice.call(arguments,2);return function(){var Ue=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(Ue,Ce),I.apply(q,Ue)}}return function(){return I.apply(q,arguments)}}function P(I,q,X){return P=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?E:A,P.apply(null,arguments)}function R(I,q){var X=Array.prototype.slice.call(arguments,1);return function(){var Ce=X.slice();return Ce.push.apply(Ce,arguments),I.apply(this,Ce)}}function x(I,q){function X(){}X.prototype=q.prototype,I.aa=q.prototype,I.prototype=new X,I.prototype.constructor=I,I.Qb=function(Ce,Ue,Ge){for(var ut=Array(arguments.length-2),Ft=2;Ft<arguments.length;Ft++)ut[Ft-2]=arguments[Ft];return q.prototype[Ue].apply(Ce,ut)}}function M(I){const q=I.length;if(0<q){const X=Array(q);for(let Ce=0;Ce<q;Ce++)X[Ce]=I[Ce];return X}return[]}function $(I,q){for(let X=1;X<arguments.length;X++){const Ce=arguments[X];if(m(Ce)){const Ue=I.length||0,Ge=Ce.length||0;I.length=Ue+Ge;for(let ut=0;ut<Ge;ut++)I[Ue+ut]=Ce[ut]}else I.push(Ce)}}class V{constructor(q,X){this.i=q,this.j=X,this.h=0,this.g=null}get(){let q;return 0<this.h?(this.h--,q=this.g,this.g=q.next,q.next=null):q=this.i(),q}}function B(I){return/^[\s\xa0]*$/.test(I)}function O(){var I=f.navigator;return I&&(I=I.userAgent)?I:""}function L(I){return L[" "](I),I}L[" "]=function(){};var F=O().indexOf("Gecko")!=-1&&!(O().toLowerCase().indexOf("webkit")!=-1&&O().indexOf("Edge")==-1)&&!(O().indexOf("Trident")!=-1||O().indexOf("MSIE")!=-1)&&O().indexOf("Edge")==-1;function j(I,q,X){for(const Ce in I)q.call(X,I[Ce],Ce,I)}function U(I,q){for(const X in I)q.call(void 0,I[X],X,I)}function G(I){const q={};for(const X in I)q[X]=I[X];return q}const Y="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function te(I,q){let X,Ce;for(let Ue=1;Ue<arguments.length;Ue++){Ce=arguments[Ue];for(X in Ce)I[X]=Ce[X];for(let Ge=0;Ge<Y.length;Ge++)X=Y[Ge],Object.prototype.hasOwnProperty.call(Ce,X)&&(I[X]=Ce[X])}}function ve(I){var q=1;I=I.split(":");const X=[];for(;0<q&&I.length;)X.push(I.shift()),q--;return I.length&&X.push(I.join(":")),X}function J(I){f.setTimeout(()=>{throw I},0)}function Z(){var I=ie;let q=null;return I.g&&(q=I.g,I.g=I.g.next,I.g||(I.h=null),q.next=null),q}class Me{constructor(){this.h=this.g=null}add(q,X){const Ce=ke.get();Ce.set(q,X),this.h?this.h.next=Ce:this.g=Ce,this.h=Ce}}var ke=new V(()=>new se,I=>I.reset());class se{constructor(){this.next=this.g=this.h=null}set(q,X){this.h=q,this.g=X,this.next=null}reset(){this.next=this.g=this.h=null}}let xe,Q=!1,ie=new Me,Fe=()=>{const I=f.Promise.resolve(void 0);xe=()=>{I.then(Ne)}};var Ne=()=>{for(var I;I=Z();){try{I.h.call(I.g)}catch(X){J(X)}var q=ke;q.j(I),100>q.h&&(q.h++,I.next=q.g,q.g=I)}Q=!1};function nt(){this.s=this.s,this.C=this.C}nt.prototype.s=!1,nt.prototype.ma=function(){this.s||(this.s=!0,this.N())},nt.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function ct(I,q){this.type=I,this.g=this.target=q,this.defaultPrevented=!1}ct.prototype.h=function(){this.defaultPrevented=!0};var pt=function(){if(!f.addEventListener||!Object.defineProperty)return!1;var I=!1,q=Object.defineProperty({},"passive",{get:function(){I=!0}});try{const X=()=>{};f.addEventListener("test",X,q),f.removeEventListener("test",X,q)}catch{}return I}();function _t(I,q){if(ct.call(this,I?I.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,I){var X=this.type=I.type,Ce=I.changedTouches&&I.changedTouches.length?I.changedTouches[0]:null;if(this.target=I.target||I.srcElement,this.g=q,q=I.relatedTarget){if(F){e:{try{L(q.nodeName);var Ue=!0;break e}catch{}Ue=!1}Ue||(q=null)}}else X=="mouseover"?q=I.fromElement:X=="mouseout"&&(q=I.toElement);this.relatedTarget=q,Ce?(this.clientX=Ce.clientX!==void 0?Ce.clientX:Ce.pageX,this.clientY=Ce.clientY!==void 0?Ce.clientY:Ce.pageY,this.screenX=Ce.screenX||0,this.screenY=Ce.screenY||0):(this.clientX=I.clientX!==void 0?I.clientX:I.pageX,this.clientY=I.clientY!==void 0?I.clientY:I.pageY,this.screenX=I.screenX||0,this.screenY=I.screenY||0),this.button=I.button,this.key=I.key||"",this.ctrlKey=I.ctrlKey,this.altKey=I.altKey,this.shiftKey=I.shiftKey,this.metaKey=I.metaKey,this.pointerId=I.pointerId||0,this.pointerType=typeof I.pointerType=="string"?I.pointerType:yt[I.pointerType]||"",this.state=I.state,this.i=I,I.defaultPrevented&&_t.aa.h.call(this)}}x(_t,ct);var yt={2:"touch",3:"pen",4:"mouse"};_t.prototype.h=function(){_t.aa.h.call(this);var I=this.i;I.preventDefault?I.preventDefault():I.returnValue=!1};var je="closure_listenable_"+(1e6*Math.random()|0),it=0;function st(I,q,X,Ce,Ue){this.listener=I,this.proxy=null,this.src=q,this.type=X,this.capture=!!Ce,this.ha=Ue,this.key=++it,this.da=this.fa=!1}function lt(I){I.da=!0,I.listener=null,I.proxy=null,I.src=null,I.ha=null}function vt(I){this.src=I,this.g={},this.h=0}vt.prototype.add=function(I,q,X,Ce,Ue){var Ge=I.toString();I=this.g[Ge],I||(I=this.g[Ge]=[],this.h++);var ut=Pe(I,q,Ce,Ue);return-1<ut?(q=I[ut],X||(q.fa=!1)):(q=new st(q,this.src,Ge,!!Ce,Ue),q.fa=X,I.push(q)),q};function ze(I,q){var X=q.type;if(X in I.g){var Ce=I.g[X],Ue=Array.prototype.indexOf.call(Ce,q,void 0),Ge;(Ge=0<=Ue)&&Array.prototype.splice.call(Ce,Ue,1),Ge&&(lt(q),I.g[X].length==0&&(delete I.g[X],I.h--))}}function Pe(I,q,X,Ce){for(var Ue=0;Ue<I.length;++Ue){var Ge=I[Ue];if(!Ge.da&&Ge.listener==q&&Ge.capture==!!X&&Ge.ha==Ce)return Ue}return-1}var Se="closure_lm_"+(1e6*Math.random()|0),Le={};function qe(I,q,X,Ce,Ue){if(Array.isArray(q)){for(var Ge=0;Ge<q.length;Ge++)qe(I,q[Ge],X,Ce,Ue);return null}return X=ht(X),I&&I[je]?I.K(q,X,y(Ce)?!!Ce.capture:!1,Ue):He(I,q,X,!1,Ce,Ue)}function He(I,q,X,Ce,Ue,Ge){if(!q)throw Error("Invalid event type");var ut=y(Ue)?!!Ue.capture:!!Ue,Ft=mt(I);if(Ft||(I[Se]=Ft=new vt(I)),X=Ft.add(q,X,Ce,ut,Ge),X.proxy)return X;if(Ce=Ye(),X.proxy=Ce,Ce.src=I,Ce.listener=X,I.addEventListener)pt||(Ue=ut),Ue===void 0&&(Ue=!1),I.addEventListener(q.toString(),Ce,Ue);else if(I.attachEvent)I.attachEvent(Qe(q.toString()),Ce);else if(I.addListener&&I.removeListener)I.addListener(Ce);else throw Error("addEventListener and attachEvent are unavailable.");return X}function Ye(){function I(X){return q.call(I.src,I.listener,X)}const q=Ze;return I}function ot(I,q,X,Ce,Ue){if(Array.isArray(q))for(var Ge=0;Ge<q.length;Ge++)ot(I,q[Ge],X,Ce,Ue);else Ce=y(Ce)?!!Ce.capture:!!Ce,X=ht(X),I&&I[je]?(I=I.i,q=String(q).toString(),q in I.g&&(Ge=I.g[q],X=Pe(Ge,X,Ce,Ue),-1<X&&(lt(Ge[X]),Array.prototype.splice.call(Ge,X,1),Ge.length==0&&(delete I.g[q],I.h--)))):I&&(I=mt(I))&&(q=I.g[q.toString()],I=-1,q&&(I=Pe(q,X,Ce,Ue)),(X=-1<I?q[I]:null)&&et(X))}function et(I){if(typeof I!="number"&&I&&!I.da){var q=I.src;if(q&&q[je])ze(q.i,I);else{var X=I.type,Ce=I.proxy;q.removeEventListener?q.removeEventListener(X,Ce,I.capture):q.detachEvent?q.detachEvent(Qe(X),Ce):q.addListener&&q.removeListener&&q.removeListener(Ce),(X=mt(q))?(ze(X,I),X.h==0&&(X.src=null,q[Se]=null)):lt(I)}}}function Qe(I){return I in Le?Le[I]:Le[I]="on"+I}function Ze(I,q){if(I.da)I=!0;else{q=new _t(q,this);var X=I.listener,Ce=I.ha||I.src;I.fa&&et(I),I=X.call(Ce,q)}return I}function mt(I){return I=I[Se],I instanceof vt?I:null}var at="__closure_events_fn_"+(1e9*Math.random()>>>0);function ht(I){return typeof I=="function"?I:(I[at]||(I[at]=function(q){return I.handleEvent(q)}),I[at])}function dt(){nt.call(this),this.i=new vt(this),this.M=this,this.F=null}x(dt,nt),dt.prototype[je]=!0,dt.prototype.removeEventListener=function(I,q,X,Ce){ot(this,I,q,X,Ce)};function bt(I,q){var X,Ce=I.F;if(Ce)for(X=[];Ce;Ce=Ce.F)X.push(Ce);if(I=I.M,Ce=q.type||q,typeof q=="string")q=new ct(q,I);else if(q instanceof ct)q.target=q.target||I;else{var Ue=q;q=new ct(Ce,I),te(q,Ue)}if(Ue=!0,X)for(var Ge=X.length-1;0<=Ge;Ge--){var ut=q.g=X[Ge];Ue=At(ut,Ce,!0,q)&&Ue}if(ut=q.g=I,Ue=At(ut,Ce,!0,q)&&Ue,Ue=At(ut,Ce,!1,q)&&Ue,X)for(Ge=0;Ge<X.length;Ge++)ut=q.g=X[Ge],Ue=At(ut,Ce,!1,q)&&Ue}dt.prototype.N=function(){if(dt.aa.N.call(this),this.i){var I=this.i,q;for(q in I.g){for(var X=I.g[q],Ce=0;Ce<X.length;Ce++)lt(X[Ce]);delete I.g[q],I.h--}}this.F=null},dt.prototype.K=function(I,q,X,Ce){return this.i.add(String(I),q,!1,X,Ce)},dt.prototype.L=function(I,q,X,Ce){return this.i.add(String(I),q,!0,X,Ce)};function At(I,q,X,Ce){if(q=I.i.g[String(q)],!q)return!0;q=q.concat();for(var Ue=!0,Ge=0;Ge<q.length;++Ge){var ut=q[Ge];if(ut&&!ut.da&&ut.capture==X){var Ft=ut.listener,sr=ut.ha||ut.src;ut.fa&&ze(I.i,ut),Ue=Ft.call(sr,Ce)!==!1&&Ue}}return Ue&&!Ce.defaultPrevented}function Ct(I,q,X){if(typeof I=="function")X&&(I=P(I,X));else if(I&&typeof I.handleEvent=="function")I=P(I.handleEvent,I);else throw Error("Invalid listener argument");return 2147483647<Number(q)?-1:f.setTimeout(I,q||0)}function qt(I){I.g=Ct(()=>{I.g=null,I.i&&(I.i=!1,qt(I))},I.l);const q=I.h;I.h=null,I.m.apply(null,q)}class Yt extends nt{constructor(q,X){super(),this.m=q,this.l=X,this.h=null,this.i=!1,this.g=null}j(q){this.h=arguments,this.g?this.i=!0:qt(this)}N(){super.N(),this.g&&(f.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Xt(I){nt.call(this),this.h=I,this.g={}}x(Xt,nt);var tr=[];function Or(I){j(I.g,function(q,X){this.g.hasOwnProperty(X)&&et(q)},I),I.g={}}Xt.prototype.N=function(){Xt.aa.N.call(this),Or(this)},Xt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Qr=f.JSON.stringify,ir=f.JSON.parse,pr=class{stringify(I){return f.JSON.stringify(I,void 0)}parse(I){return f.JSON.parse(I,void 0)}};function wn(){}wn.prototype.h=null;function ws(I){return I.h||(I.h=I.i())}function Es(){}var En={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function oi(){ct.call(this,"d")}x(oi,ct);function Mi(){ct.call(this,"c")}x(Mi,ct);var sn={},Ts=null;function ai(){return Ts=Ts||new dt}sn.La="serverreachability";function Di(I){ct.call(this,sn.La,I)}x(Di,ct);function Ln(I){const q=ai();bt(q,new Di(q))}sn.STAT_EVENT="statevent";function Ps(I,q){ct.call(this,sn.STAT_EVENT,I),this.stat=q}x(Ps,ct);function hr(I){const q=ai();bt(q,new Ps(q,I))}sn.Ma="timingevent";function li(I,q){ct.call(this,sn.Ma,I),this.size=q}x(li,ct);function Fn(I,q){if(typeof I!="function")throw Error("Fn must not be null and must be a function");return f.setTimeout(function(){I()},q)}function an(){this.g=!0}an.prototype.xa=function(){this.g=!1};function Lo(I,q,X,Ce,Ue,Ge){I.info(function(){if(I.g)if(Ge)for(var ut="",Ft=Ge.split("&"),sr=0;sr<Ft.length;sr++){var Dt=Ft[sr].split("=");if(1<Dt.length){var $t=Dt[0];Dt=Dt[1];var rr=$t.split("_");ut=2<=rr.length&&rr[1]=="type"?ut+($t+"="+Dt+"&"):ut+($t+"=redacted&")}}else ut=null;else ut=Ge;return"XMLHTTP REQ ("+Ce+") [attempt "+Ue+"]: "+q+`
2739`+X+`
2740`+ut})}function Fo(I,q,X,Ce,Ue,Ge,ut){I.info(function(){return"XMLHTTP RESP ("+Ce+") [ attempt "+Ue+"]: "+q+`
2741`+X+`
2742`+Ge+" "+ut})}function Tn(I,q,X,Ce){I.info(function(){return"XMLHTTP TEXT ("+q+"): "+$o(I,X)+(Ce?" "+Ce:"")})}function Bo(I,q){I.info(function(){return"TIMEOUT: "+q})}an.prototype.info=function(){};function $o(I,q){if(!I.g)return q;if(!q)return null;try{var X=JSON.parse(q);if(X){for(I=0;I<X.length;I++)if(Array.isArray(X[I])){var Ce=X[I];if(!(2>Ce.length)){var Ue=Ce[1];if(Array.isArray(Ue)&&!(1>Ue.length)){var Ge=Ue[0];if(Ge!="noop"&&Ge!="stop"&&Ge!="close")for(var ut=1;ut<Ue.length;ut++)Ue[ut]=""}}}}return Qr(X)}catch{return q}}var ci={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},Ss={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"},Ni;function Bn(){}x(Bn,wn),Bn.prototype.g=function(){return new XMLHttpRequest},Bn.prototype.i=function(){return{}},Ni=new Bn;function Jr(I,q,X,Ce){this.j=I,this.i=q,this.l=X,this.R=Ce||1,this.U=new Xt(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new As}function As(){this.i=null,this.g="",this.h=!1}var Is={},Vi={};function Li(I,q,X){I.L=1,I.v=Sn(Mr(q)),I.m=X,I.P=!0,Cs(I,null)}function Cs(I,q){I.F=Date.now(),ln(I),I.A=Mr(I.v);var X=I.A,Ce=I.R;Array.isArray(Ce)||(Ce=[String(Ce)]),Gi(X.i,"t",Ce),I.C=0,X=I.j.J,I.h=new As,I.g=Ys(I.j,X?q:null,!I.m),0<I.O&&(I.M=new Yt(P(I.Y,I,I.g),I.O)),q=I.U,X=I.g,Ce=I.ca;var Ue="readystatechange";Array.isArray(Ue)||(Ue&&(tr[0]=Ue.toString()),Ue=tr);for(var Ge=0;Ge<Ue.length;Ge++){var ut=qe(X,Ue[Ge],Ce||q.handleEvent,!1,q.h||q);if(!ut)break;q.g[ut.key]=ut}q=I.H?G(I.H):{},I.m?(I.u||(I.u="POST"),q["Content-Type"]="application/x-www-form-urlencoded",I.g.ea(I.A,I.u,I.m,q)):(I.u="GET",I.g.ea(I.A,I.u,null,q)),Ln(),Lo(I.i,I.u,I.A,I.l,I.R,I.m)}Jr.prototype.ca=function(I){I=I.target;const q=this.M;q&&dr(I)==3?q.j():this.Y(I)},Jr.prototype.Y=function(I){try{if(I==this.g)e:{const rr=dr(this.g);var q=this.g.Ba();const Lr=this.g.Z();if(!(3>rr)&&(rr!=3||this.g&&(this.h.h||this.g.oa()||Ki(this.g)))){this.J||rr!=4||q==7||(q==8||0>=Lr?Ln(3):Ln(2)),Fi(this);var X=this.g.Z();this.X=X;t:if($n(this)){var Ce=Ki(this.g);I="";var Ue=Ce.length,Ge=dr(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){Xr(this),Un(this);var ut="";break t}this.h.i=new f.TextDecoder}for(q=0;q<Ue;q++)this.h.h=!0,I+=this.h.i.decode(Ce[q],{stream:!(Ge&&q==Ue-1)});Ce.length=0,this.h.g+=I,this.C=0,ut=this.h.g}else ut=this.g.oa();if(this.o=X==200,Fo(this.i,this.u,this.A,this.l,this.R,rr,X),this.o){if(this.T&&!this.K){t:{if(this.g){var Ft,sr=this.g;if((Ft=sr.g?sr.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!B(Ft)){var Dt=Ft;break t}}Dt=null}if(X=Dt)Tn(this.i,this.l,X,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,ui(this,X);else{this.o=!1,this.s=3,hr(12),Xr(this),Un(this);break e}}if(this.P){X=!0;let Tr;for(;!this.J&&this.C<ut.length;)if(Tr=Uo(this,ut),Tr==Vi){rr==4&&(this.s=4,hr(14),X=!1),Tn(this.i,this.l,null,"[Incomplete Response]");break}else if(Tr==Is){this.s=4,hr(15),Tn(this.i,this.l,ut,"[Invalid Chunk]"),X=!1;break}else Tn(this.i,this.l,Tr,null),ui(this,Tr);if($n(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),rr!=4||ut.length!=0||this.h.h||(this.s=1,hr(16),X=!1),this.o=this.o&&X,!X)Tn(this.i,this.l,ut,"[Invalid Chunked Response]"),Xr(this),Un(this);else if(0<ut.length&&!this.W){this.W=!0;var $t=this.j;$t.g==this&&$t.ba&&!$t.M&&($t.j.info("Great, no buffering proxy detected. Bytes received: "+ut.length),Vr($t),$t.M=!0,hr(11))}}else Tn(this.i,this.l,ut,null),ui(this,ut);rr==4&&Xr(this),this.o&&!this.J&&(rr==4?Wt(this.j,this):(this.o=!1,ln(this)))}else Yi(this.g),X==400&&0<ut.indexOf("Unknown SID")?(this.s=3,hr(12)):(this.s=0,hr(13)),Xr(this),Un(this)}}}catch{}finally{}};function $n(I){return I.g?I.u=="GET"&&I.L!=2&&I.j.Ca:!1}function Uo(I,q){var X=I.C,Ce=q.indexOf(`
2743`,X);return Ce==-1?Vi:(X=Number(q.substring(X,Ce)),isNaN(X)?Is:(Ce+=1,Ce+X>q.length?Vi:(q=q.slice(Ce,Ce+X),I.C=Ce+X,q)))}Jr.prototype.cancel=function(){this.J=!0,Xr(this)};function ln(I){I.S=Date.now()+I.I,Rs(I,I.I)}function Rs(I,q){if(I.B!=null)throw Error("WatchDog timer not null");I.B=Fn(P(I.ba,I),q)}function Fi(I){I.B&&(f.clearTimeout(I.B),I.B=null)}Jr.prototype.ba=function(){this.B=null;const I=Date.now();0<=I-this.S?(Bo(this.i,this.A),this.L!=2&&(Ln(),hr(17)),Xr(this),this.s=2,Un(this)):Rs(this,this.S-I)};function Un(I){I.j.G==0||I.J||Wt(I.j,I)}function Xr(I){Fi(I);var q=I.M;q&&typeof q.ma=="function"&&q.ma(),I.M=null,Or(I.U),I.g&&(q=I.g,I.g=null,q.abort(),q.ma())}function ui(I,q){try{var X=I.j;if(X.G!=0&&(X.g==I||Bi(X.h,I))){if(!I.K&&Bi(X.h,I)&&X.G==3){try{var Ce=X.Da.g.parse(q)}catch{Ce=null}if(Array.isArray(Ce)&&Ce.length==3){var Ue=Ce;if(Ue[0]==0){e:if(!X.u){if(X.g)if(X.g.F+3e3<I.F)Cn(X),Wn(X);else break e;gi(X),hr(18)}}else X.za=Ue[1],0<X.za-X.T&&37500>Ue[2]&&X.F&&X.v==0&&!X.C&&(X.C=Fn(P(X.Za,X),6e3));if(1>=Ms(X.h)&&X.ca){try{X.ca()}catch{}X.ca=void 0}}else Gr(X,11)}else if((I.K||X.g==I)&&Cn(X),!B(q))for(Ue=X.Da.g.parse(q),q=0;q<Ue.length;q++){let Dt=Ue[q];if(X.T=Dt[0],Dt=Dt[1],X.G==2)if(Dt[0]=="c"){X.K=Dt[1],X.ia=Dt[2];const $t=Dt[3];$t!=null&&(X.la=$t,X.j.info("VER="+X.la));const rr=Dt[4];rr!=null&&(X.Aa=rr,X.j.info("SVER="+X.Aa));const Lr=Dt[5];Lr!=null&&typeof Lr=="number"&&0<Lr&&(Ce=1.5*Lr,X.L=Ce,X.j.info("backChannelRequestTimeoutMs_="+Ce)),Ce=X;const Tr=I.g;if(Tr){const Yn=Tr.g?Tr.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(Yn){var Ge=Ce.h;Ge.g||Yn.indexOf("spdy")==-1&&Yn.indexOf("quic")==-1&&Yn.indexOf("h2")==-1||(Ge.j=Ge.l,Ge.g=new Set,Ge.h&&(hi(Ge,Ge.h),Ge.h=null))}if(Ce.D){const Xi=Tr.g?Tr.g.getResponseHeader("X-HTTP-Session-Id"):null;Xi&&(Ce.ya=Xi,jt(Ce.I,Ce.D,Xi))}}X.G=3,X.l&&X.l.ua(),X.ba&&(X.R=Date.now()-I.F,X.j.info("Handshake RTT: "+X.R+"ms")),Ce=X;var ut=I;if(Ce.qa=_i(Ce,Ce.J?Ce.ia:null,Ce.W),ut.K){$i(Ce.h,ut);var Ft=ut,sr=Ce.L;sr&&(Ft.I=sr),Ft.B&&(Fi(Ft),ln(Ft)),Ce.g=ut}else zs(Ce);0<X.i.length&&Gn(X)}else Dt[0]!="stop"&&Dt[0]!="close"||Gr(X,7);else X.G==3&&(Dt[0]=="stop"||Dt[0]=="close"?Dt[0]=="stop"?Gr(X,7):mi(X):Dt[0]!="noop"&&X.l&&X.l.ta(Dt),X.v=0)}}Ln(4)}catch{}}var xs=class{constructor(I,q){this.g=I,this.map=q}};function ks(I){this.l=I||10,f.PerformanceNavigationTiming?(I=f.performance.getEntriesByType("navigation"),I=0<I.length&&(I[0].nextHopProtocol=="hq"||I[0].nextHopProtocol=="h2")):I=!!(f.chrome&&f.chrome.loadTimes&&f.chrome.loadTimes()&&f.chrome.loadTimes().wasFetchedViaSpdy),this.j=I?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function Os(I){return I.h?!0:I.g?I.g.size>=I.j:!1}function Ms(I){return I.h?1:I.g?I.g.size:0}function Bi(I,q){return I.h?I.h==q:I.g?I.g.has(q):!1}function hi(I,q){I.g?I.g.add(q):I.h=q}function $i(I,q){I.h&&I.h==q?I.h=null:I.g&&I.g.has(q)&&I.g.delete(q)}ks.prototype.cancel=function(){if(this.i=Ui(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const I of this.g.values())I.cancel();this.g.clear()}};function Ui(I){if(I.h!=null)return I.i.concat(I.h.D);if(I.g!=null&&I.g.size!==0){let q=I.i;for(const X of I.g.values())q=q.concat(X.D);return q}return M(I.i)}function Hi(I){if(I.V&&typeof I.V=="function")return I.V();if(typeof Map<"u"&&I instanceof Map||typeof Set<"u"&&I instanceof Set)return Array.from(I.values());if(typeof I=="string")return I.split("");if(m(I)){for(var q=[],X=I.length,Ce=0;Ce<X;Ce++)q.push(I[Ce]);return q}q=[],X=0;for(Ce in I)q[X++]=I[Ce];return q}function Ho(I){if(I.na&&typeof I.na=="function")return I.na();if(!I.V||typeof I.V!="function"){if(typeof Map<"u"&&I instanceof Map)return Array.from(I.keys());if(!(typeof Set<"u"&&I instanceof Set)){if(m(I)||typeof I=="string"){var q=[];I=I.length;for(var X=0;X<I;X++)q.push(X);return q}q=[],X=0;for(const Ce in I)q[X++]=Ce;return q}}}function ji(I,q){if(I.forEach&&typeof I.forEach=="function")I.forEach(q,void 0);else if(m(I)||typeof I=="string")Array.prototype.forEach.call(I,q,void 0);else for(var X=Ho(I),Ce=Hi(I),Ue=Ce.length,Ge=0;Ge<Ue;Ge++)q.call(void 0,Ce[Ge],X&&X[Ge],I)}var Hn=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Ds(I,q){if(I){I=I.split("&");for(var X=0;X<I.length;X++){var Ce=I[X].indexOf("="),Ue=null;if(0<=Ce){var Ge=I[X].substring(0,Ce);Ue=I[X].substring(Ce+1)}else Ge=I[X];q(Ge,Ue?decodeURIComponent(Ue.replace(/\+/g," ")):"")}}}function cn(I){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,I instanceof cn){this.h=I.h,jn(this,I.j),this.o=I.o,this.g=I.g,Pn(this,I.s),this.l=I.l;var q=I.i,X=new An;X.i=q.i,q.g&&(X.g=new Map(q.g),X.h=q.h),Ns(this,X),this.m=I.m}else I&&(q=String(I).match(Hn))?(this.h=!1,jn(this,q[1]||"",!0),this.o=un(q[2]||""),this.g=un(q[3]||"",!0),Pn(this,q[4]),this.l=un(q[5]||"",!0),Ns(this,q[6]||"",!0),this.m=un(q[7]||"")):(this.h=!1,this.i=new An(null,this.h))}cn.prototype.toString=function(){var I=[],q=this.j;q&&I.push(Dr(q,Wi,!0),":");var X=this.g;return(X||q=="file")&&(I.push("//"),(q=this.o)&&I.push(Dr(q,Wi,!0),"@"),I.push(encodeURIComponent(String(X)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),X=this.s,X!=null&&I.push(":",String(X))),(X=this.l)&&(this.g&&X.charAt(0)!="/"&&I.push("/"),I.push(Dr(X,X.charAt(0)=="/"?Ls:jo,!0))),(X=this.i.toString())&&I.push("?",X),(X=this.m)&&I.push("#",Dr(X,Bs)),I.join("")};function Mr(I){return new cn(I)}function jn(I,q,X){I.j=X?un(q,!0):q,I.j&&(I.j=I.j.replace(/:$/,""))}function Pn(I,q){if(q){if(q=Number(q),isNaN(q)||0>q)throw Error("Bad port number "+q);I.s=q}else I.s=null}function Ns(I,q,X){q instanceof An?(I.i=q,Wo(I.i,I.h)):(X||(q=Dr(q,Fs)),I.i=new An(q,I.h))}function jt(I,q,X){I.i.set(q,X)}function Sn(I){return jt(I,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),I}function un(I,q){return I?q?decodeURI(I.replace(/%25/g,"%2525")):decodeURIComponent(I):""}function Dr(I,q,X){return typeof I=="string"?(I=encodeURI(I).replace(q,Vs),X&&(I=I.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),I):null}function Vs(I){return I=I.charCodeAt(0),"%"+(I>>4&15).toString(16)+(I&15).toString(16)}var Wi=/[#\/\?@]/g,jo=/[#\?:]/g,Ls=/[#\?]/g,Fs=/[#\?@]/g,Bs=/#/g;function An(I,q){this.h=this.g=null,this.i=I||null,this.j=!!q}function Zr(I){I.g||(I.g=new Map,I.h=0,I.i&&Ds(I.i,function(q,X){I.add(decodeURIComponent(q.replace(/\+/g," ")),X)}))}o=An.prototype,o.add=function(I,q){Zr(this),this.i=null,I=In(this,I);var X=this.g.get(I);return X||this.g.set(I,X=[]),X.push(q),this.h+=1,this};function $s(I,q){Zr(I),q=In(I,q),I.g.has(q)&&(I.i=null,I.h-=I.g.get(q).length,I.g.delete(q))}function Us(I,q){return Zr(I),q=In(I,q),I.g.has(q)}o.forEach=function(I,q){Zr(this),this.g.forEach(function(X,Ce){X.forEach(function(Ue){I.call(q,Ue,Ce,this)},this)},this)},o.na=function(){Zr(this);const I=Array.from(this.g.values()),q=Array.from(this.g.keys()),X=[];for(let Ce=0;Ce<q.length;Ce++){const Ue=I[Ce];for(let Ge=0;Ge<Ue.length;Ge++)X.push(q[Ce])}return X},o.V=function(I){Zr(this);let q=[];if(typeof I=="string")Us(this,I)&&(q=q.concat(this.g.get(In(this,I))));else{I=Array.from(this.g.values());for(let X=0;X<I.length;X++)q=q.concat(I[X])}return q},o.set=function(I,q){return Zr(this),this.i=null,I=In(this,I),Us(this,I)&&(this.h-=this.g.get(I).length),this.g.set(I,[q]),this.h+=1,this},o.get=function(I,q){return I?(I=this.V(I),0<I.length?String(I[0]):q):q};function Gi(I,q,X){$s(I,q),0<X.length&&(I.i=null,I.g.set(In(I,q),M(X)),I.h+=X.length)}o.toString=function(){if(this.i)return this.i;if(!this.g)return"";const I=[],q=Array.from(this.g.keys());for(var X=0;X<q.length;X++){var Ce=q[X];const Ge=encodeURIComponent(String(Ce)),ut=this.V(Ce);for(Ce=0;Ce<ut.length;Ce++){var Ue=Ge;ut[Ce]!==""&&(Ue+="="+encodeURIComponent(String(ut[Ce]))),I.push(Ue)}}return this.i=I.join("&")};function In(I,q){return q=String(q),I.j&&(q=q.toLowerCase()),q}function Wo(I,q){q&&!I.j&&(Zr(I),I.i=null,I.g.forEach(function(X,Ce){var Ue=Ce.toLowerCase();Ce!=Ue&&($s(this,Ce),Gi(this,Ue,X))},I)),I.j=q}function Go(I,q){const X=new an;if(f.Image){const Ce=new Image;Ce.onload=R(Nr,X,"TestLoadImage: loaded",!0,q,Ce),Ce.onerror=R(Nr,X,"TestLoadImage: error",!1,q,Ce),Ce.onabort=R(Nr,X,"TestLoadImage: abort",!1,q,Ce),Ce.ontimeout=R(Nr,X,"TestLoadImage: timeout",!1,q,Ce),f.setTimeout(function(){Ce.ontimeout&&Ce.ontimeout()},1e4),Ce.src=I}else q(!1)}function qo(I,q){const X=new an,Ce=new AbortController,Ue=setTimeout(()=>{Ce.abort(),Nr(X,"TestPingServer: timeout",!1,q)},1e4);fetch(I,{signal:Ce.signal}).then(Ge=>{clearTimeout(Ue),Ge.ok?Nr(X,"TestPingServer: ok",!0,q):Nr(X,"TestPingServer: server error",!1,q)}).catch(()=>{clearTimeout(Ue),Nr(X,"TestPingServer: error",!1,q)})}function Nr(I,q,X,Ce,Ue){try{Ue&&(Ue.onload=null,Ue.onerror=null,Ue.onabort=null,Ue.ontimeout=null),Ce(X)}catch{}}function zo(){this.g=new pr}function Ko(I,q,X){const Ce=X||"";try{ji(I,function(Ue,Ge){let ut=Ue;y(Ue)&&(ut=Qr(Ue)),q.push(Ce+Ge+"="+encodeURIComponent(ut))})}catch(Ue){throw q.push(Ce+"type="+encodeURIComponent("_badmap")),Ue}}function di(I){this.l=I.Ub||null,this.j=I.eb||!1}x(di,wn),di.prototype.g=function(){return new fi(this.l,this.j)},di.prototype.i=function(I){return function(){return I}}({});function fi(I,q){dt.call(this),this.D=I,this.o=q,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}x(fi,dt),o=fi.prototype,o.open=function(I,q){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=I,this.A=q,this.readyState=1,Vt(this)},o.send=function(I){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const q={headers:this.u,method:this.B,credentials:this.m,cache:void 0};I&&(q.body=I),(this.D||f).fetch(new Request(this.A,q)).then(this.Sa.bind(this),this.ga.bind(this))},o.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,Lt(this)),this.readyState=0},o.Sa=function(I){if(this.g&&(this.l=I,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=I.headers,this.readyState=2,Vt(this)),this.g&&(this.readyState=3,Vt(this),this.g)))if(this.responseType==="arraybuffer")I.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof f.ReadableStream<"u"&&"body"in I){if(this.j=I.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;Hs(this)}else I.text().then(this.Ra.bind(this),this.ga.bind(this))};function Hs(I){I.j.read().then(I.Pa.bind(I)).catch(I.ga.bind(I))}o.Pa=function(I){if(this.g){if(this.o&&I.value)this.response.push(I.value);else if(!this.o){var q=I.value?I.value:new Uint8Array(0);(q=this.v.decode(q,{stream:!I.done}))&&(this.response=this.responseText+=q)}I.done?Lt(this):Vt(this),this.readyState==3&&Hs(this)}},o.Ra=function(I){this.g&&(this.response=this.responseText=I,Lt(this))},o.Qa=function(I){this.g&&(this.response=I,Lt(this))},o.ga=function(){this.g&&Lt(this)};function Lt(I){I.readyState=4,I.l=null,I.j=null,I.v=null,Vt(I)}o.setRequestHeader=function(I,q){this.u.append(I,q)},o.getResponseHeader=function(I){return this.h&&this.h.get(I.toLowerCase())||""},o.getAllResponseHeaders=function(){if(!this.h)return"";const I=[],q=this.h.entries();for(var X=q.next();!X.done;)X=X.value,I.push(X[0]+": "+X[1]),X=q.next();return I.join(`\r
2744`)};function Vt(I){I.onreadystatechange&&I.onreadystatechange.call(I)}Object.defineProperty(fi.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(I){this.m=I?"include":"same-origin"}});function js(I){let q="";return j(I,function(X,Ce){q+=Ce,q+=":",q+=X,q+=`\r
2745`}),q}function qi(I,q,X){e:{for(Ce in X){var Ce=!1;break e}Ce=!0}Ce||(X=js(X),typeof I=="string"?X!=null&&encodeURIComponent(String(X)):jt(I,q,X))}function zt(I){dt.call(this),this.headers=new Map,this.o=I||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}x(zt,dt);var Yo=/^https?$/i,Qo=["POST","PUT"];o=zt.prototype,o.Ha=function(I){this.J=I},o.ea=function(I,q,X,Ce){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+I);q=q?q.toUpperCase():"GET",this.D=I,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Ni.g(),this.v=this.o?ws(this.o):ws(Ni),this.g.onreadystatechange=P(this.Ea,this);try{this.B=!0,this.g.open(q,String(I),!0),this.B=!1}catch(Ge){Ws(this,Ge);return}if(I=X||"",X=new Map(this.headers),Ce)if(Object.getPrototypeOf(Ce)===Object.prototype)for(var Ue in Ce)X.set(Ue,Ce[Ue]);else if(typeof Ce.keys=="function"&&typeof Ce.get=="function")for(const Ge of Ce.keys())X.set(Ge,Ce.get(Ge));else throw Error("Unknown input type for opt_headers: "+String(Ce));Ce=Array.from(X.keys()).find(Ge=>Ge.toLowerCase()=="content-type"),Ue=f.FormData&&I instanceof f.FormData,!(0<=Array.prototype.indexOf.call(Qo,q,void 0))||Ce||Ue||X.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[Ge,ut]of X)this.g.setRequestHeader(Ge,ut);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{pi(this),this.u=!0,this.g.send(I),this.u=!1}catch(Ge){Ws(this,Ge)}};function Ws(I,q){I.h=!1,I.g&&(I.j=!0,I.g.abort(),I.j=!1),I.l=q,I.m=5,zi(I),Qt(I)}function zi(I){I.A||(I.A=!0,bt(I,"complete"),bt(I,"error"))}o.abort=function(I){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=I||7,bt(this,"complete"),bt(this,"abort"),Qt(this))},o.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Qt(this,!0)),zt.aa.N.call(this)},o.Ea=function(){this.s||(this.B||this.u||this.j?Gs(this):this.bb())},o.bb=function(){Gs(this)};function Gs(I){if(I.h&&typeof d<"u"&&(!I.v[1]||dr(I)!=4||I.Z()!=2)){if(I.u&&dr(I)==4)Ct(I.Ea,0,I);else if(bt(I,"readystatechange"),dr(I)==4){I.h=!1;try{const ut=I.Z();e:switch(ut){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var q=!0;break e;default:q=!1}var X;if(!(X=q)){var Ce;if(Ce=ut===0){var Ue=String(I.D).match(Hn)[1]||null;!Ue&&f.self&&f.self.location&&(Ue=f.self.location.protocol.slice(0,-1)),Ce=!Yo.test(Ue?Ue.toLowerCase():"")}X=Ce}if(X)bt(I,"complete"),bt(I,"success");else{I.m=6;try{var Ge=2<dr(I)?I.g.statusText:""}catch{Ge=""}I.l=Ge+" ["+I.Z()+"]",zi(I)}}finally{Qt(I)}}}}function Qt(I,q){if(I.g){pi(I);const X=I.g,Ce=I.v[0]?()=>{}:null;I.g=null,I.v=null,q||bt(I,"ready");try{X.onreadystatechange=Ce}catch{}}}function pi(I){I.I&&(f.clearTimeout(I.I),I.I=null)}o.isActive=function(){return!!this.g};function dr(I){return I.g?I.g.readyState:0}o.Z=function(){try{return 2<dr(this)?this.g.status:-1}catch{return-1}},o.oa=function(){try{return this.g?this.g.responseText:""}catch{return""}},o.Oa=function(I){if(this.g){var q=this.g.responseText;return I&&q.indexOf(I)==0&&(q=q.substring(I.length)),ir(q)}};function Ki(I){try{if(!I.g)return null;if("response"in I.g)return I.g.response;switch(I.H){case"":case"text":return I.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in I.g)return I.g.mozResponseArrayBuffer}return null}catch{return null}}function Yi(I){const q={};I=(I.g&&2<=dr(I)&&I.g.getAllResponseHeaders()||"").split(`\r
2746`);for(let Ce=0;Ce<I.length;Ce++){if(B(I[Ce]))continue;var X=ve(I[Ce]);const Ue=X[0];if(X=X[1],typeof X!="string")continue;X=X.trim();const Ge=q[Ue]||[];q[Ue]=Ge,Ge.push(X)}U(q,function(Ce){return Ce.join(", ")})}o.Ba=function(){return this.m},o.Ka=function(){return typeof this.l=="string"?this.l:String(this.l)};function cr(I,q,X){return X&&X.internalChannelParams&&X.internalChannelParams[I]||q}function Qi(I){this.Aa=0,this.i=[],this.j=new an,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=cr("failFast",!1,I),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=cr("baseRetryDelayMs",5e3,I),this.cb=cr("retryDelaySeedMs",1e4,I),this.Wa=cr("forwardChannelMaxRetries",2,I),this.wa=cr("forwardChannelRequestTimeoutMs",2e4,I),this.pa=I&&I.xmlHttpFactory||void 0,this.Xa=I&&I.Tb||void 0,this.Ca=I&&I.useFetchStreams||!1,this.L=void 0,this.J=I&&I.supportsCrossDomainXhr||!1,this.K="",this.h=new ks(I&&I.concurrentRequestLimit),this.Da=new zo,this.P=I&&I.fastHandshake||!1,this.O=I&&I.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=I&&I.Rb||!1,I&&I.xa&&this.j.xa(),I&&I.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&I&&I.detectBufferingProxy||!1,this.ja=void 0,I&&I.longPollingTimeout&&0<I.longPollingTimeout&&(this.ja=I.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}o=Qi.prototype,o.la=8,o.G=1,o.connect=function(I,q,X,Ce){hr(0),this.W=I,this.H=q||{},X&&Ce!==void 0&&(this.H.OSID=X,this.H.OAID=Ce),this.F=this.X,this.I=_i(this,null,this.W),Gn(this)};function mi(I){if(Ji(I),I.G==3){var q=I.U++,X=Mr(I.I);if(jt(X,"SID",I.K),jt(X,"RID",q),jt(X,"TYPE","terminate"),qn(I,X),q=new Jr(I,I.j,q),q.L=2,q.v=Sn(Mr(X)),X=!1,f.navigator&&f.navigator.sendBeacon)try{X=f.navigator.sendBeacon(q.v.toString(),"")}catch{}!X&&f.Image&&(new Image().src=q.v,X=!0),X||(q.g=Ys(q.j,null),q.g.ea(q.v)),q.F=Date.now(),ln(q)}Ks(I)}function Wn(I){I.g&&(Vr(I),I.g.cancel(),I.g=null)}function Ji(I){Wn(I),I.u&&(f.clearTimeout(I.u),I.u=null),Cn(I),I.h.cancel(),I.s&&(typeof I.s=="number"&&f.clearTimeout(I.s),I.s=null)}function Gn(I){if(!Os(I.h)&&!I.s){I.s=!0;var q=I.Ga;xe||Fe(),Q||(xe(),Q=!0),ie.add(q,I),I.B=0}}function qs(I,q){return Ms(I.h)>=I.h.j-(I.s?1:0)?!1:I.s?(I.i=q.D.concat(I.i),!0):I.G==1||I.G==2||I.B>=(I.Va?0:I.Wa)?!1:(I.s=Fn(P(I.Ga,I,q),Wr(I,I.B)),I.B++,!0)}o.Ga=function(I){if(this.s)if(this.s=null,this.G==1){if(!I){this.U=Math.floor(1e5*Math.random()),I=this.U++;const Ue=new Jr(this,this.j,I);let Ge=this.o;if(this.S&&(Ge?(Ge=G(Ge),te(Ge,this.S)):Ge=this.S),this.m!==null||this.O||(Ue.H=Ge,Ge=null),this.P)e:{for(var q=0,X=0;X<this.i.length;X++){t:{var Ce=this.i[X];if("__data__"in Ce.map&&(Ce=Ce.map.__data__,typeof Ce=="string")){Ce=Ce.length;break t}Ce=void 0}if(Ce===void 0)break;if(q+=Ce,4096<q){q=X;break e}if(q===4096||X===this.i.length-1){q=X+1;break e}}q=1e3}else q=1e3;q=vr(this,Ue,q),X=Mr(this.I),jt(X,"RID",I),jt(X,"CVER",22),this.D&&jt(X,"X-HTTP-Session-Id",this.D),qn(this,X),Ge&&(this.O?q="headers="+encodeURIComponent(String(js(Ge)))+"&"+q:this.m&&qi(X,this.m,Ge)),hi(this.h,Ue),this.Ua&&jt(X,"TYPE","init"),this.P?(jt(X,"$req",q),jt(X,"SID","null"),Ue.T=!0,Li(Ue,X,null)):Li(Ue,X,q),this.G=2}}else this.G==3&&(I?mr(this,I):this.i.length==0||Os(this.h)||mr(this))};function mr(I,q){var X;q?X=q.l:X=I.U++;const Ce=Mr(I.I);jt(Ce,"SID",I.K),jt(Ce,"RID",X),jt(Ce,"AID",I.T),qn(I,Ce),I.m&&I.o&&qi(Ce,I.m,I.o),X=new Jr(I,I.j,X,I.B+1),I.m===null&&(X.H=I.o),q&&(I.i=q.D.concat(I.i)),q=vr(I,X,1e3),X.I=Math.round(.5*I.wa)+Math.round(.5*I.wa*Math.random()),hi(I.h,X),Li(X,Ce,q)}function qn(I,q){I.H&&j(I.H,function(X,Ce){jt(q,Ce,X)}),I.l&&ji({},function(X,Ce){jt(q,Ce,X)})}function vr(I,q,X){X=Math.min(I.i.length,X);var Ce=I.l?P(I.l.Na,I.l,I):null;e:{var Ue=I.i;let Ge=-1;for(;;){const ut=["count="+X];Ge==-1?0<X?(Ge=Ue[0].g,ut.push("ofs="+Ge)):Ge=0:ut.push("ofs="+Ge);let Ft=!0;for(let sr=0;sr<X;sr++){let Dt=Ue[sr].g;const $t=Ue[sr].map;if(Dt-=Ge,0>Dt)Ge=Math.max(0,Ue[sr].g-100),Ft=!1;else try{Ko($t,ut,"req"+Dt+"_")}catch{Ce&&Ce($t)}}if(Ft){Ce=ut.join("&");break e}}}return I=I.i.splice(0,X),q.D=I,Ce}function zs(I){if(!I.g&&!I.u){I.Y=1;var q=I.Fa;xe||Fe(),Q||(xe(),Q=!0),ie.add(q,I),I.v=0}}function gi(I){return I.g||I.u||3<=I.v?!1:(I.Y++,I.u=Fn(P(I.Fa,I),Wr(I,I.v)),I.v++,!0)}o.Fa=function(){if(this.u=null,zn(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var I=2*this.R;this.j.info("BP detection timer enabled: "+I),this.A=Fn(P(this.ab,this),I)}},o.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,hr(10),Wn(this),zn(this))};function Vr(I){I.A!=null&&(f.clearTimeout(I.A),I.A=null)}function zn(I){I.g=new Jr(I,I.j,"rpc",I.Y),I.m===null&&(I.g.H=I.o),I.g.O=0;var q=Mr(I.qa);jt(q,"RID","rpc"),jt(q,"SID",I.K),jt(q,"AID",I.T),jt(q,"CI",I.F?"0":"1"),!I.F&&I.ja&&jt(q,"TO",I.ja),jt(q,"TYPE","xmlhttp"),qn(I,q),I.m&&I.o&&qi(q,I.m,I.o),I.L&&(I.g.I=I.L);var X=I.g;I=I.ia,X.L=1,X.v=Sn(Mr(q)),X.m=null,X.P=!0,Cs(X,I)}o.Za=function(){this.C!=null&&(this.C=null,Wn(this),gi(this),hr(19))};function Cn(I){I.C!=null&&(f.clearTimeout(I.C),I.C=null)}function Wt(I,q){var X=null;if(I.g==q){Cn(I),Vr(I),I.g=null;var Ce=2}else if(Bi(I.h,q))X=q.D,$i(I.h,q),Ce=1;else return;if(I.G!=0){if(q.o)if(Ce==1){X=q.m?q.m.length:0,q=Date.now()-q.F;var Ue=I.B;Ce=ai(),bt(Ce,new li(Ce,X)),Gn(I)}else zs(I);else if(Ue=q.s,Ue==3||Ue==0&&0<q.X||!(Ce==1&&qs(I,q)||Ce==2&&gi(I)))switch(X&&0<X.length&&(q=I.h,q.i=q.i.concat(X)),Ue){case 1:Gr(I,5);break;case 4:Gr(I,10);break;case 3:Gr(I,6);break;default:Gr(I,2)}}}function Wr(I,q){let X=I.Ta+Math.floor(Math.random()*I.cb);return I.isActive()||(X*=2),X*q}function Gr(I,q){if(I.j.info("Error code "+q),q==2){var X=P(I.fb,I),Ce=I.Xa;const Ue=!Ce;Ce=new cn(Ce||"//www.google.com/images/cleardot.gif"),f.location&&f.location.protocol=="http"||jn(Ce,"https"),Sn(Ce),Ue?Go(Ce.toString(),X):qo(Ce.toString(),X)}else hr(2);I.G=0,I.l&&I.l.sa(q),Ks(I),Ji(I)}o.fb=function(I){I?(this.j.info("Successfully pinged google.com"),hr(2)):(this.j.info("Failed to ping google.com"),hr(1))};function Ks(I){if(I.G=0,I.ka=[],I.l){const q=Ui(I.h);(q.length!=0||I.i.length!=0)&&($(I.ka,q),$(I.ka,I.i),I.h.i.length=0,M(I.i),I.i.length=0),I.l.ra()}}function _i(I,q,X){var Ce=X instanceof cn?Mr(X):new cn(X);if(Ce.g!="")q&&(Ce.g=q+"."+Ce.g),Pn(Ce,Ce.s);else{var Ue=f.location;Ce=Ue.protocol,q=q?q+"."+Ue.hostname:Ue.hostname,Ue=+Ue.port;var Ge=new cn(null);Ce&&jn(Ge,Ce),q&&(Ge.g=q),Ue&&Pn(Ge,Ue),X&&(Ge.l=X),Ce=Ge}return X=I.D,q=I.ya,X&&q&&jt(Ce,X,q),jt(Ce,"VER",I.la),qn(I,Ce),Ce}function Ys(I,q,X){if(q&&!I.J)throw Error("Can't create secondary domain capable XhrIo object.");return q=I.Ca&&!I.pa?new zt(new di({eb:X})):new zt(I.pa),q.Ha(I.J),q}o.isActive=function(){return!!this.l&&this.l.isActive(this)};function Qs(){}o=Qs.prototype,o.ua=function(){},o.ta=function(){},o.sa=function(){},o.ra=function(){},o.isActive=function(){return!0},o.Na=function(){};function yi(){}yi.prototype.g=function(I,q){return new gr(I,q)};function gr(I,q){dt.call(this),this.g=new Qi(q),this.l=I,this.h=q&&q.messageUrlParams||null,I=q&&q.messageHeaders||null,q&&q.clientProtocolHeaderRequired&&(I?I["X-Client-Protocol"]="webchannel":I={"X-Client-Protocol":"webchannel"}),this.g.o=I,I=q&&q.initMessageHeaders||null,q&&q.messageContentType&&(I?I["X-WebChannel-Content-Type"]=q.messageContentType:I={"X-WebChannel-Content-Type":q.messageContentType}),q&&q.va&&(I?I["X-WebChannel-Client-Profile"]=q.va:I={"X-WebChannel-Client-Profile":q.va}),this.g.S=I,(I=q&&q.Sb)&&!B(I)&&(this.g.m=I),this.v=q&&q.supportsCrossDomainXhr||!1,this.u=q&&q.sendRawJson||!1,(q=q&&q.httpSessionIdParam)&&!B(q)&&(this.g.D=q,I=this.h,I!==null&&q in I&&(I=this.h,q in I&&delete I[q])),this.j=new Rn(this)}x(gr,dt),gr.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},gr.prototype.close=function(){mi(this.g)},gr.prototype.o=function(I){var q=this.g;if(typeof I=="string"){var X={};X.__data__=I,I=X}else this.u&&(X={},X.__data__=Qr(I),I=X);q.i.push(new xs(q.Ya++,I)),q.G==3&&Gn(q)},gr.prototype.N=function(){this.g.l=null,delete this.j,mi(this.g),delete this.g,gr.aa.N.call(this)};function Kn(I){oi.call(this),I.__headers__&&(this.headers=I.__headers__,this.statusCode=I.__status__,delete I.__headers__,delete I.__status__);var q=I.__sm__;if(q){e:{for(const X in q){I=X;break e}I=void 0}(this.i=I)&&(I=this.i,q=q!==null&&I in q?q[I]:void 0),this.data=q}else this.data=I}x(Kn,oi);function hn(){Mi.call(this),this.status=1}x(hn,Mi);function Rn(I){this.g=I}x(Rn,Qs),Rn.prototype.ua=function(){bt(this.g,"a")},Rn.prototype.ta=function(I){bt(this.g,new Kn(I))},Rn.prototype.sa=function(I){bt(this.g,new hn)},Rn.prototype.ra=function(){bt(this.g,"b")},yi.prototype.createWebChannel=yi.prototype.g,gr.prototype.send=gr.prototype.o,gr.prototype.open=gr.prototype.m,gr.prototype.close=gr.prototype.close,createWebChannelTransport=function(){return new yi},getStatEventTarget=function(){return ai()},Event$1=sn,Stat={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},ci.NO_ERROR=0,ci.TIMEOUT=8,ci.HTTP_ERROR=6,ErrorCode=ci,Ss.COMPLETE="complete",EventType=Ss,Es.EventType=En,En.OPEN="a",En.CLOSE="b",En.ERROR="c",En.MESSAGE="d",dt.prototype.listen=dt.prototype.K,WebChannel=Es,zt.prototype.listenOnce=zt.prototype.L,zt.prototype.getLastError=zt.prototype.Ka,zt.prototype.getLastErrorCode=zt.prototype.Ba,zt.prototype.getStatus=zt.prototype.Z,zt.prototype.getResponseJson=zt.prototype.Oa,zt.prototype.getResponseText=zt.prototype.oa,zt.prototype.send=zt.prototype.ea,zt.prototype.setWithCredentials=zt.prototype.Ha,XhrIo=zt}).apply(typeof commonjsGlobal$1<"u"?commonjsGlobal$1:typeof self<"u"?self:typeof window<"u"?window:{});const w="@firebase/firestore";/**
2747 * @license
2748 * Copyright 2017 Google LLC
2749 *
2750 * Licensed under the Apache License, Version 2.0 (the "License");
2751 * you may not use this file except in compliance with the License.
2752 * You may obtain a copy of the License at
2753 *
2754 *   http://www.apache.org/licenses/LICENSE-2.0
2755 *
2756 * Unless required by applicable law or agreed to in writing, software
2757 * distributed under the License is distributed on an "AS IS" BASIS,
2758 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2759 * See the License for the specific language governing permissions and
2760 * limitations under the License.
2761 */class User{constructor(r){this.uid=r}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(r){return r.uid===this.uid}}User.UNAUTHENTICATED=new User(null),User.GOOGLE_CREDENTIALS=new User("google-credentials-uid"),User.FIRST_PARTY=new User("first-party-uid"),User.MOCK_USER=new User("mock-user");/**
2762 * @license
2763 * Copyright 2017 Google LLC
2764 *
2765 * Licensed under the Apache License, Version 2.0 (the "License");
2766 * you may not use this file except in compliance with the License.
2767 * You may obtain a copy of the License at
2768 *
2769 *   http://www.apache.org/licenses/LICENSE-2.0
2770 *
2771 * Unless required by applicable law or agreed to in writing, software
2772 * distributed under the License is distributed on an "AS IS" BASIS,
2773 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2774 * See the License for the specific language governing permissions and
2775 * limitations under the License.
2776 */let S="10.14.0";/**
2777 * @license
2778 * Copyright 2017 Google LLC
2779 *
2780 * Licensed under the Apache License, Version 2.0 (the "License");
2781 * you may not use this file except in compliance with the License.
2782 * You may obtain a copy of the License at
2783 *
2784 *   http://www.apache.org/licenses/LICENSE-2.0
2785 *
2786 * Unless required by applicable law or agreed to in writing, softw
2786are
2787 * distributed under the License is distributed on an "AS IS" BASIS,
2788 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2789 * See the License for the specific language governing permissions and
2790 * limitations under the License.
2791 */const b=new Logger("@firebase/firestore");function __PRIVATE_getLogLevel(){return b.logLevel}function __PRIVATE_logDebug(o,...r){if(b.logLevel<=LogLevel.DEBUG){const a=r.map(__PRIVATE_argToString);b.debug(`Firestore (${S}): ${o}`,...a)}}function __PRIVATE_logError(o,...r){if(b.logLevel<=LogLevel.ERROR){const a=r.map(__PRIVATE_argToString);b.error(`Firestore (${S}): ${o}`,...a)}}function __PRIVATE_logWarn(o,...r){if(b.logLevel<=LogLevel.WARN){const a=r.map(__PRIVATE_argToString);b.warn(`Firestore (${S}): ${o}`,...a)}}function __PRIVATE_argToString(o){if(typeof o=="string")return o;try{/**
2792* @license
2793* Copyright 2020 Google LLC
2794*
2795* Licensed under the Apache License, Version 2.0 (the "License");
2796* you may not use this file except in compliance with the License.
2797* You may obtain a copy of the License at
2798*
2799*   http://www.apache.org/licenses/LICENSE-2.0
2800*
2801* Unless required by applicable law or agreed to in writing, software
2802* distributed under the License is distributed on an "AS IS" BASIS,
2803* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2804* See the License for the specific language governing permissions and
2805* limitations under the License.
2806*/return function(a){return JSON.stringify(a)}(o)}catch{return o}}/**
2807 * @license
2808 * Copyright 2017 Google LLC
2809 *
2810 * Licensed under the Apache License, Version 2.0 (the "License");
2811 * you may not use this file except in compliance with the License.
2812 * You may obtain a copy of the License at
2813 *
2814 *   http://www.apache.org/licenses/LICENSE-2.0
2815 *
2816 * Unless required by applicable law or agreed to in writing, software
2817 * distributed under the License is distributed on an "AS IS" BASIS,
2818 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2819 * See the License for the specific language governing permissions and
2820 * limitations under the License.
2821 */function fail(o="Unexpected state"){const r=`FIRESTORE (${S}) INTERNAL ASSERTION FAILED: `+o;throw __PRIVATE_logError(r),new Error(r)}function __PRIVATE_hardAssert(o,r){o||fail()}function __PRIVATE_debugCast(o,r){return o}/**
2822 * @license
2823 * Copyright 2017 Google LLC
2824 *
2825 * Licensed under the Apache License, Version 2.0 (the "License");
2826 * you may not use this file except in compliance with the License.
2827 * You may obtain a copy of the License at
2828 *
2829 *   http://www.apache.org/licenses/LICENSE-2.0
2830 *
2831 * Unless required by applicable law or agreed to in writing, software
2832 * distributed under the License is distributed on an "AS IS" BASIS,
2833 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2834 * See the License for the specific language governing permissions and
2835 * limitations under the License.
2836 */const D={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class FirestoreError extends FirebaseError{constructor(r,a){super(r,a),this.code=r,this.message=a,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
2837 * @license
2838 * Copyright 2017 Google LLC
2839 *
2840 * Licensed under the Apache License, Version 2.0 (the "License");
2841 * you may not use this file except in compliance with the License.
2842 * You may obtain a copy of the License at
2843 *
2844 *   http://www.apache.org/licenses/LICENSE-2.0
2845 *
2846 * Unless required by applicable law or agreed to in writing, software
2847 * distributed under the License is distributed on an "AS IS" BASIS,
2848 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2849 * See the License for the specific language governing permissions and
2850 * limitations under the License.
2851 */class __PRIVATE_Deferred{constructor(){this.promise=new Promise((r,a)=>{this.resolve=r,this.reject=a})}}/**
2852 * @license
2853 * Copyright 2017 Google LLC
2854 *
2855 * Licensed under the Apache License, Version 2.0 (the "License");
2856 * you may not use this file except in compliance with the License.
2857 * You may obtain a copy of the License at
2858 *
2859 *   http://www.apache.org/licenses/LICENSE-2.0
2860 *
2861 * Unless required by applicable law or agreed to in writing, software
2862 * distributed under the License is distributed on an "AS IS" BASIS,
2863 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2864 * See the License for the specific language governing permissions and
2865 * limitations under the License.
2866 */class __PRIVATE_OAuthToken{constructor(r,a){this.user=a,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${r}`)}}class __PRIVATE_EmptyAuthCredentialsProvider{getToken(){return Promise.resolve(null)}invalidateToken(){}start(r,a){r.enqueueRetryable(()=>a(User.UNAUTHENTICATED))}shutdown(){}}class __PRIVATE_EmulatorAuthCredentialsProvider{constructor(r){this.token=r,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(r,a){this.changeListener=a,r.enqueueRetryable(()=>a(this.token.user))}shutdown(){this.changeListener=null}}class __PRIVATE_FirebaseAuthCredentialsProvider{constructor(r){this.t=r,this.currentUser=User.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(r,a){__PRIVATE_hardAssert(this.o===void 0);let l=this.i;const c=m=>this.i!==l?(l=this.i,a(m)):Promise.resolve();let u=new __PRIVATE_Deferred;this.o=()=>{this.i++,this.currentUser=this.u(),u.resolve(),u=new __PRIVATE_Deferred,r.enqueueRetryable(()=>c(this.currentUser))};const d=()=>{const m=u;r.enqueueRetryable(async()=>{await m.promise,await c(this.currentUser)})},f=m=>{__PRIVATE_logDebug("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=m,this.o&&(this.auth.addAuthTokenListener(this.o),d())};this.t.onInit(m=>f(m)),setTimeout(()=>{if(!this.auth){const m=this.t.getImmediate({optional:!0});m?f(m):(__PRIVATE_logDebug("FirebaseAuthCredentialsProvider","Auth not yet detected"),u.resolve(),u=new __PRIVATE_Deferred)}},0),d()}getToken(){const r=this.i,a=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(a).then(l=>this.i!==r?(__PRIVATE_logDebug("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):l?(__PRIVATE_hardAssert(typeof l.accessToken=="string"),new __PRIVATE_OAuthToken(l.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const r=this.auth&&this.auth.getUid();return __PRIVATE_hardAssert(r===null||typeof r=="string"),new User(r)}}class __PRIVATE_FirstPartyToken{constructor(r,a,l){this.l=r,this.h=a,this.P=l,this.type="FirstParty",this.user=User.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const r=this.T();return r&&this.I.set("Authorization",r),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class __PRIVATE_FirstPartyAuthCredentialsProvider{constructor(r,a,l){this.l=r,this.h=a,this.P=l}getToken(){return Promise.resolve(new __PRIVATE_FirstPartyToken(this.l,this.h,this.P))}start(r,a){r.enqueueRetryable(()=>a(User.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class AppCheckToken{constructor(r){this.value=r,this.type="AppCheck",this.headers=new Map,r&&r.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class __PRIVATE_FirebaseAppCheckTokenProvider{constructor(r){this.A=r,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(r,a){__PRIVATE_hardAssert(this.o===void 0);const l=u=>{u.error!=null&&__PRIVATE_logDebug("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${u.error.message}`);const d=u.token!==this.R;return this.R=u.token,__PRIVATE_logDebug("FirebaseAppCheckTokenProvider",`Received ${d?"new":"existing"} token.`),d?a(u.token):Promise.resolve()};this.o=u=>{r.enqueueRetryable(()=>l(u))};const c=u=>{__PRIVATE_logDebug("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=u,this.o&&this.appCheck.addTokenListener(this.o)};this.A.onInit(u=>c(u)),setTimeout(()=>{if(!this.appCheck){const u=this.A.getImmediate({optional:!0});u?c(u):__PRIVATE_logDebug("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const r=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(r).then(a=>a?(__PRIVATE_hardAssert(typeof a.token=="string"),this.R=a.token,new AppCheckToken(a.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/**
2867 * @license
2868 * Copyright 2020 Google LLC
2869 *
2870 * Licensed under the Apache License, Version 2.0 (the "License");
2871 * you may not use this file except in compliance with the License.
2872 * You may obtain a copy of the License at
2873 *
2874 *   http://www.apache.org/licenses/LICENSE-2.0
2875 *
2876 * Unless required by applicable law or agreed to in writing, software
2877 * distributed under the License is distributed on an "AS IS" BASIS,
2878 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2879 * See the License for the specific language governing permissions and
2880 * limitations under the License.
2881 */function __PRIVATE_randomBytes(o){const r=typeof self<"u"&&(self.crypto||self.msCrypto),a=new Uint8Array(o);if(r&&typeof r.getRandomValues=="function")r.getRandomValues(a);else for(let l=0;l<o;l++)a[l]=Math.floor(256*Math.random());return a}/**
2882 * @license
2883 * Copyright 2017 Google LLC
2884 *
2885 * Licensed under the Apache License, Version 2.0 (the "License");
2886 * you may not use this file except in compliance with the License.
2887 * You may obtain a copy of the License at
2888 *
2889 *   http://www.apache.org/licenses/LICENSE-2.0
2890 *
2891 * Unless required by applicable law or agreed to in writing, software
2892 * distributed under the License is distributed on an "AS IS" BASIS,
2893 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2894 * See the License for the specific language governing permissions and
2895 * limitations under the License.
2896 */class __PRIVATE_AutoId{static newId(){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=Math.floor(256/r.length)*r.length;let l="";for(;l.length<20;){const c=__PRIVATE_randomBytes(40);for(let u=0;u<c.length;++u)l.length<20&&c[u]<a&&(l+=r.charAt(c[u]%r.length))}return l}}function __PRIVATE_primitiveComparator(o,r){return o<r?-1:o>r?1:0}function __PRIVATE_arrayEquals(o,r,a){return o.length===r.length&&o.every((l,c)=>a(l,r[c]))}/**
2897 * @license
2898 * Copyright 2017 Google LLC
2899 *
2900 * Licensed under the Apache License, Version 2.0 (the "License");
2901 * you may not use this file except in compliance with the License.
2902 * You may obtain a copy of the License at
2903 *
2904 *   http://www.apache.org/licenses/LICENSE-2.0
2905 *
2906 * Unless required by applicable law or agreed to in writing, software
2907 * distributed under the License is distributed on an "AS IS" BASIS,
2908 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2909 * See the License for the specific language governing permissions and
2910 * limitations under the License.
2911 */class Timestamp{constructor(r,a){if(this.seconds=r,this.nanoseconds=a,a<0)throw new FirestoreError(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+a);if(a>=1e9)throw new FirestoreError(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+a);if(r<-62135596800)throw new FirestoreError(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+r);if(r>=253402300800)throw new FirestoreError(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+r)}static now(){return Timestamp.fromMillis(Date.now())}static fromDate(r){return Timestamp.fromMillis(r.getTime())}static fromMillis(r){const a=Math.floor(r/1e3),l=Math.floor(1e6*(r-1e3*a));return new Timestamp(a,l)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(r){return this.seconds===r.seconds?__PRIVATE_primitiveComparator(this.nanoseconds,r.nanoseconds):__PRIVATE_primitiveComparator(this.seconds,r.seconds)}isEqual(r){return r.seconds===this.seconds&&r.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const r=this.seconds- -62135596800;return String(r).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/**
2912 * @license
2913 * Copyright 2017 Google LLC
2914 *
2915 * Licensed under the Apache License, Version 2.0 (the "License");
2916 * you may not use this file except in compliance with the License.
2917 * You may obtain a copy of the License at
2918 *
2919 *   http://www.apache.org/licenses/LICENSE-2.0
2920 *
2921 * Unless required by applicable law or agreed to in writing, software
2922 * distributed under the License is distributed on an "AS IS" BASIS,
2923 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2924 * See the License for the specific language governing permissions and
2925 * limitations under the License.
2926 */class SnapshotVersion{constructor(r){this.timestamp=r}static fromTimestamp(r){return new SnapshotVersion(r)}static min(){return new SnapshotVersion(new Timestamp(0,0))}static max(){return new SnapshotVersion(new Timestamp(253402300799,999999999))}compareTo(r){return this.timestamp._compareTo(r.timestamp)}isEqual(r){return this.timestamp.isEqual(r.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/**
2927 * @license
2928 * Copyright 2017 Google LLC
2929 *
2930 * Licensed under the Apache License, Version 2.0 (the "License");
2931 * you may not use this file except in compliance with the License.
2932 * You may obtain a copy of the License at
2933 *
2934 *   http://www.apache.org/licenses/LICENSE-2.0
2935 *
2936 * Unless required by applicable law or agreed to in writing, software
2937 * distributed under the License is distributed on an "AS IS" BASIS,
2938 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2939 * See the License for the specific language governing permissions and
2940 * limitations under the License.
2941 */class BasePath{constructor(r,a,l){a===void 0?a=0:a>r.length&&fail(),l===void 0?l=r.length-a:l>r.length-a&&fail(),this.segments=r,this.offset=a,this.len=l}get length(){return this.len}isEqual(r){return BasePath.comparator(this,r)===0}child(r){const a=this.segments.slice(this.offset,this.limit());return r instanceof BasePath?r.forEach(l=>{a.push(l)}):a.push(r),this.construct(a)}limit(){return this.offset+this.length}popFirst(r){return r=r===void 0?1:r,this.construct(this.segments,this.offset+r,this.length-r)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(r){return this.segments[this.offset+r]}isEmpty(){return this.length===0}isPrefixOf(r){if(r.length<this.length)return!1;for(let a=0;a<this.length;a++)if(this.get(a)!==r.get(a))return!1;return!0}isImmediateParentOf(r){if(this.length+1!==r.length)return!1;for(let a=0;a<this.length;a++)if(this.get(a)!==r.get(a))return!1;return!0}forEach(r){for(let a=this.offset,l=this.limit();a<l;a++)r(this.segments[a])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(r,a){const l=Math.min(r.length,a.length);for(let c=0;c<l;c++){const u=r.get(c),d=a.get(c);if(u<d)return-1;if(u>d)return 1}return r.length<a.length?-1:r.length>a.length?1:0}}class ResourcePath extends BasePath{construct(r,a,l){return new ResourcePath(r,a,l)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...r){const a=[];for(const l of r){if(l.indexOf("//")>=0)throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid segment (${l}). Paths must not contain // in them.`);a.push(...l.split("/").filter(c=>c.length>0))}return new ResourcePath(a)}static emptyPath(){return new ResourcePath([])}}const v=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class FieldPath$1 extends BasePath{construct(r,a,l){return new FieldPath$1(r,a,l)}static isValidIdentifier(r){return v.test(r)}canonicalString(){return this.toArray().map(r=>(r=r.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),FieldPath$1.isValidIdentifier(r)||(r="`"+r+"`"),r)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new FieldPath$1(["__name__"])}static fromServerFormat(r){const a=[];let l="",c=0;const u=()=>{if(l.length===0)throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid field path (${r}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);a.push(l),l=""};let d=!1;for(;c<r.length;){const f=r[c];if(f==="\\"){if(c+1===r.length)throw new FirestoreError(D.INVALID_ARGUMENT,"Path has trailing escape character: "+r);const m=r[c+1];if(m!=="\\"&&m!=="."&&m!=="`")throw new FirestoreError(D.INVALID_ARGUMENT,"Path has invalid escape sequence: "+r);l+=m,c+=2}else f==="`"?(d=!d,c++):f!=="."||d?(l+=f,c++):(u(),c++)}if(u(),d)throw new FirestoreError(D.INVALID_ARGUMENT,"Unterminated ` in path: "+r);return new FieldPath$1(a)}static emptyPath(){return new FieldPath$1([])}}/**
2942 * @license
2943 * Copyright 2017 Google LLC
2944 *
2945 * Licensed under the Apache License, Version 2.0 (the "License");
2946 * you may not use this file except in compliance with the License.
2947 * You may obtain a copy of the License at
2948 *
2949 *   http://www.apache.org/licenses/LICENSE-2.0
2950 *
2951 * Unless required by applicable law or agreed to in writing, software
2952 * distributed under the License is distributed on an "AS IS" BASIS,
2953 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2954 * See the License for the specific language governing permissions and
2955 * limitations under the License.
2956 */class DocumentKey{constructor(r){this.path=r}static fromPath(r){return new DocumentKey(ResourcePath.fromString(r))}static fromName(r){return new DocumentKey(ResourcePath.fromString(r).popFirst(5))}static empty(){return new DocumentKey(ResourcePath.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(r){return this.path.length>=2&&this.path.get(this.path.length-2)===r}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(r){return r!==null&&ResourcePath.comparator(this.path,r.path)===0}toString(){return this.path.toString()}static comparator(r,a){return ResourcePath.comparator(r.path,a.path)}static isDocumentKey(r){return r.length%2==0}static fromSegments(r){return new DocumentKey(new ResourcePath(r.slice()))}}function __PRIVATE_newIndexOffsetSuccessorFromReadTime(o,r){const a=o.toTimestamp().seconds,l=o.toTimestamp().nanoseconds+1,c=SnapshotVersion.fromTimestamp(l===1e9?new Timestamp(a+1,0):new Timestamp(a,l));return new IndexOffset(c,DocumentKey.empty(),r)}function __PRIVATE_newIndexOffsetFromDocument(o){return new IndexOffset(o.readTime,o.key,-1)}class IndexOffset{constructor(r,a,l){this.readTime=r,this.documentKey=a,this.largestBatchId=l}static min(){return new IndexOffset(SnapshotVersion.min(),DocumentKey.empty(),-1)}static max(){return new IndexOffset(SnapshotVersion.max(),DocumentKey.empty(),-1)}}function __PRIVATE_indexOffsetComparator(o,r){let a=o.readTime.compareTo(r.readTime);return a!==0?a:(a=DocumentKey.comparator(o.documentKey,r.documentKey),a!==0?a:__PRIVATE_primitiveComparator(o.largestBatchId,r.largestBatchId))}/**
2957 * @license
2958 * Copyright 2020 Google LLC
2959 *
2960 * Licensed under the Apache License, Version 2.0 (the "License");
2961 * you may not use this file except in compliance with the License.
2962 * You may obtain a copy of the License at
2963 *
2964 *   http://www.apache.org/licenses/LICENSE-2.0
2965 *
2966 * Unless required by applicable law or agreed to in writing, software
2967 * distributed under the License is distributed on an "AS IS" BASIS,
2968 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2969 * See the License for the specific language governing permissions and
2970 * limitations under the License.
2971 */const C="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class PersistenceTransaction{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(r){this.onCommittedListeners.push(r)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(r=>r())}}/**
2972 * @license
2973 * Copyright 2017 Google LLC
2974 *
2975 * Licensed under the Apache License, Version 2.0 (the "License");
2976 * you may not use this file except in compliance with the License.
2977 * You may obtain a copy of the License at
2978 *
2979 *   http://www.apache.org/licenses/LICENSE-2.0
2980 *
2981 * Unless required by applicable law or agreed to in writing, software
2982 * distributed under the License is distributed on an "AS IS" BASIS,
2983 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2984 * See the License for the specific language governing permissions and
2985 * limitations under the License.
2986 */async function __PRIVATE_ignoreIfPrimaryLeaseLoss(o){if(o.code!==D.FAILED_PRECONDITION||o.message!==C)throw o;__PRIVATE_logDebug("LocalStore","Unexpectedly lost primary lease")}/**
2987 * @license
2988 * Copyright 2017 Google LLC
2989 *
2990 * Licensed under the Apache License, Version 2.0 (the "License");
2991 * you may not use this file except in compliance with the License.
2992 * You may obtain a copy of the License at
2993 *
2994 *   http://www.apache.org/licenses/LICENSE-2.0
2995 *
2996 * Unless required by applicable law or agreed to in writing, software
2997 * distributed under the License is distributed on an "AS IS" BASIS,
2998 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2999 * See the License for the specific language governing permissions and
3000 * limitations under the License.
3001 */class PersistencePromise{constructor(r){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,r(a=>{this.isDone=!0,this.result=a,this.nextCallback&&this.nextCallback(a)},a=>{this.isDone=!0,this.error=a,this.catchCallback&&this.catchCallback(a)})}catch(r){return this.next(void 0,r)}next(r,a){return this.callbackAttached&&fail(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(a,this.error):this.wrapSuccess(r,this.result):new PersistencePromise((l,c)=>{this.nextCallback=u=>{this.wrapSuccess(r,u).next(l,c)},this.catchCallback=u=>{this.wrapFailure(a,u).next(l,c)}})}toPromise(){return new Promise((r,a)=>{this.next(r,a)})}wrapUserFunction(r){try{const a=r();return a instanceof PersistencePromise?a:PersistencePromise.resolve(a)}catch(a){return PersistencePromise.reject(a)}}wrapSuccess(r,a){return r?this.wrapUserFunction(()=>r(a)):PersistencePromise.resolve(a)}wrapFailure(r,a){return r?this.wrapUserFunction(()=>r(a)):PersistencePromise.reject(a)}static resolve(r){return new PersistencePromise((a,l)=>{a(r)})}static reject(r){return new PersistencePromise((a,l)=>{l(r)})}static waitFor(r){return new PersistencePromise((a,l)=>{let c=0,u=0,d=!1;r.forEach(f=>{++c,f.next(()=>{++u,d&&u===c&&a()},m=>l(m))}),d=!0,u===c&&a()})}static or(r){let a=PersistencePromise.resolve(!1);for(const l of r)a=a.next(c=>c?PersistencePromise.resolve(c):l());return a}static forEach(r,a){const l=[];return r.forEach((c,u)=>{l.push(a.call(this,c,u))}),this.waitFor(l)}static mapArray(r,a){return new PersistencePromise((l,c)=>{const u=r.length,d=new Array(u);let f=0;for(let m=0;m<u;m++){const y=m;a(r[y]).next(E=>{d[y]=E,++f,f===u&&l(d)},E=>c(E))}})}static doWhile(r,a){return new PersistencePromise((l,c)=>{const u=()=>{r()===!0?a().next(()=>{u()},c):l()};u()})}}function __PRIVATE_getAndroidVersion(o){const r=o.match(/Android ([\d.]+)/i),a=r?r[1].split(".").slice(0,2).join("."):"-1";return Number(a)}function __PRIVATE_isIndexedDbTransactionError(o){return o.name==="IndexedDbTransactionError"}/**
3002 * @license
3003 * Copyright 2018 Google LLC
3004 *
3005 * Licensed under the Apache License, Version 2.0 (the "License");
vendor: 7,422 bytes, lines 3006-3046
3006 * you may not use this file except in compliance with the License.
3007 * You may obtain a copy of the License at
3008 *
3009 *   http://www.apache.org/licenses/LICENSE-2.0
3010 *
3011 * Unless required by applicable law or agreed to in writing, software
3012 * distributed under the License is distributed on an "AS IS" BASIS,
3013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3014 * See the License for the specific language governing permissions and
3015 * limitations under the License.
3016 */class __PRIVATE_ListenSequence{constructor(r,a){this.previousValue=r,a&&(a.sequenceNumberHandler=l=>this.ie(l),this.se=l=>a.writeSequenceNumber(l))}ie(r){return this.previousValue=Math.max(r,this.previousValue),this.previousValue}next(){const r=++this.previousValue;return this.se&&this.se(r),r}}__PRIVATE_ListenSequence.oe=-1;function __PRIVATE_isNullOrUndefined(o){return o==null}function __PRIVATE_isNegativeZero(o){return o===0&&1/o==-1/0}function isSafeInteger(o){return typeof o=="number"&&Number.isInteger(o)&&!__PRIVATE_isNegativeZero(o)&&o<=Number.MAX_SAFE_INTEGER&&o>=Number.MIN_SAFE_INTEGER}/**
3017 * @license
3018 * Copyright 2017 Google LLC
3019 *
3020 * Licensed under the Apache License, Version 2.0 (the "License");
3021 * you may not use this file except in compliance with the License.
3022 * You may obtain a copy of the License at
3023 *
3024 *   http://www.apache.org/licenses/LICENSE-2.0
3025 *
3026 * Unless required by applicable law or agreed to in writing, software
3027 * distributed under the License is distributed on an "AS IS" BASIS,
3028 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3029 * See the License for the specific language governing permissions and
3030 * limitations under the License.
3031 */function __PRIVATE_objectSize(o){let r=0;for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&r++;return r}function forEach(o,r){for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&r(a,o[a])}function isEmpty(o){for(const r in o)if(Object.prototype.hasOwnProperty.call(o,r))return!1;return!0}/**
3032 * @license
3033 * Copyright 2017 Google LLC
3034 *
3035 * Licensed under the Apache License, Version 2.0 (the "License");
3036 * you may not use this file except in compliance with the License.
3037 * You may obtain a copy of the License at
3038 *
3039 *   http://www.apache.org/licenses/LICENSE-2.0
3040 *
3041 * Unless required by applicable law or agreed to in writing, software
3042 * distributed under the License is distributed on an "AS IS" BASIS,
3043 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3044 * See the License for the specific language governing permissions and
3045 * limitations under the License.
3046 */class SortedMap{constructor(r,a){this.comparator=r,this.root=a||LLRBNode.EMPTY}insert(r,a){return new SortedMap(this.comparator,this.root.insert(r,a,this.comparator).copy(null,null,LLRBNode.BLACK,null,null))}remove(r){return new SortedMap(this.comparator,this.root.remove(r,this.comparator).copy(null,null,LLRBNode.BLACK,null,null))}get(r){let a=this.root;for(;!a.isEmpty();){const l=this.comparator(r,a.key);if(l===0)return a.value;l<0?a=a.left:l>0&&(a=a.right)}return null}indexOf(r){let a=0,l=this.root;for(;!l.isEmpty();){const c=this.comparator(r,l.key);if(c===0)return a+l.left.size;c<0?l=l.left:(a+=l.left.size+1,l=l.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(r){return this.root.inorderTraversal(r)}forEach(r){this.inorderTraversal((a,l)=>(r(a,l),!1))}toString(){const r=[];return this.inorderTraversal((a,l)=>(r.push(`${a}:${l}`),!1)),`{${r.join(", ")}}`}reverseTraversal(r){return this.root.reverseTraversal(r)}getIterator(){return new SortedMapIterator(this.root,null,this.comparator,!1)}getIteratorFrom(r){return new SortedMapIterator(this.root,r,this.comparator,!1)}getReverseIterator(){return new SortedMapIterator(this.root,null,this.comparator,!0)}getReverseIteratorFrom(r){return new SortedMapIterator(this.root,r,this.comparator,!0)}}class SortedMapIterator{constructor(r,a,l,c){this.isReverse=c,this.nodeStack=[];let u=1;for(;!r.isEmpty();)if(u=a?l(r.key,a):1,a&&c&&(u*=-1),u<0)r=this.isReverse?r.left:r.right;else{if(u===0){this.nodeStack.push(r);break}this.nodeStack.push(r),r=this.isReverse?r.right:r.left}}getNext(){let r=this.nodeStack.pop();const a={key:r.key,value:r.value};if(this.isReverse)for(r=r.left;!r.isEmpty();)this.nodeStack.push(r),r=r.right;else for(r=r.right;!r.isEmpty();)this.nodeStack.push(r),r=r.left;return a}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const r=this.nodeStack[this.nodeStack.length-1];return{key:r.key,value:r.value}}}class LLRBNode{constructor(r,a,l,c,u){this.key=r,this.value=a,this.color=l??LLRBNode.RED,this.left=c??LLRBNode.EMPTY,this.right=u??LLRBNode.EMPTY,this.size=this.left.size+1+this.right.size}copy(r,a,l,c,u){return new LLRBNode(r??this.key,a??this.value,l??this.color,c??this.left,u??this.right)}isEmpty(){return!1}inorderTraversal(r){return this.left.inorderTraversal(r)||r(this.key,this.value)||this.right.inorderTraversal(r)}reverseTraversal(r){return this.right.reverseTraversal(r)||r(this.key,this.value)||this.left.reverseTraversal(r)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(r,a,l){let c=this;const u=l(r,c.key);return c=u<0?c.copy(null,null,null,c.left.insert(r,a,l),null):u===0?c.copy(null,a,null,null,null):c.copy(null,null,null,null,c.right.insert(r,a,l)),c.fixUp()}removeMin(){if(this.left.isEmpty())return LLRBNode.EMPTY;let r=this;return r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.removeMin(),null),r.fixUp()}remove(r,a){let l,c=this;if(a(r,c.key)<0)c.left.isEmpty()||c.left.isRed()||c.left.left.isRed()||(c=c.moveRedLeft()),c=c.copy(null,null,null,c.left.remove(r,a),null);else{if(c.left.isRed()&&(c=c.rotateRight()),c.right.isEmpty()||c.right.isRed()||c.right.left.isRed()||(c=c.moveRedRight()),a(r,c.key)===0){if(c.right.isEmpty())return LLRBNode.EMPTY;l=c.right.min(),c=c.copy(l.key,l.value,null,null,c.right.removeMin())}c=c.copy(null,null,null,null,c.right.remove(r,a))}return c.fixUp()}isRed(){return this.color}fixUp(){let r=this;return r.right.isRed()&&!r.left.isRed()&&(r=r.rotateLeft()),r.left.isRed()&&r.left.left.isRed()&&(r=r.rotateRight()),r.left.isRed()&&r.right.isRed()&&(r=r.colorFlip()),r}moveRedLeft(){let r=this.colorFlip();return r.right.left.isRed()&&(r=r.copy(null,null,null,null,r.right.rotateRight()),r=r.rotateLeft(),r=r.colorFlip()),r}moveRedRight(){let r=this.colorFlip();return r.left.left.isRed()&&(r=r.rotateRight(),r=r.colorFlip()),r}rotateLeft(){const r=this.copy(null,null,LLRBNode.RED,null,this.right.left);return this.right.copy(null,null,this.color,r,null)}rotateRight(){const r=this.copy(null,null,LLRBNode.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,r)}colorFlip(){const r=this.left.copy(null,null,!this.left.color,null,null),a=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,r,a)}checkMaxDepth(){const r=this.check();return Math.pow(2,r)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw fail();const r=this.left.check();if(r!==this.right.check())throw fail();return r+(this.isRed()?0:1)}}LLRBNode.EMPTY=null,LLRBNode.RED=!0,LLRBNode.BLACK=!1;
3046LLRBNode.EMPTY=new class{constructor(){this.size=0}get key(){throw fail()}get value(){throw fail()}get color(){throw fail()}get left(){throw fail()}get right(){throw fail()}copy(r,a,l,c,u){return this}insert(r,a,l){return new LLRBNode(r,a)}remove(r,a){return this}isEmpty(){return!0}inorderTraversal(r){return!1}reverseTraversal(r){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/**
3047 * @license
3048 * Copyright 2017 Google LLC
3049 *
3050 * Licensed under the Apache License, Version 2.0 (the "License");
3051 * you may not use this file except in compliance with the License.
3052 * You may obtain a copy of the License at
3053 *
3054 *   http://www.apache.org/licenses/LICENSE-2.0
3055 *
3056 * Unless required by applicable law or agreed to in writing, software
3057 * distributed under the License is distributed on an "AS IS" BASIS,
3058 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3059 * See the License for the specific language governing permissions and
3060 * limitations under the License.
3061 */class SortedSet{constructor(r){this.comparator=r,this.data=new SortedMap(this.comparator)}has(r){return this.data.get(r)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(r){return this.data.indexOf(r)}forEach(r){this.data.inorderTraversal((a,l)=>(r(a),!1))}forEachInRange(r,a){const l=this.data.getIteratorFrom(r[0]);for(;l.hasNext();){const c=l.getNext();if(this.comparator(c.key,r[1])>=0)return;a(c.key)}}forEachWhile(r,a){let l;for(l=a!==void 0?this.data.getIteratorFrom(a):this.data.getIterator();l.hasNext();)if(!r(l.getNext().key))return}firstAfterOrEqual(r){const a=this.data.getIteratorFrom(r);return a.hasNext()?a.getNext().key:null}getIterator(){return new SortedSetIterator(this.data.getIterator())}getIteratorFrom(r){return new SortedSetIterator(this.data.getIteratorFrom(r))}add(r){return this.copy(this.data.remove(r).insert(r,!0))}delete(r){return this.has(r)?this.copy(this.data.remove(r)):this}isEmpty(){return this.data.isEmpty()}unionWith(r){let a=this;return a.size<r.size&&(a=r,r=this),r.forEach(l=>{a=a.add(l)}),a}isEqual(r){if(!(r instanceof SortedSet)||this.size!==r.size)return!1;const a=this.data.getIterator(),l=r.data.getIterator();for(;a.hasNext();){const c=a.getNext().key,u=l.getNext().key;if(this.comparator(c,u)!==0)return!1}return!0}toArray(){const r=[];return this.forEach(a=>{r.push(a)}),r}toString(){const r=[];return this.forEach(a=>r.push(a)),"SortedSet("+r.toString()+")"}copy(r){const a=new SortedSet(this.comparator);return a.data=r,a}}class SortedSetIterator{constructor(r){this.iter=r}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/**
3062 * @license
3063 * Copyright 2020 Google LLC
3064 *
3065 * Licensed under the Apache License, Version 2.0 (the "License");
3066 * you may not use this file except in compliance with the License.
3067 * You may obtain a copy of the License at
3068 *
3069 *   http://www.apache.org/licenses/LICENSE-2.0
3070 *
3071 * Unless required by applicable law or agreed to in writing, software
3072 * distributed under the License is distributed on an "AS IS" BASIS,
3073 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3074 * See the License for the specific language governing permissions and
3075 * limitations under the License.
3076 */class FieldMask{constructor(r){this.fields=r,r.sort(FieldPath$1.comparator)}static empty(){return new FieldMask([])}unionWith(r){let a=new SortedSet(FieldPath$1.comparator);for(const l of this.fields)a=a.add(l);for(const l of r)a=a.add(l);return new FieldMask(a.toArray())}covers(r){for(const a of this.fields)if(a.isPrefixOf(r))return!0;return!1}isEqual(r){return __PRIVATE_arrayEquals(this.fields,r.fields,(a,l)=>a.isEqual(l))}}/**
3077 * @license
3078 * Copyright 2023 Google LLC
3079 *
3080 * Licensed under the Apache License, Version 2.0 (the "License");
3081 * you may not use this file except in compliance with the License.
3082 * You may obtain a copy of the License at
3083 *
3084 *   http://www.apache.org/licenses/LICENSE-2.0
3085 *
3086 * Unless required by applicable law or agreed to in writing, softw
3086are
3087 * distributed under the License is distributed on an "AS IS" BASIS,
3088 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3089 * See the License for the specific language governing permissions and
3090 * limitations under the License.
3091 */class __PRIVATE_Base64DecodeError extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
3092 * @license
3093 * Copyright 2020 Google LLC
3094 *
3095 * Licensed under the Apache License, Version 2.0 (the "License");
3096 * you may not use this file except in compliance with the License.
3097 * You may obtain a copy of the License at
3098 *
3099 *   http://www.apache.org/licenses/LICENSE-2.0
3100 *
3101 * Unless required by applicable law or agreed to in writing, software
3102 * distributed under the License is distributed on an "AS IS" BASIS,
3103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3104 * See the License for the specific language governing permissions and
3105 * limitations under the License.
3106 */class ByteString{constructor(r){this.binaryString=r}static fromBase64String(r){const a=function(c){try{return atob(c)}catch(u){throw typeof DOMException<"u"&&u instanceof DOMException?new __PRIVATE_Base64DecodeError("Invalid base64 string: "+u):u}}(r);return new ByteString(a)}static fromUint8Array(r){const a=function(c){let u="";for(let d=0;d<c.length;++d)u+=String.fromCharCode(c[d]);return u}(r);return new ByteString(a)}[Symbol.iterator](){let r=0;return{next:()=>r<this.binaryString.length?{value:this.binaryString.charCodeAt(r++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(a){return btoa(a)}(this.binaryString)}toUint8Array(){return function(a){const l=new Uint8Array(a.length);for(let c=0;c<a.length;c++)l[c]=a.charCodeAt(c);return l}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(r){return __PRIVATE_primitiveComparator(this.binaryString,r.binaryString)}isEqual(r){return this.binaryString===r.binaryString}}ByteString.EMPTY_BYTE_STRING=new ByteString("");const ne=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function __PRIVATE_normalizeTimestamp(o){if(__PRIVATE_hardAssert(!!o),typeof o=="string"){let r=0;const a=ne.exec(o);if(__PRIVATE_hardAssert(!!a),a[1]){let c=a[1];c=(c+"000000000").substr(0,9),r=Number(c)}const l=new Date(o);return{seconds:Math.floor(l.getTime()/1e3),nanos:r}}return{seconds:__PRIVATE_normalizeNumber(o.seconds),nanos:__PRIVATE_normalizeNumber(o.nanos)}}function __PRIVATE_normalizeNumber(o){return typeof o=="number"?o:typeof o=="string"?Number(o):0}function __PRIVATE_normalizeByteString(o){return typeof o=="string"?ByteString.fromBase64String(o):ByteString.fromUint8Array(o)}/**
3107 * @license
3108 * Copyright 2020 Google LLC
3109 *
3110 * Licensed under the Apache License, Version 2.0 (the "License");
3111 * you may not use this file except in compliance with the License.
3112 * You may obtain a copy of the License at
3113 *
3114 *   http://www.apache.org/licenses/LICENSE-2.0
3115 *
3116 * Unless required by applicable law or agreed to in writing, software
3117 * distributed under the License is distributed on an "AS IS" BASIS,
3118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3119 * See the License for the specific language governing permissions and
3120 * limitations under the License.
3121 */function __PRIVATE_isServerTimestamp(o){var r,a;return((a=(((r=o==null?void 0:o.mapValue)===null||r===void 0?void 0:r.fields)||{}).__type__)===null||a===void 0?void 0:a.stringValue)==="server_timestamp"}function __PRIVATE_getPreviousValue(o){const r=o.mapValue.fields.__previous_value__;return __PRIVATE_isServerTimestamp(r)?__PRIVATE_getPreviousValue(r):r}function __PRIVATE_getLocalWriteTime(o){const r=__PRIVATE_normalizeTimestamp(o.mapValue.fields.__local_write_time__.timestampValue);return new Timestamp(r.seconds,r.nanos)}/**
3122 * @license
3123 * Copyright 2017 Google LLC
3124 *
3125 * Licensed under the Apache License, Version 2.0 (the "License");
3126 * you may not use this file except in compliance with the License.
3127 * You may obtain a copy of the License at
3128 *
3129 *   http://www.apache.org/licenses/LICENSE-2.0
3130 *
3131 * Unless required by applicable law or agreed to in writing, softw
3131are
3132 * distributed under the License is distributed on an "AS IS" BASIS,
3133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3134 * See the License for the specific language governing permissions and
3135 * limitations under the License.
3136 */class DatabaseInfo{constructor(r,a,l,c,u,d,f,m,y){this.databaseId=r,this.appId=a,this.persistenceKey=l,this.host=c,this.ssl=u,this.forceLongPolling=d,this.autoDetectLongPolling=f,this.longPollingOptions=m,this.useFetchStreams=y}}class DatabaseId{constructor(r,a){this.projectId=r,this.database=a||"(default)"}static empty(){return new DatabaseId("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(r){return r instanceof DatabaseId&&r.projectId===this.projectId&&r.database===this.database}}/**
3137 * @license
3138 * Copyright 2020 Google LLC
3139 *
3140 * Licensed under the Apache License, Version 2.0 (the "License");
3141 * you may not use this file except in compliance with the License.
3142 * You may obtain a copy of the License at
3143 *
3144 *   http://www.apache.org/licenses/LICENSE-2.0
3145 *
3146 * Unless required by applicable law or agreed to in writing, software
3147 * distributed under the License is distributed on an "AS IS" BASIS,
3148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3149 * See the License for the specific language governing permissions and
3150 * limitations under the License.
3151 */const re={mapValue:{}};function __PRIVATE_typeOrder(o){return"nullValue"in o?0:"booleanValue"in o?1:"integerValue"in o||"doubleValue"in o?2:"timestampValue"in o?3:"stringValue"in o?5:"bytesValue"in o?6:"referenceValue"in o?7:"geoPointValue"in o?8:"arrayValue"in o?9:"mapValue"in o?__PRIVATE_isServerTimestamp(o)?4:__PRIVATE_isMaxValue(o)?9007199254740991:__PRIVATE_isVectorValue(o)?10:11:fail()}function __PRIVATE_valueEquals(o,r){if(o===r)return!0;const a=__PRIVATE_typeOrder(o);if(a!==__PRIVATE_typeOrder(r))return!1;switch(a){case 0:case 9007199254740991:return!0;case 1:return o.booleanValue===r.booleanValue;case 4:return __PRIVATE_getLocalWriteTime(o).isEqual(__PRIVATE_getLocalWriteTime(r));case 3:return function(c,u){if(typeof c.timestampValue=="string"&&typeof u.timestampValue=="string"&&c.timestampValue.length===u.timestampValue.length)return c.timestampValue===u.timestampValue;const d=__PRIVATE_normalizeTimestamp(c.timestampValue),f=__PRIVATE_normalizeTimestamp(u.timestampValue);return d.seconds===f.seconds&&d.nanos===f.nanos}(o,r);case 5:return o.stringValue===r.stringValue;case 6:return function(c,u){return __PRIVATE_normalizeByteString(c.bytesValue).isEqual(__PRIVATE_normalizeByteString(u.bytesValue))}(o,r);case 7:return o.referenceValue===r.referenceValue;case 8:return function(c,u){return __PRIVATE_normalizeNumber(c.geoPointValue.latitude)===__PRIVATE_normalizeNumber(u.geoPointValue.latitude)&&__PRIVATE_normalizeNumber(c.geoPointValue.longitude)===__PRIVATE_normalizeNumber(u.geoPointValue.longitude)}(o,r);case 2:return function(c,u){if("integerValue"in c&&"integerValue"in u)return __PRIVATE_normalizeNumber(c.integerValue)===__PRIVATE_normalizeNumber(u.integerValue);if("doubleValue"in c&&"doubleValue"in u){const d=__PRIVATE_normalizeNumber(c.doubleValue),f=__PRIVATE_normalizeNumber(u.doubleValue);return d===f?__PRIVATE_isNegativeZero(d)===__PRIVATE_isNegativeZero(f):isNaN(d)&&isNaN(f)}return!1}(o,r);case 9:return __PRIVATE_arrayEquals(o.arrayValue.values||[],r.arrayValue.values||[],__PRIVATE_valueEquals);case 10:case 11:return function(c,u){const d=c.mapValue.fields||{},f=u.mapValue.fields||{};if(__PRIVATE_objectSize(d)!==__PRIVATE_objectSize(f))return!1;for(const m in d)if(d.hasOwnProperty(m)&&(f[m]===void 0||!__PRIVATE_valueEquals(d[m],f[m])))return!1;return!0}(o,r);default:return fail()}}function __PRIVATE_arrayValueContains(o,r){return(o.values||[]).find(a=>__PRIVATE_valueEquals(a,r))!==void 0}function __PRIVATE_valueCompare(o,r){if(o===r)return 0;const a=__PRIVATE_typeOrder(o),l=__PRIVATE_typeOrder(r);if(a!==l)return __PRIVATE_primitiveComparator(a,l);switch(a){case 0:case 9007199254740991:return 0;case 1:return __PRIVATE_primitiveComparator(o.booleanValue,r.booleanValue);case 2:return function(u,d){const f=__PRIVATE_normalizeNumber(u.integerValue||u.doubleValue),m=__PRIVATE_normalizeNumber(d.integerValue||d.doubleValue);return f<m?-1:f>m?1:f===m?0:isNaN(f)?isNaN(m)?0:-1:1}(o,r);case 3:return __PRIVATE_compareTimestamps(o.timestampValue,r.timestampValue);case 4:return __PRIVATE_compareTimestamps(__PRIVATE_getLocalWriteTime(o),__PRIVATE_getLocalWriteTime(r));case 5:return __PRIVATE_primitiveComparator(o.stringValue,r.stringValue);case 6:return function(u,d){const f=__PRIVATE_normalizeByteString(u),m=__PRIVATE_normalizeByteString(d);return f.compareTo(m)}(o.bytesValue,r.bytesValue);case 7:return function(u,d){const f=u.split("/"),m=d.split("/");for(let y=0;y<f.length&&y<m.length;y++){const E=__PRIVATE_primitiveComparator(f[y],m[y]);if(E!==0)return E}return __PRIVATE_primitiveComparator(f.length,m.length)}(o.referenceValue,r.referenceValue);case 8:return function(u,d){const f=__PRIVATE_primitiveComparator(__PRIVATE_normalizeNumber(u.latitude),__PRIVATE_normalizeNumber(d.latitude));return f!==0?f:__PRIVATE_primitiveComparator(__PRIVATE_normalizeNumber(u.longitude),__PRIVATE_normalizeNumber(d.longitude))}(o.geoPointValue,r.geoPointValue);case 9:return __PRIVATE_compareArrays(o.arrayValue,r.arrayValue);case 10:return function(u,d){var f,m,y,E;const A=u.fields||{},P=d.fields||{},R=(f=A.value)===null||f===void 0?void 0:f.arrayValue,x=(m=P.value)===null||m===void 0?void 0:m.arrayValue,M=__PRIVATE_primitiveComparator(((y=R==null?void 0:R.values)===null||y===void 0?void 0:y.length)||0,((E=x==null?void 0:x.values)===null||E===void 0?void 0:E.length)||0);return M!==0?M:__PRIVATE_compareArrays(R,x)}(o.mapValue,r.mapValue);case 11:return function(u,d){if(u===re.mapValue&&d===re.mapValue)return 0;if(u===re.mapValue)return 1;if(d===re.mapValue)return-1;const f=u.fields||{},m=Object.keys(f),y=d.fields||{},E=Object.keys(y);m.sort(),E.sort();for(let A=0;A<m.length&&A<E.length;++A){const P=__PRIVATE_primitiveComparator(m[A],E[A]);if(P!==0)return P;const R=__PRIVATE_valueCompare(f[m[A]],y[E[A]]);if(R!==0)return R}return __PRIVATE_primitiveComparator(m.length,E.length)}(o.mapValue,r.mapValue);default:throw fail()}}
3151function __PRIVATE_compareTimestamps(o,r){if(typeof o=="string"&&typeof r=="string"&&o.length===r.length)return __PRIVATE_primitiveComparator(o,r);const a=__PRIVATE_normalizeTimestamp(o),l=__PRIVATE_normalizeTimestamp(r),c=__PRIVATE_primitiveComparator(a.seconds,l.seconds);return c!==0?c:__PRIVATE_primitiveComparator(a.nanos,l.nanos)}function __PRIVATE_compareArrays(o,r){const a=o.values||[],l=r.values||[];for(let c=0;c<a.length&&c<l.length;++c){const u=__PRIVATE_valueCompare(a[c],l[c]);if(u)return u}return __PRIVATE_primitiveComparator(a.length,l.length)}function canonicalId(o){return __PRIVATE_canonifyValue(o)}function __PRIVATE_canonifyValue(o){return"nullValue"in o?"null":"booleanValue"in o?""+o.booleanValue:"integerValue"in o?""+o.integerValue:"doubleValue"in o?""+o.doubleValue:"timestampValue"in o?function(a){const l=__PRIVATE_normalizeTimestamp(a);return`time(${l.seconds},${l.nanos})`}(o.timestampValue):"stringValue"in o?o.stringValue:"bytesValue"in o?function(a){return __PRIVATE_normalizeByteString(a).toBase64()}(o.bytesValue):"referenceValue"in o?function(a){return DocumentKey.fromName(a).toString()}(o.referenceValue):"geoPointValue"in o?function(a){return`geo(${a.latitude},${a.longitude})`}(o.geoPointValue):"arrayValue"in o?function(a){let l="[",c=!0;for(const u of a.values||[])c?c=!1:l+=",",l+=__PRIVATE_canonifyValue(u);return l+"]"}(o.arrayValue):"mapValue"in o?function(a){const l=Object.keys(a.fields||{}).sort();let c="{",u=!0;for(const d of l)u?u=!1:c+=",",c+=`${d}:${__PRIVATE_canonifyValue(a.fields[d])}`;return c+"}"}(o.mapValue):fail()}function __PRIVATE_refValue(o,r){return{referenceValue:`projects/${o.projectId}/databases/${o.database}/documents/${r.path.canonicalString()}`}}function isInteger(o){return!!o&&"integerValue"in o}function isArray$1(o){return!!o&&"arrayValue"in o}function __PRIVATE_isNullValue(o){return!!o&&"nullValue"in o}function __PRIVATE_isNanValue(o){return!!o&&"doubleValue"in o&&isNaN(Number(o.doubleValue))}function __PRIVATE_isMapValue(o){return!!o&&"mapValue"in o}function __PRIVATE_isVectorValue(o){var r,a;return((a=(((r=o==null?void 0:o.mapValue)===null||r===void 0?void 0:r.fields)||{}).__type__)===null||a===void 0?void 0:a.stringValue)==="__vector__"}function __PRIVATE_deepClone(o){if(o.geoPointValue)return{geoPointValue:Object.assign({},o.geoPointValue)};if(o.timestampValue&&typeof o.timestampValue=="object")return{timestampValue:Object.assign({},o.timestampValue)};if(o.mapValue){const r={mapValue:{fields:{}}};return forEach(o.mapValue.fields,(a,l)=>r.mapValue.fields[a]=__PRIVATE_deepClone(l)),r}if(o.arrayValue){const r={arrayValue:{values:[]}};for(let a=0;a<(o.arrayValue.values||[]).length;++a)r.arrayValue.values[a]=__PRIVATE_deepClone(o.arrayValue.values[a]);return r}return Object.assign({},o)}function __PRIVATE_isMaxValue(o){return(((o.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/**
3152 * @license
3153 * Copyright 2017 Google LLC
3154 *
3155 * Licensed under the Apache License, Version 2.0 (the "License");
3156 * you may not use this file except in compliance with the License.
3157 * You may obtain a copy of the License at
3158 *
3159 *   http://www.apache.org/licenses/LICENSE-2.0
3160 *
3161 * Unless required by applicable law or agreed to in writing, software
3162 * distributed under the License is distributed on an "AS IS" BASIS,
3163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3164 * See the License for the specific language governing permissions and
3165 * limitations under the License.
3166 */class ObjectValue{constructor(r){this.value=r}static empty(){return new ObjectValue({mapValue:{}})}field(r){if(r.isEmpty())return this.value;{let a=this.value;for(let l=0;l<r.length-1;++l)if(a=(a.mapValue.fields||{})[r.get(l)],!__PRIVATE_isMapValue(a))return null;return a=(a.mapValue.fields||{})[r.lastSegment()],a||null}}set(r,a){this.getFieldsMap(r.popLast())[r.lastSegment()]=__PRIVATE_deepClone(a)}setAll(r){let a=FieldPath$1.emptyPath(),l={},c=[];r.forEach((d,f)=>{if(!a.isImmediateParentOf(f)){const m=this.getFieldsMap(a);this.applyChanges(m,l,c),l={},c=[],a=f.popLast()}d?l[f.lastSegment()]=__PRIVATE_deepClone(d):c.push(f.lastSegment())});const u=this.getFieldsMap(a);this.applyChanges(u,l,c)}delete(r){const a=this.field(r.popLast());__PRIVATE_isMapValue(a)&&a.mapValue.fields&&delete a.mapValue.fields[r.lastSegment()]}isEqual(r){return __PRIVATE_valueEquals(this.value,r.value)}getFieldsMap(r){let a=this.value;a.mapValue.fields||(a.mapValue={fields:{}});for(let l=0;l<r.length;++l){let c=a.mapValue.fields[r.get(l)];__PRIVATE_isMapValue(c)&&c.mapValue.fields||(c={mapValue:{fields:{}}},a.mapValue.fields[r.get(l)]=c),a=c}return a.mapValue.fields}
vendor: 4,662 bytes, lines 3166-3200
3166applyChanges(r,a,l){forEach(a,(c,u)=>r[c]=u);for(const c of l)delete r[c]}clone(){return new ObjectValue(__PRIVATE_deepClone(this.value))}}function __PRIVATE_extractFieldMask(o){const r=[];return forEach(o.fields,(a,l)=>{const c=new FieldPath$1([a]);if(__PRIVATE_isMapValue(l)){const u=__PRIVATE_extractFieldMask(l.mapValue).fields;if(u.length===0)r.push(c);else for(const d of u)r.push(c.child(d))}else r.push(c)}),new FieldMask(r)}/**
3167 * @license
3168 * Copyright 2017 Google LLC
3169 *
3170 * Licensed under the Apache License, Version 2.0 (the "License");
3171 * you may not use this file except in compliance with the License.
3172 * You may obtain a copy of the License at
3173 *
3174 *   http://www.apache.org/licenses/LICENSE-2.0
3175 *
3176 * Unless required by applicable law or agreed to in writing, software
3177 * distributed under the License is distributed on an "AS IS" BASIS,
3178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3179 * See the License for the specific language governing permissions and
3180 * limitations under the License.
3181 */class MutableDocument{constructor(r,a,l,c,u,d,f){this.key=r,this.documentType=a,this.version=l,this.readTime=c,this.createTime=u,this.data=d,this.documentState=f}static newInvalidDocument(r){return new MutableDocument(r,0,SnapshotVersion.min(),SnapshotVersion.min(),SnapshotVersion.min(),ObjectValue.empty(),0)}static newFoundDocument(r,a,l,c){return new MutableDocument(r,1,a,SnapshotVersion.min(),l,c,0)}static newNoDocument(r,a){return new MutableDocument(r,2,a,SnapshotVersion.min(),SnapshotVersion.min(),ObjectValue.empty(),0)}static newUnknownDocument(r,a){return new MutableDocument(r,3,a,SnapshotVersion.min(),SnapshotVersion.min(),ObjectValue.empty(),2)}convertToFoundDocument(r,a){return!this.createTime.isEqual(SnapshotVersion.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=r),this.version=r,this.documentType=1,this.data=a,this.documentState=0,this}convertToNoDocument(r){return this.version=r,this.documentType=2,this.data=ObjectValue.empty(),this.documentState=0,this}convertToUnknownDocument(r){return this.version=r,this.documentType=3,this.data=ObjectValue.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=SnapshotVersion.min(),this}setReadTime(r){return this.readTime=r,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(r){return r instanceof MutableDocument&&this.key.isEqual(r.key)&&this.version.isEqual(r.version)&&this.documentType===r.documentType&&this.documentState===r.documentState&&this.data.isEqual(r.data)}mutableCopy(){return new MutableDocument(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/**
3182 * @license
3183 * Copyright 2022 Google LLC
3184 *
3185 * Licensed under the Apache License, Version 2.0 (the "License");
3186 * you may not use this file except in compliance with the License.
3187 * You may obtain a copy of the License at
3188 *
3189 *   http://www.apache.org/licenses/LICENSE-2.0
3190 *
3191 * Unless required by applicable law or agreed to in writing, software
3192 * distributed under the License is distributed on an "AS IS" BASIS,
3193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3194 * See the License for the specific language governing permissions and
3195 * limitations under the License.
3196 */class Bound{constructor(r,a){this.position=r,this.inclusive=a}}function __PRIVATE_boundCompareToDocument(o,r,a){let l=0;for(let c=0;c<o.position.length;c++){const u=r[c],d=o.position[c];if(u.field.isKeyField()?l=DocumentKey.comparator(DocumentKey.fromName(d.referenceValue),a.key):l=__PRIVATE_valueCompare(d,a.data.field(u.field)),u.dir==="desc"&&(l*=-1),l!==0)break}return l}function __PRIVATE_boundEquals(o,r){if(o===null)return r===null;if(r===null||o.inclusive!==r.inclusive||o.position.length!==r.position.length)return!1;for(let a=0;a<o.position.length;a++)if(!__PRIVATE_valueEquals(o.position[a],r.position[a]))return!1;return!0}/**
3197 * @license
3198 * Copyright 2022 Google LLC
3199 *
3200 * Licensed under the Apache License, Version 2.0 (the "License");
3201 * you may not use this file except in compliance with the License.
3202 * You may obtain a copy of the License at
3203 *
3204 *   http://www.apache.org/licenses/LICENSE-2.0
3205 *
3206 * Unless required by applicable law or agreed to in writing, software
3207 * distributed under the License is distributed on an "AS IS" BASIS,
3208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3209 * See the License for the specific language governing permissions and
3210 * limitations under the License.
3211 */class OrderBy{constructor(r,a="asc"){this.field=r,this.dir=a}}function __PRIVATE_orderByEquals(o,r){return o.dir===r.dir&&o.field.isEqual(r.field)}/**
3212 * @license
3213 * Copyright 2022 Google LLC
3214 *
3215 * Licensed under the Apache License, Version 2.0 (the "License");
3216 * you may not use this file except in compliance with the License.
3217 * You may obtain a copy of the License at
3218 *
3219 *   http://www.apache.org/licenses/LICENSE-2.0
3220 *
3221 * Unless required by applicable law or agreed to in writing, software
3222 * distributed under the License is distributed on an "AS IS" BASIS,
3223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3224 * See the License for the specific language governing permissions and
3225 * limitations under the License.
3226 */class Filter{}class FieldFilter extends Filter{constructor(r,a,l){super(),this.field=r,this.op=a,this.value=l}static create(r,a,l){return r.isKeyField()?a==="in"||a==="not-in"?this.createKeyFieldInFilter(r,a,l):new __PRIVATE_KeyFieldFilter(r,a,l):a==="array-contains"?new __PRIVATE_ArrayContainsFilter(r,l):a==="in"?new __PRIVATE_InFilter(r,l):a==="not-in"?new __PRIVATE_NotInFilter(r,l):a==="array-contains-any"?new __PRIVATE_ArrayContainsAnyFilter(r,l):new FieldFilter(r,a,l)}static createKeyFieldInFilter(r,a,l){return a==="in"?new __PRIVATE_KeyFieldInFilter(r,l):new __PRIVATE_KeyFieldNotInFilter(r,l)}matches(r){const a=r.data.field(this.field);return this.op==="!="?a!==null&&this.matchesComparison(__PRIVATE_valueCompare(a,this.value)):a!==null&&__PRIVATE_typeOrder(this.value)===__PRIVATE_typeOrder(a)&&this.matchesComparison(__PRIVATE_valueCompare(a,this.value))}matchesComparison(r){switch(this.op){case"<":return r<0;case"<=":return r<=0;case"==":return r===0;case"!=":return r!==0;case">":return r>0;case">=":return r>=0;default:return fail()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class CompositeFilter extends Filter{constructor(r,a){super(),this.filters=r,this.op=a,this.ae=null}static create(r,a){return new CompositeFilter(r,a)}matches(r){return __PRIVATE_compositeFilterIsConjunction(this)?this.filters.find(a=>!a.matches(r))===void 0:this.filters.find(a=>a.matches(r))!==void 0}getFlattenedFilters(){return this.ae!==null||(this.ae=this.filters.reduce((r,a)=>r.concat(a.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function __PRIVATE_compositeFilterIsConjunction(o){return o.op==="and"}function __PRIVATE_compositeFilterIsFlatConjunction(o){return __PRIVATE_compositeFilterIsFlat(o)&&__PRIVATE_compositeFilterIsConjunction(o)}function __PRIVATE_compositeFilterIsFlat(o){for(const r of o.filters)if(r instanceof CompositeFilter)return!1;return!0}function __PRIVATE_canonifyFilter(o){if(o instanceof FieldFilter)return o.field.canonicalString()+o.op.toString()+canonicalId(o.value);if(__PRIVATE_compositeFilterIsFlatConjunction(o))return o.filters.map(r=>__PRIVATE_canonifyFilter(r)).join(",");{const r=o.filters.map(a=>__PRIVATE_canonifyFilter(a)).join(",");return`${o.op}(${r})`}}function __PRIVATE_filterEquals(o,r){return o instanceof FieldFilter?function(l,c){return c instanceof FieldFilter&&l.op===c.op&&l.field.isEqual(c.field)&&__PRIVATE_valueEquals(l.value,c.value)}(o,r):o instanceof CompositeFilter?function(l,c){return c instanceof CompositeFilter&&l.op===c.op&&l.filters.length===c.filters.length?l.filters.reduce((u,d,f)=>u&&__PRIVATE_filterEquals(d,c.filters[f]),!0):!1}(o,r):void fail()}function __PRIVATE_stringifyFilter(o){return o instanceof FieldFilter?function(a){return`${a.field.canonicalString()} ${a.op} ${canonicalId(a.value)}`}(o):o instanceof CompositeFilter?function(a){return a.op.toString()+" {"+a.getFilters().map(__PRIVATE_stringifyFilter).join(" ,")+"}"}(o):"Filter"}class __PRIVATE_KeyFieldFilter extends FieldFilter{constructor(r,a,l){super(r,a,l),this.key=DocumentKey.fromName(l.referenceValue)}matches(r){const a=DocumentKey.comparator(r.key,this.key);return this.matchesComparison(a)}}class __PRIVATE_KeyFieldInFilter extends FieldFilter{constructor(r,a){super(r,"in",a),this.keys=__PRIVATE_extractDocumentKeysFromArrayValue("in",a)}matches(r){return this.keys.some(a=>a.isEqual(r.key))}}class __PRIVATE_KeyFieldNotInFilter extends FieldFilter{constructor(r,a){super(r,"not-in",a),this.keys=__PRIVATE_extractDocumentKeysFromArrayValue("not-in",a)}matches(r){return!this.keys.some(a=>a.isEqual(r.key))}}function __PRIVATE_extractDocumentKeysFromArrayValue(o,r){var a;return(((a=r.arrayValue)===null||a===void 0?void 0:a.values)||[]).map(l
3226=>DocumentKey.fromName(l.referenceValue))}class __PRIVATE_ArrayContainsFilter extends FieldFilter{constructor(r,a){super(r,"array-contains",a)}matches(r){const a=r.data.field(this.field);return isArray$1(a)&&__PRIVATE_arrayValueContains(a.arrayValue,this.value)}}class __PRIVATE_InFilter extends FieldFilter{constructor(r,a){super(r,"in",a)}matches(r){const a=r.data.field(this.field);return a!==null&&__PRIVATE_arrayValueContains(this.value.arrayValue,a)}}class __PRIVATE_NotInFilter extends FieldFilter{constructor(r,a){super(r,"not-in",a)}matches(r){if(__PRIVATE_arrayValueContains(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const a=r.data.field(this.field);return a!==null&&!__PRIVATE_arrayValueContains(this.value.arrayValue,a)}}class __PRIVATE_ArrayContainsAnyFilter extends FieldFilter{constructor(r,a){super(r,"array-contains-any",a)}matches(r){const a=r.data.field(this.field);return!(!isArray$1(a)||!a.arrayValue.values)&&a.arrayValue.values.some(l=>__PRIVATE_arrayValueContains(this.value.arrayValue,l))}}/**
3227 * @license
3228 * Copyright 2019 Google LLC
3229 *
3230 * Licensed under the Apache License, Version 2.0 (the "License");
3231 * you may not use this file except in compliance with the License.
3232 * You may obtain a copy of the License at
3233 *
3234 *   http://www.apache.org/licenses/LICENSE-2.0
3235 *
3236 * Unless required by applicable law or agreed to in writing, software
3237 * distributed under the License is distributed on an "AS IS" BASIS,
3238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3239 * See the License for the specific language governing permissions and
3240 * limitations under the License.
3241 */class __PRIVATE_TargetImpl{constructor(r,a=null,l=[],c=[],u=null,d=null,f=null){this.path=r,this.collectionGroup=a,this.orderBy=l,this.filters=c,this.limit=u,this.startAt=d,this.endAt=f,this.ue=null}}function __PRIVATE_newTarget(o,r=null,a=[],l=[],c=null,u=null,d=null){return new __PRIVATE_TargetImpl(o,r,a,l,c,u,d)}function __PRIVATE_canonifyTarget(o){const r=__PRIVATE_debugCast(o);if(r.ue===null){let a=r.path.canonicalString();r.collectionGroup!==null&&(a+="|cg:"+r.collectionGroup),a+="|f:",a+=r.filters.map(l=>__PRIVATE_canonifyFilter(l)).join(","),a+="|ob:",a+=r.orderBy.map(l=>function(u){return u.field.canonicalString()+u.dir}(l)).join(","),__PRIVATE_isNullOrUndefined(r.limit)||(a+="|l:",a+=r.limit),r.startAt&&(a+="|lb:",a+=r.startAt.inclusive?"b:":"a:",a+=r.startAt.position.map(l=>canonicalId(l)).join(",")),r.endAt&&(a+="|ub:",a+=r.endAt.inclusive?"a:":"b:",a+=r.endAt.position.map(l=>canonicalId(l)).join(",")),r.ue=a}return r.ue}function __PRIVATE_targetEquals(o,r){if(o.limit!==r.limit||o.orderBy.length!==r.orderBy.length)return!1;for(let a=0;a<o.orderBy.length;a++)if(!__PRIVATE_orderByEquals(o.orderBy[a],r.orderBy[a]))return!1;if(o.filters.length!==r.filters.length)return!1;for(let a=0;a<o.filters.length;a++)if(!__PRIVATE_filterEquals(o.filters[a],r.filters[a]))return!1;return o.collectionGroup===r.collectionGroup&&!!o.path.isEqual(r.path)&&!!__PRIVATE_boundEquals(o.startAt,r.startAt)&&__PRIVATE_boundEquals(o.endAt,r.endAt)}function __PRIVATE_targetIsDocumentTarget(o){return DocumentKey.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0}/**
3242 * @license
3243 * Copyright 2017 Google LLC
3244 *
3245 * Licensed under the Apache License, Version 2.0 (the "License");
3246 * you may not use this file except in compliance with the License.
3247 * You may obtain a copy of the License at
3248 *
3249 *   http://www.apache.org/licenses/LICENSE-2.0
3250 *
3251 * Unless required by applicable law or agreed to in writing, software
3252 * distributed under the License is distributed on an "AS IS" BASIS,
3253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3254 * See the License for the specific language governing permissions and
3255 * limitations under the License.
3256 */class __PRIVATE_QueryImpl{constructor(r,a=null,l=[],c=[],u=null,d="F",f=null,m=null){this.path=r,this.collectionGroup=a,this.explicitOrderBy=l,this.filters=c,this.limit=u,this.limitType=d,this.startAt=f,this.endAt=m,this.ce=null,this.le=null,this.he=null,this.startAt,this.endAt}}function __PRIVATE_newQuery(o,r,a,l,c,u,d,f){return new __PRIVATE_QueryImpl(o,r,a,l,c,u,d,f)}function __PRIVATE_newQueryForPath(o){return new __PRIVATE_QueryImpl(o
3256)}function __PRIVATE_queryMatchesAllDocuments(o){return o.filters.length===0&&o.limit===null&&o.startAt==null&&o.endAt==null&&(o.explicitOrderBy.length===0||o.explicitOrderBy.length===1&&o.explicitOrderBy[0].field.isKeyField())}function __PRIVATE_isCollectionGroupQuery(o){return o.collectionGroup!==null}function __PRIVATE_queryNormalizedOrderBy(o){const r=__PRIVATE_debugCast(o);if(r.ce===null){r.ce=[];const a=new Set;for(const u of r.explicitOrderBy)r.ce.push(u),a.add(u.field.canonicalString());const l=r.explicitOrderBy.length>0?r.explicitOrderBy[r.explicitOrderBy.length-1].dir:"asc";(function(d){let f=new SortedSet(FieldPath$1.comparator);return d.filters.forEach(m=>{m.getFlattenedFilters().forEach(y=>{y.isInequality()&&(f=f.add(y.field))})}),f})(r).forEach(u=>{a.has(u.canonicalString())||u.isKeyField()||r.ce.push(new OrderBy(u,l))}),a.has(FieldPath$1.keyField().canonicalString())||r.ce.push(new OrderBy(FieldPath$1.keyField(),l))}return r.ce}function __PRIVATE_queryToTarget(o){const r=__PRIVATE_debugCast(o);return r.le||(r.le=__PRIVATE__queryToTarget(r,__PRIVATE_queryNormalizedOrderBy(o))),r.le}function __PRIVATE__queryToTarget(o,r){if(o.limitType==="F")return __PRIVATE_newTarget(o.path,o.collectionGroup,r,o.filters,o.limit,o.startAt,o.endAt);{r=r.map(c=>{const u=c.dir==="desc"?"asc":"desc";return new OrderBy(c.field,u)});const a=o.endAt?new Bound(o.endAt.position,o.endAt.inclusive):null,l=o.startAt?new Bound(o.startAt.position,o.startAt.inclusive):null;return __PRIVATE_newTarget(o.path,o.collectionGroup,r,o.filters,o.limit,a,l)}}function __PRIVATE_queryWithAddedFilter(o,r){const a=o.filters.concat([r]);return new __PRIVATE_QueryImpl(o.path,o.collectionGroup,o.explicitOrderBy.slice(),a,o.limit,o.limitType,o.startAt,o.endAt)}function __PRIVATE_queryWithLimit(o,r,a){return new __PRIVATE_QueryImpl(o.path,o.collectionGroup,o.explicitOrderBy.slice(),o.filters.slice(),r,a,o.startAt,o.endAt)}function __PRIVATE_queryEquals(o,r){return __PRIVATE_targetEquals(__PRIVATE_queryToTarget(o),__PRIVATE_queryToTarget(r))&&o.limitType===r.limitType}function __PRIVATE_canonifyQuery(o){return`${__PRIVATE_canonifyTarget(__PRIVATE_queryToTarget(o))}|lt:${o.limitType}`}function __PRIVATE_stringifyQuery(o){return`Query(target=${function(a){let l=a.path.canonicalString();return a.collectionGroup!==null&&(l+=" collectionGroup="+a.collectionGroup),a.filters.length>0&&(l+=`, filters: [${a.filters.map(c=>__PRIVATE_stringifyFilter(c)).join(", ")}]`),__PRIVATE_isNullOrUndefined(a.limit)||(l+=", limit: "+a.limit),a.orderBy.length>0&&(l+=`, orderBy: [${a.orderBy.map(c=>function(d){return`${d.field.canonicalString()} (${d.dir})`}(c)).join(", ")}]`),a.startAt&&(l+=", startAt: ",l+=a.startAt.inclusive?"b:":"a:",l+=a.startAt.position.map(c=>canonicalId(c)).join(",")),a.endAt&&(l+=", endAt: ",l+=a.endAt.inclusive?"a:":"b:",l+=a.endAt.position.map(c=>canonicalId(c)).join(",")),`Target(${l})`}(__PRIVATE_queryToTarget(o))}; limitType=${o.limitType})`}function __PRIVATE_queryMatches(o,r){return r.isFoundDocument()&&function(l,c){const u=c.key.path;return l.collectionGroup!==null?c.key.hasCollectionId(l.collectionGroup)&&l.path.isPrefixOf(u):DocumentKey.isDocumentKey(l.path)?l.path.isEqual(u):l.path.isImmediateParentOf(u)}(o,r)&&function(l,c){for(const u of __PRIVATE_queryNormalizedOrderBy(l))if(!u.field.isKeyField()&&c.data.field(u.field)===null)return!1;return!0}(o,r)&&function(l,c){for(const u of l.filters)if(!u.matches(c))return!1;return!0}(o,r)&&function(l,c){return!(l.startAt&&!function(d,f,m){const y=__PRIVATE_boundCompareToDocument(d,f,m);return d.inclusive?y<=0:y<0}(l.startAt,__PRIVATE_queryNormalizedOrderBy(l),c)||l.endAt&&!function(d,f,m){const y=__PRIVATE_boundCompareToDocument(d,f,m);return d.inclusive?y>=0:y>0}(l.endAt,__PRIVATE_queryNormalizedOrderBy(l),c))}(o,r)}function __PRIVATE_queryCollectionGroup(o){return o.collectionGroup||(o.path.length%2==1?o.path.lastSegment():o.path.get(o.path.length-2))}function __PRIVATE_newQueryComparator(o){return(r,a)=>{let l=!1;for(const c of __PRIVATE_queryNormalizedOrderBy(o)){const u=__PRIVATE_compareDocs(c,r,a);if(u!==0)return u;l=l||c.field.isKeyField()}return 0}}function __PRIVATE_compareDocs(o,r,a){const l=o.field.isKeyField()?DocumentKey.comparator(r.key,a.key):function(u,d,f){const m=d.data.field(u),y=f.data.field(u);return m!==null&&y!==null?__PRIVATE_valueCompare(m,y):fail()}(o.field,r,a);switch(o.dir){case"asc":return l;case"desc":return-1*l;default:return fail()}}/**
3257 * @license
3258 * Copyright 2017 Google LLC
3259 *
3260 * Licensed under the Apache License, Version 2.0 (the "License");
3261 * you may not use this file except in compliance with the License.
3262 * You may obtain a copy of the License at
3263 *
3264 *   http://www.apache.org/licenses/LICENSE-2.0
3265 *
3266 * Unless required by applicable law or agreed to in writing, software
3267 * distributed under the License is distributed on an "AS IS" BASIS,
3268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3269 * See the License for the specific language governing permissions and
3270 * limitations under the License.
3271 */class ObjectMap{constructor(r,a){this.mapKeyFn=r,this.equalsFn=a,this.inner={},this.innerSize=0}get(r){const a=this.mapKeyFn(r),l=this.inner[a];if(l!==void 0){for(const[c,u]of l)if(this.equalsFn(c,r))return u}}has(r){return this.get(r)!==void 0}set(r,a){const l=this.mapKeyFn(r),c=this.inner[l];if(c===void 0)return this.inner[l]=[[r,a]],void this.innerSize++;for(let u=0;u<c.length;u++)if(this.equalsFn(c[u][0],r))return void(c[u]=[r,a]);c.push([r,a]),this.innerSize++}delete(r){const a=this.mapKeyFn(r),l=this.inner[a];if(l===void 0)return!1;for(let c=0;c<l.length;c++)if(this.equalsFn(l[c][0],r))return l.length===1?delete this.inner[a]:l.splice(c,1),this.innerSize--,!0;return!1}forEach(r){forEach(this.inner,(a,l)=>{for(const[c,u]of l)r(c,u)})}isEmpty(){return isEmpty(this.inner)}size(){return this.innerSize}}/**
3272 * @license
3273 * Copyright 2017 Google LLC
3274 *
3275 * Licensed under the Apache License, Version 2.0 (the "License");
3276 * you may not use this file except in compliance with the License.
3277 * You may obtain a copy of the License at
3278 *
3279 *   http://www.apache.org/licenses/LICENSE-2.0
3280 *
3281 * Unless required by applicable law or agreed to in writing, software
3282 * distributed under the License is distributed on an "AS IS" BASIS,
3283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3284 * See the License for the specific language governing permissions and
3285 * limitations under the License.
3286 */const oe=new SortedMap(DocumentKey.comparator);function __PRIVATE_mutableDocumentMap(){return oe}const _e=new SortedMap(DocumentKey.comparator);function documentMap(...o){let r=_e;for(const a of o)r=r.insert(a.key,a);return r}function __PRIVATE_convertOverlayedDocumentMapToDocumentMap(o){let r=_e;return o.forEach((a,l)=>r=r.insert(a,l.overlayedDocument)),r}function __PRIVATE_newOverlayMap(){return __PRIVATE_newDocumentKeyMap()}function __PRIVATE_newMutationMap(){return __PRIVATE_newDocumentKeyMap()}function __PRIVATE_newDocumentKeyMap(){return new ObjectMap(o=>o.toString(),(o,r)=>o.isEqual(r))}const ae=new SortedMap(DocumentKey.comparator),ue=new SortedSet(DocumentKey.comparator);function __PRIVATE_documentKeySet(...o){let r=ue;for(const a of o)r=r.add(a);return r}const ce=new SortedSet(__PRIVATE_primitiveComparator);function __PRIVATE_targetIdSet(){return ce}/**
3287 * @license
3288 * Copyright 2020 Google LLC
3289 *
3290 * Licensed under the Apache License, Version 2.0 (the "License");
3291 * you may not use this file except in compliance with the License.
3292 * You may obtain a copy of the License at
3293 *
3294 *   http://www.apache.org/licenses/LICENSE-2.0
3295 *
3296 * Unless required by applicable law or agreed to in writing, software
3297 * distributed under the License is distributed on an "AS IS" BASIS,
3298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3299 * See the License for the specific language governing permissions and
3300 * limitations under the License.
3301 */function __PRIVATE_toDouble(o,r){if(o.useProto3Json){if(isNaN(r))return{doubleValue:"NaN"};if(r===1/0)return{doubleValue:"Infinity"};if(r===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:__PRIVATE_isNegativeZero(r)?"-0":r}}function __PRIVATE_toInteger(o){return{integerValue:""+o}}function toNumber$1(o,r){return isSafeInteger(r)?__PRIVATE_toInteger(r):__PRIVATE_toDouble(o,r)}/**
3302 * @license
3303 * Copyright 2018 Google LLC
3304 *
3305 * Licensed under the Apache License, Version 2.0 (the "License");
3306 * you may not use this file except in compliance with the License.
3307 * You may obtain a copy of the License at
3308 *
3309 *   http://www.apache.org/licenses/LICENSE-2.0
3310 *
3311 * Unless required by applicable law or agreed to in writing, softw
3311are
3312 * distributed under the License is distributed on an "AS IS" BASIS,
3313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3314 * See the License for the specific language governing permissions and
3315 * limitations under the License.
3316 */class TransformOperation{constructor(){this._=void 0}}function __PRIVATE_applyTransformOperationToLocalView(o,r,a){return o instanceof __PRIVATE_ServerTimestampTransform?function(c,u){const d={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:c.seconds,nanos:c.nanoseconds}}}};return u&&__PRIVATE_isServerTimestamp(u)&&(u=__PRIVATE_getPreviousValue(u)),u&&(d.fields.__previous_value__=u),{mapValue:d}}(a,r):o instanceof __PRIVATE_ArrayUnionTransformOperation?__PRIVATE_applyArrayUnionTransformOperation(o,r):o instanceof __PRIVATE_ArrayRemoveTransformOperation?__PRIVATE_applyArrayRemoveTransformOperation(o,r):function(c,u){const d=__PRIVATE_computeTransformOperationBaseValue(c,u),f=asNumber(d)+asNumber(c.Pe);return isInteger(d)&&isInteger(c.Pe)?__PRIVATE_toInteger(f):__PRIVATE_toDouble(c.serializer,f)}(o,r)}function __PRIVATE_applyTransformOperationToRemoteDocument(o,r,a){return o instanceof __PRIVATE_ArrayUnionTransformOperation?__PRIVATE_applyArrayUnionTransformOperation(o,r):o instanceof __PRIVATE_ArrayRemoveTransformOperation?__PRIVATE_applyArrayRemoveTransformOperation(o,r):a}function __PRIVATE_computeTransformOperationBaseValue(o,r){return o instanceof __PRIVATE_NumericIncrementTransformOperation?function(l){return isInteger(l)||function(u){return!!u&&"doubleValue"in u}(l)}(r)?r:{integerValue:0}:null}class __PRIVATE_ServerTimestampTransform extends TransformOperation{}class __PRIVATE_ArrayUnionTransformOperation extends TransformOperation{constructor(r){super(),this.elements=r}}function __PRIVATE_applyArrayUnionTransformOperation(o,r){const a=__PRIVATE_coercedFieldValuesArray(r);for(const l of o.elements)a.some(c=>__PRIVATE_valueEquals(c,l))||a.push(l);return{arrayValue:{values:a}}}class __PRIVATE_ArrayRemoveTransformOperation extends TransformOperation{constructor(r){super(),this.elements=r}}function __PRIVATE_applyArrayRemoveTransformOperation(o,r){let a=__PRIVATE_coercedFieldValuesArray(r);for(const l of o.elements)a=a.filter(c=>!__PRIVATE_valueEquals(c,l));return{arrayValue:{values:a}}}class __PRIVATE_NumericIncrementTransformOperation extends TransformOperation{constructor(r,a){super(),this.serializer=r,this.Pe=a}}function asNumber(o){return __PRIVATE_normalizeNumber(o.integerValue||o.doubleValue)}function __PRIVATE_coercedFieldValuesArray(o){return isArray$1(o)&&o.arrayValue.values?o.arrayValue.values.slice():[]}/**
3317 * @license
3318 * Copyright 2017 Google LLC
3319 *
3320 * Licensed under the Apache License, Version 2.0 (the "License");
3321 * you may not use this file except in compliance with the License.
3322 * You may obtain a copy of the License at
3323 *
3324 *   http://www.apache.org/licenses/LICENSE-2.0
3325 *
3326 * Unless required by applicable law or agreed to in writing, software
3327 * distributed under the License is distributed on an "AS IS" BASIS,
3328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3329 * See the License for the specific language governing permissions and
3330 * limitations under the License.
3331 */class FieldTransform{constructor(r,a){this.field=r,this.transform=a}}function __PRIVATE_fieldTransformEquals(o,r){return o.field.isEqual(r.field)&&function(l,c){return l instanceof __PRIVATE_ArrayUnionTransformOperation&&c instanceof __PRIVATE_ArrayUnionTransformOperation||l instanceof __PRIVATE_ArrayRemoveTransformOperation&&c instanceof __PRIVATE_ArrayRemoveTransformOperation?__PRIVATE_arrayEquals(l.elements,c.elements,__PRIVATE_valueEquals):l instanceof __PRIVATE_NumericIncrementTransformOperation&&c instanceof __PRIVATE_NumericIncrementTransformOperation?__PRIVATE_valueEquals(l.Pe,c.Pe):l instanceof __PRIVATE_ServerTimestampTransform&&c instanceof __PRIVATE_ServerTimestampTransform}(o.transform,r.transform)}class MutationResult{constructor(r,a){this.version=r,this.transformResults=a}}class Precondition{constructor(r,a){this.updateTime=r,this.exists=a}static none(){return new Precondition}static exists(r){return new Precondition(void 0,r)}static updateTime(r){return new Precondition(r)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(r){return this.exists===r.exists&&(this.updateTime?!!r.updateTime&&this.updateTime.isEqual(r.updateTime):!r.updateTime)}}function __PRIVATE_preconditionIsValidForDocument(o,r){return o.updateTime!==void 0?r.isFoundDocument()&&r.version.isEqual(o.updateTime):o.exists===void 0||o.exists===r.isFoundDocument()}class Mutation{}function __PRIVATE_calculateOverlayMutation(o,r){if(!o.hasLocalMutations||r&&r.fields.length===0)return null;if(r===null)return o.isNoDocument()?new __PRIVATE_DeleteMutation(o.key,Precondition.none()):new __PRIVATE_SetMutation(o.key,o.data,Precondition.none());{const a=o.data,l=ObjectValue.empty();let c=new SortedSet(FieldPath$1.comparator);for(let u of r.fields)if(!c.has(u)){let d=a.field(u);d===null&&u.length>1&&(u=u.popLast(),d=a.field(u)),d===null?l.delete(u):l.set(u,d),c=c.add(u)}return new __PRIVATE_PatchMutation(o.key,l,new FieldMask(c.toArray()),Precondition.none())}}function __PRIVATE_mutationApplyToRemoteDocument(o,r,a){o instanceof __PRIVATE_SetMutation?function(c,u,d){const f=c.value.clone(),m=__PRIVATE_serverTransformResults(c.fieldTransforms,u,d.transformResults);f.setAll(m),u.convertToFoundDocument(d.version,f).setHasCommittedMutations()}(o,r,a):o instanceof __PRIVATE_PatchMutation?function(c,u,d){if(!__PRIVATE_preconditionIsValidForDocument(c.prec
3331ondition,u))return void u.convertToUnknownDocument(d.version);const f=__PRIVATE_serverTransformResults(c.fieldTransforms,u,d.transformResults),m=u.data;m.setAll(__PRIVATE_getPatch(c)),m.setAll(f),u.convertToFoundDocument(d.version,m).setHasCommittedMutations()}(o,r,a):function(c,u,d){u.convertToNoDocument(d.version).setHasCommittedMutations()}(0,r,a)}function __PRIVATE_mutationApplyToLocalView(o,r,a,l){return o instanceof __PRIVATE_SetMutation?function(u,d,f,m){if(!__PRIVATE_preconditionIsValidForDocument(u.precondition,d))return f;const y=u.value.clone(),E=__PRIVATE_localTransformResults(u.fieldTransforms,m,d);return y.setAll(E),d.convertToFoundDocument(d.version,y).setHasLocalMutations(),null}(o,r,a,l):o instanceof __PRIVATE_PatchMutation?function(u,d,f,m){if(!__PRIVATE_preconditionIsValidForDocument(u.precondition,d))return f;const y=__PRIVATE_localTransformResults(u.fieldTransforms,m,d),E=d.data;return E.setAll(__PRIVATE_getPatch(u)),E.setAll(y),d.convertToFoundDocument(d.version,E).setHasLocalMutations(),f===null?null:f.unionWith(u.fieldMask.fields).unionWith(u.fieldTransforms.map(A=>A.field))}(o,r,a,l):function(u,d,f){return __PRIVATE_preconditionIsValidForDocument(u.precondition,d)?(d.convertToNoDocument(d.version).setHasLocalMutations(),null):f}(o,r,a)}function __PRIVATE_mutationExtractBaseValue(o,r){let a=null;for(const l of o.fieldTransforms){const c=r.data.field(l.field),u=__PRIVATE_computeTransformOperationBaseValue(l.transform,c||null);u!=null&&(a===null&&(a=ObjectValue.empty()),a.set(l.field,u))}return a||null}function __PRIVATE_mutationEquals(o,r){return o.type===r.type&&!!o.key.isEqual(r.key)&&!!o.precondition.isEqual(r.precondition)&&!!function(l,c){return l===void 0&&c===void 0||!(!l||!c)&&__PRIVATE_arrayEquals(l,c,(u,d)=>__PRIVATE_fieldTransformEquals(u,d))}(o.fieldTransforms,r.fieldTransforms)&&(o.type===0?o.value.isEqual(r.value):o.type!==1||o.data.isEqual(r.data)&&o.fieldMask.isEqual(r.fieldMask))}class __PRIVATE_SetMutation extends Mutation{constructor(r,a,l,c=[]){super(),this.key=r,this.value=a,this.prec
3331ondition=l,this.fieldTransforms=c,this.type=0}getFieldMask(){return null}}class __PRIVATE_PatchMutation extends Mutation{constructor(r,a,l,c,u=[]){super(),this.key=r,this.data=a,this.fieldMask=l,this.precondition=c,this.fieldTransforms=u,this.type=1}getFieldMask(){return this.fieldMask}}function __PRIVATE_getPatch(o){const r=new Map;return o.fieldMask.fields.forEach(a=>{if(!a.isEmpty()){const l=o.data.field(a);r.set(a,l)}}),r}function __PRIVATE_serverTransformResults(o,r,a){const l=new Map;__PRIVATE_hardAssert(o.length===a.length);for(let c=0;c<a.length;c++){const u=o[c],d=u.transform,f=r.data.field(u.field);l.set(u.field,__PRIVATE_applyTransformOperationToRemoteDocument(d,f,a[c]))}return l}function __PRIVATE_localTransformResults(o,r,a){const l=new Map;for(const c of o){const u=c.transform,d=a.data.field(c.field);l.set(c.field,__PRIVATE_applyTransformOperationToLocalView(u,d,r))}return l}class __PRIVATE_DeleteMutation extends Mutation{constructor(r,a){super(),this.key=r,this.precondition=a,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class __PRIVATE_VerifyMutation extends Mutation{constructor(r,a){super(),this.key=r,this.precondition=a,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/**
3332 * @license
3333 * Copyright 2017 Google LLC
3334 *
3335 * Licensed under the Apache License, Version 2.0 (the "License");
3336 * you may not use this file except in compliance with the License.
3337 * You may obtain a copy of the License at
3338 *
3339 *   http://www.apache.org/licenses/LICENSE-2.0
3340 *
3341 * Unless required by applicable law or agreed to in writing, software
3342 * distributed under the License is distributed on an "AS IS" BASIS,
3343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3344 * See the License for the specific language governing permissions and
3345 * limitations under the License.
3346 */class MutationBatch{constructor(r,a,l,c){this.batchId=r,this.localWriteTime=a,this.baseMutations=l,this.mutations=c}applyToRemoteDocument(r,a){const l=a.mutationResults;for(let c=0;c<this.mutations.length;c++){const u=this.mutations[c];u.key.isEqual(r.key)&&__PRIVATE_mutationApplyToRemoteDocument(u,r,l[c])}}applyToLocalView(r,a){for(const l of this.baseMutations)l.key.isEqual(r.key)&&(a=__PRIVATE_mutationApplyToLocalView(l,r,a,this.localWriteTime));for(const l of this.mutations)l.key.isEqual(r.key)&&(a=__PRIVATE_mutationApplyToLocalView(l,r,a,this.localWriteTime));return a}applyToLocalDocumentSet(r,a){const l=__PRIVATE_newMutationMap();return this.mutations.forEach(c=>{const u=r.get(c.key),d=u.overlayedDocument;let f=this.applyToLocalView(d,u.mutatedFields);f=a.has(c.key)?null:f;const m=__PRIVATE_calculateOverlayMutation(d,f);m!==null&&l.set(c.key,m),d.isValidDocument()||d.convertToNoDocument(SnapshotVersion.min())}),l}keys(){return this.mutations.reduce((r,a)=>r.add(a.key),__PRIVATE_documentKeySet())}isEqual(r){return this.batchId===r.batchId&&__PRIVATE_arrayEquals(this.mutations,r.mutations,(a,l)=>__PRIVATE_mutationEquals(a,l))&&__PRIVATE_arrayEquals(this.baseMutations,r.baseMutations,(a,l)=>__PRIVATE_mutationEquals(a,l))}}class MutationBatchResult{constructor(r,a,l,c){this.batch=r,this.commitVersion=a,this.mutationResults=l,this.docVersions=c}static from(r,a,l){__PRIVATE_hardAssert(r.mutations.length===l.length);let c=function(){return ae}();const u=r.mutations;for(let d=0;d<u.length;d++)c=c.insert(u[d].key,l[d].version);return new MutationBatchResult(r,a,l,c)}}/**
3347 * @license
3348 * Copyright 2022 Google LLC
3349 *
3350 * Licensed under the Apache License, Version 2.0 (the "License");
3351 * you may not use this file except in compliance with the License.
3352 * You may obtain a copy of the License at
3353 *
3354 *   http://www.apache.org/licenses/LICENSE-2.0
3355 *
3356 * Unless required by applicable law or agreed to in writing, software
3357 * distributed under the License is distributed on an "AS IS" BASIS,
3358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3359 * See the License for the specific language governing permissions and
3360 * limitations under the License.
3361 */class Overlay{constructor(r,a){this.largestBatchId=r,this.mutation=a}getKey(){return this.mutation.key}isEqual(r){return r!==null&&this.mutation===r.mutation}toString(){return`Overlay{
3362      largestBatchId: ${this.largestBatchId},
3363      mutation: ${this.mutation.toString()}
3364    }`}}/**
3365 * @license
3366 * Copyright 2017 Google LLC
3367 *
3368 * Licensed under the Apache License, Version 2.0 (the "License");
3369 * you may not use this file except in compliance with the License.
3370 * You may obtain a copy of the License at
3371 *
3372 *   http://www.apache.org/licenses/LICENSE-2.0
3373 *
3374 * Unless required by applicable law or agreed to in writing, software
3375 * distributed under the License is distributed on an "AS IS" BASIS,
3376 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3377 * See the License for the specific language governing permissions and
3378 * limitations under the License.
3379 */class ExistenceFilter{constructor(r,a){this.count=r,this.unchangedNames=a}}/**
3380 * @license
3381 * Copyright 2017 Google LLC
3382 *
3383 * Licensed under the Apache License, Version 2.0 (the "License");
3384 * you may not use this file except in compliance with the License.
3385 * You may obtain a copy of the License at
3386 *
3387 *   http://www.apache.org/licenses/LICENSE-2.0
3388 *
3389 * Unless required by applicable law or agreed to in writing, software
3390 * distributed under the License is distributed on an "AS IS" BASIS,
3391 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3392 * See the License for the specific language governing permissions and
3393 * limitations under the License.
3394 */var le,he;function __PRIVATE_isPermanentError(o){switch(o){default:return fail();case D.CANCELLED:case D.UNKNOWN:case D.DEADLINE_EXCEEDED:case D.RESOURCE_EXHAUSTED:case D.INTERNAL:case D.UNAVAILABLE:case D.UNAUTHENTICATED:return!1;case D.INVALID_ARGUMENT:case D.NOT_FOUND:case D.ALREADY_EXISTS:case D.PERMISSION_DENIED:case D.FAILED_PRECONDITION:case D.ABORTED:case D.OUT_OF_RANGE:case D.UNIMPLEMENTED:case D.DATA_LOSS:return!0}}function __PRIVATE_mapCodeFromRpcCode(o){if(o===void 0)return __PRIVATE_logError("GRPC error has no .code"),D.UNKNOWN;switch(o){case le.OK:return D.OK;case le.CANCELLED:return D.CANCELLED;case le.UNKNOWN:return D.UNKNOWN;case le.DEADLINE_EXCEEDED:return D.DEADLINE_EXCEEDED;case le.RESOURCE_EXHAUSTED:return D.RESOURCE_EXHAUSTED;case le.INTERNAL:return D.INTERNAL;case le.UNAVAILABLE:return D.UNAVAILABLE;case le.UNAUTHENTICATED:return D.UNAUTHENTICATED;case le.INVALID_ARGUMENT:return D.INVALID_ARGUMENT;case le.NOT_FOUND:return D.NOT_FOUND;case le.ALREADY_EXISTS:return D.ALREADY_EXISTS;case le.PERMISSION_DENIED:return D.PERMISSION_DENIED;case le.FAILED_PRECONDITION:return D.FAILED_PRECONDITION;case le.ABORTED:return D.ABORTED;case le.OUT_OF_RANGE:return D.OUT_OF_RANGE;case le.UNIMPLEMENTED:return D.UNIMPLEMENTED;case le.DATA_LOSS:return D.DATA_LOSS;default:return fail()}}(he=le||(le={}))[he.OK=0]="OK",he[he.CANCELLED=1]="CANCELLED",he[he.UNKNOWN=2]="UNKNOWN",he[he.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",he[he.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",he[he.NOT_FOUND=5]="NOT_FOUND",he[he.ALREADY_EXISTS=6]="ALREADY_EXISTS",he[he.PERMISSION_DENIED=7]="PERMISSION_DENIED",he[he.UNAUTHENTICATED=16]="UNAUTHENTICATED",he[he.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",he[he.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",he[he.ABORTED=10]="ABORTED",he[he.OUT_OF_RANGE=11]="OUT_OF_RANGE",he[he.UNIMPLEMENTED=12]="UNIMPLEMENTED",he[he.INTERNAL=13]="INTERNAL",he[he.UNAVAILABLE=14]="UNAVAILABLE",he[he.DATA_LOSS=15]="DATA_LOSS";/**
3395 * @license
3396 * Copyright 2023 Google LLC
3397 *
3398 * Licensed under the Apache License, Version 2.0 (the "License");
3399 * you may not use this file except in compliance with the License.
3400 * You may obtain a copy of the License at
3401 *
3402 *   http://www.apache.org/licenses/LICENSE-2.0
3403 *
3404 * Unless required by applicable law or agreed to in writing, software
3405 * distributed under the License is distributed on an "AS IS" BASIS,
3406 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3407 * See the License for the specific language governing permissions and
3408 * limitations under the License.
3409 */function __PRIVATE_newTextEncoder(){return new TextEncoder}/**
3410 * @license
3411 * Copyright 2022 Google LLC
3412 *
3413 * Licensed under the Apache License, Version 2.0 (the "License");
3414 * you may not use this file except in compliance with the License.
3415 * You may obtain a copy of the License at
3416 *
3417 *   http://www.apache.org/licenses/LICENSE-2.0
3418 *
3419 * Unless required by applicable law or agreed to in writing, softw
3419are
3420 * distributed under the License is distributed on an "AS IS" BASIS,
3421 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3422 * See the License for the specific language governing permissions and
3423 * limitations under the License.
3424 */const Ie=new Integer([4294967295,4294967295],0);function __PRIVATE_getMd5HashValue(o){const r=__PRIVATE_newTextEncoder().encode(o),a=new Md5;return a.update(r),new Uint8Array(a.digest())}function __PRIVATE_get64BitUints(o){const r=new DataView(o.buffer),a=r.getUint32(0,!0),l=r.getUint32(4,!0),c=r.getUint32(8,!0),u=r.getUint32(12,!0);return[new Integer([a,l],0),new Integer([c,u],0)]}class BloomFilter{constructor(r,a,l){if(this.bitmap=r,this.padding=a,this.hashCount=l,a<0||a>=8)throw new __PRIVATE_BloomFilterError(`Invalid padding: ${a}`);if(l<0)throw new __PRIVATE_BloomFilterError(`Invalid hash count: ${l}`);if(r.length>0&&this.hashCount===0)throw new __PRIVATE_BloomFilterError(`Invalid hash count: ${l}`);if(r.length===0&&a!==0)throw new __PRIVATE_BloomFilterError(`Invalid padding when bitmap length is 0: ${a}`);this.Ie=8*r.length-a,this.Te=Integer.fromNumber(this.Ie)}Ee(r,a,l){let c=r.add(a.multiply(Integer.fromNumber(l)));return c.compare(Ie)===1&&(c=new Integer([c.getBits(0),c.getBits(1)],0)),c.modulo(this.Te).toNumber()}de(r){return(this.bitmap[Math.floor(r/8)]&1<<r%8)!=0}mightContain(r){if(this.Ie===0)return!1;const a=__PRIVATE_getMd5HashValue(r),[l,c]=__PRIVATE_get64BitUints(a);for(let u=0;u<this.hashCount;u++){const d=this.Ee(l,c,u);if(!this.de(d))return!1}return!0}static create(r,a,l){const c=r%8==0?0:8-r%8,u=new Uint8Array(Math.ceil(r/8)),d=new BloomFilter(u,c,a);return l.forEach(f=>d.insert(f)),d}insert(r){if(this.Ie===0)return;const a=__PRIVATE_getMd5HashValue(r),[l,c]=__PRIVATE_get64BitUints(a);for(let u=0;u<this.hashCount;u++){const d=this.Ee(l,c,u);this.Ae(d)}}Ae(r){const a=Math.floor(r/8),l=r%8;this.bitmap[a]|=1<<l}}class __PRIVATE_BloomFilterError extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
3425 * @license
3426 * Copyright 2017 Google LLC
3427 *
3428 * Licensed under the Apache License, Version 2.0 (the "License");
3429 * you may not use this file except in compliance with the License.
3430 * You may obtain a copy of the License at
3431 *
3432 *   http://www.apache.org/licenses/LICENSE-2.0
3433 *
3434 * Unless required by applicable law or agreed to in writing, software
3435 * distributed under the License is distributed on an "AS IS" BASIS,
3436 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3437 * See the License for the specific language governing permissions and
3438 * limitations under the License.
3439 */class RemoteEvent{constructor(r,a,l,c,u){this.snapshotVersion=r,this.targetChanges=a,this.targetMismatches=l,this.documentUpdates=c,this.resolvedLimboDocuments=u}static createSynthesizedRemoteEventForCurrentChange(r,a,l){const c=new Map;return c.set(r,TargetChange.createSynthesizedTargetChangeForCurrentChange(r,a,l)),new RemoteEvent(SnapshotVersion.min(),c,new SortedMap(__PRIVATE_primitiveComparator),__PRIVATE_mutableDocumentMap(),__PRIVATE_documentKeySet())}}class TargetChange{constructor(r,a,l,c,u){this.resumeToken=r,this.current=a,this.addedDocuments=l,this.modifiedDocuments=c,this.removedDocuments=u}static createSynthesizedTargetChangeForCurrentChange(r,a,l){return new TargetChange(l,a,__PRIVATE_documentKeySet(),__PRIVATE_documentKeySet(),__PRIVATE_documentKeySet())}}/**
3440 * @license
3441 * Copyright 2017 Google LLC
3442 *
3443 * Licensed under the Apache License, Version 2.0 (the "License");
3444 * you may not use this file except in compliance with the License.
3445 * You may obtain a copy of the License at
3446 *
3447 *   http://www.apache.org/licenses/LICENSE-2.0
3448 *
3449 * Unless required by applicable law or agreed to in writing, software
3450 * distributed under the License is distributed on an "AS IS" BASIS,
3451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3452 * See the License for the specific language governing permissions and
3453 * limitations under the License.
3454 */class __PRIVATE_DocumentWatchChange{constructor(r,a,l,c){this.Re=r,this.removedTargetIds=a,this.key=l,this.Ve=c}}class __PRIVATE_ExistenceFilterChange{constructor(r,a){this.targetId=r,this.me=a}}class __PRIVATE_WatchTargetChange{constructor(r,a,l=ByteString.EMPTY_BYTE_STRING,c=null){this.state=r,this.targetIds=a,this.resumeToken=l,this.cause=c}}class __PRIVATE_TargetState{constructor(){this.fe=0,this.ge=__PRIVATE_snapshotChangesMap(),this.pe=ByteString.EMPTY_BYTE_STRING,this.ye=!1,this.we=!0}get current(){return this.ye}get resumeToken(){return this.pe}get Se(){return this.fe!==0}get be(){return this.we}De(r){r.approximateByteSize()>0&&(this.we=!0,this.pe=r)}ve(){let r=__PRIVATE_documentKeySet(),a=__PRIVATE_documentKeySet(),l=__PRIVATE_documentKeySet();return this.ge.forEach((c,u)=>{switch(u){case 0:r=r.add(c);break;case 2:a=a.add(c);break;case 1:l=l.add(c);break;default:fail()}}),new TargetChange(this.pe,this.ye,r,a,l)}Ce(){this.we=!1,this.ge=__PRIVATE_snapshotChangesMap()}Fe(r,a){this.we=!0,this.ge=this.ge.insert(r,a)}Me(r){this.we=!0,this.ge=this.ge.remove(r)}xe(){this.fe+=1}Oe(){this.fe-=1,__PRIVATE_hardAssert(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class __PRIVATE_WatchChangeAggregator{constructor(r){this.Le=r,this.Be=new Map,this.ke=__PRIVATE_mutableDocumentMap(),this.qe=__PRIVATE_documentTargetMap(),this.Qe=new SortedMap(__PRIVATE_primitiveComparator)}Ke(r){for(const a of r.Re)r.Ve&&r.Ve.isFoundDocument()?this.$e(a,r.Ve):this.Ue(a,r.ke
3454y,r.Ve);for(const a of r.removedTargetIds)this.Ue(a,r.key,r.Ve)}We(r){this.forEachTarget(r,a=>{const l=this.Ge(a);switch(r.state){case 0:this.ze(a)&&l.De(r.resumeToken);break;case 1:l.Oe(),l.Se||l.Ce(),l.De(r.resumeToken);break;case 2:l.Oe(),l.Se||this.removeTarget(a);break;case 3:this.ze(a)&&(l.Ne(),l.De(r.resumeToken));break;case 4:this.ze(a)&&(this.je(a),l.De(r.resumeToken));break;default:fail()}})}forEachTarget(r,a){r.targetIds.length>0?r.targetIds.forEach(a):this.Be.forEach((l,c)=>{this.ze(c)&&a(c)})}He(r){const a=r.targetId,l=r.me.count,c=this.Je(a);if(c){const u=c.target;if(__PRIVATE_targetIsDocumentTarget(u))if(l===0){const d=new DocumentKey(u.path);this.Ue(a,d,MutableDocument.newNoDocument(d,SnapshotVersion.min()))}else __PRIVATE_hardAssert(l===1);else{const d=this.Ye(a);if(d!==l){const f=this.Ze(r),m=f?this.Xe(f,r,d):1;if(m!==0){this.je(a);const y=m===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Qe=this.Qe.insert(a,y)}}}}}Ze(r){const a=r.me.unchangedNames;if(!a||!a.bits)return null;const{bits:{bitmap:l="",padding:c=0},hashCount:u=0}=a;let d,f;try{d=__PRIVATE_normalizeByteString(l).toUint8Array()}catch(m){if(m instanceof __PRIVATE_Base64DecodeError)return __PRIVATE_logWarn("Decoding the base64 bloom filter in existence filter failed ("+m.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw m}try{f=new BloomFilter(d,c,u)}catch(m){return __PRIVATE_logWarn(m instanceof __PRIVATE_BloomFilterError?"BloomFilter error: ":"Applying bloom filter failed: ",m),null}return f.Ie===0?null:f}Xe(r,a,l){return a.me.count===l-this.nt(r,a.targetId)?0:2}nt(r,a){const l=this.Le.getRemoteKeysForTarget(a);let c=0;return l.forEach(u=>{const d=this.Le.tt(),f=`projects/${d.projectId}/databases/${d.database}/documents/${u.path.canonicalString()}`;r.mightContain(f)||(this.Ue(a,u,null),c++)}),c}rt(r){const a=new Map;this.Be.forEach((u,d)=>{const f=this.Je(d);if(f){if(u.current&&__PRIVATE_targetIsDocumentTarget(f.target)){const m=new DocumentKey(f.target.path);this.ke.get(m)!==null||this.it(d,m)||this.Ue(d,m,MutableDocument.newNoDocument(m,r))}u.be&&(a.set(d,u.ve()),u.Ce())}});let l=__PRIVATE_documentKeySet();this.qe.forEach((u,d)=>{let f=!0;d.forEachWhile(m=>{const y=this.Je(m);return!y||y.purpose==="TargetPurposeLimboResolution"||(f=!1,!1)}),f&&(l=l.add(u))}),this.ke.forEach((u,d)=>d.setReadTime(r));const c=new RemoteEvent(r,a,this.Qe,this.ke,l);return this.ke=__PRIVATE_mutableDocumentMap(),this.qe=__PRIVATE_documentTargetMap(),this.Qe=new SortedMap(__PRIVATE_primitiveComparator),c}$e(r,a){if(!this.ze(r))return;const l=this.it(r,a.key)?2:0;this.Ge(r).Fe(a.key,l),this.ke=this.ke.insert(a.key,a),this.qe=this.qe.insert(a.key,this.st(a.key).add(r))}Ue(r,a,l){if(!this.ze(r))return;const c=this.Ge(r);this.it(r,a)?c.Fe(a,1):c.Me(a),this.qe=this.qe.insert(a,this.st(a).delete(r)),l&&(this.ke=this.ke.insert(a,l))}removeTarget(r){this.Be.delete(r)}Ye(r){const a=this.Ge(r).ve();return this.Le.getRemoteKeysForTarget(r).size+a.addedDocuments.size-a.removedDocuments.size}xe(r){this.Ge(r).xe()}Ge(r){let a=this.Be.get(r);return a||(a=new __PRIVATE_TargetState,this.Be.set(r,a)),a}st(r){let a=this.qe.get(r);return a||(a=new SortedSet(__PRIVATE_primitiveComparator),this.qe=this.qe.insert(r,a)),a}ze(r){const a=this.Je(r)!==null;return a||__PRIVATE_logDebug("WatchChangeAggregator","Detected inactive target",r),a}Je(r){const a=this.Be.get(r);return a&&a.Se?null:this.Le.ot(r)}je(r){this.Be.set(r,new __PRIVATE_TargetState),this.Le.getRemoteKeysForTarget(r).forEach(a=>{this.Ue(r,a,null)})}it(r,a){return this.Le.getRemoteKeysForTarget(r).has(a)}}function __PRIVATE_documentTargetMap(){return new SortedMap(DocumentKey.comparator)}function __PRIVATE_snapshotChangesMap(){return new SortedMap(DocumentKey.comparator)}const Te={asc:"ASCENDING",desc:"DESCENDING"},Ee={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},de={and:"AND",or:"OR"};class JsonProtoSerializer{constructor(r,a){this.databaseId=r,this.useProto3Json=a}}function __PRIVATE_toInt32Proto(o,r){return o.useProto3Json||__PRIVATE_isNullOrUndefined(r)?r:{value:r}}function toTimestamp(o,r){return o.useProto3Json?`${new Date(1e3*r.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+r.nanoseconds).slice(-9)}Z`:{seconds:""+r.seconds,nanos:r.nanoseconds}}function __PRIVATE_toBytes(o,r){return o.useProto3Json?r.toBase64():r.toUint8Array()}function __PRIVATE_toVersion(o,r){return toTimestamp(o,r.toTimestamp())}function __PRIVATE_fromVersion(o){return __PRIVATE_hardAssert(!!o),SnapshotVersion.fromTimestamp(function(a){const l=__PRIVATE_normalizeTimestamp(a);return new Timestamp(l.seconds,l.nanos)}(o))}function __PRIVATE_toResourceName(o,r){return __PRIVATE_toResourcePath(o,r).canonicalString()}function __PRIVATE_toResourcePath(o,r){const a=function(c){return new ResourcePath(["projects",c.projectId,"databases",c.database])}(o).child("documents");return r===void 0?a:a.child(r)}function __PRIVATE_fromResourceName(o){const r=ResourcePath.fromString(o);return __PRIVATE_hardAssert(__PRIVATE_isValidResourceName(r)),r}function __PRIVATE_toName(o,r){return __PRIVATE_toResourceName(o.databaseId,r.path)}function fromName(o,r){const a=__PRIVATE_fromResourceName(r);if(a.get(1)!==o.databaseId.projectId)throw new FirestoreError(D.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+a.get(1)+" vs "+o.databaseId.projectId);if(a.get(3)!==o.databaseId.database)throw new FirestoreError(D.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+a.get(3)+" vs "+o.databaseId.database);return new DocumentKey(__PRIVATE_extractLocalPathFromResourceName(a))}function __PRIVATE_toQueryPath(o,r){return __PRIVATE_toResourceName(o.databaseId,r)}function __PRIVATE_fromQueryPath(o){const r=__PRIVATE_fromResourceName(o);return r.length===4?ResourcePath.emptyPath():__PRIVATE_extractLocalPathFromResourceName(r)}function __PRIVATE_getEncodedDatabaseId(o){return new ResourcePath(["projects",o.databaseId.projectId,"databases",o.databaseId.database]).canonicalString()}function __PRIVATE_extractLocalPathFromResourceName(o){return __PRIVATE_hardAssert(o.length>4&&o.get(4)==="documents"),o.popFirst(5)}function __PRIVATE_toMutationDocument(o,r,a){return{name:__PRIVATE_toName(o,r),fields:a.value.mapValue.fields}}function __PRIVATE_fromWatchChange(o,r){let a;if("targetChange"in r){r.targetChange;const l=function(y){return y==="NO_CHANGE"?0:y==="ADD"?1:y==="REMOVE"?2:y==="CURRENT"?3:y==="RESET"?4:fail()}(r.targetChange.targetChangeType||"NO_CHANGE"),c=r.targetChange.targetIds||[],u=function(y,E){return y.useProto3Json?(__PRIVATE_hardAssert(E===void 0||typeof E=="string"),ByteString.fromBase64String(E||"")):(__PRIVATE_hardAssert(E===void 0||E instanceof Buffer||E instanceof Uint8Array),ByteString.fromUint8Array(E||new Uint8Array))}(o,r.targetChange.resumeToken),d=r.targetChange.cause,f=d&&function(y){const E=y.code===void 0?D.UNKNOWN:__PRIVATE_mapCodeFromRpcCode(y.code);return new FirestoreError(E,y.message||"")}(d);a=new __PRIVATE_WatchTargetChange(l,c,u,f||null)}else if("documentChange"in r){r.documentChange;const l=r.documentChange;l.document,l.document.name,l.document.updateTime;const c=fromName(o,l.document.name),u=__PRIVATE_fromVersion(l.document.updateTime),d=l.document.createTime?__PRIVATE_fromVersion(l.document.createTime):SnapshotVersion.min(),f=new ObjectValue({mapValue:{fields:l.document.fields}}
3454),m=MutableDocument.newFoundDocument(c,u,d,f),y=l.targetIds||[],E=l.removedTargetIds||[];a=new __PRIVATE_DocumentWatchChange(y,E,m.key,m)}else if("documentDelete"in r){r.documentDelete;const l=r.documentDelete;l.document;const c=fromName(o,l.document),u=l.readTime?__PRIVATE_fromVersion(l.readTime):SnapshotVersion.min(),d=MutableDocument.newNoDocument(c,u),f=l.removedTargetIds||[];a=new __PRIVATE_DocumentWatchChange([],f,d.key,d)}else if("documentRemove"in r){r.documentRemove;const l=r.documentRemove;l.document;const c=fromName(o,l.document),u=l.removedTargetIds||[];a=new __PRIVATE_DocumentWatchChange([],u,c,null)}else{if(!("filter"in r))return fail();{r.filter;const l=r.filter;l.targetId;const{count:c=0,unchangedNames:u}=l,d=new ExistenceFilter(c,u),f=l.targetId;a=new __PRIVATE_ExistenceFilterChange(f,d)}}return a}function toMutation(o,r){let a;if(r instanceof __PRIVATE_SetMutation)a={update:__PRIVATE_toMutationDocument(o,r.key,r.value)};else if(r instanceof __PRIVATE_DeleteMutation)a={delete:__PRIVATE_toName(o,r.key)};else if(r instanceof __PRIVATE_PatchMutation)a={update:__PRIVATE_toMutationDocument(o,r.key,r.data),updateMask:__PRIVATE_toDocumentMask(r.fieldMask)};else{if(!(r instanceof __PRIVATE_VerifyMutation))return fail();a={verify:__PRIVATE_toName(o,r.key)}}return r.fieldTransforms.length>0&&(a.updateTransforms=r.fieldTransforms.map(l=>function(u,d){const f=d.transform;if(f instanceof __PRIVATE_ServerTimestampTransform)return{fieldPath:d.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(f instanceof __PRIVATE_ArrayUnionTransformOperation)return{fieldPath:d.field.canonicalString(),appendMissingElements:{values:f.elements}};if(f instanceof __PRIVATE_ArrayRemoveTransformOperation)return{fieldPath:d.field.canonicalString(),removeAllFromArray:{values:f.elements}};if(f instanceof __PRIVATE_NumericIncrementTransformOperation)return{fieldPath:d.field.canonicalString(),increment:f.Pe};throw fail()}(0,l))),r.precondition.isNone||(a.currentDocument=function(c,u){return u.updateTime!==void 0?{updateTime:__PRIVATE_toVersion(c,u.updateTime)}:u.exists!==void 0?{exists:u.exists}:fail()}(o,r.precondition)),a}function __PRIVATE_fromWriteResults(o,r){return o&&o.length>0?(__PRIVATE_hardAssert(r!==void 0),o.map(a=>function(c,u){let d=c.updateTime?__PRIVATE_fromVersion(c.updateTime):__PRIVATE_fromVersion(u);return d.isEqual(SnapshotVersion.min())&&(d=__PRIVATE_fromVersion(u)),new MutationResult(d,c.transformResults||[])}(a,r))):[]}function __PRIVATE_toDocumentsTarget(o,r){return{documents:[__PRIVATE_toQueryPath(o,r.path)]}}function __PRIVATE_toQueryTarget(o,r){const a={structuredQuery:{}},l=r.path;let c;r.collectionGroup!==null?(c=l,a.structuredQuery.from=[{collectionId:r.collectionGroup,allDescendants:!0}]):(c=l.popLast(),a.structuredQuery.from=[{collectionId:l.lastSegment()}]),a.parent=__PRIVATE_toQueryPath(o,c);const u=function(y){if(y.length!==0)return __PRIVATE_toFilter(CompositeFilter.create(y,"and"))}(r.filters);u&&(a.structuredQuery.where=u);const d=function(y){if(y.length!==0)return y.map(E=>function(P){return{field:__PRIVATE_toFieldPathReference(P.field),direction:__PRIVATE_toDirection(P.dir)}}(E))}(r.orderBy);d&&(a.structuredQuery.orderBy=d);const f=__PRIVATE_toInt32Proto(o,r.limit);return f!==null&&(a.structuredQuery.limit=f),r.startAt&&(a.structuredQuery.startAt=function(y){return{before:y.inclusive,values:y.position}}(r.startAt)),r.endAt&&(a.structuredQuery.endAt=function(y){return{before:!y.inclusive,values:y.position}}(r.endAt)),{_t:a,parent:c}}function __PRIVATE_convertQueryTargetToQuery(o){let r=__PRIVATE_fromQueryPath(o.parent);const a=o.structuredQuery,l=a.from?a.from.length:0;let c=null;if(l>0){__PRIVATE_hardAssert(l===1);const E=a.from[0];E.allDescendants?c=E.collectionId:r=r.child(E.collectionId)}let u=[];a.where&&(u=function(A){const P=__PRIVATE_fromFilter(A);return P instanceof CompositeFilter&&__PRIVATE_compositeFilterIsFlatConjunction(P)?P.getFilters():[P]}(a.where));let d=[];a.orderBy&&(d=function(A){return A.map(P=>function(x){return new OrderBy(__PRIVATE_fromFieldPathReference(x.field),function($){switch($){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(x.direction))}(P))}(a.orderBy));let f=null;a.limit&&(f=function(A){let P;return P=typeof A=="object"?A.value:A,__PRIVATE_isNullOrUndefined(P)?null:P}(a.limit));let m=null;a.startAt&&(m=function(A){const P=!!A.before,R=A.values||[];return new Bound(R,P)}(a.startAt));let y=null;return a.endAt&&(y=function(A){const P=!A.before,R=A.values||[];return new Bound(R,P)}(a.endAt)),__PRIVATE_newQuery(r,c,d,u,f,"F",m,y)}function __PRIVATE_toListenRequestLabels(o,r){const a=function(c){switch(c){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return fail()}}(r.purpose);return a==null?null:{"goog-listen-tags":a}}
3454function __PRIVATE_fromFilter(o){return o.unaryFilter!==void 0?function(a){switch(a.unaryFilter.op){case"IS_NAN":const l=__PRIVATE_fromFieldPathReference(a.unaryFilter.field);return FieldFilter.create(l,"==",{doubleValue:NaN});case"IS_NULL":const c=__PRIVATE_fromFieldPathReference(a.unaryFilter.field);return FieldFilter.create(c,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const u=__PRIVATE_fromFieldPathReference(a.unaryFilter.field);return FieldFilter.create(u,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const d=__PRIVATE_fromFieldPathReference(a.unaryFilter.field);return FieldFilter.create(d,"!=",{nullValue:"NULL_VALUE"});default:return fail()}}(o):o.fieldFilter!==void 0?function(a){return FieldFilter.create(__PRIVATE_fromFieldPathReference(a.fieldFilter.field),function(c){switch(c){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return fail()}}(a.fieldFilter.op),a.fieldFilter.value)}(o):o.compositeFilter!==void 0?function(a){return CompositeFilter.create(a.compositeFilter.filters.map(l=>__PRIVATE_fromFilter(l)),function(c){switch(c){case"AND":return"and";case"OR":return"or";default:return fail()}}(a.compositeFilter.op))}(o):fail()}function __PRIVATE_toDirection(o){return Te[o]}function __PRIVATE_toOperatorName(o){return Ee[o]}function __PRIVATE_toCompositeOperatorName(o){return de[o]}function __PRIVATE_toFieldPathReference(o){return{fieldPath:o.canonicalString()}}function __PRIVATE_fromFieldPathReference(o){return FieldPath$1.fromServerFormat(o.fieldPath)}function __PRIVATE_toFilter(o){return o instanceof FieldFilter?function(a){if(a.op==="=="){if(__PRIVATE_isNanValue(a.value))return{unaryFilter:{field:__PRIVATE_toFieldPathReference(a.field),op:"IS_NAN"}};if(__PRIVATE_isNullValue(a.value))return{unaryFilter:{field:__PRIVATE_toFieldPathReference(a.field),op:"IS_NULL"}}}else if(a.op==="!="){if(__PRIVATE_isNanValue(a.value))return{unaryFilter:{field:__PRIVATE_toFieldPathReference(a.field),op:"IS_NOT_NAN"}};if(__PRIVATE_isNullValue(a.value))return{unaryFilter:{field:__PRIVATE_toFieldPathReference(a.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:__PRIVATE_toFieldPathReference(a.field),op:__PRIVATE_toOperatorName(a.op),value:a.value}}}(o):o instanceof CompositeFilter?function(a){const l=a.getFilters().map(c=>__PRIVATE_toFilter(c));return l.length===1?l[0]:{compositeFilter:{op:__PRIVATE_toCompositeOperatorName(a.op),filters:l}}}(o):fail()}function __PRIVATE_toDocumentMask(o){const r=[];return o.fields.forEach(a=>r.push(a.canonicalString())),{fieldPaths:r}}function __PRIVATE_isValidResourceName(o){return o.length>=4&&o.get(0)==="projects"&&o.get(2)==="databases"}/**
3455 * @license
3456 * Copyright 2017 Google LLC
3457 *
3458 * Licensed under the Apache License, Version 2.0 (the "License");
3459 * you may not use this file except in compliance with the License.
3460 * You may obtain a copy of the License at
3461 *
3462 *   http://www.apache.org/licenses/LICENSE-2.0
3463 *
3464 * Unless required by applicable law or agreed to in writing, software
3465 * distributed under the License is distributed on an "AS IS" BASIS,
3466 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3467 * See the License for the specific language governing permissions and
3468 * limitations under the License.
3469 */class TargetData{constructor(r,a,l,c,u=SnapshotVersion.min(),d=SnapshotVersion.min(),f=ByteString.EMPTY_BYTE_STRING,m=null){this.target=r,this.targetId=a,this.purpose=l,this.sequenceNumber=c,this.snapshotVersion=u,this.lastLimboFreeSnapshotVersion=d,this.resumeToken=f,this.expectedCount=m}withSequenceNumber(r){return new TargetData(this.target,this.targetId,this.purpose,r,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(r,a){return new TargetData(this.target,this.targetId,this.purpose,this.sequenceNumber,a,this.lastLimboFreeSnapshotVersion,r,null)}withExpectedCount(r){return new TargetData(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,r)}withLastLimboFreeSnapshotVersion(r){return new TargetData(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,r,this.resumeToken,this.expectedCount)}}/**
3470 * @license
3471 * Copyright 2017 Google LLC
3472 *
3473 * Licensed under the Apache License, Version 2.0 (the "License");
3474 * you may not use this file except in compliance with the License.
3475 * You may obtain a copy of the License at
3476 *
3477 *   http://www.apache.org/licenses/LICENSE-2.0
3478 *
3479 * Unless required by applicable law or agreed to in writing, software
3480 * distributed under the License is distributed on an "AS IS" BASIS,
3481 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3482 * See the License for the specific language governing permissions and
3483 * limitations under the License.
3484 */class __PRIVATE_LocalSerializer{constructor(r){this.ct=r}}function __PRIVATE_fromBundledQuery(o){const r=__PRIVATE_convertQueryTargetToQuery({parent:o.parent,structuredQuery:o.structuredQuery});return o.limitType==="LAST"?__PRIVATE_queryWithLimit(r,r.limit,"L"):r}/**
3485 * @license
3486 * Copyright 2019 Google LLC
3487 *
3488 * Licensed under the Apache License, Version 2.0 (the "License");
3489 * you may not use this file except in compliance with the License.
3490 * You may obtain a copy of the License at
3491 *
3492 *   http://www.apache.org/licenses/LICENSE-2.0
3493 *
3494 * Unless required by applicable law or agreed to in writing, software
3495 * distributed under the License is distributed on an "AS IS" BASIS,
3496 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3497 * See the License for the specific language governing permissions and
3498 * limitations under the License.
3499 */class __PRIVATE_MemoryIndexManager{constructor(){this.un=new __PRIVATE_MemoryCollectionParentIndex}addToCollectionParentIndex(r,a){return this.un.add(a),PersistencePromise.resolve()}getCollectionParents(r,a){return PersistencePromise.resolve(this.un.getEntries(a))}addFieldIndex(r,a){return PersistencePromise.resolve()}deleteFieldIndex(r,a){return PersistencePromise.resolve()}deleteAllFieldIndexes(r){return PersistencePromise.resolve()}createTargetIndexes(r,a){return PersistencePromise.resolve()}getDocumentsMatchingTarget(r,a){return PersistencePromise.resolve(null)}getIndexType(r,a){return PersistencePromise.resolve(0)}getFieldIndexes(r,a){return PersistencePromise.resolve([])}getNextCollectionGroupToUpdate(r){return PersistencePromise.resolve(null)}getMinOffset(r,a){return PersistencePromise.resolve(IndexOffset.min())}getMinOffsetFromCollectionGroup(r,a){return PersistencePromise.resolve(IndexOffset.min())}updateCollectionGroup(r,a,l){return PersistencePromise.resolve()}updateIndexEntries(r,a){return PersistencePromise.resolve()}}class __PRIVATE_MemoryCollectionParentIndex{constructor(){this.index={}}add(r){const a=r.lastSegment(),l=r.popLast(),c=this.index[a]||new SortedSet(ResourcePath.comparator),u=!c.has(l);return this.index[a]=c.add(l),u}has(r){const a=r.lastSegment(),l=r.popLast(),c=this.index[a];return c&&c.has(l)}getEntries(r){return(this.index[r]||new SortedSet(ResourcePath.comparator)).toArray()}}/**
3500 * @license
3501 * Copyright 2017 Google LLC
3502 *
3503 * Licensed under the Apache License, Version 2.0 (the "License");
3504 * you may not use this file except in compliance with the License.
3505 * You may obtain a copy of the License at
3506 *
3507 *   http://www.apache.org/licenses/LICENSE-2.0
3508 *
3509 * Unless required by applicable law or agreed to in writing, software
3510 * distributed under the License is distributed on an "AS IS" BASIS,
3511 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3512 * See the License for the specific language governing permissions and
3513 * limitations under the License.
3514 */class __PRIVATE_TargetIdGenerator{constructor(r){this.Ln=r}next(){return this.Ln+=2,this.Ln}static Bn(){return new __PRIVATE_TargetIdGenerator(0)}static kn(){return new __PRIVATE_TargetIdGenerator(-1)}}/**
3515 * @license
3516 * Copyright 2017 Google LLC
3517 *
3518 * Licensed under the Apache License, Version 2.0 (the "License");
3519 * you may not use this file except in compliance with the License.
3520 * You may obtain a copy of the License at
3521 *
3522 *   http://www.apache.org/licenses/LICENSE-2.0
3523 *
3524 * Unless required by applicable law or agreed to in writing, software
3525 * distributed under the License is distributed on an "AS IS" BASIS,
3526 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3527 * See the License for the specific language governing permissions and
3528 * limitations under the License.
3529 */class RemoteDocumentChangeBuffer{constructor(){this.changes=new ObjectMap(r=>r.toString(),(r,a)=>r.isEqual(a)),this.changesApplied=!1}addEntry(r){this.assertNotApplied(),this.changes.set(r.key,r)}removeEntry(r,a){this.assertNotApplied(),this.changes.set(r,MutableDocument.newInvalidDocument(r).setReadTime(a))}getEntry(r,a){this.assertNotApplied();const l=this.changes.get(a);return l!==void 0?PersistencePromise.resolve(l):this.getFromCache(r,a)}getEntries(r,a){return this.getAllFromCache(r,a)}apply(r){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(r)}
vendor: 4,261 bytes, lines 3529-3574
3529assertNotApplied(){}}/**
3530 * @license
3531 * Copyright 2017 Google LLC
3532 *
3533 * Licensed under the Apache License, Version 2.0 (the "License");
3534 * you may not use this file except in compliance with the License.
3535 * You may obtain a copy of the License at
3536 *
3537 *   http://www.apache.org/licenses/LICENSE-2.0
3538 *
3539 * Unless required by applicable law or agreed to in writing, software
3540 * distributed under the License is distributed on an "AS IS" BASIS,
3541 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3542 * See the License for the specific language governing permissions and
3543 * limitations under the License.
3544 *//**
3545 * @license
3546 * Copyright 2022 Google LLC
3547 *
3548 * Licensed under the Apache License, Version 2.0 (the "License");
3549 * you may not use this file except in compliance with the License.
3550 * You may obtain a copy of the License at
3551 *
3552 *   http://www.apache.org/licenses/LICENSE-2.0
3553 *
3554 * Unless required by applicable law or agreed to in writing, software
3555 * distributed under the License is distributed on an "AS IS" BASIS,
3556 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3557 * See the License for the specific language governing permissions and
3558 * limitations under the License.
3559 */class OverlayedDocument{constructor(r,a){this.overlayedDocument=r,this.mutatedFields=a}}/**
3560 * @license
3561 * Copyright 2017 Google LLC
3562 *
3563 * Licensed under the Apache License, Version 2.0 (the "License");
3564 * you may not use this file except in compliance with the License.
3565 * You may obtain a copy of the License at
3566 *
3567 *   http://www.apache.org/licenses/LICENSE-2.0
3568 *
3569 * Unless required by applicable law or agreed to in writing, software
3570 * distributed under the License is distributed on an "AS IS" BASIS,
3571 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3572 * See the License for the specific language governing permissions and
3573 * limitations under the License.
3574 */class LocalDocumentsView{constructor(r,a,l,c){this.remoteDocumentCache=r,this.mutationQueue=a,this.documentOverlayCache=l,this.indexManager=c}getDocument(r,a){let l=null;return this.documentOverlayCache.getOverlay(r,a).next(c=>(l=c,this.remoteDocumentCache.getEntry(r,a))).next(c=>(l!==null&&__PRIVATE_mutationApplyToLocalView(l.mutation,c,FieldMask.empty(),Timestamp.now()),c))}getDocuments(r,a){return this.remoteDocumentCache.getEntries(r,a).next(l=>this.getLocalViewOfDocuments(r,l,__PRIVATE_documentKeySet()).next(()=>l))}getLocalViewOfDocuments(r,a,l=__PRIVATE_documentKeySet()){const c=__PRIVATE_newOverlayMap();return this.populateOverlays(r,c,a).next(()=>this.computeViews(r,a,c,l).next(u=>{let d=documentMap();return u.forEach((f,m)=>{d=d.insert(f,m.overlayedDocument)}),d}))}getOverlayedDocuments(r,a){const l=__PRIVATE_newOverlayMap();return this.populateOverlays(r,l,a).next(()=>this.computeViews(r,a,l,__PRIVATE_documentKeySet()))}populateOverlays(r,a,l){const c=[];return l.forEach(u=>{a.has(u)||c.push(u)}),this.documentOverlayCache.getOverlays(r,c).next(u=>{u.forEach((d,f)=>{a.set(d,f)})})}computeViews(r,a,l,c){let u=__PRIVATE_mutableDocumentMap();const d=__PRIVATE_newDocumentKeyMap(),f=function(){return __PRIVATE_newDocumentKeyMap()}();return a.forEach((m,y)=>{const E=l.get(y.key);c.has(y.key)&&(E===void 0||E.mutation instanceof __PRIVATE_PatchMutation)?u=u.insert(y.key,y):E!==void 0?(d.set(y.key,E.mutation.getFieldMask()),__PRIVATE_mutationApplyToLocalView(E.mutation,y,E.mutation.getFieldMask(),Timestamp.now())):d.set(y.key,FieldMask.empty())}),this.recalculateAndSaveOverlays(r,u).next(m=>(m.forEach((y,E)=>d.set(y,E)),a.forEach((y,E)=>{var A;return f.set(y,new OverlayedDocument(E,(A=d.get(y))!==null&&A!==void 0?A:null))}),f))}recalculateAndSaveOverlays(r,a){const l=__PRIVATE_newDocumentKeyMap();let c=new SortedMap((d,f)=>d-f),u=__PRIVATE_documentKeySet();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(r,a).next(d=>{for(const f of d)f.keys().forEach(m=>{const y=a.get(m);if(y===null)return;let E=l.get(m)||FieldMask.empty();E=f.applyToLocalView(y,E),l.set(m,E);const A=(c.get(f.batchId)||__PRIVATE_documentKeySet()).add(m);c=c.insert(f.batchId,A)})}).next(()=>{const d=[],f=c.getReverseIterator();for(;f.hasNext();){const m=f.getNext(),y=m.key,E=m.value,A=__PRIVATE_newMutationMap();
3574E.forEach(P=>{if(!u.has(P)){const R=__PRIVATE_calculateOverlayMutation(a.get(P),l.get(P));R!==null&&A.set(P,R),u=u.add(P)}}),d.push(this.documentOverlayCache.saveOverlays(r,y,A))}return PersistencePromise.waitFor(d)}).next(()=>l)}recalculateAndSaveOverlaysForDocumentKeys(r,a){return this.remoteDocumentCache.getEntries(r,a).next(l=>this.recalculateAndSaveOverlays(r,l))}getDocumentsMatchingQuery(r,a,l,c){return function(d){return DocumentKey.isDocumentKey(d.path)&&d.collectionGroup===null&&d.filters.length===0}(a)?this.getDocumentsMatchingDocumentQuery(r,a.path):__PRIVATE_isCollectionGroupQuery(a)?this.getDocumentsMatchingCollectionGroupQuery(r,a,l,c):this.getDocumentsMatchingCollectionQuery(r,a,l,c)}getNextDocuments(r,a,l,c){return this.remoteDocumentCache.getAllFromCollectionGroup(r,a,l,c).next(u=>{const d=c-u.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(r,a,l.largestBatchId,c-u.size):PersistencePromise.resolve(__PRIVATE_newOverlayMap());let f=-1,m=u;return d.next(y=>PersistencePromise.forEach(y,(E,A)=>(f<A.largestBatchId&&(f=A.largestBatchId),u.get(E)?PersistencePromise.resolve():this.remoteDocumentCache.getEntry(r,E).next(P=>{m=m.insert(E,P)}))).next(()=>this.populateOverlays(r,y,u)).next(()=>this.computeViews(r,m,y,__PRIVATE_documentKeySet())).next(E=>({batchId:f,changes:__PRIVATE_convertOverlayedDocumentMapToDocumentMap(E)})))})}getDocumentsMatchingDocumentQuery(r,a){return this.getDocument(r,new DocumentKey(a)).next(l=>{let c=documentMap();return l.isFoundDocument()&&(c=c.insert(l.key,l)),c})}getDocumentsMatchingCollectionGroupQuery(r,a,l,c){const u=a.collectionGroup;let d=documentMap();return this.indexManager.getCollectionParents(r,u).next(f=>PersistencePromise.forEach(f,m=>{const y=function(A,P){return new __PRIVATE_QueryImpl(P,null,A.explicitOrderBy.slice(),A.filters.slice(),A.limit,A.limitType,A.startAt,A.endAt)}(a,m.child(u));return this.getDocumentsMatchingCollectionQuery(r,y,l,c).next(E=>{E.forEach((A,P)=>{d=d.insert(A,P)})})}).next(()=>d))}getDocumentsMatchingCollectionQuery(r,a,l,c){let u;return this.documentOverlayCache.getOverlaysForCollection(r,a.path,l.largestBatchId).next(d=>(u=d,this.remoteDocumentCache.getDocumentsMatchingQuery(r,a,l,u,c))).next(d=>{u.forEach((m,y)=>{const E=y.getKey();d.get(E)===null&&(d=d.insert(E,MutableDocument.newInvalidDocument(E)))});let f=documentMap();return d.forEach((m,y)=>{const E=u.get(m);E!==void 0&&__PRIVATE_mutationApplyToLocalView(E.mutation,y,FieldMask.empty(),Timestamp.now()),__PRIVATE_queryMatches(a,y)&&(f=f.insert(m,y))}),f})}}/**
3575 * @license
3576 * Copyright 2020 Google LLC
3577 *
3578 * Licensed under the Apache License, Version 2.0 (the "License");
3579 * you may not use this file except in compliance with the License.
3580 * You may obtain a copy of the License at
3581 *
3582 *   http://www.apache.org/licenses/LICENSE-2.0
3583 *
3584 * Unless required by applicable law or agreed to in writing, software
3585 * distributed under the License is distributed on an "AS IS" BASIS,
3586 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3587 * See the License for the specific language governing permissions and
3588 * limitations under the License.
3589 */class __PRIVATE_MemoryBundleCache{constructor(r){this.serializer=r,this.hr=new Map,this.Pr=new Map}getBundleMetadata(r,a){return PersistencePromise.resolve(this.hr.get(a))}saveBundleMetadata(r,a){return this.hr.set(a.id,function(c){return{id:c.id,version:c.version,createTime:__PRIVATE_fromVersion(c.createTime)}}(a)),PersistencePromise.resolve()}getNamedQuery(r,a){return PersistencePromise.resolve(this.Pr.get(a))}saveNamedQuery(r,a){return this.Pr.set(a.name,function(c){return{name:c.name,query:__PRIVATE_fromBundledQuery(c.bundledQuery),readTime:__PRIVATE_fromVersion(c.readTime)}}(a)),PersistencePromise.resolve()}}/**
3590 * @license
3591 * Copyright 2022 Google LLC
3592 *
3593 * Licensed under the Apache License, Version 2.0 (the "License");
3594 * you may not use this file except in compliance with the License.
3595 * You may obtain a copy of the License at
3596 *
3597 *   http://www.apache.org/licenses/LICENSE-2.0
3598 *
3599 * Unless required by applicable law or agreed to in writing, softw
3599are
3600 * distributed under the License is distributed on an "AS IS" BASIS,
3601 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3602 * See the License for the specific language governing permissions and
3603 * limitations under the License.
3604 */class __PRIVATE_MemoryDocumentOverlayCache{constructor(){this.overlays=new SortedMap(DocumentKey.comparator),this.Ir=new Map}getOverlay(r,a){return PersistencePromise.resolve(this.overlays.get(a))}getOverlays(r,a){const l=__PRIVATE_newOverlayMap();return PersistencePromise.forEach(a,c=>this.getOverlay(r,c).next(u=>{u!==null&&l.set(c,u)})).next(()=>l)}saveOverlays(r,a,l){return l.forEach((c,u)=>{this.ht(r,a,u)}),PersistencePromise.resolve()}removeOverlaysForBatchId(r,a,l){const c=this.Ir.get(l);return c!==void 0&&(c.forEach(u=>this.overlays=this.overlays.remove(u)),this.Ir.delete(l)),PersistencePromise.resolve()}getOverlaysForCollection(r,a,l){const c=__PRIVATE_newOverlayMap(),u=a.length+1,d=new DocumentKey(a.child("")),f=this.overlays.getIteratorFrom(d);for(;f.hasNext();){const m=f.getNext().value,y=m.getKey();if(!a.isPrefixOf(y.path))break;y.path.length===u&&m.largestBatchId>l&&c.set(m.getKey(),m)}return PersistencePromise.resolve(c)}getOverlaysForCollectionGroup(r,a,l,c){let u=new SortedMap((y,E)=>y-E);const d=this.overlays.getIterator();for(;d.hasNext();){const y=d.getNext().value;if(y.getKey().getCollectionGroup()===a&&y.largestBatchId>l){let E=u.get(y.largestBatchId);E===null&&(E=__PRIVATE_newOverlayMap(),u=u.insert(y.largestBatchId,E)),E.set(y.getKey(),y)}}const f=__PRIVATE_newOverlayMap(),m=u.getIterator();for(;m.hasNext()&&(m.getNext().value.forEach((y,E)=>f.set(y,E)),!(f.size()>=c)););return PersistencePromise.resolve(f)}ht(r,a,l){const c=this.overlays.get(l.key);if(c!==null){const d=this.Ir.get(c.largestBatchId).delete(l.key);this.Ir.set(c.largestBatchId,d)}this.overlays=this.overlays.insert(l.key,new Overlay(a,l));let u=this.Ir.get(a);u===void 0&&(u=__PRIVATE_documentKeySet(),this.Ir.set(a,u)),this.Ir.set(a,u.add(l.key))}}/**
3605 * @license
3606 * Copyright 2024 Google LLC
3607 *
3608 * Licensed under the Apache License, Version 2.0 (the "License");
3609 * you may not use this file except in compliance with the License.
3610 * You may obtain a copy of the License at
3611 *
3612 *   http://www.apache.org/licenses/LICENSE-2.0
3613 *
3614 * Unless required by applicable law or agreed to in writing, software
3615 * distributed under the License is distributed on an "AS IS" BASIS,
3616 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3617 * See the License for the specific language governing permissions and
3618 * limitations under the License.
3619 */class __PRIVATE_MemoryGlobalsCache{constructor(){this.sessionToken=ByteString.EMPTY_BYTE_STRING}getSessionToken(r){return PersistencePromise.resolve(this.sessionToken)}setSessionToken(r,a){return this.sessionToken=a,PersistencePromise.resolve()}}/**
3620 * @license
3621 * Copyright 2017 Google LLC
3622 *
3623 * Licensed under the Apache License, Version 2.0 (the "License");
3624 * you may not use this file except in compliance with the License.
3625 * You may obtain a copy of the License at
3626 *
3627 *   http://www.apache.org/licenses/LICENSE-2.0
3628 *
3629 * Unless required by applicable law or agreed to in writing, software
3630 * distributed under the License is distributed on an "AS IS" BASIS,
3631 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3632 * See the License for the specific language governing permissions and
3633 * limitations under the License.
3634 */class __PRIVATE_ReferenceSet{constructor(){this.Tr=new SortedSet(__PRIVATE_DocReference.Er),this.dr=new SortedSet(__PRIVATE_DocReference.Ar)}isEmpty(){return this.Tr.isEmpty()}addReference(r,a){const l=new __PRIVATE_DocReference(r,a);this.Tr=this.Tr.add(l),this.dr=this.dr.add(l)}Rr(r,a){r.forEach(l=>this.addReference(l,a))}removeReference(r,a){this.Vr(new __PRIVATE_DocReference(r,a))}mr(r,a){r.forEach(l=>this.removeReference(l,a))}gr(r){const a=new DocumentKey(new ResourcePath([])),l=new __PRIVATE_DocReference(a,r),c=new __PRIVATE_DocReference(a,r+1),u=[];return this.dr.forEachInRange([l,c],d=>{this.Vr(d),u.push(d.key)}),u}pr(){this.Tr.forEach(r=>this.Vr(r))}Vr(r){this.Tr=this.Tr.delete(r),this.dr=this.dr.delete(r)}yr(r){const a=new DocumentKey(new ResourcePath([])),l=new __PRIVATE_DocReference(a,r),c=new __PRIVATE_DocReference(a,r+1);let u=__PRIVATE_documentKeySet();return this.dr.forEachInRange([l,c],d=>{u=u.add(d.key)}),u}containsKey(r){const a=new __PRIVATE_DocReference(r,0),l=this.Tr.firstAfterOrEqual(a);return l!==null&&r.isEqual(l.key)}}class __PRIVATE_DocReference{constructor(r,a){this.key=r,this.wr=a}static Er(r,a){return DocumentKey.comparator(r.key,a.key)||__PRIVATE_primitiveComparator(r.wr,a.wr)}static Ar(r,a){return __PRIVATE_primitiveComparator(r.wr,a.wr)||DocumentKey.comparator(r.key,a.key)}}/**
3635 * @license
3636 * Copyright 2017 Google LLC
3637 *
3638 * Licensed under the Apache License, Version 2.0 (the "License");
3639 * you may not use this file except in compliance with the License.
3640 * You may obtain a copy of the License at
3641 *
3642 *   http://www.apache.org/licenses/LICENSE-2.0
3643 *
3644 * Unless required by applicable law or agreed to in writing, software
3645 * distributed under the License is distributed on an "AS IS" BASIS,
3646 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3647 * See the License for the specific language governing permissions and
3648 * limitations under the License.
3649 */class __PRIVATE_MemoryMutationQueue{constructor(r,a){this.indexManager=r,this.referenceDelegate=a,this.mutationQueue=[],this.Sr=1,this.br=new SortedSet(__PRIVATE_DocReference.Er)}checkEmpty(r){return PersistencePromise.resolve(this.mutationQueue.length===0)}addMutationBatch(r,a,l,c){const u=this.Sr;this.Sr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const d=new MutationBatch(u,a,l,c);this.mutationQueue.push(d);for(const f of c)this.br=this.br.add(new __PRIVATE_DocReference(f.key,u)),this.indexManager.addToCollectionParentIndex(r,f.key.path.popLast());return PersistencePromise.resolve(d)}lookupMutationBatch(r,a){return PersistencePromise.resolve(this.Dr(a))}getNextMutationBatchAfterBatchId(r,a){const l=a+1,c=this.vr(l),u=c<0?0:c;return PersistencePromise.resolve(this.mutationQueue.length>u?this.mutationQueue[u]:null)}getHighestUnacknowledgedBatchId(){return PersistencePromise.resolve(this.mutationQueue.length===0?-1:this.Sr-1)}getAllMutationBatches(r){return PersistencePromise.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(r,a){const l=new __PRIVATE_DocReference(a,0),c=new __PRIVATE_DocReference(a,Number.POSITIVE_INFINITY),u=[];return this.br.forEachInRange([l,c],d=>{const f=this.Dr(d.wr);u.push(f)}),PersistencePromise.resolve(u)}getAllMutationBatchesAffectingDocumentKeys(r,a){let l=new SortedSet(__PRIVATE_primitiveComparator);return a.forEach(c=>{const u=new __PRIVATE_DocReference(c,0),d=new __PRIVATE_DocReference(c,Number.POSITIVE_INFINITY);this.br.forEachInRange([u,d],f=>{l=l.add(f.wr)})}),PersistencePromise.resolve(this.Cr(l))}getAllMutationBatchesAffectingQuery(r,a){const l=a.path,c=l.length+1;let u=l;DocumentKey.isDocumentKey(u)||(u=u.child(""));const d=new __PRIVATE_DocReference(new DocumentKey(u),0);let f=new SortedSet(__PRIVATE_primitiveComparator);return this.br.forEachWhile(m=>{const y=m.key.path;return!!l.isPrefixOf(y)&&(y.length===c&&(f=f.add(m.wr)),!0)},d),PersistencePromise.resolve(this.Cr(f))}Cr(r){const a=[];return r.forEach(l=>{const c=this.Dr(l);c!==null&&a.push(c)}),a}removeMutationBatch(r,a){__PRIVATE_hardAssert(this.Fr(a.batchId,"removed")===0),this.mutationQueue.shift();let l=this.br;return PersistencePromise.forEach(a.mutations,c=>{const u=new __PRIVATE_DocReference(c.key,a.batchId);return l=l.delete(u),this.referenceDelegate.markPotentiallyOrphaned(r,c.key)}).next(()=>{this.br=l})}On(r){}containsKey(r,a){const l=new __PRIVATE_DocReference(a,0),c=this.br.firstAfterOrEqual(l);return PersistencePromise.resolve(a.isEqual(c&&c.key))}performConsistencyCheck(r){return this.mutationQueue.length,PersistencePromise.resolve()}Fr(r,a){return this.vr(r)}vr(r){return this.mutationQueue.length===0?0:r-this.mutationQueue[0].batchId}Dr(r){const a=this.vr(r);return a<0||a>=this.mutationQueue.length?null:this.mutationQueue[a]}}/**
3650 * @license
3651 * Copyright 2017 Google LLC
3652 *
3653 * Licensed under the Apache License, Version 2.0 (the "License");
3654 * you may not use this file except in compliance with the License.
3655 * You may obtain a copy of the License at
3656 *
3657 *   http://www.apache.org/licenses/LICENSE-2.0
3658 *
3659 * Unless required by applicable law or agreed to in writing, software
3660 * distributed under the License is distributed on an "AS IS" BASIS,
3661 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3662 * See the License for the specific language governing permissions and
3663 * limitations under the License.
3664 */class __PRIVATE_MemoryRemoteDocumentCacheImpl{constructor(r){this.Mr=r,this.docs=function(){return new SortedMap(DocumentKey.comparator)}(),this.size=0}setIndexManager(r){this.indexManager=r}addEntry(r,a){const l=a.key,c=this.docs.get(l),u=c?c.size:0,d=this.Mr(a);return this.docs=this.docs.insert(l,{document:a.mutableCopy(),size:d}),this.size+=d-u,this.indexManager.addToCollectionParentIndex(r,l.path.popLast())}removeEntry(r){const a=this.docs.get(r);a&&(this.docs=this.docs.remove(r),this.size-=a.size)}getEntry(r,a){const l=this.docs.get(a);return PersistencePromise.resolve(l?l.document.mutableCopy():MutableDocument.newInvalidDocument(a))}getEntries(r,a){let l=__PRIVATE_mutableDocumentMap();return a.forEach(c=>{const u=this.docs.get(c);l=l.insert(c,u?u.document.mutableCopy():MutableDocument.newInvalidDocument(c))}),PersistencePromise.resolve(l)}getDocumentsMatchingQuery(r,a,l,c){let u=__PRIVATE_mutableDocumentMap();const d=a.path,f=new DocumentKey(d.child("")),m=this.docs.getIteratorFrom(f);for(;m.hasNext();){const{key:y,value:{document:E}}=m.getNext();if(!d.isPrefixOf(y.path))break;y.path.length>d.length+1||__PRIVATE_indexOffsetComparator(__PRIVATE_newIndexOffsetFromDocument(E),l)<=0||(c.has(E.key)||__PRIVATE_queryMatches(a,E))&&(u=u.insert(E.key,E.mutableCopy()))}return PersistencePromise.resolve(u)}getAllFromCollectionGroup(r,a,l,c){fail()}Or(r,a){return PersistencePromise.forEach(this.docs,l=>a(l))}newChangeBuffer(r){return new __PRIVATE_MemoryRemoteDocumentChangeBuffer(this)}getSize(r){return PersistencePromise.resolve(this.size)}}class __PRIVATE_MemoryRemoteDocumentChangeBuffer extends RemoteDocumentChangeBuffer{constructor(r){super(),this.cr=r}applyChanges(r){const a=[];
vendor: 4,053 bytes, lines 3664-3694
3664return this.changes.forEach((l,c)=>{c.isValidDocument()?a.push(this.cr.addEntry(r,c)):this.cr.removeEntry(l)}),PersistencePromise.waitFor(a)}getFromCache(r,a){return this.cr.getEntry(r,a)}getAllFromCache(r,a){return this.cr.getEntries(r,a)}}/**
3665 * @license
3666 * Copyright 2017 Google LLC
3667 *
3668 * Licensed under the Apache License, Version 2.0 (the "License");
3669 * you may not use this file except in compliance with the License.
3670 * You may obtain a copy of the License at
3671 *
3672 *   http://www.apache.org/licenses/LICENSE-2.0
3673 *
3674 * Unless required by applicable law or agreed to in writing, software
3675 * distributed under the License is distributed on an "AS IS" BASIS,
3676 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3677 * See the License for the specific language governing permissions and
3678 * limitations under the License.
3679 */class __PRIVATE_MemoryTargetCache{constructor(r){this.persistence=r,this.Nr=new ObjectMap(a=>__PRIVATE_canonifyTarget(a),__PRIVATE_targetEquals),this.lastRemoteSnapshotVersion=SnapshotVersion.min(),this.highestTargetId=0,this.Lr=0,this.Br=new __PRIVATE_ReferenceSet,this.targetCount=0,this.kr=__PRIVATE_TargetIdGenerator.Bn()}forEachTarget(r,a){return this.Nr.forEach((l,c)=>a(c)),PersistencePromise.resolve()}getLastRemoteSnapshotVersion(r){return PersistencePromise.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(r){return PersistencePromise.resolve(this.Lr)}allocateTargetId(r){return this.highestTargetId=this.kr.next(),PersistencePromise.resolve(this.highestTargetId)}setTargetsMetadata(r,a,l){return l&&(this.lastRemoteSnapshotVersion=l),a>this.Lr&&(this.Lr=a),PersistencePromise.resolve()}Kn(r){this.Nr.set(r.target,r);const a=r.targetId;a>this.highestTargetId&&(this.kr=new __PRIVATE_TargetIdGenerator(a),this.highestTargetId=a),r.sequenceNumber>this.Lr&&(this.Lr=r.sequenceNumber)}addTargetData(r,a){return this.Kn(a),this.targetCount+=1,PersistencePromise.resolve()}updateTargetData(r,a){return this.Kn(a),PersistencePromise.resolve()}removeTargetData(r,a){return this.Nr.delete(a.target),this.Br.gr(a.targetId),this.targetCount-=1,PersistencePromise.resolve()}removeTargets(r,a,l){let c=0;const u=[];return this.Nr.forEach((d,f)=>{f.sequenceNumber<=a&&l.get(f.targetId)===null&&(this.Nr.delete(d),u.push(this.removeMatchingKeysForTargetId(r,f.targetId)),c++)}),PersistencePromise.waitFor(u).next(()=>c)}getTargetCount(r){return PersistencePromise.resolve(this.targetCount)}getTargetData(r,a){const l=this.Nr.get(a)||null;return PersistencePromise.resolve(l)}addMatchingKeys(r,a,l){return this.Br.Rr(a,l),PersistencePromise.resolve()}removeMatchingKeys(r,a,l){this.Br.mr(a,l);const c=this.persistence.referenceDelegate,u=[];return c&&a.forEach(d=>{u.push(c.markPotentiallyOrphaned(r,d))}),PersistencePromise.waitFor(u)}removeMatchingKeysForTargetId(r,a){return this.Br.gr(a),PersistencePromise.resolve()}getMatchingKeysForTargetId(r,a){const l=this.Br.yr(a);return PersistencePromise.resolve(l)}containsKey(r,a){return PersistencePromise.resolve(this.Br.containsKey(a))}}/**
3680 * @license
3681 * Copyright 2017 Google LLC
3682 *
3683 * Licensed under the Apache License, Version 2.0 (the "License");
3684 * you may not use this file except in compliance with the License.
3685 * You may obtain a copy of the License at
3686 *
3687 *   http://www.apache.org/licenses/LICENSE-2.0
3688 *
3689 * Unless required by applicable law or agreed to in writing, software
3690 * distributed under the License is distributed on an "AS IS" BASIS,
3691 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3692 * See the License for the specific language governing permissions and
3693 * limitations under the License.
3694 */class __PRIVATE_MemoryPersistence{constructor(r,a){this.qr={},this.overlays={},this.Qr=new __PRIVATE_ListenSequence(0),this.Kr=!1,this.Kr=!0,this.$r=new __PRIVATE_MemoryGlobalsCache,this.referenceDelegate=r(this),this.Ur=new __PRIVATE_MemoryTargetCache(this),this.indexManager=new __PRIVATE_MemoryIndexManager,this.remoteDocumentCache=function(c){return new __PRIVATE_MemoryRemoteDocumentCacheImpl(c)}(l=>
vendor: 4,501 bytes, lines 3694-3728
3694this.referenceDelegate.Wr(l)),this.serializer=new __PRIVATE_LocalSerializer(a),this.Gr=new __PRIVATE_MemoryBundleCache(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Kr=!1,Promise.resolve()}get started(){return this.Kr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(r){return this.indexManager}getDocumentOverlayCache(r){let a=this.overlays[r.toKey()];return a||(a=new __PRIVATE_MemoryDocumentOverlayCache,this.overlays[r.toKey()]=a),a}getMutationQueue(r,a){let l=this.qr[r.toKey()];return l||(l=new __PRIVATE_MemoryMutationQueue(a,this.referenceDelegate),this.qr[r.toKey()]=l),l}getGlobalsCache(){return this.$r}getTargetCache(){return this.Ur}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Gr}runTransaction(r,a,l){__PRIVATE_logDebug("MemoryPersistence","Starting transaction:",r);const c=new __PRIVATE_MemoryTransaction(this.Qr.next());return this.referenceDelegate.zr(),l(c).next(u=>this.referenceDelegate.jr(c).next(()=>u)).toPromise().then(u=>(c.raiseOnCommittedEvent(),u))}Hr(r,a){return PersistencePromise.or(Object.values(this.qr).map(l=>()=>l.containsKey(r,a)))}}class __PRIVATE_MemoryTransaction extends PersistenceTransaction{constructor(r){super(),this.currentSequenceNumber=r}}class __PRIVATE_MemoryEagerDelegate{constructor(r){this.persistence=r,this.Jr=new __PRIVATE_ReferenceSet,this.Yr=null}static Zr(r){return new __PRIVATE_MemoryEagerDelegate(r)}get Xr(){if(this.Yr)return this.Yr;throw fail()}addReference(r,a,l){return this.Jr.addReference(l,a),this.Xr.delete(l.toString()),PersistencePromise.resolve()}removeReference(r,a,l){return this.Jr.removeReference(l,a),this.Xr.add(l.toString()),PersistencePromise.resolve()}markPotentiallyOrphaned(r,a){return this.Xr.add(a.toString()),PersistencePromise.resolve()}removeTarget(r,a){this.Jr.gr(a.targetId).forEach(c=>this.Xr.add(c.toString()));const l=this.persistence.getTargetCache();return l.getMatchingKeysForTargetId(r,a.targetId).next(c=>{c.forEach(u=>this.Xr.add(u.toString()))}).next(()=>l.removeTargetData(r,a))}zr(){this.Yr=new Set}jr(r){const a=this.persistence.getRemoteDocumentCache().newChangeBuffer();return PersistencePromise.forEach(this.Xr,l=>{const c=DocumentKey.fromPath(l);return this.ei(r,c).next(u=>{u||a.removeEntry(c,SnapshotVersion.min())})}).next(()=>(this.Yr=null,a.apply(r)))}updateLimboDocument(r,a){return this.ei(r,a).next(l=>{l?this.Xr.delete(a.toString()):this.Xr.add(a.toString())})}Wr(r){return 0}ei(r,a){return PersistencePromise.or([()=>PersistencePromise.resolve(this.Jr.containsKey(a)),()=>this.persistence.getTargetCache().containsKey(r,a),()=>this.persistence.Hr(r,a)])}}/**
3695 * @license
3696 * Copyright 2017 Google LLC
3697 *
3698 * Licensed under the Apache License, Version 2.0 (the "License");
3699 * you may not use this file except in compliance with the License.
3700 * You may obtain a copy of the License at
3701 *
3702 *   http://www.apache.org/licenses/LICENSE-2.0
3703 *
3704 * Unless required by applicable law or agreed to in writing, software
3705 * distributed under the License is distributed on an "AS IS" BASIS,
3706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3707 * See the License for the specific language governing permissions and
3708 * limitations under the License.
3709 */class __PRIVATE_LocalViewChanges{constructor(r,a,l,c){this.targetId=r,this.fromCache=a,this.$i=l,this.Ui=c}static Wi(r,a){let l=__PRIVATE_documentKeySet(),c=__PRIVATE_documentKeySet();for(const u of a.docChanges)switch(u.type){case 0:l=l.add(u.doc.key);break;case 1:c=c.add(u.doc.key)}return new __PRIVATE_LocalViewChanges(r,a.fromCache,l,c)}}/**
3710 * @license
3711 * Copyright 2023 Google LLC
3712 *
3713 * Licensed under the Apache License, Version 2.0 (the "License");
3714 * you may not use this file except in compliance with the License.
3715 * You may obtain a copy of the License at
3716 *
3717 *   http://www.apache.org/licenses/LICENSE-2.0
3718 *
3719 * Unless required by applicable law or agreed to in writing, software
3720 * distributed under the License is distributed on an "AS IS" BASIS,
3721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3722 * See the License for the specific language governing permissions and
3723 * limitations under the License.
3724 */class QueryContext{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(r){this._documentReadCount+=r}}/**
3725 * @license
3726 * Copyright 2019 Google LLC
3727 *
3728 * Licensed under the Apache License, Version 2.0 (the "License");
3729 * you may not use this file except in compliance with the License.
3730 * You may obtain a copy of the License at
3731 *
3732 *   http://www.apache.org/licenses/LICENSE-2.0
3733 *
3734 * Unless required by applicable law or agreed to in writing, software
3735 * distributed under the License is distributed on an "AS IS" BASIS,
3736 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3737 * See the License for the specific language governing permissions and
3738 * limitations under the License.
3739 */class __PRIVATE_QueryEngine{constructor(){this.Gi=!1,this.zi=!1,this.ji=100,this.Hi=function(){return isSafari()?8:__PRIVATE_getAndroidVersion(getUA())>0?6:4}()}initialize(r,a){this.Ji=r,this.indexManager=a,this.Gi=!0}getDocumentsMatchingQuery(r,a,l,c){const u={result:null};return this.Yi(r,a).next(d=>{u.result=d}).next(()=>{if(!u.result)return this.Zi(r,a,c,l).next(d=>{u.result=d})}).next(()=>{if(u.result)return;const d=new QueryContext;return this.Xi(r,a,d).next(f=>{if(u.result=f,this.zi)return this.es(r,a,d,f.size)})}).next(()=>u.result)}es(r,a,l,c){return l.documentReadCount<this.ji?(__PRIVATE_getLogLevel()<=LogLevel.DEBUG&&__PRIVATE_logDebug("QueryEngine","SDK will not create cache indexes for query:",__PRIVATE_stringifyQuery(a),"since it only creates cache indexes for collection contains","more than or equal to",this.ji,"documents"),PersistencePromise.resolve()):(__PRIVATE_getLogLevel()<=LogLevel.DEBUG&&__PRIVATE_logDebug("QueryEngine","Query:",__PRIVATE_stringifyQuery(a),"scans",l.documentReadCount,"local documents and returns",c,"documents as results."),l.documentReadCount>this.Hi*c?(__PRIVATE_getLogLevel()<=LogLevel.DEBUG&&__PRIVATE_logDebug("QueryEngine","The SDK decides to create cache indexes for query:",__PRIVATE_stringifyQuery(a),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(r,__PRIVATE_queryToTarget(a))):PersistencePromise.resolve())}Yi(r,a){if(__PRIVATE_queryMatchesAllDocuments(a))return PersistencePromise.resolve(null);let l=__PRIVATE_queryToTarget(a);return this.indexManager.getIndexType(r,l).next(c=>c===0?null:(a.limit!==null&&c===1&&(a=__PRIVATE_queryWithLimit(a,null,"F"),l=__PRIVATE_queryToTarget(a)),this.indexManager.getDocumentsMatchingTarget(r,l).next(u=>{const d=__PRIVATE_documentKeySet(...u);return this.Ji.getDocuments(r,d).next(f=>this.indexManager.getMinOffset(r,l).next(m=>{const y=this.ts(a,f);return this.ns(a,y,d,m.readTime)?this.Yi(r,__PRIVATE_queryWithLimit(a,null,"F")):this.rs(r,y,a,m)}))})))}Zi(r,a,l,c){return __PRIVATE_queryMatchesAllDocuments(a)||c.isEqual(SnapshotVersion.min())?PersistencePromise.resolve(null):this.Ji.getDocuments(r,l).next(u=>{const d=this.ts(a,u);return this.ns(a,d,l,c)?PersistencePromise.resolve(null):(__PRIVATE_getLogLevel()<=LogLevel.DEBUG&&__PRIVATE_logDebug("QueryEngine","Re-using previous result from %s to execute query: %s",c.toString(),__PRIVATE_stringifyQuery(a)),this.rs(r,d,a,__PRIVATE_newIndexOffsetSuccessorFromReadTime(c,-1)).next(f=>f))})}ts(r,a){let l=new SortedSet(__PRIVATE_newQueryComparator(r));return a.forEach((c,u)=>{__PRIVATE_queryMatches(r,u)&&(l=l.add(u))}),l}ns(r,a,l,c){if(r.limit===null)return!1;if(l.size!==a.size)return!0;const u=r.limitType==="F"?a.last():a.first();return!!u&&(u.hasPendingWrites||u.version.compareTo(c)>0)}Xi(r,a,l){return __PRIVATE_getLogLevel()<=LogLevel.DEBUG&&__PRIVATE_logDebug("QueryEngine","Using full collection scan to execute query:",__PRIVATE_stringifyQuery(a)),this.Ji.getDocumentsMatchingQuery(r,a,IndexOffset.min(),l)}rs(r,a,l,c){return this.Ji.getDocumentsMatchingQuery(r,l,c).next(u=>(a.forEach(d=>{u=u.insert(d.key,d)}),u))}}/**
3740 * @license
3741 * Copyright 2020 Google LLC
3742 *
3743 * Licensed under the Apache License, Version 2.0 (the "License");
3744 * you may not use this file except in compliance with the License.
3745 * You may obtain a copy of the License at
3746 *
3747 *   http://www.apache.org/licenses/LICENSE-2.0
3748 *
3749 * Unless required by applicable law or agreed to in writing, software
3750 * distributed under the License is distributed on an "AS IS" BASIS,
3751 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3752 * See the License for the specific language governing permissions and
3753 * limitations under the License.
3754 */class __PRIVATE_LocalStoreImpl{constructor(r,a,l,c){this.persistence=r,this.ss=a,this.serializer
3754=c,this.os=new SortedMap(__PRIVATE_primitiveComparator),this._s=new ObjectMap(u=>__PRIVATE_canonifyTarget(u),__PRIVATE_targetEquals),this.us=new Map,this.cs=r.getRemoteDocumentCache(),this.Ur=r.getTargetCache(),this.Gr=r.getBundleCache(),this.ls(l)}ls(r){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(r),this.indexManager=this.persistence.getIndexManager(r),this.mutationQueue=this.persistence.getMutationQueue(r,this.indexManager),this.localDocuments=new LocalDocumentsView(this.cs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.cs.setIndexManager(this.indexManager),this.ss.initialize(this.localDocuments,this.indexManager)}collectGarbage(r){return this.persistence.runTransaction("Collect garbage","readwrite-primary",a=>r.collect(a,this.os))}}function __PRIVATE_newLocalStore(o,r,a,l){return new __PRIVATE_LocalStoreImpl(o,r,a,l)}async function __PRIVATE_localStoreHandleUserChange(o,r){const a=__PRIVATE_debugCast(o);return await a.persistence.runTransaction("Handle user change","readonly",l=>{let c;return a.mutationQueue.getAllMutationBatches(l).next(u=>(c=u,a.ls(r),a.mutationQueue.getAllMutationBatches(l))).next(u=>{const d=[],f=[];let m=__PRIVATE_documentKeySet();for(const y of c){d.push(y.batchId);for(const E of y.mutations)m=m.add(E.key)}for(const y of u){f.push(y.batchId);for(const E of y.mutations)m=m.add(E.key)}return a.localDocuments.getDocuments(l,m).next(y=>({hs:y,removedBatchIds:d,addedBatchIds:f}))})})}function __PRIVATE_localStoreAcknowledgeBatch(o,r){const a=__PRIVATE_debugCast(o);return a.persistence.runTransaction("Acknowledge batch","readwrite-primary",l=>{const c=r.batch.keys(),u=a.cs.newChangeBuffer({trackRemovals:!0});return function(f,m,y,E){const A=y.batch,P=A.keys();let R=PersistencePromise.resolve();return P.forEach(x=>{R=R.next(()=>E.getEntry(m,x)).next(M=>{const $=y.docVersions.get(x);__PRIVATE_hardAssert($!==null),M.version.compareTo($)<0&&(A.applyToRemoteDocument(M,y),M.isValidDocument()&&(M.setReadTime(y.commitVersion),E.addEntry(M)))})}),R.next(()=>f.mutationQueue.removeMutationBatch(m,A))}(a,l,r,u).next(()=>u.apply(l)).next(()=>a.mutationQueue.performConsistencyCheck(l)).next(()=>a.documentOverlayCache.removeOverlaysForBatchId(l,c,r.batch.batchId)).next(()=>a.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,function(f){let m=__PRIVATE_documentKeySet();for(let y=0;y<f.mutationResults.length;++y)f.mutationResults[y].transformResults.length>0&&(m=m.add(f.batch.mutations[y].key));return m}(r))).next(()=>a.localDocuments.getDocuments(l,c))})}function __PRIVATE_localStoreGetLastRemoteSnapshotVersion(o){const r=__PRIVATE_debugCast(o);return r.persistence.runTransaction("Get last remote snapshot version","readonly",a=>r.Ur.getLastRemoteSnapshotVersion(a))}function __PRIVATE_localStoreApplyRemoteEventToLocalCache(o,r){const a=__PRIVATE_debugCast(o),l=r.snapshotVersion;let c=a.os;return a.persistence.runTransaction("Apply remote event","readwrite-primary",u=>{const d=a.cs.newChangeBuffer({trackRemovals:!0});c=a.os;const f=[];
vendor: 5,317 bytes, lines 3754-3758
3754r.targetChanges.forEach((E,A)=>{const P=c.get(A);if(!P)return;f.push(a.Ur.removeMatchingKeys(u,E.removedDocuments,A).next(()=>a.Ur.addMatchingKeys(u,E.addedDocuments,A)));let R=P.withSequenceNumber(u.currentSequenceNumber);r.targetMismatches.get(A)!==null?R=R.withResumeToken(ByteString.EMPTY_BYTE_STRING,SnapshotVersion.min()).withLastLimboFreeSnapshotVersion(SnapshotVersion.min()):E.resumeToken.approximateByteSize()>0&&(R=R.withResumeToken(E.resumeToken,l)),c=c.insert(A,R),function(M,$,V){return M.resumeToken.approximateByteSize()===0||$.snapshotVersion.toMicroseconds()-M.snapshotVersion.toMicroseconds()>=3e8?!0:V.addedDocuments.size+V.modifiedDocuments.size+V.removedDocuments.size>0}(P,R,E)&&f.push(a.Ur.updateTargetData(u,R))});let m=__PRIVATE_mutableDocumentMap(),y=__PRIVATE_documentKeySet();if(r.documentUpdates.forEach(E=>{r.resolvedLimboDocuments.has(E)&&f.push(a.persistence.referenceDelegate.updateLimboDocument(u,E))}),f.push(__PRIVATE_populateDocumentChangeBuffer(u,d,r.documentUpdates).next(E=>{m=E.Ps,y=E.Is})),!l.isEqual(SnapshotVersion.min())){const E=a.Ur.getLastRemoteSnapshotVersion(u).next(A=>a.Ur.setTargetsMetadata(u,u.currentSequenceNumber,l));f.push(E)}return PersistencePromise.waitFor(f).next(()=>d.apply(u)).next(()=>a.localDocuments.getLocalViewOfDocuments(u,m,y)).next(()=>m)}).then(u=>(a.os=c,u))}function __PRIVATE_populateDocumentChangeBuffer(o,r,a){let l=__PRIVATE_documentKeySet(),c=__PRIVATE_documentKeySet();return a.forEach(u=>l=l.add(u)),r.getEntries(o,l).next(u=>{let d=__PRIVATE_mutableDocumentMap();return a.forEach((f,m)=>{const y=u.get(f);m.isFoundDocument()!==y.isFoundDocument()&&(c=c.add(f)),m.isNoDocument()&&m.version.isEqual(SnapshotVersion.min())?(r.removeEntry(f,m.readTime),d=d.insert(f,m)):!y.isValidDocument()||m.version.compareTo(y.version)>0||m.version.compareTo(y.version)===0&&y.hasPendingWrites?(r.addEntry(m),d=d.insert(f,m)):__PRIVATE_logDebug("LocalStore","Ignoring outdated watch update for ",f,". Current version:",y.version," Watch version:",m.version)}),{Ps:d,Is:c}})}function __PRIVATE_localStoreGetNextMutationBatch(o,r){const a=__PRIVATE_debugCast(o);return a.persistence.runTransaction("Get next mutation batch","readonly",l=>(r===void 0&&(r=-1),a.mutationQueue.getNextMutationBatchAfterBatchId(l,r)))}function __PRIVATE_localStoreAllocateTarget(o,r){const a=__PRIVATE_debugCast(o);return a.persistence.runTransaction("Allocate target","readwrite",l=>{let c;return a.Ur.getTargetData(l,r).next(u=>u?(c=u,PersistencePromise.resolve(c)):a.Ur.allocateTargetId(l).next(d=>(c=new TargetData(r,d,"TargetPurposeListen",l.currentSequenceNumber),a.Ur.addTargetData(l,c).next(()=>c))))}).then(l=>{const c=a.os.get(l.targetId);return(c===null||l.snapshotVersion.compareTo(c.snapshotVersion)>0)&&(a.os=a.os.insert(l.targetId,l),a._s.set(r,l.targetId)),l})}async function __PRIVATE_localStoreReleaseTarget(o,r,a){const l=__PRIVATE_debugCast(o),c=l.os.get(r),u=a?"readwrite":"readwrite-primary";try{a||await l.persistence.runTransaction("Release target",u,d=>l.persistence.referenceDelegate.removeTarget(d,c))}catch(d){if(!__PRIVATE_isIndexedDbTransactionError(d))throw d;__PRIVATE_logDebug("LocalStore",`Failed to update sequence numbers for target ${r}: ${d}`)}l.os=l.os.remove(r),l._s.delete(c.target)}function __PRIVATE_localStoreExecuteQuery(o,r,a){const l=__PRIVATE_debugCast(o);let c=SnapshotVersion.min(),u=__PRIVATE_documentKeySet();return l.persistence.runTransaction("Execute query","readwrite",d=>function(m,y,E){const A=__PRIVATE_debugCast(m),P=A._s.get(E);return P!==void 0?PersistencePromise.resolve(A.os.get(P)):A.Ur.getTargetData(y,E)}(l,d,__PRIVATE_queryToTarget(r)).next(f=>{if(f)return c=f.lastLimboFreeSnapshotVersion,l.Ur.getMatchingKeysForTargetId(d,f.targetId).next(m=>{u=m})}).next(()=>l.ss.getDocumentsMatchingQuery(d,r,a?c:SnapshotVersion.min(),a?u:__PRIVATE_documentKeySet())).next(f=>(__PRIVATE_setMaxReadTime(l,__PRIVATE_queryCollectionGroup(r),f),{documents:f,Ts:u})))}function __PRIVATE_setMaxReadTime(o,r,a){let l=o.us.get(r)||SnapshotVersion.min();a.forEach((c,u)=>{u.readTime.compareTo(l)>0&&(l=u.readTime)}),o.us.set(r,l)}class __PRIVATE_LocalClientState{constructor(){this.activeTargetIds=__PRIVATE_targetIdSet()}fs(r){this.activeTargetIds=this.activeTargetIds.add(r)}gs(r){this.activeTargetIds=this.activeTargetIds.delete(r)}Vs(){const r={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(r)}}class __PRIVATE_MemorySharedClientState{constructor(){this.so=new __PRIVATE_LocalClientState,this.oo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(r){}updateMutationState(r,a,l){}addLocalQueryTarget(r,a=!0){return a&&this.so.fs(r),this.oo[r]||"not-current"}updateQueryState(r,a,l){this.oo[r]=a}removeLocalQueryTarget(r){this.so.gs(r)}isLocalQueryTarget(r){return this.so.activeTargetIds.has(r)}clearQueryState(r){delete this.oo[r]}getAllActiveQueryTargets(){return this.so.activeTargetIds}isActiveQueryTarget(r){return this.so.activeTargetIds.has(r)}start(){return this.so=new __PRIVATE_LocalClientState,Promise.resolve()}handleUserChange(r,a,l){}setOnlineState(r){}shutdown(){}writeSequenceNumber(r){}notifyBundleLoaded(r){}}/**
3755 * @license
3756 * Copyright 2019 Google LLC
3757 *
3758 * Licensed under the Apache License, Version 2.0 (the "License");
3759 * you may not use this file except in compliance with the License.
3760 * You may obtain a copy of the License at
3761 *
3762 *   http://www.apache.org/licenses/LICENSE-2.0
3763 *
3764 * Unless required by applicable law or agreed to in writing, software
3765 * distributed under the License is distributed on an "AS IS" BASIS,
3766 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3767 * See the License for the specific language governing permissions and
3768 * limitations under the License.
3769 */class __PRIVATE_NoopConnectivityMonitor{_o(r){}shutdown(){}}/**
3770 * @license
3771 * Copyright 2019 Google LLC
3772 *
3773 * Licensed under the Apache License, Version 2.0 (the "License");
3774 * you may not use this file except in compliance with the License.
3775 * You may obtain a copy of the License at
3776 *
3777 *   http://www.apache.org/licenses/LICENSE-2.0
3778 *
3779 * Unless required by applicable law or agreed to in writing, software
3780 * distributed under the License is distributed on an "AS IS" BASIS,
3781 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3782 * See the License for the specific language governing permissions and
3783 * limitations under the License.
3784 */class __PRIVATE_BrowserConnectivityMonitor{constructor(){this.ao=()=>this.uo(),this.co=()=>this.lo(),this.ho=[],this.Po()}_o(r){this.ho.push(r)}shutdown(){window.removeEventListener("online",this.ao),window.removeEventListener("offline",this.co)}Po(){window.addEventListener("online",this.ao),window.addEventListener("offline",this.co)}uo(){__PRIVATE_logDebug("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const r of this.ho)r(0)}lo(){__PRIVATE_logDebug("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const r of this.ho)r(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/**
3785 * @license
3786 * Copyright 2023 Google LLC
3787 *
3788 * Licensed under the Apache License, Version 2.0 (the "License");
3789 * you may not use this file except in compliance with the License.
3790 * You may obtain a copy of the License at
3791 *
3792 *   http://www.apache.org/licenses/LICENSE-2.0
3793 *
3794 * Unless required by applicable law or agreed to in writing, software
3795 * distributed under the License is distributed on an "AS IS" BASIS,
3796 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3797 * See the License for the specific language governing permissions and
3798 * limitations under the License.
3799 */let me=null;function __PRIVATE_generateUniqueDebugId(){return me===null?me=function(){return 268435456+Math.round(2147483648*Math.random())}():me++,"0x"+me.toString(16)}/**
3800 * @license
3801 * Copyright 2020 Google LLC
3802 *
3803 * Licensed under the Apache License, Version 2.0 (the "License");
3804 * you may not use this file except in compliance with the License.
3805 * You may obtain a copy of the License at
3806 *
3807 *   http://www.apache.org/licenses/LICENSE-2.0
3808 *
3809 * Unless required by applicable law or agreed to in writing, software
3810 * distributed under the License is distributed on an "AS IS" BASIS,
3811 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3812 * See the License for the specific language governing permissions and
3813 * limitations under the License.
3814 */const fe={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/**
3815 * @license
3816 * Copyright 2017 Google LLC
3817 *
3818 * Licensed under the Apache License, Version 2.0 (the "License");
3819 * you may not use this file except in compliance with the License.
3820 * You may obtain a copy of the License at
3821 *
3822 *   http://www.apache.org/licenses/LICENSE-2.0
3823 *
3824 * Unless required by applicable law or agreed to in writing, software
3825 * distributed under the License is distributed on an "AS IS" BASIS,
3826 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3827 * See the License for the specific language governing permissions and
3828 * limitations under the License.
3829 */class __PRIVATE_StreamBridge{constructor(r){this.Io=r.Io,this.To=r.To}Eo(r){this.Ao=r}Ro(r){this.Vo=r}mo(r){this.fo=r}onMessage(r){this.po=r}close(){this.To()}send(r){this.Io(r)}yo(){this.Ao()}wo(){this.Vo()}So(r){this.fo(r)}bo(r){this.po(r)}}/**
3830 * @license
3831 * Copyright 2017 Google LLC
3832 *
3833 * Licensed under the Apache License, Version 2.0 (the "License");
3834 * you may not use this file except in compliance with the License.
3835 * You may obtain a copy of the License at
3836 *
3837 *   http://www.apache.org/licenses/LICENSE-2.0
3838 *
3839 * Unless required by applicable law or agreed to in writing, software
3840 * distributed under the License is distributed on an "AS IS" BASIS,
3841 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3842 * See the License for the specific language governing permissions and
3843 * limitations under the License.
3844 */const ge="WebChannelConnection";class __PRIVATE_WebChannelConnection extends class{constructor(a){this.databaseInfo=a,this.databaseId=a.databaseId;const l=a.ssl?"https":"http",c=encodeURIComponent(this.databaseId.projectId),u=encodeURIComponent(this.databaseId.database);this.Do=l+"://"+a.host,this.vo=`projects/${c}/databases/${u}`,this.Co=this.databaseId.database==="(default)"?`project_id=${c}`:`project_id=${c}&database_id=${u}`}get Fo(){return!1}Mo(a,l,c,u,d){const f=__PRIVATE_generateUniqueDebugId(),m=this.xo(a,l.toUriEncodedString());__PRIVATE_logDebug("RestConnection",`Sending RPC '${a}' ${f}:`,m,c);const y={"google-cloud-resource-prefix":this.vo,"x-goog-request-params":this.Co};return this.Oo(y,u,d),this.No(a,m,y,c).then(E=>(__PRIVATE_logDebug("RestConnection",`Received RPC '${a}' ${f}: `,E),E),E=>{throw __PRIVATE_logWarn("RestConnection",`RPC '${a}' ${f} failed with error: `,E,"url: ",m,"request:",c),E})}Lo(a,l,c,u,d,f){return this.Mo(a,l,c,u,d)}Oo(a,l,c){a["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+S}(),a["Content-Type"]="text/plain",this.databaseInfo.appId&&(a["X-Firebase-GMPID"]=this.databaseInfo.appId),l&&l.headers.forEach((u,d)=>a[d]=u),c&&c.headers.forEach((u,d)=>a[d]=u)}xo(a,l){const c=fe[a];return`${this.Do}/v1/${l}:${c}`}terminate(){}}{constructor(r){super(r),this.forceLongPolling=r.forceLongPolling,this.autoDetectLongPolling=r.autoDetectLongPolling,this.useFetchStreams=r.useFetchStreams,this.longPollingOptions=r.longPollingOptions}No(r,a,l,c){const u=__PRIVATE_generateUniqueDebugId();return new Promise((d,f)=>{const m=new XhrIo;m.setWithCredentials(!0),m.listenOnce(EventType.COMPLETE,()=>{try{switch(m.getLastErrorCode()){case ErrorCode.NO_ERROR:const E=m.getResponseJson();__PRIVATE_logDebug(ge,`XHR for RPC '${r}' ${u} received:`,JSON.stringify(E)),d(E);break;case ErrorCode.TIMEOUT:__PRIVATE_logDebug(ge,`RPC '${r}' ${u} timed out`),f(new FirestoreError(D.DEADLINE_EXCEEDED,"Request time out"));break;case ErrorCode.HTTP_ERROR:const A=m.getStatus();if(__PRIVATE_logDebug(ge,`RPC '${r}' ${u} failed with status:`,A,"response text:",m.getResponseText()),A>0){let P=m.getResponseJson();Array.isArray(P)&&(P=P[0]);const R=P==null?void 0:P.error;if(R&&R.status&&R.message){const x=function($){const V=$.toLowerCase().replace(/_/g,"-");return Object.values(D).indexOf(V)>=0?V:D.UNKNOWN}(R.status);f(new FirestoreError(x,R.message))}else f(new FirestoreError(D.UNKNOWN,"Server responded with status "+m.getStatus()))}else f(new FirestoreError(D.UNAVAILABLE,"Connection failed."));break;default:fail()}}finally{__PRIVATE_logDebug(ge,`RPC '${r}' ${u} completed.`)}});const y=JSON.stringify(c);__PRIVATE_logDebug(ge,`RPC '${r}' ${u} sending request:`,c),m.send(a,"POST",y,l,15)})}Bo(r,a,l){const c=__PRIVATE_generateUniqueDebugId(),u=[this.Do,"/","google.firestore.v1.Firestore","/",r,"/channel"],d=createWebChannelTransport(),f=getStatEventTarget(),m={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},y=this.longPollingOptions.timeoutSeconds;y!==void 0&&(m.longPollingTimeout=Math.round(1e3*y)),this.useFetchStreams&&(m.useFetchStreams=!0),this.Oo(m.initMessageHeaders,a,l),m.encodeInitMessageHeaders=!0;const E=u.join("");__PRIVATE_logDebug(ge,`Creating RPC '${r}' stream ${c}: ${E}`,m);const A=d.createWebChannel(E,m);let P=!1,R=!1;const x=new __PRIVATE_StreamBridge({Io:$=>{R?__PRIVATE_logDebug(ge,`Not sending because RPC '${r}' stream ${c} is closed:`,$):(P||(__PRIVATE_logDebug(ge,`Opening RPC '${r}' stream ${c} transport.`),A.open(),P=!0),__PRIVATE_logDebug(ge,`RPC '${r}' stream ${c} sending:`,$),A.send($))},To:()=>A.close()}),M=($,V,B)=>{$.listen(V,O=>{try{B(O)}catch(L){setTimeout(()=>{throw L},0)}})};return M(A,WebChannel.EventType.OPEN,()=>{R||(__PRIVATE_logDebug(ge,`RPC '${r}' stream ${c} transport opened.`),x.yo())}),M(A,WebChannel.EventType.CLOSE,()=>{R||(R=!0,__PRIVATE_logDebug(ge,`RPC '${r}' stream ${c} transport closed`),x.So())}
3844),M(A,WebChannel.EventType.ERROR,$=>{R||(R=!0,__PRIVATE_logWarn(ge,`RPC '${r}' stream ${c} transport errored:`,$),x.So(new FirestoreError(D.UNAVAILABLE,"The operation could not be completed")))}),M(A,WebChannel.EventType.MESSAGE,$=>{var V;if(!R){const B=$.data[0];__PRIVATE_hardAssert(!!B);const O=B,L=O.error||((V=O[0])===null||V===void 0?void 0:V.error);if(L){__PRIVATE_logDebug(ge,`RPC '${r}' stream ${c} received error:`,L);const F=L.status;let j=function(Y){const te=le[Y];if(te!==void 0)return __PRIVATE_mapCodeFromRpcCode(te)}(F),U=L.message;j===void 0&&(j=D.INTERNAL,U="Unknown error status: "+F+" with message "+L.message),R=!0,x.So(new FirestoreError(j,U)),A.close()}else __PRIVATE_logDebug(ge,`RPC '${r}' stream ${c} received:`,B),x.bo(B)}}),M(f,Event$1.STAT_EVENT,$=>{$.stat===Stat.PROXY?__PRIVATE_logDebug(ge,`RPC '${r}' stream ${c} detected buffering proxy`):$.stat===Stat.NOPROXY&&__PRIVATE_logDebug(ge,`RPC '${r}' stream ${c} detected no buffering proxy`)}),setTimeout(()=>{x.wo()},0),x}}function getDocument(){return typeof document<"u"?document:null}/**
3845 * @license
3846 * Copyright 2020 Google LLC
3847 *
3848 * Licensed under the Apache License, Version 2.0 (the "License");
3849 * you may not use this file except in compliance with the License.
3850 * You may obtain a copy of the License at
3851 *
3852 *   http://www.apache.org/licenses/LICENSE-2.0
3853 *
3854 * Unless required by applicable law or agreed to in writing, software
3855 * distributed under the License is distributed on an "AS IS" BASIS,
3856 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3857 * See the License for the specific language governing permissions and
3858 * limitations under the License.
3859 */function __PRIVATE_newSerializer(o){return new JsonProtoSerializer(o,!0)}/**
3860 * @license
3861 * Copyright 2017 Google LLC
3862 *
3863 * Licensed under the Apache License, Version 2.0 (the "License");
3864 * you may not use this file except in compliance with the License.
3865 * You may obtain a copy of the License at
3866 *
3867 *   http://www.apache.org/licenses/LICENSE-2.0
3868 *
3869 * Unless required by applicable law or agreed to in writing, software
3870 * distributed under the License is distributed on an "AS IS" BASIS,
3871 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3872 * See the License for the specific language governing permissions and
3873 * limitations under the License.
3874 */class __PRIVATE_ExponentialBackoff{constructor(r,a,l=1e3,c=1.5,u=6e4){this.ui=r,this.timerId=a,this.ko=l,this.qo=c,this.Qo=u,this.Ko=0,this.$o=null,this.Uo=Date.now(),this.reset()}reset(){this.Ko=0}Wo(){this.Ko=this.Qo}Go(r){this.cancel();const a=Math.floor(this.Ko+this.zo()),l=Math.max(0,Date.now()-this.Uo),c=Math.max(0,a-l);c>0&&__PRIVATE_logDebug("ExponentialBackoff",`Backing off for ${c} ms (base delay: ${this.Ko} ms, delay with jitter: ${a} ms, last attempt: ${l} ms ago)`),this.$o=this.ui.enqueueAfterDelay(this.timerId,c,()=>(this.Uo=Date.now(),r())),this.Ko*=this.qo,this.Ko<this.ko&&(this.Ko=this.ko),this.Ko>this.Qo&&(this.Ko=this.Qo)}jo(){this.$o!==null&&(this.$o.skipDelay(),this.$o=null)}cancel(){this.$o!==null&&(this.$o.cancel(),this.$o=null)}zo(){return(Math.random()-.5)*this.Ko}}/**
3875 * @license
3876 * Copyright 2017 Google LLC
3877 *
3878 * Licensed under the Apache License, Version 2.0 (the "License");
3879 * you may not use this file except in compliance with the License.
3880 * You may obtain a copy of the License at
3881 *
3882 *   http://www.apache.org/licenses/LICENSE-2.0
3883 *
3884 * Unless required by applicable law or agreed to in writing, software
3885 * distributed under the License is distributed on an "AS IS" BASIS,
3886 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3887 * See the License for the specific language governing permissions and
3888 * limitations under the License.
3889 */class __PRIVATE_PersistentStream{constructor(r,a,l,c,u,d,f,m){this.ui=r,this.Ho=l,this.Jo=c,this.connection=u,this.authCredentialsProvider=d,this.appCheckCredentialsProvider=f,this.listener=m,this.state=0,this.Yo=0,this.Zo=null,this.Xo=null,this.stream=null,this.e_=0,this.t_=new __PRIVATE_ExponentialBackoff(r,a)}n_(){return this.state===1||this.state===5||this.r_()}r_(){return this.state===2||this.state===3}start(){this.e_=0,this.state!==4?this.auth():this.i_()}async stop(){this.n_()&&await this.close(0)}s_(){this.state=0,this.t_.reset()}o_(){this.r_()&&this.Zo===null&&(this.Zo=this.ui.enqueueAfterDelay(this.Ho,6e4,()=>this.__()))}a_(r){this.u_(),this.stream.send(r)}async __(){if(this.r_())return this.close(0)}u_(){this.Zo&&(this.Zo.cancel(),this.Zo=null)}
3889c_(){this.Xo&&(this.Xo.cancel(),this.Xo=null)}async close(r,a){this.u_(),this.c_(),this.t_.cancel(),this.Yo++,r!==4?this.t_.reset():a&&a.code===D.RESOURCE_EXHAUSTED?(__PRIVATE_logError(a.toString()),__PRIVATE_logError("Using maximum backoff delay to prevent overloading the backend."),this.t_.Wo()):a&&a.code===D.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.l_(),this.stream.close(),this.stream=null),this.state=r,await this.listener.mo(a)}l_(){}auth(){this.state=1;const r=this.h_(this.Yo),a=this.Yo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([l,c])=>{this.Yo===a&&this.P_(l,c)},l=>{r(()=>{const c=new FirestoreError(D.UNKNOWN,"Fetching auth token failed: "+l.message);return this.I_(c)})})}P_(r,a){const l=this.h_(this.Yo);this.stream=this.T_(r,a),this.stream.Eo(()=>{l(()=>this.listener.Eo())}),this.stream.Ro(()=>{l(()=>(this.state=2,this.Xo=this.ui.enqueueAfterDelay(this.Jo,1e4,()=>(this.r_()&&(this.state=3),Promise.resolve())),this.listener.Ro()))}),this.stream.mo(c=>{l(()=>this.I_(c))}),this.stream.onMessage(c=>{l(()=>++this.e_==1?this.E_(c):this.onNext(c))})}i_(){this.state=5,this.t_.Go(async()=>{this.state=0,this.start()})}I_(r){return __PRIVATE_logDebug("PersistentStream",`close with error: ${r}`),this.stream=null,this.close(4,r)}h_(r){return a=>{this.ui.enqueueAndForget(()=>this.Yo===r?a():(__PRIVATE_logDebug("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class __PRIVATE_PersistentListenStream extends __PRIVATE_PersistentStream{constructor(r,a,l,c,u,d){super(r,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",a,l,c,d),this.serializer=u}T_(r,a){return this.connection.Bo("Listen",r,a)}E_(r){return this.onNext(r)}onNext(r){this.t_.reset();const a=__PRIVATE_fromWatchChange(this.serializer,r),l=function(u){if(!("targetChange"in u))return SnapshotVersion.min();const d=u.targetChange;return d.targetIds&&d.targetIds.length?SnapshotVersion.min():d.readTime?__PRIVATE_fromVersion(d.readTime):SnapshotVersion.min()}(r);return this.listener.d_(a,l)}A_(r){const a={};a.database=__PRIVATE_getEncodedDatabaseId(this.serializer),a.addTarget=function(u,d){let f;const m=d.target;if(f=__PRIVATE_targetIsDocumentTarget(m)?{documents:__PRIVATE_toDocumentsTarget(u,m)}:{query:__PRIVATE_toQueryTarget(u,m)._t},f.targetId=d.targetId,d.resumeToken.approximateByteSize()>0){f.resumeToken=__PRIVATE_toBytes(u,d.resumeToken);const y=__PRIVATE_toInt32Proto(u,d.expectedCount);y!==null&&(f.expectedCount=y)}else if(d.snapshotVersion.compareTo(SnapshotVersion.min())>0){f.readTime=toTimestamp(u,d.snapshotVersion.toTimestamp());const y=__PRIVATE_toInt32Proto(u,d.expectedCount);y!==null&&(f.expectedCount=y)}return f}(this.serializer,r);const l=__PRIVATE_toListenRequestLabels(this.serializer,r);l&&(a.labels=l),this.a_(a)}R_(r){const a={};a.database=__PRIVATE_getEncodedDatabaseId(this.serializer),a.removeTarget=r,this.a_(a)}}class __PRIVATE_PersistentWriteStream extends __PRIVATE_PersistentStream{constructor(r,a,l,c,u,d){super(r,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",a,l,c,d),this.serializer=u}get V_(){return this.e_>0}start(){this.lastStreamToken=void 0,super.start()}l_(){this.V_&&this.m_([])}T_(r,a){return this.connection.Bo("Write",r,a)}E_(r){return __PRIVATE_hardAssert(!!r.streamToken),this.lastStreamToken=r.streamToken,__PRIVATE_hardAssert(!r.writeResults||r.writeResults.length===0),this.listener.f_()}onNext(r){__PRIVATE_hardAssert(!!r.streamToken),this.lastStreamToken=r.streamToken,this.t_.reset();const a=__PRIVATE_fromWriteResults(r.writeResults,r.commitTime),l=__PRIVATE_fromVersion(r.commitTime);return this.listener.g_(l,a)}p_(){const r={};r.database=__PRIVATE_getEncodedDatabaseId(this.serializer),this.a_(r)}m_(r){const a={streamToken:this.lastStreamToken,writes:r.map(l=>toMutation(this.serializer,l))};this.a_(a)}}/**
3890 * @license
3891 * Copyright 2017 Google LLC
3892 *
3893 * Licensed under the Apache License, Version 2.0 (the "License");
3894 * you may not use this file except in compliance with the License.
3895 * You may obtain a copy of the License at
3896 *
3897 *   http://www.apache.org/licenses/LICENSE-2.0
3898 *
3899 * Unless required by applicable law or agreed to in writing, software
3900 * distributed under the License is distributed on an "AS IS" BASIS,
3901 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3902 * See the License for the specific language governing permissions and
3903 * limitations under the License.
3904 */class __PRIVATE_DatastoreImpl extends class{}{constructor(r,a,l,c){super(),this.authCredentials=r,this.appCheckCredentials=a,this.connection=l,this.serializer=c,this.y_=!1}w_(){if(this.y_)throw new FirestoreError(D.FAILED_PRECONDITION,"The client has already been terminated.")}Mo(r,a,l,c){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([u,d])=>this.connection.Mo(r,__PRIVATE_toResourcePath(a,l),c,u,d)).catch(u=>{throw u.name==="FirebaseError"?(u.code===D.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),u):new FirestoreError(D.UNKNOWN,u.toString())})}Lo(r,a,l,c,u){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([d,f])=>this.connection.Lo(r,__PRIVATE_toResourcePath(a,l),c,d,f,u)).catch(d=>{throw d.name==="FirebaseError"?(d.code===D.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),d):new FirestoreError(D.UNKNOWN,d.toString())})}terminate(){this.y_=!0,this.connection.terminate()}}class __PRIVATE_OnlineStateTracker{constructor(r,a){this.asyncQueue=r,this.onlineStateHandler=a,this.state="Unknown",this.S_=0,this.b_=null,this.D_=!0}v_(){this.S_===0&&(this.C_("Unknown"),this.b_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.b_=null,this.F_("Backend didn't respond within 10 seconds."),this.C_("Offline"),Promise.resolve())))}M_(r){this.state==="Online"?this.C_("Unknown"):(this.S_++,this.S_>=1&&(this.x_(),this.F_(`Connection failed 1 times. Most recent error: ${r.toString()}`),this.C_("Offline")))}
3904set(r){this.x_(),this.S_=0,r==="Online"&&(this.D_=!1),this.C_(r)}C_(r){r!==this.state&&(this.state=r,this.onlineStateHandler(r))}F_(r){const a=`Could not reach Cloud Firestore backend. ${r}
3905This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.D_?(__PRIVATE_logError(a),this.D_=!1):__PRIVATE_logDebug("OnlineStateTracker",a)}x_(){this.b_!==null&&(this.b_.cancel(),this.b_=null)}}/**
3906 * @license
3907 * Copyright 2017 Google LLC
3908 *
3909 * Licensed under the Apache License, Version 2.0 (the "License");
3910 * you may not use this file except in compliance with the License.
3911 * You may obtain a copy of the License at
3912 *
3913 *   http://www.apache.org/licenses/LICENSE-2.0
3914 *
3915 * Unless required by applicable law or agreed to in writing, software
3916 * distributed under the License is distributed on an "AS IS" BASIS,
3917 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3918 * See the License for the specific language governing permissions and
3919 * limitations under the License.
3920 */class __PRIVATE_RemoteStoreImpl{constructor(r,a,l,c,u){this.localStore=r,this.datastore=a,this.asyncQueue=l,this.remoteSyncer={},this.O_=[],this.N_=new Map,this.L_=new Set,this.B_=[],this.k_=u,this.k_._o(d=>{l.enqueueAndForget(async()=>{__PRIVATE_canUseNetwork(this)&&(__PRIVATE_logDebug("RemoteStore","Restarting streams for network reachability change."),await async function(m){const y=__PRIVATE_debugCast(m);y.L_.add(4),await __PRIVATE_disableNetworkInternal(y),y.q_.set("Unknown"),y.L_.delete(4),await __PRIVATE_enableNetworkInternal(y)}(this))})}),this.q_=new __PRIVATE_OnlineStateTracker(l,c)}}async function __PRIVATE_enableNetworkInternal(o){if(__PRIVATE_canUseNetwork(o))for(const r of o.B_)await r(!0)}async function __PRIVATE_disableNetworkInternal(o){for(const r of o.B_)await r(!1)}function __PRIVATE_remoteStoreListen(o,r){const a=__PRIVATE_debugCast(o);a.N_.has(r.targetId)||(a.N_.set(r.targetId,r),__PRIVATE_shouldStartWatchStream(a)?__PRIVATE_startWatchStream(a):__PRIVATE_ensureWatchStream(a).r_()&&__PRIVATE_sendWatchRequest(a,r))}function __PRIVATE_remoteStoreUnlisten(o,r){const a=__PRIVATE_debugCast(o),l=__PRIVATE_ensureWatchStream(a);a.N_.delete(r),l.r_()&&__PRIVATE_sendUnwatchRequest(a,r),a.N_.size===0&&(l.r_()?l.o_():__PRIVATE_canUseNetwork(a)&&a.q_.set("Unknown"))}function __PRIVATE_sendWatchRequest(o,r){if(o.Q_.xe(r.targetId),r.resumeToken.approximateByteSize()>0||r.snapshotVersion.compareTo(SnapshotVersion.min())>0){const a=o.remoteSyncer.getRemoteKeysForTarget(r.targetId).size;r=r.withExpectedCount(a)}__PRIVATE_ensureWatchStream(o).A_(r)}function __PRIVATE_sendUnwatchRequest(o,r){o.Q_.xe(r),__PRIVATE_ensureWatchStream(o).R_(r)}function __PRIVATE_startWatchStream(o){o.Q_=new __PRIVATE_WatchChangeAggregator({getRemoteKeysForTarget:r=>o.remoteSyncer.getRemoteKeysForTarget(r),ot:r=>o.N_.get(r)||null,tt:()=>o.datastore.serializer.databaseId}),__PRIVATE_ensureWatchStream(o).start(),o.q_.v_()}function __PRIVATE_shouldStartWatchStream(o){return __PRIVATE_canUseNetwork(o)&&!__PRIVATE_ensureWatchStream(o).n_()&&o.N_.size>0}function __PRIVATE_canUseNetwork(o){return __PRIVATE_debugCast(o).L_.size===0}function __PRIVATE_cleanUpWatchStreamState(o){o.Q_=void 0}async function __PRIVATE_onWatchStreamConnected(o){o.q_.set("Online")}async function __PRIVATE_onWatchStreamOpen(o){o.N_.forEach((r,a)=>{__PRIVATE_sendWatchRequest(o,r)})}async function __PRIVATE_onWatchStreamClose(o,r){__PRIVATE_cleanUpWatchStreamState(o),__PRIVATE_shouldStartWatchStream(o)?(o.q_.M_(r),__PRIVATE_startWatchStream(o)):o.q_.set("Unknown")}async function __PRIVATE_onWatchStreamChange(o,r,a){if(o.q_.set("Online"),r instanceof __PRIVATE_WatchTargetChange&&r.state===2&&r.cause)try{await async function(c,u){const d=u.cause;for(const f of u.targetIds)c.N_.has(f)&&(await c.remoteSyncer.rejectListen(f,d),c.N_.delete(f),c.Q_.removeTarget(f))}(o,r)}catch(l){__PRIVATE_logDebug("RemoteStore","Failed to remove targets %s: %s ",r.targetIds.join(","),l),await __PRIVATE_disableNetworkUntilRecovery(o,l)}else if(r instanceof __PRIVATE_DocumentWatchChange?o.Q_.Ke(r):r instanceof __PRIVATE_ExistenceFilterChange?o.Q_.He(r):o.Q_.We(r),!a.isEqual(SnapshotVersion.min()))try{const l=await __PRIVATE_localStoreGetLastRemoteSnapshotVersion(o.localStore);a.compareTo(l)>=0&&await function(u,d){const f=u.Q_.rt(d);
3920return f.targetChanges.forEach((m,y)=>{if(m.resumeToken.approximateByteSize()>0){const E=u.N_.get(y);E&&u.N_.set(y,E.withResumeToken(m.resumeToken,d))}}),f.targetMismatches.forEach((m,y)=>{const E=u.N_.get(m);if(!E)return;u.N_.set(m,E.withResumeToken(ByteString.EMPTY_BYTE_STRING,E.snapshotVersion)),__PRIVATE_sendUnwatchRequest(u,m);const A=new TargetData(E.target,m,y,E.sequenceNumber);__PRIVATE_sendWatchRequest(u,A)}),u.remoteSyncer.applyRemoteEvent(f)}(o,a)}catch(l){__PRIVATE_logDebug("RemoteStore","Failed to raise snapshot:",l),await __PRIVATE_disableNetworkUntilRecovery(o,l)}}async function __PRIVATE_disableNetworkUntilRecovery(o,r,a){if(!__PRIVATE_isIndexedDbTransactionError(r))throw r;o.L_.add(1),await __PRIVATE_disableNetworkInternal(o),o.q_.set("Offline"),a||(a=()=>__PRIVATE_localStoreGetLastRemoteSnapshotVersion(o.localStore)),o.asyncQueue.enqueueRetryable(async()=>{__PRIVATE_logDebug("RemoteStore","Retrying IndexedDB access"),await a(),o.L_.delete(1),await __PRIVATE_enableNetworkInternal(o)})}function __PRIVATE_executeWithRecovery(o,r){return r().catch(a=>__PRIVATE_disableNetworkUntilRecovery(o,a,r))}async function __PRIVATE_fillWritePipeline(o){const r=__PRIVATE_debugCast(o),a=__PRIVATE_ensureWriteStream(r);let l=r.O_.length>0?r.O_[r.O_.length-1].batchId:-1;for(;__PRIVATE_canAddToWritePipeline(r);)try{const c=await __PRIVATE_localStoreGetNextMutationBatch(r.localStore,l);if(c===null){r.O_.length===0&&a.o_();break}l=c.batchId,__PRIVATE_addToWritePipeline(r,c)}catch(c){await __PRIVATE_disableNetworkUntilRecovery(r,c)}__PRIVATE_shouldStartWriteStream(r)&&__PRIVATE_startWriteStream(r)}function __PRIVATE_canAddToWritePipeline(o){return __PRIVATE_canUseNetwork(o)&&o.O_.length<10}function __PRIVATE_addToWritePipeline(o,r){o.O_.push(r);const a=__PRIVATE_ensureWriteStream(o);a.r_()&&a.V_&&a.m_(r.mutations)}function __PRIVATE_shouldStartWriteStream(o){return __PRIVATE_canUseNetwork(o)&&!__PRIVATE_ensureWriteStream(o).n_()&&o.O_.length>0}function __PRIVATE_startWriteStream(o){__PRIVATE_ensureWriteStream(o).start()}async function __PRIVATE_onWriteStreamOpen(o){__PRIVATE_ensureWriteStream(o).p_()}async function __PRIVATE_onWriteHandshakeComplete(o){const r=__PRIVATE_ensureWriteStream(o);for(const a of o.O_)r.m_(a.mutations)}async function __PRIVATE_onMutationResult(o,r,a){const l=o.O_.shift(),c=MutationBatchResult.from(l,r,a);await __PRIVATE_executeWithRecovery(o,()=>o.remoteSyncer.applySuccessfulWrite(c)),await __PRIVATE_fillWritePipeline(o)}async function __PRIVATE_onWriteStreamClose(o,r){r&&__PRIVATE_ensureWriteStream(o).V_&&await async function(l,c){if(function(d){return __PRIVATE_isPermanentError(d)&&d!==D.ABORTED}(c.code)){const u=l.O_.shift();__PRIVATE_ensureWriteStream(l).s_(),await __PRIVATE_executeWithRecovery(l,()=>l.remoteSyncer.rejectFailedWrite(u.batchId,c)),await __PRIVATE_fillWritePipeline(l)}}(o,r),__PRIVATE_shouldStartWriteStream(o)&&__PRIVATE_startWriteStream(o)}async function __PRIVATE_remoteStoreHandleCredentialChange(o,r){const a=__PRIVATE_debugCast(o);a.asyncQueue.verifyOperationInProgress(),__PRIVATE_logDebug("RemoteStore","RemoteStore received new credentials");const l=__PRIVATE_canUseNetwork(a);a.L_.add(3),await __PRIVATE_disableNetworkInternal(a),l&&a.q_.set("Unknown"),await a.remoteSyncer.handleCredentialChange(r),a.L_.delete(3),await __PRIVATE_enableNetworkInternal(a)}async function __PRIVATE_remoteStoreApplyPrimaryState(o,r){const a=__PRIVATE_debugCast(o);r?(a.L_.delete(2),await __PRIVATE_enableNetworkInternal(a)):r||(a.L_.add(2),await __PRIVATE_disableNetworkInternal(a),a.q_.set("Unknown"))}function __PRIVATE_ensureWatchStream(o){return o.K_||(o.K_=function(a,l,c){const u=__PRIVATE_debugCast(a);return u.w_(),new __PRIVATE_PersistentListenStream(l,u.connection,u.authCredentials,u.appCheckCredentials,u.serializer,c)}(o.datastore,o.asyncQueue,{Eo:__PRIVATE_onWatchStreamConnected.bind(null,o),Ro:__PRIVATE_onWatchStreamOpen.bind(null,o),mo:__PRIVATE_onWatchStreamClose.bind(null,o),d_:__PRIVATE_onWatchStreamChange.bind(null,o)}),o.B_.push(async r=>{r?(o.K_.s_(),__PRIVATE_shouldStartWatchStream(o)?__PRIVATE_startWatchStream(o):o.q_.set("Unknown")):(await o.K_.stop(),__PRIVATE_cleanUpWatchStreamState(o))}
3920)),o.K_}function __PRIVATE_ensureWriteStream(o){return o.U_||(o.U_=function(a,l,c){const u=__PRIVATE_debugCast(a);return u.w_(),new __PRIVATE_PersistentWriteStream(l,u.connection,u.authCredentials,u.appCheckCredentials,u.serializer,c)}(o.datastore,o.asyncQueue,{Eo:()=>Promise.resolve(),Ro:__PRIVATE_onWriteStreamOpen.bind(null,o),mo:__PRIVATE_onWriteStreamClose.bind(null,o),f_:__PRIVATE_onWriteHandshakeComplete.bind(null,o),g_:__PRIVATE_onMutationResult.bind(null,o)}),o.B_.push(async r=>{r?(o.U_.s_(),await __PRIVATE_fillWritePipeline(o)):(await o.U_.stop(),o.O_.length>0&&(__PRIVATE_logDebug("RemoteStore",`Stopping write stream with ${o.O_.length} pending writes`),o.O_=[]))})),o.U_}/**
3921 * @license
3922 * Copyright 2017 Google LLC
3923 *
3924 * Licensed under the Apache License, Version 2.0 (the "License");
3925 * you may not use this file except in compliance with the License.
3926 * You may obtain a copy of the License at
3927 *
3928 *   http://www.apache.org/licenses/LICENSE-2.0
3929 *
3930 * Unless required by applicable law or agreed to in writing, software
3931 * distributed under the License is distributed on an "AS IS" BASIS,
3932 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3933 * See the License for the specific language governing permissions and
3934 * limitations under the License.
3935 */class DelayedOperation{constructor(r,a,l,c,u){this.asyncQueue=r,this.timerId=a,this.targetTimeMs=l,this.op=c,this.removalCallback=u,this.deferred=new __PRIVATE_Deferred,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(d=>{})}get promise(){return this.deferred.promise}static createAndSchedule(r,a,l,c,u){const d=Date.now()+l,f=new DelayedOperation(r,a,d,c,u);return f.start(l),f}start(r){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),r)}skipDelay(){return this.handleDelayElapsed()}cancel(r){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new FirestoreError(D.CANCELLED,"Operation cancelled"+(r?": "+r:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(r=>this.deferred.resolve(r))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function __PRIVATE_wrapInUserErrorIfRecoverable(o,r){if(__PRIVATE_logError("AsyncQueue",`${r}: ${o}`),__PRIVATE_isIndexedDbTransactionError(o))return new FirestoreError(D.UNAVAILABLE,`${r}: ${o}`);throw o}/**
3936 * @license
3937 * Copyright 2017 Google LLC
3938 *
3939 * Licensed under the Apache License, Version 2.0 (the "License");
3940 * you may not use this file except in compliance with the License.
3941 * You may obtain a copy of the License at
3942 *
3943 *   http://www.apache.org/licenses/LICENSE-2.0
3944 *
3945 * Unless required by applicable law or agreed to in writing, software
3946 * distributed under the License is distributed on an "AS IS" BASIS,
3947 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3948 * See the License for the specific language governing permissions and
3949 * limitations under the License.
3950 */class DocumentSet{constructor(r){this.comparator=r?(a,l)=>r(a,l)||DocumentKey.comparator(a.key,l.key):(a,l)=>DocumentKey.comparator(a.key,l.key),this.keyedMap=documentMap(),this.sortedSet=new SortedMap(this.comparator)}static emptySet(r){return new DocumentSet(r.comparator)}has(r){return this.keyedMap.get(r)!=null}get(r){return this.keyedMap.get(r)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(r){const a=this.keyedMap.get(r);return a?this.sortedSet.indexOf(a):-1}get size(){return this.sortedSet.size}forEach(r){this.sortedSet.inorderTraversal((a,l)=>(r(a),!1))}add(r){const a=this.delete(r.key);return a.copy(a.keyedMap.insert(r.key,r),a.sortedSet.insert(r,null))}delete(r){const a=this.get(r);return a?this.copy(this.keyedMap.remove(r),this.sortedSet.remove(a)):this}isEqual(r){if(!(r instanceof DocumentSet)||this.size!==r.size)return!1;const a=this.sortedSet.getIterator(),l=r.sortedSet.getIterator();for(;a.hasNext();){const c=a.getNext().key,u=l.getNext().key;if(!c.isEqual(u))return!1}return!0}toString(){const r=[];return this.forEach(a=>{r.push(a.toString())}),r.length===0?"DocumentSet ()":`DocumentSet (
3951  `+r.join(`  
3952`)+`
3953)`}copy(r,a){const l=new DocumentSet;return l.comparator=this.comparator,l.keyedMap=r,l.sortedSet=a,l}}/**
3954 * @license
3955 * Copyright 2017 Google LLC
3956 *
3957 * Licensed under the Apache License, Version 2.0 (the "License");
3958 * you may not use this file except in compliance with the License.
3959 * You may obtain a copy of the License at
3960 *
3961 *   http://www.apache.org/licenses/LICENSE-2.0
3962 *
3963 * Unless required by applicable law or agreed to in writing, software
3964 * distributed under the License is distributed on an "AS IS" BASIS,
3965 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3966 * See the License for the specific language governing permissions and
3967 * limitations under the License.
3968 */class __PRIVATE_DocumentChangeSet{constructor(){this.W_=new SortedMap(DocumentKey.comparator)}track(r){const a=r.doc.key,l=this.W_.get(a);l?r.type!==0&&l.type===3?this.W_=this.W_.insert(a,r):r.type===3&&l.type!==1?this.W_=this.W_.insert(a,{type:l.type,doc:r.doc}):r.type===2&&l.type===2?this.W_=this.W_.insert(a,{type:2,doc:r.doc}):r.type===2&&l.type===0?this.W_=this.W_.insert(a,{type:0,doc:r.doc}):r.type===1&&l.type===0?this.W_=this.W_.remove(a):r.type===1&&l.type===2?this.W_=this.W_.insert(a,{type:1,doc:l.doc}):r.type===0&&l.type===1?this.W_=this.W_.insert(a,{type:2,doc:r.doc}):fail():this.W_=this.W_.insert(a,r)}G_(){const r=[];return this.W_.inorderTraversal((a,l)=>{r.push(l)}),r}}
3968class ViewSnapshot{constructor(r,a,l,c,u,d,f,m,y){this.query=r,this.docs=a,this.oldDocs=l,this.docChanges=c,this.mutatedKeys=u,this.fromCache=d,this.syncStateChanged=f,this.excludesMetadataChanges=m,this.hasCachedResults=y}static fromInitialDocuments(r,a,l,c,u){const d=[];return a.forEach(f=>{d.push({type:0,doc:f})}),new ViewSnapshot(r,a,DocumentSet.emptySet(a),d,l,c,!0,!1,u)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(r){if(!(this.fromCache===r.fromCache&&this.hasCachedResults===r.hasCachedResults&&this.syncStateChanged===r.syncStateChanged&&this.mutatedKeys.isEqual(r.mutatedKeys)&&__PRIVATE_queryEquals(this.query,r.query)&&this.docs.isEqual(r.docs)&&this.oldDocs.isEqual(r.oldDocs)))return!1;const a=this.docChanges,l=r.docChanges;if(a.length!==l.length)return!1;for(let c=0;c<a.length;c++)if(a[c].type!==l[c].type||!a[c].doc.isEqual(l[c].doc))return!1;return!0}}/**
3969 * @license
3970 * Copyright 2017 Google LLC
3971 *
3972 * Licensed under the Apache License, Version 2.0 (the "License");
3973 * you may not use this file except in compliance with the License.
3974 * You may obtain a copy of the License at
3975 *
3976 *   http://www.apache.org/licenses/LICENSE-2.0
3977 *
3978 * Unless required by applicable law or agreed to in writing, software
3979 * distributed under the License is distributed on an "AS IS" BASIS,
3980 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3981 * See the License for the specific language governing permissions and
3982 * limitations under the License.
3983 */class __PRIVATE_QueryListenersInfo{constructor(){this.z_=void 0,this.j_=[]}H_(){return this.j_.some(r=>r.J_())}}class __PRIVATE_EventManagerImpl{constructor(){this.queries=__PRIVATE_newQueriesObjectMap(),this.onlineState="Unknown",this.Y_=new Set}terminate(){(function(a,l){const c=__PRIVATE_debugCast(a),u=c.queries;c.queries=__PRIVATE_newQueriesObjectMap(),u.forEach((d,f)=>{for(const m of f.j_)m.onError(l)})})(this,new FirestoreError(D.ABORTED,"Firestore shutting down"))}}function __PRIVATE_newQueriesObjectMap(){return new ObjectMap(o=>__PRIVATE_canonifyQuery(o),__PRIVATE_queryEquals)}async function __PRIVATE_eventManagerListen(o,r){const a=__PRIVATE_debugCast(o);let l=3;const c=r.query;let u=a.queries.get(c);u?!u.H_()&&r.J_()&&(l=2):(u=new __PRIVATE_QueryListenersInfo,l=r.J_()?0:1);try{switch(l){case 0:u.z_=await a.onListen(c,!0);break;case 1:u.z_=await a.onListen(c,!1);break;case 2:await a.onFirstRemoteStoreListen(c)}}catch(d){const f=__PRIVATE_wrapInUserErrorIfRecoverable(d,`Initialization of query '${__PRIVATE_stringifyQuery(r.query)}' failed`);return void r.onError(f)}a.queries.set(c,u),u.j_.push(r),r.Z_(a.onlineState),u.z_&&r.X_(u.z_)&&__PRIVATE_raiseSnapshotsInSyncEvent(a)}async function __PRIVATE_eventManagerUnlisten(o,r){const a=__PRIVATE_debugCast(o),l=r.query;let c=3;const u=a.queries.get(l);if(u){const d=u.j_.indexOf(r);d>=0&&(u.j_.splice(d,1),u.j_.length===0?c=r.J_()?0:1:!u.H_()&&r.J_()&&(c=2))}switch(c){case 0:return a.queries.delete(l),a.onUnlisten(l,!0);case 1:return a.queries.delete(l),a.onUnlisten(l,!1);case 2:return a.onLastRemoteStoreUnlisten(l);default:return}}function __PRIVATE_eventManagerOnWatchChange(o,r){const a=__PRIVATE_debugCast(o);let l=!1;for(const c of r){const u=c.query,d=a.queries.get(u);if(d){for(const f of d.j_)f.X_(c)&&(l=!0);d.z_=c}}l&&__PRIVATE_raiseSnapshotsInSyncEvent(a)}function __PRIVATE_eventManagerOnWatchError(o,r,a){const l=__PRIVATE_debugCast(o),c=l.queries.get(r);if(c)for(const u of c.j_)u.onError(a);l.queries.delete(r)}function __PRIVATE_raiseSnapshotsInSyncEvent(o){o.Y_.forEach(r=>{r.next()})}var pe,ye;(ye=pe||(pe={})).ea="default",ye.Cache="cache";class __PRIVATE_QueryListener{constructor(r,a,l){this.query=r,this.ta=a,this.na=!1,this.ra=null,this.onlineState="Unknown",this.options=l||{}}X_(r){if(!this.options.includeMetadataChanges){const l=[];for(const c of r.docChanges)c.type!==3&&l.push(c);r=new ViewSnapshot(r.query,r.docs,r.oldDocs,l,r.mutatedKeys,r.fromCache,r.syncStateChanged,!0,r.hasCachedResults)}let a=!1;return this.na?this.ia(r)&&(this.ta.next(r),a=!0):this.sa(r,this.onlineState)&&(this.oa(r),a=!0),this.ra=r,a}onError(r){this.ta.error(r)}Z_(r){this.onlineState=r;let a=!1;return this.ra&&!this.na&&this.sa(this.ra,r)&&(this.oa(this.ra),a=!0),a}sa(r,a){if(!r.fromCache||!this.J_())return!0;const l=a!=="Offline";return(!this.options._a||!l)&&(!r.docs.isEmpty()||r.hasCachedResults||a==="Offline")}ia(r){if(r.docChanges.length>0)return!0;const a=this.ra&&this.ra.hasPendingWrites!==r.hasPendingWrites;return!(!r.syncStateChanged&&!a)&&this.options.includeMetadataChanges===!0}
3983oa(r){r=ViewSnapshot.fromInitialDocuments(r.query,r.docs,r.mutatedKeys,r.fromCache,r.hasCachedResults),this.na=!0,this.ta.next(r)}J_(){return this.options.source!==pe.Cache}}/**
3984 * @license
3985 * Copyright 2017 Google LLC
3986 *
3987 * Licensed under the Apache License, Version 2.0 (the "License");
3988 * you may not use this file except in compliance with the License.
3989 * You may obtain a copy of the License at
3990 *
3991 *   http://www.apache.org/licenses/LICENSE-2.0
3992 *
3993 * Unless required by applicable law or agreed to in writing, software
3994 * distributed under the License is distributed on an "AS IS" BASIS,
3995 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3996 * See the License for the specific language governing permissions and
3997 * limitations under the License.
3998 */class __PRIVATE_AddedLimboDocument{constructor(r){this.key=r}}class __PRIVATE_RemovedLimboDocument{constructor(r){this.key=r}}class __PRIVATE_View{constructor(r,a){this.query=r,this.Ta=a,this.Ea=null,this.hasCachedResults=!1,this.current=!1,this.da=__PRIVATE_documentKeySet(),this.mutatedKeys=__PRIVATE_documentKeySet(),this.Aa=__PRIVATE_newQueryComparator(r),this.Ra=new DocumentSet(this.Aa)}get Va(){return this.Ta}ma(r,a){const l=a?a.fa:new __PRIVATE_DocumentChangeSet,c=a?a.Ra:this.Ra;let u=a?a.mutatedKeys:this.mutatedKeys,d=c,f=!1;const m=this.query.limitType==="F"&&c.size===this.query.limit?c.last():null,y=this.query.limitType==="L"&&c.size===this.query.limit?c.first():null;if(r.inorderTraversal((E,A)=>{const P=c.get(E),R=__PRIVATE_queryMatches(this.query,A)?A:null,x=!!P&&this.mutatedKeys.has(P.key),M=!!R&&(R.hasLocalMutations||this.mutatedKeys.has(R.key)&&R.hasCommittedMutations);let $=!1;P&&R?P.data.isEqual(R.data)?x!==M&&(l.track({type:3,doc:R}),$=!0):this.ga(P,R)||(l.track({type:2,doc:R}),$=!0,(m&&this.Aa(R,m)>0||y&&this.Aa(R,y)<0)&&(f=!0)):!P&&R?(l.track({type:0,doc:R}),$=!0):P&&!R&&(l.track({type:1,doc:P}),$=!0,(m||y)&&(f=!0)),$&&(R?(d=d.add(R),u=M?u.add(E):u.delete(E)):(d=d.delete(E),u=u.delete(E)))}),this.query.limit!==null)for(;d.size>this.query.limit;){const E=this.query.limitType==="F"?d.last():d.first();d=d.delete(E.key),u=u.delete(E.key),l.track({type:1,doc:E})}return{Ra:d,fa:l,ns:f,mutatedKeys:u}}ga(r,a){return r.hasLocalMutations&&a.hasCommittedMutations&&!a.hasLocalMutations}applyChanges(r,a,l,c){const u=this.Ra;this.Ra=r.Ra,this.mutatedKeys=r.mutatedKeys;const d=r.fa.G_();d.sort((E,A)=>function(R,x){const M=$=>{switch($){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return fail()}};return M(R)-M(x)}(E.type,A.type)||this.Aa(E.doc,A.doc)),this.pa(l),c=c!=null&&c;const f=a&&!c?this.ya():[],m=this.da.size===0&&this.current&&!c?1:0,y=m!==this.Ea;return this.Ea=m,d.length!==0||y?{snapshot:new ViewSnapshot(this.query,r.Ra,u,d,r.mutatedKeys,m===0,y,!1,!!l&&l.resumeToken.approximateByteSize()>0),wa:f}:{wa:f}}Z_(r){return this.current&&r==="Offline"?(this.current=!1,this.applyChanges({Ra:this.Ra,fa:new __PRIVATE_DocumentChangeSet,mutatedKeys:this.mutatedKeys,ns:!1},!1)):{wa:[]}}Sa(r){return!this.Ta.has(r)&&!!this.Ra.has(r)&&!this.Ra.get(r).hasLocalMutations}pa(r){r&&(r.addedDocuments.forEach(a=>this.Ta=this.Ta.add(a)),r.modifiedDocuments.forEach(a=>{}),r.removedDocuments.forEach(a=>this.Ta=this.Ta.delete(a)),this.current=r.current)}ya(){if(!this.current)return[];const r=this.da;this.da=__PRIVATE_documentKeySet(),this.Ra.forEach(l=>
3998{this.Sa(l.key)&&(this.da=this.da.add(l.key))});const a=[];return r.forEach(l=>{this.da.has(l)||a.push(new __PRIVATE_RemovedLimboDocument(l))}),this.da.forEach(l=>{r.has(l)||a.push(new __PRIVATE_AddedLimboDocument(l))}),a}ba(r){this.Ta=r.Ts,this.da=__PRIVATE_documentKeySet();const a=this.ma(r.documents);return this.applyChanges(a,!0)}Da(){return ViewSnapshot.fromInitialDocuments(this.query,this.Ra,this.mutatedKeys,this.Ea===0,this.hasCachedResults)}}class __PRIVATE_QueryView{constructor(r,a,l){this.query=r,this.targetId=a,this.view=l}}class LimboResolution{constructor(r){this.key=r,this.va=!1}}class __PRIVATE_SyncEngineImpl{constructor(r,a,l,c,u,d){this.localStore=r,this.remoteStore=a,this.eventManager=l,this.sharedClientState=c,this.currentUser=u,this.maxConcurrentLimboResolutions=d,this.Ca={},this.Fa=new ObjectMap(f=>__PRIVATE_canonifyQuery(f),__PRIVATE_queryEquals),this.Ma=new Map,this.xa=new Set,this.Oa=new SortedMap(DocumentKey.comparator),this.Na=new Map,this.La=new __PRIVATE_ReferenceSet,this.Ba={},this.ka=new Map,this.qa=__PRIVATE_TargetIdGenerator.kn(),this.onlineState="Unknown",this.Qa=void 0}get isPrimaryClient(){return this.Qa===!0}}async function __PRIVATE_syncEngineListen(o,r,a=!0){const l=__PRIVATE_ensureWatchCallbacks(o);let c;const u=l.Fa.get(r);return u?(l.sharedClientState.addLocalQueryTarget(u.targetId),c=u.view.Da()):c=await __PRIVATE_allocateTargetAndMaybeListen(l,r,a,!0),c}async function __PRIVATE_triggerRemoteStoreListen(o,r){const a=__PRIVATE_ensureWatchCallbacks(o);await __PRIVATE_allocateTargetAndMaybeListen(a,r,!0,!1)}async function __PRIVATE_allocateTargetAndMaybeListen(o,r,a,l){const c=await __PRIVATE_localStoreAllocateTarget(o.localStore,__PRIVATE_queryToTarget(r)),u=c.targetId,d=o.sharedClientState.addLocalQueryTarget(u,a);let f;return l&&(f=await __PRIVATE_initializeViewAndComputeSnapshot(o,r,u,d==="current",c.resumeToken)),o.isPrimaryClient&&a&&__PRIVATE_remoteStoreListen(o.remoteStore,c),f}async function __PRIVATE_initializeViewAndComputeSnapshot(o,r,a,l,c){o.Ka=(A,P,R)=>async function(M,$,V,B){let O=$.view.ma(V);O.ns&&(O=await __PRIVATE_localStoreExecuteQuery(M.localStore,$.query,!1).then(({documents:U})=>$.view.ma(U,O)));const L=B&&B.targetChanges.get($.targetId),F=B&&B.targetMismatches.get($.targetId)!=null,j=$.view.applyChanges(O,M.isPrimaryClient,L,F);return __PRIVATE_updateTrackedLimbos(M,$.targetId,j.wa),j.snapshot}(o,A,P,R);const u=await __PRIVATE_localStoreExecuteQuery(o.localStore,r,!0),d=new __PRIVATE_View(r,u.Ts),f=d.ma(u.documents),m=TargetChange.createSynthesizedTargetChangeForCurrentChange(a,l&&o.onlineState!=="Offline",c),y=d.applyChanges(f,o.isPrimaryClient,m);__PRIVATE_updateTrackedLimbos(o,a,y.wa);const E=new __PRIVATE_QueryView(r,a,d);return o.Fa.set(r,E),o.Ma.has(a)?o.Ma.get(a).push(r):o.Ma.set(a,[r]),y.snapshot}async function __PRIVATE_syncEngineUnlisten(o,r,a){const l=__PRIVATE_debugCast(o),c=l.Fa.get(r),u=l.Ma.get(c.targetId);if(u.length>1)return l.Ma.set(c.targetId,u.filter(d=>!__PRIVATE_queryEquals(d,r))),void l.Fa.delete(r);l.isPrimaryClient?(l.sharedClientState.removeLocalQueryTarget(c.targetId),l.sharedClientState.isActiveQueryTarget(c.targetId)||await __PRIVATE_localStoreReleaseTarget(l.localStore,c.targetId,!1).then(()=>{l.sharedClientState.clearQueryState(c.targetId),a&&__PRIVATE_remoteStoreUnlisten(l.remoteStore,c.targetId),__PRIVATE_removeAndCleanupTarget(l,c.targetId)}).catch(__PRIVATE_ignoreIfPrimaryLeaseLoss)):(__PRIVATE_removeAndCleanupTarget(l,c.targetId),await __PRIVATE_localStoreReleaseTarget(l.localStore,c.targetId,!0))}async function __PRIVATE_triggerRemoteStoreUnlisten(o,r){const a=__PRIVATE_debugCast(o),l=a.Fa.get(r),c=a.Ma.get(l.targetId);a.isPrimaryClient&&c.length===1&&(a.sharedClientState.removeLocalQueryTarget(l.targetId),__PRIVATE_remoteStoreUnlisten(a.remoteStore,l.targetId))}async function __PRIVATE_syncEngineWrite(o,r,a){const l=__PRIVATE_syncEngineEnsureWriteCallbacks(o);try{const c=await function(d,f){const m=__PRIVATE_debugCast(d),y=Timestamp.now(),E=f.reduce((R,x)=>R.add(x.key),__PRIVATE_documentKeySet());let A,P;return m.persistence.runTransaction("Locally write mutations","readwrite",R=>{let x=__PRIVATE_mutableDocumentMap(),M=__PRIVATE_documentKeySet();return m.cs.getEntries(R,E).next($=>{x=$,x.forEach((V,B)=>{B.isValidDocument()||(M=M.add(V))})}).next(()=>m.localDocuments.getOverlayedDocuments(R,x)).next($=>{A=$;const V=[];for(const B of f){const O=__PRIVATE_mutationExtractBaseValue(B,A.get(B.key).overlayedDocument);O!=null&&V.push(new __PRIVATE_PatchMutation(B.key,O,__PRIVATE_extractFieldMask(O.value.mapValue),Precondition.exists(!0)))}
3998return m.mutationQueue.addMutationBatch(R,y,V,f)}).next($=>{P=$;const V=$.applyToLocalDocumentSet(A,M);return m.documentOverlayCache.saveOverlays(R,$.batchId,V)})}).then(()=>({batchId:P.batchId,changes:__PRIVATE_convertOverlayedDocumentMapToDocumentMap(A)}))}(l.localStore,r);l.sharedClientState.addPendingMutation(c.batchId),function(d,f,m){let y=d.Ba[d.currentUser.toKey()];y||(y=new SortedMap(__PRIVATE_primitiveComparator)),y=y.insert(f,m),d.Ba[d.currentUser.toKey()]=y}(l,c.batchId,a),await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(l,c.changes),await __PRIVATE_fillWritePipeline(l.remoteStore)}catch(c){const u=__PRIVATE_wrapInUserErrorIfRecoverable(c,"Failed to persist write");a.reject(u)}}async function __PRIVATE_syncEngineApplyRemoteEvent(o,r){const a=__PRIVATE_debugCast(o);try{const l=await __PRIVATE_localStoreApplyRemoteEventToLocalCache(a.localStore,r);r.targetChanges.forEach((c,u)=>{const d=a.Na.get(u);d&&(__PRIVATE_hardAssert(c.addedDocuments.size+c.modifiedDocuments.size+c.removedDocuments.size<=1),c.addedDocuments.size>0?d.va=!0:c.modifiedDocuments.size>0?__PRIVATE_hardAssert(d.va):c.removedDocuments.size>0&&(__PRIVATE_hardAssert(d.va),d.va=!1))}),await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(a,l,r)}catch(l){await __PRIVATE_ignoreIfPrimaryLeaseLoss(l)}}function __PRIVATE_syncEngineApplyOnlineStateChange(o,r,a){const l=__PRIVATE_debugCast(o);if(l.isPrimaryClient&&a===0||!l.isPrimaryClient&&a===1){const c=[];l.Fa.forEach((u,d)=>{const f=d.view.Z_(r);f.snapshot&&c.push(f.snapshot)}),function(d,f){const m=__PRIVATE_debugCast(d);m.onlineState=f;let y=!1;m.queries.forEach((E,A)=>{for(const P of A.j_)P.Z_(f)&&(y=!0)}),y&&__PRIVATE_raiseSnapshotsInSyncEvent(m)}(l.eventManager,r),c.length&&l.Ca.d_(c),l.onlineState=r,l.isPrimaryClient&&l.sharedClientState.setOnlineState(r)}}async function __PRIVATE_syncEngineRejectListen(o,r,a){const l=__PRIVATE_debugCast(o);l.sharedClientState.updateQueryState(r,"rejected",a);const c=l.Na.get(r),u=c&&c.key;if(u){let d=new SortedMap(DocumentKey.comparator);d=d.insert(u,MutableDocument.newNoDocument(u,SnapshotVersion.min()));const f=__PRIVATE_documentKeySet().add(u),m=new RemoteEvent(SnapshotVersion.min(),new Map,new SortedMap(__PRIVATE_primitiveComparator),d,f);await __PRIVATE_syncEngineApplyRemoteEvent(l,m),l.Oa=l.Oa.remove(u),l.Na.delete(r),__PRIVATE_pumpEnqueuedLimboResolutions(l)}else await __PRIVATE_localStoreReleaseTarget(l.localStore,r,!1).then(()=>__PRIVATE_removeAndCleanupTarget(l,r,a)).catch(__PRIVATE_ignoreIfPrimaryLeaseLoss)}async function __PRIVATE_syncEngineApplySuccessfulWrite(o,r){const a=__PRIVATE_debugCast(o),l=r.batch.batchId;try{const c=await __PRIVATE_localStoreAcknowledgeBatch(a.localStore,r);__PRIVATE_processUserCallback(a,l,null),__PRIVATE_triggerPendingWritesCallbacks(a,l),a.sharedClientState.updateMutationState(l,"acknowledged"),await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(a,c)}catch(c){await __PRIVATE_ignoreIfPrimaryLeaseLoss(c)}}async function __PRIVATE_syncEngineRejectFailedWrite(o,r,a){const l=__PRIVATE_debugCast(o);try{const c=await function(d,f){const m=__PRIVATE_debugCast(d);return m.persistence.runTransaction("Reject batch","readwrite-primary",y=>{let E;return m.mutationQueue.lookupMutationBatch(y,f).next(A=>(__PRIVATE_hardAssert(A!==null),E=A.keys(),m.mutationQueue.removeMutationBatch(y,A))).next(()=>m.mutationQueue.performConsistencyCheck(y)).next(()=>m.documentOverlayCache.removeOverlaysForBatchId(y,E,f)).next(()=>m.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(y,E)).next(()=>m.localDocuments.getDocuments(y,E))})}(l.localStore,r);__PRIVATE_processUserCallback(l,r,a),__PRIVATE_triggerPendingWritesCallbacks(l,r),l.sharedClientState.updateMutationState(r,"rejected",a),await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(l,c)}catch(c){await __PRIVATE_ignoreIfPrimaryLeaseLoss(c)}}function __PRIVATE_triggerPendingWritesCallbacks(o,r){(o.ka.get(r)||[]).forEach(a=>{a.resolve()}),o.ka.delete(r)}function __PRIVATE_processUserCallback(o,r,a){const l=__PRIVATE_debugCast(o);let c=l.Ba[l.currentUser.toKey()];if(c){const u=c.get(r);u&&(a?u.reject(a):u.resolve(),c=c.remove(r)),l.Ba[l.currentUser.toKey()]=c}}function __PRIVATE_removeAndCleanupTarget(o,r,a=null){o.sharedCl
3998ientState.removeLocalQueryTarget(r);for(const l of o.Ma.get(r))o.Fa.delete(l),a&&o.Ca.$a(l,a);o.Ma.delete(r),o.isPrimaryClient&&o.La.gr(r).forEach(l=>{o.La.containsKey(l)||__PRIVATE_removeLimboTarget(o,l)})}function __PRIVATE_removeLimboTarget(o,r){o.xa.delete(r.path.canonicalString());const a=o.Oa.get(r);a!==null&&(__PRIVATE_remoteStoreUnlisten(o.remoteStore,a),o.Oa=o.Oa.remove(r),o.Na.delete(a),__PRIVATE_pumpEnqueuedLimboResolutions(o))}function __PRIVATE_updateTrackedLimbos(o,r,a){for(const l of a)l instanceof __PRIVATE_AddedLimboDocument?(o.La.addReference(l.key,r),__PRIVATE_trackLimboChange(o,l)):l instanceof __PRIVATE_RemovedLimboDocument?(__PRIVATE_logDebug("SyncEngine","Document no longer in limbo: "+l.key),o.La.removeReference(l.key,r),o.La.containsKey(l.key)||__PRIVATE_removeLimboTarget(o,l.key)):fail()}function __PRIVATE_trackLimboChange(o,r){const a=r.key,l=a.path.canonicalString();o.Oa.get(a)||o.xa.has(l)||(__PRIVATE_logDebug("SyncEngine","New document in limbo: "+a),o.xa.add(l),__PRIVATE_pumpEnqueuedLimboResolutions(o))}function __PRIVATE_pumpEnqueuedLimboResolutions(o){for(;o.xa.size>0&&o.Oa.size<o.maxConcurrentLimboResolutions;){const r=o.xa.values().next().value;o.xa.delete(r);const a=new DocumentKey(ResourcePath.fromString(r)),l=o.qa.next();o.Na.set(l,new LimboResolution(a)),o.Oa=o.Oa.insert(a,l),__PRIVATE_remoteStoreListen(o.remoteStore,new TargetData(__PRIVATE_queryToTarget(__PRIVATE_newQueryForPath(a.path)),l,"TargetPurposeLimboResolution",__PRIVATE_ListenSequence.oe))}}async function __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(o,r,a){const l=__PRIVATE_debugCast(o),c=[],u=[],d=[];l.Fa.isEmpty()||(l.Fa.forEach((f,m)=>{d.push(l.Ka(m,r,a).then(y=>{var E;if((y||a)&&l.isPrimaryClient){const A=y?!y.fromCache:(E=a==null?void 0:a.targetChanges.get(m.targetId))===null||E===void 0?void 0:E.current;l.sharedClientState.updateQueryState(m.targetId,A?"current":"not-current")}if(y){c.push(y);const A=__PRIVATE_LocalViewChanges.Wi(m.targetId,y);u.push(A)}}))}),await Promise.all(d),l.Ca.d_(c),await async function(m,y){const E=__PRIVATE_debugCast(m);try{await E.persistence.runTransaction("notifyLocalViewChanges","readwrite",A=>PersistencePromise.forEach(y,P=>PersistencePromise.forEach(P.$i,R=>E.persistence.referenceDelegate.addReference(A,P.targetId,R)).next(()=>PersistencePromise.forEach(P.Ui,R=>E.persistence.referenceDelegate.removeReference(A,P.targetId,R)))))}catch(A){if(!__PRIVATE_isIndexedDbTransactionError(A))throw A;__PRIVATE_logDebug("LocalStore","Failed to update sequence numbers: "+A)}for(const A of y){const P=A.targetId;if(!A.fromCache){const R=E.os.get(P),x=R.snapshotVersion,M=R.withLastLimboFreeSnapshotVersion(x);E.os=E.os.insert(P,M)}}}(l.localStore,u))}async function __PRIVATE_syncEngineHandleCredentialChange(o,r){const a=__PRIVATE_debugCast(o);if(!a.currentUser.isEqual(r)){__PRIVATE_logDebug("SyncEngine","User change. New user:",r.toKey());const l=await __PRIVATE_localStoreHandleUserChange(a.localStore,r);a.currentUser=r,function(u,d){u.ka.forEach(f=>{f.forEach(m=>{m.reject(new FirestoreError(D.CANCELLED,d))})}),u.ka.clear()}(a,"'waitForPendingWrites' promise is rejected due to a user change."),a.sharedClientState.handleUserChange(r,l.removedBatchIds,l.addedBatchIds),await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(a,l.hs)}}function __PRIVATE_syncEngineGetRemoteKeysForTarget(o,r){const a=__PRIVATE_debugCast(o),l=a.Na.get(r);if(l&&l.va)return __PRIVATE_documentKeySet().add(l.key);{let c=__PRIVATE_documentKeySet();const u=a.Ma.get(r);if(!u)return c;for(const d of u){const f=a.Fa.get(d);c=c.unionWith(f.view.Va)}return c}}function __PRIVATE_ensureWatchCallbacks(o){const r=__PRIVATE_debugCast(o);return r.remoteStore.remoteSyncer.applyRemoteEvent=__PRIVATE_syncEngineApplyRemoteEvent.bind(null,r),r.remoteStore.remoteSyncer.getRemoteKeysForTarget=__PRIVATE_syncEngineGetRemoteKeysForTarget.bind(null,r),r.remoteStore.remoteSyncer.rejectListen=__PRIVATE_syncEngineRejectListen.bind(null,r),r.Ca.d_=__PRIVATE_eventManagerOnWatchChange.bind(null,r.eventManager),r.Ca.$a=__PRIVATE_eventManagerOnWatchError.bind(null,r.eventManager),r}function __PRIVATE_syncEngineEnsureWriteCallbacks(o){const r=__PRIVATE_debugCast(o);return r.remoteStore.remoteSyncer.applySuccessfulWrite=__PRIVATE_syncEngineApplySuccessfulWrite.bind(null,r),r.remoteStore.remoteSyncer.rejectFailedWrite=__PRIVATE_syncEngineRejectFailedWrite.bind(null,r),r}class __PRIVATE_MemoryOfflineComponentProvider{constructor(){this.kind="memory",this.synchronizeTabs=!1}
3998async initialize(r){this.serializer=__PRIVATE_newSerializer(r.databaseInfo.databaseId),this.sharedClientState=this.Wa(r),this.persistence=this.Ga(r),await this.persistence.start(),this.localStore=this.za(r),this.gcScheduler=this.ja(r,this.localStore),this.indexBackfillerScheduler=this.Ha(r,this.localStore)}ja(r,a){return null}Ha(r,a){return null}za(r){return __PRIVATE_newLocalStore(this.persistence,new __PRIVATE_QueryEngine,r.initialUser,this.serializer)}Ga(r){return new __PRIVATE_MemoryPersistence(__PRIVATE_MemoryEagerDelegate.Zr,this.serializer)}Wa(r){return new __PRIVATE_MemorySharedClientState}async terminate(){var r,a;(r=this.gcScheduler)===null||r===void 0||r.stop(),(a=this.indexBackfillerScheduler)===null||a===void 0||a.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}__PRIVATE_MemoryOfflineComponentProvider.provider={build:()=>new __PRIVATE_MemoryOfflineComponentProvider};class OnlineComponentProvider{async initialize(r,a){this.localStore||(this.localStore=r.localStore,this.sharedClientState=r.sharedClientState,this.datastore=this.createDatastore(a),this.remoteStore=this.createRemoteStore(a),this.eventManager=this.createEventManager(a),this.syncEngine=this.createSyncEngine(a,!r.synchronizeTabs),this.sharedClientState.onlineStateHandler=l=>__PRIVATE_syncEngineApplyOnlineStateChange(this.syncEngine,l,1),this.remoteStore.remoteSyncer.handleCredentialChange=__PRIVATE_syncEngineHandleCredentialChange.bind(null,this.syncEngine),await __PRIVATE_remoteStoreApplyPrimaryState(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(r){return function(){return new __PRIVATE_EventManagerImpl}()}createDatastore(r){const a=__PRIVATE_newSerializer(r.databaseInfo.databaseId),l=function(u){return new __PRIVATE_WebChannelConnection(u)}(r.databaseInfo);return function(u,d,f,m){return new __PRIVATE_DatastoreImpl(u,d,f,m)}(r.authCredentials,r.appCheckCredentials,l,a)}createRemoteStore(r){return function(l,c,u,d,f){return new __PRIVATE_RemoteStoreImpl(l,c,u,d,f)}(this.localStore,this.datastore,r.asyncQueue,a=>__PRIVATE_syncEngineApplyOnlineStateChange(this.syncEngine,a,0),function(){return __PRIVATE_BrowserConnectivityMonitor.D()?new __PRIVATE_BrowserConnectivityMonitor:new __PRIVATE_NoopConnectivityMonitor}())}createSyncEngine(r,a){return function(c,u,d,f,m,y,E){const A=new __PRIVATE_SyncEngineImpl(c,u,d,f,m,y);return E&&(A.Qa=!0),A}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,r.initialUser,r.maxConcurrentLimboResolutions,a)}async terminate(){var r,a;await async function(c){const u=__PRIVATE_debugCast(c);__PRIVATE_logDebug("RemoteStore","RemoteStore shutting down."),u.L_.add(5),await __PRIVATE_disableNetworkInternal(u),u.k_.shutdown(),u.q_.set("Unknown")}(this.remoteStore),(r=this.datastore)===null||r===void 0||r.terminate(),(a=this.eventManager)===null||a===void 0||a.terminate()}}OnlineComponentProvider.provider={build:()=>new OnlineComponentProvider};/**
3999 * @license
4000 * Copyright 2020 Google LLC
4001 *
4002 * Licensed under the Apache License, Version 2.0 (the "License");
4003 * you may not use this file except in compliance with the License.
4004 * You may obtain a copy of the License at
4005 *
4006 *   http://www.apache.org/licenses/LICENSE-2.0
4007 *
4008 * Unless required by applicable law or agreed to in writing, software
4009 * distributed under the License is distributed on an "AS IS" BASIS,
4010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4011 * See the License for the specific language governing permissions and
4012 * limitations under the License.
4013 *//**
4014 * @license
4015 * Copyright 2017 Google LLC
4016 *
4017 * Licensed under the Apache License, Version 2.0 (the "License");
4018 * you may not use this file except in compliance with the License.
4019 * You may obtain a copy of the License at
4020 *
4021 *   http://www.apache.org/licenses/LICENSE-2.0
4022 *
4023 * Unless required by applicable law or agreed to in writing, software
4024 * distributed under the License is distributed on an "AS IS" BASIS,
4025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4026 * See the License for the specific language governing permissions and
4027 * limitations under the License.
4028 */class __PRIVATE_AsyncObserver{constructor(r){this.observer=r,this.muted=!1}next(r){this.muted||this.observer.next&&this.Ya(this.observer.next,r)}error(r){this.muted||(this.observer.error?this.Ya(this.observer.error,r):__PRIVATE_logError("Uncaught Error in snapshot listener:",r.toString()))}Za(){this.muted=!0}
4028Ya(r,a){setTimeout(()=>{this.muted||r(a)},0)}}/**
4029 * @license
4030 * Copyright 2017 Google LLC
4031 *
4032 * Licensed under the Apache License, Version 2.0 (the "License");
4033 * you may not use this file except in compliance with the License.
4034 * You may obtain a copy of the License at
4035 *
4036 *   http://www.apache.org/licenses/LICENSE-2.0
4037 *
4038 * Unless required by applicable law or agreed to in writing, software
4039 * distributed under the License is distributed on an "AS IS" BASIS,
4040 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4041 * See the License for the specific language governing permissions and
4042 * limitations under the License.
4043 */class FirestoreClient{constructor(r,a,l,c,u){this.authCredentials=r,this.appCheckCredentials=a,this.asyncQueue=l,this.databaseInfo=c,this.user=User.UNAUTHENTICATED,this.clientId=__PRIVATE_AutoId.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=u,this.authCredentials.start(l,async d=>{__PRIVATE_logDebug("FirestoreClient","Received user=",d.uid),await this.authCredentialListener(d),this.user=d}),this.appCheckCredentials.start(l,d=>(__PRIVATE_logDebug("FirestoreClient","Received new app check token=",d),this.appCheckCredentialListener(d,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(r){this.authCredentialListener=r}setAppCheckTokenChangeListener(r){this.appCheckCredentialListener=r}terminate(){this.asyncQueue.enterRestrictedMode();const r=new __PRIVATE_Deferred;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),r.resolve()}catch(a){const l=__PRIVATE_wrapInUserErrorIfRecoverable(a,"Failed to shutdown persistence");r.reject(l)}}),r.promise}}async function __PRIVATE_setOfflineComponentProvider(o,r){o.asyncQueue.verifyOperationInProgress(),__PRIVATE_logDebug("FirestoreClient","Initializing OfflineComponentProvider");const a=o.configuration;await r.initialize(a);let l=a.initialUser;o.setCredentialChangeListener(async c=>{l.isEqual(c)||(await __PRIVATE_localStoreHandleUserChange(r.localStore,c),l=c)}),r.persistence.setDatabaseDeletedListener(()=>o.terminate()),o._offlineComponents=r}async function __PRIVATE_setOnlineComponentProvider(o,r){o.asyncQueue.verifyOperationInProgress();const a=await __PRIVATE_ensureOfflineComponents(o);__PRIVATE_logDebug("FirestoreClient","Initializing OnlineComponentProvider"),await r.initialize(a,o.configuration),o.setCredentialChangeListener(l=>__PRIVATE_remoteStoreHandleCredentialChange(r.remoteStore,l)),o.setAppCheckTokenChangeListener((l,c)=>__PRIVATE_remoteStoreHandleCredentialChange(r.remoteStore,c)),o._onlineComponents=r}async function __PRIVATE_ensureOfflineComponents(o){if(!o._offlineComponents)if(o._uninitializedComponentsProvider){__PRIVATE_logDebug("FirestoreClient","Using user provided OfflineComponentProvider");try{await __PRIVATE_setOfflineComponentProvider(o,o._uninitializedComponentsProvider._offline)}catch(r){const a=r;if(!function(c){return c.name==="FirebaseError"?c.code===D.FAILED_PRECONDITION||c.code===D.UNIMPLEMENTED:!(typeof DOMException<"u"&&c instanceof DOMException)||c.code===22||c.code===20||c.code===11}(a))throw a;__PRIVATE_logWarn("Error using user provided cache. Falling back to memory cache: "+a),await __PRIVATE_setOfflineComponentProvider(o,new __PRIVATE_MemoryOfflineComponentProvider)}}else __PRIVATE_logDebug("FirestoreClient","Using default OfflineComponentProvider"),await __PRIVATE_setOfflineComponentProvider(o,new __PRIVATE_MemoryOfflineComponentProvider);return o._offlineComponents}async function __PRIVATE_ensureOnlineComponents(o){return o._onlineComponents||(o._uninitializedComponentsProvider?(__PRIVATE_logDebug("FirestoreClient","Using user provided OnlineComponentProvider"),await __PRIVATE_setOnlineComponentProvider(o,o._uninitializedComponentsProvider._online)):(__PRIVATE_logDebug("FirestoreClient","Using default OnlineComponentProvider"),await __PRIVATE_setOnlineComponentProvider(o,new OnlineComponentProvider))),o._onlineComponents}function __PRIVATE_getSyncEngine(o){return __PRIVATE_ensureOnlineComponents(o).then(r=>r.syncEngine)}async function __PRIVATE_getEventManager(o){const r=await __PRIVATE_ensureOnlineComponents(o),a=r.eventManager;return a.onListen=__PRIVATE_syncEngineListen.bind(null,r.syncEngine),a.onUnlisten=__PRIVATE_syncEngineUnlisten.bind(null,r.syncEngine),a.onFirstRemoteStoreListen=__PRIVATE_triggerRemoteStoreListen.bind(null,r.syncEngine),a.onLastRemoteStoreUnlisten=__PRIVATE_triggerRemoteStoreUnlisten.bind(null,r.syncEngine),a}function __PRIVATE_firestoreClientGetDocumentViaSnapshotListener(o,r,a={}){const l=new __PRIVATE_Deferred;return o.asyncQueue.enqueueAndForget(async()=>function(u,d,f,m,y){const E=new __PRIVATE_AsyncObserver({next:P=>{E.Za(),d.enqueueAndForget(()=>__PRIVATE_eventManagerUnlisten(u,A));const R=P.docs.has(f);!R&&P.fromCache?y.reject(new FirestoreError(D.UNAVAILABLE,"Failed to get document because the client is offline.")):R&&P.fromCache&&m&&m.source==="server"?y.reject(new FirestoreError(D.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):y.resolve(P)},error:P=>y.reject(P)}),A=new __PRIVATE_QueryListener(__PRIVATE_newQueryForPath(f.path),E,{includeMetadataChanges:!0,_a:!0});return __PRIVATE_eventManagerListen(u,A)}(await __PRIVATE_getEventManager(o),o.asyncQueue,r,a,l)),l.promise}function __PRIVATE_firestoreClientGetDocumentsViaSnapshotListener(o,r,a={}){const l=new __PRIVATE_Deferred;return o.asyncQueue.enqueueAndForget(async()=>function(u,d,f,m,y){const E=new __PRIVATE_AsyncObserver({next:P=>{E.Za(),d.enqueueAndForget(()=>__PRIVATE_eventManagerUnlisten(u,A)),P.fromCache&&m.source==="server"?y.reject(new FirestoreError(D.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):y.resolve(P)},error:P=>y.reject(P)}),A=new __PRIVATE_QueryListener(f,E,{includeMetadataChanges:!0,_a:!0});return __PRIVATE_eventManagerListen(u,A)}(await __PRIVATE_getEventManager(o),o.asyncQueue,r,a,l)),l.promise}/**
4044 * @license
4045 * Copyright 2023 Google LLC
4046 *
4047 * Licensed under the Apache License, Version 2.0 (the "License");
4048 * you may not use this file except in compliance with the License.
4049 * You may obtain a copy of the License at
4050 *
4051 *   http://www.apache.org/licenses/LICENSE-2.0
4052 *
4053 * Unless required by applicable law or agreed to in writing, software
4054 * distributed under the License is distributed on an "AS IS" BASIS,
4055 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4056 * See the License for the specific language governing permissions and
4057 * limitations under the License.
4058 */function __PRIVATE_cloneLongPollingOptions(o){const r={};return o.timeoutSeconds!==void 0&&(r.timeoutSeconds=o.timeoutSeconds),r}/**
4059 * @license
4060 * Copyright 2020 Google LLC
4061 *
4062 * Licensed under the Apache License, Version 2.0 (the "License");
4063 * you may not use this file except in compliance with the License.
4064 * You may obtain a copy of the License at
4065 *
4066 *   http://www.apache.org/licenses/LICENSE-2.0
4067 *
4068 * Unless required by applicable law or agreed to in writing, software
4069 * distributed under the License is distributed on an "AS IS" BASIS,
4070 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4071 * See the License for the specific language governing permissions and
4072 * limitations under the License.
4073 */const we=new Map;/**
4074 * @license
4075 * Copyright 2017 Google LLC
4076 *
4077 * Licensed under the Apache License, Version 2.0 (the "License");
4078 * you may not use this file except in compliance with the License.
4079 * You may obtain a copy of the License at
4080 *
4081 *   http://www.apache.org/licenses/LICENSE-2.0
4082 *
4083 * Unless required by applicable law or agreed to in writing, software
4084 * distributed under the License is distributed on an "AS IS" BASIS,
4085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4086 * See the License for the specific language governing permissions and
4087 * limitations under the License.
4088 */function __PRIVATE_validateNonEmptyArgument(o,r,a){if(!a)throw new FirestoreError(D.INVALID_ARGUMENT,`Function ${o}() cannot be called with an empty ${r}.`)}function __PRIVATE_validateIsNotUsedTogether(o,r,a,l){if(r===!0&&l===!0)throw new FirestoreError(D.INVALID_ARGUMENT,`${o} and ${a} cannot be used together.`)}function __PRIVATE_validateDocumentPath(o){if(!DocumentKey.isDocumentKey(o))throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${o} has ${o.length}.`)}function __PRIVATE_validateCollectionPath(o){if(DocumentKey.isDocumentKey(o))throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${o} has ${o.length}.`)}function __PRIVATE_valueDescription(o){if(o===void 0)return"undefined";if(o===null)return"null";if(typeof o=="string")return o.length>20&&(o=`${o.substring(0,20)}...`),JSON.stringify(o);if(typeof o=="number"||typeof o=="boolean")return""+o;if(typeof o=="object"){if(o instanceof Array)return"an array";{const r=function(l){return l.constructor?l.constructor.name:null}(o);return r?`a custom ${r} object`:"an object"}}return typeof o=="function"?"a function":fail()}function __PRIVATE_cast(o,r){if("_delegate"in o&&(o=o._delegate),!(o instanceof r)){if(r.name===o.constructor.name)throw new FirestoreError(D.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const a=__PRIVATE_valueDescription(o);throw new FirestoreError(D.INVALID_ARGUMENT,`Expected type '${r.name}', but it was: ${a}`)}}return o}function __PRIVATE_validatePositiveNumber(o,r){if(r<=0)throw new FirestoreError(D.INVALID_ARGUMENT,`Function ${o}() requires a positive number, but it was: ${r}.`)}/**
4089 * @license
4090 * Copyright 2020 Google LLC
4091 *
4092 * Licensed under the Apache License, Version 2.0 (the "License");
4093 * you may not use this file except in compliance with the License.
4094 * You may obtain a copy of the License at
4095 *
4096 *   http://www.apache.org/licenses/LICENSE-2.0
4097 *
4098 * Unless required by applicable law or agreed to in writing, software
4099 * distributed under the License is distributed on an "AS IS" BASIS,
4100 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4101 * See the License for the specific language governing permissions and
4102 * limitations under the License.
4103 */class FirestoreSettingsImpl{constructor(r){var a,l;if(r.host===void 0){if(r.ssl!==void 0)throw new FirestoreError(D.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=r.host,this.ssl=(a=r.ssl)===null||a===void 0||a;if(this.credentials=r.credentials,this.ignoreUndefinedProperties=!!r.ignoreUndefinedProperties,this.localCache=r.localCache,r.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(r.cacheSizeBytes!==-1&&r.cacheSizeBytes<1048576)throw new FirestoreError(D.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=r.cacheSizeBytes}__PRIVATE_validateIsNotUsedTogether("experimentalForceLongPolling",r.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",r.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!r.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:r.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!r.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=__PRIVATE_cloneLongPollingOptions((l=r.experimentalLongPollingOptions)!==null&&l!==void 0?l:{}),function(u){if(u.timeoutSeconds!==void 0){if(isNaN(u.timeoutSeconds))throw new FirestoreError(D.INVALID_ARGUMENT,`invalid long polling timeout: ${u.timeoutSeconds} (must not be NaN)`);if(u.timeoutSeconds<5)throw new FirestoreError(D.INVALID_ARGUMENT,`invalid long polling timeout: ${u.timeoutSeconds} (minimum allowed value is 5)`);if(u.timeoutSeconds>30)throw new FirestoreError(D.INVALID_ARGUMENT,`invalid long polling timeout: ${u.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!r.useFetchStreams}isEqual(r){return this.host===r.host&&this.ssl===r.ssl&&this.credentials===r.credentials&&this.cacheSizeBytes===r.cacheSizeBytes&&this.experimentalForceLongPolling===r.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===r.experimentalAutoDetectLongPolling&&function(l,c){return l.timeoutSeconds===c.timeoutSeconds}(this.experimentalLongPollingOptions,r.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===r.ignoreUndefinedProperties&&this.useFetchStreams===r.useFetchStreams}}class Firestore$1{constructor(r,a,l,c){this._authCredentials=r,this._appCheckCredentials=a,this._databaseId=l,this._app=c,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new FirestoreSettingsImpl({}),this._settingsFrozen=!1,this._terminateTask="notTerminated"}get app(){if(!this._app)throw new FirestoreError(D.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(r){if(this._settingsFrozen)throw new FirestoreError(D.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new FirestoreSettingsImpl(r),r.credentials!==void 0&&(this._authCredentials=function(l){if(!l)return new __PRIVATE_EmptyAuthCredentialsProvider;switch(l.type){case"firstParty":return new __PRIVATE_FirstPartyAuthCredentialsProvider(l.sessionIndex||"0",l.iamToken||null,l.authTokenFactory||null);case"provider":return l.client;default:throw new FirestoreError(D.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
4103d credential type")}}(r.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(a){const l=we.get(a);l&&(__PRIVATE_logDebug("ComponentProvider","Removing Datastore"),we.delete(a),l.terminate())}(this),Promise.resolve()}}function connectFirestoreEmulator(o,r,a,l={}){var c;const u=(o=__PRIVATE_cast(o,Firestore$1))._getSettings(),d=`${r}:${a}`;if(u.host!=="firestore.googleapis.com"&&u.host!==d&&__PRIVATE_logWarn("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),o._setSettings(Object.assign(Object.assign({},u),{host:d,ssl:!1})),l.mockUserToken){let f,m;if(typeof l.mockUserToken=="string")f=l.mockUserToken,m=User.MOCK_USER;else{f=createMockUserToken(l.mockUserToken,(c=o._app)===null||c===void 0?void 0:c.options.projectId);const y=l.mockUserToken.sub||l.mockUserToken.user_id;if(!y)throw new FirestoreError(D.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");m=new User(y)}o._authCredentials=new __PRIVATE_EmulatorAuthCredentialsProvider(new __PRIVATE_OAuthToken(f,m))}}/**
4104 * @license
4105 * Copyright 2020 Google LLC
4106 *
4107 * Licensed under the Apache License, Version 2.0 (the "License");
4108 * you may not use this file except in compliance with the License.
4109 * You may obtain a copy of the License at
4110 *
4111 *   http://www.apache.org/licenses/LICENSE-2.0
4112 *
4113 * Unless required by applicable law or agreed to in writing, software
4114 * distributed under the License is distributed on an "AS IS" BASIS,
4115 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4116 * See the License for the specific language governing permissions and
4117 * limitations under the License.
4118 */class Query{constructor(r,a,l){this.converter=a,this._query=l,this.type="query",this.firestore=r}withConverter(r){return new Query(this.firestore,r,this._query)}}class DocumentReference{constructor(r,a,l){this.converter=a,this._key=l,this.type="document",this.firestore=r}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new CollectionReference(this.firestore,this.converter,this._key.path.popLast())}withConverter(r){return new DocumentReference(this.firestore,r,this._key)}}class CollectionReference extends Query{constructor(r,a,l){super(r,a,__PRIVATE_newQueryForPath(l)),this._path=l,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const r=this._path.popLast();return r.isEmpty()?null:new DocumentReference(this.firestore,null,new DocumentKey(r))}withConverter(r){return new CollectionReference(this.firestore,r,this._path)}}function collection(o,r,...a){if(o=getModularInstance(o),__PRIVATE_validateNonEmptyArgument("collection","path",r),o instanceof Firestore$1){const l=ResourcePath.fromString(r,...a);return __PRIVATE_validateCollectionPath(l),new CollectionReference(o,null,l)}{if(!(o instanceof DocumentReference||o instanceof CollectionReference))throw new FirestoreError(D.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const l=o._path.child(ResourcePath.fromString(r,...a));return __PRIVATE_validateCollectionPath(l),new CollectionReference(o.firestore,null,l)}}function doc(o,r,...a){if(o=getModularInstance(o),arguments.length===1&&(r=__PRIVATE_AutoId.newId()),__PRIVATE_validateNonEmptyArgument("doc","path",r),o instanceof Firestore$1){const l=ResourcePath.fromString(r,...a);return __PRIVATE_validateDocumentPath(l),new DocumentReference(o,null,new DocumentKey(l))}{if(!(o instanceof DocumentReference||o instanceof CollectionReference))throw new FirestoreError(D.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
4118const l=o._path.child(ResourcePath.fromString(r,...a));return __PRIVATE_validateDocumentPath(l),new DocumentReference(o.firestore,o instanceof CollectionReference?o.converter:null,new DocumentKey(l))}}/**
4119 * @license
4120 * Copyright 2020 Google LLC
4121 *
4122 * Licensed under the Apache License, Version 2.0 (the "License");
4123 * you may not use this file except in compliance with the License.
4124 * You may obtain a copy of the License at
4125 *
4126 *   http://www.apache.org/licenses/LICENSE-2.0
4127 *
4128 * Unless required by applicable law or agreed to in writing, software
4129 * distributed under the License is distributed on an "AS IS" BASIS,
4130 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4131 * See the License for the specific language governing permissions and
4132 * limitations under the License.
4133 */class __PRIVATE_AsyncQueueImpl{constructor(r=Promise.resolve()){this.Pu=[],this.Iu=!1,this.Tu=[],this.Eu=null,this.du=!1,this.Au=!1,this.Ru=[],this.t_=new __PRIVATE_ExponentialBackoff(this,"async_queue_retry"),this.Vu=()=>{const l=getDocument();l&&__PRIVATE_logDebug("AsyncQueue","Visibility state changed to "+l.visibilityState),this.t_.jo()},this.mu=r;const a=getDocument();a&&typeof a.addEventListener=="function"&&a.addEventListener("visibilitychange",this.Vu)}get isShuttingDown(){return this.Iu}enqueueAndForget(r){this.enqueue(r)}enqueueAndForgetEvenWhileRestricted(r){this.fu(),this.gu(r)}enterRestrictedMode(r){if(!this.Iu){this.Iu=!0,this.Au=r||!1;const a=getDocument();a&&typeof a.removeEventListener=="function"&&a.removeEventListener("visibilitychange",this.Vu)}}enqueue(r){if(this.fu(),this.Iu)return new Promise(()=>{});const a=new __PRIVATE_Deferred;return this.gu(()=>this.Iu&&this.Au?Promise.resolve():(r().then(a.resolve,a.reject),a.promise)).then(()=>a.promise)}enqueueRetryable(r){this.enqueueAndForget(()=>(this.Pu.push(r),this.pu()))}async pu(){if(this.Pu.length!==0){try{await this.Pu[0](),this.Pu.shift(),this.t_.reset()}catch(r){if(!__PRIVATE_isIndexedDbTransactionError(r))throw r;__PRIVATE_logDebug("AsyncQueue","Operation failed with retryable error: "+r)}this.Pu.length>0&&this.t_.Go(()=>this.pu())}}gu(r){const a=this.mu.then(()=>(this.du=!0,r().catch(l=>{this.Eu=l,this.du=!1;const c=function(d){let f=d.message||"";return d.stack&&(f=d.stack.includes(d.message)?d.stack:d.message+`
4134`+d.stack),f}(l);throw __PRIVATE_logError("INTERNAL UNHANDLED ERROR: ",c),l}).then(l=>(this.du=!1,l))));return this.mu=a,a}enqueueAfterDelay(r,a,l){this.fu(),this.Ru.indexOf(r)>-1&&(a=0);const c=DelayedOperation.createAndSchedule(this,r,a,l,u=>this.yu(u));return this.Tu.push(c),c}fu(){this.Eu&&fail()}verifyOperationInProgress(){}async wu(){let r;do r=this.mu,await r;while(r!==this.mu)}Su(r){for(const a of this.Tu)if(a.timerId===r)return!0;return!1}bu(r){return this.wu().then(()=>{this.Tu.sort((a,l)=>a.targetTimeMs-l.targetTimeMs);for(const a of this.Tu)if(a.skipDelay(),r!=="all"&&a.timerId===r)break;return this.wu()})}Du(r){this.Ru.push(r)}yu(r){const a=this.Tu.indexOf(r);this.Tu.splice(a,1)}}function __PRIVATE_isPartialObserver(o){return function(a,l){if(typeof a!="object"||a===null)return!1;const c=a;for(const u of l)if(u in c&&typeof c[u]=="function")return!0;return!1}(o,["next","error","complete"])}class Firestore extends Firestore$1{constructor(r,a,l,c){super(r,a,l,c),this.type="firestore",this._queue=new __PRIVATE_AsyncQueueImpl,this._persistenceKey=(c==null?void 0:c.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const r=this._firestoreClient.terminate();this._queue=new __PRIVATE_AsyncQueueImpl(r),this._firestoreClient=void 0,await r}}}function getFirestore(o,r){const a=typeof o=="object"?o:getApp(),l=typeof o=="string"?o:"(default)",c=_getProvider(a,"firestore").getImmediate({identifier:l});if(!c._initialized){const u=getDefaultEmulatorHostnameAndPort("firestore");u&&connectFirestoreEmulator(c,...u)}return c}function ensureFirestoreConfigured(o){if(o._terminated)throw new FirestoreError(D.FAILED_PRECONDITION,"The client has already been terminated.");return o._firestoreClient||__PRIVATE_configureFirestore(o),o._firestoreClient}function __PRIVATE_configureFirestore(o){var r,a,l;const c=o._freezeSettings(),u=function(f,m,y,E){return new DatabaseInfo(f,m,y,E.host,E.ssl,E.experimentalForceLongPolling,E.experimentalAutoDetectLongPolling,__PRIVATE_cloneLongPollingOptions(E.experimentalLongPollingOptions),E.useFetchStreams)}(o._databaseId,((r=o._app)===null||r===void 0?void 0:r.options.appId)||"",o._persistenceKey,c);o._componentsProvider||!((a=c.localCache)===null||a===void 0)&&a._offlineComponentProvider&&(!((l=c.localCache)===null||l===void 0)&&l._onlineComponentProvider)&&(o._componentsProvider={_offline:c.localCache._offlineComponentProvider,_online:c.localCache._onlineComponentProvider}),o._firestoreClient=new FirestoreClient(o._authCredentials,o._appCheckCredentials,o._queue,u,o._componentsProvider&&function(f){const m=f==null?void 0:f._online.build();return{_offline:f==null?void 0:f._offline.build(m),_online:m}}(o._componentsProvider))}/**
4135 * @license
4136 * Copyright 2020 Google LLC
4137 *
4138 * Licensed under the Apache License, Version 2.0 (the "License");
4139 * you may not use this file except in compliance with the License.
4140 * You may obtain a copy of the License at
4141 *
4142 *   http://www.apache.org/licenses/LICENSE-2.0
4143 *
4144 * Unless required by applicable law or agreed to in writing, software
4145 * distributed under the License is distributed on an "AS IS" BASIS,
4146 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4147 * See the License for the specific language governing permissions and
4148 * limitations under the License.
4149 */class Bytes{constructor(r){this._byteString=r}static fromBase64String(r){try{return new Bytes(ByteString.fromBase64String(r))}catch(a){throw new FirestoreError(D.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+a)}}static fromUint8Array(r){return new Bytes(ByteString.fromUint8Array(r))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(r){return this._byteString.isEqual(r._byteString)}}/**
4150 * @license
4151 * Copyright 2020 Google LLC
4152 *
4153 * Licensed under the Apache License, Version 2.0 (the "License");
4154 * you may not use this file except in compliance with the License.
4155 * You may obtain a copy of the License at
4156 *
4157 *   http://www.apache.org/licenses/LICENSE-2.0
4158 *
4159 * Unless required by applicable law or agreed to in writing, software
4160 * distributed under the License is distributed on an "AS IS" BASIS,
4161 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4162 * See the License for the specific language governing permissions and
4163 * limitations under the License.
4164 */class FieldPath{constructor(...r){for(let a=0;a<r.length;++a)if(r[a].length===0)throw new FirestoreError(D.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new FieldPath$1(r)}isEqual(r){return this._internalPath.isEqual(r._internalPath)}}/**
4165 * @license
4166 * Copyright 2020 Google LLC
4167 *
4168 * Licensed under the Apache License, Version 2.0 (the "License");
4169 * you may not use this file except in compliance with the License.
4170 * You may obtain a copy of the License at
4171 *
4172 *   http://www.apache.org/licenses/LICENSE-2.0
4173 *
4174 * Unless required by applicable law or agreed to in writing, software
4175 * distributed under the License is distributed on an "AS IS" BASIS,
4176 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4177 * See the License for the specific language governing permissions and
4178 * limitations under the License.
4179 */class FieldValue{constructor(r){this._methodName=r}}/**
4180 * @license
4181 * Copyright 2017 Google LLC
4182 *
4183 * Licensed under the Apache License, Version 2.0 (the "License");
4184 * you may not use this file except in compliance with the License.
4185 * You may obtain a copy of the License at
4186 *
4187 *   http://www.apache.org/licenses/LICENSE-2.0
4188 *
4189 * Unless required by applicable law or agreed to in writing, software
4190 * distributed under the License is distributed on an "AS IS" BASIS,
4191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4192 * See the License for the specific language governing permissions and
4193 * limitations under the License.
4194 */class GeoPoint{constructor(r,a){if(!isFinite(r)||r<-90||r>90)throw new FirestoreError(D.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+r);if(!isFinite(a)||a<-180||a>180)throw new FirestoreError(D.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+a);this._lat=r,this._long=a}get latitude(){return this._lat}get longitude(){return this._long}isEqual(r){return this._lat===r._lat&&this._long===r._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(r){return __PRIVATE_primitiveComparator(this._lat,r._lat)||__PRIVATE_primitiveComparator(this._long,r._long)}}/**
4195 * @license
4196 * Copyright 2024 Google LLC
4197 *
4198 * Licensed under the Apache License, Version 2.0 (the "License");
4199 * you may not use this file except in compliance with the License.
4200 * You may obtain a copy of the License at
4201 *
4202 *   http://www.apache.org/licenses/LICENSE-2.0
4203 *
4204 * Unless required by applicable law or agreed to in writing, softw
4204are
4205 * distributed under the License is distributed on an "AS IS" BASIS,
4206 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4207 * See the License for the specific language governing permissions and
4208 * limitations under the License.
4209 */class VectorValue{constructor(r){this._values=(r||[]).map(a=>a)}toArray(){return this._values.map(r=>r)}isEqual(r){return function(l,c){if(l.length!==c.length)return!1;for(let u=0;u<l.length;++u)if(l[u]!==c[u])return!1;return!0}(this._values,r._values)}}/**
4210 * @license
4211 * Copyright 2017 Google LLC
4212 *
4213 * Licensed under the Apache License, Version 2.0 (the "License");
4214 * you may not use this file except in compliance with the License.
4215 * You may obtain a copy of the License at
4216 *
4217 *   http://www.apache.org/licenses/LICENSE-2.0
4218 *
4219 * Unless required by applicable law or agreed to in writing, software
4220 * distributed under the License is distributed on an "AS IS" BASIS,
4221 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4222 * See the License for the specific language governing permissions and
4223 * limitations under the License.
4224 */const be=/^__.*__$/;class ParsedSetData{constructor(r,a,l){this.data=r,this.fieldMask=a,this.fieldTransforms=l}toMutation(r,a){return this.fieldMask!==null?new __PRIVATE_PatchMutation(r,this.data,this.fieldMask,a,this.fieldTransforms):new __PRIVATE_SetMutation(r,this.data,a,this.fieldTransforms)}}
4224class ParsedUpdateData{constructor(r,a,l){this.data=r,this.fieldMask=a,this.fieldTransforms=l}toMutation(r,a){return new __PRIVATE_PatchMutation(r,this.data,this.fieldMask,a,this.fieldTransforms)}}function __PRIVATE_isWrite(o){switch(o){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw fail()}}class __PRIVATE_ParseContextImpl{constructor(r,a,l,c,u,d){this.settings=r,this.databaseId=a,this.serializer=l,this.ignoreUndefinedProperties=c,u===void 0&&this.vu(),this.fieldTransforms=u||[],this.fieldMask=d||[]}get path(){return this.settings.path}get Cu(){return this.settings.Cu}Fu(r){return new __PRIVATE_ParseContextImpl(Object.assign(Object.assign({},this.settings),r),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Mu(r){var a;const l=(a=this.path)===null||a===void 0?void 0:a.child(r),c=this.Fu({path:l,xu:!1});return c.Ou(r),c}Nu(r){var a;const l=(a=this.path)===null||a===void 0?void 0:a.child(r),c=this.Fu({path:l,xu:!1});return c.vu(),c}Lu(r){return this.Fu({path:void 0,xu:!0})}Bu(r){return __PRIVATE_createError(r,this.settings.methodName,this.settings.ku||!1,this.path,this.settings.qu)}contains(r){return this.fieldMask.find(a=>r.isPrefixOf(a))!==void 0||this.fieldTransforms.find(a=>r.isPrefixOf(a.field))!==void 0}vu(){if(this.path)for(let r=0;r<this.path.length;r++)this.Ou(this.path.get(r))}Ou(r){if(r.length===0)throw this.Bu("Document fields must not be empty");if(__PRIVATE_isWrite(this.Cu)&&be.test(r))throw this.Bu('Document fields cannot begin and end with "__"')}}class __PRIVATE_UserDataReader{constructor(r,a,l){this.databaseId=r,this.ignoreUndefinedProperties=a,this.serializer=l||__PRIVATE_newSerializer(r)}Qu(r,a,l,c=!1){return new __PRIVATE_ParseContextImpl({Cu:r,methodName:a,qu:l,path:FieldPath$1.emptyPath(),xu:!1,ku:c},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function __PRIVATE_newUserDataReader(o){const r=o._freezeSettings(),a=__PRIVATE_newSerializer(o._databaseId);return new __PRIVATE_UserDataReader(o._databaseId,!!r.ignoreUndefinedProperties,a)}function __PRIVATE_parseSetData(o,r,a,l,c,u={}){const d=o.Qu(u.merge||u.mergeFields?2:0,r,a,c);__PRIVATE_validatePlainObject("Data must be an object, but it was:",d,l);const f=__PRIVATE_parseObject(l,d);let m,y;if(u.merge)m=new FieldMask(d.fieldMask),y=d.fieldTransforms;else if(u.mergeFields){const E=[];for(const A of u.mergeFields){const P=__PRIVATE_fieldPathFromArgument$1(r,A,a);if(!d.contains(P))throw new FirestoreError(D.INVALID_ARGUMENT,`Field '${P}' is specified in your field mask but missing from your input data.`);__PRIVATE_fieldMaskContains(E,P)||E.push(P)}m=new FieldMask(E),y=d.fieldTransforms.filter(A=>m.covers(A.field))}else m=null,y=d.fieldTransforms;return new ParsedSetData(new ObjectValue(f),m,y)}class __PRIVATE_DeleteFieldValueImpl extends FieldValue{_toFieldTransform(r){if(r.Cu!==2)throw r.Cu===1?r.Bu(`${this._methodName}() can only appear at the top level of your update data`):r.Bu(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return r.fieldMask.push(r.path),null}isEqual(r){return r instanceof __PRIVATE_DeleteFieldValueImpl}}class __PRIVATE_ServerTimestampFieldValueImpl extends FieldValue{_toFieldTransform(r){return new FieldTransform(r.path,new __PRIVATE_ServerTimestampTransform)}isEqual(r){return r instanceof __PRIVATE_ServerTimestampFieldValueImpl}}class __PRIVATE_NumericIncrementFieldValueImpl extends FieldValue{constructor(r,a){super(r),this.$u=a}_toFieldTransform(r){const a=new __PRIVATE_NumericIncrementTransformOperation(r.serializer,toNumber$1(r.serializer,this.$u));return new FieldTransform(r.path,a)}isEqual(r){return r instanceof __PRIVATE_NumericIncrementFieldValueImpl&&this.$u===r.$u}}function __PRIVATE_parseUpdateData(o,r,a,l){const c=o.Qu(1,r,a);__PRIVATE_validatePlainObject("Data must be an object, but it was:",c,l);const u=[],d=ObjectValue.empty();forEach(l,(m,y)=>{const E=__PRIVATE_fieldPathFromDotSeparatedString(r,m,a);y=getModularInstance(y);const A=c.Nu(E);if(y instanceof __PRIVATE_DeleteFieldValueImpl)u.push(E);else{const P=__PRIVATE_parseData(y,A);P!=null&&(u.push(E),d.set(E,P))}});const f=new FieldMask(u);
4224return new ParsedUpdateData(d,f,c.fieldTransforms)}function __PRIVATE_parseUpdateVarargs(o,r,a,l,c,u){const d=o.Qu(1,r,a),f=[__PRIVATE_fieldPathFromArgument$1(r,l,a)],m=[c];if(u.length%2!=0)throw new FirestoreError(D.INVALID_ARGUMENT,`Function ${r}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let P=0;P<u.length;P+=2)f.push(__PRIVATE_fieldPathFromArgument$1(r,u[P])),m.push(u[P+1]);const y=[],E=ObjectValue.empty();for(let P=f.length-1;P>=0;--P)if(!__PRIVATE_fieldMaskContains(y,f[P])){const R=f[P];let x=m[P];x=getModularInstance(x);const M=d.Nu(R);if(x instanceof __PRIVATE_DeleteFieldValueImpl)y.push(R);else{const $=__PRIVATE_parseData(x,M);$!=null&&(y.push(R),E.set(R,$))}}const A=new FieldMask(y);return new ParsedUpdateData(E,A,d.fieldTransforms)}function __PRIVATE_parseQueryValue(o,r,a,l=!1){return __PRIVATE_parseData(a,o.Qu(l?4:3,r))}function __PRIVATE_parseData(o,r){if(__PRIVATE_looksLikeJsonObject(o=getModularInstance(o)))return __PRIVATE_validatePlainObject("Unsupported field value:",r,o),__PRIVATE_parseObject(o,r);if(o instanceof FieldValue)return function(l,c){if(!__PRIVATE_isWrite(c.Cu))throw c.Bu(`${l._methodName}() can only be used with update() and set()`);if(!c.path)throw c.Bu(`${l._methodName}() is not currently supported inside arrays`);const u=l._toFieldTransform(c);u&&c.fieldTransforms.push(u)}(o,r),null;if(o===void 0&&r.ignoreUndefinedProperties)return null;if(r.path&&r.fieldMask.push(r.path),o instanceof Array){if(r.settings.xu&&r.Cu!==4)throw r.Bu("Nested arrays are not supported");return function(l,c){const u=[];let d=0;for(const f of l){let m=__PRIVATE_parseData(f,c.Lu(d));m==null&&(m={nullValue:"NULL_VALUE"}),u.push(m),d++}return{arrayValue:{values:u}}}(o,r)}return function(l,c){if((l=getModularInstance(l))===null)return{nullValue:"NULL_VALUE"};if(typeof l=="number")return toNumber$1(c.serializer,l);if(typeof l=="boolean")return{booleanValue:l};if(typeof l=="string")return{stringValue:l};if(l instanceof Date){const u=Timestamp.fromDate(l);return{timestampValue:toTimestamp(c.serializer,u)}}if(l instanceof Timestamp){const u=new Timestamp(l.seconds,1e3*Math.floor(l.nanoseconds/1e3));return{timestampValue:toTimestamp(c.serializer,u)}}if(l instanceof GeoPoint)return{geoPointValue:{latitude:l.latitude,longitude:l.longitude}};if(l instanceof Bytes)return{bytesValue:__PRIVATE_toBytes(c.serializer,l._byteString)};if(l instanceof DocumentReference){const u=c.databaseId,d=l.firestore._databaseId;if(!d.isEqual(u))throw c.Bu(`Document reference is for database ${d.projectId}/${d.database} but should be for database ${u.projectId}/${u.database}`);return{referenceValue:__PRIVATE_toResourceName(l.firestore._databaseId||c.databaseId,l._key.path)}}if(l instanceof VectorValue)return function(d,f){return{mapValue:{fields:{__type__:{stringValue:"__vector__"},value:{arrayValue:{values:d.toArray().map(m=>{if(typeof m!="number")throw f.Bu("VectorValues must only contain numeric values.");return __PRIVATE_toDouble(f.serializer,m)})}}}}}}(l,c);throw c.Bu(`Unsupported field value: ${__PRIVATE_valueDescription(l)}`)}(o,r)}function __PRIVATE_parseObject(o,r){const a={};return isEmpty(o)?r.path&&r.path.length>0&&r.fieldMask.push(r.path):forEach(o,(l,c)=>{const u=__PRIVATE_parseData(c,r.Mu(l));u!=null&&(a[l]=u)}),{mapValue:{fields:a}}}function __PRIVATE_looksLikeJsonObject(o){return!(typeof o!="object"||o===null||o instanceof Array||o instanceof Date||o instanceof Timestamp||o instanceof GeoPoint||o instanceof Bytes||o instanceof DocumentReference||o instanceof FieldValue||o instanceof VectorValue)}function __PRIVATE_validatePlainObject(o,r,a){if(!__PRIVATE_looksLikeJsonObject(a)||!function(c){return typeof c=="object"&&c!==null&&(Object.getPrototypeOf(c)===Object.prototype||Object.getPrototypeOf(c)===null)}(a)){const l=__PRIVATE_valueDescription(a);throw l==="an object"?r.Bu(o+" a custom object"):r.Bu(o+" "+l)}}function __PRIVATE_fieldPathFromArgument$1(o,r,a){if((r=getModularInstance(r))instanceof FieldPath)return r._internalPath;if(typeof r=="string")return __PRIVATE_fieldPathFromDotSeparatedString(o,r);throw __PRIVATE_createError("Field path arguments must be of type string or ",o,!1,void 0,a)}const De=new RegExp("[~\\*/\\[\\]]");function __PRIVATE_fieldPathFromDotSeparatedString(o,r,a){if(r.search(De)>=0)throw __PRIVATE_createError(`Invalid field path (${r}). Paths must not contain '~', '*', '/', '[', or ']'`,o,!1,void 0,a);try{return new FieldPath(...r.split("."))._internalPath}catch{throw __PRIVATE_createError(`Invalid field path (${r}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,o,!1,void 0,a)}}function __PRIVATE_createError(o,r,a,l,c){const u=l&&!l.isEmpty(),d=c!==void 0;let f=`Function ${r}
4224() called with invalid data`;a&&(f+=" (via `toFirestore()`)"),f+=". ";let m="";return(u||d)&&(m+=" (found",u&&(m+=` in field ${l}`),d&&(m+=` in document ${c}`),m+=")"),new FirestoreError(D.INVALID_ARGUMENT,f+o+m)}function __PRIVATE_fieldMaskContains(o,r){return o.some(a=>a.isEqual(r))}/**
4225 * @license
4226 * Copyright 2020 Google LLC
4227 *
4228 * Licensed under the Apache License, Version 2.0 (the "License");
4229 * you may not use this file except in compliance with the License.
4230 * You may obtain a copy of the License at
4231 *
4232 *   http://www.apache.org/licenses/LICENSE-2.0
4233 *
4234 * Unless required by applicable law or agreed to in writing, software
4235 * distributed under the License is distributed on an "AS IS" BASIS,
4236 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4237 * See the License for the specific language governing permissions and
4238 * limitations under the License.
4239 */class DocumentSnapshot$1{constructor(r,a,l,c,u){this._firestore=r,this._userDataWriter=a,this._key=l,this._document=c,this._converter=u}get id(){return this._key.path.lastSegment()}get ref(){return new DocumentReference(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const r=new QueryDocumentSnapshot$1(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(r)}return this._userDataWriter.convertValue(this._document.data.value)}}get(r){if(this._document){const a=this._document.data.field(__PRIVATE_fieldPathFromArgument("DocumentSnapshot.get",r));if(a!==null)return this._userDataWriter.convertValue(a)}}}class QueryDocumentSnapshot$1 extends DocumentSnapshot$1{data(){return super.data()}}function __PRIVATE_fieldPathFromArgument(o,r){return typeof r=="string"?__PRIVATE_fieldPathFromDotSeparatedString(o,r):r instanceof FieldPath?r._internalPath:r._delegate._internalPath}/**
4240 * @license
4241 * Copyright 2020 Google LLC
4242 *
4243 * Licensed under the Apache License, Version 2.0 (the "License");
4244 * you may not use this file except in compliance with the License.
4245 * You may obtain a copy of the License at
4246 *
4247 *   http://www.apache.org/licenses/LICENSE-2.0
4248 *
4249 * Unless required by applicable law or agreed to in writing, software
4250 * distributed under the License is distributed on an "AS IS" BASIS,
4251 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4252 * See the License for the specific language governing permissions and
4253 * limitations under the License.
4254 */function __PRIVATE_validateHasExplicitOrderByForLimitToLast(o){if(o.limitType==="L"&&o.explicitOrderBy.length===0)throw new FirestoreError(D.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class AppliableConstraint{}class QueryConstraint extends AppliableConstraint{}function query(o,r,...a){let l=[];r instanceof AppliableConstraint&&l.push(r),l=l.concat(a),function(u){const d=u.filter(m=>m instanceof QueryCompositeFilterConstraint).length,f=u.filter(m=>m instanceof QueryFieldFilterConstraint).length;if(d>1||d>0&&f>0)throw new FirestoreError(D.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(l);for(const c of l)o=c._apply(o);return o}class QueryFieldFilterConstraint extends QueryConstraint{constructor(r,a,l){super(),this._field=r,this._op=a,this._value=l,this.type="where"}static _create(r,a,l){return new QueryFieldFilterConstraint(r,a,l)}_apply(r){const a=this._parse(r);return __PRIVATE_validateNewFieldFilter(r._query,a),new Query(r.firestore,r.converter,__PRIVATE_queryWithAddedFilter(r._query,a))}_parse(r){const a=__PRIVATE_newUserDataReader(r.firestore);return function(u,d,f,m,y,E,A){let P;if(y.isKeyField()){if(E==="array-contains"||E==="array-contains-any")throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid Query. You can't perform '${E}' queries on documentId().`);if(E==="in"||E==="not-in"){__PRIVATE_validateDisjunctiveFilterElements(A,E);const R=[];for(const x of A)R.push(__PRIVATE_parseDocumentIdValue(m,u,x));P={arrayValue:{values:R}}}else P=__PRIVATE_parseDocumentIdValue(m,u,A)}else E!=="in"&&E!=="not-in"&&E!=="array-contains-any"||__PRIVATE_validateDisjunctiveFilterElements(A,E),P=__PRIVATE_parseQueryValue(f,d,A,E==="in"||E==="not-in");return FieldFilter.create(y,E,P)}(r._query,"where",a,r.firestore._databaseId,this._field,this._op,this._value)}}function where(o,r,a){const l=r,c=__PRIVATE_fieldPathFromArgument("where",o);return QueryFieldFilterConstraint._create(c,l,a)}class QueryCompositeFilterConstraint extends AppliableConstraint{constructor(r,a){super(),this.type=r,this._queryConstraints=a}static _create(r,a){return new QueryCompositeFilterConstraint(r,a)}
4254_parse(r){const a=this._queryConstraints.map(l=>l._parse(r)).filter(l=>l.getFilters().length>0);return a.length===1?a[0]:CompositeFilter.create(a,this._getOperator())}_apply(r){const a=this._parse(r);return a.getFilters().length===0?r:(function(c,u){let d=c;const f=u.getFlattenedFilters();for(const m of f)__PRIVATE_validateNewFieldFilter(d,m),d=__PRIVATE_queryWithAddedFilter(d,m)}(r._query,a),new Query(r.firestore,r.converter,__PRIVATE_queryWithAddedFilter(r._query,a)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class QueryOrderByConstraint extends QueryConstraint{constructor(r,a){super(),this._field=r,this._direction=a,this.type="orderBy"}static _create(r,a){return new QueryOrderByConstraint(r,a)}_apply(r){const a=function(c,u,d){if(c.startAt!==null)throw new FirestoreError(D.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(c.endAt!==null)throw new FirestoreError(D.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new OrderBy(u,d)}(r._query,this._field,this._direction);return new Query(r.firestore,r.converter,function(c,u){const d=c.explicitOrderBy.concat([u]);return new __PRIVATE_QueryImpl(c.path,c.collectionGroup,d,c.filters.slice(),c.limit,c.limitType,c.startAt,c.endAt)}(r._query,a))}}function orderBy(o,r="asc"){const a=r,l=__PRIVATE_fieldPathFromArgument("orderBy",o);return QueryOrderByConstraint._create(l,a)}class QueryLimitConstraint extends QueryConstraint{constructor(r,a,l){super(),this.type=r,this._limit=a,this._limitType=l}static _create(r,a,l){return new QueryLimitConstraint(r,a,l)}_apply(r){return new Query(r.firestore,r.converter,__PRIVATE_queryWithLimit(r._query,this._limit,this._limitType))}}function limit(o){return __PRIVATE_validatePositiveNumber("limit",o),QueryLimitConstraint._create("limit",o,"F")}function limitToLast(o){return __PRIVATE_validatePositiveNumber("limitToLast",o),QueryLimitConstraint._create("limitToLast",o,"L")}class QueryStartAtConstraint extends QueryConstraint{constructor(r,a,l){super(),this.type=r,this._docOrFields=a,this._inclusive=l}static _create(r,a,l){return new QueryStartAtConstraint(r,a,l)}_apply(r){const a=__PRIVATE_newQueryBoundFromDocOrFields(r,this.type,this._docOrFields,this._inclusive);return new Query(r.firestore,r.converter,function(c,u){return new __PRIVATE_QueryImpl(c.path,c.collectionGroup,c.explicitOrderBy.slice(),c.filters.slice(),c.limit,c.limitType,u,c.endAt)}(r._query,a))}}function startAfter(...o){return QueryStartAtConstraint._create("startAfter",o,!1)}function __PRIVATE_newQueryBoundFromDocOrFields(o,r,a,l){if(a[0]=getModularInstance(a[0]),a[0]instanceof DocumentSnapshot$1)return function(u,d,f,m,y){if(!m)throw new FirestoreError(D.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${f}().`);const E=[];for(const A of __PRIVATE_queryNormalizedOrderBy(u))if(A.field.isKeyField())E.push(__PRIVATE_refValue(d,m.key));else{const P=m.data.field(A.field);if(__PRIVATE_isServerTimestamp(P))throw new FirestoreError(D.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+A.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(P===null){const R=A.field.canonicalString();throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${R}' (used as the orderBy) does not exist.`)}E.push(P)}return new Bound(E,y)}(o._query,o.firestore._databaseId,r,a[0]._document,l);{const c=__PRIVATE_newUserDataReader(o.firestore);return function(d,f,m,y,E,A){const P=d.explicitOrderBy;if(E.length>P.length)throw new FirestoreError(D.INVALID_ARGUMENT,`Too many arguments provided to ${y}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const R=[];for(let x=0;x<E.length;x++){const M=E[x];if(P[x].field.isKeyField()){if(typeof M!="string")throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${y}(), but got a ${typeof M}`);if(!__PRIVATE_isCollectionGroupQuery(d)&&M.indexOf("/")!==-1)throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${y}() must be a plain document ID, but '${M}
4254' contains a slash.`);const $=d.path.child(ResourcePath.fromString(M));if(!DocumentKey.isDocumentKey($))throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${y}() must result in a valid document path, but '${$}' is not because it contains an odd number of segments.`);const V=new DocumentKey($);R.push(__PRIVATE_refValue(f,V))}else{const $=__PRIVATE_parseQueryValue(m,y,M);R.push($)}}return new Bound(R,A)}(o._query,o.firestore._databaseId,c,r,a,l)}}function __PRIVATE_parseDocumentIdValue(o,r,a){if(typeof(a=getModularInstance(a))=="string"){if(a==="")throw new FirestoreError(D.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!__PRIVATE_isCollectionGroupQuery(r)&&a.indexOf("/")!==-1)throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${a}' contains a '/' character.`);const l=r.path.child(ResourcePath.fromString(a));if(!DocumentKey.isDocumentKey(l))throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${l}' is not because it has an odd number of segments (${l.length}).`);return __PRIVATE_refValue(o,new DocumentKey(l))}if(a instanceof DocumentReference)return __PRIVATE_refValue(o,a._key);throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${__PRIVATE_valueDescription(a)}.`)}function __PRIVATE_validateDisjunctiveFilterElements(o,r){if(!Array.isArray(o)||o.length===0)throw new FirestoreError(D.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${r.toString()}' filters.`)}function __PRIVATE_validateNewFieldFilter(o,r){const a=function(c,u){for(const d of c)for(const f of d.getFlattenedFilters())if(u.indexOf(f.op)>=0)return f.op;return null}(o.filters,function(c){switch(c){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(r.op));if(a!==null)throw a===r.op?new FirestoreError(D.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${r.op.toString()}' filter.`):new FirestoreError(D.INVALID_ARGUMENT,`Invalid query. You cannot use '${r.op.toString()}' filters with '${a.toString()}' filters.`)}class AbstractUserDataWriter{convertValue(r,a="none"){switch(__PRIVATE_typeOrder(r)){case 0:return null;case 1:return r.booleanValue;case 2:return __PRIVATE_normalizeNumber(r.integerValue||r.doubleValue);case 3:return this.convertTimestamp(r.timestampValue);case 4:return this.convertServerTimestamp(r,a);case 5:return r.stringValue;case 6:return this.convertBytes(__PRIVATE_normalizeByteString(r.bytesValue));case 7:return this.convertReference(r.referenceValue);case 8:return this.convertGeoPoint(r.geoPointValue);case 9:return this.convertArray(r.arrayValue,a);case 11:return this.convertObject(r.mapValue,a);case 10:return this.convertVectorValue(r.mapValue);default:throw fail()}}convertObject(r,a){return this.convertObjectMap(r.fields,a)}convertObjectMap(r,a="none"){const l={};return forEach(r,(c,u)=>{l[c]=this.convertValue(u,a)}),l}convertVectorValue(r){var a,l,c;const u=(c=(l=(a=r.fields)===null||a===void 0?void 0:a.value.arrayValue)===null||l===void 0?void 0:l.values)===null||c===void 0?void 0:c.map(d=>__PRIVATE_normalizeNumber(d.doubleValue));return new VectorValue(u)}convertGeoPoint(r){return new GeoPoint(__PRIVATE_normalizeNumber(r.latitude),__PRIVATE_normalizeNumber(r.longitude))}convertArray(r,a){return(r.values||[]).map(l=>this.convertValue(l,a))}convertServerTimestamp(r,a){switch(a){case"previous":const l=__PRIVATE_getPreviousValue(r);return l==null?null:this.convertValue(l,a);case"estimate":return this.convertTimestamp(__PRIVATE_getLocalWriteTime(r));default:return null}}convertTimestamp(r){const a=__PRIVATE_normalizeTimestamp(r);return new Timestamp(a.seconds,a.nanos)}convertDocumentKey(r,a){const l=ResourcePath.fromString(r);__PRIVATE_hardAssert(__PRIVATE_isValidResourceName(l));const c=new DatabaseId(l.get(1),l.get(3)),u=new DocumentKey(l.popFirst(5));return c.isEqual(a)||__PRIVATE_logError(`Document ${u} contains a document reference within a different database (${c.projectId}/${c.database}) which is not supported. It will be treated as a reference in the current database (${a.projectId}/${a.database}) instead.`),u}}/**
4255 * @license
4256 * Copyright 2020 Google LLC
4257 *
4258 * Licensed under the Apache License, Version 2.0 (the "License");
4259 * you may not use this file except in compliance with the License.
4260 * You may obtain a copy of the License at
4261 *
4262 *   http://www.apache.org/licenses/LICENSE-2.0
4263 *
4264 * Unless required by applicable law or agreed to in writing, software
4265 * distributed under the License is distributed on an "AS IS" BASIS,
4266 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4267 * See the License for the specific language governing permissions and
4268 * limitations under the License.
4269 */function __PRIVATE_applyFirestoreDataConverter(o,r,a){let l;return l=o?a&&(a.merge||a.mergeFields)?o.toFirestore(r,a):o.toFirestore(r):r,l}/**
4270 * @license
4271 * Copyright 2020 Google LLC
4272 *
4273 * Licensed under the Apache License, Version 2.0 (the "License");
4274 * you may not use this file except in compliance with the License.
4275 * You may obtain a copy of the License at
4276 *
4277 *   http://www.apache.org/licenses/LICENSE-2.0
4278 *
4279 * Unless required by applicable law or agreed to in writing, software
4280 * distributed under the License is distributed on an "AS IS" BASIS,
4281 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4282 * See the License for the specific language governing permissions and
4283 * limitations under the License.
4284 */class SnapshotMetadata{constructor(r,a){this.hasPendingWrites=r,this.fromCache=a}isEqual(r){return this.hasPendingWrites===r.hasPendingWrites&&this.fromCache===r.fromCache}}class DocumentSnapshot extends DocumentSnapshot$1{constructor(r,a,l,c,u,d){super(r,a,l,c,d),this._firestore=r,this._firestoreImpl=r,this.metadata=u}exists(){return super.exists()}data(r={}){if(this._document){if(this._converter){const a=new QueryDocumentSnapshot(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(a,r)}return this._userDataWriter.convertValue(this._document.data.value,r.serverTimestamps)}}get(r,a={}){if(this._document){const l=this._document.data.field(__PRIVATE_fieldPathFromArgument("DocumentSnapshot.get",r));if(l!==null)return this._userDataWriter.convertValue(l,a.serverTimestamps)}}}class QueryDocumentSnapshot extends DocumentSnapshot{data(r={}){return super.data(r)}}class QuerySnapshot{constructor(r,a,l,c){this._firestore=r,this._userDataWriter=a,this._snapshot=c,this.metadata=new SnapshotMetadata(c.hasPendingWrites,c.fromCache),this.query=l}get docs(){const r=[];return this.forEach(a=>r.push(a)),r}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(r,a){this._snapshot.docs.forEach(l=>{r.call(a,new QueryDocumentSnapshot(this._firestore,this._userDataWriter,l.key,l,new SnapshotMetadata(this._snapshot.mutatedKeys.has(l.key),this._snapshot.fromCache),this.query.converter))})}docChanges(r={}){const a=!!r.includeMetadataChanges;if(a&&this._snapshot.excludesMetadataChanges)throw new FirestoreError(D.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===a||(this._cachedChanges=function(c,u){if(c._snapshot.oldDocs.isEmpty()){let d=0;return c._snapshot.docChanges.map(f=>{const m=new QueryDocumentSnapshot(c._firestore,c._userDataWriter,f.doc.key,f.doc,new SnapshotMetadata(c._snapshot.mutatedKeys.has(f.doc.key),c._snapshot.fromCache),c.query.converter);return f.doc,{type:"added",doc:m,oldIndex:-1,newIndex:d++}})}{let d=c._snapshot.oldDocs;return c._snapshot.docChanges.filter(f=>u||f.type!==3).map(f=>{const m=new QueryDocumentSnapshot(c._firestore,c._userDataWriter,f.doc.key,f.doc,new SnapshotMetadata(c._snapshot.mutatedKeys.has(f.doc.key),c._snapshot.fromCache),c.query.converter);let y=-1,E=-1;return f.type!==0&&(y=d.indexOf(f.doc.key),d=d.delete(f.doc.key)),f.type!==1&&(d=d.add(f.doc),E=d.indexOf(f.doc.key)),{type:__PRIVATE_resultChangeType(f.type),doc:m,oldIndex:y,newIndex:E}})}}(this,a),this._cachedChangesIncludeMetadataChanges=a),this._cachedChanges}}function __PRIVATE_resultChangeType(o){switch(o){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return fail()}}/**
4285 * @license
4286 * Copyright 2020 Google LLC
4287 *
4288 * Licensed under the Apache License, Version 2.0 (the "License");
4289 * you may not use this file except in compliance with the License.
4290 * You may obtain a copy of the License at
4291 *
4292 *   http://www.apache.org/licenses/LICENSE-2.0
4293 *
4294 * Unless required by applicable law or agreed to in writing, software
4295 * distributed under the License is distributed on an "AS IS" BASIS,
4296 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4297 * See the License for the specific language governing permissions and
4298 * limitations under the License.
4299 */function getDoc(o){o=__PRIVATE_cast(o,DocumentReference);const r=__PRIVATE_cast(o.firestore,Firestore);return __PRIVATE_firestoreClientGetDocumentViaSnapshotListener(ensureFirestoreConfigured(r),o._key).then(a=>__PRIVATE_convertToDocSnapshot(r,o,a))}class __PRIVATE_ExpUserDataWriter extends AbstractUserDataWriter{constructor(r){super(),this.firestore=r}convertBytes(r){return new Bytes(r)}convertReference(r){const a=this.convertDocumentKey(r,this.firestore._databaseId);return new DocumentReference(this.firestore,null,a)}}function getDocs(o){o=__PRIVATE_cast(o,Query);const r=__PRIVATE_cast(o.firestore,Firestore),a=ensureFirestoreConfigured(r),l=new __PRIVATE_ExpUserDataWriter(r);return __PRIVATE_validateHasExplicitOrderByForLimitToLast(o._query),__PRIVATE_firestoreClientGetDocumentsViaSnapshotListener(a,o._query).then(c=>new QuerySnapshot(r,l,o,c))}function setDoc(o,r,a){o=__PRIVATE_cast(o,DocumentReference);const l=__PRIVATE_cast(o.firestore,Firestore),c=__PRIVATE_applyFirestoreDataConverter(o.converter,r,a);return executeWrite(l,[__PRIVATE_parseSetData(__PRIVATE_newUserDataReader(l),"setDoc",o._key,c,o.converter!==null,a).toMutation(o._key,Precondition.none())])}function updateDoc(o,r,a,...l){o=__PRIVATE_cast(o,DocumentReference);const c=__PRIVATE_cast(o.firestore,Firestore),u=__PRIVATE_newUserDataReader(c);let d;return d=typeof(r=getModularInstance(r))=="string"||r instanceof FieldPath?__PRIVATE_parseUpdateVarargs(u,"updateDoc",o._key,r,a,l):__PRIVATE_parseUpdateData(u,"updateDoc",o._key,r),executeWrite(c,[d.toMutation(o._key,Precondition.exists(!0))])}function onSnapshot(o,...r){var a,l,c;o=getModularInstance(o);let u={includeMetadataChanges:!1,source:"default"},d=0;typeof r[d]!="object"||__PRIVATE_isPartialObserver(r[d])||(u=r[d],d++);const f={includeMetadataChanges:u.includeMetadataChanges,source:u.source};if(__PRIVATE_isPartialObserver(r[d])){const A=r[d];r[d]=(a=A.next)===null||a===void 0?void 0:a.bind(A),r[d+1]=(l=A.error)===null||l===void 0?void 0:l.bind(A),r[d+2]=(c=A.complete)===null||c===void 0?void 0:c.bind(A)}let m,y,E;if(o instanceof DocumentReference)y=__PRIVATE_cast(o.firestore,Firestore),E=__PRIVATE_newQueryForPath(o._key.path),m={next:A=>{r[d]&&r[d](__PRIVATE_convertToDocSnapshot(y,o,A))},error:r[d+1],complete:r[d+2]};else{const A=__PRIVATE_cast(o,Query);y=__PRIVATE_cast(A.firestore,Firestore),E=A._query;const P=new __PRIVATE_ExpUserDataWriter(y);m={next:R=>{r[d]&&r[d](new QuerySnapshot(y,P,A,R))},error:r[d+1],complete:r[d+2]},__PRIVATE_validateHasExplicitOrderByForLimitToLast(o._query)}return function(P,R,x,M){const $=new __PRIVATE_AsyncObserver(M),V=new __PRIVATE_QueryListener(R,$,x);return P.asyncQueue.enqueueAndForget(async()=>__PRIVATE_eventManagerListen(await __PRIVATE_getEventManager(P),V)),()=>{$.Za(),P.asyncQueue.enqueueAndForget(async()=>__PRIVATE_eventManagerUnlisten(await __PRIVATE_getEventManager(P),V))}}(ensureFirestoreConfigured(y),E,f,m)}function executeWrite(o,r){return function(l,c){const u=new __PRIVATE_Deferred;return l.asyncQueue.enqueueAndForget(async()=>__PRIVATE_syncEngineWrite(await __PRIVATE_getSyncEngine(l),c,u)),u.promise}(ensureFirestoreConfigured(o),r)}function __PRIVATE_convertToDocSnapshot(o,r,a){const l=a.docs.get(r._key),c=new __PRIVATE_ExpUserDataWriter(o);return new DocumentSnapshot(o,c,r._key,l,new SnapshotMetadata(a.hasPendingWrites,a.fromCache),r.converter)}function serverTimestamp(){return new __PRIVATE_ServerTimestampFieldValueImpl("serverTimestamp")}function increment(o){return new __PRIVATE_NumericIncrementFieldValueImpl("increment",o)}(function(r,a=!0){(function(c){S=c})(SDK_VERSION$1),_registerComponent(new Component("firestore",(l,{instanceIdentifier:c,options:u})=>{const d=l.getProvider("app").getImmediate(),f=new Firestore(new __PRIVATE_FirebaseAuthCredentialsProvider(l.getProvider("auth-internal")),new __PRIVATE_FirebaseAppCheckTokenProvider(l.getProvider("app-check-internal")),function(y,E){if
4299(!Object.prototype.hasOwnProperty.apply(y.options,["projectId"]))throw new FirestoreError(D.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new DatabaseId(y.options.projectId,E)}(d,c),d);return u=Object.assign({useFetchStreams:a},u),f._setSettings(u),f},"PUBLIC").setMultipleInstances(!0)),registerVersion(w,"4.7.3",r),registerVersion(w,"4.7.3","esm2017")})();/**
4300 * @license
4301 * Copyright 2017 Google LLC
4302 *
4303 * Licensed under the Apache License, Version 2.0 (the "License");
4304 * you may not use this file except in compliance with the License.
4305 * You may obtain a copy of the License at
4306 *
4307 *   http://www.apache.org/licenses/LICENSE-2.0
4308 *
4309 * Unless required by applicable law or agreed to in writing, software
4310 * distributed under the License is distributed on an "AS IS" BASIS,
4311 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4312 * See the License for the specific language governing permissions and
4313 * limitations under the License.
4314 */const LONG_TYPE="type.googleapis.com/google.protobuf.Int64Value",UNSIGNED_LONG_TYPE="type.googleapis.com/google.protobuf.UInt64Value";function mapValues(o,r){const a={};for(const l in o)o.hasOwnProperty(l)&&(a[l]=r(o[l]));return a}function encode(o){if(o==null)return null;if(o instanceof Number&&(o=o.valueOf()),typeof o=="number"&&isFinite(o)||o===!0||o===!1||Object.prototype.toString.call(o)==="[object String]")return o;if(o instanceof Date)return o.toISOString();if(Array.isArray(o))return o.map(r=>encode(r));if(typeof o=="function"||typeof o=="object")return mapValues(o,r=>encode(r));throw new Error("Data cannot be encoded in JSON: "+o)}function decode(o){if(o==null)return o;if(o["@type"])switch(o["@type"]){case LONG_TYPE:case UNSIGNED_LONG_TYPE:{const r=Number(o.value);if(isNaN(r))throw new Error("Data cannot be decoded from JSON: "+o);return r}default:throw new Error("Data cannot be decoded from JSON: "+o)}return Array.isArray(o)?o.map(r=>decode(r)):typeof o=="function"||typeof o=="object"?mapValues(o,r=>decode(r)):o}/**
4315 * @license
4316 * Copyright 2020 Google LLC
4317 *
4318 * Licensed under the Apache License, Version 2.0 (the "License");
4319 * you may not use this file except in compliance with the License.
4320 * You may obtain a copy of the License at
4321 *
4322 *   http://www.apache.org/licenses/LICENSE-2.0
4323 *
4324 * Unless required by applicable law or agreed to in writing, software
4325 * distributed under the License is distributed on an "AS IS" BASIS,
4326 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4327 * See the License for the specific language governing permissions and
4328 * limitations under the License.
4329 */const FUNCTIONS_TYPE="functions";/**
4330 * @license
4331 * Copyright 2017 Google LLC
4332 *
4333 * Licensed under the Apache License, Version 2.0 (the "License");
4334 * you may not use this file except in compliance with the License.
4335 * You may obtain a copy of the License at
4336 *
4337 *   http://www.apache.org/licenses/LICENSE-2.0
4338 *
4339 * Unless required by applicable law or agreed to in writing, software
4340 * distributed under the License is distributed on an "AS IS" BASIS,
4341 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4342 * See the License for the specific language governing permissions and
4343 * limitations under the License.
4344 */const errorCodeMap={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};let FunctionsError$1=class extends FirebaseError{constructor(r,a,l){super(`${FUNCTIONS_TYPE}/${r}`,a||""),this.details=l}};function codeForHTTPStatus(o){if(o>=200&&o<300)return"ok";switch(o){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function _errorForResponse(o,r){let a=codeForHTTPStatus(o),l=a,c;try{const u=r&&r.error;if(u){const d=u.status;
4344if(typeof d=="string"){if(!errorCodeMap[d])return new FunctionsError$1("internal","internal");a=errorCodeMap[d],l=d}const f=u.message;typeof f=="string"&&(l=f),c=u.details,c!==void 0&&(c=decode(c))}}catch{}return a==="ok"?null:new FunctionsError$1(a,l,c)}/**
4345 * @license
4346 * Copyright 2017 Google LLC
4347 *
4348 * Licensed under the Apache License, Version 2.0 (the "License");
4349 * you may not use this file except in compliance with the License.
4350 * You may obtain a copy of the License at
4351 *
4352 *   http://www.apache.org/licenses/LICENSE-2.0
4353 *
4354 * Unless required by applicable law or agreed to in writing, software
4355 * distributed under the License is distributed on an "AS IS" BASIS,
4356 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4357 * See the License for the specific language governing permissions and
4358 * limitations under the License.
4359 */class ContextProvider{constructor(r,a,l){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=r.getImmediate({optional:!0}),this.messaging=a.getImmediate({optional:!0}),this.auth||r.get().then(c=>this.auth=c,()=>{}),this.messaging||a.get().then(c=>this.messaging=c,()=>{}),this.appCheck||l.get().then(c=>this.appCheck=c,()=>{})}async getAuthToken(){if(this.auth)try{const r=await this.auth.getToken();return r==null?void 0:r.accessToken}catch{return}}async getMessagingToken(){if(!(!this.messaging||!("Notification"in self)||Notification.permission!=="granted"))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(r){if(this.appCheck){const a=r?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return a.error?null:a.token}return null}async getContext(r){const a=await this.getAuthToken(),l=await this.getMessagingToken(),c=await this.getAppCheckToken(r);return{authToken:a,messagingToken:l,appCheckToken:c}}}/**
4360 * @license
4361 * Copyright 2017 Google LLC
4362 *
4363 * Licensed under the Apache License, Version 2.0 (the "License");
4364 * you may not use this file except in compliance with the License.
4365 * You may obtain a copy of the License at
4366 *
4367 *   http://www.apache.org/licenses/LICENSE-2.0
4368 *
4369 * Unless required by applicable law or agreed to in writing, software
4370 * distributed under the License is distributed on an "AS IS" BASIS,
4371 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4372 * See the License for the specific language governing permissions and
4373 * limitations under the License.
4374 */const DEFAULT_REGION="us-central1";function failAfter(o){let r=null;return{promise:new Promise((a,l)=>{r=setTimeout(()=>{l(new FunctionsError$1("deadline-exceeded","deadline-exceeded"))},o)}),cancel:()=>{r&&clearTimeout(r)}}}class FunctionsService{constructor(r,a,l,c,u=DEFAULT_REGION,d){this.app=r,this.fetchImpl=d,this.emulatorOrigin=null,this.contextProvider=new ContextProvider(a,l,c),this.cancelAllRequests=new Promise(f=>{this.deleteService=()=>Promise.resolve(f())});try{const f=new URL(u);this.customDomain=f.origin+(f.pathname==="/"?"":f.pathname),this.region=DEFAULT_REGION}catch{this.customDomain=null,this.region=u}}_delete(){return this.deleteService()}_url(r){const a=this.app.options.projectId;return this.emulatorOrigin!==null?`${this.emulatorOrigin}/${a}/${this.region}/${r}`:this.customDomain!==null?`${this.customDomain}/${r}`:`https://${this.region}-${a}.cloudfunctions.net/${r}`}}function connectFunctionsEmulator$1(o,r,a){o.emulatorOrigin=`http://${r}:${a}`}function httpsCallable$1(o,r,a){return l=>call(o,r,l,a||{})}async function postJSON(o,r,a,l){a["Content-Type"]="application/json";
4374let c;try{c=await l(o,{method:"POST",body:JSON.stringify(r),headers:a})}catch{return{status:0,json:null}}let u=null;try{u=await c.json()}catch{}return{status:c.status,json:u}}function call(o,r,a,l){const c=o._url(r);return callAtURL(o,c,a,l)}async function callAtURL(o,r,a,l){a=encode(a);const c={data:a},u={},d=await o.contextProvider.getContext(l.limitedUseAppCheckTokens);d.authToken&&(u.Authorization="Bearer "+d.authToken),d.messagingToken&&(u["Firebase-Instance-ID-Token"]=d.messagingToken),d.appCheckToken!==null&&(u["X-Firebase-AppCheck"]=d.appCheckToken);const f=l.timeout||7e4,m=failAfter(f),y=await Promise.race([postJSON(r,c,u,o.fetchImpl),m.promise,o.cancelAllRequests]);if(m.cancel(),!y)throw new FunctionsError$1("cancelled","Firebase Functions instance was deleted.");const E=_errorForResponse(y.status,y.json);if(E)throw E;if(!y.json)throw new FunctionsError$1("internal","Response is not valid JSON object.");let A=y.json.data;if(typeof A>"u"&&(A=y.json.result),typeof A>"u")throw new FunctionsError$1("internal","Response is missing data field.");return{data:decode(A)}}const name="@firebase/functions",version$4="0.11.8";/**
4375 * @license
4376 * Copyright 2019 Google LLC
4377 *
4378 * Licensed under the Apache License, Version 2.0 (the "License");
4379 * you may not use this file except in compliance with the License.
4380 * You may obtain a copy of the License at
4381 *
4382 *   http://www.apache.org/licenses/LICENSE-2.0
4383 *
4384 * Unless required by applicable law or agreed to in writing, software
4385 * distributed under the License is distributed on an "AS IS" BASIS,
4386 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4387 * See the License for the specific language governing permissions and
4388 * limitations under the License.
4389 */const AUTH_INTERNAL_NAME="auth-internal",APP_CHECK_INTERNAL_NAME="app-check-internal",MESSAGING_INTERNAL_NAME="messaging-internal";function registerFunctions(o,r){const a=(l,{instanceIdentifier:c})=>{const u=l.getProvider("app").getImmediate(),d=l.getProvider(AUTH_INTERNAL_NAME),f=l.getProvider(MESSAGING_INTERNAL_NAME),m=l.getProvider(APP_CHECK_INTERNAL_NAME);return new FunctionsService(u,d,f,m,c,o)};_registerComponent(new Component(FUNCTIONS_TYPE,a,"PUBLIC").setMultipleInstances(!0)),registerVersion(name,version$4,r),registerVersion(name,version$4,"esm2017")}/**
4390 * @license
4391 * Copyright 2020 Google LLC
4392 *
4393 * Licensed under the Apache License, Version 2.0 (the "License");
4394 * you may not use this file except in compliance with the License.
4395 * You may obtain a copy of the License at
4396 *
4397 *   http://www.apache.org/licenses/LICENSE-2.0
4398 *
4399 * Unless required by applicable law or agreed to in writing, software
4400 * distributed under the License is distributed on an "AS IS" BASIS,
4401 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4402 * See the License for the specific language governing permissions and
4403 * limitations under the License.
4404 */function getFunctions(o=getApp(),r=DEFAULT_REGION){const l=_getProvider(getModularInstance(o),FUNCTIONS_TYPE).getImmediate({identifier:r}),c=getDefaultEmulatorHostnameAndPort("functions");return c&&connectFunctionsEmulator(l,...c),l}function connectFunctionsEmulator(o,r,a){connectFunctionsEmulator$1(getModularInstance(o),r,a)}function httpsCallable(o,r,a){return httpsCallable$1(getModularInstance(o),r,a)}registerFunctions(fetch.bind(self));const firebase_Tc1lVUbp7M=defineNuxtPlugin(o=>{const a=initializeApp({apiKey:"AIzaSyAFEYyFKJh7D64KN994VANsCmDKjCryub0",authDomain:"estage-329105.firebaseapp.com",projectId:"estage-329105",storageBucket:"estage-329105.appspot.com",messagingSenderId:"120948567760",appId:"1:120948567760:web:12cc44026e9e66c30778d5"}),l=getAuth(a),c=getFirestore(a);return{provide:{auth:{signInWithCustomToken,auth:l,onAuthStateChanged,onIdTokenChanged,signOut},database:{ref,onChildAdded,onDisconnect,db:getDatabase(a),child,get:get$3,set:set$2,serverTimestamp,runTransaction,push,onValue,refFromURL},firebase:{db:c,where,collection,doc,startAfter,query,onSnapshot,orderBy,getDoc,getDocs,setDoc,updateDoc,serverTimestamp,increment,limitToLast,limit},functions:{getFunctions:getFunctions(a),httpsCallable},firebaseApp:a}}});/*!
4405* sweetalert2 v11.17.2
4406* Released under the MIT License.
4407*/function _assertClassBrand(o,r,a){if(typeof o=="function"?o===r:o.has(r))return arguments.length<3?r:a;throw new TypeError("Private element is not present on this object")}function _checkPrivateRedeclaration(o,r){if(r.has(o))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet2(o,r){return o.get(_assertClassBrand(o,r))}function _classPrivateFieldInitSpec(o,r,a){_checkPrivateRedeclaration(o,r),r.set(o,a)}function _classPrivateFieldSet2(o,r,a){return o.set(_assertClassBrand(o,r),a),a}const RESTORE_FOCUS_TIMEOUT=100,globalState={},focusPreviousActiveElement=()=>{globalState.previousActiveElement instanceof HTMLElement?(globalState.previousActiveElement.focus(),globalState.previousActiveElement=null):document.body&&document.body.focus()},restoreActiveElement=o=>new Promise(r=>{if(!o)return r();const a=window.scrollX,l=window.scrollY;globalState.restoreFocusTimeout=setTimeout(()=>{focusPreviousActiveElement(),r()},RESTORE_FOCUS_TIMEOUT),window.scrollTo(a,l)}),swalPrefix="swal2-",classNames=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"],swalClasses=classNames.reduce((o,r)=>(o[r]=swalPrefix+r,o),{}),icons=["success","warning","info","question","error"],iconTypes=icons.reduce((o,r)=>(o[r]=swalPrefix+r,o),{}),consolePrefix="SweetAlert2:",capitalizeFirstLetter=o=>o.charAt(0).toUpperCase()+o.slice(1),warn$1=o=>{console.warn(`${consolePrefix} ${typeof o=="object"?o.join(" "):o}`)},error=o=>{console.error(`${consolePrefix} ${o}`)},previousWarnOnceMessages=[],warnOnce=o=>{previousWarnOnceMessages.includes(o)||(previousWarnOnceMessages.push(o),warn$1(o))},warnAboutDeprecation=function(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;warnOnce(`"${o}" is deprecated and will be removed in the next major release.${r?` Use "${r}" instead.`:""}`)},callIfFunction=o=>typeof o=="function"?o():o,hasToPromiseFn=o=>o&&typeof o.toPromise=="function",asPromise=o=>hasToPromiseFn(o)?o.toPromise():Promise.resolve(o),isPromise=o=>o&&Promise.resolve(o)===o,getContainer=()=>document.body.querySelector(`.${swalClasses.container}`),elementBySelector=o=>{const r=getContainer();return r?r.querySelector(o):null},elementByClass=o=>elementBySelector(`.${o}`),getPopup=()=>elementByClass(swalClasses.popup),getIcon=()=>elementByClass(swalClasses.icon),getIconContent=()=>elementByClass(swalClasses["icon-content"]),getTitle=()=>elementByClass(swalClasses.title),getHtmlContainer=()=>elementByClass(swalClasses["html-container"]),getImage=()=>elementByClass(swalClasses.image),getProgressSteps=()=>elementByClass(swalClasses["progress-steps"]),getValidationMessage=()=>elementByClass(swalClasses["validation-message"]),getConfirmButton=()=>elementBySelector(`.${swalClasses.actions} .${swalClasses.confirm}`),getCancelButton=()=>elementBySelector(`.${swalClasses.actions} .${swalClasses.cancel}`),getDenyButton=()=>elementBySelector(`.${swalClasses.actions} .${swalClasses.deny}`),getInputLabel=()=>elementByClass(swalClasses["input-label"]),getLoader=()=>elementBySelector(`.${swalClasses.loader}`),getActions=()=>elementByClass(swalClasses.actions),getFooter=()=>elementByClass(swalClasses.footer),getTimerProgressBar=()=>elementByClass(swalClasses["timer-progress-bar"]),getCloseButton=()=>elementByClass(swalClasses.close),focusable=`
4408  a[href],
4409  area[href],
4410  input:not([disabled]),
4411  select:not([disabled]),
4412  textarea:not([disabled]),
4413  button:not([disabled]),
4414  iframe,
4415  object,
4416  embed,
4417  [tabindex="0"],
4418  [contenteditable],
4419  audio[controls],
4420  video[controls],
4421  summary
4422`,getFocusableElements=()=>{const o=getPopup();if(!o)return[];
4422const r=o.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),a=Array.from(r).sort((u,d)=>{const f=parseInt(u.getAttribute("tabindex")||"0"),m=parseInt(d.getAttribute("tabindex")||"0");return f>m?1:f<m?-1:0}),l=o.querySelectorAll(focusable),c=Array.from(l).filter(u=>u.getAttribute("tabindex")!=="-1");return[...new Set(a.concat(c))].filter(u=>isVisible$1(u))},isModal=()=>hasClass(document.body,swalClasses.shown)&&!hasClass(document.body,swalClasses["toast-shown"])&&!hasClass(document.body,swalClasses["no-backdrop"]),isToast=()=>{const o=getPopup();return o?hasClass(o,swalClasses.toast):!1},isLoading=()=>{const o=getPopup();return o?o.hasAttribute("data-loading"):!1},setInnerHtml=(o,r)=>{if(o.textContent="",r){const l=new DOMParser().parseFromString(r,"text/html"),c=l.querySelector("head");c&&Array.from(c.childNodes).forEach(d=>{o.appendChild(d)});const u=l.querySelector("body");u&&Array.from(u.childNodes).forEach(d=>{d instanceof HTMLVideoElement||d instanceof HTMLAudioElement?o.appendChild(d.cloneNode(!0)):o.appendChild(d)})}},hasClass=(o,r)=>{if(!r)return!1;const a=r.split(/\s+/);for(let l=0;l<a.length;l++)if(!o.classList.contains(a[l]))return!1;return!0},removeCustomClasses=(o,r)=>{Array.from(o.classList).forEach(a=>{!Object.values(swalClasses).includes(a)&&!Object.values(iconTypes).includes(a)&&!Object.values(r.showClass||{}).includes(a)&&o.classList.remove(a)})},applyCustomClass=(o,r,a)=>{if(removeCustomClasses(o,r),!r.customClass)return;const l=r.customClass[a];if(l){if(typeof l!="string"&&!l.forEach){warn$1(`Invalid type of customClass.${a}! Expected string or iterable object, got "${typeof l}"`);return}addClass(o,l)}},getInput$1=(o,r)=>{if(!r)return null;switch(r){case"select":case"textarea":case"file":return o.querySelector(`.${swalClasses.popup} > .${swalClasses[r]}`);case"checkbox":return o.querySelector(`.${swalClasses.popup} > .${swalClasses.checkbox} input`);case"radio":return o.querySelector(`.${swalClasses.popup} > .${swalClasses.radio} input:checked`)||o.querySelector(`.${swalClasses.popup} > .${swalClasses.radio} input:first-child`);case"range":return o.querySelector(`.${swalClasses.popup} > .${swalClasses.range} input`);default:return o.querySelector(`.${swalClasses.popup} > .${swalClasses.input}`)}},focusInput=o=>{if(o.focus(),o.type!=="file"){const r=o.value;o.value="",o.value=r}},toggleClass=(o,r,a)=>{!o||!r||(typeof r=="string"&&(r=r.split(/\s+/).filter(Boolean)),r.forEach(l=>{Array.isArray(o)?o.forEach(c=>{a?c.classList.add(l):c.classList.remove(l)}):a?o.classList.add(l):o.classList.remove(l)}))},addClass=(o,r)=>{toggleClass(o,r,!0)},removeClass=(o,r)=>{toggleClass(o,r,!1)},getDirectChildByClass=(o,r)=>{const a=Array.from(o.children);for(let l=0;l<a.length;l++){const c=a[l];if(c instanceof HTMLElement&&hasClass(c,r))return c}},applyNumericalStyle=(o,r,a)=>{a===`${parseInt(a)}`&&(a=parseInt(a)),a||parseInt(a)===0?o.style.setProperty(r,typeof a=="number"?`${a}px`:a):o.style.removeProperty(r)},show=function(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";o&&(o.style.display=r)},hide=o=>{o&&(o.style.display="none")},showWhenInnerHtmlPresent=function(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"block";o&&new MutationObserver(()=>{toggle(o,o.innerHTML,r)}).observe(o,{childList:!0,subtree:!0})},setStyle=(o,r,a,l)=>{const c=o.querySelector(r);c&&c.style.setProperty(a,l)},toggle=function(o,r){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";r?show(o,a):hide(o)},isVisible$1=o=>!!(o&&(o.offsetWidth||o.offsetHeight||o.getClientRects().length)),allButtonsAreHidden=()=>!isVisible$1(getConfirmButton())&&!isVisible$1(getDenyButton())&&!isVisible$1(getCancelButton()),isScrollable=o=>o.scrollHeight>o.clientHeight,hasCssAnimation=o=>{const r=window.getComputedStyle(o),a=parseFloat(r.getPropertyValue("animation-duration")||"0"),l=parseFloat(r.getPropertyValue("transition-duration")||"0");return a>0||l>0},animateTimerProgressBar=function(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const a=getTimerProgressBar();
4422a&&isVisible$1(a)&&(r&&(a.style.transition="none",a.style.width="100%"),setTimeout(()=>{a.style.transition=`width ${o/1e3}s linear`,a.style.width="0%"},10))},stopTimerProgressBar=()=>{const o=getTimerProgressBar();if(!o)return;const r=parseInt(window.getComputedStyle(o).width);o.style.removeProperty("transition"),o.style.width="100%";const a=parseInt(window.getComputedStyle(o).width),l=r/a*100;o.style.width=`${l}%`},isNodeEnv=()=>typeof window>"u"||typeof document>"u",sweetHTML=`
4423 <div aria-labelledby="${swalClasses.title}" aria-describedby="${swalClasses["html-container"]}" class="${swalClasses.popup}" tabindex="-1">
4424   <button type="button" class="${swalClasses.close}"></button>
4425   <ul class="${swalClasses["progress-steps"]}"></ul>
4426   <div class="${swalClasses.icon}"></div>
4427   <img class="${swalClasses.image}" />
4428   <h2 class="${swalClasses.title}" id="${swalClasses.title}"></h2>
4429   <div class="${swalClasses["html-container"]}" id="${swalClasses["html-container"]}"></div>
4430   <input class="${swalClasses.input}" id="${swalClasses.input}" />
4431   <input type="file" class="${swalClasses.file}" />
4432   <div class="${swalClasses.range}">
4433     <input type="range" />
4434     <output></output>
4435   </div>
4436   <select class="${swalClasses.select}" id="${swalClasses.select}"></select>
4437   <div class="${swalClasses.radio}"></div>
4438   <label class="${swalClasses.checkbox}">
4439     <input type="checkbox" id="${swalClasses.checkbox}" />
4440     <span class="${swalClasses.label}"></span>
4441   </label>
4442   <textarea class="${swalClasses.textarea}" id="${swalClasses.textarea}"></textarea>
4443   <div class="${swalClasses["validation-message"]}" id="${swalClasses["validation-message"]}"></div>
4444   <div class="${swalClasses.actions}">
4445     <div class="${swalClasses.loader}"></div>
4446     <button type="button" class="${swalClasses.confirm}"></button>
4447     <button type="button" class="${swalClasses.deny}"></button>
4448     <button type="button" class="${swalClasses.cancel}"></button>
4449   </div>
4450   <div class="${swalClasses.footer}"></div>
4451   <div class="${swalClasses["timer-progress-bar-container"]}">
4452     <div class="${swalClasses["timer-progress-bar"]}"></div>
4453   </div>
4454 </div>
4455`.replace(/(^|\n)\s*/g,""),resetOldContainer=()=>{const o=getContainer();return o?(o.remove(),removeClass([document.documentElement,document.body],[swalClasses["no-backdrop"],swalClasses["toast-shown"],swalClasses["has-column"]]),!0):!1},resetValidationMessage$1=()=>{globalState.currentInstance.resetValidationMessage()},addInputChangeListeners=()=>{const o=getPopup(),r=getDirectChildByClass(o,swalClasses.input),a=getDirectChildByClass(o,swalClasses.file),l=o.querySelector(`.${swalClasses.range} input`),c=o.querySelector(`.${swalClasses.range} output`),u=getDirectChildByClass(o,swalClasses.select),d=o.querySelector(`.${swalClasses.checkbox} input`),f=getDirectChildByClass(o,swalClasses.textarea);r.oninput=resetValidationMessage$1,a.onchange=resetValidationMessage$1,u.onchange=resetValidationMessage$1,d.onchange=resetValidationMessage$1,f.oninput=resetValidationMessage$1,l.oninput=()=>{resetValidationMessage$1(),c.value=l.value},l.onchange=()=>{resetValidationMessage$1(),c.value=l.value}},getTarget=o=>typeof o=="string"?document.querySelector(o):o,setupAccessibility=o=>{const r=getPopup();r.setAttribute("role",o.toast?"alert":"dialog"),r.setAttribute("aria-live",o.toast?"polite":"assertive"),o.toast||r.setAttribute("aria-modal","true")},setupRTL=o=>{window.getComputedStyle(o).direction==="rtl"&&addClass(getContainer(),swalClasses.rtl)},init=o=>{const r=resetOldContainer();if(isNodeEnv()){error("SweetAlert2 requires document to initialize");return}const a=document.createElement("div");a.className=swalClasses.container,r&&addClass(a,swalClasses["no-transition"]),setInnerHtml(a,sweetHTML),a.dataset.swal2Theme=o.theme;const l=getTarget(o.target);l.appendChild(a),setupAccessibility(o),setupRTL(l),addInputChangeListeners()},parseHtmlToContainer=(o,r)=>{o instanceof HTMLElement?r.appendChild(o):typeof o=="object"?handleObject(o,r):o&&setInnerHtml(r,o)},handleObject=(o,r)=>{o.jquery?handleJqueryElem(r,o):setInnerHtml(r,o.toString())},handleJqueryElem=(o,r)=>{if(o.textContent="",0 in r)for(let a=0;a in r;a++)o.appendChild(r[a].cloneNode(!0));else o.appendChild(r.cloneNode(!0))},renderActions=(o,r)=>
4455{const a=getActions(),l=getLoader();!a||!l||(!r.showConfirmButton&&!r.showDenyButton&&!r.showCancelButton?hide(a):show(a),applyCustomClass(a,r,"actions"),renderButtons(a,l,r),setInnerHtml(l,r.loaderHtml||""),applyCustomClass(l,r,"loader"))};function renderButtons(o,r,a){const l=getConfirmButton(),c=getDenyButton(),u=getCancelButton();!l||!c||!u||(renderButton(l,"confirm",a),renderButton(c,"deny",a),renderButton(u,"cancel",a),handleButtonsStyling(l,c,u,a),a.reverseButtons&&(a.toast?(o.insertBefore(u,l),o.insertBefore(c,l)):(o.insertBefore(u,r),o.insertBefore(c,r),o.insertBefore(l,r))))}function handleButtonsStyling(o,r,a,l){if(!l.buttonsStyling){removeClass([o,r,a],swalClasses.styled);return}addClass([o,r,a],swalClasses.styled),l.confirmButtonColor&&(o.style.backgroundColor=l.confirmButtonColor,addClass(o,swalClasses["default-outline"])),l.denyButtonColor&&(r.style.backgroundColor=l.denyButtonColor,addClass(r,swalClasses["default-outline"])),l.cancelButtonColor&&(a.style.backgroundColor=l.cancelButtonColor,addClass(a,swalClasses["default-outline"]))}function renderButton(o,r,a){const l=capitalizeFirstLetter(r);toggle(o,a[`show${l}Button`],"inline-block"),setInnerHtml(o,a[`${r}ButtonText`]||""),o.setAttribute("aria-label",a[`${r}ButtonAriaLabel`]||""),o.className=swalClasses[r],applyCustomClass(o,a,`${r}Button`)}const renderCloseButton=(o,r)=>{const a=getCloseButton();a&&(setInnerHtml(a,r.closeButtonHtml||""),applyCustomClass(a,r,"closeButton"),toggle(a,r.showCloseButton),a.setAttribute("aria-label",r.closeButtonAriaLabel||""))},renderContainer=(o,r)=>{const a=getContainer();a&&(handleBackdropParam(a,r.backdrop),handlePositionParam(a,r.position),handleGrowParam(a,r.grow),applyCustomClass(a,r,"container"))};function handleBackdropParam(o,r){typeof r=="string"?o.style.background=r:r||addClass([document.documentElement,document.body],swalClasses["no-backdrop"])}function handlePositionParam(o,r){r&&(r in swalClasses?addClass(o,swalClasses[r]):(warn$1('The "position" parameter is not valid, defaulting to "center"'),addClass(o,swalClasses.center)))}function handleGrowParam(o,r){r&&addClass(o,swalClasses[`grow-${r}`])}var privateProps={innerParams:new WeakMap,domCache:new WeakMap};const inputClasses=["input","file","range","select","radio","checkbox","textarea"],renderInput=(o,r)=>{const a=getPopup();if(!a)return;const l=privateProps.innerParams.get(o),c=!l||r.input!==l.input;inputClasses.forEach(u=>{const d=getDirectChildByClass(a,swalClasses[u]);d&&(setAttributes(u,r.inputAttributes),d.className=swalClasses[u],c&&hide(d))}),r.input&&(c&&showInput(r),setCustomClass(r))},showInput=o=>{if(!o.input)return;if(!renderInputType[o.input]){error(`Unexpected type of input! Expected ${Object.keys(renderInputType).join(" | ")}, got "${o.input}"`);return}const r=getInputContainer(o.input);if(!r)return;const a=renderInputType[o.input](r,o);show(r),o.inputAutoFocus&&setTimeout(()=>{focusInput(a)})},removeAttributes=o=>{for(let r=0;r<o.attributes.length;r++){const a=o.attributes[r].name;["id","type","value","style"].includes(a)||o.removeAttribute(a)}},setAttributes=(o,r)=>{const a=getPopup();if(!a)return;const l=getInput$1(a,o);if(l){removeAttributes(l);for(const c in r)l.setAttribute(c,r[c])}},setCustomClass=o=>{if(!o.input)return;const r=getInputContainer(o.input);r&&applyCustomClass(r,o,"input")},setInputPlaceholder=(o,r)=>{!o.placeholder&&r.inputPlaceholder&&(o.placeholder=r.inputPlaceholder)},setInputLabel=(o,r,a)=>{if(a.inputLabel){const l=document.createElement("label"),c=swalClasses["input-label"];l.setAttribute("for",o.id),l.className=c,typeof a.customClass=="object"&&addClass(l,a.customClass.inputLabel),l.innerText=a.inputLabel,r.insertAdjacentElement("beforebegin",l)}},getInputContainer=o=>{const r=getPopup();if(r)return getDirectChildByClass(r,swalClasses[o]||swalClasses.input)},checkAndSetInputValue=(o,r)=>{["string","number"].includes(typeof r)?o.value=`${r}`:isPromise(r)||warn$1(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof r}"`)},renderInputType={};renderInputType.text=renderInputType.email=renderInputType.password=renderInputType.number=renderInputType.tel=renderInputType.url=renderInputType.search=renderInputType.date=renderInputType["datetime-local"]=renderInputType.time=renderInputType.week=renderInputType.month=(o,r)=>
4455(checkAndSetInputValue(o,r.inputValue),setInputLabel(o,o,r),setInputPlaceholder(o,r),o.type=r.input,o);renderInputType.file=(o,r)=>(setInputLabel(o,o,r),setInputPlaceholder(o,r),o);renderInputType.range=(o,r)=>{const a=o.querySelector("input"),l=o.querySelector("output");return checkAndSetInputValue(a,r.inputValue),a.type=r.input,checkAndSetInputValue(l,r.inputValue),setInputLabel(a,o,r),o};renderInputType.select=(o,r)=>{if(o.textContent="",r.inputPlaceholder){const a=document.createElement("option");setInnerHtml(a,r.inputPlaceholder),a.value="",a.disabled=!0,a.selected=!0,o.appendChild(a)}return setInputLabel(o,o,r),o};renderInputType.radio=o=>(o.textContent="",o);renderInputType.checkbox=(o,r)=>{const a=getInput$1(getPopup(),"checkbox");a.value="1",a.checked=!!r.inputValue;const l=o.querySelector("span");return setInnerHtml(l,r.inputPlaceholder||r.inputLabel),a};renderInputType.textarea=(o,r)=>{checkAndSetInputValue(o,r.inputValue),setInputPlaceholder(o,r),setInputLabel(o,o,r);const a=l=>parseInt(window.getComputedStyle(l).marginLeft)+parseInt(window.getComputedStyle(l).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const l=parseInt(window.getComputedStyle(getPopup()).width),c=()=>{if(!document.body.contains(o))return;const u=o.offsetWidth+a(o);u>l?getPopup().style.width=`${u}px`:applyNumericalStyle(getPopup(),"width",r.width)};new MutationObserver(c).observe(o,{attributes:!0,attributeFilter:["style"]})}}),o};const renderContent=(o,r)=>{const a=getHtmlContainer();a&&(showWhenInnerHtmlPresent(a),applyCustomClass(a,r,"htmlContainer"),r.html?(parseHtmlToContainer(r.html,a),show(a,"block")):r.text?(a.textContent=r.text,show(a,"block")):hide(a),renderInput(o,r))},renderFooter=(o,r)=>{const a=getFooter();a&&(showWhenInnerHtmlPresent(a),toggle(a,r.footer,"block"),r.footer&&parseHtmlToContainer(r.footer,a),applyCustomClass(a,r,"footer"))},renderIcon=(o,r)=>{const a=privateProps.innerParams.get(o),l=getIcon();if(!l)return;if(a&&r.icon===a.icon){setContent(l,r),applyStyles(l,r);return}if(!r.icon&&!r.iconHtml){hide(l);return}if(r.icon&&Object.keys(iconTypes).indexOf(r.icon)===-1){error(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${r.icon}"`),hide(l);return}show(l),setContent(l,r),applyStyles(l,r),addClass(l,r.showClass&&r.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",adjustSuccessIconBackgroundColor)},applyStyles=(o,r)=>{for(const[a,l]of Object.entries(iconTypes))r.icon!==a&&removeClass(o,l);addClass(o,r.icon&&iconTypes[r.icon]),setColor(o,r),adjustSuccessIconBackgroundColor(),applyCustomClass(o,r,"icon")},adjustSuccessIconBackgroundColor=()=>{const o=getPopup();if(!o)return;const r=window.getComputedStyle(o).getPropertyValue("background-color"),a=o.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let l=0;l<a.length;l++)a[l].style.backgroundColor=r},successIconHtml=`
4456  <div class="swal2-success-circular-line-left"></div>
4457  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
4458  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
4459  <div class="swal2-success-circular-line-right"></div>
4460`,errorIconHtml=`
4461  <span class="swal2-x-mark">
4462    <span class="swal2-x-mark-line-left"></span>
4463    <span class="swal2-x-mark-line-right"></span>
4464  </span>
4465`,setContent=(o,r)=>{if(!r.icon&&!r.iconHtml)return;let a=o.innerHTML,l="";r.iconHtml?l=iconContent(r.iconHtml):r.icon==="success"?(l=successIconHtml,a=a.replace(/ style=".*?"/g,"")):r.icon==="error"?l=errorIconHtml:r.icon&&(l=iconContent({question:"?",warning:"!",info:"i"}[r.icon])),a.trim()!==l.trim()&&setInnerHtml(o,l)},setColor=(o,r)=>{if(r.iconColor){o.style.color=r.iconColor,o.style.borderColor=r.iconColor;for(const a of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])setStyle(o,a,"background-color",r.iconColor);setStyle(o,".swal2-success-ring","border-color",r.iconColor)}},iconContent=o=>`<div class="${swalClasses["icon-content"]}">${o}</div>`,renderImage=(o,r)=>{const a=getImage();if(a){if(!r.imageUrl){hide(a);return}show(a,""),a.setAttribute("src",r.imageUrl),a.setAttribute("alt",r.imageAlt||""),applyNumericalStyle(a,"width",r.imageWidth),applyNumericalStyle(a,"height",r.imageHeight),a.className=swalClasses.image,applyCustomClass(a,r,"image")}};let dragging=!1,mousedownX=0,mousedownY=0,initialX=0,initialY=0;const addDraggableListeners=o=>{o.addEventListener("mousedown",down),document.body.addEventListener("mousemove",move),o.addEventListener("mouseup",up),o.addEventListener("touchstart",down),document.body.addEventListener("touchmove",move),o.addEventListener("touchend",up)},removeDraggableListeners=o=>{o.removeEventListener("mousedown",down),document.body.removeEventListener("mousemove",move),o.removeEventListener("mouseup",up),o.removeEventListener("touchstart",down),document.body.removeEventListener("touchmove",move),o.removeEventListener("touchend",up)},down=o=>{const r=getPopup();
4465if(o.target===r||getIcon().contains(o.target)){dragging=!0;const a=getClientXY(o);mousedownX=a.clientX,mousedownY=a.clientY,initialX=parseInt(r.style.insetInlineStart)||0,initialY=parseInt(r.style.insetBlockStart)||0,addClass(r,"swal2-dragging")}},move=o=>{const r=getPopup();if(dragging){let{clientX:a,clientY:l}=getClientXY(o);r.style.insetInlineStart=`${initialX+(a-mousedownX)}px`,r.style.insetBlockStart=`${initialY+(l-mousedownY)}px`}},up=()=>{const o=getPopup();dragging=!1,removeClass(o,"swal2-dragging")},getClientXY=o=>{let r=0,a=0;return o.type.startsWith("mouse")?(r=o.clientX,a=o.clientY):o.type.startsWith("touch")&&(r=o.touches[0].clientX,a=o.touches[0].clientY),{clientX:r,clientY:a}},renderPopup=(o,r)=>{const a=getContainer(),l=getPopup();if(!(!a||!l)){if(r.toast){applyNumericalStyle(a,"width",r.width),l.style.width="100%";const c=getLoader();c&&l.insertBefore(c,getIcon())}else applyNumericalStyle(l,"width",r.width);applyNumericalStyle(l,"padding",r.padding),r.color&&(l.style.color=r.color),r.background&&(l.style.background=r.background),hide(getValidationMessage()),addClasses$1(l,r),r.draggable&&!r.toast?(addClass(l,swalClasses.draggable),addDraggableListeners(l)):(removeClass(l,swalClasses.draggable),removeDraggableListeners(l))}},addClasses$1=(o,r)=>{const a=r.showClass||{};o.className=`${swalClasses.popup} ${isVisible$1(o)?a.popup:""}`,r.toast?(addClass([document.documentElement,document.body],swalClasses["toast-shown"]),addClass(o,swalClasses.toast)):addClass(o,swalClasses.modal),applyCustomClass(o,r,"popup"),typeof r.customClass=="string"&&addClass(o,r.customClass),r.icon&&addClass(o,swalClasses[`icon-${r.icon}`])},renderProgressSteps=(o,r)=>{const a=getProgressSteps();if(!a)return;const{progressSteps:l,currentProgressStep:c}=r;if(!l||l.length===0||c===void 0){hide(a);return}show(a),a.textContent="",c>=l.length&&warn$1("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),l.forEach((u,d)=>{const f=createStepElement(u);if(a.appendChild(f),d===c&&addClass(f,swalClasses["active-progress-step"]),d!==l.length-1){const m=createLineElement(r);a.appendChild(m)}})},createStepElement=o=>{const r=document.createElement("li");return addClass(r,swalClasses["progress-step"]),setInnerHtml(r,o),r},createLineElement=o=>{const r=document.createElement("li");return addClass(r,swalClasses["progress-step-line"]),o.progressStepsDistance&&applyNumericalStyle(r,"width",o.progressStepsDistance),r},renderTitle=(o,r)=>{const a=getTitle();a&&(showWhenInnerHtmlPresent(a),toggle(a,r.title||r.titleText,"block"),r.title&&parseHtmlToContainer(r.title,a),r.titleText&&(a.innerText=r.titleText),applyCustomClass(a,r,"title"))},render=(o,r)=>{renderPopup(o,r),renderContainer(o,r),renderProgressSteps(o,r),renderIcon(o,r),renderImage(o,r),renderTitle(o,r),renderCloseButton(o,r),renderContent(o,r),renderActions(o,r),renderFooter(o,r);const a=getPopup();typeof r.didRender=="function"&&a&&r.didRender(a),globalState.eventEmitter.emit("didRender",a)},isVisible=()=>isVisible$1(getPopup()),clickConfirm=()=>{var o;return(o=getConfirmButton())===null||o===void 0?void 0:o.click()},clickDeny=()=>{var o;return(o=getDenyButton())===null||o===void 0?void 0:o.click()},clickCancel=()=>{var o;return(o=getCancelButton())===null||o===void 0?void 0:o.click()},DismissReason=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),removeKeydownHandler=o=>{o.keydownTarget&&o.keydownHandlerAdded&&(o.keydownTarget.removeEventListener("keydown",o.keydownHandler,{capture:o.keydownListenerCapture}),o.keydownHandlerAdded=!1)},addKeydownHandler=(o,r,a)=>{removeKeydownHandler(o),r.toast||(o.keydownHandler=l=>keydownHandler(r,l,a),o.keydownTarget=r.keydownListenerCapture?window:getPopup(),o.keydownListenerCapture=r.keydownListenerCapture,o.keydownTarget.addEventListener("keydown",o.keydownHandler,{capture:o.keydownListenerCapture}),o.keydownHandlerAdded=!0)},setFocus=(o,r)=>{var a;const l=getFocusableElements();if(l.length){o=o+r,o===l.length?o=0:o===-1&&(o=l.length-1),l[o].focus();return}(a=getPopup())===null||a===void 0||a.focus()},arrowKeysNextButton=["ArrowRight","ArrowDown"],arrowKeysPreviousButton=["ArrowLeft","ArrowUp"],keydownHandler=(o,r,a)=>{o&&(r.isComposing||r.keyCode===229||(o.stopKeydownPropagation&&r.stopPropagation(),r.key==="Enter"?handleEnter(r,o):r.key==="Tab"?handleTab(r):[...arrowKeysNextButton,...arrowKeysPreviousButton].includes(r.key)?handleArrows(r.key):r.key==="Escape"&&handleEsc(r,o,a)))},handleEnter=(o,r)=>{if(!callIfFunction(r.allowEnterKey))return;const a=getInput$1(getPopup(),r.input);if(o.target&&a&&o.target instanceof HTMLElement&&o.target.outerHTML===a.outerHTML){if(["textarea","file"].includes(r.input))return;clickConfirm(),o.preventDefault()}},handleTab=o=>{const r=o.target,a=getFocusableElements();let l=-1;for(let c=0;c<a.length;c++)if(r===a[c]){l=c;break}
4465o.shiftKey?setFocus(l,-1):setFocus(l,1),o.stopPropagation(),o.preventDefault()},handleArrows=o=>{const r=getActions(),a=getConfirmButton(),l=getDenyButton(),c=getCancelButton();if(!r||!a||!l||!c)return;const u=[a,l,c];if(document.activeElement instanceof HTMLElement&&!u.includes(document.activeElement))return;const d=arrowKeysNextButton.includes(o)?"nextElementSibling":"previousElementSibling";let f=document.activeElement;if(f){for(let m=0;m<r.children.length;m++){if(f=f[d],!f)return;if(f instanceof HTMLButtonElement&&isVisible$1(f))break}f instanceof HTMLButtonElement&&f.focus()}},handleEsc=(o,r,a)=>{callIfFunction(r.allowEscapeKey)&&(o.preventDefault(),a(DismissReason.esc))};var privateMethods={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const setAriaHidden=()=>{const o=getContainer();Array.from(document.body.children).forEach(a=>{a.contains(o)||(a.hasAttribute("aria-hidden")&&a.setAttribute("data-previous-aria-hidden",a.getAttribute("aria-hidden")||""),a.setAttribute("aria-hidden","true"))})},unsetAriaHidden=()=>{Array.from(document.body.children).forEach(r=>{r.hasAttribute("data-previous-aria-hidden")?(r.setAttribute("aria-hidden",r.getAttribute("data-previous-aria-hidden")||""),r.removeAttribute("data-previous-aria-hidden")):r.removeAttribute("aria-hidden")})},isSafariOrIOS=typeof window<"u"&&!!window.GestureEvent,iOSfix=()=>{if(isSafariOrIOS&&!hasClass(document.body,swalClasses.iosfix)){const o=document.body.scrollTop;document.body.style.top=`${o*-1}px`,addClass(document.body,swalClasses.iosfix),lockBodyScroll()}},lockBodyScroll=()=>{const o=getContainer();if(!o)return;let r;o.ontouchstart=a=>{r=shouldPreventTouchMove(a)},o.ontouchmove=a=>{r&&(a.preventDefault(),a.stopPropagation())}},shouldPreventTouchMove=o=>{const r=o.target,a=getContainer(),l=getHtmlContainer();return!a||!l||isStylus(o)||isZoom(o)?!1:r===a||!isScrollable(a)&&r instanceof HTMLElement&&r.tagName!=="INPUT"&&r.tagName!=="TEXTAREA"&&!(isScrollable(l)&&l.contains(r))},isStylus=o=>o.touches&&o.touches.length&&o.touches[0].touchType==="stylus",isZoom=o=>o.touches&&o.touches.length>1,undoIOSfix=()=>{if(hasClass(document.body,swalClasses.iosfix)){const o=parseInt(document.body.style.top,10);removeClass(document.body,swalClasses.iosfix),document.body.style.top="",document.body.scrollTop=o*-1}},measureScrollbar=()=>{const o=document.createElement("div");o.className=swalClasses["scrollbar-measure"],document.body.appendChild(o);const r=o.getBoundingClientRect().width-o.clientWidth;return document.body.removeChild(o),r};let previousBodyPadding=null;const replaceScrollbarWithPadding=o=>{previousBodyPadding===null&&(document.body.scrollHeight>window.innerHeight||o==="scroll")&&(previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${previousBodyPadding+measureScrollbar()}px`)},undoReplaceScrollbarWithPadding=()=>{previousBodyPadding!==null&&(document.body.style.paddingRight=`${previousBodyPadding}px`,previousBodyPadding=null)};function removePopupAndResetState(o,r,a,l){isToast()?triggerDidCloseAndDispose(o,l):(restoreActiveElement(a).then(()=>triggerDidCloseAndDispose(o,l)),removeKeydownHandler(globalState)),isSafariOrIOS?(r.setAttribute("style","display:none !important"),r.removeAttribute("class"),r.innerHTML=""):r.remove(),isModal()&&(undoReplaceScrollbarWithPadding(),undoIOSfix(),unsetAriaHidden()),removeBodyClasses()}function removeBodyClasses(){removeClass([document.documentElement,document.body],[swalClasses.shown,swalClasses["height-auto"],swalClasses["no-backdrop"],swalClasses["toast-shown"]])}function close(o){o=prepareResolveValue(o);const r=privateMethods.swalPromiseResolve.get(this),a=triggerClosePopup(this);this.isAwaitingPromise?o.isDismissed||(handleAwaitingPromise(this),r(o)):a&&r(o)}const triggerClosePopup=o=>{const r=getPopup();if(!r)return!1;const a=privateProps.innerParams.get(o);if(!a||hasClass(r,a.hideClass.popup))return!1;removeClass(r,a.showClass.popup),addClass(r,a.hideClass.popup);const l=getContainer();return removeClass(l,a.showClass.backdrop),addClass(l,a.hideClass.backdrop),handlePopupA
4465nimation(o,r,a),!0};function rejectPromise(o){const r=privateMethods.swalPromiseReject.get(this);handleAwaitingPromise(this),r&&r(o)}const handleAwaitingPromise=o=>{o.isAwaitingPromise&&(delete o.isAwaitingPromise,privateProps.innerParams.get(o)||o._destroy())},prepareResolveValue=o=>typeof o>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o),handlePopupAnimation=(o,r,a)=>{var l;const c=getContainer(),u=hasCssAnimation(r);typeof a.willClose=="function"&&a.willClose(r),(l=globalState.eventEmitter)===null||l===void 0||l.emit("willClose",r),u?animatePopup(o,r,c,a.returnFocus,a.didClose):removePopupAndResetState(o,c,a.returnFocus,a.didClose)},animatePopup=(o,r,a,l,c)=>{globalState.swalCloseEventFinishedCallback=removePopupAndResetState.bind(null,o,a,l,c);const u=function(d){if(d.target===r){var f;(f=globalState.swalCloseEventFinishedCallback)===null||f===void 0||f.call(globalState),delete globalState.swalCloseEventFinishedCallback,r.removeEventListener("animationend",u),r.removeEventListener("transitionend",u)}};r.addEventListener("animationend",u),r.addEventListener("transitionend",u)},triggerDidCloseAndDispose=(o,r)=>{setTimeout(()=>{var a;typeof r=="function"&&r.bind(o.params)(),(a=globalState.eventEmitter)===null||a===void 0||a.emit("didClose"),o._destroy&&o._destroy()})},showLoading=o=>{let r=getPopup();if(r||new Swal,r=getPopup(),!r)return;const a=getLoader();isToast()?hide(getIcon()):replaceButton(r,o),show(a),r.setAttribute("data-loading","true"),r.setAttribute("aria-busy","true"),r.focus()},replaceButton=(o,r)=>{const a=getActions(),l=getLoader();!a||!l||(!r&&isVisible$1(getConfirmButton())&&(r=getConfirmButton()),show(a),r&&(hide(r),l.setAttribute("data-button-to-replace",r.className),a.insertBefore(l,r)),addClass([o,a],swalClasses.loading))},handleInputOptionsAndValue=(o,r)=>{r.input==="select"||r.input==="radio"?handleInputOptions(o,r):["text","email","number","tel","textarea"].some(a=>a===r.input)&&(hasToPromiseFn(r.inputValue)||isPromise(r.inputValue))&&(showLoading(getConfirmButton()),handleInputValue(o,r))},getInputValue=(o,r)=>{const a=o.getInput();if(!a)return null;switch(r.input){case"checkbox":return getCheckboxValue(a);case"radio":return getRadioValue(a);case"file":return getFileValue(a);default:return r.inputAutoTrim?a.value.trim():a.value}},getCheckboxValue=o=>o.checked?1:0,getRadioValue=o=>o.checked?o.value:null,getFileValue=o=>o.files&&o.files.length?o.getAttribute("multiple")!==null?o.files:o.files[0]:null,handleInputOptions=(o,r)=>{const a=getPopup();if(!a)return;const l=c=>{r.input==="select"?populateSelectOptions(a,formatInputOptions(c),r):r.input==="radio"&&populateRadioOptions(a,formatInputOptions(c),r)};hasToPromiseFn(r.inputOptions)||isPromise(r.inputOptions)?(showLoading(getConfirmButton()),asPromise(r.inputOptions).then(c=>{o.hideLoading(),l(c)})):typeof r.inputOptions=="object"?l(r.inputOptions):error(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof r.inputOptions}`)},handleInputValue=(o,r)=>{const a=o.getInput();a&&(hide(a),asPromise(r.inputValue).then(l=>{a.value=r.input==="number"?`${parseFloat(l)||0}`:`${l}`,show(a),a.focus(),o.hideLoading()}).catch(l=>{error(`Error in inputValue promise: ${l}`),a.value="",show(a),a.focus(),o.hideLoading()}))};function populateSelectOptions(o,r,a){const l=getDirectChildByClass(o,swalClasses.select);if(!l)return;const c=(u,d,f)=>{const m=document.createElement("option");m.value=f,setInnerHtml(m,d),m.selected=isSelected(f,a.inputValue),u.appendChild(m)};r.forEach(u=>{const d=u[0],f=u[1];if(Array.isArray(f)){const m=document.createElement("optgroup");m.label=d,m.disabled=!1,l.appendChild(m),f.forEach(y=>c(m,y[1],y[0]))}else c(l,f,d)}),l.focus()}function populateRadioOptions(o,r,a){const l=getDirectChildByClass(o,swalClasses.radio);if(!l)return;r.forEach(u=>{const d=u[0],f=u[1],m=document.createElement("input"),y=document.createElement("label");m.type="radio",m.name=swalClasses.radio,m.value=d,isSelected(d,a.inputValue)&&(m.checked=!0);const E=document.createElement("span");setInnerHtml(E,f),E.className=swalClasses.label,y.appendChild(m),y.appendChild(E),l.appendChild(y)});const c=l.querySelectorAll("input");c.length&&c[0].focus()}const formatInputOptions=o=>{const r=[];return o instanceof Map?o.forEach((a,l)=>{let c=a;typeof c=="object"&&(c=formatInputOptions(c)),r.push([l,c])}
4465):Object.keys(o).forEach(a=>{let l=o[a];typeof l=="object"&&(l=formatInputOptions(l)),r.push([a,l])}),r},isSelected=(o,r)=>!!r&&r.toString()===o.toString(),handleConfirmButtonClick=o=>{const r=privateProps.innerParams.get(o);o.disableButtons(),r.input?handleConfirmOrDenyWithInput(o,"confirm"):confirm(o,!0)},handleDenyButtonClick=o=>{const r=privateProps.innerParams.get(o);o.disableButtons(),r.returnInputValueOnDeny?handleConfirmOrDenyWithInput(o,"deny"):deny(o,!1)},handleCancelButtonClick=(o,r)=>{o.disableButtons(),r(DismissReason.cancel)},handleConfirmOrDenyWithInput=(o,r)=>{const a=privateProps.innerParams.get(o);if(!a.input){error(`The "input" parameter is needed to be set when using returnInputValueOn${capitalizeFirstLetter(r)}`);return}const l=o.getInput(),c=getInputValue(o,a);a.inputValidator?handleInputValidator(o,c,r):l&&!l.checkValidity()?(o.enableButtons(),o.showValidationMessage(a.validationMessage||l.validationMessage)):r==="deny"?deny(o,c):confirm(o,c)},handleInputValidator=(o,r,a)=>{const l=privateProps.innerParams.get(o);o.disableInput(),Promise.resolve().then(()=>asPromise(l.inputValidator(r,l.validationMessage))).then(u=>{o.enableButtons(),o.enableInput(),u?o.showValidationMessage(u):a==="deny"?deny(o,r):confirm(o,r)})},deny=(o,r)=>{const a=privateProps.innerParams.get(o||void 0);a.showLoaderOnDeny&&showLoading(getDenyButton()),a.preDeny?(o.isAwaitingPromise=!0,Promise.resolve().then(()=>asPromise(a.preDeny(r,a.validationMessage))).then(c=>{c===!1?(o.hideLoading(),handleAwaitingPromise(o)):o.close({isDenied:!0,value:typeof c>"u"?r:c})}).catch(c=>rejectWith(o||void 0,c))):o.close({isDenied:!0,value:r})},succeedWith=(o,r)=>{o.close({isConfirmed:!0,value:r})},rejectWith=(o,r)=>{o.rejectPromise(r)},confirm=(o,r)=>{const a=privateProps.innerParams.get(o||void 0);a.showLoaderOnConfirm&&showLoading(),a.preConfirm?(o.resetValidationMessage(),o.isAwaitingPromise=!0,Promise.resolve().then(()=>asPromise(a.preConfirm(r,a.validationMessage))).then(c=>{isVisible$1(getValidationMessage())||c===!1?(o.hideLoading(),handleAwaitingPromise(o)):succeedWith(o,typeof c>"u"?r:c)}).catch(c=>rejectWith(o||void 0,c))):succeedWith(o,r)};function hideLoading(){const o=privateProps.innerParams.get(this);if(!o)return;const r=privateProps.domCache.get(this);hide(r.loader),isToast()?o.icon&&show(getIcon()):showRelatedButton(r),removeClass([r.popup,r.actions],swalClasses.loading),r.popup.removeAttribute("aria-busy"),r.popup.removeAttribute("data-loading"),r.confirmButton.disabled=!1,r.denyButton.disabled=!1,r.cancelButton.disabled=!1}const showRelatedButton=o=>{const r=o.popup.getElementsByClassName(o.loader.getAttribute("data-button-to-replace"));r.length?show(r[0],"inline-block"):allButtonsAreHidden()&&hide(o.actions)};function getInput(){const o=privateProps.innerParams.get(this),r=privateProps.domCache.get(this);return r?getInput$1(r.popup,o.input):null}function setButtonsDisabled(o,r,a){const l=privateProps.domCache.get(o);r.forEach(c=>{l[c].disabled=a})}function setInputDisabled(o,r){const a=getPopup();if(!(!a||!o))if(o.type==="radio"){const l=a.querySelectorAll(`[name="${swalClasses.radio}"]`);for(let c=0;c<l.length;c++)l[c].disabled=r}else o.disabled=r}function enableButtons(){setButtonsDisabled(this,["confirmButton","denyButton","cancelButton"],!1)}function disableButtons(){setButtonsDisabled(this,["confirmButton","denyButton","cancelButton"],!0)}function enableInput(){setInputDisabled(this.getInput(),!1)}function disableInput(){setInputDisabled(this.getInput(),!0)}function showValidationMessage(o){const r=privateProps.domCache.get(this),a=privateProps.innerParams.get(this);setInnerHtml(r.validationMessage,o),r.validationMessage.className=swalClasses["validation-message"],a.customClass&&a.customClass.validationMessage&&addClass(r.validationMessage,a.customClass.validationMessage),show(r.validationMessage);const l=this.getInput();l&&(l.setAttribute("aria-invalid","true"),l.setAttribute("aria-describedby",swalClasses["validation-message"]),focusInput(l),addClass(l,swalClasses.inputerror))}function resetValidationMessage(){const o=privateProps.domCache.get(this);o.validationMessage&&hide(o.validationMessage);const r=this.getInput();r&&(r.removeAttribute("aria-invalid"),r.removeAttribute("aria-describedby"),removeClass(r,swalClasses.inputerror))}const defaultParams={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose
4465:void 0,didDestroy:void 0,scrollbarPadding:!0},updatableParams=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],deprecatedParams={allowEnterKey:void 0},toastIncompatibleParams=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],isValidParameter=o=>Object.prototype.hasOwnProperty.call(defaultParams,o),isUpdatableParameter=o=>updatableParams.indexOf(o)!==-1,isDeprecatedParameter=o=>deprecatedParams[o],checkIfParamIsValid=o=>{isValidParameter(o)||warn$1(`Unknown parameter "${o}"`)},checkIfToastParamIsValid=o=>{toastIncompatibleParams.includes(o)&&warn$1(`The parameter "${o}" is incompatible with toasts`)},checkIfParamIsDeprecated=o=>{const r=isDeprecatedParameter(o);r&&warnAboutDeprecation(o,r)},showWarningsForParams=o=>{o.backdrop===!1&&o.allowOutsideClick&&warn$1('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),o.theme&&!["light","dark","auto","borderless"].includes(o.theme)&&warn$1(`Invalid theme "${o.theme}". Expected "light", "dark", "auto", or "borderless"`);for(const r in o)checkIfParamIsValid(r),o.toast&&checkIfToastParamIsValid(r),checkIfParamIsDeprecated(r)};function update(o){const r=getContainer(),a=getPopup(),l=privateProps.innerParams.get(this);if(!a||hasClass(a,l.hideClass.popup)){warn$1("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");return}const c=filterValidParams(o),u=Object.assign({},l,c);showWarningsForParams(u),r.dataset.swal2Theme=u.theme,render(this,u),privateProps.innerParams.set(this,u),Object.defineProperties(this,{params:{value:Object.assign({},this.params,o),writable:!1,enumerable:!0}})}const filterValidParams=o=>{const r={};return Object.keys(o).forEach(a=>{isUpdatableParameter(a)?r[a]=o[a]:warn$1(`Invalid parameter to update: ${a}`)}),r};function _destroy(){const o=privateProps.domCache.get(this),r=privateProps.innerParams.get(this);if(!r){disposeWeakMaps(this);return}o.popup&&globalState.swalCloseEventFinishedCallback&&(globalState.swalCloseEventFinishedCallback(),delete globalState.swalCloseEventFinishedCallback),typeof r.didDestroy=="function"&&r.didDestroy(),globalState.eventEmitter.emit("didDestroy"),disposeSwal(this)}const disposeSwal=o=>{disposeWeakMaps(o),delete o.params,delete globalState.keydownHandler,delete globalState.keydownTarget,delete globalState.currentInstance},disposeWeakMaps=o=>{o.isAwaitingPromise?(unsetWeakMaps(privateProps,o),o.isAwaitingPromise=!0):(unsetWeakMaps(privateMethods,o),unsetWeakMaps(privateProps,o),delete o.isAwaitingPromise,delete o.disableButtons,delete o.enableButtons,delete o.getInput,delete o.disableInput,delete o.enableInput,delete o.hideLoading,delete o.disableLoading,delete o.showValidationMessage,delete o.resetValidationMessage,delete o.close,delete o.closePopup,delete o.closeModal,delete o.closeToast,delete o.rejectPromise,delete o.update,delete o._destroy)},unsetWeakMaps=(o,r)=>{for(const a in o)o[a].delete(r)};var instanceMethods=Object.freeze({__proto__:null,_destroy,close,closeModal:close,closePopup:close,closeToast:close,disableButtons,disableInput,disableLoading:hideLoading,enableButtons,enableInput,getInput,handleAwaitingPromise,hideLoading,rejectPromise,resetValidationMessage,showValidationMessage,update});const handlePopupClick=(o,r,a)=>{o.toast?handleToastClick(o,r,a):(handleModalMousedown(r),handleContainerMousedown(r),handleModalClick(o,r,a))},handleToastClick=(o,r,a)=>{r.popup.onclick=()=>{o&&(isAnyButtonShown(o)||o.timer||o.input)||a(DismissReason.close)}},isAnyButtonShown=o=>!!(o.showConfirmButton||o.showDenyButton||o.showCancelButton||o.showCloseButton);let ignoreOutsideClick=!1;const handleModalMousedown=o=>{o.popup.onmousedown=()=>{o.container.onmouseup=function(r){o.container.onmouseup=()=>{},r.target===o.container&&(ignoreOutsideClick=!0)}}},handleContainerMousedown=o=>{o.container.onmousedown=r=>{r.target===o.container&&r.preventDefault(),o.popup.onmouseup=function(a){o.popup.onmouseup=()=>{},(a.target===o.popup||a.target instanceof HTMLElement&&o.popup.contains(a.target))&&(ignoreOutsideClick=!0)}}},handleModalClick=(o,r,a)=>{r.container.onclick=l=>{if(ignoreOutsideClick){ignoreOutsideClick=!1;return}l.target===r.container&&callIfFunction(o.allowOutsideClick)&&a(DismissReason.backdrop)}},isJqueryElement=o=>typeof o=="object"&&o.jquery,isElement=o=>o instanceof Element||isJqueryElement(o),argsToParams=o=>{const r={};
4465return typeof o[0]=="object"&&!isElement(o[0])?Object.assign(r,o[0]):["title","html","icon"].forEach((a,l)=>{const c=o[l];typeof c=="string"||isElement(c)?r[a]=c:c!==void 0&&error(`Unexpected type of ${a}! Expected "string" or "Element", got ${typeof c}`)}),r};function fire(){for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return new this(...r)}function mixin(o){class r extends this{_main(l,c){return super._main(l,Object.assign({},o,c))}}return r}const getTimerLeft=()=>globalState.timeout&&globalState.timeout.getTimerLeft(),stopTimer=()=>{if(globalState.timeout)return stopTimerProgressBar(),globalState.timeout.stop()},resumeTimer=()=>{if(globalState.timeout){const o=globalState.timeout.start();return animateTimerProgressBar(o),o}},toggleTimer=()=>{const o=globalState.timeout;return o&&(o.running?stopTimer():resumeTimer())},increaseTimer=o=>{if(globalState.timeout){const r=globalState.timeout.increase(o);return animateTimerProgressBar(r,!0),r}},isTimerRunning=()=>!!(globalState.timeout&&globalState.timeout.isRunning());let bodyClickListenerAdded=!1;const clickHandlers={};function bindClickHandler(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";clickHandlers[o]=this,bodyClickListenerAdded||(document.body.addEventListener("click",bodyClickListener),bodyClickListenerAdded=!0)}const bodyClickListener=o=>{for(let r=o.target;r&&r!==document;r=r.parentNode)for(const a in clickHandlers){const l=r.getAttribute(a);if(l){clickHandlers[a].fire({template:l});return}}};class EventEmitter{constructor(){this.events={}}_getHandlersByEventName(r){return typeof this.events[r]>"u"&&(this.events[r]=[]),this.events[r]}on(r,a){const l=this._getHandlersByEventName(r);l.includes(a)||l.push(a)}once(r,a){var l=this;const c=function(){l.removeListener(r,c);for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];a.apply(l,d)};this.on(r,c)}emit(r){for(var a=arguments.length,l=new Array(a>1?a-1:0),c=1;c<a;c++)l[c-1]=arguments[c];this._getHandlersByEventName(r).forEach(u=>{try{u.apply(this,l)}catch(d){console.error(d)}})}removeListener(r,a){const l=this._getHandlersByEventName(r),c=l.indexOf(a);c>-1&&l.splice(c,1)}removeAllListeners(r){this.events[r]!==void 0&&(this.events[r].length=0)}reset(){this.events={}}}globalState.eventEmitter=new EventEmitter;const on=(o,r)=>
4465{globalState.eventEmitter.on(o,r)},once=(o,r)=>{globalState.eventEmitter.once(o,r)},off=(o,r)=>{if(!o){globalState.eventEmitter.reset();return}r?globalState.eventEmitter.removeListener(o,r):globalState.eventEmitter.removeAllListeners(o)};var staticMethods=Object.freeze({__proto__:null,argsToParams,bindClickHandler,clickCancel,clickConfirm,clickDeny,enableLoading:showLoading,fire,getActions,getCancelButton,getCloseButton,getConfirmButton,getContainer,getDenyButton,getFocusableElements,getFooter,getHtmlContainer,getIcon,getIconContent,getImage,getInputLabel,getLoader,getPopup,getProgressSteps,getTimerLeft,getTimerProgressBar,getTitle,getValidationMessage,increaseTimer,isDeprecatedParameter,isLoading,isTimerRunning,isUpdatableParameter,isValidParameter,isVisible,mixin,off,on,once,resumeTimer,showLoading,stopTimer,toggleTimer});let Timer$1=class{constructor(r,a){this.callback=r,this.remaining=a,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(r){const a=this.running;return a&&this.stop(),this.remaining+=r,a&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}};const swalStringParams=["swal-title","swal-html","swal-footer"],getTemplateParams=o=>{const r=typeof o.template=="string"?document.querySelector(o.template):o.template;if(!r)return{};const a=r.content;return showWarningsForElements(a),Object.assign(getSwalParams(a),getSwalFunctionParams(a),getSwalButtons(a),getSwalImage(a),getSwalIcon(a),getSwalInput(a),getSwalStringParams(a,swalStringParams))},getSwalParams=o=>{const r={};return Array.from(o.querySelectorAll("swal-param")).forEach(l=>{showWarningsForAttributes(l,["name","value"]);const c=l.getAttribute("name"),u=l.getAttribute("value");!c||!u||(typeof defaultParams[c]=="boolean"?r[c]=u!=="false":typeof defaultParams[c]=="object"?r[c]=JSON.parse(u):r[c]=u)}),r},getSwalFunctionParams=o=>{const r={};return Array.from(o.querySelectorAll("swal-function-param")).forEach(l=>{const c=l.getAttribute("name"),u=l.getAttribute("value");!c||!u||(r[c]=new Function(`return ${u}`)())}),r},getSwalButtons=o=>{const r={};return Array.from(o.querySelectorAll("swal-button")).forEach(l=>{showWarningsForAttributes(l,["type","color","aria-label"]);const c=l.getAttribute("type");!c||!["confirm","cancel","deny"].includes(c)||(r[`${c}ButtonText`]=l.innerHTML,r[`show${capitalizeFirstLetter(c)}Button`]=!0,l.hasAttribute("color")&&(r[`${c}ButtonColor`]=l.getAttribute("color")),l.hasAttribute("aria-label")&&(r[`${c}ButtonAriaLabel`]=l.getAttribute("aria-label")))}),r},getSwalImage=o=>{const r={},a=o.querySelector("swal-image");return a&&(showWarningsForAttributes(a,["src","width","height","alt"]),a.hasAttribute("src")&&(r.imageUrl=a.getAttribute("src")||void 0),a.hasAttribute("width")&&(r.imageWidth=a.getAttribute("width")||void 0),a.hasAttribute("height")&&(r.imageHeight=a.getAttribute("height")||void 0),a.hasAttribute("alt")&&(r.imageAlt=a.getAttribute("alt")||void 0)),r},getSwalIcon=o=>{const r={},a=o.querySelector("swal-icon");return a&&(showWarningsForAttributes(a,["type","color"]),a.hasAttribute("type")&&(r.icon=a.getAttribute("type")),a.hasAttribute("color")&&(r.iconColor=a.getAttribute("color")),r.iconHtml=a.innerHTML),r},getSwalInput=o=>{const r={},a=o.querySelector("swal-input");a&&(showWarningsForAttributes(a,["type","label","placeholder","value"]),r.input=a.getAttribute("type")||"text",a.hasAttribute("label")&&(r.inputLabel=a.getAttribute("label")),a.hasAttribute("placeholder")&&(r.inputPlaceholder=a.getAttribute("placeholder")),a.hasAttribute("value")&&(r.inputValue=a.getAttribute("value")));const l=Array.from(o.querySelectorAll("swal-input-option"));return l.length&&(r.inputOptions={},l.forEach(c=>{showWarningsForAttributes(c,["value"]);const u=c.getAttribute("value");if(!u)return;const d=c.innerHTML;r.inputOptions[u]=d})),r},getSwalStringParams=(o,r)=>{const a={};for(const l in r){const c=r[l],u=o.querySelector(c);u&&(showWarningsForAttributes(u,[]),a[c.replace(/^swal-/,"")]=u.innerHTML.trim())}return a},showWarningsForElements=o=>
4465{const r=swalStringParams.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(o.children).forEach(a=>{const l=a.tagName.toLowerCase();r.includes(l)||warn$1(`Unrecognized element <${l}>`)})},showWarningsForAttributes=(o,r)=>{Array.from(o.attributes).forEach(a=>{r.indexOf(a.name)===-1&&warn$1([`Unrecognized attribute "${a.name}" on <${o.tagName.toLowerCase()}>.`,`${r.length?`Allowed attributes are: ${r.join(", ")}`:"To set the value, use HTML within the element."}`])})},SHOW_CLASS_TIMEOUT=10,openPopup=o=>{const r=getContainer(),a=getPopup();typeof o.willOpen=="function"&&o.willOpen(a),globalState.eventEmitter.emit("willOpen",a);const c=window.getComputedStyle(document.body).overflowY;addClasses(r,a,o),setTimeout(()=>{setScrollingVisibility(r,a)},SHOW_CLASS_TIMEOUT),isModal()&&(fixScrollContainer(r,o.scrollbarPadding,c),setAriaHidden()),!isToast()&&!globalState.previousActiveElement&&(globalState.previousActiveElement=document.activeElement),typeof o.didOpen=="function"&&setTimeout(()=>o.didOpen(a)),globalState.eventEmitter.emit("didOpen",a),removeClass(r,swalClasses["no-transition"])},swalOpenAnimationFinished=o=>{const r=getPopup();if(o.target!==r)return;const a=getContainer();r.removeEventListener("animationend",swalOpenAnimationFinished),r.removeEventListener("transitionend",swalOpenAnimationFinished),a.style.overflowY="auto"},setScrollingVisibility=(o,r)=>{hasCssAnimation(r)?(o.style.overflowY="hidden",r.addEventListener("animationend",swalOpenAnimationFinished),r.addEventListener("transitionend",swalOpenAnimationFinished)):o.style.overflowY="auto"},fixScrollContainer=(o,r,a)=>{iOSfix(),r&&a!=="hidden"&&replaceScrollbarWithPadding(a),setTimeout(()=>{o.scrollTop=0})},addClasses=(o,r,a)=>{addClass(o,a.showClass.backdrop),a.animation?(r.style.setProperty("opacity","0","important"),show(r,"grid"),setTimeout(()=>{addClass(r,a.showClass.popup),r.style.removeProperty("opacity")},SHOW_CLASS_TIMEOUT)):show(r,"grid"),addClass([document.documentElement,document.body],swalClasses.shown),a.heightAuto&&a.backdrop&&!a.toast&&addClass([document.documentElement,document.body],swalClasses["height-auto"])};var defaultInputValidators={email:(o,r)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(o)?Promise.resolve():Promise.resolve(r||"Invalid email address"),url:(o,r)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(o)?Promise.resolve():Promise.resolve(r||"Invalid URL")};function setDefaultInputValidators(o){o.inputValidator||(o.input==="email"&&(o.inputValidator=defaultInputValidators.email),o.input==="url"&&(o.inputValidator=defaultInputValidators.url))}function validateCustomTargetElement(o){(!o.target||typeof o.target=="string"&&!document.querySelector(o.target)||typeof o.target!="string"&&!o.target.appendChild)&&(warn$1('Target parameter is not valid, defaulting to "body"'),o.target="body")}function setParameters(o){setDefaultInputValidators(o),o.showLoaderOnConfirm&&!o.preConfirm&&warn$1(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
4466showLoaderOnConfirm should be used together with preConfirm, see usage example:
4467https://sweetalert2.github.io/#ajax-request`),validateCustomTargetElement(o),typeof o.title=="string"&&(o.title=o.title.split(`
4468`).join("<br />")),init(o)}let currentInstance;var _promise=new WeakMap;class SweetAlert{constructor(){if(_classPrivateFieldInitSpec(this,_promise,void 0),typeof window>"u")return;currentInstance=this;for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];const c=Object.freeze(this.constructor.argsToParams(a));this.params=c,this.isAwaitingPromise=!1,_classPrivateFieldSet2(_promise,this,this._main(currentInstance.params))}_main(r){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(showWarningsForParams(Object.assign({},a,r)),globalState.currentInstance){const u=privateMethods.swalPromiseResolve.get(globalState.currentInstance),{isAwaitingPromise:d}=globalState.currentInstance;globalState.currentInstance._destroy(),d||u({isDismissed:!0}),isModal()&&unsetAriaHidden()}globalState.currentInstance=currentInstance;const l=prepareParams(r,a);
4468setParameters(l),Object.freeze(l),globalState.timeout&&(globalState.timeout.stop(),delete globalState.timeout),clearTimeout(globalState.restoreFocusTimeout);const c=populateDomCache(currentInstance);return render(currentInstance,l),privateProps.innerParams.set(currentInstance,l),swalPromise(currentInstance,c,l)}then(r){return _classPrivateFieldGet2(_promise,this).then(r)}finally(r){return _classPrivateFieldGet2(_promise,this).finally(r)}}const swalPromise=(o,r,a)=>new Promise((l,c)=>{const u=d=>{o.close({isDismissed:!0,dismiss:d})};privateMethods.swalPromiseResolve.set(o,l),privateMethods.swalPromiseReject.set(o,c),r.confirmButton.onclick=()=>{handleConfirmButtonClick(o)},r.denyButton.onclick=()=>{handleDenyButtonClick(o)},r.cancelButton.onclick=()=>{handleCancelButtonClick(o,u)},r.closeButton.onclick=()=>{u(DismissReason.close)},handlePopupClick(a,r,u),addKeydownHandler(globalState,a,u),handleInputOptionsAndValue(o,a),openPopup(a),setupTimer(globalState,a,u),initFocus(r,a),setTimeout(()=>{r.container.scrollTop=0})}),prepareParams=(o,r)=>{const a=getTemplateParams(o),l=Object.assign({},defaultParams,r,a,o);return l.showClass=Object.assign({},defaultParams.showClass,l.showClass),l.hideClass=Object.assign({},defaultParams.hideClass,l.hideClass),l.animation===!1&&(l.showClass={backdrop:"swal2-noanimation"},l.hideClass={}),l},populateDomCache=o=>{const r={popup:getPopup(),container:getContainer(),actions:getActions(),confirmButton:getConfirmButton(),denyButton:getDenyButton(),cancelButton:getCancelButton(),loader:getLoader(),closeButton:getCloseButton(),validationMessage:getValidationMessage(),progressSteps:getProgressSteps()};return privateProps.domCache.set(o,r),r},setupTimer=(o,r,a)=>{const l=getTimerProgressBar();hide(l),r.timer&&(o.timeout=new Timer$1(()=>{a("timer"),delete o.timeout},r.timer),r.timerProgressBar&&(show(l),applyCustomClass(l,r,"timerProgressBar"),setTimeout(()=>{o.timeout&&o.timeout.running&&animateTimerProgressBar(r.timer)})))},initFocus=(o,r)=>{if(!r.toast){if(!callIfFunction(r.allowEnterKey)){warnAboutDeprecation("allowEnterKey"),blurActiveElement();return}focusAutofocus(o)||focusButton(o,r)||setFocus(-1,1)}},focusAutofocus=o=>{const r=Array.from(o.popup.querySelectorAll("[autofocus]"));for(const a of r)if(a instanceof HTMLElement&&isVisible$1(a))return a.focus(),!0;return!1},focusButton=(o,r)=>r.focusDeny&&isVisible$1(o.denyButton)?(o.denyButton.focus(),!0):r.focusCancel&&isVisible$1(o.cancelButton)?(o.cancelButton.focus(),!0):r.focusConfirm&&isVisible$1(o.confirmButton)?(o.confirmButton.focus(),!0):!1,blurActiveElement=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){const o=new Date,r=localStorage.getItem("swal-initiation");r?(o.getTime()-Date.parse(r))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const a=document.createElement("audio");a.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",a.loop=!0,document.body.appendChild(a),setTimeout(()=>{a.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${o}`)}SweetAlert.prototype.disableButtons=disableButtons;SweetAlert.prototype.enableButtons=enableButtons;SweetAlert.prototype.getInput=getInput;SweetAlert.prototype.disableInput=disableInput;SweetAlert.prototype.enableInput=enableInput;SweetAlert.prototype.hideLoading=hideLoading;SweetAlert.prototype.disableLoading=hideLoading;SweetAlert.prototype.showValidationMessage=showValidationMessage;SweetAlert.prototype.resetValidationMessage=resetValidationMessage;SweetAlert.prototype.close=close;SweetAlert.prototype.closePopup=close;SweetAlert.prototype.closeModal=close;SweetAlert.prototype.closeToast=close;SweetAlert.prototype.rejectPromise=rejectPromise;SweetAlert.prototype.update=update;SweetAlert.prototype._destroy=_destroy;Object.assign(SweetAlert,staticMethods);Object.keys(instanceMethods).forEach(o=>{SweetAlert[o]=function(){return currentInstance&&currentInstance[o]?currentInstance[o](...arguments):null}});SweetAlert.DismissReason=DismissReason;SweetAlert.version="11.17.2";const Swal=SweetAlert;Swal.default=Swal;typeof document<"u"&&function(o,r){var a=o.createElement("style");if(o.getElementsByTagName("head")[0].appendChild(a),a.styleSheet)a.styleSheet.disabled||(a.styleSheet.cssText=r);else try{a.innerHTML=r}catch{a.innerText=r}}(document,':root{--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-footer-border-color: #eee;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-input-background: transparent;--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;
4468align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);color:inherit;font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:var(--swal2-border-radius);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:var(--swal2-input-background);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!
vendor: 11,049 bytes, line 4468
4468";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:var(--swal2-background);box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}
4468');const authStore=defineStore("auth",{state:()=>({userMeta:{},user:null,guest:null,authModal:!1,authModalSocial:!1,forgotPasswordModal:!1,purchasesAccess:!0}),actions:{async checkPurchasesAccess(){const o=useCookie("estageAuthToken");if(o.value)try{const r=useStore().project.project.id.toString(),{data:a}=await $fetch(`${useRuntimeConfig().public.apiBase}/api/estagesocial/check-can-buy/${r}`,{headers:{Authorization:`Bearer ${o.value}`}});this.purchasesAccess=a}catch(r){console.error(r)}},async getUser(){try{useCookie("estageAuthToken").value&&(this.userMeta=await $fetch(`${useRuntimeConfig().public.apiBase}/api/auth/user`,{headers:{Authorization:`Bearer ${useCookie("estageAuthToken").value}`}}))}catch(o){console.error(o)}},async signIn(o){try{const r=useStore().project.internalProject?useStore().project.internalProject.toString():useStore().project.project.id.toString(),a=await $fetch(`${useRuntimeConfig().public.apiBase}/api/auth/social/login${this.authModalSocial?"":"?public=1"}`,{method:"POST",body:{...o,project_id:r}}),l=useCookie("estageAuthToken",{maxAge:2592e3});this.userMeta=a,l.value=a.access_token,this.authModalSocial=!1}catch(r){return console.error(r),Promise.reject(r)}},async forgetPassword(o){var r;try{const a=useStore().project.project.id.toString(),l=useStore().project.project.business_info,c=l.name||((r=useStore().project.project)==null?void 0:r.name),u=l.logo||void 0;await $fetch(`${useRuntimeConfig().public.apiBase}/api/auth/project/forgot-password`,{method:"POST",body:{project_id:a,email:o,group_url:window.location.origin,group_name:c,project_logo:u}}),Swal.fire({icon:"success",iconColor:"#4F83E3",toast:!0,position:"top-right",title:"A link to reset your password has been sent to the specified email.",showConfirmButton:!1,timer:6e3}),this.forgotPasswordModal=!1}catch(a){return console.error(a),Promise.reject(a)}},async resetPassword(o,r){try{const a=useStore().project.project.id;await $fetch(`${useRuntimeConfig().public.apiBase}/api/auth/project/reset-password`,{method:"POST",body:{token:o,password:r,project_id:parseInt(a)}})}catch(a){return console.error(a),Promise.reject(a)}},async signInWithToken(o){try{const r=await $fetch(`${useRuntimeConfig().public.apiBase}/api/auth/user`,{headers:{Authorization:`Bearer ${o}`}}),a=useCookie("estageAuthToken",{maxAge:2592e3});this.userMeta=r,a.value=o}catch(r){return console.error(r),Promise.reject(r)}},me(){localStorage.getItem("guest")&&(this.guest=JSON.parse(localStorage.getItem("guest")))},async authGuest(o,r){const a={name:o,email:r};this.guest=a,localStorage.setItem("guest",JSON.stringify(a))},logoutGuest(){this.guest=null,this.userMeta=null,localStorage.removeItem("guest"),useCookie("estageAuthToken").value=null,useCookie("authToken").value=null},logout(){this.guest=null,this.userMeta=null,localStorage.removeItem("guest"),useCookie("estageAuthToken").value=null,useCookie("authToken").value=null,location.reload()}},getters:{isAuth(){return!!useCookie("estageAuthToken").value},user(o){return o.guest||!!useCookie("estageAuthToken").value}}});var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function getAugmentedNamespace(o){if(o.__esModule)return o;var r=o.default;if(typeof r=="function"){var a=function l(){return this instanceof l?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};a.prototype=r.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}
4468),Object.keys(o).forEach(function(l){var c=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(a,l,c.get?c:{enumerable:!0,get:function(){return o[l]}})}),a}var lodash$1={exports:{}};/**
4469 * @license
4470 * Lodash <https://lodash.com/>
4471 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
4472 * Released under MIT license <https://lodash.com/license>
4473 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
4474 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4475 */var lodash=lodash$1.exports,hasRequiredLodash;function requireLodash(){return hasRequiredLodash||(hasRequiredLodash=1,function(o,r){(function(){var a,l="4.17.21",c=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",f="Invalid `variable` option passed into `_.template`",m="__lodash_hash_undefined__",y=500,E="__lodash_placeholder__",A=1,P=2,R=4,x=1,M=2,$=1,V=2,B=4,O=8,L=16,F=32,j=64,U=128,G=256,Y=512,te=30,ve="...",J=800,Z=16,Me=1,ke=2,se=3,xe=1/0,Q=9007199254740991,ie=17976931348623157e292,Fe=NaN,Ne=4294967295,nt=Ne-1,ct=Ne>>>1,pt=[["ary",U],["bind",$],["bindKey",V],["curry",O],["curryRight",L],["flip",Y],["partial",F],["partialRight",j],["rearg",G]],_t="[object Arguments]",yt="[object Array]",je="[object AsyncFunction]",it="[object Boolean]",st="[object Date]",lt="[object DOMException]",vt="[object Error]",ze="[object Function]",Pe="[object GeneratorFunction]",Se="[object Map]",Le="[object Number]",qe="[object Null]",He="[object Object]",Ye="[object Promise]",ot="[object Proxy]",et="[object RegExp]",Qe="[object Set]",Ze="[object String]",mt="[object Symbol]",at="[object Undefined]",ht="[object WeakMap]",dt="[object WeakSet]",bt="[object ArrayBuffer]",At="[object DataView]",Ct="[object Float32Array]",qt="[object Float64Array]",Yt="[object Int8Array]",Xt="[object Int16Array]",tr="[object Int32Array]",Or="[object Uint8Array]",Qr="[object Uint8ClampedArray]",ir="[object Uint16Array]",pr="[object Uint32Array]",wn=/\b__p \+= '';/g,ws=/\b(__p \+=) '' \+/g,Es=/(__e\(.*?\)|\b__t\)) \+\n'';/g,En=/&(?:amp|lt|gt|quot|#39);/g,oi=/[&<>"']/g,Mi=RegExp(En.source),sn=RegExp(oi.source),Ts=/<%-([\s\S]+?)%>/g,ai=/<%([\s\S]+?)%>/g,Di=/<%=([\s\S]+?)%>/g,Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ps=/^\w*$/,hr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,li=/[\\^$.*+?()[\]{}|]/g,Fn=RegExp(li.source),an=/^\s+/,Lo=/\s/,Fo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Tn=/\{\n\/\* \[wrapped with (.+)\] \*/,Bo=/,? & /,$o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ci=/[()=,{}\[\]\/\s]/,Ss=/\\(\\)?/g,Ni=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bn=/\w*$/,Jr=/^[-+]0x[0-9a-f]+$/i,As=/^0b[01]+$/i,Is=/^\[object .+?Constructor\]$/,Vi=/^0o[0-7]+$/i,Li=/^(?:0|[1-9]\d*)$/,Cs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 4,182 bytes, line 4475
44757f]/g,$n=/($^)/,Uo=/['\n\r\u2028\u2029\\]/g,ln="\\ud800-\\udfff",Rs="\\u0300-\\u036f",Fi="\\ufe20-\\ufe2f",Un="\\u20d0-\\u20ff",Xr=Rs+Fi+Un,ui="\\u2700-\\u27bf",xs="a-z\\xdf-\\xf6\\xf8-\\xff",ks="\\xac\\xb1\\xd7\\xf7",Os="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ms="\\u2000-\\u206f",Bi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hi="A-Z\\xc0-\\xd6\\xd8-\\xde",$i="\\ufe0e\\ufe0f",Ui=ks+Os+Ms+Bi,Hi="['’]",Ho="["+ln+"]",ji="["+Ui+"]",Hn="["+Xr+"]",Ds="\\d+",cn="["+ui+"]",Mr="["+xs+"]",jn="[^"+ln+Ui+Ds+ui+xs+hi+"]",Pn="\\ud83c[\\udffb-\\udfff]",Ns="(?:"+Hn+"|"+Pn+")",jt="[^"+ln+"]",Sn="(?:\\ud83c[\\udde6-\\uddff]){2}",un="[\\ud800-\\udbff][\\udc00-\\udfff]",Dr="["+hi+"]",Vs="\\u200d",Wi="(?:"+Mr+"|"+jn+")",jo="(?:"+Dr+"|"+jn+")",Ls="(?:"+Hi+"(?:d|ll|m|re|s|t|ve))?",Fs="(?:"+Hi+"(?:D|LL|M|RE|S|T|VE))?",Bs=Ns+"?",An="["+$i+"]?",Zr="(?:"+Vs+"(?:"+[jt,Sn,un].join("|")+")"+An+Bs+")*",$s="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Us="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Gi=An+Bs+Zr,In="(?:"+[cn,Sn,un].join("|")+")"+Gi,Wo="(?:"+[jt+Hn+"?",Hn,Sn,un,Ho].join("|")+")",Go=RegExp(Hi,"g"),qo=RegExp(Hn,"g"),Nr=RegExp(Pn+"(?="+Pn+")|"+Wo+Gi,"g"),zo=RegExp([Dr+"?"+Mr+"+"+Ls+"(?="+[ji,Dr,"$"].join("|")+")",jo+"+"+Fs+"(?="+[ji,Dr+Wi,"$"].join("|")+")",Dr+"?"+Wi+"+"+Ls,Dr+"+"+Fs,Us,$s,Ds,In].join("|"),"g"),Ko=RegExp("["+Vs+ln+Xr+$i+"]"),di=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fi=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Hs=-1,Lt={};Lt[Ct]=Lt[qt]=Lt[Yt]=Lt[Xt]=Lt[tr]=Lt[Or]=Lt[Qr]=Lt[ir]=Lt[pr]=!0,Lt[_t]=Lt[yt]=Lt[bt]=Lt[it]=Lt[At]=Lt[st]=Lt[vt]=Lt[ze]=Lt[Se]=Lt[Le]=Lt[He]=Lt[et]=Lt[Qe]=Lt[Ze]=Lt[ht]=!1;var Vt={};Vt[_t]=Vt[yt]=Vt[bt]=Vt[At]=Vt[it]=Vt[st]=Vt[Ct]=Vt[qt]=Vt[Yt]=Vt[Xt]=Vt[tr]=Vt[Se]=Vt[Le]=Vt[He]=Vt[et]=Vt[Qe]=Vt[Ze]=Vt[mt]=Vt[Or]=Vt[Qr]=Vt[ir]=Vt[pr]=!0,Vt[vt]=Vt[ze]=Vt[ht]=!1;var js={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},qi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},zt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Yo={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qo=parseFloat,Ws=parseInt,zi=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,Gs=typeof self=="object"&&self&&self.Object===Object&&self,Qt=zi||Gs||Function("return this")(),pi=r&&!r.nodeType&&r,dr=pi&&!0&&o&&!o.nodeType&&o,Ki=dr&&dr.exports===pi,Yi=Ki&&zi.process,cr=function(){try{var Be=dr&&dr.require&&dr.require("util").t
vendor: 12,431 bytes, line 4475
4475ypes;return Be||Yi&&Yi.binding&&Yi.binding("util")}catch{}}(),Qi=cr&&cr.isArrayBuffer,mi=cr&&cr.isDate,Wn=cr&&cr.isMap,Ji=cr&&cr.isRegExp,Gn=cr&&cr.isSet,qs=cr&&cr.isTypedArray;function mr(Be,Ke,We){switch(We.length){case 0:return Be.call(Ke);case 1:return Be.call(Ke,We[0]);case 2:return Be.call(Ke,We[0],We[1]);case 3:return Be.call(Ke,We[0],We[1],We[2])}return Be.apply(Ke,We)}function qn(Be,Ke,We,gt){for(var St=-1,Bt=Be==null?0:Be.length;++St<Bt;){var or=Be[St];Ke(gt,or,We(or),Be)}return gt}function vr(Be,Ke){for(var We=-1,gt=Be==null?0:Be.length;++We<gt&&Ke(Be[We],We,Be)!==!1;);return Be}function zs(Be,Ke){for(var We=Be==null?0:Be.length;We--&&Ke(Be[We],We,Be)!==!1;);return Be}function gi(Be,Ke){for(var We=-1,gt=Be==null?0:Be.length;++We<gt;)if(!Ke(Be[We],We,Be))return!1;return!0}function Vr(Be,Ke){for(var We=-1,gt=Be==null?0:Be.length,St=0,Bt=[];++We<gt;){var or=Be[We];Ke(or,We,Be)&&(Bt[St++]=or)}return Bt}function zn(Be,Ke){var We=Be==null?0:Be.length;return!!We&&hn(Be,Ke,0)>-1}function Cn(Be,Ke,We){for(var gt=-1,St=Be==null?0:Be.length;++gt<St;)if(We(Ke,Be[gt]))return!0;return!1}function Wt(Be,Ke){for(var We=-1,gt=Be==null?0:Be.length,St=Array(gt);++We<gt;)St[We]=Ke(Be[We],We,Be);return St}function Wr(Be,Ke){for(var We=-1,gt=Ke.length,St=Be.length;++We<gt;)Be[St+We]=Ke[We];return Be}function Gr(Be,Ke,We,gt){var St=-1,Bt=Be==null?0:Be.length;for(gt&&Bt&&(We=Be[++St]);++St<Bt;)We=Ke(We,Be[St],St,Be);return We}function Ks(Be,Ke,We,gt){var St=Be==null?0:Be.length;for(gt&&St&&(We=Be[--St]);St--;)We=Ke(We,Be[St],St,Be);return We}function _i(Be,Ke){for(var We=-1,gt=Be==null?0:Be.length;++We<gt;)if(Ke(Be[We],We,Be))return!0;return!1}var Ys=X("length");function Qs(Be){return Be.split("")}function yi(Be){return Be.match($o)||[]}function gr(Be,Ke,We){var gt;return We(Be,function(St,Bt,or){if(Ke(St,Bt,or))return gt=Bt,!1}),gt}function Kn(Be,Ke,We,gt){for(var St=Be.length,Bt=We+(gt?1:-1);gt?Bt--:++Bt<St;)if(Ke(Be[Bt],Bt,Be))return Bt;return-1}function hn(Be,Ke,We){return Ke===Ke?zc(Be,Ke,We):Kn(Be,I,We)}function Rn(Be,Ke,We,gt){for(var St=We-1,Bt=Be.length;++St<Bt;)if(gt(Be[St],Ke))return St;return-1}function I(Be){return Be!==Be}function q(Be,Ke){var We=Be==null?0:Be.length;return We?ut(Be,Ke)/We:Fe}function X(Be){return function(Ke){return Ke==null?a:Ke[Be]}}function Ce(Be){return function(Ke){return Be==null?a:Be[Ke]}}function Ue(Be,Ke,We,gt,St){return St(Be,function(Bt,or,Gt){We=gt?(gt=!1,Bt):Ke(We,Bt,or,Gt)}),We}function Ge(Be,Ke){var We=Be.length;for(Be.sort(Ke);We--;)Be[We]=Be[We].value;return Be}function ut(Be,Ke){for(var We,gt=-1,St=Be.length;++gt<St;){var Bt=Ke(Be[gt]);Bt!==a&&(We=We===a?Bt:We+Bt)}return We}function Ft(Be,Ke){for(var We=-1,gt=Array(Be);++We<Be;)gt[We]=Ke(We);return gt}function sr(Be,Ke){return Wt(Ke,function(We){return[We,Be[We]]})}function Dt(Be){return Be&&Be.slice(0,za(Be)+1).replace(an,"")}function $t(Be){return function(Ke){return Be(Ke)}}function rr(Be,Ke){return Wt(Ke,function(We){return Be[We]})}function Lr(Be,Ke){return Be.has(Ke)}function Tr(Be,Ke){for(var We=-1,gt=Be.length;++We<gt&&hn(Ke,Be[We],0)>-1;);return We}function Yn(Be,Ke){for(var We=Be.length;We--&&hn(Ke,Be[We],0)>-1;);return We}function Xi(Be,Ke){for(var We=Be.length,gt=0;We--;)Be[We]===Ke&&++gt;return gt}var $c=Ce(js),Uc=Ce(qi);function Hc(Be){return"\\"+Yo[Be]}function jc(Be,Ke){return Be==null?a:Be[Ke]}function vi(Be){return Ko.test(Be)}function Wc(Be){return di.test(Be)}function Gc(Be){for(var Ke,We=[];!(Ke=Be.next()).done;)We.push(Ke.value);return We}function Jo(Be){var Ke=-1,We=Array(Be.size);return Be.forEach(function(gt,St){We[++Ke]=[St,gt]}),We}function qa(Be,Ke){return function(We){return Be(Ke(We))}}function xn(Be,Ke){for(var We=-1,gt=Be.length,St=0,Bt=[];++We<gt;){var or=Be[We];(or===Ke||or===E)&&(Be[We]=E,Bt[St++]=We)}return Bt}function Js(Be){var Ke=-1,We=Array(Be.size);return Be.forEach(function(gt){We[++Ke]=gt}),We}function qc(Be){var Ke=-1,We=Array(Be.size);return Be.forEach(function(gt){We[++Ke]=[gt,gt]}),We}function zc(Be,Ke,We){for(var gt=We-1,St=Be.length;++gt<St;)if(Be[gt]===Ke)return gt;return-1}function Kc(Be,Ke,We){for(var gt=We+1;gt--;)if(Be[gt]===Ke)return gt;return gt}function bi(Be){return vi(Be)?Qc(Be):Ys(Be)}function qr(Be){return vi(Be)?Jc(Be):Qs(Be)}function za(Be){for(var Ke=Be.length;Ke--&&Lo.test(Be.charAt(Ke)););return Ke}var Yc=Ce(zt);function Qc(Be){for(var Ke=Nr.lastIndex=0;Nr.test(Be);)++Ke;return Ke}function Jc(Be){return Be.match(Nr)||[]}function Xc(Be){return Be.match(zo)||[]}var Zc=function Be(Ke){Ke=Ke==null?Qt:wi.defaults(Qt.Object(),Ke,wi.pick(Qt,fi));var We=Ke.Array,gt=Ke.Date,St=Ke.Error,Bt=Ke.Function,or=Ke.Math,Gt=Ke.Object,Xo=Ke.RegExp,eu=Ke.String,Fr=Ke.TypeError,Xs=We.prototype,tu=Bt.prototype,Ei=Gt.prototype,Zs=Ke["__core-js_shared__"],eo=tu.toString,Ht=Ei.hasOwnProperty,ru=0,Ka=function(){var g=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),ro=Ei.toString,nu=eo.call(Gt),iu=Qt._,su=Xo("^"+eo.call(Ht).replace(li,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),no=Ki?Ke.Buffer:a,kn=Ke.Symbol,io=Ke.Uint8Array,Ya=no?no.allocUnsafe:a,so=qa(Gt.getPrototypeOf,Gt),Qa=Gt.create,Ja=Ei.propertyIsEnumerable,oo=Xs.splice,Xa=kn?kn.isConcatSpreadable:a,Zi=kn?kn.iterator:a,Qn=kn?kn.toStringTag:a,ao=function(){try{var g=ti(Gt,"defineProperty");return g({},"",{}),g}catch{}}(),ou=Ke.clearTimeout!==Qt.clearTimeout&&Ke.clearTimeout,au=gt&&gt.now!==Qt.Date.now&&gt.now,lu=Ke.setTimeout!==Qt.setTimeout&&Ke.setTimeout,lo=or.ceil,co=or.floor,Zo=Gt.getOwnPropertySymbols,cu=no?no.isBuffer:a,Za=Ke.isFinite,uu=Xs.join,hu=qa(Gt.keys,Gt),ar=or.max,_r=or.min,du=gt.now,fu=Ke.parseInt,el=or.random,pu=Xs.reverse,ea=ti(Ke,"DataView"),es=ti(Ke,"Map"),ta=ti(Ke,"Promise"),Ti=ti(Ke,"Set"),ts=ti(Ke,"WeakMap"),rs=ti(Gt,"create"),uo=ts&&new ts,Pi={},mu=ri(ea),gu=ri(es),_u=ri(ta),yu=ri(Ti),vu=ri(ts),ho=kn?kn.prototype:a,ns=ho?ho.valueOf:a,tl=ho?ho.toString:a;function Ae(g){if(Jt(g)&&!It(g)&&!(g instanceof Mt)){if(g instanceof Br)return g;if(Ht.call(g,"__wrapped__"))return rc(g)}return new Br(g)}var Si=function(){function g(){}return function(T){if(!Kt(T))return{};if(Qa)return Qa(T);g.prototype=T;var N=new g;return g.prototype=a,N}}();function fo(){}function Br(g,T){this.__wrapped__=g,this.__actions__=[],this.__chain__=!!T,this.__index__=0,this.__values__=a}Ae.templateSettings={escape:Ts,evaluate:ai,interpolate:Di,variable:"",imports:{_:Ae}},Ae.prototype=fo.prototype,Ae.prototype.constructor=Ae,Br.prototype=Si(fo.prototype),Br.prototype.constructor=Br;function Mt(g){this.__wrapped__=g,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ne,this.__views__=[]}function bu(){var g=new Mt(this.__wrapped__);return g.__actions__=Pr(this.__actions__),g.__dir__=this.__dir__,g.__filtered__=this.__filtered__,g.__iteratees__=Pr(this.__iteratees__),g.__takeCount__=this.__takeCount__,g.__views__=Pr(this.__views__),g}function wu(){if(this.__filtered__){var g=new Mt(this);g.__dir__=-1,g.__filtered__=!0}else g=this.clone(),g.__dir__*=-1;return g}function Eu(){var g=this.__wrapped__.value(),T=this.__dir__,N=It(g),z=T<0,ee=N?g.length:0,Re=Dh(0,ee,this.__views__),Oe=Re.start,Ve=Re.end,$e=Ve-Oe,Je=z?Ve:Oe-1,Xe=this.__iteratees__,rt=Xe.length,ft=0,wt=_r($e,this.__takeCount__);if(!N||!z&&ee==$e&&wt==$e)return Sl(g,this.__actions__);var Tt=[];e:for(;$e--&&ft<wt;){Je+=T;for(var xt=-1,Pt=g[Je];++xt<rt;){var Ot=Xe[xt],Nt=Ot.iteratee,xr=Ot.type,Er=Nt(Pt);if(xr==ke)Pt=Er;else if(!Er){if(xr==Me)continue e;break e}}Tt[ft++]=Pt}return Tt}Mt.prototype=Si(fo.prototype),Mt.prototype.constructor=Mt;function Jn(g){var T=-1,N=g==null?0:g.length;for(this.clear();++T<N;){var z=g[T];this.set(z[0],z[1])}}function Tu(){this.__data__=rs?rs(null):{},this.size=0}function Pu(g){var T=this.has(g)&&delete this.__data__[g];return this.size-=T?1:0,T}function Su(g){var T=this.__data__;if(rs){var N=T[g];return N===m?a:N}return Ht.call(T,g)?T[g]:a}function Au(g){var T=this.__data__;return rs?T[g]!==a:Ht.call(T,g)}function Iu(g,T){var N=this.__data__;return this.size+=this.has(g)?0:1,N[g]=rs&&T===a?m:T,this}Jn.prototype.clear=Tu,Jn.prototype.delete=Pu,Jn.prototype.get=Su,Jn.prototype.has=Au,Jn.prototype.set=Iu;function dn(g){var T=-1,N=g==null?0:g.length;for(this.clear();++T<N;){var z=g[T];this.set(z[0],z[1])}}function Cu(){this.__data__=[],this.size=0}function Ru(g){var T=this.__data__,N=po(T,g);if(N<0)return!1;var z=T.length-1;return N==z?T.pop():oo.call(T,N,1),--this.size,!0}function xu(g){var T=this.__data__,N=po(T,g);return N<0?a:T[N][1]}function ku(g){return po(this.__data__,g)>-1}function Ou(g,T){var N=this.__data__,z=po(N,g);return z<0?(++this.size,N.push([g,T])):N[z][1]=T,this}dn.prototype.clear=Cu,dn.prototype.delete=Ru,dn.prototype.get=xu,dn.prototype.has=ku,dn.prototype.set=Ou;function fn(g){var T=-1,N=g==null?0:g.length;for(this.clear();++T<N;){var z=g[T];this.set(z[0],z[1])}}function Mu(){this.size=0,this.__data__={hash:new Jn,map:new(es||dn),string:new Jn}}function Du(g){var T=Ao(this,g).delete(g);return this.size-=T?1:0,T}function Nu(g){return Ao(this,g).get(g)}function Vu(g){return Ao(this,g).has(g)}function Lu(g,T){var N=Ao(this,g),z=N.size;return N.set(g,T),this.size+=N.size==z?0:1,this}fn.prototype.clear=Mu,fn.prototype.delete=Du,fn.prototype.get=Nu,fn.prototype.has=Vu,fn.prototype.set=Lu;function Xn(g){var T=-1,N=g==null?0:g.length;for(this.__data__=new fn;++T<N;)this.add(g[T])}function Fu(g){return this.__data__.set(g,m),this}function Bu(g){return this.__data__.has(g)}Xn.prototype.add=Xn.prototype.push=Fu,Xn.prototype.has=Bu;function zr(g){var T=this.__data__=new dn(g);this.size=T.size}function $u(){this.__data__=new dn,this.size=0}function Uu(g){var T=this.__data__,N=T.delete(g);return this.size=T.size,N}function Hu(g){return this.__data__.get(g)}function ju(g){return this.__data__.has(g)}function Wu(g,T){var N=this.__data__;if(N instanceof dn){var z=N.__data__;if(!es||z.length<c-1)return z.push([g,T]),this.size=++N.size,this;N=this.__data__=new fn(z)}return N.set(g,T),this.size=N.size,this}zr.prototype.clear=$u,zr.prototype.delete=Uu,zr.prototype.get=Hu,zr.prototype.has=ju,zr.prototype.set=Wu;function rl(g,T){var N=It(g),z=!N&&ni(g),ee=!N&&!z&&Vn(g),Re=!N&&!z&&!ee&&Ri(g),Oe=N||z||ee||Re,Ve=Oe?Ft(g.length,eu):[],$e=Ve.length;for(var Je in g)(T||Ht.call(g,Je))&&!(Oe&&(Je=="length"||ee&&(Je=="offset"||Je=="parent")||Re&&(Je=="buffer"||Je=="byteLength"||Je=="byteOffset")||_n(Je,$e)))&&Ve.push(Je);return Ve}function nl(g){var T=g.length;return T?g[da(0,T-1)]:a}function Gu(g,T){return Io(Pr(g),Zn(T,0,g.length))}function qu(g){return Io(Pr(g))}function ra(g,T,N){(N!==a&&!Kr(g[T],N)||N===a&&!(T in g))&&pn(g,T,N)}function is(g,T,N){var z=g[T];(!(Ht.call(g,T)&&Kr(z,N))||N===a&&!(T in g))&&pn(g,T,N)}function po(g,T){for(var N=g.length;N--;)if(Kr(g[N][0],T))return N;return-1}function zu(g,T,N,z){return On(g,function(ee,Re,Oe){T(z,ee,N(ee),Oe)}),z}function il(g,T){return g&&tn(T,ur(T),g)}function Ku(g,T){return g&&tn(T,Ar(T),g)}function pn(g,T,N){T=="__proto__"&&ao?ao(g,T,{configurable:!0,enumerable:!0,value:N,writable:!0}):g[T]=N}function na(g,T){for(var N=-1,z=T.length,ee=We(z),Re=g==null;++N<z;)ee[N]=Re?a:La(g,T[N]);return ee}function Zn(g,T,N){return g===g&&(N!==a&&(g=g<=N?g:N),T!==a&&(g=g>=T?g:T)),g}function $r(g,T,N,z,ee,Re){var Oe,Ve=T&A,$e=T&P,Je=T&R;if(N&&(Oe=ee?N(g,z,ee,Re):N(g)),Oe!==a)return Oe;if(!Kt(g))return g;var Xe=It(g);if(Xe){if(Oe=Vh(g),!Ve)return Pr(g,Oe)}else{var rt=yr(g),ft=rt==ze||rt==Pe;if(Vn(g))return Cl(g,Ve);if(rt==He||rt==_t||ft&&!ee){if(Oe=$e||ft?{}:zl(g),!Ve)return $e?Sh(g,Ku(Oe,g)):Ph(g,il(Oe,g))}else{if(!Vt[rt])return ee?g:{};Oe=Lh(g,rt,Ve)}}Re||(Re=new zr);var wt=Re.get(g);if(wt)return wt;Re.set(g,Oe),Ec(g)?g.forEach(function(Pt){Oe.add($r(Pt,T,N,Pt,g,Re))}):bc(g)&&g.forEach(function(Pt,Ot){Oe.set(Ot,$r(Pt,T,N,Ot,g,Re))});var Tt=Je?$e?Ta:Ea:$e?Ar:ur,xt=Xe?a:Tt(g);return vr(xt||g,function(Pt,Ot){xt&&(Ot=Pt,Pt=g[Ot]),is(Oe,Ot,$r(Pt,T,N,Ot,g,Re))}),Oe}function Yu(g){var T=ur(g);return function(N){return sl(N,g,T)}}function sl(g,T,N){var z=N.length;if(g==null)return!z;for(g=Gt(g);z--;){var ee=N[z],Re=T[ee],Oe=g[ee];if(Oe===a&&!(ee in g)||!Re(Oe))return!1}return!0}function ol(g,T,N){if(typeof g!="function")throw new Fr(d);return ds(function(){g.apply(a,N)},T)}function ss(g,T,N,z){var ee=-1,Re=zn,Oe=!0,Ve=g.length,$e=[],Je=T.length;if(!Ve)return $e;N&&(T=Wt(T,$t(N))),z?(Re=Cn,Oe=!1):T.length>
vendor: 11,490 bytes, line 4475
4475=c&&(Re=Lr,Oe=!1,T=new Xn(T));e:for(;++ee<Ve;){var Xe=g[ee],rt=N==null?Xe:N(Xe);if(Xe=z||Xe!==0?Xe:0,Oe&&rt===rt){for(var ft=Je;ft--;)if(T[ft]===rt)continue e;$e.push(Xe)}else Re(T,rt,z)||$e.push(Xe)}return $e}var On=Ml(en),al=Ml(sa,!0);function Qu(g,T){var N=!0;return On(g,function(z,ee,Re){return N=!!T(z,ee,Re),N}),N}function mo(g,T,N){for(var z=-1,ee=g.length;++z<ee;){var Re=g[z],Oe=T(Re);if(Oe!=null&&(Ve===a?Oe===Oe&&!Rr(Oe):N(Oe,Ve)))var Ve=Oe,$e=Re}return $e}function Ju(g,T,N,z){var ee=g.length;for(N=Rt(N),N<0&&(N=-N>ee?0:ee+N),z=z===a||z>ee?ee:Rt(z),z<0&&(z+=ee),z=N>z?0:Pc(z);N<z;)g[N++]=T;return g}function ll(g,T){var N=[];return On(g,function(z,ee,Re){T(z,ee,Re)&&N.push(z)}),N}function fr(g,T,N,z,ee){var Re=-1,Oe=g.length;for(N||(N=Bh),ee||(ee=[]);++Re<Oe;){var Ve=g[Re];T>0&&N(Ve)?T>1?fr(Ve,T-1,N,z,ee):Wr(ee,Ve):z||(ee[ee.length]=Ve)}return ee}var ia=Dl(),cl=Dl(!0);function en(g,T){return g&&ia(g,T,ur)}function sa(g,T){return g&&cl(g,T,ur)}function go(g,T){return Vr(T,function(N){return yn(g[N])})}function ei(g,T){T=Dn(T,g);for(var N=0,z=T.length;g!=null&&N<z;)g=g[rn(T[N++])];return N&&N==z?g:a}function ul(g,T,N){var z=T(g);return It(g)?z:Wr(z,N(g))}function br(g){return g==null?g===a?at:qe:Qn&&Qn in Gt(g)?Mh(g):qh(g)}function oa(g,T){return g>T}function Xu(g,T){return g!=null&&Ht.call(g,T)}function Zu(g,T){return g!=null&&T in Gt(g)}function eh(g,T,N){return g>=_r(T,N)&&g<ar(T,N)}function aa(g,T,N){for(var z=N?Cn:zn,ee=g[0].length,Re=g.length,Oe=Re,Ve=We(Re),$e=1/0,Je=[];Oe--;){var Xe=g[Oe];Oe&&T&&(Xe=Wt(Xe,$t(T))),$e=_r(Xe.length,$e),Ve[Oe]=!N&&(T||ee>=120&&Xe.length>=120)?new Xn(Oe&&Xe):a}Xe=g[0];var rt=-1,ft=Ve[0];e:for(;++rt<ee&&Je.length<$e;){var wt=Xe[rt],Tt=T?T(wt):wt;if(wt=N||wt!==0?wt:0,!(ft?Lr(ft,Tt):z(Je,Tt,N))){for(Oe=Re;--Oe;){var xt=Ve[Oe];if(!(xt?Lr(xt,Tt):z(g[Oe],Tt,N)))continue e}ft&&ft.push(Tt),Je.push(wt)}}return Je}function th(g,T,N,z){return en(g,function(ee,Re,Oe){T(z,N(ee),Re,Oe)}),z}function os(g,T,N){T=Dn(T,g),g=Jl(g,T);var z=g==null?g:g[rn(Hr(T))];return z==null?a:mr(z,g,N)}function hl(g){return Jt(g)&&br(g)==_t}function rh(g){return Jt(g)&&br(g)==bt}function nh(g){return Jt(g)&&br(g)==st}function ls(g,T,N,z,ee){return g===T?!0:g==null||T==null||!Jt(g)&&!Jt(T)?g!==g&&T!==T:ih(g,T,N,z,ls,ee)}function ih(g,T,N,z,ee,Re){var Oe=It(g),Ve=It(T),$e=Oe?yt:yr(g),Je=Ve?yt:yr(T);$e=$e==_t?He:$e,Je=Je==_t?He:Je;var Xe=$e==He,rt=Je==He,ft=$e==Je;if(ft&&Vn(g)){if(!Vn(T))return!1;Oe=!0,Xe=!1}if(ft&&!Xe)return Re||(Re=new zr),Oe||Ri(g)?Wl(g,T,N,z,ee,Re):kh(g,T,$e,N,z,ee,Re);if(!(N&x)){var wt=Xe&&Ht.call(g,"__wrapped__"),Tt=rt&&Ht.call(T,"__wrapped__");if(wt||Tt){var xt=wt?g.value():g,Pt=Tt?T.value():T;return Re||(Re=new zr),ee(xt,Pt,N,z,Re)}}return ft?(Re||(Re=new zr),Oh(g,T,N,z,ee,Re)):!1}function sh(g){return Jt(g)&&yr(g)==Se}function la(g,T,N,z){var ee=N.length,Re=ee,Oe=!z;if(g==null)return!Re;for(g=Gt(g);ee--;){var Ve=N[ee];if(Oe&&Ve[2]?Ve[1]!==g[Ve[0]]:!(Ve[0]in g))return!1}for(;++ee<Re;){Ve=N[ee];var $e=Ve[0],Je=g[$e],Xe=Ve[1];if(Oe&&Ve[2]){if(Je===a&&!($e in g))return!1}else{var rt=new zr;if(z)var ft=z(Je,Xe,$e,g,T,rt);if(!(ft===a?ls(Xe,Je,x|M,z,rt):ft))return!1}}return!0}function dl(g){if(!Kt(g)||Uh(g))return!1;var T=yn(g)?su:Is;return T.test(ri(g))}function oh(g){return Jt(g)&&br(g)==et}function ah(g){return Jt(g)&&yr(g)==Qe}function lh(g){return Jt(g)&&Mo(g.length)&&!!Lt[br(g)]}function fl(g){return typeof g=="function"?g:g==null?Ir:typeof g=="object"?It(g)?gl(g[0],g[1]):ml(g):Nc(g)}function ca(g){if(!hs(g))return hu(g);var T=[];for(var N in Gt(g))Ht.call(g,N)&&N!="constructor"&&T.push(N);return T}function ch(g){if(!Kt(g))return Gh(g);var T=hs(g),N=[];for(var z in g)z=="constructor"&&(T||!Ht.call(g,z))||N.push(z);return N}function ua(g,T){return g<T}function pl(g,T){var N=-1,z=Sr(g)?We(g.length):[];return On(g,function(ee,Re,Oe){z[++N]=T(ee,Re,Oe)}),z}function ml(g){var T=Sa(g);return T.length==1&&T[0][2]?Yl(T[0][0],T[0][1]):function(N){return N===g||la(N,g,T)}}function gl(g,T){return Ia(g)&&Kl(T)?Yl(rn(g),T):function(N){var z=La(N,g);return z===a&&z===T?Fa(N,g):ls(T,z,x|M)}}function _o(g,T,N,z,ee){g!==T&&ia(T,function(Re,Oe){if(ee||(ee=new zr),Kt(Re))uh(g,T,Oe,N,_o,z,ee);else{var Ve=z?z(Ra(g,Oe),Re,Oe+"",g,T,ee):a;Ve===a&&(Ve=Re),ra(g,Oe,Ve)}},Ar)}function uh(g,T,N,z,ee,Re,Oe){var Ve=Ra(g,N),$e=Ra(T,N),Je=Oe.get($e);if(Je){ra(g,N,Je);return}var Xe=Re?Re(Ve,$e,N+"",g,T,Oe):a,rt=Xe===a;if(rt){var ft=It($e),wt=!ft&&Vn($e),Tt=!ft&&!wt&&Ri($e);Xe=$e,ft||wt||Tt?It(Ve)?Xe=Ve:Zt(Ve)?Xe=Pr(Ve):wt?(rt=!1,Xe=Cl($e,!0)):Tt?(rt=!1,Xe=Rl($e,!0)):Xe=[]:fs($e)||ni($e)?(Xe=Ve,ni(Ve)?Xe=Sc(Ve):(!Kt(Ve)||yn(Ve))&&(Xe=zl($e))):rt=!1}rt&&(Oe.set($e,Xe),ee(Xe,$e,z,Re,Oe),Oe.delete($e)),ra(g,N,Xe)}function _l(g,T){var N=g.length;if(N)return T+=T<0?N:0,_n(T,N)?g[T]:a}function yl(g,T,N){T.length?T=Wt(T,function(Re){return It(Re)?function(Oe){return ei(Oe,Re.length===1?Re[0]:Re)}:Re}):T=[Ir];var z=-1;T=Wt(T,$t(Et()));var ee=pl(g,function(Re,Oe,Ve){var $e=Wt(T,function(Je){return Je(Re)});return{criteria:$e,index:++z,value:Re}});return Ge(ee,function(Re,Oe){return Th(Re,Oe,N)})}function hh(g,T){return vl(g,T,function(N,z){return Fa(g,z)})}function vl(g,T,N){for(var z=-1,ee=T.length,Re={};++z<ee;){var Oe=T[z],Ve=ei(g,Oe);N(Ve,Oe)&&cs(Re,Dn(Oe,g),Ve)}return Re}function dh(g){return function(T){return ei(T,g)}}function ha(g,T,N,z){var ee=z?Rn:hn,Re=-1,Oe=T.length,Ve=g;for(g===T&&(T=Pr(T)),N&&(Ve=Wt(g,$t(N)));++Re<Oe;)for(var $e=0,Je=T[Re],Xe=N?N(Je):Je;($e=ee(Ve,Xe,$e,z))>-1;)Ve!==g&&oo.call(Ve,$e,1),oo.call(g,$e,1);return g}function bl(g,T){for(var N=g?T.length:0,z=N-1;N--;){var ee=T[N];if(N==z||ee!==Re){var Re=ee;_n(ee)?oo.call(g,ee,1):ma(g,ee)}}return g}function da(g,T){return g+co(el()*(T-g+1))}function fh(g,T,N,z){for(var ee=-1,Re=ar(lo((T-g)/(N||1)),0),Oe=We(Re);Re--;)Oe[z?Re:++ee]=g,g+=N;return Oe}function fa(g,T){var N="";if(!g||T<1||T>Q)return N;do T%2&&(N+=g),T=co(T/2),T&&(g+=g);while(T);return N}function kt(g,T){return xa(Ql(g,T,Ir),g+"")}function ph(g){return nl(xi(g))}function mh(g,T){var N=xi(g);return Io(N,Zn(T,0,N.length))}function cs(g,T,N,z){if(!Kt(g))return g;T=Dn(T,g);for(var ee=-1,Re=T.length,Oe=Re-1,Ve=g;Ve!=null&&++ee<Re;){var $e=rn(T[ee]),Je=N;if($e==="__proto__"||$e==="constructor"||$e==="prototype")return g;if(ee!=Oe){var Xe=Ve[$e];Je=z?z(Xe,$e,Ve):a,Je===a&&(Je=Kt(Xe)?Xe:_n(T[ee+1])?[]:{})}is(Ve,$e,Je),Ve=Ve[$e]}return g}var wl=uo?function(g,T){return uo.set(g,T),g}:Ir,gh=ao?function(g,T){return ao(g,"toString",{configurable:!0,enumerable:!1,value:$a(T),writable:!0})}:Ir;function _h(g){return Io(xi(g))}function Ur(g,T,N){var z=-1,ee=g.length;T<0&&(T=-T>ee?0:ee+T),N=N>ee?ee:N,N<0&&(N+=ee),ee=T>N?0:N-T>>>0,T>>>=0;for(var Re=We(ee);++z<ee;)Re[z]=g[z+T];return Re}function yh(g,T){var N;return On(g,function(z,ee,Re){return N=T(z,ee,Re),!N}),!!N}function yo(g,T,N){var z=0,ee=g==null?z:g.length;if(typeof T=="number"&&T===T&&ee<=ct){for(;z<ee;){var Re=z+ee>>>1,Oe=g[Re];Oe!==null&&!Rr(Oe)&&(N?Oe<=T:Oe<T)?z=Re+1:ee=Re}return ee}return pa(g,T,Ir,N)}function pa(g,T,N,z){var ee=0,Re=g==null?0:g.length;if(Re===0)return 0;T=N(T);for(var Oe=T!==T,Ve=T===null,$e=Rr(T),Je=T===a;ee<Re;){var Xe=co((ee+Re)/2),rt=N(g[Xe]),ft=rt!==a,wt=rt===null,Tt=rt===rt,xt=Rr(rt);if(Oe)var Pt=z||Tt;else Je?Pt=Tt&&(z||ft):Ve?Pt=Tt&&ft&&(z||!wt):$e?Pt=Tt&&ft&&!wt&&(z||!xt):wt||xt?Pt=!1:Pt=z?rt<=T:rt<T;Pt?ee=Xe+1:Re=Xe}return _r(Re,nt)}function El(g,T){for(var N=-1,z=g.length,ee=0,Re=[];++N<z;){var Oe=g[N],Ve=T?T(Oe):Oe;if(!N||!Kr(Ve,$e)){var $e=Ve;Re[ee++]=Oe===0?0:Oe}}return Re}function Tl(g){return typeof g=="number"?g:Rr(g)?Fe:+g}function Cr(g){if(typeof g=="string")return g;if(It(g))return Wt(g,Cr)+"";if(Rr(g))return tl?tl.call(g):"";var T=g+"";return T=="0"&&1/g==-1/0?"-0":T}function Mn(g,T,N){var z=-1,ee=zn,Re=g.length,Oe=!0,Ve=[],$e=Ve;if(N)Oe=!1,ee=Cn;else if(Re>=c){var Je=T?null:Rh(g);if(Je)return Js(Je);Oe=!1,ee=Lr,$e=new Xn}else $e=T?[]:Ve;e:for(;++z<Re;){var Xe=g[z],rt=T?T(Xe):Xe;if(Xe=N||Xe!==0?Xe:0,Oe&&rt===rt){for(var ft=$e.length;ft--;)if($e[ft]===rt)continue e;T&&$e.push(rt),Ve.push(Xe)}else ee($e,rt,N)||($e!==Ve&&$e.push(rt),Ve.push(Xe))}return Ve}function ma(g,T){return T=Dn(T,g),g=Jl(g,T),g==null||delete g[rn(Hr(T))]}function Pl(g,T,N,z){return cs(g,T,N(ei(g,T)),z)}function vo(g,T,N,z){for(var ee=g.length,Re=z?ee:-1;(z?Re--:++Re<ee)&&T(g[Re],Re,g););return N?Ur(g,z?0:Re,z?Re+1:ee):Ur(g,z?Re+1:0,z?ee:Re)}function Sl(g,T){var N=g;return N instanceof Mt&&(N=N.value()),Gr(T,function(z,ee){return ee.func.apply(ee.thisArg,Wr([z],ee.args))},N)}function ga(g,T,N){var z=g.length;if(z<2)return z?Mn(g[0]):[];for(var ee=-1,Re=We(z);++ee<z;)for(var Oe=g[ee],Ve=-1;++Ve<z;)Ve!=ee&&(Re[ee]=ss(Re[ee]||Oe,g[Ve],T,N));return Mn(fr(Re,1),T,N)}function Al(g,T,N){for(var z=-1,ee=g.length,Re=T.length,Oe={};++z<ee;){var Ve=z<Re?T[z]:a;N(Oe,g[z],Ve)}return Oe}function _a(g){return Zt(g)?g:[]}function ya(g){return typeof g=="function"?g:Ir}function Dn(g,T){return It(g)?g:Ia(g,T)?[g]:tc(Ut(g))}var vh=kt;function Nn(g,T,N){var z=g.length;return N=N===a?z:N,!T&&N>=z?g:Ur(g,T,N)}var Il=ou||function(g){return Qt.clearTimeout(g)};function Cl(g,T){if(T)return g.slice();var N=g.length,z=Ya?Ya(N):new g.constructor(N);return g.copy(z),z}function va(g){var T=new g.constructor(g.byteLength);return new io(T).set(new io(g)),T}function bh(g,T){var N=T?va(g.buffer):g.buffer;return new g.constructor(N,g.byteOffset,g.byteLength)}function wh(g){var T=new g.constructor(g.source,Bn.exec(g));return T.lastIndex=g.lastIndex,T}function Eh(g){return ns?Gt(ns.call(g)):{}}function Rl(g,T){var N=T?va(g.buffer):g.buffer;return new g.constructor(N,g.byteOffset,g.length)}function xl(g,T){if(g!==T){var N=g!==a,z=g===null,ee=g===g,Re=Rr(g),Oe=T!==a,Ve=T===null,$e=T===T,Je=Rr(T);if(!Ve&&!Je&&!Re&&g>T||Re&&Oe&&$e&&!Ve&&!Je||z&&Oe&&$e||!N&&$e||!ee)return 1;if(!z&&!Re&&!Je&&g<T||Je&&N&&ee&&!z&&!Re||Ve&&N&&ee||!Oe&&ee||!$e)return-1}return 0}function Th(g,T,N){for(var z=-1,ee=g.criteria,Re=T.criteria,Oe=ee.length,Ve=N.length;++z<Oe;){var $e=xl(ee[z],Re[z]);if($e){if(z>=Ve)return $e;var Je=N[z];return $e*(Je=="desc"?-1:1)}}return g.index-T.index}function kl(g,T,N,z){for(var ee=-1,Re=g.length,Oe=N.length,Ve=-1,$e=T.length,Je=ar(Re-Oe,0),Xe=We($e+Je),rt=!z;++Ve<$e;)Xe[Ve]=T[Ve];for(;++ee<Oe;)(rt||ee<Re)&&(Xe[N[ee]]=g[ee]);for(;Je--;)Xe[Ve++]=g[ee++];return Xe}function Ol(g,T,N,z){for(var ee=-1,Re=g.length,Oe=-1,Ve=N.length,$e=-1,Je=T.length,Xe=ar(Re-Ve,0),rt=We(Xe+Je),ft=!z;++ee<Xe;)rt[ee]=g[ee];for(var wt=ee;++$e<Je;)rt[wt+$e]=T[$e];for(;++Oe<Ve;)(ft||ee<Re)&&(rt[wt+N[Oe]]=g[ee++]);return rt}function Pr(g,T){var N=-1,z=g.length;for(T||(T=We(z));++N<z;)T[N]=g[N];return T}function tn(g,T,N,z){var ee=!N;N||(N={});for(var Re=-1,Oe=T.length;++Re<Oe;){var Ve=T[Re],$e=z?z(N[Ve],g[Ve],Ve,N,g):a;$e===a&&($e=g[Ve]),ee?pn(N,Ve,$e):is(N,Ve,$e)}return N}function Ph(g,T){return tn(g,Aa(g),T)}function Sh(g,T){return tn(g,Gl(g),T)}function bo(g,T){return function(N,z){var ee=It(N)?qn:zu,Re=T?T():{};return ee(N,g,Et(z,2),Re)}}function Ai(g){return kt(function(T,N){var z=-1,ee=N.length,Re=ee>1?N[ee-1]:a,Oe=ee>2?N[2]:a;for(Re=g.length>3&&typeof Re=="function"?(ee--,Re):a,Oe&&wr(N[0],N[1],Oe)&&(Re=ee<3?a:Re,ee=1),T=Gt(T);++z<ee;){var Ve=N[z];Ve&&g(T,Ve,z,Re)}return T})}function Ml(g,T){return function(N,z){if(N==null)return N;if(!Sr(N))return g(N,z);for(var ee=N.length,Re=T?ee:-1,Oe=Gt(N);(T?Re--:++Re<ee)&&z(Oe[Re],Re,Oe)!==!1;);return N}}function Dl(g){return function(T,N,z){for(var ee=-1,Re=Gt(T),Oe=z(T),Ve=Oe.length;Ve--;){var $e=Oe[g?Ve:++ee];
vendor: 2,222 bytes, line 4475
4475if(N(Re[$e],$e,Re)===!1)break}return T}}function Ah(g,T,N){var z=T&$,ee=us(g);function Re(){var Oe=this&&this!==Qt&&this instanceof Re?ee:g;return Oe.apply(z?N:this,arguments)}return Re}function Nl(g){return function(T){T=Ut(T);var N=vi(T)?qr(T):a,z=N?N[0]:T.charAt(0),ee=N?Nn(N,1).join(""):T.slice(1);return z[g]()+ee}}function Ii(g){return function(T){return Gr(Mc(Oc(T).replace(Go,"")),g,"")}}function us(g){return function(){var T=arguments;switch(T.length){case 0:return new g;case 1:return new g(T[0]);case 2:return new g(T[0],T[1]);case 3:return new g(T[0],T[1],T[2]);case 4:return new g(T[0],T[1],T[2],T[3]);case 5:return new g(T[0],T[1],T[2],T[3],T[4]);case 6:return new g(T[0],T[1],T[2],T[3],T[4],T[5]);case 7:return new g(T[0],T[1],T[2],T[3],T[4],T[5],T[6])}var N=Si(g.prototype),z=g.apply(N,T);return Kt(z)?z:N}}function Ih(g,T,N){var z=us(g);function ee(){for(var Re=arguments.length,Oe=We(Re),Ve=Re,$e=Ci(ee);Ve--;)Oe[Ve]=arguments[Ve];var Je=Re<3&&Oe[0]!==$e&&Oe[Re-1]!==$e?[]:xn(Oe,$e);if(Re-=Je.length,Re<N)return $l(g,T,wo,ee.placeholder,a,Oe,Je,a,a,N-Re);var Xe=this&&this!==Qt&&this instanceof ee?z:g;return mr(Xe,this,Oe)}return ee}function Vl(g){return function(T,N,z){var ee=Gt(T);if(!Sr(T)){var Re=Et(N,3);T=ur(T),N=function(Ve){return Re(ee[Ve],Ve,ee)}}var Oe=g(T,N,z);return Oe>-1?ee[Re?T[Oe]:Oe]:a}}function Ll(g){return gn(function(T){var N=T.length,z=N,ee=Br.prototype.thru;for(g&&T.reverse();z--;){var Re=T[z];if(typeof Re!="function")throw new Fr(d);if(ee&&!Oe&&So(Re)=="wrapper")var Oe=new Br([],!0)}for(z=Oe?z:N;++z<N;){Re=T[z];var Ve=So(Re),$e=Ve=="wrapper"?Pa(Re):a;$e&&Ca($e[0])&&$e[1]==(U|O|F|G)&&!$e[4].length&&$e[9]==1?Oe=Oe[So($e[0])].apply(Oe,$e[3]):Oe=Re.length==1&&Ca(Re)?Oe[Ve]():Oe.thru(Re)}return function(){var Je=arguments,Xe=Je[0];if(Oe&&Je.length==1&&It(Xe))return Oe.plant(Xe).value();for(var rt=0,ft=N?T[rt].apply(this,Je):Xe;++rt<N;)ft=T[rt].call(this,ft);return ft}})}function wo(g,T,N,z,ee,Re,Oe,Ve,$e,Je){var Xe=T&U,rt=T&$,ft=T&V,wt=T&(O|L),Tt=T&Y,xt=ft?a:us(g);function Pt(){for(var Ot=arguments.length,Nt=We(Ot),xr=Ot;xr--;)Nt[xr]=arguments[xr];if(wt)var Er=Ci(Pt),kr=Xi(Nt,Er);if(z&&(Nt=kl(Nt,z,ee,wt)),Re&&(Nt=Ol(Nt,Re,Oe,wt)),Ot-=kr,wt&&Ot<Je){var er=xn(Nt,Er);
vendor: 6,531 bytes, line 4475
4475return $l(g,T,wo,Pt.placeholder,N,Nt,er,Ve,$e,Je-Ot)}var Yr=rt?N:this,bn=ft?Yr[g]:g;return Ot=Nt.length,Ve?Nt=zh(Nt,Ve):Tt&&Ot>1&&Nt.reverse(),Xe&&$e<Ot&&(Nt.length=$e),this&&this!==Qt&&this instanceof Pt&&(bn=xt||us(bn)),bn.apply(Yr,Nt)}return Pt}function Fl(g,T){return function(N,z){return th(N,g,T(z),{})}}function Eo(g,T){return function(N,z){var ee;if(N===a&&z===a)return T;if(N!==a&&(ee=N),z!==a){if(ee===a)return z;typeof N=="string"||typeof z=="string"?(N=Cr(N),z=Cr(z)):(N=Tl(N),z=Tl(z)),ee=g(N,z)}return ee}}function ba(g){return gn(function(T){return T=Wt(T,$t(Et())),kt(function(N){var z=this;return g(T,function(ee){return mr(ee,z,N)})})})}function To(g,T){T=T===a?" ":Cr(T);var N=T.length;if(N<2)return N?fa(T,g):T;var z=fa(T,lo(g/bi(T)));return vi(T)?Nn(qr(z),0,g).join(""):z.slice(0,g)}function Ch(g,T,N,z){var ee=T&$,Re=us(g);function Oe(){for(var Ve=-1,$e=arguments.length,Je=-1,Xe=z.length,rt=We(Xe+$e),ft=this&&this!==Qt&&this instanceof Oe?Re:g;++Je<Xe;)rt[Je]=z[Je];for(;$e--;)rt[Je++]=arguments[++Ve];return mr(ft,ee?N:this,rt)}return Oe}function Bl(g){return function(T,N,z){return z&&typeof z!="number"&&wr(T,N,z)&&(N=z=a),T=vn(T),N===a?(N=T,T=0):N=vn(N),z=z===a?T<N?1:-1:vn(z),fh(T,N,z,g)}}function Po(g){return function(T,N){return typeof T=="string"&&typeof N=="string"||(T=jr(T),N=jr(N)),g(T,N)}}function $l(g,T,N,z,ee,Re,Oe,Ve,$e,Je){var Xe=T&O,rt=Xe?Oe:a,ft=Xe?a:Oe,wt=Xe?Re:a,Tt=Xe?a:Re;T|=Xe?F:j,T&=~(Xe?j:F),T&B||(T&=-4);var xt=[g,T,ee,wt,rt,Tt,ft,Ve,$e,Je],Pt=N.apply(a,xt);return Ca(g)&&Xl(Pt,xt),Pt.placeholder=z,Zl(Pt,g,T)}function wa(g){var T=or[g];return function(N,z){if(N=jr(N),z=z==null?0:_r(Rt(z),292),z&&Za(N)){var ee=(Ut(N)+"e").split("e"),Re=T(ee[0]+"e"+(+ee[1]+z));return ee=(Ut(Re)+"e").split("e"),+(ee[0]+"e"+(+ee[1]-z))}return T(N)}}var Rh=Ti&&1/Js(new Ti([,-0]))[1]==xe?function(g){return new Ti(g)}:ja;function Ul(g){return function(T){var N=yr(T);return N==Se?Jo(T):N==Qe?qc(T):sr(T,g(T))}}function mn(g,T,N,z,ee,Re,Oe,Ve){var $e=T&V;if(!$e&&typeof g!="function")throw new Fr(d);var Je=z?z.length:0;if(Je||(T&=-97,z=ee=a),Oe=Oe===a?Oe:ar(Rt(Oe),0),Ve=Ve===a?Ve:Rt(Ve),Je-=ee?ee.length:0,T&j){var Xe=z,rt=ee;z=ee=a}var ft=$e?a:Pa(g),wt=[g,T,N,z,ee,Xe,rt,Re,Oe,Ve];if(ft&&Wh(wt,ft),g=wt[0],T=wt[1],N=wt[2],z=wt[3],ee=wt[4],Ve=wt[9]=wt[9]===a?$e?0:g.length:ar(wt[9]-Je,0),!Ve&&T&(O|L)&&(T&=-25),!T||T==$)var Tt=Ah(g,T,N);else T==O||T==L?Tt=Ih(g,T,Ve):(T==F||T==($|F))&&!ee.length?Tt=Ch(g,T,N,z):Tt=wo.apply(a,wt);var xt=ft?wl:Xl;return Zl(xt(Tt,wt),g,T)}function Hl(g,T,N,z){return g===a||Kr(g,Ei[N])&&!Ht.call(z,N)?T:g}function jl(g,T,N,z,ee,Re){return Kt(g)&&Kt(T)&&(Re.set(T,g),_o(g,T,a,jl,Re),Re.delete(T)),g}function xh(g){return fs(g)?a:g}function Wl(g,T,N,z,ee,Re){var Oe=N&x,Ve=g.length,$e=T.length;if(Ve!=$e&&!(Oe&&$e>Ve))return!1;var Je=Re.get(g),Xe=Re.get(T);if(Je&&Xe)return Je==T&&Xe==g;var rt=-1,ft=!0,wt=N&M?new Xn:a;for(Re.set(g,T),Re.set(T,g);++rt<Ve;){var Tt=g[rt],xt=T[rt];if(z)var Pt=Oe?z(xt,Tt,rt,T,g,Re):z(Tt,xt,rt,g,T,Re);if(Pt!==a){if(Pt)continue;ft=!1;break}if(wt){if(!_i(T,function(Ot,Nt){if(!Lr(wt,Nt)&&(Tt===Ot||ee(Tt,Ot,N,z,Re)))return wt.push(Nt)})){ft=!1;break}}else if(!(Tt===xt||ee(Tt,xt,N,z,Re))){ft=!1;break}}return Re.delete(g),Re.delete(T),ft}function kh(g,T,N,z,ee,Re,Oe){switch(N){case At:if(g.byteLength!=T.byteLength||g.byteOffset!=T.byteOffset)return!1;g=g.buffer,T=T.buffer;case bt:return!(g.byteLength!=T.byteLength||!Re(new io(g),new io(T)));case it:case st:case Le:return Kr(+g,+T);case vt:return g.name==T.name&&g.message==T.message;case et:case Ze:return g==T+"";case Se:var Ve=Jo;case Qe:var $e=z&x;if(Ve||(Ve=Js),g.size!=T.size&&!$e)return!1;var Je=Oe.get(g);if(Je)return Je==T;z|=M,Oe.set(g,T);var Xe=Wl(Ve(g),Ve(T),z,ee,Re,Oe);return Oe.delete(g),Xe;case mt:if(ns)return ns.call(g)==ns.call(T)}return!1}function Oh(g,T,N,z,ee,Re){var Oe=N&x,Ve=Ea(g),$e=Ve.length,Je=Ea(T),Xe=Je.length;if($e!=Xe&&!Oe)return!1;for(var rt=$e;rt--;){var ft=Ve[rt];if(!(Oe?ft in T:Ht.call(T,ft)))return!1}var wt=Re.get(g),Tt=Re.get(T);if(wt&&Tt)return wt==T&&Tt==g;var xt=!0;Re.set(g,T),Re.set(T,g);for(var Pt=Oe;++rt<$e;){ft=Ve[rt];var Ot=g[ft],Nt=T[ft];if(z)var xr=Oe?z(Nt,Ot,ft,T,g,Re):z(Ot,Nt,ft,g,T,Re);if(!(xr===a?Ot===Nt||ee(Ot,Nt,N,z,Re):xr)){xt=!1;break}Pt||(Pt=ft=="constructor")}if(xt&&!Pt){var Er=g.constructor,kr=T.constructor;Er!=kr&&"constructor"in g&&"constructor"in T&&!(typeof Er=="function"&&Er instanceof Er&&typeof kr=="function"&&kr instanceof kr)&&(xt=!1)}return Re.delete(g),Re.delete(T),xt}function gn(g){return xa(Ql(g,a,sc),g+"")}function Ea(g){return ul(g,ur,Aa)}function Ta(g){return ul(g,Ar,Gl)}var Pa=uo?function(g){return uo.get(g)}:ja;function So(g){for(var T=g.name+"",N=Pi[T],z=Ht.call(Pi,T)?N.length:0;z--;){var ee=N[z],Re=ee.func;if(Re==null||Re==g)return ee.name}return T}function Ci(g){var T=Ht.call(Ae,"placeholder")?Ae:g;return T.placeholder}function Et(){var g=Ae.iteratee||Ua;return g=g===Ua?fl:g,arguments.length?g(arguments[0],arguments[1]):g}function Ao(g,T){var N=g.__data__;return $h(T)?N[typeof T=="string"?"string":"hash"]:N.map}function Sa(g){for(var T=ur(g),N=T.length;N--;){var z=T[N],ee=g[z];T[N]=[z,ee,Kl(ee)]}return T}function ti(g,T){var N=jc(g,T);return dl(N)?N:a}function Mh(g){var T=Ht.call(g,Qn),N=g[Qn];try{g[Qn]=a;var z=!0}catch{}var ee=ro.call(g);return z&&(T?g[Qn]=N:delete g[Qn]),ee}var Aa=Zo?function(g){return g==null?[]:(g=Gt(g),Vr(Zo(g),function(T){return Ja.call(g,T)}))}:Wa,Gl=Zo?function(g){for(var T=[];g;)Wr(T,Aa(g)),g=so(g);return T}:Wa,yr=br;(ea&&yr(new ea(new ArrayBuffer(1)))!=At||es&&yr(new es)!=Se||ta&&yr(ta.resolve())!=Ye||Ti&&yr(new Ti)!=Qe||ts&&yr(new ts)!=ht)&&(yr=function(g){var T=br(g),N=T==He?g.constructor:a,z=N?ri(N):"";if(z)switch(z){case mu:return At;case gu:return Se;case _u:return Ye;case yu:return Qe;case vu:return ht}return T});function Dh(g,T,N){for(var z=-1,ee=N.length;++z<ee;){var Re=N[z],Oe=Re.size;switch(Re.type){case"drop":g+=Oe;break;case"dropRight":T-=Oe;break;case"take":T=_r(T,g+Oe);break;case"takeRight":g=ar(g,T-Oe);break}}return{start:g,end:T}}function Nh(g){var T=g.match(Tn);return T?T[1].split(Bo):[]}function ql(g,T,N){T=Dn(T,g);for(var z=-1,ee=T.length,Re=!1;++z<ee;){var Oe=rn(T[z]);if(!(Re=g!=null&&N(g,Oe)))break;g=g[Oe]}return Re||++z!=ee?Re:(ee=g==null?0:g.length,!!ee&&Mo(ee)&&_n(Oe,ee)&&(It(g)||ni(g)))}function Vh(g){var T=g.length,N=new g.constructor(T);return T&&typeof g[0]=="string"&&Ht.call(g,"index")&&(N.index=g.index,N.input=g.input),N}function zl(g){return typeof g.constructor=="function"&&!hs(g)?Si(so(g)):{}}
vendor: 4,475 bytes, lines 4475-4477
4475function Lh(g,T,N){var z=g.constructor;switch(T){case bt:return va(g);case it:case st:return new z(+g);case At:return bh(g,N);case Ct:case qt:case Yt:case Xt:case tr:case Or:case Qr:case ir:case pr:return Rl(g,N);case Se:return new z;case Le:case Ze:return new z(g);case et:return wh(g);case Qe:return new z;case mt:return Eh(g)}}function Fh(g,T){var N=T.length;if(!N)return g;var z=N-1;return T[z]=(N>1?"& ":"")+T[z],T=T.join(N>2?", ":" "),g.replace(Fo,`{
4476/* [wrapped with `+T+`] */
4477`)}function Bh(g){return It(g)||ni(g)||!!(Xa&&g&&g[Xa])}function _n(g,T){var N=typeof g;return T=T??Q,!!T&&(N=="number"||N!="symbol"&&Li.test(g))&&g>-1&&g%1==0&&g<T}function wr(g,T,N){if(!Kt(N))return!1;var z=typeof T;return(z=="number"?Sr(N)&&_n(T,N.length):z=="string"&&T in N)?Kr(N[T],g):!1}function Ia(g,T){if(It(g))return!1;var N=typeof g;return N=="number"||N=="symbol"||N=="boolean"||g==null||Rr(g)?!0:Ps.test(g)||!Ln.test(g)||T!=null&&g in Gt(T)}function $h(g){var T=typeof g;return T=="string"||T=="number"||T=="symbol"||T=="boolean"?g!=="__proto__":g===null}function Ca(g){var T=So(g),N=Ae[T];if(typeof N!="function"||!(T in Mt.prototype))return!1;if(g===N)return!0;var z=Pa(N);return!!z&&g===z[0]}function Uh(g){return!!Ka&&Ka in g}var Hh=Zs?yn:Ga;function hs(g){var T=g&&g.constructor,N=typeof T=="function"&&T.prototype||Ei;return g===N}function Kl(g){return g===g&&!Kt(g)}function Yl(g,T){return function(N){return N==null?!1:N[g]===T&&(T!==a||g in Gt(N))}}function jh(g){var T=ko(g,function(z){return N.size===y&&N.clear(),z}),N=T.cache;return T}function Wh(g,T){var N=g[1],z=T[1],ee=N|z,Re=ee<($|V|U),Oe=z==U&&N==O||z==U&&N==G&&g[7].length<=T[8]||z==(U|G)&&T[7].length<=T[8]&&N==O;if(!(Re||Oe))return g;z&$&&(g[2]=T[2],ee|=N&$?0:B);var Ve=T[3];if(Ve){var $e=g[3];g[3]=$e?kl($e,Ve,T[4]):Ve,g[4]=$e?xn(g[3],E):T[4]}return Ve=T[5],Ve&&($e=g[5],g[5]=$e?Ol($e,Ve,T[6]):Ve,g[6]=$e?xn(g[5],E):T[6]),Ve=T[7],Ve&&(g[7]=Ve),z&U&&(g[8]=g[8]==null?T[8]:_r(g[8],T[8])),g[9]==null&&(g[9]=T[9]),g[0]=T[0],g[1]=ee,g}function Gh(g){var T=[];if(g!=null)for(var N in Gt(g))T.push(N);return T}function qh(g){return ro.call(g)}function Ql(g,T,N){return T=ar(T===a?g.length-1:T,0),function(){for(var z=arguments,ee=-1,Re=ar(z.length-T,0),Oe=We(Re);++ee<Re;)Oe[ee]=z[T+ee];ee=-1;for(var Ve=We(T+1);++ee<T;)Ve[ee]=z[ee];return Ve[T]=N(Oe),mr(g,this,Ve)}}function Jl(g,T){return T.length<2?g:ei(g,Ur(T,0,-1))}function zh(g,T){for(var N=g.length,z=_r(T.length,N),ee=Pr(g);z--;){var Re=T[z];g[z]=_n(Re,N)?ee[Re]:a}return g}function Ra(g,T){if(!(T==="constructor"&&typeof g[T]=="function")&&T!="__proto__")return g[T]}var Xl=ec(wl),ds=lu||function(g,T){return Qt.setTimeout(g,T)},xa=ec(gh);function Zl(g,T,N){var z=T+"";return xa(g,Fh(z,Kh(Nh(z),N)))}function ec(g){var T=0,N=0;return function(){var z=du(),ee=Z-(z-N);if(N=z,ee>0){if(++T>=J)return arguments[0]}else T=0;return g.apply(a,arguments)}}function Io(g,T){var N=-1,z=g.length,ee=z-1;for(T=T===a?z:T;++N<T;){var Re=da(N,ee),Oe=g[Re];g[Re]=g[N],g[N]=Oe}return g.length=T,g}var tc=jh(function(g){var T=[];return g.charCodeAt(0)===46&&T.push(""),g.replace(hr,function(N,z,ee,Re){T.push(ee?Re.replace(Ss,"$1"):z||N)}),T});function rn(g){if(typeof g=="string"||Rr(g))return g;var T=g+"";return T=="0"&&1/g==-1/0?"-0":T}function ri(g){if(g!=null){try{return eo.call(g)}catch{}try{return g+""}catch{}}return""}function Kh(g,T){return vr(pt,function(N){var z="_."+N[0];T&N[1]&&!zn(g,z)&&g.push(z)}),g.sort()}function rc(g){if(g instanceof Mt)return g.clone();var T=new Br(g.__wrapped__,g.__chain__);return T.__actions__=Pr(g.__actions__),T.__index__=g.__index__,T.__values__=g.__values__,T}function Yh(g,T,N){(N?wr(g,T,N):T===a)?T=1:T=ar(Rt(T),0);var z=g==null?0:g.length;if(!z||T<1)return[];for(var ee=0,Re=0,Oe=We(lo(z/T));ee<z;)Oe[Re++]=Ur(g,ee,ee+=T);return Oe}function Qh(g){for(var T=-1,N=g==null?0:g.length,z=0,ee=[];++T<N;){var Re=g[T];Re&&(ee[z++]=Re)}return ee}function Jh(){var g=arguments.length;if(!g)return[];for(var T=We(g-1),N=arguments[0],z=g;z--;)T[z-1]=arguments[z];return Wr(It(N)?Pr(N):[N],fr(T,1))}var Xh=kt(function(g,T){return Zt(g)?ss(g,fr(T,1,Zt,!0)):[]}),Zh=kt(function(g,T){var N=Hr(T);return Zt(N)&&(N=a),Zt(g)?ss(g,fr(T,1,Zt,!0),Et(N,2)):[]}),ed=kt(function(g,T){var N=Hr(T);return Zt(N)&&(N=a),Zt(g)?ss(g,fr(T,1,Zt,!0),a,N):[]});function td(g,T,N){var z=g==null?0:g.length;return z?(T=N||T===a?1:Rt(T),Ur(g,T<0?0:T,z)):[]}function rd(g,T,N){var z=g==null?0:g.length;return z?(T=N||T===a?1:Rt(T),T=z-T,Ur(g,0,T<0?0:T)):[]}
vendor: 20,756 bytes, lines 4477-4494
4477function nd(g,T){return g&&g.length?vo(g,Et(T,3),!0,!0):[]}function id(g,T){return g&&g.length?vo(g,Et(T,3),!0):[]}function sd(g,T,N,z){var ee=g==null?0:g.length;return ee?(N&&typeof N!="number"&&wr(g,T,N)&&(N=0,z=ee),Ju(g,T,N,z)):[]}function nc(g,T,N){var z=g==null?0:g.length;if(!z)return-1;var ee=N==null?0:Rt(N);return ee<0&&(ee=ar(z+ee,0)),Kn(g,Et(T,3),ee)}function ic(g,T,N){var z=g==null?0:g.length;if(!z)return-1;var ee=z-1;return N!==a&&(ee=Rt(N),ee=N<0?ar(z+ee,0):_r(ee,z-1)),Kn(g,Et(T,3),ee,!0)}function sc(g){var T=g==null?0:g.length;return T?fr(g,1):[]}function od(g){var T=g==null?0:g.length;return T?fr(g,xe):[]}function ad(g,T){var N=g==null?0:g.length;return N?(T=T===a?1:Rt(T),fr(g,T)):[]}function ld(g){for(var T=-1,N=g==null?0:g.length,z={};++T<N;){var ee=g[T];z[ee[0]]=ee[1]}return z}function oc(g){return g&&g.length?g[0]:a}function cd(g,T,N){var z=g==null?0:g.length;if(!z)return-1;var ee=N==null?0:Rt(N);return ee<0&&(ee=ar(z+ee,0)),hn(g,T,ee)}function ud(g){var T=g==null?0:g.length;return T?Ur(g,0,-1):[]}var hd=kt(function(g){var T=Wt(g,_a);return T.length&&T[0]===g[0]?aa(T):[]}),dd=kt(function(g){var T=Hr(g),N=Wt(g,_a);return T===Hr(N)?T=a:N.pop(),N.length&&N[0]===g[0]?aa(N,Et(T,2)):[]}),fd=kt(function(g){var T=Hr(g),N=Wt(g,_a);return T=typeof T=="function"?T:a,T&&N.pop(),N.length&&N[0]===g[0]?aa(N,a,T):[]});function pd(g,T){return g==null?"":uu.call(g,T)}function Hr(g){var T=g==null?0:g.length;return T?g[T-1]:a}function md(g,T,N){var z=g==null?0:g.length;if(!z)return-1;var ee=z;return N!==a&&(ee=Rt(N),ee=ee<0?ar(z+ee,0):_r(ee,z-1)),T===T?Kc(g,T,ee):Kn(g,I,ee,!0)}function gd(g,T){return g&&g.length?_l(g,Rt(T)):a}var _d=kt(ac);function ac(g,T){return g&&g.length&&T&&T.length?ha(g,T):g}function yd(g,T,N){return g&&g.length&&T&&T.length?ha(g,T,Et(N,2)):g}function vd(g,T,N){return g&&g.length&&T&&T.length?ha(g,T,a,N):g}var bd=gn(function(g,T){var N=g==null?0:g.length,z=na(g,T);return bl(g,Wt(T,function(ee){return _n(ee,N)?+ee:ee}).sort(xl)),z});function wd(g,T){var N=[];if(!(g&&g.length))return N;var z=-1,ee=[],Re=g.length;for(T=Et(T,3);++z<Re;){var Oe=g[z];T(Oe,z,g)&&(N.push(Oe),ee.push(z))}return bl(g,ee),N}function ka(g){return g==null?g:pu.call(g)}function Ed(g,T,N){var z=g==null?0:g.length;return z?(N&&typeof N!="number"&&wr(g,T,N)?(T=0,N=z):(T=T==null?0:Rt(T),N=N===a?z:Rt(N)),Ur(g,T,N)):[]}function Td(g,T){return yo(g,T)}function Pd(g,T,N){return pa(g,T,Et(N,2))}function Sd(g,T){var N=g==null?0:g.length;if(N){var z=yo(g,T);if(z<N&&Kr(g[z],T))return z}return-1}function Ad(g,T){return yo(g,T,!0)}function Id(g,T,N){return pa(g,T,Et(N,2),!0)}function Cd(g,T){var N=g==null?0:g.length;if(N){var z=yo(g,T,!0)-1;if(Kr(g[z],T))return z}return-1}function Rd(g){return g&&g.length?El(g):[]}function xd(g,T){return g&&g.length?El(g,Et(T,2)):[]}function kd(g){var T=g==null?0:g.length;return T?Ur(g,1,T):[]}function Od(g,T,N){return g&&g.length?(T=N||T===a?1:Rt(T),Ur(g,0,T<0?0:T)):[]}function Md(g,T,N){var z=g==null?0:g.length;return z?(T=N||T===a?1:Rt(T),T=z-T,Ur(g,T<0?0:T,z)):[]}function Dd(g,T){return g&&g.length?vo(g,Et(T,3),!1,!0):[]}function Nd(g,T){return g&&g.length?vo(g,Et(T,3)):[]}var Vd=kt(function(g){return Mn(fr(g,1,Zt,!0))}),Ld=kt(function(g){var T=Hr(g);return Zt(T)&&(T=a),Mn(fr(g,1,Zt,!0),Et(T,2))}),Fd=kt(function(g){var T=Hr(g);return T=typeof T=="function"?T:a,Mn(fr(g,1,Zt,!0),a,T)});function Bd(g){return g&&g.length?Mn(g):[]}function $d(g,T){return g&&g.length?Mn(g,Et(T,2)):[]}function Ud(g,T){return T=typeof T=="function"?T:a,g&&g.length?Mn(g,a,T):[]}function Oa(g){if(!(g&&g.length))return[];var T=0;return g=Vr(g,function(N){if(Zt(N))return T=ar(N.length,T),!0}),Ft(T,function(N){return Wt(g,X(N))})}function lc(g,T){if(!(g&&g.length))return[];var N=Oa(g);return T==null?N:Wt(N,function(z){return mr(T,a,z)})}var Hd=kt(function(g,T){return Zt(g)?ss(g,T):[]}),jd=kt(function(g){return ga(Vr(g,Zt))}),Wd=kt(function(g){var T=Hr(g);return Zt(T)&&(T=a),ga(Vr(g,Zt),Et(T,2))}),Gd=kt(function(g){var T=Hr(g);return T=typeof T=="function"?T:a,ga(Vr(g,Zt),a,T)}),qd=kt(Oa);function zd(g,T){return Al(g||[],T||[],is)}function Kd(g,T){return Al(g||[],T||[],cs)}var Yd=kt(function(g){var T=g.length,N=T>1?g[T-1]:a;return N=typeof N=="function"?(g.pop(),N):a,lc(g,N)});function cc(g){var T=Ae(g);return T.__chain__=!0,T}function Qd(g,T){return T(g),g}function Co(g,T){return T(g)}var Jd=gn(function(g){var T=g.length,N=T?g[0]:0,z=this.__wrapped__,ee=function(Re){return na(Re,g)};return T>1||this.__actions__.length||!(z instanceof Mt)||!_n(N)?this.thru(ee):(z=z.slice(N,+N+(T?1:0)),z.__actions__.push({func:Co,args:[ee],thisArg:a}),new Br(z,this.__chain__).thru(function(Re){return T&&!Re.length&&Re.push(a),Re}))});function Xd(){return cc(this)}function Zd(){return new Br(this.value(),this.__chain__)}function ef(){this.__values__===a&&(this.__values__=Tc(this.value()));var g=this.__index__>=this.__values__.length,T=g?a:this.__values__[this.__index__++];return{done:g,value:T}}function tf(){return this}function rf(g){for(var T,N=this;N instanceof fo;){var z=rc(N);z.__index__=0,z.__values__=a,T?ee.__wrapped__=z:T=z;var ee=z;N=N.__wrapped__}return ee.__wrapped__=g,T}function nf(){var g=this.__wrapped__;if(g instanceof Mt){var T=g;return this.__actions__.length&&(T=new Mt(this)),T=T.reverse(),T.__actions__.push({func:Co,args:[ka],thisArg:a}),new Br(T,this.__chain__)}return this.thru(ka)}function sf(){return Sl(this.__wrapped__,this.__actions__)}var of=bo(function(g,T,N){Ht.call(g,N)?++g[N]:pn(g,N,1)});function af(g,T,N){var z=It(g)?gi:Qu;return N&&wr(g,T,N)&&(T=a),z(g,Et(T,3))}function lf(g,T){var N=It(g)?Vr:ll;return N(g,Et(T,3))}var cf=Vl(nc),uf=Vl(ic);function hf(g,T){return fr(Ro(g,T),1)}function df(g,T){return fr(Ro(g,T),xe)}function ff(g,T,N){return N=N===a?1:Rt(N),fr(Ro(g,T),N)}function uc(g,T){var N=It(g)?vr:On;return N(g,Et(T,3))}function hc(g,T){var N=It(g)?zs:al;return N(g,Et(T,3))}var pf=bo(function(g,T,N){Ht.call(g,N)?g[N].push(T):pn(g,N,[T])});function mf(g,T,N,z){g=Sr(g)?g:xi(g),N=N&&!z?Rt(N):0;var ee=g.length;return N<0&&(N=ar(ee+N,0)),Do(g)?N<=ee&&g.indexOf(T,N)>-1:!!ee&&hn(g,T,N)>-1}var gf=kt(function(g,T,N){var z=-1,ee=typeof T=="function",Re=Sr(g)?We(g.length):[];return On(g,function(Oe){Re[++z]=ee?mr(T,Oe,N):os(Oe,T,N)}),Re}),_f=bo(function(g,T,N){pn(g,N,T)});function Ro(g,T){var N=It(g)?Wt:pl;return N(g,Et(T,3))}function yf(g,T,N,z){return g==null?[]:(It(T)||(T=T==null?[]:[T]),N=z?a:N,It(N)||(N=N==null?[]:[N]),yl(g,T,N))}var vf=bo(function(g,T,N){g[N?0:1].push(T)},function(){return[[],[]]});function bf(g,T,N){var z=It(g)?Gr:Ue,ee=arguments.length<3;return z(g,Et(T,4),N,ee,On)}function wf(g,T,N){var z=It(g)?Ks:Ue,ee=arguments.length<3;return z(g,Et(T,4),N,ee,al)}function Ef(g,T){var N=It(g)?Vr:ll;return N(g,Oo(Et(T,3)))}function Tf(g){var T=It(g)?nl:ph;return T(g)}function Pf(g,T,N){(N?wr(g,T,N):T===a)?T=1:T=Rt(T);var z=It(g)?Gu:mh;return z(g,T)}function Sf(g){var T=It(g)?qu:_h;return T(g)}function Af(g){if(g==null)return 0;if(Sr(g))return Do(g)?bi(g):g.length;var T=yr(g);return T==Se||T==Qe?g.size:ca(g).length}function If(g,T,N){var z=It(g)?_i:yh;return N&&wr(g,T,N)&&(T=a),z(g,Et(T,3))}var Cf=kt(function(g,T){if(g==null)return[];var N=T.length;return N>1&&wr(g,T[0],T[1])?T=[]:N>2&&wr(T[0],T[1],T[2])&&(T=[T[0]]),yl(g,fr(T,1),[])}),xo=au||function(){return Qt.Date.now()};function Rf(g,T){if(typeof T!="function")throw new Fr(d);return g=Rt(g),function(){if(--g<1)return T.apply(this,arguments)}}function dc(g,T,N){return T=N?a:T,T=g&&T==null?g.length:T,mn(g,U,a,a,a,a,T)}function fc(g,T){var N;if(typeof T!="function")throw new Fr(d);return g=Rt(g),function(){return--g>0&&(N=T.apply(this,arguments)),g<=1&&(T=a),N}}var Ma=kt(function(g,T,N){var z=$;if(N.length){var ee=xn(N,Ci(Ma));z|=F}return mn(g,z,T,N,ee)}),pc=kt(function(g,T,N){var z=$|V;if(N.length){var ee=xn(N,Ci(pc));z|=F}return mn(T,z,g,N,ee)});function mc(g,T,N){T=N?a:T;var z=mn(g,O,a,a,a,a,a,T);return z.placeholder=mc.placeholder,z}function gc(g,T,N){T=N?a:T;var z=mn(g,L,a,a,a,a,a,T);return z.placeholder=gc.placeholder,z}function _c(g,T,N){var z,ee,Re,Oe,Ve,$e,Je=0,Xe=!1,rt=!1,ft=!0;if(typeof g!="function")throw new Fr(d);T=jr(T)||0,Kt(N)&&(Xe=!!N.leading,rt="maxWait"in N,Re=rt?ar(jr(N.maxWait)||0,T):Re,ft="trailing"in N?!!N.trailing:ft);function wt(er){var Yr=z,bn=ee;return z=ee=a,Je=er,Oe=g.apply(bn,Yr),Oe}function Tt(er){return Je=er,Ve=ds(Ot,T),Xe?wt(er):Oe}function xt(er){var Yr=er-$e,bn=er-Je,Vc=T-Yr;return rt?_r(Vc,Re-bn):Vc}function Pt(er){var Yr=er-$e,bn=er-Je;return $e===a||Yr>=T||Yr<0||rt&&bn>=Re}function Ot(){var er=xo();if(Pt(er))return Nt(er);Ve=ds(Ot,xt(er))}function Nt(er){return Ve=a,ft&&z?wt(er):(z=ee=a,Oe)}function xr(){Ve!==a&&Il(Ve),Je=0,z=$e=ee=Ve=a}function Er(){return Ve===a?Oe:Nt(xo())}function kr(){var er=xo(),Yr=Pt(er);if(z=arguments,ee=this,$e=er,Yr){if(Ve===a)return Tt($e);if(rt)return Il(Ve),Ve=ds(Ot,T),wt($e)}return Ve===a&&(Ve=ds(Ot,T)),Oe}return kr.cancel=xr,kr.flush=Er,kr}var xf=kt(function(g,T){return ol(g,1,T)}),kf=kt(function(g,T,N){return ol(g,jr(T)||0,N)});function Of(g){return mn(g,Y)}function ko(g,T){if(typeof g!="function"||T!=null&&typeof T!="function")throw new Fr(d);var N=function(){var z=arguments,ee=T?T.apply(this,z):z[0],Re=N.cache;if(Re.has(ee))return Re.get(ee);var Oe=g.apply(this,z);return N.cache=Re.set(ee,Oe)||Re,Oe};return N.cache=new(ko.Cache||fn),N}ko.Cache=fn;function Oo(g){if(typeof g!="function")throw new Fr(d);return function(){var T=arguments;switch(T.length){case 0:return!g.call(this);case 1:return!g.call(this,T[0]);case 2:return!g.call(this,T[0],T[1]);case 3:return!g.call(this,T[0],T[1],T[2])}return!g.apply(this,T)}}function Mf(g){return fc(2,g)}var Df=vh(function(g,T){T=T.length==1&&It(T[0])?Wt(T[0],$t(Et())):Wt(fr(T,1),$t(Et()));var N=T.length;return kt(function(z){for(var ee=-1,Re=_r(z.length,N);++ee<Re;)z[ee]=T[ee].call(this,z[ee]);return mr(g,this,z)})}),Da=kt(function(g,T){var N=xn(T,Ci(Da));return mn(g,F,a,T,N)}),yc=kt(function(g,T){var N=xn(T,Ci(yc));return mn(g,j,a,T,N)}),Nf=gn(function(g,T){return mn(g,G,a,a,a,T)});function Vf(g,T){if(typeof g!="function")throw new Fr(d);return T=T===a?T:Rt(T),kt(g,T)}function Lf(g,T){if(typeof g!="function")throw new Fr(d);return T=T==null?0:ar(Rt(T),0),kt(function(N){var z=N[T],ee=Nn(N,0,T);return z&&Wr(ee,z),mr(g,this,ee)})}function Ff(g,T,N){var z=!0,ee=!0;if(typeof g!="function")throw new Fr(d);return Kt(N)&&(z="leading"in N?!!N.leading:z,ee="trailing"in N?!!N.trailing:ee),_c(g,T,{leading:z,maxWait:T,trailing:ee})}function Bf(g){return dc(g,1)}function $f(g,T){return Da(ya(T),g)}function Uf(){if(!arguments.length)return[];var g=arguments[0];return It(g)?g:[g]}function Hf(g){return $r(g,R)}function jf(g,T){return T=typeof T=="function"?T:a,$r(g,R,T)}function Wf(g){return $r(g,A|R)}function Gf(g,T){return T=typeof T=="function"?T:a,$r(g,A|R,T)}function qf(g,T){return T==null||sl(g,T,ur(T))}function Kr(g,T){return g===T||g!==g&&T!==T}var zf=Po(oa),Kf=Po(function(g,T){return g>=T}),ni=hl(function(){return arguments}())?hl:function(g){return Jt(g)&&Ht.call(g,"callee")&&!Ja.call(g,"callee")},It=We.isArray,Yf=Qi?$t(Qi):rh;function Sr(g){return g!=null&&Mo(g.length)&&!yn(g)}function Zt(g){return Jt(g)&&Sr(g)}function Qf(g){return g===!0||g===!1||Jt(g)&&br(g)==it}var Vn=cu||Ga,Jf=mi?$t(mi):nh;function Xf(g){return Jt(g)&&g.nodeType===1&&!fs(g)}function Zf(g){if(g==null)return!0;if(Sr(g)&&(It(g)||typeof g=="string"||typeof g.splice=="function"||Vn(g)||Ri(g)||ni(g)))return!g.length;var T=yr(g);if(T==Se||T==Qe)return!g.size;if(hs(g))return!ca(g).length;for(var N in g)if(Ht.call(g,N))return!1;return!0}function ep(g,T){return ls(g,T)}function tp(g,T,N){N=typeof N=="function"?N:a;var z=N?N(g,T):a;return z===a?ls(g,T,a,N):!!z}function Na(g){if(!Jt(g))return!1;var T=br(g);return T==vt||T==lt||typeof g.message=="string"&&typeof g.name=="string"&&!fs(g)}function rp(g){return typeof g=="number"&&Za(g)}function yn(g){if(!Kt(g))return!1;var T=br(g);return T==ze||T==Pe||T==je||T==ot}function vc(g){return typeof g=="number"&&g==Rt(g)}function Mo(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=Q}function Kt(g){var T=typeof g;return g!=null&&(T=="object"||T=="function")}function Jt(g){return g!=null&&typeof g=="object"}var bc=Wn?$t(Wn):sh;function np(g,T){return g===T||la(g,T,Sa(T))}function ip(g,T,N){return N=typeof N=="function"?N:a,la(g,T,Sa(T),N)}function sp(g){return wc(g)&&g!=+g}function op(g){if(Hh(g))throw new St(u);return dl(g)}function ap(g){return g===null}function lp(g){return g==null}function wc(g){return typeof g=="number"||Jt(g)&&br(g)==Le}function fs(g){if(!Jt(g)||br(g)!=He)return!1;var T=so(g);if(T===null)return!0;var N=Ht.call(T,"constructor")&&T.constructor;return typeof N=="function"&&N instanceof N&&eo.call(N)==nu}var Va=Ji?$t(Ji):oh;function cp(g){return vc(g)&&g>=-9007199254740991&&g<=Q}var Ec=Gn?$t(Gn):ah;function Do(g){return typeof g=="string"||!It(g)&&Jt(g)&&br(g)==Ze}function Rr(g){return typeof g=="symbol"||Jt(g)&&br(g)==mt}var Ri=qs?$t(qs):lh;function hp(g){return g===a}function dp(g){return Jt(g)&&yr(g)==ht}function fp(g){return Jt(g)&&br(g)==dt}var pp=Po(ua),mp=Po(function(g,T){return g<=T});function Tc(g){if(!g)return[];if(Sr(g))return Do(g)?qr(g):Pr(g);if(Zi&&g[Zi])return Gc(g[Zi]());var T=yr(g),N=T==Se?Jo:T==Qe?Js:xi;return N(g)}function vn(g){if(!g)return g===0?g:0;if(g=jr(g),g===xe||g===-1/0){var T=g<0?-1:1;return T*ie}return g===g?g:0}function Rt(g){var T=vn(g),N=T%1;return T===T?N?T-N:T:0}function Pc(g){return g?Zn(Rt(g),0,Ne):0}function jr(g){if(typeof g=="number")return g;if(Rr(g))return Fe;if(Kt(g)){var T=typeof g.valueOf=="function"?g.valueOf():g;g=Kt(T)?T+"":T}if(typeof g!="string")return g===0?g:+g;g=Dt(g);var N=As.test(g);return N||Vi.test(g)?Ws(g.slice(2),N?2:8):Jr.test(g)?Fe:+g}function Sc(g){return tn(g,Ar(g))}function gp(g){return g?Zn(Rt(g),-9007199254740991,Q):g===0?g:0}function Ut(g){return g==null?"":Cr(g)}var _p=Ai(function(g,T){if(hs(T)||Sr(T)){tn(T,ur(T),g);return}for(var N in T)Ht.call(T,N)&&is(g,N,T[N])}),Ac=Ai(function(g,T){tn(T,Ar(T),g)}),No=Ai(function(g,T,N,z){tn(T,Ar(T),g,z)}),yp=Ai(function(g,T,N,z){tn(T,ur(T),g,z)}),vp=gn(na);function bp(g,T){var N=Si(g);return T==null?N:il(N,T)}var wp=kt(function(g,T){g=Gt(g);var N=-1,z=T.length,ee=z>2?T[2]:a;for(ee&&wr(T[0],T[1],ee)&&(z=1);++N<z;)for(var Re=T[N],Oe=Ar(Re),Ve=-1,$e=Oe.length;++Ve<$e;){var Je=Oe[Ve],Xe=g[Je];(Xe===a||Kr(Xe,Ei[Je])&&!Ht.call(g,Je))&&(g[Je]=Re[Je])}return g}),Ep=kt(function(g){return g.push(a,jl),mr(Ic,a,g)});function Tp(g,T){return gr(g,Et(T,3),en)}function Pp(g,T){return gr(g,Et(T,3),sa)}function Sp(g,T){return g==null?g:ia(g,Et(T,3),Ar)}function Ap(g,T){return g==null?g:cl(g,Et(T,3),Ar)}function Ip(g,T){return g&&en(g,Et(T,3))}function Cp(g,T){return g&&sa(g,Et(T,3))}function Rp(g){return g==null?[]:go(g,ur(g))}function xp(g){return g==null?[]:go(g,Ar(g))}function La(g,T,N){var z=g==null?a:ei(g,T);return z===a?N:z}function kp(g,T){return g!=null&&ql(g,T,Xu)}function Fa(g,T){return g!=null&&ql(g,T,Zu)}var Op=Fl(function(g,T,N){T!=null&&typeof T.toString!="function"&&(T=ro.call(T)),g[T]=N},$a(Ir)),Mp=Fl(function(g,T,N){T!=null&&typeof T.toString!="function"&&(T=ro.call(T)),Ht.call(g,T)?g[T].push(N):g[T]=[N]},Et),Dp=kt(os);function ur(g){return Sr(g)?rl(g):ca(g)}function Ar(g){return Sr(g)?rl(g,!0):ch(g)}function Np(g,T){var N={};return T=Et(T,3),en(g,function(z,ee,Re){pn(N,T(z,ee,Re),z)}),N}function Vp(g,T){var N={};return T=Et(T,3),en(g,function(z,ee,Re){pn(N,ee,T(z,ee,Re))}),N}var Lp=Ai(function(g,T,N){_o(g,T,N)}),Ic=Ai(function(g,T,N,z){_o(g,T,N,z)}),Fp=gn(function(g,T){var N={};if(g==null)return N;var z=!1;T=Wt(T,function(Re){return Re=Dn(Re,g),z||(z=Re.length>1),Re}),tn(g,Ta(g),N),z&&(N=$r(N,A|P|R,xh));for(var ee=T.length;ee--;)ma(N,T[ee]);return N});function Bp(g,T){return Cc(g,Oo(Et(T)))}var $p=gn(function(g,T){return g==null?{}:hh(g,T)});function Cc(g,T){if(g==null)return{};var N=Wt(Ta(g),function(z){return[z]});return T=Et(T),vl(g,N,function(z,ee){return T(z,ee[0])})}function Up(g,T,N){T=Dn(T,g);var z=-1,ee=T.length;for(ee||(ee=1,g=a);++z<ee;){var Re=g==null?a:g[rn(T[z])];Re===a&&(z=ee,Re=N),g=yn(Re)?Re.call(g):Re}return g}function Hp(g,T,N){return g==null?g:cs(g,T,N)}function jp(g,T,N,z){return z=typeof z=="function"?z:a,g==null?g:cs(g,T,N,z)}var Rc=Ul(ur),xc=Ul(Ar);function Wp(g,T,N){var z=It(g),ee=z||Vn(g)||Ri(g);if(T=Et(T,4),N==null){var Re=g&&g.constructor;ee?N=z?new Re:[]:Kt(g)?N=yn(Re)?Si(so(g)):{}:N={}}return(ee?vr:en)(g,function(Oe,Ve,$e){return T(N,Oe,Ve,$e)}),N}function Gp(g,T){return g==null?!0:ma(g,T)}function qp(g,T,N){return g==null?g:Pl(g,T,ya(N))}function zp(g,T,N,z){return z=typeof z=="function"?z:a,g==null?g:Pl(g,T,ya(N),z)}function xi(g){return g==null?[]:rr(g,ur(g))}function Kp(g){return g==null?[]:rr(g,Ar(g))}function Yp(g,T,N){return N===a&&(N=T,T=a),N!==a&&(N=jr(N),N=N===N?N:0),T!==a&&(T=jr(T),T=T===T?T:0),Zn(jr(g),T,N)}function Qp(g,T,N){return T=vn(T),N===a?(N=T,T=0):N=vn(N),g=jr(g),eh(g,T,N)}function Jp(g,T,N){if(N&&typeof N!="boolean"&&wr(g,T,N)&&(T=N=a),N===a&&(typeof T=="boolean"?(N=T,T=a):typeof g=="boolean"&&(N=g,g=a)),g===a&&T===a?(g=0,T=1):(g=vn(g),T===a?(T=g,g=0):T=vn(T)),g>T){var z=g;g=T,T=z}if(N||g%1||T%1){var ee=el();return _r(g+ee*(T-g+Qo("1e-"+((ee+"").length-1))),T)}return da(g,T)}var Xp=Ii(function(g,T,N){return T=T.toLowerCase(),g+(N?kc(T):T)});function kc(g){return Ba(Ut(g).toLowerCase())}function Oc(g){return g=Ut(g),g&&g.replace(Cs,$c).replace(qo,"")}function Zp(g,T,N){g=Ut(g),T=Cr(T);var z=g.length;N=N===a?z:Zn(Rt(N),0,z);var ee=N;return N-=T.length,N>=0&&g.slice(N,ee)==T}function em(g){return g=Ut(g),g&&sn.test(g)?g.replace(oi,Uc):g}function tm(g){return g=Ut(g),g&&Fn.test(g)?g.replace(li,"\\$&"):g}var rm=Ii(function(g,T,N){return g+(N?"-":"")+T.toLowerCase()}),nm=Ii(function(g,T,N){return g+(N?" ":"")+T.toLowerCase()}),im=Nl("toLowerCase");function sm(g,T,N){g=Ut(g),T=Rt(T);var z=T?bi(g):0;if(!T||z>=T)return g;var ee=(T-z)/2;return To(co(ee),N)+g+To(lo(ee),N)}function om(g,T,N){g=Ut(g),T=Rt(T);var z=T?bi(g):0;return T&&z<T?g+To(T-z,N):g}function am(g,T,N){g=Ut(g),T=Rt(T);var z=T?bi(g):0;return T&&z<T?To(T-z,N)+g:g}function lm(g,T,N){return N||T==null?T=0:T&&(T=+T),fu(Ut(g).replace(an,""),T||0)}function cm(g,T,N){return(N?wr(g,T,N):T===a)?T=1:T=Rt(T),fa(Ut(g),T)}function um(){var g=arguments,T=Ut(g[0]);return g.length<3?T:T.replace(g[1],g[2])}var hm=Ii(function(g,T,N){return g+(N?"_":"")+T.toLowerCase()});function dm(g,T,N){return N&&typeof N!="number"&&wr(g,T,N)&&(T=N=a),N=N===a?Ne:N>>>0,N?(g=Ut(g),g&&(typeof T=="string"||T!=null&&!Va(T))&&(T=Cr(T),!T&&vi(g))?Nn(qr(g),0,N):g.split(T,N)):[]}var fm=Ii(function(g,T,N){return g+(N?" ":"")+Ba(T)});function pm(g,T,N){return g=Ut(g),N=N==null?0:Zn(Rt(N),0,g.length),T=Cr(T),g.slice(N,N+T.length)==T}function mm(g,T,N){var z=Ae.templateSettings;N&&wr(g,T,N)&&(T=a),g=Ut(g),T=No({},T,z,Hl);var ee=No({},T.imports,z.imports,Hl),Re=ur(ee),Oe=rr(ee,Re),Ve,$e,Je=0,Xe=T.interpolate||$n,rt="__p += '",ft=Xo((T.escape||$n).source+"|"+Xe.source+"|"+(Xe===Di?Ni:$n).source+"|"+(T.evaluate||$n).source+"|$","g"),wt="//# sourceURL="+(Ht.call(T,"sourceURL")?(T.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Hs+"]")+`
4478`;g.replace(ft,function(Pt,Ot,Nt,xr,Er,kr){return Nt||(Nt=xr),rt+=g.slice(Je,kr).replace(Uo,Hc),Ot&&(Ve=!0,rt+=`' +
4479__e(`+Ot+`) +
4480'`),Er&&($e=!0,rt+=`';
4481`+Er+`;
4482__p += '`),Nt&&(rt+=`' +
4483((__t = (`+Nt+`)) == null ? '' : __t) +
4484'`),Je=kr+Pt.length,Pt}),rt+=`';
4485`;var Tt=Ht.call(T,"variable")&&T.variable;if(!Tt)rt=`with (obj) {
4486`+rt+`
4487}
4488`;else if(ci.test(Tt))throw new St(f);rt=($e?rt.replace(wn,""):rt).replace(ws,"$1").replace(Es,"$1;"),rt="function("+(Tt||"obj")+`) {
4489`+(Tt?"":`obj || (obj = {});
4490`)+"var __t, __p = ''"+(Ve?", __e = _.escape":"")+($e?`, __j = Array.prototype.join;
4491function print() { __p += __j.call(arguments, '') }
4492`:`;
4493`)+rt+`return __p
4494}`;var xt=Dc(function(){return Bt(Re,wt+"return "+rt).apply(a,Oe)});if(xt.source=rt,Na(xt))throw xt;return xt}function gm(g){return Ut(g).toLowerCase()}function _m(g){return Ut(g).toUpperCase()}function ym(g,T,N){if(g=Ut(g),g&&(N||T===a))return Dt(g);if(!g||!(T=Cr(T)))return g;var z=qr(g),ee=qr(T),Re=Tr(z,ee),Oe=Yn(z,ee)+1;return Nn(z,Re,Oe).join("")}function vm(g,T,N){if(g=Ut(g),g&&(N||T===a))return g.slice(0,za(g)+1);if(!g||!(T=Cr(T)))return g;var z=qr(g),ee=Yn(z,qr(T))+1;return Nn(z,0,ee).join("")}function bm(g,T,N){if(g=Ut(g),g&&(N||T===a))return g.replace(an,"");if(!g||!(T=Cr(T)))return g;var z=qr(g),ee=Tr(z,qr(T));return Nn(z,ee).join("")}function wm(g,T){var N=te,z=ve;if(Kt(T)){var ee="separator"in T?T.separator:ee;N="length"in T?Rt(T.length):N,z="omission"in T?Cr(T.omission):z}g=Ut(g);var Re=g.length;if(vi(g)){var Oe=qr(g);Re=Oe.length}if(N>=Re)return g;var Ve=N-bi(z);if(Ve<1)return z;var $e=Oe?Nn(Oe,0,Ve).join(""):g.slice(0,Ve);
vendor: 5,027 bytes, line 4494
4494if(ee===a)return $e+z;if(Oe&&(Ve+=$e.length-Ve),Va(ee)){if(g.slice(Ve).search(ee)){var Je,Xe=$e;for(ee.global||(ee=Xo(ee.source,Ut(Bn.exec(ee))+"g")),ee.lastIndex=0;Je=ee.exec(Xe);)var rt=Je.index;$e=$e.slice(0,rt===a?Ve:rt)}}else if(g.indexOf(Cr(ee),Ve)!=Ve){var ft=$e.lastIndexOf(ee);ft>-1&&($e=$e.slice(0,ft))}return $e+z}function Em(g){return g=Ut(g),g&&Mi.test(g)?g.replace(En,Yc):g}var Tm=Ii(function(g,T,N){return g+(N?" ":"")+T.toUpperCase()}),Ba=Nl("toUpperCase");function Mc(g,T,N){return g=Ut(g),T=N?a:T,T===a?Wc(g)?Xc(g):yi(g):g.match(T)||[]}var Dc=kt(function(g,T){try{return mr(g,a,T)}catch(N){return Na(N)?N:new St(N)}}),Pm=gn(function(g,T){return vr(T,function(N){N=rn(N),pn(g,N,Ma(g[N],g))}),g});function Sm(g){var T=g==null?0:g.length,N=Et();return g=T?Wt(g,function(z){if(typeof z[1]!="function")throw new Fr(d);return[N(z[0]),z[1]]}):[],kt(function(z){for(var ee=-1;++ee<T;){var Re=g[ee];if(mr(Re[0],this,z))return mr(Re[1],this,z)}})}function Am(g){return Yu($r(g,A))}function $a(g){return function(){return g}}function Im(g,T){return g==null||g!==g?T:g}var Cm=Ll(),Rm=Ll(!0);function Ir(g){return g}function Ua(g){return fl(typeof g=="function"?g:$r(g,A))}function xm(g){return ml($r(g,A))}function km(g,T){return gl(g,$r(T,A))}var Om=kt(function(g,T){return function(N){return os(N,g,T)}}),Mm=kt(function(g,T){return function(N){return os(g,N,T)}});function Ha(g,T,N){var z=ur(T),ee=go(T,z);N==null&&!(Kt(T)&&(ee.length||!z.length))&&(N=T,T=g,g=this,ee=go(T,ur(T)));var Re=!(Kt(N)&&"chain"in N)||!!N.chain,Oe=yn(g);return vr(ee,function(Ve){var $e=T[Ve];g[Ve]=$e,Oe&&(g.prototype[Ve]=function(){var Je=this.__chain__;if(Re||Je){var Xe=g(this.__wrapped__),rt=Xe.__actions__=Pr(this.__actions__);return rt.push({func:$e,args:arguments,thisArg:g}),Xe.__chain__=Je,Xe}return $e.apply(g,Wr([this.value()],arguments))})}),g}function Dm(){return Qt._===this&&(Qt._=iu),this}function ja(){}function Nm(g){return g=Rt(g),kt(function(T){return _l(T,g)})}var Vm=ba(Wt),Lm=ba(gi),Fm=ba(_i);function Nc(g){return Ia(g)?X(rn(g)):dh(g)}function Bm(g){return function(T){return g==null?a:ei(g,T)}}var $m=Bl(),Um=Bl(!0);function Wa(){return[]}function Ga(){return!1}function Hm(){return{}}function jm(){return""}function Wm(){return!0}function Gm(g,T){if(g=Rt(g),g<1||g>Q)return[];var N=Ne,z=_r(g,Ne);T=Et(T),g-=Ne;for(var ee=Ft(z,T);++N<g;)T(N);return ee}function qm(g){return It(g)?Wt(g,rn):Rr(g)?[g]:Pr(tc(Ut(g)))}function zm(g){var T=++ru;return Ut(g)+T}var Km=Eo(function(g,T){return g+T},0),Ym=wa("ceil"),Qm=Eo(function(g,T){return g/T},1),Jm=wa("floor");function Xm(g){return g&&g.length?mo(g,Ir,oa):a}function Zm(g,T){return g&&g.length?mo(g,Et(T,2),oa):a}function eg(g){return q(g,Ir)}function tg(g,T){return q(g,Et(T,2))}function rg(g){return g&&g.length?mo(g,Ir,ua):a}function ng(g,T){return g&&g.length?mo(g,Et(T,2),ua):a}var ig=Eo(function(g,T){return g*T},1),sg=wa("round"),og=Eo(function(g,T){return g-T},0);function ag(g){return g&&g.length?ut(g,Ir):0}function lg(g,T){return g&&g.length?ut(g,Et(T,2)):0}return Ae.after=Rf,Ae.ary=dc,Ae.assign=_p,Ae.assignIn=Ac,Ae.assignInWith=No,Ae.assignWith=yp,Ae.at=vp,Ae.before=fc,Ae.bind=Ma,Ae.bindAll=Pm,Ae.bindKey=pc,Ae.castArray=Uf,Ae.chain=cc,Ae.chunk=Yh,Ae.compact=Qh,Ae.concat=Jh,Ae.cond=Sm,Ae.conforms=Am,Ae.constant=$a,Ae.countBy=of,Ae.create=bp,Ae.curry=mc,Ae.curryRight=gc,Ae.debounce=_c,Ae.defaults=wp,Ae.defaultsDeep=Ep,Ae.defer=xf,Ae.delay=kf,Ae.difference=Xh,Ae.differenceBy=Zh,Ae.differenceWith=ed,Ae.drop=td,Ae.dropRight=rd,Ae.dropRightWhile=nd,Ae.dropWhile=id,Ae.fill=sd,Ae.filter=lf,Ae.flatMap=hf,Ae.flatMapDeep=df,Ae.flatMapDepth=ff,Ae.flatten=sc,Ae.flattenDeep=od,Ae.flattenDepth=ad,Ae.flip=Of,Ae.flow=Cm,Ae.flowRight=Rm,Ae.fromPairs=ld,Ae.functions=Rp,Ae.functionsIn=xp,Ae.groupBy=pf,Ae.initial=ud,Ae.intersection=hd,Ae.intersectionBy=dd,Ae.intersectionWith=fd,Ae.invert=Op,Ae.invertBy=Mp,Ae.invokeMap=gf,Ae.iteratee=Ua,Ae.keyBy=_f,Ae.keys=ur,Ae.keysIn=Ar,Ae.map=Ro,Ae.mapKeys=Np,Ae.mapValues=Vp,Ae.matches=xm,Ae.matchesProperty=km,Ae.memoize=ko,Ae.merge=Lp,Ae.mergeWith=Ic,Ae.method=Om,Ae.methodOf=Mm,Ae.mixin=Ha,Ae.negate=Oo,Ae.nthArg=Nm,Ae.omit=Fp,Ae.omitBy=Bp,Ae.once=Mf,Ae.orderBy=yf,Ae.over=Vm,Ae.overArgs=Df,Ae.overEvery=Lm,Ae.overSome=Fm,Ae.partial=Da,Ae.partialRight=yc,Ae.partition=vf,Ae.pick=$p,Ae.pickBy=Cc,Ae.property=Nc,Ae.propertyOf=Bm,Ae.pull=_d,Ae.pullAll=ac,Ae.pullAllBy=yd,Ae.pullAllWith=vd,Ae.pullAt=bd,Ae.range=$m,Ae.rangeRight=Um,Ae.rearg=Nf,Ae.reject=Ef,Ae.remove=wd,Ae.rest=Vf,Ae.reverse=ka,Ae.sampleSize=Pf,Ae.set=Hp,Ae.setWith=jp,Ae.shuffle=Sf,Ae.slice=Ed,Ae.sortBy=Cf,Ae.sortedUniq=Rd,Ae.sortedUniqBy=xd,Ae.split=dm,Ae.spread=Lf,Ae.tail=kd,Ae.take=Od,Ae.takeRight=Md,Ae.takeRightWhile=Dd,Ae.takeWhile=Nd,Ae.tap=Qd,Ae.throttle=Ff,Ae.thru=Co,Ae.toArray=Tc,Ae.toPairs=Rc,Ae.toPairsIn=xc,Ae.toPath=qm,Ae.toPlainObject=Sc,Ae.transform=Wp,Ae.unary=Bf,Ae.union=Vd,Ae.unionBy=Ld,Ae.unionWith=Fd,Ae.uniq=Bd,Ae.uniqBy=$d,Ae.uniqWith=Ud,Ae.unset=Gp,Ae.unzip=Oa,Ae.unzipWith=lc,Ae.update=qp,Ae.updateWith=zp,Ae.values=xi,Ae.values
vendor: 5,789 bytes, line 4494
4494In=Kp,Ae.without=Hd,Ae.words=Mc,Ae.wrap=$f,Ae.xor=jd,Ae.xorBy=Wd,Ae.xorWith=Gd,Ae.zip=qd,Ae.zipObject=zd,Ae.zipObjectDeep=Kd,Ae.zipWith=Yd,Ae.entries=Rc,Ae.entriesIn=xc,Ae.extend=Ac,Ae.extendWith=No,Ha(Ae,Ae),Ae.add=Km,Ae.attempt=Dc,Ae.camelCase=Xp,Ae.capitalize=kc,Ae.ceil=Ym,Ae.clamp=Yp,Ae.clone=Hf,Ae.cloneDeep=Wf,Ae.cloneDeepWith=Gf,Ae.cloneWith=jf,Ae.conformsTo=qf,Ae.deburr=Oc,Ae.defaultTo=Im,Ae.divide=Qm,Ae.endsWith=Zp,Ae.eq=Kr,Ae.escape=em,Ae.escapeRegExp=tm,Ae.every=af,Ae.find=cf,Ae.findIndex=nc,Ae.findKey=Tp,Ae.findLast=uf,Ae.findLastIndex=ic,Ae.findLastKey=Pp,Ae.floor=Jm,Ae.forEach=uc,Ae.forEachRight=hc,Ae.forIn=Sp,Ae.forInRight=Ap,Ae.forOwn=Ip,Ae.forOwnRight=Cp,Ae.get=La,Ae.gt=zf,Ae.gte=Kf,Ae.has=kp,Ae.hasIn=Fa,Ae.head=oc,Ae.identity=Ir,Ae.includes=mf,Ae.indexOf=cd,Ae.inRange=Qp,Ae.invoke=Dp,Ae.isArguments=ni,Ae.isArray=It,Ae.isArrayBuffer=Yf,Ae.isArrayLike=Sr,Ae.isArrayLikeObject=Zt,Ae.isBoolean=Qf,Ae.isBuffer=Vn,Ae.isDate=Jf,Ae.isElement=Xf,Ae.isEmpty=Zf,Ae.isEqual=ep,Ae.isEqualWith=tp,Ae.isError=Na,Ae.isFinite=rp,Ae.isFunction=yn,Ae.isInteger=vc,Ae.isLength=Mo,Ae.isMap=bc,Ae.isMatch=np,Ae.isMatchWith=ip,Ae.isNaN=sp,Ae.isNative=op,Ae.isNil=lp,Ae.isNull=ap,Ae.isNumber=wc,Ae.isObject=Kt,Ae.isObjectLike=Jt,Ae.isPlainObject=fs,Ae.isRegExp=Va,Ae.isSafeInteger=cp,Ae.isSet=Ec,Ae.isString=Do,Ae.isSymbol=Rr,Ae.isTypedArray=Ri,Ae.isUndefined=hp,Ae.isWeakMap=dp,Ae.isWeakSet=fp,Ae.join=pd,Ae.kebabCase=rm,Ae.last=Hr,Ae.lastIndexOf=md,Ae.lowerCase=nm,Ae.lowerFirst=im,Ae.lt=pp,Ae.lte=mp,Ae.max=Xm,Ae.maxBy=Zm,Ae.mean=eg,Ae.meanBy=tg,Ae.min=rg,Ae.minBy=ng,Ae.stubArray=Wa,Ae.stubFalse=Ga,Ae.stubObject=Hm,Ae.stubString=jm,Ae.stubTrue=Wm,Ae.multiply=ig,Ae.nth=gd,Ae.noConflict=Dm,Ae.noop=ja,Ae.now=xo,Ae.pad=sm,Ae.padEnd=om,Ae.padStart=am,Ae.parseInt=lm,Ae.random=Jp,Ae.reduce=bf,Ae.reduceRight=wf,Ae.repeat=cm,Ae.replace=um,Ae.result=Up,Ae.round=sg,Ae.runInContext=Be,Ae.sample=Tf,Ae.size=Af,Ae.snakeCase=hm,Ae.some=If,Ae.sortedIndex=Td,Ae.sortedIndexBy=Pd,Ae.sortedIndexOf=Sd,Ae.sortedLastIndex=Ad,Ae.sortedLastIndexBy=Id,Ae.sortedLastIndexOf=Cd,Ae.startCase=fm,Ae.startsWith=pm,Ae.subtract=og,Ae.sum=ag,Ae.sumBy=lg,Ae.template=mm,Ae.times=Gm,Ae.toFinite=vn,Ae.toInteger=Rt,Ae.toLength=Pc,Ae.toLower=gm,Ae.toNumber=jr,Ae.toSafeInteger=gp,Ae.toString=Ut,Ae.toUpper=_m,Ae.trim=ym,Ae.trimEnd=vm,Ae.trimStart=bm,Ae.truncate=wm,Ae.unescape=Em,Ae.uniqueId=zm,Ae.upperCase=Tm,Ae.upperFirst=Ba,Ae.each=uc,Ae.eachRight=hc,Ae.first=oc,Ha(Ae,function(){var g={};return en(Ae,function(T,N){Ht.call(Ae.prototype,N)||(g[N]=T)}),g}(),{chain:!1}),Ae.VERSION=l,vr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(g){Ae[g].placeholder=Ae}),vr(["drop","take"],function(g,T){Mt.prototype[g]=function(N){N=N===a?1:ar(Rt(N),0);var z=this.__filtered__&&!T?new Mt(this):this.clone();return z.__filtered__?z.__takeCount__=_r(N,z.__takeCount__):z.__views__.push({size:_r(N,Ne),type:g+(z.__dir__<0?"Right":"")}),z},Mt.prototype[g+"Right"]=function(N){return this.reverse()[g](N).reverse()}}),vr(["filter","map","takeWhile"],function(g,T){var N=T+1,z=N==Me||N==se;Mt.prototype[g]=function(ee){var Re=this.clone();return Re.__iteratees__.push({iteratee:Et(ee,3),type:N}),Re.__filtered__=Re.__filtered__||z,Re}}),vr(["head","last"],function(g,T){var N="take"+(T?"Right":"");Mt.prototype[g]=function(){return this[N](1).value()[0]}}),vr(["initial","tail"],function(g,T){var N="drop"+(T?"":"Right");Mt.prototype[g]=function(){return this.__filtered__?new Mt(this):this[N](1)}}),Mt.prototype.compact=function(){return this.filter(Ir)},Mt.prototype.find=function(g){return this.filter(g).head()},Mt.prototype.findLast=function(g){return this.reverse().find(g)},Mt.prototype.invokeMap=kt(function(g,T){return typeof g=="function"?new Mt(this):this.map(function(N){return os(N,g,T)})}),Mt.prototype.reject=function(g){return this.filter(Oo(Et(g)))},Mt.prototype.slice=function(g,T){g=Rt(g);var N=this;return N.__filtered__&&(g>0||T<0)?new Mt(N):(g<0?N=N.takeRight(-g):g&&(N=N.drop(g)),T!==a&&(T=Rt(T),N=T<0?N.dropRight(-T):N.take(T-g)),N)},Mt.prototype.takeRightWhile=function(g){return this.reverse().takeWhile(g).reverse()},Mt.prototype.toArray=function(){return this.take(Ne)},en(Mt.prototype,function(g,T){var N=/^(?:filter|find|map|reject)|While$/.test(T),z=/^(?:head|last)$/.test(T),ee=Ae[z?"take"+(T=="last"?"Right":""):T],Re=z||/^find/.test(T);ee&&(Ae.prototype[T]=function(){var Oe=this.__wrapped__,Ve=z?[1]:arguments,$e=Oe instanceof Mt,Je=Ve[0],Xe=$e||It(Oe),rt=function(Ot){var Nt=ee.apply(Ae,Wr([Ot],Ve));return z&&ft?Nt[0]:Nt};Xe&&N&&typeof Je=="function"&&Je.length!=1&&($e=Xe=!1);var ft=this.__chain__,wt=!!this.__actions__.length,Tt=Re&&!ft,xt=$e&&!wt;if(!Re&&Xe){Oe=xt?Oe:new Mt(this);var Pt=g.apply(Oe,Ve);return Pt.__actions__.push({func:Co,args:[rt],thisArg:a}),new Br(Pt,ft)}return Tt&&xt?g.apply(this,Ve):(Pt=this.thru(rt),Tt?z?Pt.value()[0]:Pt.value():Pt)})}),vr(["pop","push","shift","sort","splice","unshift"],function(g){var T=Xs[g],N=/^(?:push|sort|unshift)$/.test(g)?"tap":"thru",z=/^(?:pop|shift)$/.test(g);Ae.prototype[g]=function(){var ee=arguments;if(z&&!this.__chain__){var Re=this.value();return T.apply(It(Re)?Re:[],ee)}return this[N](function(Oe){return T.apply(It(Oe)?Oe:[],ee)})}}),en(Mt.prototype,function(g,T){var N=Ae[T];if(N){var z=N.name+"";Ht.call(Pi,z)||(Pi[z]=[]),Pi[z].push({name:T,func:N})}}),Pi[wo(a,V).name]=[{name:"wrapper",func:a}],Mt.prototype.clone=bu,Mt.prototype.reverse=wu,Mt.prototype.value=Eu,Ae.prototype.at=Jd,Ae.prototype.chain=Xd,Ae.prototype.commit=Zd,Ae.prototype.next=ef,Ae.prototype.plant=rf,Ae.prototype.reverse=nf,Ae.prototype.toJSON=Ae.prototype.valueOf=Ae.prototype.value=sf,Ae.prototype.first=Ae.prototype.head,Zi&&(Ae.prototype[Zi]=tf),Ae},wi=Zc();dr?((dr.exports=wi)._=wi,pi._=wi):Qt._=wi}).call(lodash)}
4494(lodash$1,lodash$1.exports)),lodash$1.exports}var lodashExports=requireLodash();const _=getDefaultExportFromCjs(lodashExports),useStore$1=defineStore("project",{state:()=>({globalStyle:null,project:null,internalProject:null,owner:null,embedProjectId:null,integrations:[],resolution:"sm",page:null,modals:[],modal:null,lastModal:null,videoTimeCodeEventSubjects:[],hiddenSubjects:[],pageInitalSettings:{},chatSubscription:null,communityPlusSubscription:null,businessPlusSubscription:null}),actions:{async getChatSubscription(){useFetch(`${useRuntimeConfig().public.apiBase}/api/estage-modules/check-subscription?project_id=${this.project.id}&user_id=${this.project.user.id}`,"$pxBD5JwDtf").then(({data:o})=>{var r;this.chatSubscription=(r=o.value)==null?void 0:r.data})},async getCommunityPlusSubscription(){useFetch(`${useRuntimeConfig().public.apiBase}/api/user/subscriptions-by-project/${this.project.id}?only_business_plus=1`,"$en6Yn8eg8W").then(({data:o})=>{var r,a;this.communityPlusSubscription=(a=(r=o.value)==null?void 0:r.data)==null?void 0:a.business_plus})},async getBusinessPlusSubscription(){this.project.user.user_subscription&&(_.includes(["BUSINESS_PLUS_M","BUSINESS_PLUS_Y"],this.project.user.user_subscription.plan.code)?this.businessPlusSubscription=!0:this.project.user.business_plus?this.businessPlusSubscription=this.project.user.business_plus:this.businessPlusSubscription=!1)},async getSubscriptions(){await Promise.all([this.getChatSubscription(),this.getCommunityPlusSubscription(),this.getBusinessPlusSubscription()])},getVariable(o){const a=(this.project.variables==="{}"||!this.project.variables?[]:JSON.parse(this.project.variables)).find(l=>l.key===o);if(a)return a.value},setModal(o=null){if(document.body.style.overflow=null,!o)return this.modal=null;this.modal={...o,content:typeof o.content=="string"?JSON.parse(o.content):o.content,settings:typeof o.settings=="string"?JSON.parse(o.settings):o.settings},this.modal.settings.scrollable||(document.body.style.overflow="hidden")},setSSRResolution(o){this.resolution=o?"sm":"lg"},setProject(o){this.globalStyle=JSON.parse(o.global_settings),this.project=o},setIntegrations(o){this.integrations=o},setPage(o){this.page={id:o.id,slug:o.slug,is_home:o.is_home,is_blog:o.is_blog,code_injection:JSON.parse(o.code_injection),settings:JSON.parse(o.settings),current_content:o.current_content},this.setPageSettgins(o.settings)},setOwner(o){this.owner=o},setPageSettgins(o){o&&(this.pageInitalSettings=JSON.parse(o))},setModals(o){this.modals=o.map(r=>({...r,settings:JSON.parse(r.settings)}))}},getters:{getGlobalStyle:o=>o.globalStyle,getCookieContent:o=>o.project.cookie_content&&typeof o.project.cookie_content=="string"?JSON.parse(o.project.cookie_content):null,getProject:o=>o.project,getResolution:o=>o.resolution,getPage:o=>o.page,getModals:o=>o.modals,getModal:o=>o.modal},persist:{lastModal:!0}}),blogStore=defineStore("blog",{state:()=>({loading:!1,settings:{primaryColor:null,layout:{id:1,name:"3 Column Grid",sidebar:1,component:"GridThreeWrapper"},hero_banner:{text:"Blog",backgroundImageEnabled:!0,backgroundSize:"cover",backgroundColor:"rgba(124,172,250,0.71)",styles:{lg:{font:"Roboto",fontSize:"20px",color:"#ffffff",bold:!0,align:"center"},sm:{font:"Roboto",fontSize:"20px",color:"#ffffff",bold:!0,align:"center"}},image:{src:null,placeholder:""}},widget_sidebar:{display_search:!0,display_popular_posts:!0,display_categories:!0,display_latest_posts:!0},ad_banner:{allowed:!0,enabled:!1,href:"",image:{src:null,placeholder:"",description:"3-Column Grid with Sidebar - 1920 x 1080 pixels"}},allow_comments:!0,display_comments:!0,display_social_share:!0,display_like_button:!0,social_accounts:[{shape:"None",color:"#ffffff",background:"#3B6AE3",icon:"fa fa-facebook",link:""},{shape:"None",color:"#ffffff",background:"#65B8F4",icon:"fa fa-twitter",link:""},{shape:"None",color:"#ffffff",background:"#326EA6",icon:"fab fa-linkedin-in",link:""}]},posts:[],comments:[],search:"",category:"",pagination:{per_page:10,current_page:1,total:0}}),actions:{async loadPosts(){this.loading=!0;const{data:o}=await $fetch(`${useRuntimeConfig().public.apiBase}/api/projects/${useStore$1().getProject.id}/blog?categoryId=${this.category}&perPage=${this.pagination.per_page}&page=${this.pagination.current_page}&q=${this.search}`);o.data&&this.setPosts(o)},setComments(o){this.comments=o},addComment(o){this.comments.unshift(o)},setPosts(o){this.pagination={per_page:10,last_page:o.last_page,current_page:o.current_page,to:o.to,total:o.total},this.posts=o.data.map(r=>({...r,cover:JSON.parse(r.cover)})),this.loading=!1},setCategory(o){this.category=o,this.loadPosts()},setBlog(o){o&&(this.settings={...o,ad_banner:o.banner?JSON.parse(o.banner.banner):{allowed:!0,enabled:!1,href:"",image:{src:null,placeholder:null,description:"3-Column Grid with Sidebar - 1920 x 1080 pixels"}},layout:JSON.parse(o.layout),hero_banner:JSON.parse(o.hero_banner),widget_sidebar:JSON.parse(o.widget_sidebar),social_accounts:JSON.parse(o.social_accounts),primaryColor:o.primary_color})}},getters:{getBlogSettings:o=>o.settings,getPosts:o=>o.posts,getCategory:o=>o.category}}),blogPostStore=defineStore("blog-post",{state:()=>({post:null}),actions:{setPost(o){this.post=o}}}),blogPostsStore=defineStore("blog-posts",{state:()=>({posts:[],paginationData:{},query:"",loading:!1}
4494),actions:{async fetchPosts(o=20){const r=useStore$1();this.loading=!0,await $fetch(`${useRuntimeConfig().public.blogApiBase}/api/projects/${r.getProject.id}/blog/posts?perPage=${o}&${this.query}`).then(({data:a})=>{this.paginationData={last_page:a.last_page,per_page:a.per_page,total:a.total},this.posts=a.data}).finally(()=>{this.loading=!1,window.scrollTo({top:0,behavior:"smooth"})})},setSearchQuery(o){this.query=o}}}),promoBannersStore=defineStore("promo-banners",{state:()=>({promoBanners:[]}),actions:{addBanner(o){this.promoBanners.push(o)},clear(){this.promoBanners=[]}},getters:{topBanners(o){return o.promoBanners.filter(r=>r.options.content.promo.dockTo.lg==="top")},bottomBanners(o){return o.promoBanners.filter(r=>r.options.content.promo.dockTo.lg==="bottom")}}}),resolutionStore=defineStore("resolution",{state:()=>({resolution:"sm"}),actions:{setSSRResolution(o){this.resolution=o?"sm":"lg"},setResolution(o){this.resolution=o}},getters:{getResolution:o=>o.resolution}});function useStore(o){return{project:useStore$1(),resolutionStore:resolutionStore(),blogStore:blogStore(),authStore:authStore(),blogPostStore:blogPostStore(),promoBannersStore:promoBannersStore(),blogPostsStore:blogPostsStore()}}const google_recaptcha_client_jYwap73s4d=defineNuxtPlugin(o=>{var c,u;const{project:r}=useStore(),a=(c=r.getProject)==null?void 0:c.captcha_enable,l=(u=r.getProject)==null?void 0:u.captcha_p_key;if(typeof window<"u"){let d=function(){if(document.activeElement.closest("form")&&a&&l){const f=document.head,m=document.createElement("script");m.type="text/javascript",m.src=`https://www.google.com/recaptcha/api.js?render=${l}`,f.appendChild(m),document.removeEventListener("click",d)}};document.addEventListener("click",d,!0)}});var md5$1={exports:{}},md5=md5$1.exports,hasRequiredMd5;function requireMd5(){return hasRequiredMd5||(hasRequiredMd5=1,function(o){(function(r){function a(F,j){var U=(F&65535)+(j&65535),G=(F>>16)+(j>>16)+(U>>16);return G<<16|U&65535}function l(F,j){return F<<j|F>>>32-j}function c(F,j,U,G,Y,te){return a(l(a(a(j,F),a(G,te)),Y),U)}function u(F,j,U,G,Y,te,ve){return c(j&U|~j&G,F,j,Y,te,ve)}function d(F,j,U,G,Y,te,ve){return c(j&G|U&~G,F,j,Y,te,ve)}function f(F,j,U,G,Y,te,ve){return c(j^U^G,F,j,Y,te,ve)}function m(F,j,U,G,Y,te,ve){return c(U^(j|~G),F,j,Y,te,ve)}function y(F,j){F[j>>5]|=128<<j%32,F[(j+64>>>9<<4)+14]=j;var U,G,Y,te,ve,J=1732584193,Z=-271733879,Me=-1732584194,ke=271733878;for(U=0;U<F.length;U+=16)G=J,Y=Z,te=Me,ve=ke,J=u(J,Z,Me,ke,F[U],7,-680876936),ke=u(ke,J,Z,Me,F[U+1],12,-389564586),Me=u(Me,ke,J,Z,F[U+2],17,606105819),Z=u(Z,Me,ke,J,F[U+3],22,-1044525330),J=u(J,Z,Me,ke,F[U+4],7,-176418897),ke=u(ke,J,Z,Me,F[U+5],12,1200080426),Me=u(Me,ke,J,Z,F[U+6],17,-1473231341),Z=u(Z,Me,ke,J,F[U+7],22,-45705983),J=u(J,Z,Me,ke,F[U+8],7,1770035416),ke=u(ke,J,Z,Me,F[U+9],12,-1958414417),Me=u(Me,ke,J,Z,F[U+10],17,-42063),Z=u(Z,Me,ke,J,F[U+11],22,-1990404162),J=u(J,Z,Me,ke,F[U+12],7,1804603682),ke=u(ke,J,Z,Me,F[U+13],12,-40341101),Me=u(Me,ke,J,Z,F[U+14],17,-1502002290),Z=u(Z,Me,ke,J,F[U+15],22,1236535329),J=d(J,Z,Me,ke,F[U+1],5,-165796510),ke=d(ke,J,Z,Me,F[U+6],9,-1069501632),Me=d(Me,ke,J,Z,F[U+11],14,643717713),Z=d(Z,Me,ke,J,F[U],20,-373897302),J=d(J,Z,Me,ke,F[U+5],5,-701558691),ke=d(ke,J,Z,Me,F[U+10],9,38016083),Me=d(Me,ke,J,Z,F[U+15],14,-660478335),Z=d(Z,Me,ke,J,F[U+4],20,-405537848),J=d(J,Z,Me,ke,F[U+9],5,568446438),ke=d(ke,J,Z,Me,F[U+14],9,-1019803690),Me=d(Me,ke,J,Z,F[U+3],14,-187363961),Z=d(Z,Me,ke,J,F[U+8],20,1163531501),J=d(J,Z,Me,ke,F[U+13],5,-1444681467),ke=d(ke,J,Z,Me,F[U+2],9,-51403784),Me=d(Me,ke,J,Z,F[U+7],14,1735328473),Z=d(Z,Me,ke,J,F[U+12],20,-1926607734),J=f(J,Z,Me,ke,F[U+5],4,-378558),ke=f(ke,J,Z,Me,F[U+8],11,-2022574463),Me=f(Me,ke,J,Z,F[U+11],16,1839030562),Z=f(Z,Me,ke,J,F[U+14],23,-35309556),J=f(J,Z,Me,ke,F[U+1],4,-1530992060),ke=f(ke,J,Z,Me,F[U+4],11,1272893353),Me=f(Me,ke,J,Z,F[U+7],16,-155497632),Z=f(Z,Me,ke,J,F[U+10],23,-1094730640),J=f(J,Z,Me,ke,F[U+13],4,681279174),ke=f(ke,J,Z,Me,F[U],11,-358537222),Me=f(Me,ke,J,Z,F[U+3],16,-722521979),Z=f(Z,Me,ke,J,F[U+6],23,76029189),J=f(J,Z,Me,ke,F[U+9],4,-640364487),ke=f(ke,J,Z,Me,F[U+12],11,-421815835),Me=f(Me,ke,J,Z,F[U+15],16,530742520),Z=f(Z,Me,ke,J,F[U+2],23,-995338651),J=m(J,Z,Me,ke,F[U],6,-198630844),ke=m(ke,J,Z,Me,F[U+7],10,1126891415),Me=m(Me,ke,J,Z,F[U+14],15,-1416354905),Z=m(Z,Me,ke,J,F[U+5],21,-57434055),J=m(J,Z,Me,ke,F[U+12],6,1700485571),ke=m(ke,J,Z,Me,F[U+3],10,-1894986606),Me=m(Me,ke,J,Z,F[U+10],15,-1051523),Z=m(Z,Me,ke,J,F[U+1],21,-2054922799),J=m(J,Z,Me,ke,F[U+8],6,1873313359),ke=m(ke,J,Z,Me,F[U+15],10,-30611744),Me=m(Me,ke,J,Z,F[U+6],15,-1560198380),Z=m(Z,Me,ke,J,F[U+13],21,1309151649),J=m(J,Z,Me,ke,F[U+4],6,-145523070),ke=m(ke,J,Z,Me,F[U+11],10,-1120210379),Me=m(Me,ke,J,Z,F[U+2],15,718787259),Z=m(Z,Me,ke,J,F[U+9],21,-343485551),J=a(J,G),Z=a(Z,Y),Me=a(Me,te),ke=a(ke,ve);return[J,Z,Me,ke]}function E(F){var j,U="",G=F.length*32;for(j=0;j<G;j+=8)U+=String.fromCharCode(F[j>>5]>>>j%32&255);return U}function A(F){var j,U=[];for(U[(F.length>>2)-1]=void 0,j=0;j<U.length;j+=1)U[j]=0;var G=F.length*8;for(j=0;j<G;j+=8)U[j>>
44945]|=(F.charCodeAt(j/8)&255)<<j%32;return U}function P(F){return E(y(A(F),F.length*8))}function R(F,j){var U,G=A(F),Y=[],te=[],ve;for(Y[15]=te[15]=void 0,G.length>16&&(G=y(G,F.length*8)),U=0;U<16;U+=1)Y[U]=G[U]^909522486,te[U]=G[U]^1549556828;return ve=y(Y.concat(A(j)),512+j.length*8),E(y(te.concat(ve),640))}function x(F){var j="0123456789abcdef",U="",G,Y;for(Y=0;Y<F.length;Y+=1)G=F.charCodeAt(Y),U+=j.charAt(G>>>4&15)+j.charAt(G&15);return U}function M(F){return unescape(encodeURIComponent(F))}function $(F){return P(M(F))}function V(F){return x($(F))}function B(F,j){return R(M(F),M(j))}function O(F,j){return x(B(F,j))}function L(F,j,U){return j?U?B(j,F):O(j,F):U?$(F):V(F)}o.exports?o.exports=L:r.md5=L})(md5)}(md5$1)),md5$1.exports}var md5Exports=requireMd5();const blueimpMd5=getDefaultExportFromCjs(md5Exports);function md5Hex(o){return Array.isArray(o)&&(o=o.join("")),blueimpMd5(o)}function gravatarUrl(o,r){if(!o)throw new Error("Please specify an identifier, such as an email address");o.includes("@")&&(o=o.toLowerCase().trim());const a=new URL("https://gravatar.com/avatar/");return a.pathname+=md5Hex(o),a.search=new URLSearchParams(r),a.toString()}const gravatar_za4rpH4Ai3=defineNuxtPlugin(()=>({provide:{gravatar:(r,a=200)=>r?gravatarUrl(r):""}})),gtag_client_Zw8EQXNVTz=defineNuxtPlugin(o=>{var R,x,M;const{project:r}=useStore(),a=(x=(R=r.getProject)==null?void 0:R.integration_scripts)==null?void 0:x.head;let l=null;if(typeof a=="string"){const $=a.match(/id=([\'"])?(G-[A-Z0-9]+)\1?/);l=$?$[2]:null}if(!l)return;window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)};const c=!!((M=r.getCookieContent)!=null&&M.enabled);let u=!1;const d=()=>{try{const $=!c,V=localStorage.getItem("estage_cookie_accepted_all")==="true",B=localStorage.getItem("estage_cookie_accepted_performance")==="true",O=localStorage.getItem("estage_cookie_accepted_targeting")==="true",L=localStorage.getItem("estage_cookie_accepted_functional")==="true",F=$||V||B,j=$||V||O;return{ad_storage:j?"granted":"denied",ad_user_data:j?"granted":"denied",ad_personalization:j?"granted":"denied",analytics_storage:F?"granted":"denied",functionality_storage:$||V||L?"granted":"denied",security_storage:"granted"}}catch{return{ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:c?"denied":"granted",functionality_storage:c?"denied":"granted",security_storage:"granted"}}},f=()=>d().analytics_storage==="granted",m=()=>{window.gtag("consent","default",d())},y=()=>{window.gtag("consent","update",d())},E=()=>{if(u)return;const $=`https://www.googletagmanager.com/gtag/js?id=${encodeURIComponent(l)}`;if(!document.querySelector(`script[src^="${$}"]`)){const V=document.createElement("script");V.async=!0,V.src=$,V.addEventListener("load",()=>{window.gtag("js",new Date),window.gtag("config",l,{send_page_view:!1})}),document.head.appendChild(V)}u=!0};return m(),f()&&E(),window.addEventListener("estage:consent-applied",()=>{y(),f()&&E()}),window.addEventListener("storage",$=>{!$.key||!$.key.startsWith("estage_cookie_")||(y(),f()&&E())}),o.$router.afterEach($=>{!u||!f()||window.gtag("event","page_view",{page_title:document==null?void 0:document.title,page_location:window.location.href,page_path:$.fullPath})}),{provide:{gtag:{event($,V={}){var B;!u||!f()||(B=window.gtag)==null||B.call(window,"event",$,V)},set($){var V;!u||!f()||(V=window.gtag)==null||V.call(window,"set",$)},config($={}){var V;!u||!f()||(V=window.gtag)==null||V.call(window,"config",l,$)}}}}}),lodash_oeOolPNC0c=defineNuxtPlugin(()=>({provide:{_}}));var lottie$3={exports:{}},lottie$2=lottie$3.exports,hasRequiredLottie;function requireLottie(){return hasRequiredLottie||(hasRequiredLottie=1,function(module,exports){typeof navigator<"u"&&function(o,r){module.exports=r()}(lottie$2,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(r){_useWebWorker=!!r},getWebWorker=function(){return _useWebWorker},setLocationHref=function(r){locationHref=r},getLocationHref=function(){return locationHref};function createTag(o){return document.createElement(o)}function extendPrototype(o,r){var a,l=o.length,c;for(a=0;a<l;a+=1){c=o[a].prototype;for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(r.prototype[u]=c[u])}}function getDescriptor(o,r){return Object.getOwnPropertyDescriptor(o,r)}function createProxyFunction(o){function r(){}return r.prototype=o,r}var audioControllerFactory=function(){function o(r){this.audios=[],this.audioFactory=r,this._volume=1,this._isMuted=!1}return o.prototype={addAudio:function(a){this.audios.push(a)},pause:function(){var a,l=this.audios.length;for(a=0;a<l;a+=1)this.audios[a].pause()},resume:function(){var a,l=this.audios.length;for(a=0;a<l;a+=1)this.audios[a].resume()},setRate:function(a){var l,c=this.audios.length;for(l=0;l<c;l+=1)this.audios[l].setRate(a)},createAudio:function(a){return this.audioFactory?this.audioFactory(a):window.Howl?new window.Howl({src:[a]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(a){this.audioFactory=a},setVolume:function(a){this._volume=a,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var a,l=this.audios.length;for(a=0;a<l;a+=1)this.audios[a].volume(this._volume*(this._isMuted?0:1))}},function(){return new o}}(),createTypedArray=function(){function o(a,l){var c=0,u=[],d;switch(a){case"int16":case"uint8c":d=1;break;default:d=1.1;break}for(c=0;c<l;c+=1)u.push(d);return u}function r(a,l){return a==="float32"?new Float32Array(l):a==="int16"?new Int16Array(l):a==="uint8c"?new Uint8ClampedArray(l):o(a,l)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?r:o}();function createSizedArray(o){return Array.apply(null,{length:o})}function _typeof$6(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(a){return typeof a}:_typeof$6=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof$6(o)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var o=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],r,a=o.length;for(r=0;r<a;r+=1)BMMath[o[r]]=Math[o[r]]})(),BMMath.random=Math.random,BMMath.abs=function(o){var r=_typeof$6(o);if(r==="object"&&o.length){var a=createSizedArray(o.length),l,c=o.length;for(l=0;l<c;l+=1)a[l]=Math.abs(o[l]);return a}return Math.abs(o)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(o){o.style.position="absolute",o.style.top=0,o.style.left=0,o.style.display="block",o.style.transformOrigin="0 0",o.style.webkitTransformOrigin="0 0",o.style.backfaceVisibility="visible",o.style.webkitBackfaceVisibility="visible",o.style.transformStyle="preserve-3d",o.style.webkitTransformStyle="preserve-3d",o.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(o,r,a,l){this.type=o,this.currentTime=r,this.totalTime=a,this.direction=l<0?-1:1}function BMCompleteEvent(o,r){this.type=o,this.direction=r<0?-1:1}function BMCompleteLoopEvent(o,r,a,l){this.type=o,this.currentLoop=a,this.totalLoops=r,this.direction=l<0?-1:1}function BMSegmentStartEvent(o,r,a){this.type=o,this.firstFrame=r,this.totalFrames=a}function BMDestroyEvent(o,r){this.type=o,this.target=r}function BMRenderFrameErrorEvent(o,r){this.type="renderFrameError",this.nativeError=o,this.currentTime=r}function BMConfigErrorEvent(o){this.type="configError",this.nativeError=o}var createElementID=function(){var o=0;return function(){return o+=1,idPrefix$1+"__lottie_element_"+o}}();function HSVtoRGB(o,r,a){var l,c,u,d,f,m,y,E;switch(d=Math.floor(o*6),f=o*6-d,m=a*(1-r),y=a*(1-f*r),E=a*(1-(1-f)*r),d%6){case 0:l=a,c=E,u=m;break;case 1:l=y,c=a,u=m;break;case 2:l=m,c=a,u=E;break;case 3:l=m,c=y,u=a;break;case 4:l=E,c=m,u=a;break;case 5:l=a,c=m,u=y;break}return[l,c,u]}function RGBtoHSV(o,r,a){var l=Math.max(o,r,a),c=Math.min(o,r,a),u=l-c,d,f=l===0?0:u/l,m=l/255;switch(l){case c:d=0;break;case o:d=r-a+u*(r<a?6:0),d/=6*u;break;case r:d=a-o+u*2,d/=6*u;break;case a:d=o-r+u*4,d/=6*u;break}return[d,f,m]}function addSaturationToRGB(o,r){var a=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255
vendor: 138,706 bytes, lines 4494-4502
4494);return a[1]+=r,a[1]>1?a[1]=1:a[1]<=0&&(a[1]=0),HSVtoRGB(a[0],a[1],a[2])}function addBrightnessToRGB(o,r){var a=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);return a[2]+=r,a[2]>1?a[2]=1:a[2]<0&&(a[2]=0),HSVtoRGB(a[0],a[1],a[2])}function addHueToRGB(o,r){var a=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);return a[0]+=r/360,a[0]>1?a[0]-=1:a[0]<0&&(a[0]+=1),HSVtoRGB(a[0],a[1],a[2])}var rgbToHex=function(){var o=[],r,a;for(r=0;r<256;r+=1)a=r.toString(16),o[r]=a.length===1?"0"+a:a;return function(l,c,u){return l<0&&(l=0),c<0&&(c=0),u<0&&(u=0),"#"+o[l]+o[c]+o[u]}}(),setSubframeEnabled=function(r){subframeEnabled=!!r},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(r){expressionsPlugin=r},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(r){expressionsInterfaces=r},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(r){defaultCurveSegments=r},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(r){idPrefix$1=r};function createNS(o){return document.createElementNS(svgNS,o)}function _typeof$5(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(a){return typeof a}:_typeof$5=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof$5(o)}var dataManager=function(){var o=1,r=[],a,l,c={onmessage:function(){},postMessage:function(R){a({data:R})}},u={postMessage:function(R){c.onmessage({data:R})}};function d(P){if(window.Worker&&window.Blob&&getWebWorker()){var R=new Blob(["var _workerSelf = self; self.onmessage = ",P.toString()],{type:"text/javascript"}),x=URL.createObjectURL(R);return new Worker(x)}return a=P,c}function f(){l||(l=d(function(R){function x(){function $(ke,se){var xe,Q,ie=ke.length,Fe,Ne,nt,ct;for(Q=0;Q<ie;Q+=1)if(xe=ke[Q],"ks"in xe&&!xe.completed){if(xe.completed=!0,xe.hasMask){var pt=xe.masksProperties;for(Ne=pt.length,Fe=0;Fe<Ne;Fe+=1)if(pt[Fe].pt.k.i)F(pt[Fe].pt.k);else for(ct=pt[Fe].pt.k.length,nt=0;nt<ct;nt+=1)pt[Fe].pt.k[nt].s&&F(pt[Fe].pt.k[nt].s[0]),pt[Fe].pt.k[nt].e&&F(pt[Fe].pt.k[nt].e[0])}xe.ty===0?(xe.layers=O(xe.refId,se),$(xe.layers,se)):xe.ty===4?L(xe.shapes):xe.ty===5&&Z(xe)}}function V(ke,se){if(ke){var xe=0,Q=ke.length;for(xe=0;xe<Q;xe+=1)ke[xe].t===1&&(ke[xe].data.layers=O(ke[xe].data.refId,se),$(ke[xe].data.layers,se))}}function B(ke,se){for(var xe=0,Q=se.length;xe<Q;){if(se[xe].id===ke)return se[xe];xe+=1}return null}function O(ke,se){var xe=B(ke,se);return xe?xe.layers.__used?JSON.parse(JSON.stringify(xe.layers)):(xe.layers.__used=!0,xe.layers):null}function L(ke){var se,xe=ke.length,Q,ie;for(se=xe-1;se>=0;se-=1)if(ke[se].ty==="sh")if(ke[se].ks.k.i)F(ke[se].ks.k);else for(ie=ke[se].ks.k.length,Q=0;Q<ie;Q+=1)ke[se].ks.k[Q].s&&F(ke[se].ks.k[Q].s[0]),ke[se].ks.k[Q].e&&F(ke[se].ks.k[Q].e[0]);else ke[se].ty==="gr"&&L(ke[se].it)}function F(ke){var se,xe=ke.i.length;for(se=0;se<xe;se+=1)ke.i[se][0]+=ke.v[se][0],ke.i[se][1]+=ke.v[se][1],ke.o[se][0]+=ke.v[se][0],ke.o[se][1]+=ke.v[se][1]}function j(ke,se){var xe=se?se.split("."):[100,100,100];return ke[0]>xe[0]?!0:xe[0]>ke[0]?!1:ke[1]>xe[1]?!0:xe[1]>ke[1]?!1:ke[2]>xe[2]?!0:xe[2]>ke[2]?!1:null}var U=function(){var ke=[4,4,14];function se(Q){var ie=Q.t.d;Q.t.d={k:[{s:ie,t:0}]}}function xe(Q){var ie,Fe=Q.length;for(ie=0;ie<Fe;ie+=1)Q[ie].ty===5&&se(Q[ie])}return function(Q){if(j(ke,Q.v)&&(xe(Q.layers),Q.assets)){var ie,Fe=Q.assets.length;for(ie=0;ie<Fe;ie+=1)Q.assets[ie].layers&&xe(Q.assets[ie].layers)}}}(),G=function(){var ke=[4,7,99];return function(se){if(se.chars&&!j(ke,se.v)){var xe,Q=se.chars.length;for(xe=0;xe<Q;xe+=1){var ie=se.chars[xe];ie.data&&ie.data.shapes&&(L(ie.data.shapes),ie.data.ip=0,ie.data.op=99999,ie.data.st=0,ie.data.sr=1,ie.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},se.chars[xe].t||(ie.data.shapes.push({ty:"no"}),ie.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),Y=function(){var ke=[5,7,15];function se(Q){var ie=Q.t.p;typeof ie.a=="number"&&(ie.a={a:0,k:ie.a}),typeof ie.p=="number"&&(ie.p={a:0,k:ie.p}),typeof ie.r=="number"&&(ie.r={a:0,k:ie.r})}function xe(Q){var ie,Fe=Q.length;for(ie=0;ie<Fe;ie+=1)Q[ie].ty===5&&se(Q[ie])}return function(Q){if(j(ke,Q.v)&&(xe(Q.layers),Q.assets)){var ie,Fe=Q.assets.length;for(ie=0;ie<Fe;ie+=1)Q.assets[ie].layers&&xe(Q.assets[ie].layers)}}}(),te=function(){var ke=[4,1,9];function se(Q){var ie,Fe=Q.length,Ne,nt;for(ie=0;ie<Fe;ie+=1)if(Q[ie].ty==="gr")se(Q[ie].it);else if(Q[ie].ty==="fl"||Q[ie].ty==="st")if(Q[ie].c.k&&Q[ie].c.k[0].i)for(nt=Q[ie].c.k.length,Ne=0;Ne<nt;Ne+=1)Q[ie].c.k[Ne].s&&(Q[ie].c.k[Ne].s[0]/=255,Q[ie].c.k[Ne].s[1]/=255,Q[ie].c.k[Ne].s[2]/=255,Q[ie].c.k[Ne].s[3]/=255),Q[ie].c.k[Ne].e&&(Q[ie].c.k[Ne].e[0]/=255,Q[ie].c.k[Ne].e[1]/=255,Q[ie].c.k[Ne].e[2]/=255,Q[ie].c.k[Ne].e[3]/=255);else Q[ie].c.k[0]/=255,Q[ie].c.k[1]/=255,Q[ie].c.k[2]/=255,Q[ie].c.k[3]/=255}function xe(Q){var ie,Fe=Q.length;for(ie=0;ie<Fe;ie+=1)Q[ie].ty===4&&se(Q[ie].shapes)}return function(Q){if(j(ke,Q.v)&&(xe(Q.layers),Q.assets)){var ie,Fe=Q.assets.length;for(ie=0;ie<Fe;ie+=1)Q.assets[ie].layers&&xe(Q.assets[ie].layers)}}}(),ve=function(){var ke=[4,4,18];function se(Q){var ie,Fe=Q.length,Ne,nt;for(ie=Fe-1;ie>=0;ie-=1)if(Q[ie].ty==="sh")if(Q[ie].ks.k.i)Q[ie].ks.k.c=Q[ie].closed;else for(nt=Q[ie].ks.k.length,Ne=0;Ne<nt;Ne+=1)Q[ie].ks.k[Ne].s&&(Q[ie].ks.k[Ne].s[0].c=Q[ie].closed),Q[ie].ks.k[Ne].e&&(Q[ie].ks.k[Ne].e[0].c=Q[ie].closed);else Q[ie].ty==="gr"&&se(Q[ie].it)}function xe(Q){var ie,Fe,Ne=Q.length,nt,ct,pt,_t;for(Fe=0;Fe<Ne;Fe+=1){if(ie=Q[Fe],ie.hasMask){var yt=ie.masksProperties;for(ct=yt.length,nt=0;nt<ct;nt+=1)if(yt[nt].pt.k.i)yt[nt].pt.k.c=yt[nt].cl;else for(_t=yt[nt].pt.k.length,pt=0;pt<_t;pt+=1)yt[nt].pt.k[pt].s&&(yt[nt].pt.k[pt].s[0].c=yt[nt].cl),yt[nt].pt.k[pt].e&&(yt[nt].pt.k[pt].e[0].c=yt[nt].cl)}ie.ty===4&&se(ie.shapes)}}return function(Q){if(j(ke,Q.v)&&(xe(Q.layers),Q.assets)){var ie,Fe=Q.assets.length;for(ie=0;ie<Fe;ie+=1)Q.assets[ie].layers&&xe(Q.assets[ie].layers)}}}();function J(ke){ke.__complete||(te(ke),U(ke),G(ke),Y(ke),ve(ke),$(ke.layers,ke.assets),V(ke.chars,ke.assets),ke.__complete=!0)}function Z(ke){ke.t.a.length===0&&"m"in ke.t.p}var Me={};return Me.completeData=J,Me.checkColors=te,Me.checkChars=G,Me.checkPathProperties=Y,Me.checkShapes=ve,Me.completeLayers=$,Me}if(u.dataManager||(u.dataManager=x()),u.assetLoader||(u.assetLoader=function(){function $(B){var O=B.getResponseHeader("content-type");return O&&B.responseType==="json"&&O.indexOf("json")!==-1||B.response&&_typeof$5(B.response)==="object"?B.response:B.response&&typeof B.response=="string"?JSON.parse(B.response):B.responseText?JSON.parse(B.responseText):null}function V(B,O,L,F){var j,U=new XMLHttpRequest;try{U.responseType="json"}catch{}U.onreadystatechange=function(){if(U.readyState===4)if(U.status===200)j=$(U),L(j);else try{j=$(U),L(j)}catch(G){F&&F(G)}};try{U.open(["G","E","T"].join(""),B,!0)}catch{U.open(["G","E","T"].join(""),O+"/"+B,!0)}U.send()}return{load:V}}()),R.data.type==="loadAnimation")u.assetLoader.load(R.data.path,R.data.fullPath,function($){u.dataManager.completeData($),u.postMessage({id:R.data.id,payload:$,status:"success"})},function(){u.postMessage({id:R.data.id,status:"error"})});else if(R.data.type==="complete"){var M=R.data.animation;u.dataManager.completeData(M),u.postMessage({id:R.data.id,payload:M,status:"success"})}else R.data.type==="loadData"&&u.assetLoader.load(R.data.path,R.data.fullPath,function($){u.postMessage({id:R.data.id,payload:$,status:"success"})},function(){u.postMessage({id:R.data.id,status:"error"})})}),l.onmessage=function(P){var R=P.data,x=R.id,M=r[x];r[x]=null,R.status==="success"?M.onComplete(R.payload):M.onError&&M.onError()})}function m(P,R){o+=1;var x="processId_"+o;return r[x]={onComplete:P,onError:R},x}function y(P,R,x){f();var M=m(R,x);l.postMessage({type:"loadAnimation",path:P,fullPath:window.location.origin+window.location.pathname,id:M})}function E(P,R,x){f();var M=m(R,x);l.postMessage({type:"loadData",path:P,fullPath:window.location.origin+window.location.pathname,id:M})}function A(P,R,x){f();var M=m(R,x);l.postMessage({type:"complete",animation:P,id:M})}return{loadAnimation:y,loadData:E,completeAnimation:A}}(),ImagePreloader=function(){var o=function(){var V=createTag("canvas");V.width=1,V.height=1;var B=V.getContext("2d");return B.fillStyle="rgba(0,0,0,0)",B.fillRect(0,0,1,1),V}();function r(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function l(V,B,O){var L="";if(V.e)L=V.p;else if(B){var F=V.p;F.indexOf("images/")!==-1&&(F=F.split("/")[1]),L=B+F}else L=O,L+=V.u?V.u:"",L+=V.p;return L}function c(V){var B=0,O=setInterval((function(){var L=V.getBBox();(L.width||B>500)&&(this._imageLoaded(),clearInterval(O)),B+=1}).bind(this),50)}function u(V){var B=l(V,this.assetsPath,this.path),O=createNS("image");isSafari?this.testImageLoaded(O):O.addEventListener("load",this._imageLoaded,!1),O.addEventListener("error",(function(){L.img=o,this._imageLoaded()}).bind(this),!1),O.setAttributeNS("http://www.w3.org/1999/xlink","href",B),this._elementHelper.append?this._elementHelper.append(O):this._elementHelper.appendChild(O);var L={img:O,assetData:V};return L}function d(V){var B=l(V,this.assetsPath,this.path),O=createTag("img");O.crossOrigin="anonymous",O.addEventListener("load",this._imageLoaded,!1),O.addEventListener("error",(function(){L.img=o,this._imageLoaded()}).bind(this),!1),O.src=B;var L={img:O,assetData:V};return L}function f(V){var B={assetData:V},O=l(V,this.assetsPath,this.path);return dataManager.loadData(O,(function(L){B.img=L,this._footageLoaded()}).bind(this),(function(){B.img={},this._footageLoaded()}).bind(this)),B}function m(V,B){this.imagesLoadedCb=B;var O,L=V.length;for(O=0;O<L;O+=1)V[O].layers||(!V[O].t||V[O].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(V[O]))):V[O].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(V[O]))))}function y(V){this.path=V||""}function E(V){this.assetsPath=V||""}function A(V){for(var B=0,O=this.images.length;B<O;){if(this.images[B].assetData===V)return this.images[B].img;B+=1}return null}function P(){this.imagesLoadedCb=null,this.images.length=0}function R(){return this.totalImages===this.loadedAssets}function x(){return this.totalFootages===this.loadedFootagesCount}function M(V,B){V==="svg"?(this._elementHelper=B,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function $(){this._imageLoaded=r.bind(this),this._footageLoaded=a.bind(this),this.testImageLoaded=c.bind(this),this.createFootageData=f.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return $.prototype={loadAssets:m,setAssetsPath:E,setPath:y,loadedImages:R,loadedFootages:x,destroy:P,getAsset:A,createImgData:d,createImageData:u,imageLoaded:r,footageLoaded:a,setCacheType:M},$}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(r,a){if(this._cbs[r])for(var l=this._cbs[r],c=0;c<l.length;c+=1)l[c](a)},addEventListener:function(r,a){return this._cbs[r]||(this._cbs[r]=[]),this._cbs[r].push(a),(function(){this.removeEventListener(r,a)}).bind(this)},removeEventListener:function(r,a){if(!a)this._cbs[r]=null;else if(this._cbs[r]){for(var l=0,c=this._cbs[r].length;l<c;)this._cbs[r][l]===a&&(this._cbs[r].splice(l,1),l-=1,c-=1),l+=1;this._cbs[r].length||(this._cbs[r]=null)}}};var markerParser=function(){function o(r){for(var a=r.split(`\r
4495`),l={},c,u=0,d=0;d<a.length;d+=1)c=a[d].split(":"),c.length===2&&(l[c[0]]=c[1].trim(),u+=1);if(u===0)throw new Error;return l}return function(r){for(var a=[],l=0;l<r.length;l+=1){var c=r[l],u={time:c.tm,duration:c.dr};try{u.payload=JSON.parse(r[l].cm)}catch{try{u.payload=o(r[l].cm)}catch{u.payload={name:r[l].cm}}}a.push(u)}return a}}(),ProjectInterface=function(){function o(r){this.compositions.push(r)}return function(){function r(a){for(var l=0,c=this.compositions.length;l<c;){if(this.compositions[l].data&&this.compositions[l].data.nm===a)return this.compositions[l].prepareFrame&&this.compositions[l].data.xt&&this.compositions[l].prepareFrame(this.currentFrame),this.compositions[l].compInterface;l+=1}return null}return r.compositions=[],r.currentFrame=0,r.registerComposition=o,r}}(),renderers={},registerRenderer=function(r,a){renderers[r]=a};function getRenderer(o){return renderers[o]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var o in renderers)if(renderers[o])return o;return""}function _typeof$4(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function(a){return typeof a}:_typeof$4=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof$4(o)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(o){(o.wrapper||o.container)&&(this.wrapper=o.wrapper||o.container);var r="svg";o.animType?r=o.animType:o.renderer&&(r=o.renderer);var a=getRenderer(r);this.renderer=new a(this,o.rendererSettings),this.imagePreloader.setCacheType(r,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=r,o.loop===""||o.loop===null||o.loop===void 0||o.loop===!0?this.loop=!0:o.loop===!1?this.loop=!1:this.loop=parseInt(o.loop,10),this.autoplay="autoplay"in o?o.autoplay:!0,this.name=o.name?o.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(o,"autoloadSegments")?o.autoloadSegments:!0,this.assetsPath=o.assetsPath,this.initialSegment=o.initialSegment,o.audioFactory&&this.audioController.setAudioFactory(o.audioFactory),o.animationData?this.setupAnimation(o.animationData):o.path&&(o.path.lastIndexOf("\\")!==-1?this.path=o.path.substr(0,o.path.lastIndexOf("\\")+1):this.path=o.path.substr(0,o.path.lastIndexOf("/")+1),this.fileName=o.path.substr(o.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(o.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(o){dataManager.completeAnimation(o,this.configAnimation)},AnimationItem.prototype.setData=function(o,r){r&&_typeof$4(r)!=="object"&&(r=JSON.parse(r));var a={wrapper:o,animationData:r},l=o.attributes;a.path=l.getNamedItem("data-animation-path")?l.getNamedItem("data-animation-path").value:l.getNamedItem("data-bm-path")?l.getNamedItem("data-bm-path").value:l.getNamedItem("bm-path")?l.getNamedItem("bm-path").value:"",a.animType=l.getNamedItem("data-anim-type")?l.getNamedItem("data-anim-type").value:l.getNamedItem("data-bm-type")?l.getNamedItem("data-bm-type").value:l.getNamedItem("bm-type")?l.getNamedItem("bm-type").value:l.getNamedItem("data-bm-renderer")?l.getNamedItem("data-bm-renderer").value:l.getNamedItem("bm-renderer")?l.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var c=l.getNamedItem("data-anim-loop")?l.getNamedItem("data-anim-loop").value:l.getNamedItem("data-bm-loop")?l.getNamedItem("data-bm-loop").value:l.getNamedItem("bm-loop")?l.getNamedItem("bm-loop").value:"";c==="false"?a.loop=!1:c==="true"?a.loop=!0:c!==""&&(a.loop=parseInt(c,10));var u=l.getNamedItem("data-anim-autoplay")?l.getNamedItem("data-anim-autoplay").value:l.getNamedItem("data-bm-autoplay")?l.getNamedItem("data-bm-autoplay").value:l.getNamedItem("bm-autoplay")?l.getNamedItem("bm-autoplay").value:!0;a.autoplay=u!=="false",a.name=l.getNamedItem("data-name")?l.getNamedItem("data-name").value:l.getNamedItem("data-bm-name")?l.getNamedItem("data-bm-name").value:l.getNamedItem("bm-name")?l.getNamedItem("bm-name").value:"";var d=l.getNamedItem("data-anim-prerender")?l.getNamedItem("data-anim-prerender").value:l.getNamedItem("data-bm-prerender")?l.getNamedItem("data-bm-prerender").value:l.getNamedItem("bm-prerender")?l.getNamedItem("bm-prerender").value:"";d==="false"&&(a.prerender=!1),a.path?this.setParams(a):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(o){o.op>this.animationData.op&&(this.animationData.op=o.op,this.totalFrames=Math.floor(o.op-this.animationData.ip));var r=this.animationData.layers,a,l=r.length,c=o.layers,u,d=c.length;for(u=0;u<d;u+=1)for(a=0;a<l;){if(r[a].id===c[u].id){r[a]=c[u];break}a+=1}if((o.chars||o.fonts)&&(this.renderer.globalData.fontManager.addChars(o.chars),this.renderer.globalData.fontManager.addFonts(o.fonts,this.renderer.globalData.defs)),o.assets)for(l=o.assets.length,a=0;a<l;a+=1)this.animationData.assets.push(o.assets[a]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(o){this.animationData=o;var r=getExpressionsPlugin();r&&r.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var o=this.animationData.segments;if(!o||o.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var r=o.shift();this.timeCompleted=r.time*this.frameRate;var a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(a,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var o=this.animationData.segments;o||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(o){if(this.renderer)try{this.animationData=o,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(o),o.assets||(o.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(o.assets),this.markers=markerParser(o.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(r){this.triggerConfigError(r)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var o=getExpressionsPlugin();o&&o.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(o,r){var a=typeof o=="number"?o:void 0,l=typeof r=="number"?r:void 0;this.renderer.updateContainerSize(a,l)},AnimationItem.prototype.setSubframe=function(o){this.isSubframeEnabled=!!o},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(o){this.triggerRenderFrameError(o)}},AnimationItem.prototype.play=function(o){o&&this.name!==o||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(o){o&&this.name!==o||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(o){o&&this.name!==o||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(o){o&&this.name!==o||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(o){for(var r,a=0;a<this.markers.length;a+=1)if(r=this.markers[a],r.payload&&r.payload.name===o)return r;return null},AnimationItem.prototype.goToAndStop=function(o,r,a){if(!(a&&this.name!==a)){var l=Number(o);if(isNaN(l)){var c=this.getMarkerData(o);c&&this.goToAndStop(c.time,!0)}else r?this.setCurrentRawFrameValue(o):this.setCurrentRawFrameValue(o*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(o,r,a){if(!(a&&this.name!==a)){var l=Number(o);if(isNaN(l)){var c=this.getMarkerData(o);c&&(c.duration?this.playSegments([c.time,c.time+c.duration],!0):this.goToAndStop(c.time,!0))}else this.goToAndStop(l,r,a);this.play()}},AnimationItem.prototype.advanceTime=function(o){if(!(this.isPaused===!0||this.isLoaded===!1)){var r=this.currentRawFrame+o*this.frameModifier,a=!1;r>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(r>this.totalFrames?r%this.totalFrames:0)||(a=!0,r=this.totalFrames-1):r>=this.totalFrames?(this.playCount+=1,this.checkSegments(r%this.totalFrames)||(this.setCurrentRawFrameValue(r%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(r):r<0?this.checkSegments(r%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+r%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(a=!0,r=0)):this.setCurrentRawFrameValue(r),a&&(this.setCurrentRawFrameValue(r),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(o,r){this.playCount=0,o[1]<o[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=o[0]-o[1],this.timeCompleted=this.totalFrames,this.firstFrame=o[1],this.setCurrentRawFrameValue(this.totalFrames-.001-r)):o[1]>o[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=o[1]-o[0],this.timeCompleted=this.totalFrames,this.firstFrame=o[0],this.setCurrentRawFrameValue(.001+r)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(o,r){var a=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<o?a=o:this.currentRawFrame+this.firstFrame>r&&(a=r-o)),this.firstFrame=o,this.totalFrames=r-o,this.timeCompleted=this.totalFrames,a!==-1&&this.goToAndStop(a,!0)},AnimationItem.prototype.playSegments=function(o,r){if(r&&(this.segments.length=0),_typeof$4(o[0])==="object"){var a,l=o.length;for(a=0;a<l;a+=1)this.segments.push(o[a])}else this.segments.push(o);this.segments.length&&r&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(o){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),o&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(o){return this.segments.length?(this.adjustSegment(this.segments.shift(),o),!0):!1},AnimationItem.prototype.destroy=function(o){o&&this.name!==o||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(o){this.currentRawFrame=o,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(o){this.playSpeed=o,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(o){this.playDirection=o<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(o){this.loop=o},AnimationItem.prototype.setVolume=function(o,r){r&&this.name!==r||this.audioController.setVolume(o)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(o){o&&this.name!==o||this.audioController.mute()},AnimationItem.prototype.unmute=function(o){o&&this.name!==o||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(o){var r="";if(o.e)r=o.p;else if(this.assetsPath){var a=o.p;a.indexOf("images/")!==-1&&(a=a.split("/")[1]),r=this.assetsPath+a}else r=this.path,r+=o.u?o.u:"",r+=o.p;return r},AnimationItem.prototype.getAssetData=function(o){for(var r=0,a=this.assets.length;r<a;){if(o===this.assets[r].id)return this.assets[r];r+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(o){return o?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(o,r,a){try{var l=this.renderer.getElementByPath(o);l.updateDocumentData(r,a)}catch{}},AnimationItem.prototype.trigger=function(o){if(this._cbs&&this._cbs[o])switch(o){case"enterFrame":this.triggerEvent(o,new BMEnterFrameEvent(o,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(o,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(o,new BMCompleteLoopEvent(o,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(o,new BMCompleteEvent(o,this.frameMult));break;case"segmentStart":this.triggerEvent(o,new BMSegmentStartEvent(o,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(o,new BMDestroyEvent(o,this));break;default:this.triggerEvent(o)}o==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(o,this.currentFrame,this.totalFrames,this.frameMult)),o==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(o,this.loop,this.playCount,this.frameMult)),o==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(o,this.frameMult)),o==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(o,this.firstFrame,this.totalFrames)),o==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(o,this))},AnimationItem.prototype.triggerRenderFrameError=function(o){var r=new BMRenderFrameErrorEvent(o,this.currentFrame);this.triggerEvent("error",r),this.onError&&this.onError.call(this,r)},AnimationItem.prototype.triggerConfigError=function(o){var r=new BMConfigErrorEvent(o,this.currentFrame);this.triggerEvent("error",r),this.onError&&this.onError.call(this,r)};var animationManager=function(){var o={},r=[],a=0,l=0,c=0,u=!0,d=!1;function f(se){for(var xe=0,Q=se.target;xe<l;)r[xe].animation===Q&&(r.splice(xe,1),xe-=1,l-=1,Q.isPaused||A()),xe+=1}function m(se,xe){if(!se)return null;for(var Q=0;Q<l;){if(r[Q].elem===se&&r[Q].elem!==null)return r[Q].animation;Q+=1}var ie=new AnimationItem;return P(ie,se),ie.setData(se,xe),ie}function y(){var se,xe=r.length,Q=[];for(se=0;se<xe;se+=1)Q.push(r[se].animation);return Q}function E(){c+=1,te()}function A(){c-=1}function P(se,xe){se.addEventListener("destroy",f),se.addEventListener("_active",E),se.addEventListener("_idle",A),r.push({elem:xe,animation:se}),l+=1}function R(se){var xe=new AnimationItem;return P(xe,null),xe.setParams(se),xe}function x(se,xe){var Q;for(Q=0;Q<l;Q+=1)r[Q].animation.setSpeed(se,xe)}function M(se,xe){var Q;for(Q=0;Q<l;Q+=1)r[Q].animation.setDirection(se,xe)}function $(se){var xe;for(xe=0;xe<l;xe+=1)r[xe].animation.play(se)}function V(se){var xe=se-a,Q;for(Q=0;Q<l;Q+=1)r[Q].animation.advanceTime(xe);a=se,c&&!d?window.requestAnimationFrame(V):u=!0}function B(se){a=se,window.requestAnimationFrame(V)}function O(se){var xe;for(xe=0;xe<l;xe+=1)r[xe].animation.pause(se)}function L(se,xe,Q){var ie;for(ie=0;ie<l;ie+=1)r[ie].animation.goToAndStop(se,xe,Q)}function F(se){var xe;for(xe=0;xe<l;xe+=1)r[xe].animation.stop(se)}function j(se){var xe;for(xe=0;xe<l;xe+=1)r[xe].animation.togglePause(se)}function U(se){var xe;for(xe=l-1;xe>=0;xe-=1)r[xe].animation.destroy(se)}function G(se,xe,Q){var ie=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),Fe,Ne=ie.length;for(Fe=0;Fe<Ne;Fe+=1)Q&&ie[Fe].setAttribute("data-bm-type",Q),m(ie[Fe],se);if(xe&&Ne===0){Q||(Q="svg");var nt=document.getElementsByTagName("body")[0];nt.innerText="";var ct=createTag("div");ct.style.width="100%",ct.style.height="100%",ct.setAttribute("data-bm-type",Q),nt.appendChild(ct),m(ct,se)}}function Y(){var se;for(se=0;se<l;se+=1)r[se].animation.resize()}function te(){!d&&c&&u&&(window.requestAnimationFrame(B),u=!1)}function ve(){d=!0}function J(){d=!1,te()}function Z(se,xe){var Q;for(Q=0;Q<l;Q+=1)r[Q].animation.setVolume(se,xe)}function Me(se){var xe;for(xe=0;xe<l;xe+=1)r[xe].animation.mute(se)}function ke(se){var xe;for(xe=0;xe<l;xe+=1)r[xe].animation.unmute(se)}return o.registerAnimation=m,o.loadAnimation=R,o.setSpeed=x,o.setDirection=M,o.play=$,o.pause=O,o.stop=F,o.togglePause=j,o.searchAnimations=G,o.resize=Y,o.goToAndStop=L,o.destroy=U,o.freeze=ve,o.unfreeze=J,o.setVolume=Z,o.mute=Me,o.unmute=ke,o.getRegisteredAnimations=y,o}(),BezierFactory=function(){var o={};o.getBezierEasing=a;var r={};function a(B,O,L,F,j){var U=j||("bez_"+B+"_"+O+"_"+L+"_"+F).replace(/\./g,"p");if(r[U])return r[U];var G=new V([B,O,L,F]);return r[U]=G,G}var l=4,c=.001,u=1e-7,d=10,f=11,m=1/(f-1),y=typeof Float32Array=="function";function E(B,O){return 1-3*O+3*B}function A(B,O){return 3*O-6*B}function P(B){return 3*B}function R(B,O,L){return((E(O,L)*B+A(O,L))*B+P(O))*B}function x(B,O,L){return 3*E(O,L)*B*B+2*A(O,L)*B+P(O)}function M(B,O,L,F,j){var U,G,Y=0;do G=O+(L-O)/2,U=R(G,F,j)-B,U>0?L=G:O=G;while(Math.abs(U)>u&&++Y<d);return G}function $(B,O,L,F){for(var j=0;j<l;++j){var U=x(O,L,F);if(U===0)return O;var G=R(O,L,F)-B;O-=G/U}return O}function V(B){this._p=B,this._mSampleValues=y?new Float32Array(f):new Array(f),this._precomputed=!1,this.get=this.get.bind(this)}return V.prototype={get:function(O){var L=this._p[0],F=this._p[1],j=this._p[2],U=this._p[3];return this._precomputed||this._precompute(),L===F&&j===U?O:O===0?0:O===1?1:R(this._getTForX(O),F,U)},_precompute:function(){var O=this._p[0],L=this._p[1],F=this._p[2],j=this._p[3];this._precomputed=!0,(O!==L||F!==j)&&this._calcSampleValues()},_calcSampleValues:function(){for(var O=this._p[0],L=this._p[2],F=0;F<f;++F)this._mSampleValues[F]=R(F*m,O,L)},_getTForX:function(O){for(var L=this._p[0],F=this._p[2],j=this._mSampleValues,U=0,G=1,Y=f-1;G!==Y&&j[G]<=O;++G)U+=m;--G;var te=(O-j[G])/(j[G+1]-j[G]),ve=U+te*m,J=x(ve,L,F);return J>=c?$(O,ve,L,F):J===0?ve:M(O,U,U+m,L,F)}},o}(),pooling=function(){function o(r){return r.concat(createSizedArray(r.length))}return{double:o}}(),poolFactory=function(){return function(o,r,a){var l=0,c=o,u=createSizedArray(c),d={newElement:f,release:m};function f(){var y;return l?(l-=1,y=u[l]):y=r(),y}function m(y){l===c&&(u=pooling.double(u),c*=2),a&&a(y),u[l]=y,l+=1}return d}}(),bezierLengthPool=function(){function o(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,o)}(),segmentsLengthPool=function(){function o(){return{lengths:[],totalLength:0}}function r(a){var l,c=a.lengths.length;for(l=0;l<c;l+=1)bezierLengthPool.release(a.lengths[l]);a.lengths.length=0}return poolFactory(8,o,r)}();function bezFunction(){var o=Math;function r(P,R,x,M,$,V){var B=P*M+R*$+x*V-$*M-V*P-x*R;return B>-.001&&B<.001}function a(P,R,x,M,$,V,B,O,L){if(x===0&&V===0&&L===0)return r(P,R,M,$,B,O);var F=o.sqrt(o.pow(M-P,2)+o.pow($-R,2)+o.pow(V-x,2)),j=o.sqrt(o.pow(B-P,2)+o.pow(O-R,2)+o.pow(L-x,2)),U=o.sqrt(o.pow(B-M,2)+o.pow(O-$,2)+o.pow(L-V,2)),G;return F>j?F>U?G=F-j-U:G=U-j-F:U>j?G=U-j-F:G=j-F-U,G>-1e-4&&G<1e-4}var l=function(){return function(P,R,x,M){var $=getDefaultCurveSegments(),V,B,O,L,F,j=0,U,G=[],Y=[],te=bezierLengthPool.newElement();for(O=x.length,V=0;V<$;V+=1){for(F=V/($-1),U=0,B=0;B<O;B+=1)L=bmPow(1-F,3)*P[B]+3*bmPow(1-F,2)*F*x[B]+3*(1-F)*bmPow(F,2)*M[B]+bmPow(F,3)*R[B],G[B]=L,Y[B]!==null&&(U+=bmPow(G[B]-Y[B],2)),Y[B]=G[B];U&&(U=bmSqrt(U),j+=U),te.percents[V]=F,te.lengths[V]=j}return te.addedLength=j,te}}();function c(P){var R=segmentsLengthPool.newElement(),x=P.c,M=P.v,$=P.o,V=P.i,B,O=P._length,L=R.lengths,F=0;for(B=0;B<O-1;B+=1)L[B]=l(M[B],M[B+1],$[B],V[B+1]),F+=L[B].addedLength;return x&&O&&(L[B]=l(M[B],M[0],$[B],V[0]),F+=L[B].addedLength),R.totalLength=F,R}function u(P){this.segmentLength=0,this.points=new Array(P)}function d(P,R){this.partialLength=P,this.point=R}var f=function(){var P={};return function(R,x,M,$){var V=(R[0]+"_"+R[1]+"_"+x[0]+"_"+x[1]+"_"+M[0]+"_"+M[1]+"_"+$[0]+"_"+$[1]).replace(/\./g,"p");if(!P[V]){var B=getDefaultCurveSegments(),O,L,F,j,U,G=0,Y,te,ve=null;R.length===2&&(R[0]!==x[0]||R[1]!==x[1])&&r(R[0],R[1],x[0],x[1],R[0]+M[0],R[1]+M[1])&&r(R[0],R[1],x[0],x[1],x[0]+$[0],x[1]+$[1])&&(B=2);var J=new u(B);for(F=M.length,O=0;O<B;O+=1){for(te=createSizedArray(F),U=O/(B-1),Y=0,L=0;L<F;L+=1)j=bmPow(1-U,3)*R[L]+3*bmPow(1-U,2)*U*(R[L]+M[L])+3*(1-U)*bmPow(U,2)*(x[L]+$[L])+bmPow(U,3)*x[L],te[L]=j,ve!==null&&(Y+=bmPow(te[L]-ve[L],2));Y=bmSqrt(Y),G+=Y,J.points[O]=new d(Y,te),ve=te}J.segmentLength=G,P[V]=J}return P[V]}}();function m(P,R){var x=R.percents,M=R.lengths,$=x.length,V=bmFloor(($-1)*P),B=P*R.addedLength,O=0;if(V===$-1||V===0||B===M[V])return x[V];for(var L=M[V]>B?-1:1,F=!0;F;)if(M[V]<=B&&M[V+1]>B?(O=(B-M[V])/(M[V+1]-M[V]),F=!1):V+=L,V<0||V>=$-1){if(V===$-1)return x[V];F=!1}return x[V]+(x[V+1]-x[V])*O}function y(P,R,x,M,$,V){var B=m($,V),O=1-B,L=o.round((O*O*O*P[0]+(B*O*O+O*B*O+O*O*B)*x[0]+(B*B*O+O*B*B+B*O*B)*M[0]+B*B*B*R[0])*1e3)/1e3,F=o.round((O*O*O*P[1]+(B*O*O+O*B*O+O*O*B)*x[1]+(B*B*O+O*B*B+B*O*B)*M[1]+B*B*B*R[1])*1e3)/1e3;return[L,F]}var E=createTypedArray("float32",8);function A(P,R,x,M,$,V,B){$<0?$=0:$>1&&($=1);var O=m($,B);V=V>1?1:V;var L=m(V,B),F,j=P.length,U=1-O,G=1-L,Y=U*U*U,te=O*U*U*3,ve=O*O*U*3,J=O*O*O,Z=U*U*G,Me=O*U*G+U*O*G+U*U*L,ke=O*O*G+U*O*L+O*U*L,se=O*O*L,xe=U*G*G,Q=O*G*G+U*L*G+U*G*L,ie=O*L*G+U*L*L+O*G*L,Fe=O*L*L,Ne=G*G*G,nt=L*G*G+G*L*G+G*G*L,ct=L*L*G+G*L*L+L*G*L,pt=L*L*L;for(F=0;F<j;F+=1)E[F*4]=o.round((Y*P[F]+te*x[F]+ve*M[F]+J*R[F])*1e3)/1e3,E[F*4+1]=o.round((Z*P[F]+Me*x[F]+ke*M[F]+se*R[F])*1e3)/1e3,E[F*4+2]=o.round((xe*P[F]+Q*x[F]+ie*M[F]+Fe*R[F])*1e3)/1e3,E[F*4+3]=o.round((Ne*P[F]+nt*x[F]+ct*M[F]+pt*R[F])*1e3)/1e3;return E}return{getSegmentsLength:c,getNewSegment:A,getPointInSegment:y,buildBezierData:f,pointOnLine2D:r,pointOnLine3D:a}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(o,r){var a=this.offsetTime,l;this.propType==="multidimensional"&&(l=createTypedArray("float32",this.pv.length));for(var c=r.lastIndex,u=c,d=this.keyframes.length-1,f=!0,m,y,E;f;){if(m=this.keyframes[u],y=this.keyframes[u+1],u===d-1&&o>=y.t-a){m.h&&(m=y),c=0;break}if(y.t-a>o){c=u;break}u<d-1?u+=1:(c=0,f=!1)}E=this.keyframesMetadata[u]||{};var A,P,R,x,M,$,V=y.t-a,B=m.t-a,O;if(m.to){E.bezierData||(E.bezierData=bez.buildBezierData(m.s,y.s||m.e,m.to,m.ti));var L=E.bezierData;if(o>=V||o<B){var F=o>=V?L.points.length-1:0;for(P=L.points[F].point.length,A=0;A<P;A+=1)l[A]=L.points[F].point[A]}else{E.__fnct?$=E.__fnct:($=BezierFactory.getBezierEasing(m.o.x,m.o.y,m.i.x,m.i.y,m.n).get,E.__fnct=$),R=$((o-B)/(V-B));var j=L.segmentLength*R,U,G=r.lastFrame<o&&r._lastKeyframeIndex===u?r._lastAddedLength:0;for(M=r.lastFrame<o&&r._lastKeyframeIndex===u?r._lastPoint:0,f=!0,x=L.points.length;f;){if(G+=L.points[M].partialLength,j===0||R===0||M===L.points.length-1){for(P=L.points[M].point.length,A=0;A<P;A+=1)l[A]=L.points[M].point[A];break}else if(j>=G&&j<G+L.points[M+1].partialLength){for(U=(j-G)/L.points[M+1].partialLength,P=L.points[M].point.length,A=0;A<P;A+=1)l[A]=L.points[M].point[A]+(L.points[M+1].point[A]-L.points[M].point[A])*U;break}M<x-1?M+=1:f=!1}r._lastPoint=M,r._lastAddedLength=G-L.points[M].partialLength,r._lastKeyframeIndex=u}}else{var Y,te,ve,J,Z;if(d=m.s.length,O=y.s||m.e,this.sh&&m.h!==1)if(o>=V)l[0]=O[0],l[1]=O[1],l[2]=O[2];else if(o<=B)l[0]=m.s[0],l[1]=m.s[1],l[2]=m.s[2];else{var Me=createQuaternion(m.s),ke=createQuaternion(O),se=(o-B)/(V-B);quaternionToEuler(l,slerp(Me,ke,se))}else for(u=0;u<d;u+=1)m.h!==1&&(o>=V?R=1:o<B?R=0:(m.o.x.constructor===Array?(E.__fnct||(E.__fnct=[]),E.__fnct[u]?$=E.__fnct[u]:(Y=m.o.x[u]===void 0?m.o.x[0]:m.o.x[u],te=m.o.y[u]===void 0?m.o.y[0]:m.o.y[u],ve=m.i.x[u]===void 0?m.i.x[0]:m.i.x[u],J=m.i.y[u]===void 0?m.i.y[0]:m.i.y[u],$=BezierFactory.getBezierEasing(Y,te,ve,J).get,E.__fnct[u]=$)):E.__fnct?$=E.__fnct:(Y=m.o.x,te=m.o.y,ve=m.i.x,J=m.i.y,$=BezierFactory.getBezierEasing(Y,te,ve,J).get,m.keyframeMetadata=$),R=$((o-B)/(V-B)))),O=y.s||m.e,Z=m.h===1?m.s[u]:m.s[u]+(O[u]-m.s[u])*R,this.propType==="multidimensional"?l[u]=Z:l=Z}return r.lastIndex=c,l}function slerp(o,r,a){var l=[],c=o[0],u=o[1],d=o[2],f=o[3],m=r[0],y=r[1],E=r[2],A=r[3],P,R,x,M,$;return R=c*m+u*y+d*E+f*A,R<0&&(R=-R,m=-m,y=-y,E=-E,A=-A),1-R>1e-6?(P=Math.acos(R),x=Math.sin(P),M=Math.sin((1-a)*P)/x,$=Math.sin(a*P)/x):(M=1-a,$=a),l[0]=M*c+$*m,l[1]=M*u+$*y,l[2]=M*d+$*E,l[3]=M*f+$*A,l}function quaternionToEuler(o,r){var a=r[0],l=r[1],c=r[2],u=r[3],d=Math.atan2(2*l*u-2*a*c,1-2*l*l-2*c*c),f=Math.asin(2*a*l+2*c*u),m=Math.atan2(2*a*u-2*l*c,1-2*a*a-2*c*c);o[0]=d/degToRads,o[1]=f/degToRads,o[2]=m/degToRads}function createQuaternion(o){var r=o[0]*degToRads,a=o[1]*degToRads,l=o[2]*degToRads,c=Math.cos(r/2),u=Math.cos(a/2),d=Math.cos(l/2),f=Math.sin(r/2),m=Math.sin(a/2),y=Math.sin(l/2),E=c*u*d-f*m*y,A=f*m*d+c*u*y,P=f*u*d+c*m*y,R=c*m*d-f*u*y;return[A,P,R,E]}function getValueAtCurrentTime(){var o=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,a=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(o===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=a&&o>=a||this._caching.lastFrame<r&&o<r))){this._caching.lastFrame>=o&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var l=this.interpolateValue(o,this._caching);this.pv=l}return this._caching.lastFrame=o,this.pv}function setVValue(o){var r;if(this.propType==="unidimensional")r=o*this.mult,mathAbs(this.v-r)>1e-5&&(this.v=r,this._mdf=!0);else for(var a=0,l=this.v.length;a<l;)r=o[a]*this.mult,mathAbs(this.v[a]-r)>1e-5&&(this.v[a]=r,this._mdf=!0),a+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var o,r=this.effectsSequence.length,a=this.kf?this.pv:this.data.k;for(o=0;o<r;o+=1)a=this.effectsSequence[o](a);this.setVValue(a),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(o){this.effectsSequence.push(o),this.container.addDynamicProperty(this)}function ValueProperty(o,r,a,l){this.propType="unidimensional",this.mult=a||1,this.data=r,this.v=a?r.k*a:r.k,this.pv=r.k,this._mdf=!1,this.elem=o,this.container=l,this.comp=o.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(o,r,a,l){this.propType="multidimensional",this.mult=a||1,this.data=r,this._mdf=!1,this.elem=o,this.container=l,this.comp=o.comp,this.k=!1,this.kf=!1,this.frameId=-1;var c,u=r.k.length;for(this.v=createTypedArray("float32",u),this.pv=createTypedArray("float32",u),this.vel=createTypedArray("float32",u),c=0;c<u;c+=1)this.v[c]=r.k[c]*this.mult,this.pv[c]=r.k[c];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(o,r,a,l){this.propType="unidimensional",this.keyframes=r.k,this.keyframesMetadata=[],this.offsetTime=o.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=r,this.mult=a||1,this.elem=o,this.container=l,this.comp=o.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(o,r,a,l){this.propType="multidimensional";var c,u=r.k.length,d,f,m,y;for(c=0;c<u-1;c+=1)r.k[c].to&&r.k[c].s&&r.k[c+1]&&r.k[c+1].s&&(d=r.k[c].s,f=r.k[c+1].s,m=r.k[c].to,y=r.k[c].ti,(d.length===2&&!(d[0]===f[0]&&d[1]===f[1])&&bez.pointOnLine2D(d[0],d[1],f[0],f[1],d[0]+m[0],d[1]+m[1])&&bez.pointOnLine2D(d[0],d[1],f[0],f[1],f[0]+y[0],f[1]+y[1])||d.length===3&&!(d[0]===f[0]&&d[1]===f[1]&&d[2]===f[2])&&bez.pointOnLine3D(d[0],d[1],d[2],f[0],f[1],f[2],d[0]+m[0],d[1]+m[1],d[2]+m[2])&&bez.pointOnLine3D(d[0],d[1],d[2],f[0],f[1],f[2],f[0]+y[0],f[1]+y[1],f[2]+y[2]))&&(r.k[c].to=null,r.k[c].ti=null),d[0]===f[0]&&d[1]===f[1]&&m[0]===0&&m[1]===0&&y[0]===0&&y[1]===0&&(d.length===2||d[2]===f[2]&&m[2]===0&&y[2]===0)&&(r.k[c].to=null,r.k[c].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=r,this.keyframes=r.k,this.keyframesMetadata=[],this.offsetTime=o.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=a||1,this.elem=o,this.container=l,this.comp=o.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var E=r.k[0].s.length;for(this.v=createTypedArray("float32",E),this.pv=createTypedArray("float32",E),c=0;c<E;c+=1)this.v[c]=initFrame,this.pv[c]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",E)},this.addEffect=addEffect}var PropertyFactory=function(){function o(a,l,c,u,d){l.sid&&(l=a.globalData.slotManager.getProp(l));var f;if(!l.k.length)f=new ValueProperty(a,l,u,d);else if(typeof l.k[0]=="number")f=new MultiDimensionalProperty(a,l,u,d);else switch(c){case 0:f=new KeyframedValueProperty(a,l,u,d);break;case 1:f=new KeyframedMultidimensionalProperty(a,l,u,d);break}return f.effectsSequence.length&&d.addDynamicProperty(f),f}var r={getProp:o};return r}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(r){this.dynamicProperties.indexOf(r)===-1&&(this.dynamicProperties.push(r),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var r,a=this.dynamicProperties.length;for(r=0;r<a;r+=1)this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(r){this.container=r,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function o(){return createTypedArray("float32",2)}return poolFactory(8,o)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(o,r){this.c=o,this.setLength(r);for(var a=0;a<r;)this.v[a]=pointPool.newElement(),this.o[a]=pointPool.newElement(),this.i[a]=pointPool.newElement(),a+=1},ShapePath.prototype.setLength=function(o){for(;this._maxLength<o;)this.doubleArrayLength();this._length=o},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(o,r,a,l,c){var u;switch(this._length=Math.max(this._length,l+1),this._length>=this._maxLength&&this.doubleArrayLength(),a){case"v":u=this.v;break;case"i":u=this.i;break;case"o":u=this.o;break;default:u=[];break}(!u[l]||u[l]&&!c)&&(u[l]=pointPool.newElement()),u[l][0]=o,u[l][1]=r},ShapePath.prototype.setTripleAt=function(o,r,a,l,c,u,d,f){this.setXYAt(o,r,"v",d,f),this.setXYAt(a,l,"o",d,f),this.setXYAt(c,u,"i",d,f)},ShapePath.prototype.reverse=function(){var o=new ShapePath;o.setPathData(this.c,this._length);var r=this.v,a=this.o,l=this.i,c=0;this.c&&(o.setTripleAt(r[0][0],r[0][1],l[0][0],l[0][1],a[0][0],a[0][1],0,!1),c=1);var u=this._length-1,d=this._length,f;for(f=c;f<d;f+=1)o.setTripleAt(r[u][0],r[u][1],l[u][0],l[u][1],a[u][0],a[u][1],f,!1),u-=1;return o},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function o(){return new ShapePath}function r(c){var u=c._length,d;for(d=0;d<u;d+=1)pointPool.release(c.v[d]),pointPool.release(c.i[d]),pointPool.release(c.o[d]),c.v[d]=null,c.i[d]=null,c.o[d]=null;c._length=0,c.c=!1}function a(c){var u=l.newElement(),d,f=c._length===void 0?c.v.length:c._length;for(u.setLength(f),u.c=c.c,d=0;d<f;d+=1)u.setTripleAt(c.v[d][0],c.v[d][1],c.o[d][0],c.o[d][1],c.i[d][0],c.i[d][1],d);return u}var l=poolFactory(4,o,r);return l.clone=a,l}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(o){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=o,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var o;for(o=0;o<this._length;o+=1)shapePool.release(this.shapes[o]);this._length=0};var shapeCollectionPool=function(){var o={newShapeCollection:c,release:u},r=0,a=4,l=createSizedArray(a);function c(){var d;return r?(r-=1,d=l[r]):d=new ShapeCollection,d}function u(d){var f,m=d._length;for(f=0;f<m;f+=1)shapePool.release(d.shapes[f]);d._length=0,r===a&&(l=pooling.double(l),a*=2),l[r]=d,r+=1}return o}(),ShapePropertyFactory=function(){var o=-999999;function r(V,B,O){var L=O.lastIndex,F,j,U,G,Y,te,ve,J,Z,Me=this.keyframes;if(V<Me[0].t-this.offsetTime)F=Me[0].s[0],U=!0,L=0;else if(V>=Me[Me.length-1].t-this.offsetTime)F=Me[Me.length-1].s?Me[Me.length-1].s[0]:Me[Me.length-2].e[0],U=!0;else{for(var ke=L,se=Me.length-1,xe=!0,Q,ie,Fe;xe&&(Q=Me[ke],ie=Me[ke+1],!(ie.t-this.offsetTime>V));)ke<se-1?ke+=1:xe=!1;if(Fe=this.keyframesMetadata[ke]||{},U=Q.h===1,L=ke,!U){if(V>=ie.t-this.offsetTime)J=1;else if(V<Q.t-this.offsetTime)J=0;else{var Ne;Fe.__fnct?Ne=Fe.__fnct:(Ne=BezierFactory.getBezierEasing(Q.o.x,Q.o.y,Q.i.x,Q.i.y).get,Fe.__fnct=Ne),J=Ne((V-(Q.t-this.offsetTime))/(ie.t-this.offsetTime-(Q.t-this.offsetTime)))}j=ie.s?ie.s[0]:Q.e[0]}F=Q.s[0]}for(te=B._length,ve=F.i[0].length,O.lastIndex=L,G=0;G<te;G+=1)for(Y=0;Y<ve;Y+=1)Z=U?F.i[G][Y]:F.i[G][Y]+(j.i[G][Y]-F.i[G][Y])*J,B.i[G][Y]=Z,Z=U?F.o[G][Y]:F.o[G][Y]+(j.o[G][Y]-F.o[G][Y])*J,B.o[G][Y]=Z,Z=U?F.v[G][Y]:F.v[G][Y]+(j.v[G][Y]-F.v[G][Y])*J,B.v[G][Y]=Z}function a(){var V=this.comp.renderedFrame-this.offsetTime,B=this.keyframes[0].t-this.offsetTime,O=this.keyframes[this.keyframes.length-1].t-this.offsetTime,L=this._caching.lastFrame;return L!==o&&(L<B&&V<B||L>O&&V>O)||(this._caching.lastIndex=L<V?this._caching.lastIndex:0,this.interpolateShape(V,this.pv,this._caching)),this._caching.lastFrame=V,this.pv}function l(){this.paths=this.localShapeCollection}function c(V,B){if(V._length!==B._length||V.c!==B.c)return!1;var O,L=V._length;for(O=0;O<L;O+=1)if(V.v[O][0]!==B.v[O][0]||V.v[O][1]!==B.v[O][1]||V.o[O][0]!==B.o[O][0]||V.o[O][1]!==B.o[O][1]||V.i[O][0]!==B.i[O][0]||V.i[O][1]!==B.i[O][1])return!1;return!0}function u(V){c(this.v,V)||(this.v=shapePool.clone(V),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function d(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var V;this.kf?V=this.pv:this.data.ks?V=this.data.ks.k:V=this.data.pt.k;var B,O=this.effectsSequence.length;for(B=0;B<O;B+=1)V=this.effectsSequence[B](V);this.setVValue(V),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function f(V,B,O){this.propType="shape",this.comp=V.comp,this.container=V,this.elem=V,this.data=B,this.k=!1,this.kf=!1,this._mdf=!1;var L=O===3?B.pt.k:B.ks.k;this.v=shapePool.clone(L),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=l,this.effectsSequence=[]}function m(V){this.effectsSequence.push(V),this.container.addDynamicProperty(this)}f.prototype.interpolateShape=r,f.prototype.getValue=d,f.prototype.setVValue=u,f.prototype.addEffect=m;function y(V,B,O){this.propType="shape",this.comp=V.comp,this.elem=V,this.container=V,this.offsetTime=V.data.st,this.keyframes=O===3?B.pt.k:B.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var L=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,L),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=o,this.reset=l,this._caching={lastFrame:o,lastIndex:0},this.effectsSequence=[a.bind(this)]}y.prototype.getValue=d,y.prototype.interpolateShape=r,y.prototype.setVValue=u,y.prototype.addEffect=m;var E=function(){var V=roundCorner;function B(O,L){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=L.d,this.elem=O,this.comp=O.comp,this.frameId=-1,this.initDynamicPropertyContainer(O),this.p=PropertyFactory.getProp(O,L.p,1,0,this),this.s=PropertyFactory.getProp(O,L.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return B.prototype={reset:l,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var L=this.p.v[0],F=this.p.v[1],j=this.s.v[0]/2,U=this.s.v[1]/2,G=this.d!==3,Y=this.v;Y.v[0][0]=L,Y.v[0][1]=F-U,Y.v[1][0]=G?L+j:L-j,Y.v[1][1]=F,Y.v[2][0]=L,Y.v[2][1]=F+U,Y.v[3][0]=G?L-j:L+j,Y.v[3][1]=F,Y.i[0][0]=G?L-j*V:L+j*V,Y.i[0][1]=F-U,Y.i[1][0]=G?L+j:L-j,Y.i[1][1]=F-U*V,Y.i[2][0]=G?L+j*V:L-j*V,Y.i[2][1]=F+U,Y.i[3][0]=G?L-j:L+j,Y.i[3][1]=F+U*V,Y.o[0][0]=G?L+j*V:L-j*V,Y.o[0][1]=F-U,Y.o[1][0]=G?L+j:L-j,Y.o[1][1]=F+U*V,Y.o[2][0]=G?L-j*V:L+j*V,Y.o[2][1]=F+U,Y.o[3][0]=G?L-j:L+j,Y.o[3][1]=F-U*V}},extendPrototype([DynamicPropertyContainer],B),B}(),A=function(){function V(B,O){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=B,this.comp=B.comp,this.data=O,this.frameId=-1,this.d=O.d,this.initDynamicPropertyContainer(B),O.sy===1?(this.ir=PropertyFactory.getProp(B,O.ir,0,0,this),this.is=PropertyFactory.getProp(B,O.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(B,O.pt,0,0,this),this.p=PropertyFactory.getProp(B,O.p,1,0,this),this.r=PropertyFactory.getProp(B,O.r,0,degToRads,this),this.or=PropertyFactory.getProp(B,O.or,0,0,this),this.os=PropertyFactory.getProp(B,O.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return V.prototype={reset:l,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var O=Math.floor(this.pt.v)*2,L=Math.PI*2/O,F=!0,j=this.or.v,U=this.ir.v,G=this.os.v,Y=this.is.v,te=2*Math.PI*j/(O*2),ve=2*Math.PI*U/(O*2),J,Z,Me,ke,se=-Math.PI/2;se+=this.r.v;var xe=this.data.d===3?-1:1;for(this.v._length=0,J=0;J<O;J+=1){Z=F?j:U,Me=F?G:Y,ke=F?te:ve;var Q=Z*Math.cos(se),ie=Z*Math.sin(se),Fe=Q===0&&ie===0?0:ie/Math.sqrt(Q*Q+ie*ie),Ne=Q===0&&ie===0?0:-Q/Math.sqrt(Q*Q+ie*ie);Q+=+this.p.v[0],ie+=+this.p.v[1],this.v.setTripleAt(Q,ie,Q-Fe*ke*Me*xe,ie-Ne*ke*Me*xe,Q+Fe*ke*Me*xe,ie+Ne*ke*Me*xe,J,!0),F=!F,se+=L*xe}},convertPolygonToPath:function(){var O=Math.floor(this.pt.v),L=Math.PI*2/O,F=this.or.v,j=this.os.v,U=2*Math.PI*F/(O*4),G,Y=-Math.PI*.5,te=this.data.d===3?-1:1;for(Y+=this.r.v,this.v._length=0,G=0;G<O;G+=1){var ve=F*Math.cos(Y),J=F*Math.sin(Y),Z=ve===0&&J===0?0:J/Math.sqrt(ve*ve+J*J),Me=ve===0&&J===0?0:-ve/Math.sqrt(ve*ve+J*J);ve+=+this.p.v[0],J+=+this.p.v[1],this.v.setTripleAt(ve,J,ve-Z*U*j*te,J-Me*U*j*te,ve+Z*U*j*te,J+Me*U*j*te,G,!0),Y+=L*te}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],V),V}(),P=function(){function V(B,O){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=B,this.comp=B.comp,this.frameId=-1,this.d=O.d,this.initDynamicPropertyContainer(B),this.p=PropertyFactory.getProp(B,O.p,1,0,this),this.s=PropertyFactory.getProp(B,O.s,1,0,this),this.r=PropertyFactory.getProp(B,O.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return V.prototype={convertRectToPath:function(){var O=this.p.v[0],L=this.p.v[1],F=this.s.v[0]/2,j=this.s.v[1]/2,U=bmMin(F,j,this.r.v),G=U*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(O+F,L-j+U,O+F,L-j+U,O+F,L-j+G,0,!0),this.v.setTripleAt(O+F,L+j-U,O+F,L+j-G,O+F,L+j-U,1,!0),U!==0?(this.v.setTripleAt(O+F-U,L+j,O+F-U,L+j,O+F-G,L+j,2,!0),this.v.setTripleAt(O-F+U,L+j,O-F+G,L+j,O-F+U,L+j,3,!0),this.v.setTripleAt(O-F,L+j-U,O-F,L+j-U,O-F,L+j-G,4,!0),this.v.setTripleAt(O-F,L-j+U,O-F,L-j+G,O-F,L-j+U,5,!0),this.v.setTripleAt(O-F+U,L-j,O-F+U,L-j,O-F+G,L-j,6,!0),this.v.setTripleAt(O+F-U,L-j,O+F-G,L-j,O+F-U,L-j,7,!0)):(this.v.setTripleAt(O-F,L+j,O-F+G,L+j,O-F,L+j,2),this.v.setTripleAt(O-F,L-j,O-F,L-j+G,O-F,L-j,3))):(this.v.setTripleAt(O+F,L-j+U,O+F,L-j+G,O+F,L-j+U,0,!0),U!==0?(this.v.setTripleAt(O+F-U,L-j,O+F-U,L-j,O+F-G,L-j,1,!0),this.v.setTripleAt(O-F+U,L-j,O-F+G,L-j,O-F+U,L-j,2,!0),this.v.setTripleAt(O-F,L-j+U,O-F,L-j+U,O-F,L-j+G,3,!0),this.v.setTripleAt(O-F,L+j-U,O-F,L+j-G,O-F,L+j-U,4,!0),this.v.setTripleAt(O-F+U,L+j,O-F+U,L+j,O-F+G,L+j,5,!0),this.v.setTripleAt(O+F-U,L+j,O+F-G,L+j,O+F-U,L+j,6,!0),this.v.setTripleAt(O+F,L+j-U,O+F,L+j-U,O+F,L+j-G,7,!0)):(this.v.setTripleAt(O-F,L-j,O-F+G,L-j,O-F,L-j,1,!0),this.v.setTripleAt(O-F,L+j,O-F,L+j-G,O-F,L+j,2,!0),this.v.setTripleAt(O+F,L+j,O+F-G,L+j,O+F,L+j,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:l},extendPrototype([DynamicPropertyContainer],V),V}();function R(V,B,O){var L;if(O===3||O===4){var F=O===3?B.pt:B.ks,j=F.k;j.length?L=new y(V,B,O):L=new f(V,B,O)}else O===5?L=new P(V,B):O===6?L=new E(V,B):O===7&&(L=new A(V,B));return L.k&&V.addDynamicProperty(L),L}function x(){return f}function M(){return y}var $={};return $.getShapeProp=R,$.getConstructorFunction=x,$.getKeyframedConstructorFunction=M,$}();/*!
4496 Transformation Matrix v2.0
4497 (c) Epistemex 2014-2015
4498 www.epistemex.com
4499 By Ken Fyrstenberg
4500 Contributions by leeoniya.
4501 License: MIT, header required.
4502 */var Matrix=function(){var o=Math.cos,r=Math.sin,a=Math.tan,l=Math.round;function c(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function u(Q){if(Q===0)return this;var ie=o(Q),Fe=r(Q);return this._t(ie,-Fe,0,0,Fe,ie,0,0,0,0,1,0,0,0,0,1)}function d(Q){if(Q===0)return this;var ie=o(Q),Fe=r(Q);return this._t(1,0,0,0,0,ie,-Fe,0,0,Fe,ie,0,0,0,0,1)}function f(Q){if(Q===0)return this;var ie=o(Q),Fe=r(Q);return this._t(ie,0,Fe,0,0,1,0,0,-Fe,0,ie,0,0,0,0,1)}function m(Q){if(Q===0)return this;var ie=o(Q),Fe=r(Q);return this._t(ie,-Fe,0,0,Fe,ie,0,0,0,0,1,0,0,0,0,1)}function y(Q,ie){return this._t(1,ie,Q,1,0,0)}function E(Q,ie){return this.shear(a(Q),a(ie))}function A(Q,ie){var Fe=o(ie),Ne=r(ie);return this._t(Fe,Ne,0,0,-Ne,Fe,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,a(Q),1,0,0,0,0,1,0,0,0,0,1)._t(Fe,-Ne,0,0,Ne,Fe,0,0,0,0,1,0,0,0,0,1)}function P(Q,ie,Fe){return!Fe&&Fe!==0&&(Fe=1),Q===1&&ie===1&&Fe===1?this:this._t(Q,0,0,0,0,ie,0,0,0,0,Fe,0,0,0,0,1)}function R(Q,ie,Fe,Ne,nt,ct,pt,_t,yt,je,it,st,lt,vt,ze,Pe){return this.props[0]=Q,this.props[1]=ie,this.props[2]=Fe,this.props[3]=Ne,this.props[4]=nt,this.props[5]=ct,this.props[6]=pt,this.props[7]=_t,this.props[8]=yt,this.props[9]=je,this.props[10]=it,this.props[11]=st,this.props[12]=lt,this.props[13]=vt,this.props[14]=ze,this.props[15]=Pe,this}function x(Q,ie,Fe){return Fe=Fe||0,Q!==0||ie!==0||Fe!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,Q,ie,Fe,1):this}function M(Q,ie,Fe,Ne,nt,ct,pt,_t,yt,je,it,st,lt,vt,ze,Pe){var Se=this.props;if(Q===1&&ie===0&&Fe===0&&Ne===0&&nt===0&&ct===1&&pt===0&&_t===0&&yt===0&&je===0&&it===1&&st===0)return Se[12]=Se[12]*Q+Se[15]*lt,Se[13]=Se[13]*ct+Se[15]*vt,Se[14]=Se[14]*it+Se[15]*ze,Se[15]*=Pe,this._identityCalculated=!1,this;var Le=Se[0],qe=Se[1],He=Se[2],Ye=Se[3],ot=Se[4],et=Se[5],Qe=Se[6],Ze=Se[7],mt=Se[8],at=Se[9],ht=Se[10],dt=Se[11],bt=Se[12],At=Se[13],Ct=Se[14],qt=Se[15];return Se[0]=Le*Q+qe*nt+He*yt+Ye*lt,Se[1]=Le*ie+qe*ct+He*je+Ye*vt,Se[2]=Le*Fe+qe*pt+He*it+Ye*ze,Se[3]=Le*Ne+qe*_t+He*st+Ye*Pe,Se[4]=ot*Q+et*nt+Qe*yt+Ze*lt,Se[5]=ot*ie+et*ct+Qe*je+Ze*vt,Se[6]=ot*Fe+et*pt+Qe*it+Ze*ze,Se[7]=ot*Ne+et*_t+Qe*st+Ze*Pe,Se[8]=mt*Q+at*nt+ht*yt+dt*lt,Se[9]=mt*ie+at*ct+ht*je+dt*vt,Se[10]=mt*Fe+at*pt+ht*it+dt*ze,Se[11]=mt*Ne+at*_t+ht*st+dt*Pe,Se[12]=bt*Q+At*nt+Ct*yt+qt*lt,Se[13]=bt*ie+At*ct+Ct*je+qt*vt,Se[14]=bt*Fe+At*pt+Ct*it+qt*ze,Se[15]=bt*Ne+At*_t+Ct*st+qt*Pe,this._identityCalculated=!1,this}function $(Q){var ie=Q.props;return this.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5],ie[6],ie[7],ie[8],ie[9],ie[10],ie[11],ie[12],ie[13],ie[14],ie[15])}function V(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function B(Q){for(var ie=0;ie<16;){if(Q.props[ie]!==this.props[ie])return!1;ie+=1}return!0}function O(Q){var ie;for(ie=0;ie<16;ie+=1)Q.props[ie]=this.props[ie];return Q}function L(Q){var ie;for(ie=0;ie<16;ie+=1)this.props[ie]=Q[ie]}function F(Q,ie,Fe){return{x:Q*this.props[0]+ie*this.props[4]+Fe*this.props[8]+this.props[12],y:Q*this.props[1]+ie*this.props[5]+Fe*this.props[9]+this.props[13],z:Q*this.props[2]+ie*this.props[6]+Fe*this.props[10]+this.props[14]}}function j(Q,ie,Fe){return Q*this.props[0]+ie*this.props[4]+Fe*this.props[8]+this.props[12]}function U(Q,ie,Fe){return Q*this.props[1]+ie*this.props[5]+Fe*this.props[9]+this.props[13]}function G(Q,ie,Fe){return Q*this.props[2]+ie*this.props[6]+Fe*this.props[10]+this.props[14]}function Y(){var Q=this.props[0]*this.props[5]-this.props[1]*this.props[4],ie=this.props[5]/Q,Fe=-this.props[1]/Q,Ne=-this.props[4]/Q,nt=this.props[0]/Q,ct=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/Q,pt=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/Q,_t=new Matrix;return _t.props[0]=ie,_t.props[1]=Fe,_t.props[4]=Ne,_t.props[5]=nt,_t.props[12]=ct,_t.props[13]=pt,_t}function te(Q){var ie=this.getInverseMatrix();return ie.applyToPointArray(Q[0],Q[1],Q[2]||0)}function ve(Q){var ie,Fe=Q.length,Ne=[];for(ie=0;ie<Fe;ie+=1)Ne[ie]=te(Q[ie]);return Ne}function J(Q,ie,Fe){var Ne=createTypedArray("float32",6);if(this.isIdentity())Ne[0]=Q[0],Ne[1]=Q[1],Ne[2]=ie[0],Ne[3]=ie[1],Ne[4]=Fe[0],Ne[5]=Fe[1];else{var nt=this.props[0],ct=this.props[1],pt=this.props[4],_t=this.props[5],yt=this.props[12],je=this.props[13];Ne[0]=Q[0]*nt+Q[1]*pt+yt,Ne[1]=Q[0]*ct+Q[1]*_t+je,Ne[2]=ie[0]*nt+ie[1]*pt+yt,Ne[3]=ie[0]*ct+ie[1]*_t+je,Ne[4]=Fe[0]*nt+Fe[1]*pt+yt,Ne[5]=Fe[0]*ct+Fe[1]*_t+je}return Ne}function Z(Q,ie,Fe){var Ne;return this.isIdentity()?Ne=[Q,ie,Fe]:Ne=[Q*this.props[0]+ie*this.props[4]+Fe*this.props[8]+this.props[12],Q*this.props[1]+ie*this.props[5]+Fe*this.props[9]+this.props[13],Q*this.props[2]+ie*this.props[6]+Fe*this.props[10]+this.props[14]],Ne}function Me(Q,ie){if(this.isIdentity())return Q+","+ie;var Fe=this.props;return Math.round((Q*Fe[0]+ie*Fe[4]+Fe[12])*100)/100+","+Math.round((Q*Fe[1]+ie*Fe[5]+Fe[13])*100)/100}function ke(){for(var Q=0,ie=this.props,Fe="matrix3d(",Ne=1e4;Q<16;)Fe+=l(ie[Q]*Ne)/Ne,Fe+=Q===15?")":",",Q+=1;return Fe}function se(Q){var ie=1e4;return Q<1e-6&&Q>0||Q>-1e-6&&Q<0?l(Q*ie)/ie:Q}function xe(){var Q=this.props,ie=se(Q[0]),Fe=se(Q[1]),Ne=se(Q[4]),nt=se(Q[5]),ct=se(Q[12]),pt=se(Q[13]);return"matrix("+ie+","+Fe+","+Ne+","+nt+","+ct+","+pt+")"}return function(){this.reset=c,this.rotate=u,this.rotateX=d,this.rotateY=f,this.rotateZ=m,this.skew=E,this.skewFromAxis=A,this.shear=y,this.scale=P,this.setTransform=R,this.translate=x,this.transform=M,this.multiply=$,this.applyToPoint=F,this.applyToX=j,this.applyToY=U,this.applyToZ=G,this.applyToPointArray=Z,this.applyToTriplePoints=J,this.applyToPointStringified=Me,this.toCSS=ke,this.to2dCSS=xe,this.clone=O,this.cloneFromProps=L,this.equals=B,this.inversePoints=ve,this.inversePoint=te,this.getInverseMatrix=Y,this._t=this.transform,this.isIdentity=V,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(a){return typeof a}:_typeof$3=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof$3(o)}var lottie={};function setLocation(o){setLocationHref(o)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(o){setSubframeEnabled(o)}function setPrefix(o){setIdPrefix(o)}function loadAnimation(o){return animationManager.loadAnimation(o)}function setQuality(o){if(typeof o=="string")switch(o){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(o)&&o>1&&setDefaultCurveSegments(o)}function inBrowser(){return typeof navigator<"u"}function installPlugin(o,r){o==="expressions"&&setExpressionsPlugin(r)}function getFactory(o){switch(o){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(o){for(var r=queryString.split("&"),a=0;a<r.length;a+=1){var l=r[a].split("=");if(decodeURIComponent(l[0])==o)return decodeURIComponent(l[1])}return null}var queryString="";{var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(o){}var ShapeModifiers=function(){var o={},r={};o.registerModifier=a,o.getModifier=l;function a(c,u){r[c]||(r[c]=u)}function l(c,u,d){return new r[c](u,d)}return o}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(o){if(!this.closed){o.sh.container.addDynamicProperty(o.sh);var r={shape:o.sh,data:o,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(r),this.addShapeToModifier(r),this._isAnimated&&o.setAsAnimated()}},ShapeModifier.prototype.init=function(o,r){this.shapes=[],this.elem=o,this.initDynamicPropertyContainer(o),this.initModifierProperties(o,r),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(o,r){this.s=PropertyFactory.getProp(o,r.s,0,.01,this),this.e=PropertyFactory.getProp(o,r.e,0,.01,this),this.o=PropertyFactory.getProp(o,r.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=r.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(o){o.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(o,r,a,l,c){var u=[];r<=1?u.push({s:o,e:r}):o>=1?u.push({s:o-1,e:r-1}):(u.push({s:o,e:1}),u.push({s:0,e:r-1}));var d=[],f,m=u.length,y;for(f=0;f<m;f+=1)if(y=u[f],!(y.e*c<l||y.s*c>l+a)){var E,A;y.s*c<=l?E=0:E=(y.s*c-l)/a,y.e*c>=l+a?A=1:A=(y.e*c-l)/a,d.push([E,A])}return d.length||d.push([0,0]),d},TrimModifier.prototype.releasePathsData=function(o){var r,a=o.length;for(r=0;r<a;r+=1)segmentsLengthPool.release(o[r]);return o.length=0,o},TrimModifier.prototype.processShapes=function(o){var r,a;if(this._mdf||o){var l=this.o.v%360/360;if(l<0&&(l+=1),this.s.v>1?r=1+l:this.s.v<0?r=0+l:r=this.s.v+l,this.e.v>1?a=1+l:this.e.v<0?a=0+l:a=this.e.v+l,r>a){var c=r;r=a,a=c}r=Math.round(r*1e4)*1e-4,a=Math.round(a*1e4)*1e-4,this.sValue=r,this.eValue=a}else r=this.sValue,a=this.eValue;var u,d,f=this.shapes.length,m,y,E,A,P,R=0;if(a===r)for(d=0;d<f;d+=1)this.shapes[d].localShapeCollection.releaseShapes(),this.shapes[d].shape._mdf=!0,this.shapes[d].shape.paths=this.shapes[d].localShapeCollection,this._mdf&&(this.shapes[d].pathsData.length=0);else if(a===1&&r===0||a===0&&r===1){if(this._mdf)for(d=0;d<f;d+=1)this.shapes[d].pathsData.length=0,this.shapes[d].shape._mdf=!0}else{var x=[],M,$;for(d=0;d<f;d+=1)if(M=this.shapes[d],!M.shape._mdf&&!this._mdf&&!o&&this.m!==2)M.shape.paths=M.localShapeCollection;else{if(u=M.shape.paths,y=u._length,P=0,!M.shape._mdf&&M.pathsData.length)P=M.totalShapeLength;else{for(E=this.releasePathsData(M.pathsData),m=0;m<y;m+=1)A=bez.getSegmentsLength(u.shapes[m]),E.push(A),P+=A.totalLength;M.totalShapeLength=P,M.pathsData=E}R+=P,M.shape._mdf=!0}var V=r,B=a,O=0,L;for(d=f-1;d>=0;d-=1)if(M=this.shapes[d],M.shape._mdf){for($=M.localShapeCollection,$.releaseShapes(),this.m===2&&f>1?(L=this.calculateShapeEdges(r,a,M.totalShapeLength,O,R),O+=M.totalShapeLength):L=[[V,B]],y=L.length,m=0;m<y;m+=1){V=L[m][0],B=L[m][1],x.length=0,B<=1?x.push({s:M.totalShapeLength*V,e:M.totalShapeLength*B}):V>=1?x.push({s:M.totalShapeLength*(V-1),e:M.totalShapeLength*(B-1)}):(x.push({s:M.totalShapeLength*V,e:M.totalShapeLength}),x.push({s:0,e:M.totalShapeLength*(B-1)}));var F=this.addShapes(M,x[0]);if(x[0].s!==x[0].e){if(x.length>1){var j=M.shape.paths.shapes[M.shape.paths._length-1];if(j.c){var U=F.pop();this.addPaths(F,$),F=this.addShapes(M,x[1],U)}else this.addPaths(F,$),F=this.addShapes(M,x[1])}this.addPaths(F,$)}}M.shape.paths=$}}},TrimModifier.prototype.addPaths=function(o,r){var a,l=o.length;for(a=0;a<l;a+=1)r.addShape(o[a])},TrimModifier.prototype.addSegment=function(o,r,a,l,c,u,d){c.setXYAt(r[0],r[1],"o",u),c.setXYAt(a[0],a[1],"i",u+1),d&&c.setXYAt(o[0],o[1],"v",u),c.setXYAt(l[0],l[1],"v",u+1)},TrimModifier.prototype.addSegmentFromArray=function(o,r,a,l){r.setXYAt(o[1],o[5],"o",a),r.setXYAt(o[2],o[6],"i",a+1),l&&r.setXYAt(o[0],o[4],"v",a),r.setXYAt(o[3],o[7],"v",a+1)},TrimModifier.prototype.addShapes=function(o,r,a){var l=o.pathsData,c=o.shape.paths.shapes,u,d=o.shape.paths._length,f,m,y=0,E,A,P,R,x=[],M,$=!0;for(a?(A=a._length,M=a._length):(a=shapePool.newElement(),A=0,M=0),x.push(a),u=0;u<d;u+=1){for(P=l[u].lengths,a.c=c[u].c,m=c[u].c?P.length:P.length+1,f=1;f<m;f+=1)if(E=P[f-1],y+E.addedLength<r.s)y+=E.addedLength,a.c=!1;else if(y>r.e){a.c=!1;break}else r.s<=y&&r.e>=y+E.addedLength?(this.addSegment(c[u].v[f-1],c[u].o[f-1],c[u].i[f],c[u].v[f],a,A,$),$=!1):(R=bez.getNewSegment(c[u].v[f-1],c[u].v[f],c[u].o[f-1],c[u].i[f],(r.s-y)/E.addedLength,(r.e-y)/E.addedLength,P[f-1]),this.addSegmentFromArray(R,a,A,$),$=!1,a.c=!1),y+=E.addedLength,A+=1;if(c[u].c&&P.length){if(E=P[f-1],y<=r.e){var V=P[f-1].addedLength;r.s<=y&&r.e>=y+V?(this.addSegment(c[u].v[f-1],c[u].o[f-1],c[u].i[0],c[u].v[0],a,A,$),$=!1):(R=bez.getNewSegment(c[u].v[f-1],c[u].v[0],c[u].o[f-1],c[u].i[0],(r.s-y)/V,(r.e-y)/V,P[f-1]),this.addSegmentFromArray(R,a,A,$),$=!1,a.c=!1)}else a.c=!1;y+=E.addedLength,A+=1}if(a._length&&(a.setXYAt(a.v[M][0],a.v[M][1],"i",M),a.setXYAt(a.v[a._length-1][0],a.v[a._length-1][1],"o",a._length-1)),y>r.e)break;u<d-1&&(a=shapePool.newElement(),$=!0,x.push(a),A=0)}return x};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(o,r){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(o,r.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(o,r){var a=r/100,l=[0,0],c=o._length,u=0;for(u=0;u<c;u+=1)l[0]+=o.v[u][0],l[1]+=o.v[u][1];l[0]/=c,l[1]/=c;var d=shapePool.newElement();d.c=o.c;var f,m,y,E,A,P;for(u=0;u<c;u+=1)f=o.v[u][0]+(l[0]-o.v[u][0])*a,m=o.v[u][1]+(l[1]-o.v[u][1])*a,y=o.o[u][0]+(l[0]-o.o[u][0])*-a,E=o.o[u][1]+(l[1]-o.o[u][1])*-a,A=o.i[u][0]+(l[0]-o.i[u][0])*-a,P=o.i[u][1]+(l[1]-o.i[u][1])*-a,d.setTripleAt(f,m,y,E,A,P,u);return d},PuckerAndBloatModifier.prototype.processShapes=function(o){var r,a,l=this.shapes.length,c,u,d=this.amount.v;if(d!==0){var f,m;for(a=0;a<l;a+=1){if(f=this.shapes[a],m=f.localShapeCollection,!(!f.shape._mdf&&!this._mdf&&!o))for(m.releaseShapes(),f.shape._mdf=!0,r=f.shape.paths.shapes,u=f.shape.paths._length,c=0;c<u;c+=1)m.addShape(this.processPath(r[c],d));f.shape.paths=f.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var o=[0,0];function r(m){var y=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||y,this.a&&m.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&m.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&m.skewFromAxis(-this.sk.v,this.sa.v),this.r?m.rotate(-this.r.v):m.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?m.translate(this.px.v,this.py.v,-this.pz.v):m.translate(this.px.v,this.py.v,0):m.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function a(m){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||m){var y;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var E,A;if(y=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(E=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/y,0),A=this.p.getValueAtTime(this.p.keyframes[0].t/y,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(E=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/y,0),A=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/y,0)):(E=this.p.pv,A=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/y,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){E=[],A=[];var P=this.px,R=this.py;P._caching.lastFrame+P.offsetTime<=P.keyframes[0].t?(E[0]=P.getValueAtTime((P.keyframes[0].t+.01)/y,0),E[1]=R.getValueAtTime((R.keyframes[0].t+.01)/y,0),A[0]=P.getValueAtTime(P.keyframes[0].t/y,0),A[1]=R.getValueAtTime(R.keyframes[0].t/y,0)):P._caching.lastFrame+P.offsetTime>=P.keyframes[P.keyframes.length-1].t?(E[0]=P.getValueAtTime(P.keyframes[P.keyframes.length-1].t/y,0),E[1]=R.getValueAtTime(R.keyframes[R.keyframes.length-1].t/y,0),A[0]=P.getValueAtTime((P.keyframes[P.keyframes.length-1].t-.01)/y,0),A[1]=R.getValueAtTime((R.keyframes[R.keyframes.length-1].t-.01)/y,0)):(E=[P.pv,R.pv],A[0]=P.getValueAtTime((P._caching.lastFrame+P.offsetTime-.01)/y,P.offsetTime),A[1]=R.getValueAtTime((R._caching.lastFrame+R.offsetTime-.01)/y,R.offsetTime))}else A=o,E=A;this.v.rotate(-Math.atan2(E[1]-A[1],E[0]-A[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function l(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function c(){}function u(m){this._addDynamicProperty(m),this.elem.addDynamicProperty(m),this._isDirty=!0}function d(m,y,E){if(this.elem=m,this.frameId=-1,this.propType="transform",this.data=y,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(E||m),y.p&&y.p.s?(this.px=PropertyFactory.getProp(m,y.p.x,0,0,this),this.py=PropertyFactory.getProp(m,y.p.y,0,0,this),y.p.z&&(this.pz=PropertyFactory.getProp(m,y.p.z,0,0,this))):this.p=PropertyFactory.getProp(m,y.p||{k:[0,0,0]},1,0,this),y.rx){if(this.rx=PropertyFactory.getProp(m,y.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(m,y.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(m,y.rz,0,degToRads,this),y.or.k[0].ti){var A,P=y.or.k.length;for(A=0;A<P;A+=1)y.or.k[A].to=null,y.or.k[A].ti=null}this.or=PropertyFactory.getProp(m,y.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(m,y.r||{k:0},0,degToRads,this);y.sk&&(this.sk=PropertyFactory.getProp(m,y.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(m,y.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(m,y.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(m,y.s||{k:[100,100,100]},1,.01,this),y.o?this.o=PropertyFactory.getProp(m,y.o,0,.01,m):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}d.prototype={applyToMatrix:r,getValue:a,precalculateMatrix:l,autoOrient:c},extendPrototype([DynamicPropertyContainer],d),d.prototype.addDynamicProperty=u,d.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function f(m,y,E){return new d(m,y,E)}return{getTransformProperty:f}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(o,r){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(o,r.c,0,null,this),this.o=PropertyFactory.getProp(o,r.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(o,r.tr,this),this.so=PropertyFactory.getProp(o,r.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(o,r.tr.eo,0,.01,this),this.data=r,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(o,r,a,l,c,u){var d=u?-1:1,f=l.s.v[0]+(1-l.s.v[0])*(1-c),m=l.s.v[1]+(1-l.s.v[1])*(1-c);o.translate(l.p.v[0]*d*c,l.p.v[1]*d*c,l.p.v[2]),r.translate(-l.a.v[0],-l.a.v[1],l.a.v[2]),r.rotate(-l.r.v*d*c),r.translate(l.a.v[0],l.a.v[1],l.a.v[2]),a.translate(-l.a.v[0],-l.a.v[1],l.a.v[2]),a.scale(u?1/f:f,u?1/m:m),a.translate(l.a.v[0],l.a.v[1],l.a.v[2])},RepeaterModifier.prototype.init=function(o,r,a,l){for(this.elem=o,this.arr=r,this.pos=a,this.elemsData=l,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(o),this.initModifierProperties(o,r[a]);a>0;)a-=1,this._elements.unshift(r[a]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(o){var r,a=o.length;for(r=0;r<a;r+=1)o[r]._processed=!1,o[r].ty==="gr"&&this.resetElements(o[r].it)},RepeaterModifier.prototype.cloneElements=function(o){var r=JSON.parse(JSON.stringify(o));return this.resetElements(r),r},RepeaterModifier.prototype.changeGroupRender=function(o,r){var a,l=o.length;for(a=0;a<l;a+=1)o[a]._render=r,o[a].ty==="gr"&&this.changeGroupRender(o[a].it,r)},RepeaterModifier.prototype.processShapes=function(o){var r,a,l,c,u,d=!1;if(this._mdf||o){var f=Math.ceil(this.c.v);if(this._groups.length<f){for(;this._groups.length<f;){var m={it:this.cloneElements(this._elements),ty:"gr"};m.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,m),this._groups.splice(0,0,m),this._currentCopies+=1}this.elem.reloadShapes(),d=!0}u=0;var y;for(l=0;l<=this._groups.length-1;l+=1){if(y=u<f,this._groups[l]._render=y,this.changeGroupRender(this._groups[l].it,y),!y){var E=this.elemsData[l].it,A=E[E.length-1];A.transform.op.v!==0?(A.transform.op._mdf=!0,A.transform.op.v=0):A.transform.op._mdf=!1}u+=1}this._currentCopies=f;var P=this.o.v,R=P%1,x=P>0?Math.floor(P):Math.ceil(P),M=this.pMatrix.props,$=this.rMatrix.props,V=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var B=0;if(P>0){for(;B<x;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),B+=1;R&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,R,!1),B+=R)}else if(P<0){for(;B>x;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),B-=1;R&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-R,!0),B-=R)}l=this.data.m===1?0:this._currentCopies-1,c=this.data.m===1?1:-1,u=this._currentCopies;for(var O,L;u;){if(r=this.elemsData[l].it,a=r[r.length-1].transform.mProps.v.props,L=a.length,r[r.length-1].transform.mProps._mdf=!0,r[r.length-1].transform.op._mdf=!0,r[r.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(l/(this._currentCopies-1)),B!==0){for((l!==0&&c===1||l!==this._currentCopies-1&&c===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15]),this.matrix.transform(V[0],V[1],V[2],V[3],V[4],V[5],V[6],V[7],V[8],V[9],V[10],V[11],V[12],V[13],V[14],V[15]),this.matrix.transform(M[0],M[1],M[2],M[3],M[4],M[5],M[6],M[7],M[8],M[9],M[10],M[11],M[12],M[13],M[14],M[15]),O=0;O<L;O+=1)a[O]=this.matrix.props[O];this.matrix.reset()}else for(this.matrix.reset(),O=0;O<L;O+=1)a[O]=this.matrix.props[O];B+=1,u-=1,l+=c}}else for(u=this._currentCopies,l=0,c=1;u;)r=this.elemsData[l].it,a=r[r.length-1].transform.mProps.v.props,r[r.length-1].transform.mProps._mdf=!1,r[r.length-1].transform.op._mdf=!1,u-=1,l+=c;return d},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(o,r){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(o,r.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(o,r){var a=shapePool.newElement();a.c=o.c;var l,c=o._length,u,d,f,m,y,E,A=0,P,R,x,M,$,V;for(l=0;l<c;l+=1)u=o.v[l],f=o.o[l],d=o.i[l],u[0]===f[0]&&u[1]===f[1]&&u[0]===d[0]&&u[1]===d[1]?(l===0||l===c-1)&&!o.c?(a.setTripleAt(u[0],u[1],f[0],f[1],d[0],d[1],A),A+=1):(l===0?m=o.v[c-1]:m=o.v[l-1],y=Math.sqrt(Math.pow(u[0]-m[0],2)+Math.pow(u[1]-m[1],2)),E=y?Math.min(y/2,r)/y:0,$=u[0]+(m[0]-u[0])*E,P=$,V=u[1]-(u[1]-m[1])*E,R=V,x=P-(P-u[0])*roundCorner,M=R-(R-u[1])*roundCorner,a.setTripleAt(P,R,x,M,$,V,A),A+=1,l===c-1?m=o.v[0]:m=o.v[l+1],y=Math.sqrt(Math.pow(u[0]-m[0],2)+Math.pow(u[1]-m[1],2)),E=y?Math.min(y/2,r)/y:0,x=u[0]+(m[0]-u[0])*E,P=x,M=u[1]+(m[1]-u[1])*E,R=M,$=P-(P-u[0])*roundCorner,V=R-(R-u[1])*roundCorner,a.setTripleAt(P,R,x,M,$,V,A),A+=1):(a.setTripleAt(o.v[l][0],o.v[l][1],o.o[l][0],o.o[l][1],o.i[l][0],o.i[l][1],A),A+=1);return a},RoundCornersModifier.prototype.processShapes=function(o){var r,a,l=this.shapes.length,c,u,d=this.rd.v;if(d!==0){var f,m;for(a=0;a<l;a+=1){if(f=this.shapes[a],m=f.localShapeCollection,!(!f.shape._mdf&&!this._mdf&&!o))for(m.releaseShapes(),f.shape._mdf=!0,r=f.shape.paths.shapes,u=f.shape.paths._length,c=0;c<u;c+=1)m.addShape(this.processPath(r[c],d));f.shape.paths=f.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(o,r){return Math.abs(o-r)*1e5<=Math.min(Math.abs(o),Math.abs(r))}function floatZero(o){return Math.abs(o)<=1e-5}function lerp(o,r,a){return o*(1-a)+r*a}function lerpPoint(o,r,a){return[lerp(o[0],r[0],a),lerp(o[1],r[1],a)]}function quadRoots(o,r,a){if(o===0)return[];var l=r*r-4*o*a;if(l<0)return[];var c=-r/(2*o);if(l===0)return[c];var u=Math.sqrt(l)/(2*o);return[c-u,c+u]}function polynomialCoefficients(o,r,a,l){return[-o+3*r-3*a+l,3*o-6*r+3*a,-3*o+3*r,o]}function singlePoint(o){return new PolynomialBezier(o,o,o,o,!1)}function PolynomialBezier(o,r,a,l,c){c&&pointEqual(o,r)&&(r=lerpPoint(o,l,1/3)),c&&pointEqual(a,l)&&(a=lerpPoint(o,l,2/3));var u=polynomialCoefficients(o[0],r[0],a[0],l[0]),d=polynomialCoefficients(o[1],r[1],a[1],l[1]);this.a=[u[0],d[0]],this.b=[u[1],d[1]],this.c=[u[2],d[2]],this.d=[u[3],d[3]],this.points=[o,r,a,l]}PolynomialBezier.prototype.point=function(o){return[((this.a[0]*o+this.b[0])*o+this.c[0])*o+this.d[0],((this.a[1]*o+this.b[1])*o+this.c[1])*o+this.d[1]]},PolynomialBezier.prototype.derivative=function(o){return[(3*o*this.a[0]+2*this.b[0])*o+this.c[0],(3*o*this.a[1]+2*this.b[1])*o+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(o){var r=this.derivative(o);return Math.atan2(r[1],r[0])},PolynomialBezier.prototype.normalAngle=function(o){var r=this.derivative(o);return Math.atan2(r[0],r[1])},PolynomialBezier.prototype.inflectionPoints=function(){var o=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(o))return[];var r=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/o,a=r*r-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/o;if(a<0)return[];var l=Math.sqrt(a);return floatZero(l)?l>0&&l<1?[r]:[]:[r-l,r+l].filter(function(c){return c>0&&c<1})},PolynomialBezier.prototype.split=function(o){if(o<=0)return[singlePoint(this.points[0]),this];if(o>=1)return[this,singlePoint(this.points[this.points.length-1])];var r=lerpPoint(this.points[0],this.points[1],o),a=lerpPoint(this.points[1],this.points[2],o),l=lerpPoint(this.points[2],this.points[3],o),c=lerpPoint(r,a,o),u=lerpPoint(a,l,o),d=lerpPoint(c,u,o);return[new PolynomialBezier(this.points[0],r,c,d,!0),new PolynomialBezier(d,u,l,this.points[3],!0)]};function extrema(o,r){var a=o.points[0][r],l=o.points[o.points.length-1][r];if(a>l){var c=l;l=a,a=c}for(var u=quadRoots(3*o.a[r],2*o.b[r],o.c[r]),d=0;d<u.length;d+=1)if(u[d]>0&&u[d]<1){var f=o.point(u[d])[r];f<a?a=f:f>l&&(l=f)}return{min:a,max:l}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var o=this.bounds();return{left:o.x.min,right:o.x.max,top:o.y.min,bottom:o.y.max,width:o.x.max-o.x.min,height:o.y.max-o.y.min,cx:(o.x.max+o.x.min)/2,cy:(o.y.max+o.y.min)/2}};function intersectData(o,r,a){var l=o.boundingBox();return{cx:l.cx,cy:l.cy,width:l.width,height:l.height,bez:o,t:(r+a)/2,t1:r,t2:a}}function splitData(o){var r=o.bez.split(.5);return[intersectData(r[0],o.t1,o.t),intersectData(r[1],o.t,o.t2)]}function boxIntersect(o,r){return Math.abs(o.cx-r.cx)*2<o.width+r.width&&Math.abs(o.cy-r.cy)*2<o.height+r.height}function intersectsImpl(o,r,a,l,c,u){if(boxIntersect(o,r)){if(a>=u||o.width<=l&&o.height<=l&&r.width<=l&&r.height<=l){c.push([o.t,r.t]);return}var d=splitData(o),f=splitData(r);intersectsImpl(d[0],f[0],a+1,l,c,u),intersectsImpl(d[0],f[1],a+1,l,c,u),intersectsImpl(d[1],f[0],a+1,l,c,u),intersectsImpl(d[1],f[1],a+1,l,c,u)}}PolynomialBezier.prototype.intersections=function(o,r,a){r===void 0&&(r=2),a===void 0&&(a=7);var l=[];return intersectsImpl(intersectData(this,0,1),intersectData(o,0,1),0,r,l,a),l},PolynomialBezier.shapeSegment=function(o,r){var a=(r+1)%o.length();return new PolynomialBezier(o.v[r],o.o[r],o.i[a],o.v[a],!0)},PolynomialBezier.shapeSegmentInverted=function(o,r){var a=(r+1)%o.length();return new PolynomialBezier(o.v[a],o.i[a],o.o[r],o.v[r],!0)};function crossProduct(o,r){return[o[1]*r[2]-o[2]*r[1],o[2]*r[0]-o[0]*r[2],o[0]*r[1]-o[1]*r[0]]}function lineIntersection(o,r,a,l){var c=[o[0],o[1],1],u=[r[0],r[1],1],d=[a[0],a[1],1],f=[l[0],l[1],1],m=crossProduct(crossProduct(c,u),crossProduct(d,f));return floatZero(m[2])?null:[m[0]/m[2],m[1]/m[2]]}function polarOffset(o,r,a){return[o[0]+Math.cos(r)*a,o[1]-Math.sin(r)*a]}function pointDistance(o,r){return Math.hypot(o[0]-r[0],o[1]-r[1])}function pointEqual(o,r){return floatEqual(o[0],r[0])&&floatEqual(o[1],r[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(o,r){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(o,r.s,0,null,this),this.frequency=PropertyFactory.getProp(o,r.r,0,null,this),this.pointsType=PropertyFactory.getProp(o,r.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(o,r,a,l,c,u,d){var f=a-Math.PI/2,m=a+Math.PI/2,y=r[0]+Math.cos(a)*l*c,E=r[1]-Math.sin(a)*l*c;o.setTripleAt(y,E,y+Math.cos(f)*u,E-Math.sin(f)*u,y+Math.cos(m)*d,E-Math.sin(m)*d,o.length())}function getPerpendicularVector(o,r){var a=[r[0]-o[0],r[1]-o[1]],l=-Math.PI*.5,c=[Math.cos(l)*a[0]-Math.sin(l)*a[1],Math.sin(l)*a[0]+Math.cos(l)*a[1]];return c}function getProjectingAngle(o,r){var a=r===0?o.length()-1:r-1,l=(r+1)%o.length(),c=o.v[a],u=o.v[l],d=getPerpendicularVector(c,u);return Math.atan2(0,1)-Math.atan2(d[1],d[0])}function zigZagCorner(o,r,a,l,c,u,d){var f=getProjectingAngle(r,a),m=r.v[a%r._length],y=r.v[a===0?r._length-1:a-1],E=r.v[(a+1)%r._length],A=u===2?Math.sqrt(Math.pow(m[0]-y[0],2)+Math.pow(m[1]-y[1],2)):0,P=u===2?Math.sqrt(Math.pow(m[0]-E[0],2)+Math.pow(m[1]-E[1],2)):0;setPoint(o,r.v[a%r._length],f,d,l,P/((c+1)*2),A/((c+1)*2))}function zigZagSegment(o,r,a,l,c,u){for(var d=0;d<l;d+=1){var f=(d+1)/(l+1),m=c===2?Math.sqrt(Math.pow(r.points[3][0]-r.points[0][0],2)+Math.pow(r.points[3][1]-r.points[0][1],2)):0,y=r.normalAngle(f),E=r.point(f);setPoint(o,E,y,u,a,m/((l+1)*2),m/((l+1)*2)),u=-u}return u}ZigZagModifier.prototype.processPath=function(o,r,a,l){var c=o._length,u=shapePool.newElement();if(u.c=o.c,o.c||(c-=1),c===0)return u;var d=-1,f=PolynomialBezier.shapeSegment(o,0);zigZagCorner(u,o,0,r,a,l,d);for(var m=0;m<c;m+=1)d=zigZagSegment(u,f,r,a,l,-d),m===c-1&&!o.c?f=null:f=PolynomialBezier.shapeSegment(o,(m+1)%c),zigZagCorner(u,o,m+1,r,a,l,d);return u},ZigZagModifier.prototype.processShapes=function(o){var r,a,l=this.shapes.length,c,u,d=this.amplitude.v,f=Math.max(0,Math.round(this.frequency.v)),m=this.pointsType.v;if(d!==0){var y,E;for(a=0;a<l;a+=1){if(y=this.shapes[a],E=y.localShapeCollection,!(!y.shape._mdf&&!this._mdf&&!o))for(E.releaseShapes(),y.shape._mdf=!0,r=y.shape.paths.shapes,u=y.shape.paths._length,c=0;c<u;c+=1)E.addShape(this.processPath(r[c],d,f,m));y.shape.paths=y.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(o,r,a){var l=Math.atan2(r[0]-o[0],r[1]-o[1]);return[polarOffset(o,l,a),polarOffset(r,l,a)]}function offsetSegment(o,r){var a,l,c,u,d,f,m;m=linearOffset(o.points[0],o.points[1],r),a=m[0],l=m[1],m=linearOffset(o.points[1],o.points[2],r),c=m[0],u=m[1],m=linearOffset(o.points[2],o.points[3],r),d=m[0],f=m[1];var y=lineIntersection(a,l,c,u);y===null&&(y=l);var E=lineIntersection(d,f,c,u);return E===null&&(E=d),new PolynomialBezier(a,y,E,f)}function joinLines(o,r,a,l,c){var u=r.points[3],d=a.points[0];if(l===3||pointEqual(u,d))return u;if(l===2){var f=-r.tangentAngle(1),m=-a.tangentAngle(0)+Math.PI,y=lineIntersection(u,polarOffset(u,f+Math.PI/2,100),d,polarOffset(d,f+Math.PI/2,100)),E=y?pointDistance(y,u):pointDistance(u,d)/2,A=polarOffset(u,f,2*E*roundCorner);return o.setXYAt(A[0],A[1],"o",o.length()-1),A=polarOffset(d,m,2*E*roundCorner),o.setTripleAt(d[0],d[1],d[0],d[1],A[0],A[1],o.length()),d}var P=pointEqual(u,r.points[2])?r.points[0]:r.points[2],R=pointEqual(d,a.points[1])?a.points[3]:a.points[1],x=lineIntersection(P,u,d,R);return x&&pointDistance(x,u)<c?(o.setTripleAt(x[0],x[1],x[0],x[1],x[0],x[1],o.length()),x):u}function getIntersection(o,r){var a=o.intersections(r);return a.length&&floatEqual(a[0][0],1)&&a.shift(),a.length?a[0]:null}function pruneSegmentIntersection(o,r){var a=o.slice(),l=r.slice(),c=getIntersection(o[o.length-1],r[0]);return c&&(a[o.length-1]=o[o.length-1].split(c[0])[0],l[0]=r[0].split(c[1])[1]),o.length>1&&r.length>1&&(c=getIntersection(o[0],r[r.length-1]),c)?[[o[0].split(c[0])[0]],[r[r.length-1].split(c[1])[1]]]:[a,l]}function pruneIntersections(o){for(var r,a=1;a<o.length;a+=1)r=pruneSegmentIntersection(o[a-1],o[a]),o[a-1]=r[0],o[a]=r[1];return o.length>1&&(r=pruneSegmentIntersection(o[o.length-1],o[0]),o[o.length-1]=r[0],o[0]=r[1]),o}function offsetSegmentSplit(o,r){var a=o.inflectionPoints(),l,c,u,d;if(a.length===0)return[offsetSegment(o,r)];if(a.length===1||floatEqual(a[1],1))return u=o.split(a[0]),l=u[0],c=u[1],[offsetSegment(l,r),offsetSegment(c,r)];u=o.split(a[0]),l=u[0];var f=(a[1]-a[0])/(1-a[0]);return u=u[1].split(f),d=u[0],c=u[1],[offsetSegment(l,r),offsetSegment(d,r),offsetSegment(c,r)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(o,r){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(o,r.a,0,null,this),this.miterLimit=PropertyFactory.getProp(o,r.ml,0,null,this),this.lineJoin=r.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(o,r,a,l){var c=shapePool.newElement();c.c=o.c;var u=o.length();o.c||(u-=1);var d,f,m,y=[];for(d=0;d<u;d+=1)m=PolynomialBezier.shapeSegment(o,d),y.push(offsetSegmentSplit(m,r));if(!o.c)for(d=u-1;d>=0;d-=1)m=PolynomialBezier.shapeSegmentInverted(o,d),y.push(offsetSegmentSplit(m,r));y=pruneIntersections(y);var E=null,A=null;for(d=0;d<y.length;d+=1){var P=y[d];for(A&&(E=joinLines(c,A,P[0],a,l)),A=P[P.length-1],f=0;f<P.length;f+=1)m=P[f],E&&pointEqual(m.points[0],E)?c.setXYAt(m.points[1][0],m.points[1][1],"o",c.length()-1):c.setTripleAt(m.points[0][0],m.points[0][1],m.points[1][0],m.points[1][1],m.points[0][0],m.points[0][1],c.length()),c.setTripleAt(m.points[3][0],m.points[3][1],m.points[3][0],m.points[3][1],m.points[2][0],m.points[2][1],c.length()),E=m.points[3]}return y.length&&joinLines(c,A,y[0][0],a,l),c},OffsetPathModifier.prototype.processShapes=function(o){var r,a,l=this.shapes.length,c,u,d=this.amount.v,f=this.miterLimit.v,m=this.lineJoin;if(d!==0){var y,E;for(a=0;a<l;a+=1){if(y=this.shapes[a],E=y.localShapeCollection,!(!y.shape._mdf&&!this._mdf&&!o))for(E.releaseShapes(),y.shape._mdf=!0,r=y.shape.paths.shapes,u=y.shape.paths._length,c=0;c<u;c+=1)E.addShape(this.processPath(r[c],d,m,f));y.shape.paths=y.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(o){for(var r=o.fStyle?o.fStyle.split(" "):[],a="normal",l="normal",c=r.length,u,d=0;d<c;d+=1)switch(u=r[d].toLowerCase(),u){case"italic":l="italic";break;case"bold":a="700";break;case"black":a="900";break;case"medium":a="500";break;case"regular":case"normal":a="400";break;case"light":case"thin":a="200";break}return{style:l,weight:o.fWeight||a}}var FontManager=function(){var o=5e3,r={w:0,size:0,shapes:[],data:{shapes:[]}},a=[];a=a.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var l=127988,c=917631,u=917601,d=917626,f=65039,m=8205,y=127462,E=127487,A=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function P(se){var xe=se.split(","),Q,ie=xe.length,Fe=[];for(Q=0;Q<ie;Q+=1)xe[Q]!=="sans-serif"&&xe[Q]!=="monospace"&&Fe.push(xe[Q]);return Fe.join(",")}function R(se,xe){var Q=createTag("span");Q.setAttribute("aria-hidden",!0),Q.style.fontFamily=xe;var ie=createTag("span");ie.innerText="giItT1WQy@!-/#",Q.style.position="absolute",Q.style.left="-10000px",Q.style.top="-10000px",Q.style.fontSize="300px",Q.style.fontVariant="normal",Q.style.fontStyle="normal",Q.style.fontWeight="normal",Q.style.letterSpacing="0",Q.appendChild(ie),document.body.appendChild(Q);var Fe=ie.offsetWidth;return ie.style.fontFamily=P(se)+", "+xe,{node:ie,w:Fe,parent:Q}}function x(){var se,xe=this.fonts.length,Q,ie,Fe=xe;for(se=0;se<xe;se+=1)this.fonts[se].loaded?Fe-=1:this.fonts[se].fOrigin==="n"||this.fonts[se].origin===0?this.fonts[se].loaded=!0:(Q=this.fonts[se].monoCase.node,ie=this.fonts[se].monoCase.w,Q.offsetWidth!==ie?(Fe-=1,this.fonts[se].loaded=!0):(Q=this.fonts[se].sansCase.node,ie=this.fonts[se].sansCase.w,Q.offsetWidth!==ie&&(Fe-=1,this.fonts[se].loaded=!0)),this.fonts[se].loaded&&(this.fonts[se].sansCase.parent.parentNode.removeChild(this.fonts[se].sansCase.parent),this.fonts[se].monoCase.parent.parentNode.removeChild(this.fonts[se].monoCase.parent)));Fe!==0&&Date.now()-this.initTime<o?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function M(se,xe){var Q=document.body&&xe?"svg":"canvas",ie,Fe=getFontProperties(se);if(Q==="svg"){var Ne=createNS("text");Ne.style.fontSize="100px",Ne.setAttribute("font-family",se.fFamily),Ne.setAttribute("font-style",Fe.style),Ne.setAttribute("font-weight",Fe.weight),Ne.textContent="1",se.fClass?(Ne.style.fontFamily="inherit",Ne.setAttribute("class",se.fClass)):Ne.style.fontFamily=se.fFamily,xe.appendChild(Ne),ie=Ne}else{var nt=new OffscreenCanvas(500,500).getContext("2d");nt.font=Fe.style+" "+Fe.weight+" 100px "+se.fFamily,ie=nt}function ct(pt){return Q==="svg"?(ie.textContent=pt,ie.getComputedTextLength()):ie.measureText(pt).width}return{measureText:ct}}function $(se,xe){if(!se){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=se.list;return}if(!document.body){this.isLoaded=!0,se.list.forEach(function(it){it.helper=M(it),it.cache={}}),this.fonts=se.list;return}var Q=se.list,ie,Fe=Q.length,Ne=Fe;for(ie=0;ie<Fe;ie+=1){var nt=!0,ct,pt;if(Q[ie].loaded=!1,Q[ie].monoCase=R(Q[ie].fFamily,"monospace"),Q[ie].sansCase=R(Q[ie].fFamily,"sans-serif"),!Q[ie].fPath)Q[ie].loaded=!0,Ne-=1;else if(Q[ie].fOrigin==="p"||Q[ie].origin===3){if(ct=document.querySelectorAll('style[f-forigin="p"][f-family="'+Q[ie].fFamily+'"], style[f-origin="3"][f-family="'+Q[ie].fFamily+'"]'),ct.length>0&&(nt=!1),nt){var _t=createTag("style");_t.setAttribute("f-forigin",Q[ie].fOrigin),_t.setAttribute("f-origin",Q[ie].origin),_t.setAttribute("f-family",Q[ie].fFamily),_t.type="text/css",_t.innerText="@font-face {font-family: "+Q[ie].fFamily+"; font-style: normal; src: url('"+Q[ie].fPath+"');}",xe.appendChild(_t)}}else if(Q[ie].fOrigin==="g"||Q[ie].origin===1){for(ct=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),pt=0;pt<ct.length;pt+=1)ct[pt].href.indexOf(Q[ie].fPath)!==-1&&(nt=!1);if(nt){var yt=createTag("link");yt.setAttribute("f-forigin",Q[ie].fOrigin),yt.setAttribute("f-origin",Q[ie].origin),yt.type="text/css",yt.rel="stylesheet",yt.href=Q[ie].fPath,document.body.appendChild(yt)}}else if(Q[ie].fOrigin==="t"||Q[ie].origin===2){for(ct=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),pt=0;pt<ct.length;pt+=1)Q[ie].fPath===ct[pt].src&&(nt=!1);if(nt){var je=createTag("link");je.setAttribute("f-forigin",Q[ie].fOrigin),je.setAttribute("f-origin",Q[ie].origin),je.setAttribute("rel","stylesheet"),je.setAttribute("href",Q[ie].fPath),xe.appendChild(je)}}Q[ie].helper=M(Q[ie],xe),Q[ie].cache={},this.fonts.push(Q[ie])}Ne===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function V(se){if(se){this.chars||(this.chars=[]);var xe,Q=se.length,ie,Fe=this.chars.length,Ne;for(xe=0;xe<Q;xe+=1){for(ie=0,Ne=!1;ie<Fe;)this.chars[ie].style===se[xe].style&&this.chars[ie].fFamily===se[xe].fFamily&&this.chars[ie].ch===se[xe].ch&&(Ne=!0),ie+=1;Ne||(this.chars.push(se[xe]),Fe+=1)}}}function B(se,xe,Q){for(var ie=0,Fe=this.chars.length;ie<Fe;){if(this.chars[ie].ch===se&&this.chars[ie].style===xe&&this.chars[ie].fFamily===Q)return this.chars[ie];ie+=1}return(typeof se=="string"&&se.charCodeAt(0)!==13||!se)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",se,xe,Q)),r}function O(se,xe,Q){var ie=this.getFontByName(xe),Fe=se;if(!ie.cache[Fe]){var Ne=ie.helper;if(se===" "){var nt=Ne.measureText("|"+se+"|"),ct=Ne.measureText("||");ie.cache[Fe]=(nt-ct)/100}else ie.cache[Fe]=Ne.measureText(se)/100}return ie.cache[Fe]*Q}function L(se){for(var xe=0,Q=this.fonts.length;xe<Q;){if(this.fonts[xe].fName===se)return this.fonts[xe];xe+=1}return this.fonts[0]}function F(se){var xe=0,Q=se.charCodeAt(0);if(Q>=55296&&Q<=56319){var ie=se.charCodeAt(1);ie>=56320&&ie<=57343&&(xe=(Q-55296)*1024+ie-56320+65536)}return xe}function j(se,xe){var Q=se.toString(16)+xe.toString(16);return A.indexOf(Q)!==-1}function U(se){return se===m}function G(se){return se===f}function Y(se){var xe=F(se);return xe>=y&&xe<=E}function te(se){return Y(se.substr(0,2))&&Y(se.substr(2,2))}function ve(se){return a.indexOf(se)!==-1}function J(se,xe){var Q=F(se.substr(xe,2));if(Q!==l)return!1;var ie=0;for(xe+=2;ie<5;){if(Q=F(se.substr(xe,2)),Q<u||Q>d)return!1;ie+=1,xe+=2}return F(se.substr(xe,2))===c}function Z(){this.isLoaded=!0}var Me=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};Me.isModifier=j,Me.isZeroWidthJoiner=U,Me.isFlagEmoji=te,Me.isRegionalCode=Y,Me.isCombinedCharacter=ve,Me.isRegionalFlag=J,Me.isVariationSelector=G,Me.BLACK_FLAG_CODE_POINT=l;var ke={addChars:V,addFonts:$,getCharData:B,getFontByName:L,measureText:O,checkLoadedFonts:x,setIsLoaded:Z};return Me.prototype=ke,Me}();function SlotManager(o){this.animationData=o}SlotManager.prototype.getProp=function(o){return this.animationData.slots&&this.animationData.slots[o.sid]?Object.assign(o,this.animationData.slots[o.sid].p):o};function slotFactory(o){return new SlotManager(o)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(r){this.renderableComponents.indexOf(r)===-1&&this.renderableComponents.push(r)},removeRenderableComponent:function(r){this.renderableComponents.indexOf(r)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(r),1)},prepareRenderableFrame:function(r){this.checkLayerLimits(r)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(r){this.data.ip-this.data.st<=r&&this.data.op-this.data.st>r?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var r,a=this.renderableComponents.length;for(r=0;r<a;r+=1)this.renderableComponents[r].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var o={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(r){return o[r]||""}}();function SliderEffect(o,r,a){this.p=PropertyFactory.getProp(r,o.v,0,0,a)}function AngleEffect(o,r,a){this.p=PropertyFactory.getProp(r,o.v,0,0,a)}function ColorEffect(o,r,a){this.p=PropertyFactory.getProp(r,o.v,1,0,a)}function PointEffect(o,r,a){this.p=PropertyFactory.getProp(r,o.v,1,0,a)}function LayerIndexEffect(o,r,a){this.p=PropertyFactory.getProp(r,o.v,0,0,a)}function MaskIndexEffect(o,r,a){this.p=PropertyFactory.getProp(r,o.v,0,0,a)}function CheckboxEffect(o,r,a){this.p=PropertyFactory.getProp(r,o.v,0,0,a)}function NoValueEffect(){this.p={}}function EffectsManager(o,r){var a=o.ef||[];this.effectElements=[];var l,c=a.length,u;for(l=0;l<c;l+=1)u=new GroupEffect(a[l],r),this.effectElements.push(u)}function GroupEffect(o,r){this.init(o,r)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(o,r){this.data=o,this.effectElements=[],this.initDynamicPropertyContainer(r);var a,l=this.data.ef.length,c,u=this.data.ef;for(a=0;a<l;a+=1){switch(c=null,u[a].ty){case 0:c=new SliderEffect(u[a],r,this);break;case 1:c=new AngleEffect(u[a],r,this);break;case 2:c=new ColorEffect(u[a],r,this);break;case 3:c=new PointEffect(u[a],r,this);break;case 4:case 7:c=new CheckboxEffect(u[a],r,this);break;case 10:c=new LayerIndexEffect(u[a],r,this);break;case 11:c=new MaskIndexEffect(u[a],r,this);break;case 5:c=new EffectsManager(u[a],r);break;default:c=new NoValueEffect(u[a]);break}c&&this.effectElements.push(c)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var r=0,a=this.data.masksProperties.length;r<a;){if(this.data.masksProperties[r].mode!=="n"&&this.data.masksProperties[r].cl!==!1)return!0;r+=1}return!1},initExpressions:function(){var r=getExpressionInterfaces();if(r){var a=r("layer"),l=r("effects"),c=r("shape"),u=r("text"),d=r("comp");this.layerInterface=a(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var f=l.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(f),this.data.ty===0||this.data.xt?this.compInterface=d(this):this.data.ty===4?(this.layerInterface.shapeInterface=c(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=u(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var r=getBlendMode(this.data.bm),a=this.baseElement||this.layerElement;a.style["mix-blend-mode"]=r},initBaseData:function(r,a,l){this.globalData=a,this.comp=l,this.data=r,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(r,a){var l,c=this.dynamicProperties.length;for(l=0;l<c;l+=1)(a||this._isParent&&this.dynamicProperties[l].propType==="transform")&&(this.dynamicProperties[l].getValue(),this.dynamicProperties[l]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(r){this.dynamicProperties.indexOf(r)===-1&&this.dynamicProperties.push(r)}};function FootageElement(o,r,a){this.initFrame(),this.initRenderable(),this.assetData=r.getAssetData(o.refId),this.footageData=r.imageLoader.getAsset(this.assetData),this.initBaseData(o,r,a)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var o=getExpressionInterfaces();if(o){var r=o("footage");this.layerInterface=r(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(o,r,a){this.initFrame(),this.initRenderable(),this.assetData=r.getAssetData(o.refId),this.initBaseData(o,r,a),this._isPlaying=!1,this._canPlay=!1;var l=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(l),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,r.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,o.au&&o.au.lv?o.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(o){if(this.prepareRenderableFrame(o,!0),this.prepareProperties(o,!0),this.tm._placeholder)this._currentTime=o/this.data.sr;else{var r=this.tm.v;this._currentTime=r}this._volume=this.lv.v[0];var a=this._volume*this._volumeMultiplier;this._previousVolume!==a&&(this._previousVolume=a,this.audio.volume(a))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(o){this.audio.rate(o)},AudioElement.prototype.volume=function(o){this._volumeMultiplier=o,this._previousVolume=o*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(o){var r,a=this.layers.length,l;for(this.completeLayers=!0,r=a-1;r>=0;r-=1)this.elements[r]||(l=this.layers[r],l.ip-l.st<=o-this.layers[r].st&&l.op-l.st>o-this.layers[r].st&&this.buildItem(r)),this.completeLayers=this.elements[r]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(o){switch(o.ty){case 2:return this.createImage(o);case 0:return this.createComp(o);case 1:return this.createSolid(o);case 3:return this.createNull(o);case 4:return this.createShape(o);case 5:return this.createText(o);case 6:return this.createAudio(o);case 13:return this.createCamera(o);case 15:return this.createFootage(o);default:return this.createNull(o)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(o){return new AudioElement(o,this.globalData,this)},BaseRenderer.prototype.createFootage=function(o){return new FootageElement(o,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var o,r=this.layers.length;for(o=0;o<r;o+=1)this.buildItem(o);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(o){this.completeLayers=!1;var r,a=o.length,l,c=this.layers.length;for(r=0;r<a;r+=1)for(l=0;l<c;){if(this.layers[l].id===o[r].id){this.layers[l]=o[r];break}l+=1}},BaseRenderer.prototype.setProjectInterface=function(o){this.globalData.projectInterface=o},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(o,r,a){for(var l=this.elements,c=this.layers,u=0,d=c.length;u<d;)c[u].ind==r&&(!l[u]||l[u]===!0?(this.buildItem(u),this.addPendingElement(o)):(a.push(l[u]),l[u].setAsParent(),c[u].parent!==void 0?this.buildElementParenting(o,c[u].parent,a):o.setHierarchy(a))),u+=1},BaseRenderer.prototype.addPendingElement=function(o){this.pendingElements.push(o)},BaseRenderer.prototype.searchExtraCompositions=function(o){var r,a=o.length;for(r=0;r<a;r+=1)if(o[r].xt){var l=this.createComp(o[r]);l.initExpressions(),this.globalData.projectInterface.registerComposition(l)}},BaseRenderer.prototype.getElementById=function(o){var r,a=this.elements.length;for(r=0;r<a;r+=1)if(this.elements[r].data.ind===o)return this.elements[r];return null},BaseRenderer.prototype.getElementByPath=function(o){var r=o.shift(),a;if(typeof r=="number")a=this.elements[r];else{var l,c=this.elements.length;for(l=0;l<c;l+=1)if(this.elements[l].data.nm===r){a=this.elements[l];break}}return o.length===0?a:a.getElementByPath(o)},BaseRenderer.prototype.setupGlobalData=function(o,r){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(o),this.globalData.fontManager.addChars(o.chars),this.globalData.fontManager.addFonts(o.fonts,r),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=o.fr,this.globalData.nm=o.nm,this.globalData.compSize={w:o.w,h:o.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function(){var r=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:r,localMat:r,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var r,a=this.finalTransform.mat,l=0,c=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;l<c;){if(this.hierarchy[l].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}l+=1}if(this.finalTransform._matMdf)for(r=this.finalTransform.mProp.v.props,a.cloneFromProps(r),l=0;l<c;l+=1)a.multiply(this.hierarchy[l].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var r=0,a=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;r<a;)this.localTransforms[r]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[r]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),r+=1;if(this.finalTransform._localMatMdf){var l=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(l),r=1;r<a;r+=1){var c=this.localTransforms[r].matrix;l.multiply(c)}l.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var u=this.finalTransform.localOpacity;for(r=0;r<a;r+=1)u*=this.localTransforms[r].opacity*.01;this.finalTransform.localOpacity=u}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var r=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(r.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var a=0,l=r.length;for(a=0;a<l;a+=1)this.localTransforms.push(r[a])}}},globalToLocal:function(r){var a=[];a.push(this.finalTransform);for(var l=!0,c=this.comp;l;)c.finalTransform?(c.data.hasMask&&a.splice(0,0,c.finalTransform),c=c.comp):l=!1;var u,d=a.length,f;for(u=0;u<d;u+=1)f=a[u].mat.applyToPointArray(0,0,0),r=[r[0]-f[0],r[1]-f[1],0];return r},mHelper:new Matrix};function MaskElement(o,r,a){this.data=o,this.element=r,this.globalData=a,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var l=this.globalData.defs,c,u=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(u),this.solidPath="";var d,f=this.masksProperties,m=0,y=[],E,A,P=createElementID(),R,x,M,$,V="clipPath",B="clip-path";for(c=0;c<u;c+=1)if((f[c].mode!=="a"&&f[c].mode!=="n"||f[c].inv||f[c].o.k!==100||f[c].o.x)&&(V="mask",B="mask"),(f[c].mode==="s"||f[c].mode==="i")&&m===0?(R=createNS("rect"),R.setAttribute("fill","#ffffff"),R.setAttribute("width",this.element.comp.data.w||0),R.setAttribute("height",this.element.comp.data.h||0),y.push(R)):R=null,d=createNS("path"),f[c].mode==="n")this.viewData[c]={op:PropertyFactory.getProp(this.element,f[c].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,f[c],3),elem:d,lastPath:""},l.appendChild(d);else{m+=1,d.setAttribute("fill",f[c].mode==="s"?"#000000":"#ffffff"),d.setAttribute("clip-rule","nonzero");var O;if(f[c].x.k!==0?(V="mask",B="mask",$=PropertyFactory.getProp(this.element,f[c].x,0,null,this.element),O=createElementID(),x=createNS("filter"),x.setAttribute("id",O),M=createNS("feMorphology"),M.setAttribute("operator","erode"),M.setAttribute("in","SourceGraphic"),M.setAttribute("radius","0"),x.appendChild(M),l.appendChild(x),d.setAttribute("stroke",f[c].mode==="s"?"#000000":"#ffffff")):(M=null,$=null),this.storedData[c]={elem:d,x:$,expan:M,lastPath:"",lastOperator:"",filterId:O,lastRadius:0},f[c].mode==="i"){A=y.length;var L=createNS("g");for(E=0;E<A;E+=1)L.appendChild(y[E]);var F=createNS("mask");F.setAttribute("mask-type","alpha"),F.setAttribute("id",P+"_"+m),F.appendChild(d),l.appendChild(F),L.setAttribute("mask","url("+getLocationHref()+"#"+P+"_"+m+")"),y.length=0,y.push(L)}else y.push(d);f[c].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[c]={elem:d,lastPath:"",op:PropertyFactory.getProp(this.element,f[c].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,f[c],3),invRect:R},this.viewData[c].prop.k||this.drawPath(f[c],this.viewData[c].prop.v,this.viewData[c])}for(this.maskElement=createNS(V),u=y.length,c=0;c<u;c+=1)this.maskElement.appendChild(y[c]);m>0&&(this.maskElement.setAttribute("id",P),this.element.maskedElement.setAttribute(B,"url("+getLocationHref()+"#"+P+")"),l.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(o){return this.viewData[o].prop},MaskElement.prototype.renderFrame=function(o){var r=this.element.finalTransform.mat,a,l=this.masksProperties.length;for(a=0;a<l;a+=1)if((this.viewData[a].prop._mdf||o)&&this.drawPath(this.masksProperties[a],this.viewData[a].prop.v,this.viewData[a]),(this.viewData[a].op._mdf||o)&&this.viewData[a].elem.setAttribute("fill-opacity",this.viewData[a].op.v),this.masksProperties[a].mode!=="n"&&(this.viewData[a].invRect&&(this.element.finalTransform.mProp._mdf||o)&&this.viewData[a].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[a].x&&(this.storedData[a].x._mdf||o))){var c=this.storedData[a].expan;this.storedData[a].x.v<0?(this.storedData[a].lastOperator!=="erode"&&(this.storedData[a].lastOperator="erode",this.storedData[a].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[a].filterId+")")),c.setAttribute("radius",-this.storedData[a].x.v)):(this.storedData[a].lastOperator!=="dilate"&&(this.storedData[a].lastOperator="dilate",this.storedData[a].elem.setAttribute("filter",null)),this.storedData[a].elem.setAttribute("stroke-width",this.storedData[a].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var o="M0,0 ";return o+=" h"+this.globalData.compSize.w,o+=" v"+this.globalData.compSize.h,o+=" h-"+this.globalData.compSize.w,o+=" v-"+this.globalData.compSize.h+" ",o},MaskElement.prototype.drawPath=function(o,r,a){var l=" M"+r.v[0][0]+","+r.v[0][1],c,u;for(u=r._length,c=1;c<u;c+=1)l+=" C"+r.o[c-1][0]+","+r.o[c-1][1]+" "+r.i[c][0]+","+r.i[c][1]+" "+r.v[c][0]+","+r.v[c][1];if(r.c&&u>1&&(l+=" C"+r.o[c-1][0]+","+r.o[c-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),a.lastPath!==l){var d="";a.elem&&(r.c&&(d=o.inv?this.solidPath+l:l),a.elem.setAttribute("d",d)),a.lastPath=l}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var o={};o.createFilter=r,o.createAlphaToLuminanceFilter=a;function r(l,c){var u=createNS("filter");return u.setAttribute("id",l),c!==!0&&(u.setAttribute("filterUnits","objectBoundingBox"),u.setAttribute("x","0%"),u.setAttribute("y","0%"),u.setAttribute("width","100%"),u.setAttribute("height","100%")),u}function a(){var l=createNS("feColorMatrix");return l.setAttribute("type","matrix"),l.setAttribute("color-interpolation-filters","sRGB"),l.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),l}return o}(),featureSupport=function(){var o={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(o.maskType=!1),/firefox/i.test(navigator.userAgent)&&(o.svgLumaHidden=!1),o}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(o){var r,a="SourceGraphic",l=o.data.ef?o.data.ef.length:0,c=createElementID(),u=filtersFactory.createFilter(c,!0),d=0;this.filters=[];var f;for(r=0;r<l;r+=1){f=null;var m=o.data.ef[r].ty;if(registeredEffects$1[m]){var y=registeredEffects$1[m].effect;f=new y(u,o.effectsManager.effectElements[r],o,idPrefix+d,a),a=idPrefix+d,registeredEffects$1[m].countsAsEffect&&(d+=1)}f&&this.filters.push(f)}d&&(o.globalData.defs.appendChild(u),o.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+c+")")),this.filters.length&&o.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(o){var r,a=this.filters.length;for(r=0;r<a;r+=1)this.filters[r].renderFrame(o)},SVGEffects.prototype.getEffects=function(o){var r,a=this.filters.length,l=[];for(r=0;r<a;r+=1)this.filters[r].type===o&&l.push(this.filters[r]);return l};function registerEffect$1(o,r,a){registeredEffects$1[o]={effect:r,countsAsEffect:a}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var r=null;if(this.data.td){this.matteMasks={};var a=createNS("g");a.setAttribute("id",this.layerId),a.appendChild(this.layerElement),r=a,this.globalData.defs.appendChild(a)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),r=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var l=createNS("clipPath"),c=createNS("path");c.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var u=createElementID();if(l.setAttribute("id",u),l.appendChild(c),this.globalData.defs.appendChild(l),this.checkMasks()){var d=createNS("g");d.setAttribute("clip-path","url("+getLocationHref()+"#"+u+")"),d.appendChild(this.layerElement),this.transformedElement=d,r?r.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+u+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(r){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[r]){var a=this.layerId+"_"+r,l,c,u,d;if(r===1||r===3){var f=createNS("mask");f.setAttribute("id",a),f.setAttribute("mask-type",r===3?"luminance":"alpha"),u=createNS("use"),u.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),f.appendChild(u),this.globalData.defs.appendChild(f),!featureSupport.maskType&&r===1&&(f.setAttribute("mask-type","luminance"),l=createElementID(),c=filtersFactory.createFilter(l),this.globalData.defs.appendChild(c),c.appendChild(filtersFactory.createAlphaToLuminanceFilter()),d=createNS("g"),d.appendChild(u),f.appendChild(d),d.setAttribute("filter","url("+getLocationHref()+"#"+l+")"))}else if(r===2){var m=createNS("mask");m.setAttribute("id",a),m.setAttribute("mask-type","alpha");var y=createNS("g");m.appendChild(y),l=createElementID(),c=filtersFactory.createFilter(l);var E=createNS("feComponentTransfer");E.setAttribute("in","SourceGraphic"),c.appendChild(E);var A=createNS("feFuncA");A.setAttribute("type","table"),A.setAttribute("tableValues","1.0 0.0"),E.appendChild(A),this.globalData.defs.appendChild(c);var P=createNS("rect");P.setAttribute("width",this.comp.data.w),P.setAttribute("height",this.comp.data.h),P.setAttribute("x","0"),P.setAttribute("y","0"),P.setAttribute("fill","#ffffff"),P.setAttribute("opacity","0"),y.setAttribute("filter","url("+getLocationHref()+"#"+l+")"),y.appendChild(P),u=createNS("use"),u.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),y.appendChild(u),featureSupport.maskType||(m.setAttribute("mask-type","luminance"),c.appendChild(filtersFactory.createAlphaToLuminanceFilter()),d=createNS("g"),y.appendChild(P),d.appendChild(this.layerElement),y.appendChild(d)),this.globalData.defs.appendChild(m)}this.matteMasks[r]=a}return this.matteMasks[r]},setMatte:function(r){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+r+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(r){this.hierarchy=r},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var o={initElement:function(a,l,c){this.initFrame(),this.initBaseData(a,l,c),this.initTransform(a,l,c),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var a=this.baseElement||this.layerElement;a.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var a=this.baseElement||this.layerElement;a.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(a){this._mdf=!1,this.prepareRenderableFrame(a),this.prepareProperties(a,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(o)],RenderableDOMElement)})();function IImageElement(o,r,a){this.assetData=r.getAssetData(o.refId),this.assetData&&this.assetData.sid&&(this.assetData=r.slotManager.getProp(this.assetData)),this.initElement(o,r,a),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var o=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",o),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(o,r){this.elem=o,this.pos=r}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(r){var a,l=this.shapeModifiers.length;for(a=0;a<l;a+=1)this.shapeModifiers[a].addShape(r)},isShapeInAnimatedModifiers:function(r){for(var a=0,l=this.shapeModifiers.length;a<l;)if(this.shapeModifiers[a].isAnimatedWithShape(r))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var r,a=this.shapes.length;for(r=0;r<a;r+=1)this.shapes[r].sh.reset();a=this.shapeModifiers.length;var l;for(r=a-1;r>=0&&(l=this.shapeModifiers[r].processShapes(this._isFirstFrame),!l);r-=1);}},searchProcessedElement:function(r){for(var a=this.processedElements,l=0,c=a.length;l<c;){if(a[l].elem===r)return a[l].pos;l+=1}return 0},addProcessedElement:function(r,a){for(var l=this.processedElements,c=l.length;c;)if(c-=1,l[c].elem===r){l[c].pos=a;return}l.push(new ProcessedElement(r,a))},prepareFrame:function(r){this.prepareRenderableFrame(r),this.prepareProperties(r,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(o,r,a){this.caches=[],this.styles=[],this.transformers=o,this.lStr="",this.sh=a,this.lvl=r,this._isAnimated=!!a.k;for(var l=0,c=o.length;l<c;){if(o[l].mProps.dynamicProperties.length){this._isAnimated=!0;break}l+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(o,r){this.data=o,this.type=o.ty,this.d="",this.lvl=r,this._mdf=!1,this.closed=o.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(o,r,a,l){this.elem=o,this.frameId=-1,this.dataProps=createSizedArray(r.length),this.renderer=a,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",r.length?r.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(l);var c,u=r.length||0,d;for(c=0;c<u;c+=1)d=PropertyFactory.getProp(o,r[c].v,0,0,this),this.k=d.k||this.k,this.dataProps[c]={n:r[c].n,p:d};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(o){if(!(this.elem.globalData.frameId===this.frameId&&!o)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||o,this._mdf)){var r=0,a=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),r=0;r<a;r+=1)this.dataProps[r].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[r].p.v:this.dashArray[r]=this.dataProps[r].p.v:this.dashoffset[0]=this.dataProps[r].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(o,r,a){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(o,r.o,0,.01,this),this.w=PropertyFactory.getProp(o,r.w,0,null,this),this.d=new DashProperty(o,r.d||{},"svg",this),this.c=PropertyFactory.getProp(o,r.c,1,255,this),this.style=a,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(o,r,a){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(o,r.o,0,.01,this),this.c=PropertyFactory.getProp(o,r.c,1,255,this),this.style=a}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(o,r,a){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.style=a}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(o,r,a){this.data=r,this.c=createTypedArray("uint8c",r.p*4);var l=r.k.k[0].s?r.k.k[0].s.length-r.p*4:r.k.k.length-r.p*4;this.o=createTypedArray("float32",l),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=l,this.initDynamicPropertyContainer(a),this.prop=PropertyFactory.getProp(o,r.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(o,r){for(var a=0,l=this.o.length/2,c;a<l;){if(c=Math.abs(o[a*4]-o[r*4+a*2]),c>.01)return!1;a+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var o=0,r=this.data.k.k.length;o<r;){if(!this.comparePoints(this.data.k.k[o].s,this.data.p))return!1;o+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(o){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||o){var r,a=this.data.p*4,l,c;for(r=0;r<a;r+=1)l=r%4===0?100:255,c=Math.round(this.prop.v[r]*l),this.c[r]!==c&&(this.c[r]=c,this._cmdf=!o);if(this.o.length)for(a=this.prop.v.length,r=this.data.p*4;r<a;r+=1)l=r%2===0?100:1,c=r%2===0?Math.round(this.prop.v[r]*100):this.prop.v[r],this.o[r-this.data.p*4]!==c&&(this.o[r-this.data.p*4]=c,this._omdf=!o);this._mdf=!o}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(o,r,a){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.initGradientData(o,r,a)}SVGGradientFillStyleData.prototype.initGradientData=function(o,r,a){this.o=PropertyFactory.getProp(o,r.o,0,.01,this),this.s=PropertyFactory.getProp(o,r.s,1,null,this),this.e=PropertyFactory.getProp(o,r.e,1,null,this),this.h=PropertyFactory.getProp(o,r.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(o,r.a||{k:0},0,degToRads,this),this.g=new GradientProperty(o,r.g,this),this.style=a,this.stops=[],this.setGradientData(a.pElem,r),this.setGradientOpacity(r,a),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(o,r){var a=createElementID(),l=createNS(r.t===1?"linearGradient":"radialGradient");l.setAttribute("id",a),l.setAttribute("spreadMethod","pad"),l.setAttribute("gradientUnits","userSpaceOnUse");var c=[],u,d,f;for(f=r.g.p*4,d=0;d<f;d+=4)u=createNS("stop"),l.appendChild(u),c.push(u);o.setAttribute(r.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+a+")"),this.gf=l,this.cst=c},SVGGradientFillStyleData.prototype.setGradientOpacity=function(o,r){if(this.g._hasOpacity&&!this.g._collapsable){var a,l,c,u=createNS("mask"),d=createNS("path");u.appendChild(d);var f=createElementID(),m=createElementID();u.setAttribute("id",m);var y=createNS(o.t===1?"linearGradient":"radialGradient");y.setAttribute("id",f),y.setAttribute("spreadMethod","pad"),y.setAttribute("gradientUnits","userSpaceOnUse"),c=o.g.k.k[0].s?o.g.k.k[0].s.length:o.g.k.k.length;var E=this.stops;for(l=o.g.p*4;l<c;l+=2)a=createNS("stop"),a.setAttribute("stop-color","rgb(255,255,255)"),y.appendChild(a),E.push(a);d.setAttribute(o.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+f+")"),o.ty==="gs"&&(d.setAttribute("stroke-linecap",lineCapEnum[o.lc||2]),d.setAttribute("stroke-linejoin",lineJoinEnum[o.lj||2]),o.lj===1&&d.setAttribute("stroke-miterlimit",o.ml)),this.of=y,this.ms=u,this.ost=E,this.maskId=m,r.msElem=d}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(o,r,a){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(o,r.w,0,null,this),this.d=new DashProperty(o,r.d||{},"svg",this),this.initGradientData(o,r,a),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(o,r,a){this.transform={mProps:o,op:r,container:a},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(r,a,l,c){if(a===0)return"";var u=r.o,d=r.i,f=r.v,m,y=" M"+c.applyToPointStringified(f[0][0],f[0][1]);for(m=1;m<a;m+=1)y+=" C"+c.applyToPointStringified(u[m-1][0],u[m-1][1])+" "+c.applyToPointStringified(d[m][0],d[m][1])+" "+c.applyToPointStringified(f[m][0],f[m][1]);return l&&a&&(y+=" C"+c.applyToPointStringified(u[m-1][0],u[m-1][1])+" "+c.applyToPointStringified(d[0][0],d[0][1])+" "+c.applyToPointStringified(f[0][0],f[0][1]),y+="z"),y},SVGElementsRenderer=function(){var o=new Matrix,r=new Matrix,a={createRenderFunction:l};function l(A){switch(A.ty){case"fl":return f;case"gf":return y;case"gs":return m;case"st":return E;case"sh":case"el":case"rc":case"sr":return d;case"tr":return c;case"no":return u;default:return null}}function c(A,P,R){(R||P.transform.op._mdf)&&P.transform.container.setAttribute("op
4502acity",P.transform.op.v),(R||P.transform.mProps._mdf)&&P.transform.container.setAttribute("transform",P.transform.mProps.v.to2dCSS())}function u(){}function d(A,P,R){var x,M,$,V,B,O,L=P.styles.length,F=P.lvl,j,U,G,Y;for(O=0;O<L;O+=1){if(V=P.sh._mdf||R,P.styles[O].lvl<F){for(U=r.reset(),G=F-P.styles[O].lvl,Y=P.transformers.length-1;!V&&G>0;)V=P.transformers[Y].mProps._mdf||V,G-=1,Y-=1;if(V)for(G=F-P.styles[O].lvl,Y=P.transformers.length-1;G>0;)U.multiply(P.transformers[Y].mProps.v),G-=1,Y-=1}else U=o;if(j=P.sh.paths,M=j._length,V){for($="",x=0;x<M;x+=1)B=j.shapes[x],B&&B._length&&($+=buildShapeString(B,B._length,B.c,U));P.caches[O]=$}else $=P.caches[O];P.styles[O].d+=A.hd===!0?"":$,P.styles[O]._mdf=V||P.styles[O]._mdf}}function f(A,P,R){var x=P.style;(P.c._mdf||R)&&x.pElem.setAttribute("fill","rgb("+bmFloor(P.c.v[0])+","+bmFloor(P.c.v[1])+","+bmFloor(P.c.v[2])+")"),(P.o._mdf||R)&&x.pElem.setAttribute("fill-opacity",P.o.v)}function m(A,P,R){y(A,P,R),E(A,P,R)}function y(A,P,R){var x=P.gf,M=P.g._hasOpacity,$=P.s.v,V=P.e.v;if(P.o._mdf||R){var B=A.ty==="gf"?"fill-opacity":"stroke-opacity";P.style.pElem.setAttribute(B,P.o.v)}if(P.s._mdf||R){var O=A.t===1?"x1":"cx",L=O==="x1"?"y1":"cy";x.setAttribute(O,$[0]),x.setAttribute(L,$[1]),M&&!P.g._collapsable&&(P.of.setAttribute(O,$[0]),P.of.setAttribute(L,$[1]))}var F,j,U,G;if(P.g._cmdf||R){F=P.cst;var Y=P.g.c;for(U=F.length,j=0;j<U;j+=1)G=F[j],G.setAttribute("offset",Y[j*4]+"%"),G.setAttribute("stop-color","rgb("+Y[j*4+1]+","+Y[j*4+2]+","+Y[j*4+3]+")")}if(M&&(P.g._omdf||R)){var te=P.g.o;for(P.g._collapsable?F=P.cst:F=P.ost,U=F.length,j=0;j<U;j+=1)G=F[j],P.g._collapsable||G.setAttribute("offset",te[j*2]+"%"),G.setAttribute("stop-opacity",te[j*2+1])}if(A.t===1)(P.e._mdf||R)&&(x.setAttribute("x2",V[0]),x.setAttribute("y2",V[1]),M&&!P.g._collapsable&&(P.of.setAttribute("x2",V[0]),P.of.setAttribute("y2",V[1])));else{var ve;if((P.s._mdf||P.e._mdf||R)&&(ve=Math.sqrt(Math.pow($[0]-V[0],2)+Math.pow($[1]-V[1],2)),x.setAttribute("r",ve),M&&!P.g._collapsable&&P.of.setAttribute("r",ve)),P.e._mdf||P.h._mdf||P.a._mdf||R){ve||(ve=Math.sqrt(Math.pow($[0]-V[0],2)+Math.pow($[1]-V[1],2)));var J=Math.atan2(V[1]-$[1],V[0]-$[0]),Z=P.h.v;Z>=1?Z=.99:Z<=-1&&(Z=-.99);var Me=ve*Z,ke=Math.cos(J+P.a.v)*Me+$[0],se=Math.sin(J+P.a.v)*Me+$[1];x.setAttribute("fx",ke),x.setAttribute("fy",se),M&&!P.g._collapsable&&(P.of.setAttribute("fx",ke),P.of.setAttribute("fy",se))}}}function E(A,P,R){var x=P.style,M=P.d;M&&(M._mdf||R)&&M.dashStr&&(x.pElem.setAttribute("stroke-dasharray",M.dashStr),x.pElem.setAttribute("stroke-dashoffset",M.dashoffset[0])),P.c&&(P.c._mdf||R)&&x.pElem.setAttribute("stroke","rgb("+bmFloor(P.c.v[0])+","+bmFloor(P.c.v[1])+","+bmFloor(P.c.v[2])+")"),(P.o._mdf||R)&&x.pElem.setAttribute("stroke-opacity",P.o.v),(P.w._mdf||R)&&(x.pElem.setAttribute("stroke-width",P.w.v),x.msElem&&x.msElem.setAttribute("stroke-width",P.w.v))}return a}();function SVGShapeElement(o,r,a){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(o,r,a),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var o,r=this.shapes.length,a,l,c=this.stylesList.length,u,d=[],f=!1;for(l=0;l<c;l+=1){for(u=this.stylesList[l],f=!1,d.length=0,o=0;o<r;o+=1)a=this.shapes[o],a.styles.indexOf(u)!==-1&&(d.push(a),f=a._isAnimated||f);d.length>1&&f&&this.setShapesAsAnimated(d)}},SVGShapeElement.prototype.setShapesAsAnimated=function(o){var r,a=o.length;for(r=0;r<a;r+=1)o[r].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(o,r){var a,l=new SVGStyleData(o,r),c=l.pElem;if(o.ty==="st")a=new SVGStrokeStyleData(this,o,l);else if(o.ty==="fl")a=new SVGFillStyleData(this,o,l);else if(o.ty==="gf"||o.ty==="gs"){var u=o.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;a=new u(this,o,l),this.globalData.defs.appendChild(a.gf),a.maskId&&(this.globalData.defs.appendChild(a.ms),this.globalData.defs.appendChild(a.of),c.setAttribute("mask","url("+getLocationHref()+"#"+a.maskId+")"))}else o.ty==="no"&&(a=new SVGNoStyleData(this,o,l));return(o.ty==="st"||o.ty==="gs")&&(c.setAttribute("stroke-linecap",lineCapEnum[o.lc||2]),c.setAttribute("stroke-linejoin",lineJoinEnum[o.lj||2]),c.setAttribute("fill-opacity","0"),o.lj===1&&c.setAttribute("stroke-miterlimit",o.ml)),o.r===2&&c.setAttribute("fill-rule","evenodd"),o.ln&&c.setAttribute("id",o.ln),o.cl&&c.setAttribute("class",o.cl),o.bm&&(c.style["mix-blend-mode"]=getBlendM
vendor: 31,081 bytes, line 4502
4502ode(o.bm)),this.stylesList.push(l),this.addToAnimatedContents(o,a),a},SVGShapeElement.prototype.createGroupElement=function(o){var r=new ShapeGroupData;return o.ln&&r.gr.setAttribute("id",o.ln),o.cl&&r.gr.setAttribute("class",o.cl),o.bm&&(r.gr.style["mix-blend-mode"]=getBlendMode(o.bm)),r},SVGShapeElement.prototype.createTransformElement=function(o,r){var a=TransformPropertyFactory.getTransformProperty(this,o,this),l=new SVGTransformData(a,a.o,r);return this.addToAnimatedContents(o,l),l},SVGShapeElement.prototype.createShapeElement=function(o,r,a){var l=4;o.ty==="rc"?l=5:o.ty==="el"?l=6:o.ty==="sr"&&(l=7);var c=ShapePropertyFactory.getShapeProp(this,o,l,this),u=new SVGShapeData(r,a,c);return this.shapes.push(u),this.addShapeToModifiers(u),this.addToAnimatedContents(o,u),u},SVGShapeElement.prototype.addToAnimatedContents=function(o,r){for(var a=0,l=this.animatedContents.length;a<l;){if(this.animatedContents[a].element===r)return;a+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(o),element:r,data:o})},SVGShapeElement.prototype.setElementStyles=function(o){var r=o.styles,a,l=this.stylesList.length;for(a=0;a<l;a+=1)this.stylesList[a].closed||r.push(this.stylesList[a])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var o,r=this.itemsData.length;for(o=0;o<r;o+=1)this.prevViewData[o]=this.itemsData[o];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),r=this.dynamicProperties.length,o=0;o<r;o+=1)this.dynamicProperties[o].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(o,r,a,l,c,u,d){var f=[].concat(u),m,y=o.length-1,E,A,P=[],R=[],x,M,$;for(m=y;m>=0;m-=1){if($=this.searchProcessedElement(o[m]),$?r[m]=a[$-1]:o[m]._render=d,o[m].ty==="fl"||o[m].ty==="st"||o[m].ty==="gf"||o[m].ty==="gs"||o[m].ty==="no")$?r[m].style.closed=!1:r[m]=this.createStyleElement(o[m],c),o[m]._render&&r[m].style.pElem.parentNode!==l&&l.appendChild(r[m].style.pElem),P.push(r[m].style);else if(o[m].ty==="gr"){if(!$)r[m]=this.createGroupElement(o[m]);else for(A=r[m].it.length,E=0;E<A;E+=1)r[m].prevViewData[E]=r[m].it[E];this.searchShapes(o[m].it,r[m].it,r[m].prevViewData,r[m].gr,c+1,f,d),o[m]._render&&r[m].gr.parentNode!==l&&l.appendChild(r[m].gr)}else o[m].ty==="tr"?($||(r[m]=this.createTransformElement(o[m],l)),x=r[m].transform,f.push(x)):o[m].ty==="sh"||o[m].ty==="rc"||o[m].ty==="el"||o[m].ty==="sr"?($||(r[m]=this.createShapeElement(o[m],f,c)),this.setElementStyles(r[m])):o[m].ty==="tm"||o[m].ty==="rd"||o[m].ty==="ms"||o[m].ty==="pb"||o[m].ty==="zz"||o[m].ty==="op"?($?(M=r[m],M.closed=!1):(M=ShapeModifiers.getModifier(o[m].ty),M.init(this,o[m]),r[m]=M,this.shapeModifiers.push(M)),R.push(M)):o[m].ty==="rp"&&($?(M=r[m],M.closed=!0):(M=ShapeModifiers.getModifier(o[m].ty),r[m]=M,M.init(this,o,m,r),this.shapeModifiers.push(M),d=!1),R.push(M));this.addProcessedElement(o[m],m+1)}for(y=P.length,m=0;m<y;m+=1)P[m].closed=!0;for(y=R.length,m=0;m<y;m+=1)R[m].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var o,r=this.stylesList.length;for(o=0;o<r;o+=1)this.stylesList[o].reset();for(this.renderShape(),o=0;o<r;o+=1)(this.stylesList[o]._mdf||this._isFirstFrame)&&(this.stylesList[o].msElem&&(this.stylesList[o].msElem.setAttribute("d",this.stylesList[o].d),this.stylesList[o].d="M0 0"+this.stylesList[o].d),this.stylesList[o].pElem.setAttribute("d",this.stylesList[o].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var o,r=this.animatedContents.length,a;for(o=0;o<r;o+=1)a=this.animatedContents[o],(this._isFirstFrame||a.element._isAnimated)&&a.data!==!0&&a.fn(a.data,a.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(o,r,a,l,c,u){this.o=o,this.sw=r,this.sc=a,this.fc=l,this.m=c,this.p=u,this._mdf={o:!0,sw:!!r,sc:!!a,fc:!!l,m:!0,p:!0}}LetterProps.prototype.update=function(o,r,a,l,c,u){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var d=!1;return this.o!==o&&(this.o=o,this._mdf.o=!0,d=!0),this.sw!==r&&(this.sw=r,this._mdf.sw=!0,d=!0),this.sc!==a&&(this.sc=a,this._mdf.sc=!0,d=!0),this.fc!==l&&(this.fc=l,this._mdf.fc=!0,d=!0),this.m!==c&&(this.m=c,this._mdf.m=!0,d=!0),u.length&&(this.p[0]!==u[0]||this.p[1]!==u[1]||this.p[4]!==u[4]||this.p[5]!==u[5]||this.p[12]!==u[12]||this.p[13]!==u[13])&&(this.p=u,this._mdf.p=!0,d=!0),d};function TextProperty(o,r){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,r.d&&r.d.sid&&(r.d=o.globalData.slotManager.getProp(r.d)),this.data=r,this.elem=o,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(o,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o[a]=r[a]);return o},TextProperty.prototype.setCurrentData=function(o){o.__complete||this.completeTextData(o),this.currentData=o,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(o){this.effectsSequence.push(o),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(o){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!o)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var r=this.currentData,a=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var l,c=this.effectsSequence.length,u=o||this.data.d.k[this.keysIndex].s;for(l=0;l<c;l+=1)a!==this.keysIndex?u=this.effectsSequence[l](u,u.t):u=this.effectsSequence[l](this.currentData,u.t);r!==u&&this.setCurrentData(u),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var o=this.data.d.k,r=this.elem.comp.renderedFrame,a=0,l=o.length;a<=l-1&&!(a===l-1||o[a+1].t>r);)a+=1;return this.keysIndex!==a&&(this.keysIndex=a),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(o){for(var r=[],a=0,l=o.length,c,u,d=!1,f=!1,m="";a<l;)d=f,f=!1,c=o.charCodeAt(a),m=o.charAt(a),FontManager.isCombinedCharacter(c)?d=!0:c>=55296&&c<=56319?FontManager.isRegionalFlag(o,a)?m=o.substr(a,14):(u=o.charCodeAt(a+1),u>=56320&&u<=57343&&(FontManager.isModifier(c,u)?(m=o.substr(a,2),d=!0):FontManager.isFlagEmoji(o.substr(a,4))?m=o.substr(a,4):m=o.substr(a,2))):c>56319?(u=o.charCodeAt(a+1),FontManager.isVariationSelector(c)&&(d=!0)):FontManager.isZeroWidthJoiner(c)&&(d=!0,f=!0),d?(r[r.length-1]+=m,d=!1):r.push(m),a+=m.length;return r},TextProperty.prototype.completeTextData=function(o){o.__complete=!0;var r=this.elem.globalData.fontManager,a=this.data,l=[],c,u,d,f=0,m,y=a.m.g,E=0,A=0,P=0,R=[],x=0,M=0,$,V,B=r.getFontByName(o.f),O,L=0,F=getFontProperties(B);o.fWeight=F.weight,o.fStyle=F.style,o.finalSize=o.s,o.finalText=this.buildFinalText(o.t),u=o.finalText.length,o.finalLineHeight=o.lh;var j=o.tr/1e3*o.finalSize,U;if(o.sz)for(var G=!0,Y=o.sz[0],te=o.sz[1],ve,J;G;){J=this.buildFinalText(o.t),ve=0,x=0,u=J.length,j=o.tr/1e3*o.finalSize;var Z=-1;for(c=0;c<u;c+=1)U=J[c].charCodeAt(0),d=!1,J[c]===" "?Z=c:(U===13||U===3)&&(x=0,d=!0,ve+=o.finalLineHeight||o.finalSize*1.2),r.chars?(O=r.getCharData(J[c],B.fStyle,B.fFamily),L=d?0:O.w*o.finalSize/100):L=r.measureText(J[c],o.f,o.finalSize),x+L>Y&&J[c]!==" "?(Z===-1?u+=1:c=Z,ve+=o.finalLineHeight||o.finalSize*1.2,J.splice(c,Z===c?1:0,"\r"),Z=-1,x=0):(x+=L,x+=j);ve+=B.ascent*o.finalSize/100,this.canResize&&o.finalSize>this.minimumFontSize&&te<ve?(o.finalSize-=1,o.finalLineHeight=o.finalSize*o.lh/o.s):(o.finalText=J,u=o.finalText.length,G=!1)}x=-j,L=0;var Me=0,ke;for(c=0;c<u;c+=1)if(d=!1,ke=o.finalText[c],U=ke.charCodeAt(0),U===13||U===3?(Me=0,R.push(x),M=x>M?x:M,x=-2*j,m="",d=!0,P+=1):m=ke,r.chars?(O=r.getCharData(ke,B.fStyle,r.getFontByName(o.f).fFamily),L=d?0:O.w*o.finalSize/100):L=r.measureText(m,o.f,o.finalSize),ke===" "?Me+=L+j:(x+=L+j+Me,Me=0),l.push({l:L,an:L,add:E,n:d,anIndexes:[],val:m,line:P,animatorJustifyOffset:0}),y==2){if(E+=L,m===""||m===" "||c===u-1){for((m===""||m===" ")&&(E-=L);A<=c;)l[A].an=E,l[A].ind=f,l[A].extra=L,A+=1;f+=1,E=0}}else if(y==3){if(E+=L,m===""||c===u-1){for(m===""&&(E-=L);A<=c;)l[A].an=E,l[A].ind=f,l[A].extra=L,A+=1;E=0,f+=1}}else l[f].ind=f,l[f].extra=0,f+=1;if(o.l=l,M=x>M?x:M,R.push(x),o.sz)o.boxWidth=o.sz[0],o.justifyOffset=0;else switch(o.boxWidth=M,o.j){case 1:o.justifyOffset=-o.boxWidth;break;case 2:o.justifyOffset=-o.boxWidth/2;break;default:o.justifyOffset=0}o.lineWidths=R;var se=a.a,xe,Q;V=se.length;var ie,Fe,Ne=[];for($=0;$<V;$+=1){for(xe=se[$],xe.a.sc&&(o.strokeColorAnim=!0),xe.a.sw&&(o.strokeWidthAnim=!0),(xe.a.fc||xe.a.fh||xe.a.fs||xe.a.fb)&&(o.fillColorAnim=!0),Fe=0,ie=xe.s.b,c=0;c<u;c+=1)Q=l[c],Q.anIndexes[$]=Fe,(ie==1&&Q.val!==""||ie==2&&Q.val!==""&&Q.val!==" "||ie==3&&(Q.n||Q.val==" "||c==u-1)||ie==4&&(Q.n||c==u-1))&&(xe.s.rn===1&&Ne.push(Fe),Fe+=1);a.a[$].s.totalChars=Fe;var nt=-1,ct;if(xe.s.rn===1)for(c=0;c<u;c+=1)Q=l[c],nt!=Q.anIndexes[$]&&(nt=Q.anIndexes[$],ct=Ne.splice(Math.floor(Math.random()*Ne.length),1)[0]),Q.anIndexes[$]=ct}o.yOffset=o.finalLineHeight||o.finalSize*1.2,o.ls=o.ls||0,o.ascent=B.ascent*o.finalSize/100},TextProperty.prototype.updateDocumentData=function(o,r){r=r===void 0?this.keysIndex:r;var a=this.copyData({},this.data.d.k[r].s);a=this.copyData(a,o),this.data.d.k[r].s=a,this.recalculate(r),this.setCurrentData(a),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(o){var r=this.data.d.k[o].s;r.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(r)},TextProperty.prototype.canResizeFont=function(o){this.canResize=o,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(o){this.minimumFontSize=Math.floor(o)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var o=Math.max,r=Math.min,a=Math.floor;function l(u,d){this._currentTextLength=-1,this.k=!1,this.data=d,this.elem=u,this.comp=u.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(u),this.s=PropertyFactory.getProp(u,d.s||{k:0},0,0,this),"e"in d?this.e=PropertyFactory.getProp(u,d.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(u,d.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(u,d.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(u,d.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(u,d.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(u,d.a,0,.01,this),this.dynamicProperties.length||this.getValue()}l.prototype={getMult:function(d){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var f=0,m=0,y=1,E=1;this.ne.v>0?f=this.ne.v/100:m=-this.ne.v/100,this.xe.v>0?y=1-this.xe.v/100:E=1+this.xe.v/100;var A=BezierFactory.getBezierEasing(f,m,y,E).get,P=0,R=this.finalS,x=this.finalE,M=this.data.sh;if(M===2)x===R?P=d>=x?1:0:P=o(0,r(.5/(x-R)+(d-R)/(x-R),1)),P=A(P);else if(M===3)x===R?P=d>=x?0:1:P=1-o(0,r(.5/(x-R)+(d-R)/(x-R),1)),P=A(P);else if(M===4)x===R?P=0:(P=o(0,r(.5/(x-R)+(d-R)/(x-R),1)),P<.5?P*=2:P=1-2*(P-.5)),P=A(P);else if(M===5){if(x===R)P=0;else{var $=x-R;d=r(o(0,d+.5-R),x-R);var V=-$/2+d,B=$/2;P=Math.sqrt(1-V*V/(B*B))}P=A(P)}else M===6?(x===R?P=0:(d=r(o(0,d+.5-R),x-R),P=(1+Math.cos(Math.PI+Math.PI*2*d/(x-R)))/2),P=A(P)):(d>=a(R)&&(d-R<0?P=o(0,r(r(x,1)-(R-d),1)):P=o(0,r(x-d,1))),P=A(P));if(this.sm.v!==100){var O=this.sm.v*.01;O===0&&(O=1e-8);var L=.5-O*.5;P<L?P=0:(P=(P-L)/O,P>1&&(P=1))}return P*this.a.v},getValue:function(d){this.iterateDynamicProperties(),this._mdf=d||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,d&&this.data.r===2&&(this.e.v=this._currentTextLength);var f=this.data.r===2?1:100/this.data.totalChars,m=this.o.v/f,y=this.s.v/f+m,E=this.e.v/f+m;if(y>E){var A=y;y=E,E=A}this.finalS=y,this.finalE=E}},extendPrototype([DynamicPropertyContainer],l);function c(u,d,f){return new l(u,d)}return{getTextSelectorProp:c}}();function TextAnimatorDataProperty(o,r,a){var l={propType:!1},c=PropertyFactory.getProp,u=r.a;this.a={r:u.r?c(o,u.r,0,degToRads,a):l,rx:u.rx?c(o,u.rx,0,degToRads,a):l,ry:u.ry?c(o,u.ry,0,degToRads,a):l,sk:u.sk?c(o,u.sk,0,degToRads,a):l,sa:u.sa?c(o,u.sa,0,degToRads,a):l,s:u.s?c(o,u.s,1,.01,a):l,a:u.a?c(o,u.a,1,0,a):l,o:u.o?c(o,u.o,0,.01,a):l,p:u.p?c(o,u.p,1,0,a):l,sw:u.sw?c(o,u.sw,0,0,a):l,sc:u.sc?c(o,u.sc,1,0,a):l,fc:u.fc?c(o,u.fc,1,0,a):l,fh:u.fh?c(o,u.fh,0,0,a):l,fs:u.fs?c(o,u.fs,0,.01,a):l,fb:u.fb?c(o,u.fb,0,.01,a):l,t:u.t?c(o,u.t,0,0,a):l},this.s=TextSelectorProp.getTextSelectorProp(o,r.s,a),this.s.t=r.s.t}function TextAnimatorProperty(o,r,a){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=o,this._renderType=r,this._elem=a,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(a)}TextAnimatorProperty.prototype.searchProperties=function(){var o,r=this._textData.a.length,a,l=PropertyFactory.getProp;for(o=0;o<r;o+=1)a=this._textData.a[o],this._animatorsData[o]=new TextAnimatorDataProperty(this._elem,a,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:l(this._elem,this._textData.p.a,0,0,this),f:l(this._elem,this._textData.p.f,0,0,this),l:l(this._elem,this._textData.p.l,0,0,this),r:l(this._elem,this._textData.p.r,0,0,this),p:l(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=l(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(o,r){if(this.lettersChangedFlag=r,!(!this._mdf&&!this._isFirstFrame&&!r&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var a=this._moreOptions.alignment.v,l=this._animatorsData,c=this._textData,u=this.mHelper,d=this._renderType,f=this.renderedLetters.length,m,y,E,A,P=o.l,R,x,M,$,V,B,O,L,F,j,U,G,Y,te,ve;if(this._hasMaskedPath){if(ve=this._pathData.m,!this._pathData.n||this._pathData._mdf){var J=ve.v;this._pathData.r.v&&(J=J.reverse()),R={tLength:0,segments:[]},A=J._length-1;var Z;for(G=0,E=0;E<A;E+=1)Z=bez.buildBezierData(J.v[E],J.v[E+1],[J.o[E][0]-J.v[E][0],J.o[E][1]-J.v[E][1]],[J.i[E+1][0]-J.v[E+1][0],J.i[E+1][1]-J.v[E+1][1]]),R.tLength+=Z.segmentLength,R.segments.push(Z),G+=Z.segmentLength;E=A,ve.v.c&&(Z=bez.buildBezierData(J.v[E],J.v[0],[J.o[E][0]-J.v[E][0],J.o[E][1]-J.v[E][1]],[J.i[0][0]-J.v[0][0],J.i[0][1]-J.v[0][1]]),R.tLength+=Z.segmentLength,R.segments.push(Z),G+=Z.segmentLength),this._pathData.pi=R}if(R=this._pathData.pi,x=this._pathData.f.v,O=0,B=1,$=0,V=!0,j=R.segments,x<0&&ve.v.c)for(R.tLength<Math.abs(x)&&(x=-Math.abs(x)%R.tLength),O=j.length-1,F=j[O].points,B=F.length-1;x<0;)x+=F[B].partialLength,B-=1,B<0&&(O-=1,F=j[O].points,B=F.length-1);F=j[O].points,L=F[B-1],M=F[B],U=M.partialLength}A=P.length,m=0,y=0;var Me=o.finalSize*1.2*.714,ke=!0,se,xe,Q,ie,Fe;ie=l.length;var Ne,nt=-1,ct,pt,_t,yt=x,je=O,it=B,st=-1,lt,vt,ze,Pe,Se,Le,qe,He,Ye="",ot=this.defaultPropsArray,et;if(o.j===2||o.j===1){var Qe=0,Ze=0,mt=o.j===2?-.5:-1,at=0,ht=!0;for(E=0;E<A;E+=1)if(P[E].n){for(Qe&&(Qe+=Ze);at<E;)P[at].animatorJustifyOffset=Qe,at+=1;Qe=0,ht=!0}else{for(Q=0;Q<ie;Q+=1)se=l[Q].a,se.t.propType&&(ht&&o.j===2&&(Ze+=se.t.v*mt),xe=l[Q].s,Ne=xe.getMult(P[E].anIndexes[Q],c.a[Q].s.totalChars),Ne.length?Qe+=se.t.v*Ne[0]*mt:Qe+=se.t.v*Ne*mt);ht=!1}for(Qe&&(Qe+=Ze);at<E;)P[at].animatorJustifyOffset=Qe,at+=1}for(E=0;E<A;E+=1){if(u.reset(),lt=1,P[E].n)m=0,y+=o.yOffset,y+=ke?1:0,x=yt,ke=!1,this._hasMaskedPath&&(O=je,B=it,F=j[O].points,L=F[B-1],M=F[B],U=M.partialLength,$=0),Ye="",He="",Le="",et="",ot=this.defaultPropsArray;else{if(this._hasMaskedPath){if(st!==P[E].line){switch(o.j){case 1:x+=G-o.lineWidths[P[E].line];break;case 2:x+=(G-o.lineWidths[P[E].line])/2;break}st=P[E].line}nt!==P[E].ind&&(P[nt]&&(x+=P[nt].extra),x+=P[E].an/2,nt=P[E].ind),x+=a[0]*P[E].an*.005;var dt=0;for(Q=0;Q<ie;Q+=1)se=l[Q].a,se.p.propType&&(xe=l[Q].s,Ne=xe.getMult(P[E].anIndexes[Q],c.a[Q].s.totalChars),Ne.length?dt+=se.p.v[0]*Ne[0]:dt+=se.p.v[0]*Ne),se.a.propType&&(xe=l[Q].s,Ne=xe.getMult(P[E].anIndexes[Q],c.a[Q].s.totalChars),Ne.length?dt+=se.a.v[0]*Ne[0]:dt+=se.a.v[0]*Ne);for(V=!0,this._pathData.a.v&&(x=P[0].an*.5+(G-this._pathData.f.v-P[0].an*.5-P[P.length-1].an*.5)*nt/(A-1),x+=this._pathData.f.v);V;)$+U>=x+dt||!F?(Y=(x+dt-$)/M.partialLength,pt=L.point[0]+(M.point[0]-L.point[0])*Y,_t=L.point[1]+(M.point[1]-L.point[1])*Y,u.translate(-a[0]*P[E].an*.005,-(a[1]*Me)*.01),V=!1):F&&($+=M.partialLength,B+=1,B>=F.length&&(B=0,O+=1,j[O]?F=j[O].points:ve.v.c?(B=0,O=0,F=j[O].points):($-=M.partialLength,F=null)),F&&(L=M,M=F[B],U=M.partialLength));ct=P[E].an/2-P[E].add,u.translate(-ct,0,0)}else ct=P[E].an/2-P[E].add,u.translate(-ct,0,0),u.translate(-a[0]*P[E].an*.005,-a[1]*Me*.01,0);for(Q=0;Q<ie;Q+=1)se=l[Q].a,se.t.propType&&(xe=l[Q].s,Ne=xe.getMult(P[E].anIndexes[Q],c.a[Q].s.totalChars),(m!==0||o.j!==0)&&(this._hasMaskedPath?Ne.length?x+=se.t.v*Ne[0]:x+=se.t.v*Ne:Ne.length?m+=se.t.v*Ne[0]:m+=se.t.v*Ne));for(o.strokeWidthAnim&&(ze=o.sw||0),o.strokeColorAnim&&(o.sc?vt=[o.sc[0],o.sc[1],o.sc[2]]:vt=[0,0,0]),o.fillColorAnim&&o.fc&&(Pe=[o.fc[0],o.fc[1],o.fc[2]]),Q=0;Q<ie;Q+=1)se=l[Q].a,se.a.propType&&(xe=l[Q].s,Ne=xe.getMult(P[E].anIndexes[Q],c.a[Q].s.totalChars),Ne.length?u.translate(-se.a.v[0]*Ne[0],-se.a.v[1]*Ne[1],se.a.v[2]*Ne[2]):u.translate(-se.a.v[0]*Ne,-se.a.v[1]*Ne,se.a.v[2]*Ne));for(Q=0;Q<ie;Q+=1)se=l[Q].a,se.s.propType&&(xe=l[Q].s,Ne=xe.getMult(P[E].anIndexes[Q],c.a[Q].s.totalChars),Ne.length?u.scale(1+(se.s.v[0]-1)*Ne[0],1+(se.s.v[1]-1)*Ne[1],1):u.scale(1+(se.s.v[0]-1)*Ne,1+(se.s.v[1]-1)*Ne,1));for(Q=0;Q<ie;Q+=1){if(se=l[Q].a,xe=l[Q].s,Ne=xe.getMult(P[E].anIndexes[Q],c.a[Q].s.totalChars),se.sk.propType&&(Ne.length?u.skewFromAxis(-se.sk.v*Ne[0],se.sa.v*Ne[1]):u.skewFromAxis(-se.sk.v*Ne,se.sa.v*Ne)),se.r.propType&&(Ne.length?u.rotateZ(-se.r.v*Ne[2]):u.rotateZ(-se.r.v*Ne)),se.ry.propType&&(Ne.length?u.rotateY(se.ry.v*Ne[1]):u.rotateY(se.ry.v*Ne)),se.rx.propType&&(Ne.length?u.rotateX(se.rx.v*Ne[0]):u.rotateX(se.rx.v*Ne)),se.o.propType&&(Ne.length?lt+=(se.o.v*Ne[0]-lt)*Ne[0]:lt+=(se.o.v*Ne-lt)*Ne),o.strokeWidthAnim&&se.sw.propType&&(Ne.length?ze+=se.sw.v*Ne[0]:ze+=se.sw.v*Ne),o.strokeColorAnim&&se.sc.propType)for(Se=0;Se<3;Se+=1)Ne.length?vt[Se]+=(se.sc.v[Se]-vt[Se])*Ne[0]:vt[Se]+=(se.sc.v[Se]-vt[Se])*Ne;if(o.fillColorAnim&&o.fc){if(se.fc.propType)for(Se=0;Se<3;Se+=1)Ne.length?Pe[Se]+=(se.fc.v[Se]-Pe[Se])*Ne[0]:Pe[Se]+=(se.fc.v[Se]-Pe[Se])*Ne;se.fh.propType&&(Ne.length?Pe=addHueToRGB(Pe,se.fh.v*Ne[0]):Pe=addHueToRGB(Pe,se.fh.v*Ne)),se.fs.propType&&(Ne.length?Pe=addSaturationToRGB(Pe,se.fs.v*Ne[0]):Pe=addSaturationToRGB(Pe,se.fs.v*Ne)),se.fb.propType&&(Ne.length?Pe=addBrightnessToRGB(Pe,se.fb.v*Ne[0]):Pe=addBrightnessToRGB(Pe,se.fb.v*Ne))}}for(Q=0;Q<ie;Q+=1)se=l[Q].a,se.p.propType&&(xe=l[Q].s,Ne=xe.getMult(P[E].anIndexes[Q],c.a[Q].s.totalChars),this._hasMaskedPath?Ne.length?u.translate(0,se.p.v[1]*Ne[0],-se.p.v[2]*Ne[1]):u.translate(0,se.p.v[1]*Ne,-se.p.v[2]*Ne):Ne.length?u.translate(se.p.v[0]*Ne[0],se.p.v[1]*Ne[1],-se.p.v[2]*Ne[2]):u.translate(se.p.v[0]*Ne,se.p.v[1]*Ne,-se.p.v[2]*Ne));if(o.strokeWidthAnim&&(Le=ze<0?0:ze),o.strokeColorAnim&&(qe="rgb("+Math.round(vt[0]*255)+","+Math.round(vt[1]*255)+","+Math.round(vt[2]*255)+")"),o.fillColorAnim&&o.fc&&(He="rgb("+Math.round(Pe[0]*255)+","+Math.round(Pe[1]*255)+","+Math.round(Pe[2]*255)+")"),this._hasMaskedPath){if(u.translate(0,-o.ls),u.translate(0,a[1]*Me*.01+y,0),this._pathData.p.v){te=(M.point[1]-L.point[1])/(M.point[0]-L.point[0]);var bt=Math.atan(te)*180/Math.PI;M.point[0]<L.point[0]&&(bt+=180),u.rotate(-bt*Math.PI/180)}u.translate(pt,_t,0),x-=a[0]*P[E].an*.005,P[E+1]&&nt!==P[E+1].ind&&(x+=P[E].an/2,x+=o.tr*.001*o.finalSize)}else{switch(u.translate(m,y,0),o.ps&&u.translate(o.ps[0],o.ps[1]+o.ascent,0),o.j){case 1:u.translate(P[E].animatorJustifyOffset+o.justifyOffset+(o.boxWidth-o.lineWidths[P[E].line]),0,0);break;case 2:u.translate(P[E].animatorJustifyOffset+o.justifyOffset+(o.boxWidth-o.lineWidths[P[E].line])/2,0,0);break}u.translate(0,-o.ls),u.translate(ct,0,0),u.translate(a[0]*P[E].an*.005,a[1]*Me*.01,0),m+=P[E].l+o.tr*.001*o.finalSize}d==="html"?Ye=u.toCSS():d==="svg"?Ye=u.to2dCSS():ot=[u.props[0],u.props[1],u.props[2],u.props[3],u.props[4],u.props[5],u.props[6],u.props[7],u.props[8],u.props[9],u.props[10],u.props[11],u.props[12],u.props[13],u.props[14],u.props[15]],et=lt}f<=E?(Fe=new LetterProps(et,Le,qe,He,Ye,ot),this.renderedLetters.push(Fe),f+=1,this.lettersChangedFlag=!0):(Fe=this.renderedLetters[E],this.lettersChangedFlag=Fe.update(et,Le,qe,He,Ye,ot)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(o,r,a){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(o,r,a),this.textProperty=new TextProperty(this,o.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(o.t,this.renderType,this),this.initTransform(o,r,a),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(o){this._mdf=!1,this.prepareRenderableFrame(o),this.prepareProperties(o,this.isInRange)},ITextElement.prototype.createPathShape=function(o,r){var a,l=r.length,c,u="";for(a=0;a<l;a+=1)r[a].ty==="sh"&&(c=r[a].ks.k,u+=buildShapeString(c,c.i.length,!0,o));return u},ITextElement.prototype.updateDocumentData=function(o,r){this.textProperty.updateDocumentData(o,r)},ITextElement.prototype.canResizeFont=function(o){this.textProperty.canResizeFont(o)},ITextElement.prototype.setMinimumFontSize=function(o){this.textProperty.setMinimumFontSize(o)},ITextElement.prototype.applyTextPropertiesToMatrix=function(o,r,a,l,c){switch(o.ps&&r.translate(o.ps[0],o.ps[1]+o.ascent,0),r.translate(0,-o.ls,0),o.j){case 1:r.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[a]),0,0);break;case 2:r.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[a])/2,0,0);break}r.translate(l,c,0)},ITextElement.prototype.buildColor=function(o){return"rgb("+Math.round(o[0]*255)+","+Math.round(o[1]*255)+","+Math.round(o[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(o,r,a){this.textSpans=[],this.renderType="svg",this.initElement(o,r,a)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(o){for(var r=0,a=o.length,l=[],c="";r<a;)o[r]==="\r"||o[r]==="�"?(l.push(c),c=""):c+=o[r],r+=1;return l.push(c),l},SVGTextLottieElement.prototype.buildShapeData=function(o,r){if(o.shapes&&o.shapes.length){var a=o.shapes[0];if(a.it){var l=a.it[a.it.length-1];l.s&&(l.s.k[0]=r,l.s.k[1]=r)}}return o},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var o,r,a=this.textProperty.currentData;this.renderedLetters=createSizedArray(a?a.l.length:0),a.fc?this.layerElement.setAttribute("fill",this.buildColor(a.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),a.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(a.sc)),this.layerElement.setAttribute("stroke-width",a.sw)),this.layerElement.setAttribute("font-size",a.finalSize);var l=this.globalData.fontManager.getFontByName(a.f);if(l.fClass)this.layerElement.setAttribute("class",l.fClass);else{this.layerElement.setAttribute("font-family",l.fFamily);var c=a.fWeight,u=a.fStyle;this.layerElement.setAttribute("font-style",u),this.layerElement.setAttribute("font-weight",c)}this.layerElement.setAttribute("aria-label",a.t);var d=a.l||[],f=!!this.globalData.fontManager.chars;r=d.length;var m,y=this.mHelper,E="",A=this.data.singleShape,P=0,R=0,x=!0,M=a.tr*.001*a.finalSize;if(A&&!f&&!a.sz){var $=this.textContainer,V="start";switch(a.j){case 1:V="end";break;case 2:V="middle";break;default:V="start";break}$.setAttribute("text-anchor",V),$.setAttribute("letter-spacing",M);var B=this.buildTextContents(a.finalText);for(r=B.length,R=a.ps?a.ps[1]+a.ascent:0,o=0;o<r;o+=1)m=this.textSpans[o].span||createNS("tspan"),m.textContent=B[o],m.setAttribute("x",0),m.setAttribute("y",R),m.style.display="inherit",$.appendChild(m),this.textSpans[o]||(this.textSpans[o]={span:null,glyph:null}),this.textSpans[o].span=m,R+=a.finalLineHeight;this.layerElement.appendChild($)}else{var O=this.textSpans.length,L;for(o=0;o<r;o+=1){if(this.textSpans[o]||(this.textSpans[o]={span:null,childSpan:null,glyph:null}),!f||!A||o===0){if(m=O>o?this.textSpans[o].span:createNS(f?"g":"text"),O<=o){if(m.setAttribute("stroke-linecap","butt"),m.setAttribute("stroke-linejoin","round"),m.setAttribute("stroke-miterlimit","4"),this.textSpans[o].span=m,f){var F=createNS("g");m.appendChild(F),this.textSpans[o].childSpan=F}this.textSpans[o].span=m,this.layerElement.appendChild(m)}m.style.display="inherit"}if(y.reset(),A&&(d[o].n&&(P=-M,R+=a.yOffset,R+=x?1:0,x=!1),this.applyTextPropertiesToMatrix(a,y,d[o].line,P,R),P+=d[o].l||0,P+=M),f){L=this.globalData.fontManager.getCharData(a.finalText[o],l.fStyle,this.globalData.fontManager.getFontByName(a.f).fFamily);var j;if(L.t===1)j=new SVGCompElement(L.data,this.globalData,this);else{var U=emptyShapeData;L.data&&L.data.shapes&&(U=this.buildShapeData(L.data,a.finalSize)),j=new SVGShapeElement(U,this.globalData,this)}if(this.textSpans[o].glyph){var G=this.textSpans[o].glyph;this.textSpans[o].childSpan.removeChild(G.layerElement),G.destroy()}this.textSpans[o].glyph=j,j._debug=!0,j.prepareFrame(0),j.renderFrame(),this.textSpans[o].childSpan.appendChild(j.layerElement),L.t===1&&this.textSpans[o].childSpan.setAttribute("transform","scale("+a.finalSize/100+","+a.finalSize/100+")")}else A&&m.setAttribute("transform","translate("+y.props[12]+","+y.props[13]+")"),m.textContent=d[o].val,m.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}A&&m&&m.setAttribute("d",E)}for(;o<this.textSpans.length;)this.textSpans[o].span.style.display="none",o+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var o=this.layerElement.getBBox();this.bbox={top:o.y,left:o.x,width:o.width,height:o.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var o,r=this.textSpans.length,a;for(this.renderedFrame=this.comp.renderedFrame,o=0;o<r;o+=1)a=this.textSpans[o].glyph,a&&(a.prepareFrame(this.comp.renderedFrame-this.data.st),a._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var o,r,a=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;r=l.length;var c,u,d;for(o=0;o<r;o+=1)l[o].n||(c=a[o],u=this.textSpans[o].span,d=this.textSpans[o].glyph,d&&d.renderFrame(),c._mdf.m&&u.setAttribute("transform",c.m),c._mdf.o&&u.setAttribute("opacity",c.o),c._mdf.sw&&u.setAttribute("stroke-width",c.sw),c._mdf.sc&&u.setAttribute("stroke",c.sc),c._mdf.fc&&u.setAttribute("fill",c.fc))}};function ISolidElement(o,r,a){this.initElement(o,r,a)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var o=createNS("rect");o.setAttribute("width",this.data.sw),o.setAttribute("height",this.data.sh),o.setAttribute("fill",this.data.sc),this.layerElement.appendChild(o)};function NullElement(o,r,a){this.initFrame(),this.initBaseData(o,r,a),this.initFrame(),this.initTransform(o,r,a),this.initHierarchy()}NullElement.prototype.prepareFrame=function(o){this.prepareProperties(o,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(o){return new NullElement(o,this.globalData,this)},SVGRendererBase.prototype.createShape=function(o){return new SVGShapeElement(o,this.globalData,this)},SVGRendererBase.prototype.createText=function(o){return new SVGTextLottieElement(o,this.globalData,this)},SVGRendererBase.prototype.createImage=function(o){return new IImageElement(o,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(o){return new ISolidElement(o,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(o){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+o.w+" "+o.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",o.w),this.svgElement.setAttribute("height",o.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,
45020,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var r=this.globalData.defs;this.setupGlobalData(o,r),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=o;var a=createNS("clipPath"),l=createNS("rect");l.setAttribute("width",o.w),l.setAttribute("height",o.h),l.setAttribute("x",0),l.setAttribute("y",0);var c=createElementID();a.setAttribute("id",c),a.appendChild(l),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+c+")"),r.appendChild(a),this.layers=o.layers,this.elements=createSizedArray(o.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var o,r=this.layers?this.layers.length:0;for(o=0;o<r;o+=1)this.elements[o]&&this.elements[o].destroy&&this.elements[o].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(o){var r=0,a=this.layers.length;for(r=0;r<a;r+=1)if(this.layers[r].ind===o)return r;return-1},SVGRendererBase.prototype.buildItem=function(o){var r=this.elements;if(!(r[o]||this.layers[o].ty===99)){r[o]=!0;var a=this.createItem(this.layers[o]);if(r[o]=a,getExpressionsPlugin()&&(this.layers[o].ty===0&&this.globalData.projectInterface.registerComposition(a),a.initExpressions()),this.appendElementInPos(a,o),this.layers[o].tt){var l="tp"in this.layers[o]?this.findIndexByInd(this.layers[o].tp):o-1;if(l===-1)return;if(!this.elements[l]||this.elements[l]===!0)this.buildItem(l),this.addPendingElement(a);else{var c=r[l],u=c.getMatte(this.layers[o].tt);a.setMatte(u)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var o=this.pendingElements.pop();if(o.checkParenting(),o.data.tt)for(var r=0,a=this.elements.length;r<a;){if(this.elements[r]===o){var l="tp"in o.data?this.findIndexByInd(o.data.tp):r-1,c=this.elements[l],u=c.getMatte(this.layers[r].tt);o.setMatte(u);break}r+=1}}},SVGRendererBase.prototype.renderFrame=function(o){if(!(this.renderedFrame===o||this.destroyed)){o===null?o=this.renderedFrame:this.renderedFrame=o,this.globalData.frameNum=o,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=o,this.globalData._mdf=!1;var r,a=this.layers.length;for(this.completeLayers||this.checkLayers(o),r=a-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(o-this.layers[r].st);if(this.globalData._mdf)for(r=0;r<a;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(o,r){var a=o.getBaseElement();if(a){for(var l=0,c;l<r;)this.elements[l]&&this.elements[l]!==!0&&this.elements[l].getBaseElement()&&(c=this.elements[l].getBaseElement()),l+=1;c?this.layerElement.insertBefore(a,c):this.layerElement.appendChild(a)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(o,r,a){this.initFrame(),this.initBaseData(o,r,a),this.initTransform(o,r,a),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!r.progressiveLoad)&&this.buildAllItems(),this.hide()}
vendor: 126,200 bytes, lines 4502-4507
4502,ICompElement.prototype.prepareFrame=function(o){if(this._mdf=!1,this.prepareRenderableFrame(o),this.prepareProperties(o,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=o/this.data.sr;else{var r=this.tm.v;r===this.data.op&&(r=this.data.op-1),this.renderedFrame=r}var a,l=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),a=l-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&(this.elements[a].prepareFrame(this.renderedFrame-this.layers[a].st),this.elements[a]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var o,r=this.layers.length;for(o=0;o<r;o+=1)(this.completeLayers||this.elements[o])&&this.elements[o].renderFrame()},ICompElement.prototype.setElements=function(o){this.elements=o},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var o,r=this.layers.length;for(o=0;o<r;o+=1)this.elements[o]&&this.elements[o].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(o,r,a){this.layers=o.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(o,r,a),this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,r.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(o){return new SVGCompElement(o,this.globalData,this)};function SVGRenderer(o,r){this.animationItem=o,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var a="";if(r&&r.title){var l=createNS("title"),c=createElementID();l.setAttribute("id",c),l.textContent=r.title,this.svgElement.appendChild(l),a+=c}if(r&&r.description){var u=createNS("desc"),d=createElementID();u.setAttribute("id",d),u.textContent=r.description,this.svgElement.appendChild(u),a+=" "+d}a&&this.svgElement.setAttribute("aria-labelledby",a);var f=createNS("defs");this.svgElement.appendChild(f);var m=createNS("g");this.svgElement.appendChild(m),this.layerElement=m,this.renderConfig={preserveAspectRatio:r&&r.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:r&&r.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:r&&r.contentVisibility||"visible",progressiveLoad:r&&r.progressiveLoad||!1,hideOnTransparent:!(r&&r.hideOnTransparent===!1),viewBoxOnly:r&&r.viewBoxOnly||!1,viewBoxSize:r&&r.viewBoxSize||!1,className:r&&r.className||"",id:r&&r.id||"",focusable:r&&r.focusable,filterSize:{width:r&&r.filterSize&&r.filterSize.width||"100%",height:r&&r.filterSize&&r.filterSize.height||"100%",x:r&&r.filterSize&&r.filterSize.x||"0%",y:r&&r.filterSize&&r.filterSize.y||"0%"},width:r&&r.width,height:r&&r.height,runExpressions:!r||r.runExpressions===void 0||r.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:f,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(o){return new SVGCompElement(o,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(r){var a,l=r.length,c="_";for(a=0;a<l;a+=1)c+=r[a].transform.key+"_";var u=this.sequences[c];return u||(u={transforms:[].concat(r),finalTransform:new Matrix,_mdf:!1},this.sequences[c]=u,this.sequenceList.push(u)),u},processSequence:function(r,a){for(var l=0,c=r.transforms.length,u=a;l<c&&!a;){if(r.transforms[l].transform.mProps._mdf){u=!0;break}l+=1}if(u)for(r.finalTransform.reset(),l=c-1;l>=0;l-=1)r.finalTransform.multiply(r.transforms[l].transform.mProps.v);r._mdf=u},processSequences:function(r){var a,l=this.sequenceList.length;for(a=0;a<l;a+=1)this.processSequence(this.sequenceList[a],r)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var r="__lottie_element_luma_buffer",a=null,l=null,c=null;function u(){var m=createNS("svg"),y=createNS("filter"),E=createNS("feColorMatrix");return y.setAttribute("id",r),E.setAttribute("type","matrix"),E.setAttribute("color-interpolation-filters","sRGB"),E.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),y.appendChild(E),m.appendChild(y),m.setAttribute("id",r+"_svg"),featureSupport.svgLumaHidden&&(m.style.display="none"),m}function d(){a||(c=u(),document.body.appendChild(c),a=createTag("canvas"),l=a.getContext("2d"),l.filter="url(#"+r+")",l.fillStyle="rgba(0,0,0,0)",l.fillRect(0,0,1,1))}function f(m){return a||d(),a.width=m.width,a.height=m.height,l.filter="url(#"+r+")",a}return{load:d,get:f}};function createCanvas(o,r){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(o,r);var a=createTag("canvas");return a.width=o,a.height=r,a}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(o){var r,a=o.data.ef?o.data.ef.length:0;this.filters=[];var l;for(r=0;r<a;r+=1){l=null;var c=o.data.ef[r].ty;if(registeredEffects[c]){var u=registeredEffects[c].effect;l=new u(o.effectsManager.effectElements[r],o)}l&&this.filters.push(l)}this.filters.length&&o.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(o){var r,a=this.filters.length;for(r=0;r<a;r+=1)this.filters[r].renderFrame(o)},CVEffects.prototype.getEffects=function(o){var r,a=this.filters.length,l=[];for(r=0;r<a;r+=1)this.filters[r].type===o&&l.push(this.filters[r]);return l};function registerEffect(o,r){registeredEffects[o]={effect:r}}function CVMaskElement(o,r){this.data=o,this.element=r,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var a,l=this.masksProperties.length,c=!1;for(a=0;a<l;a+=1)this.masksProperties[a].mode!=="n"&&(c=!0),this.viewData[a]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[a],3);this.hasMasks=c,c&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var o=this.element.finalTransform.mat,r=this.element.canvasContext,a,l=this.masksProperties.length,c,u,d;for(r.beginPath(),a=0;a<l;a+=1)if(this.masksProperties[a].mode!=="n"){this.masksProperties[a].inv&&(r.moveTo(0,0),r.lineTo(this.element.globalData.compSize.w,0),r.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),r.lineTo(0,this.element.globalData.compSize.h),r.lineTo(0,0)),d=this.viewData[a].v,c=o.applyToPointArray(d.v[0][0],d.v[0][1],0),r.moveTo(c[0],c[1]);var f,m=d._length;for(f=1;f<m;f+=1)u=o.applyToTriplePoints(d.o[f-1],d.i[f],d.v[f]),r.bezierCurveTo(u[0],u[1],u[2],u[3],u[4],u[5]);u=o.applyToTriplePoints(d.o[f-1],d.i[0],d.v[0]),r.bezierCurveTo(u[0],u[1],u[2],u[3],u[4],u[5])}this.element.globalData.renderer.save(!0),r.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var r=this.globalData.canvasContext,a=assetLoader.createCanvas(r.canvas.width,r.canvas.height);this.buffers.push(a);var l=assetLoader.createCanvas(r.canvas.width,r.canvas.height);this.buffers.push(l),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var r=this.globalData;if(r.blendMode!==this.data.bm){r.blendMode=this.data.bm;var a=getBlendMode(this.data.bm);r.canvasContext.globalCompositeOperation=a}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(r){r.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var r=this.buffers[0],a=r.getContext("2d");this.clearCanvas(a),a.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var r=this.buffers[1],a=r.getContext("2d");this.clearCanvas(a),a.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var l=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(l.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var c=assetLoader.getLumaCanvas(this.canvasContext.canvas),u=c.getContext("2d");u.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(c,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(r,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(r){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!r)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var a=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(a),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(a),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(o,r,a,l){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var c=4;r.ty==="rc"?c=5:r.ty==="el"?c=6:r.ty==="sr"&&(c=7),this.sh=ShapePropertyFactory.getShapeProp(o,r,c,o);var u,d=a.length,f;for(u=0;u<d;u+=1)a[u].closed||(f={transforms:l.addTransformSequence(a[u].transforms),trNodes:[]},this.styledShapes.push(f),a[u].elements.push(f))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(o,r,a){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(o,r,a)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(o,r){var a={data:o,type:o.ty,preTransforms:this.transformsManager.addTransformSequence(r),transforms:[],elements:[],closed:o.hd===!0},l={};if(o.ty==="fl"||o.ty==="st"?(l.c=PropertyFactory.getProp(this,o.c,1,255,this),l.c.k||(a.co="rgb("+bmFloor(l.c.v[0])+","+bmFloor(l.c.v[1])+","+bmFloor(l.c.v[2])+")")):(o.ty==="gf"||o.ty==="gs")&&(l.s=PropertyFactory.getProp(this,o.s,1,null,this),l.e=PropertyFactory.getProp(this,o.e,1,null,this),l.h=PropertyFactory.getProp(this,o.h||{k:0},0,.01,this),l.a=PropertyFactory.getProp(this,o.a||{k:0},0,degToRads,this),l.g=new GradientProperty(this,o.g,this)),l.o=PropertyFactory.getProp(this,o.o,0,.01,this),o.ty==="st"||o.ty==="gs"){if(a.lc=lineCapEnum[o.lc||2],a.lj=lineJoinEnum[o.lj||2],o.lj==1&&(a.ml=o.ml),l.w=PropertyFactory.getProp(this,o.w,0,null,this),l.w.k||(a.wi=l.w.v),o.d){var c=new DashProperty(this,o.d,"canvas",this);l.d=c,l.d.k||(a.da=l.d.dashArray,a.do=l.d.dashoffset[0])}}else a.r=o.r===2?"evenodd":"nonzero";return this.stylesList.push(a),l.style=a,l},CVShapeElement.prototype.createGroupElement=function(){var o={it:[],prevViewData:[]};return o},CVShapeElement.prototype.createTransformElement=function(o){var r={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,o.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,o,this)}};return r},CVShapeElement.prototype.createShapeElement=function(o){var r=new CVShapeData(this,o,this.stylesList,this.transformsManager);return this.shapes.push(r),this.addShapeToModifiers(r),r},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var o,r=this.itemsData.length;for(o=0;o<r;o+=1)this.prevViewData[o]=this.itemsData[o];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),r=this.dynamicProperties.length,o=0;o<r;o+=1)this.dynamicProperties[o].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(o){var r,a=this.stylesList.length;for(r=0;r<a;r+=1)this.stylesList[r].closed||this.stylesList[r].transforms.push(o)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var o,r=this.stylesList.length;for(o=0;o<r;o+=1)this.stylesList[o].closed||this.stylesList[o].transforms.pop()},CVShapeElement.prototype.closeStyles=function(o){var r,a=o.length;for(r=0;r<a;r+=1)o[r].closed=!0},CVShapeElement.prototype.searchShapes=function(o,r,a,l,c){var u,d=o.length-1,f,m,y=[],E=[],A,P,R,x=[].concat(c);for(u=d;u>=0;u-=1){if(A=this.searchProcessedElement(o[u]),A?r[u]=a[A-1]:o[u]._shouldRender=l,o[u].ty==="fl"||o[u].ty==="st"||o[u].ty==="gf"||o[u].ty==="gs")A?r[u].style.closed=!1:r[u]=this.createStyleElement(o[u],x),y.push(r[u].style);else if(o[u].ty==="gr"){if(!A)r[u]=this.createGroupElement(o[u]);else for(m=r[u].it.length,f=0;f<m;f+=1)r[u].prevViewData[f]=r[u].it[f];this.searchShapes(o[u].it,r[u].it,r[u].prevViewData,l,x)}else o[u].ty==="tr"?(A||(R=this.createTransformElement(o[u]),r[u]=R),x.push(r[u]),this.addTransformToStyleList(r[u])):o[u].ty==="sh"||o[u].ty==="rc"||o[u].ty==="el"||o[u].ty==="sr"?A||(r[u]=this.createShapeElement(o[u])):o[u].ty==="tm"||o[u].ty==="rd"||o[u].ty==="pb"||o[u].ty==="zz"||o[u].ty==="op"?(A?(P=r[u],P.closed=!1):(P=ShapeModifiers.getModifier(o[u].ty),P.init(this,o[u]),r[u]=P,this.shapeModifiers.push(P)),E.push(P)):o[u].ty==="rp"&&(A?(P=r[u],P.closed=!0):(P=ShapeModifiers.getModifier(o[u].ty),r[u]=P,P.init(this,o,u,r),this.shapeModifiers.push(P),l=!1),E.push(P));this.addProcessedElement(o[u],u+1)}for(this.removeTransformFromStyleList(),this.closeStyles(y),d=E.length,u=0;u<d;u+=1)E[u].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(o,r){(o._opMdf||r.op._mdf||this._isFirstFrame)&&(r.opacity=o.opacity,r.opacity*=r.op.v,r._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var o,r=this.stylesList.length,a,l,c,u,d,f,m=this.globalData.renderer,y=this.globalData.canvasContext,E,A;for(o=0;o<r;o+=1)if(A=this.stylesList[o],E=A.type,!((E==="st"||E==="gs")&&A.wi===0||!A.data._shouldRender||A.coOp===0||this.globalData.currentGlobalAlpha===0)){for(m.save(),d=A.elements,E==="st"||E==="gs"?(m.ctxStrokeStyle(E==="st"?A.co:A.grd),m.ctxLineWidth(A.wi),m.ctxLineCap(A.lc),m.ctxLineJoin(A.lj),m.ctxMiterLimit(A.ml||0)):m.ctxFillStyle(E==="fl"?A.co:A.grd),m.ctxOpacity(A.coOp),E!=="st"&&E!=="gs"&&y.beginPath(),m.ctxTransform(A.preTransforms.finalTransform.props),l=d.length,a=0;a<l;a+=1){for((E==="st"||E==="gs")&&(y.beginPath(),A.da&&(y.setLineDash(A.da),y.lineDashOffset=A.do)),f=d[a].trNodes,u=f.length,c=0;c<u;c+=1)f[c].t==="m"?y.moveTo(f[c].p[0],f[c].p[1]):f[c].t==="c"?y.bezierCurveTo(f[c].pts[0],f[c].pts[1],f[c].pts[2],f[c].pts[3],f[c].pts[4],f[c].pts[5]):y.closePath();(E==="st"||E==="gs")&&(m.ctxStroke(),A.da&&y.setLineDash(this.dashResetter))}E!=="st"&&E!=="gs"&&this.globalData.renderer.ctxFill(A.r),m.restore()}},CVShapeElement.prototype.renderShape=function(o,r,a,l){var c,u=r.length-1,d;for(d=o,c=u;c>=0;c-=1)r[c].ty==="tr"?(d=a[c].transform,this.renderShapeTransform(o,d)):r[c].ty==="sh"||r[c].ty==="el"||r[c].ty==="rc"||r[c].ty==="sr"?this.renderPath(r[c],a[c]):r[c].ty==="fl"?this.renderFill(r[c],a[c],d):r[c].ty==="st"?this.renderStroke(r[c],a[c],d):r[c].ty==="gf"||r[c].ty==="gs"?this.renderGradientFill(r[c],a[c],d):r[c].ty==="gr"?this.renderShape(d,r[c].it,a[c].it):r[c].ty;l&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(o,r){if(this._isFirstFrame||r._mdf||o.transforms._mdf){var a=o.trNodes,l=r.paths,c,u,d,f=l._length;a.length=0;var m=o.transforms.finalTransform;for(d=0;d<f;d+=1){var y=l.shapes[d];if(y&&y.v){for(u=y._length,c=1;c<u;c+=1)c===1&&a.push({t:"m",p:m.applyToPointArray(y.v[0][0],y.v[0][1],0)}),a.push({t:"c",pts:m.applyToTriplePoints(y.o[c-1],y.i[c],y.v[c])});u===1&&a.push({t:"m",p:m.applyToPointArray(y.v[0][0],y.v[0][1],0)}),y.c&&u&&(a.push({t:"c",pts:m.applyToTriplePoints(y.o[c-1],y.i[0],y.v[0])}),a.push({t:"z"}))}}o.trNodes=a}},CVShapeElement.prototype.renderPath=function(o,r){if(o.hd!==!0&&o._shouldRender){var a,l=r.styledShapes.length;for(a=0;a<l;a+=1)this.renderStyledShape(r.styledShapes[a],r.sh)}},CVShapeElement.prototype.renderFill=function(o,r,a){var l=r.style;(r.c._mdf||this._isFirstFrame)&&(l.co="rgb("+bmFloor(r.c.v[0])+","+bmFloor(r.c.v[1])+","+bmFloor(r.c.v[2])+")"),(r.o._mdf||a._opMdf||this._isFirstFrame)&&(l.coOp=r.o.v*a.opacity)},CVShapeElement.prototype.renderGradientFill=function(o,r,a){var l=r.style,c;if(!l.grd||r.g._mdf||r.s._mdf||r.e._mdf||o.t!==1&&(r.h._mdf||r.a._mdf)){var u=this.globalData.canvasContext,d=r.s.v,f=r.e.v;if(o.t===1)c=u.createLinearGradient(d[0],d[1],f[0],f[1]);else{var m=Math.sqrt(Math.pow(d[0]-f[0],2)+Math.pow(d[1]-f[1],2)),y=Math.atan2(f[1]-d[1],f[0]-d[0]),E=r.h.v;E>=1?E=.99:E<=-1&&(E=-.99);var A=m*E,P=Math.cos(y+r.a.v)*A+d[0],R=Math.sin(y+r.a.v)*A+d[1];c=u.createRadialGradient(P,R,0,d[0],d[1],m)}var x,M=o.g.p,$=r.g.c,V=1;for(x=0;x<M;x+=1)r.g._hasOpacity&&r.g._collapsable&&(V=r.g.o[x*2+1]),c.addColorStop($[x*4]/100,"rgba("+$[x*4+1]+","+$[x*4+2]+","+$[x*4+3]+","+V+")");l.grd=c}l.coOp=r.o.v*a.opacity},CVShapeElement.prototype.renderStroke=function(o,r,a){var l=r.style,c=r.d;c&&(c._mdf||this._isFirstFrame)&&(l.da=c.dashArray,l.do=c.dashoffset[0]),(r.c._mdf||this._isFirstFrame)&&(l.co="rgb("+bmFloor(r.c.v[0])+","+bmFloor(r.c.v[1])+","+bmFloor(r.c.v[2])+")"),(r.o._mdf||a._opMdf||this._isFirstFrame)&&(l.coOp=r.o.v*a.opacity),(r.w._mdf||this._isFirstFrame)&&(l.wi=r.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(o,r,a){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(o,r,a)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var o=this.textProperty.currentData;this.renderedLetters=createSizedArray(o.l?o.l.length:0);var r=!1;o.fc?(r=!0,this.values.fill=this.buildColor(o.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=r;var a=!1;o.sc&&(a=!0,this.values.stroke=this.buildColor(o.sc),this.values.sWidth=o.sw);var l=this.globalData.fontManager.getFontByName(o.f),c,u,d=o.l,f=this.mHelper;this.stroke=a,this.values.fValue=o.finalSize+"px "+this.globalData.fontManager.getFontByName(o.f).fFamily,u=o.finalText.length;var m,y,E,A,P,R,x,M,$,V,B=this.data.singleShape,O=o.tr*.001*o.finalSize,L=0,F=0,j=!0,U=0;for(c=0;c<u;c+=1){m=this.globalData.fontManager.getCharData(o.finalText[c],l.fStyle,this.globalData.fontManager.getFontByName(o.f).fFamily),y=m&&m.data||{},f.reset(),B&&d[c].n&&(L=-O,F+=o.yOffset,F+=j?1:0,j=!1),P=y.shapes?y.shapes[0].it:[],x=P.length,f.scale(o.finalSize/100,o.finalSize/100),B&&this.applyTextPropertiesToMatrix(o,f,d[c].line,L,F),$=createSizedArray(x-1);var G=0;for(R=0;R<x;R+=1)if(P[R].ty==="sh"){for(A=P[R].ks.k.i.length,M=P[R].ks.k,V=[],E=1;E<A;E+=1)E===1&&V.push(f.applyToX(M.v[0][0],M.v[0][1],0),f.applyToY(M.v[0][0],M.v[0][1],0)),V.push(f.applyToX(M.o[E-1][0],M.o[E-1][1],0),f.applyToY(M.o[E-1][0],M.o[E-1][1],0),f.applyToX(M.i[E][0],M.i[E][1],0),f.applyToY(M.i[E][0],M.i[E][1],0),f.applyToX(M.v[E][0],M.v[E][1],0),f.applyToY(M.v[E][0],M.v[E][1],0));V.push(f.applyToX(M.o[E-1][0],M.o[E-1][1],0),f.applyToY(M.o[E-1][0],M.o[E-1][1],0),f.applyToX(M.i[0][0],M.i[0][1],0),f.applyToY(M.i[0][0],M.i[0][1],0),f.applyToX(M.v[0][0],M.v[0][1],0),f.applyToY(M.v[0][0],M.v[0][1],0)),$[G]=V,G+=1}B&&(L+=d[c].l,L+=O),this.textSpans[U]?this.textSpans[U].elem=$:this.textSpans[U]={elem:$},U+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var o=this.canvasContext;o.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var r,a,l,c,u,d,f=this.textAnimator.renderedLetters,m=this.textProperty.currentData.l;a=m.length;var y,E=null,A=null,P=null,R,x,M=this.globalData.renderer;for(r=0;r<a;r+=1)if(!m[r].n){if(y=f[r],y&&(M.save(),M.ctxTransform(y.p),M.ctxOpacity(y.o)),this.fill){for(y&&y.fc?E!==y.fc&&(M.ctxFillStyle(y.fc),E=y.fc):E!==this.values.fill&&(E=this.values.fill,M.ctxFillStyle(this.values.fill)),R=this.textSpans[r].elem,c=R.length,this.globalData.canvasContext.beginPath(),l=0;l<c;l+=1)for(x=R[l],d=x.length,this.globalData.canvasContext.moveTo(x[0],x[1]),u=2;u<d;u+=6)this.globalData.canvasContext.bezierCurveTo(x[u],x[u+1],x[u+2],x[u+3],x[u+4],x[u+5]);this.globalData.canvasContext.closePath(),M.ctxFill()}if(this.stroke){for(y&&y.sw?P!==y.sw&&(P=y.sw,M.ctxLineWidth(y.sw)):P!==this.values.sWidth&&(P=this.values.sWidth,M.ctxLineWidth(this.values.sWidth)),y&&y.sc?A!==y.sc&&(A=y.sc,M.ctxStrokeStyle(y.sc)):A!==this.values.stroke&&(A=this.values.stroke,M.ctxStrokeStyle(this.values.stroke)),R=this.textSpans[r].elem,c=R.length,this.globalData.canvasContext.beginPath(),l=0;l<c;l+=1)for(x=R[l],d=x.length,this.globalData.canvasContext.moveTo(x[0],x[1]),u=2;u<d;u+=6)this.globalData.canvasContext.bezierCurveTo(x[u],x[u+1],x[u+2],x[u+3],x[u+4],x[u+5]);this.globalData.canvasContext.closePath(),M.ctxStroke()}y&&this.globalData.renderer.restore()}};function CVImageElement(o,r,a){this.assetData=r.getAssetData(o.refId),this.img=r.imageLoader.getAsset(this.assetData),this.initElement(o,r,a)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var o=createTag("canvas");o.width=this.assetData.w,o.height=this.assetData.h;var r=o.getContext("2d"),a=this.img.width,l=this.img.height,c=a/l,u=this.assetData.w/this.assetData.h,d,f,m=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;c>u&&m==="xMidYMid slice"||c<u&&m!=="xMidYMid slice"?(f=l,d=f*u):(d=a,f=d/u),r.drawImage(this.img,(a-d)/2,(l-f)/2,d,f,0,0,this.assetData.w,this.assetData.h),this.img=o}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(o,r,a){this.initElement(o,r,a)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(o){return new CVShapeElement(o,this.globalData,this)},CanvasRendererBase.prototype.createText=function(o){return new CVTextElement(o,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(o){return new CVImageElement(o,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(o){return new CVSolidElement(o,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(o){o[0]===1&&o[1]===0&&o[4]===0&&o[5]===1&&o[12]===0&&o[13]===0||this.canvasContext.transform(o[0],o[1],o[4],o[5],o[12],o[13])},CanvasRendererBase.prototype.ctxOpacity=function(o){this.canvasContext.globalAlpha*=o<0?0:o},CanvasRendererBase.prototype.ctxFillStyle=function(o){this.canvasContext.fillStyle=o},CanvasRendererBase.prototype.ctxStrokeStyle=function(o){this.canvasContext.strokeStyle=o},CanvasRendererBase.prototype.ctxLineWidth=function(o){this.canvasContext.lineWidth=o},CanvasRendererBase.prototype.ctxLineCap=function(o){this.canvasContext.lineCap=o},CanvasRendererBase.prototype.ctxLineJoin=function(o){this.canvasContext.lineJoin=o},CanvasRendererBase.prototype.ctxMiterLimit=function(o){this.canvasContext.miterLimit=o},CanvasRendererBase.prototype.ctxFill=function(o){this.canvasContext.fill(o)},CanvasRendererBase.prototype.ctxFillRect=function(o,r,a,l){this.canvasContext.fillRect(o,r,a,l)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(o){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}o&&(this.globalData.blendMode="source-over"),this.contextData.restore(o)},CanvasRendererBase.prototype.configAnimation=function(o){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var r=this.animationItem.container.style;r.width="100%",r.height="100%";var a="0px 0px 0px";r.transformOrigin=a,r.mozTransformOrigin=a,r.webkitTransformOrigin=a,r["-webkit-transform"]=a,r.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=o,this.layers=o.layers,this.transformCanvas={w:o.w,h:o.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(o,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(o.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(o,r){this.reset();var a,l;o?(a=o,l=r,this.canvasContext.canvas.width=a,this.canvasContext.canvas.height=l):(this.animationItem.wrapper&&this.animationItem.container?(a=this.animationItem.wrapper.offsetWidth,l=this.animationItem.wrapper.offsetHeight):(a=this.canvasContext.canvas.width,l=this.canvasContext.canvas.height),this.canvasContext.canvas.width=a*this.renderConfig.dpr,this.canvasContext.canvas.height=l*this.renderConfig.dpr);var c,u;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var d=this.renderConfig.preserveAspectRatio.split(" "),f=d[1]||"meet",m=d[0]||"xMidYMid",y=m.substr(0,4),E=m.substr(4);c=a/l,u=this.transformCanvas.w/this.transformCanvas.h,u>c&&f==="meet"||u<c&&f==="slice"?(this.transformCanvas.sx=a/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=a/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=l/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=l/(this.transformCanvas.h/this.renderConfig.dpr)),y==="xMid"&&(u<c&&f==="meet"||u>c&&f==="slice")?this.transformCanvas.tx=(a-this.transformCanvas.w*(l/this.transformCanvas.h))/2*this.renderConfig.dpr:y==="xMax"&&(u<c&&f==="meet"||u>c&&f==="slice")?this.transformCanvas.tx=(a-this.transformCanvas.w*(l/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,E==="YMid"&&(u>c&&f==="meet"||u<c&&f==="slice")?this.transformCanvas.ty=(l-this.transformCanvas.h*(a/this.transformCanvas.w))/2*this.renderConfig.dpr:E==="YMax"&&(u>c&&f==="meet"||u<c&&f==="slice")?this.transformCanvas.ty=(l-this.transformCanvas.h*(a/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=a/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=l/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");var o,r=this.layers?this.layers.length:0;for(o=r-1;o>=0;o-=1)this.elements[o]&&this.elements[o].destroy&&this.elements[o].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(o,r){if(!(this.renderedFrame===o&&this.renderConfig.clearCanvas===!0&&!r||this.destroyed||o===-1)){this.renderedFrame=o,this.globalData.frameNum=o-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||r,this.globalData.projectInterface.currentFrame=o;var a,l=this.layers.length;for(this.completeLayers||this.checkLayers(o),a=l-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&this.elements[a].prepareFrame(o-this.layers[a].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),a=l-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&this.elements[a].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(o){var r=this.elements;if(!(r[o]||this.layers[o].ty===99)){var a=this.createItem(this.layers[o],this,this.globalData);r[o]=a,a.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var o=this.pendingElements.pop();o.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var o,r=15;for(o=0;o<r;o+=1){var a=new CanvasContext;this.stack[o]=a}this._length=r,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}CVContextData.prototype.duplicate=function(){var o=this._length*2,r=0;for(r=this._length;r<o;r+=1)this.stack[r]=new CanvasContext;this._length=o},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(o){this.cArrPos-=1;var r=this.stack[this.cArrPos],a=r.transform,l,c=this.cTr.props;for(l=0;l<16;l+=1)c[l]=a[l];if(o){this.nativeContext.restore();var u=this.stack[this.cArrPos+1];this.appliedFillStyle=u.fillStyle,this.appliedStrokeStyle=u.strokeStyle,this.appliedLineWidth=u.lineWidth,this.appliedLineCap=u.lineCap,this.appliedLineJoin=u.lineJoin,this.appliedMiterLimit=u.miterLimit}this.nativeContext.setTransform(a[0],a[1],a[4],a[5],a[12],a[13]),(o||r.opacity!==-1&&this.currentOpacity!==r.opacity)&&(this.nativeContext.globalAlpha=r.opacity,this.currentOpacity=r.opacity),this.currentFillStyle=r.fillStyle,this.currentStrokeStyle=r.strokeStyle,this.currentLineWidth=r.lineWidth,this.currentLineCap=r.lineCap,this.currentLineJoin=r.lineJoin,this.currentMiterLimit=r.miterLimit},CVContextData.prototype.save=function(o){o&&this.nativeContext.save();var r=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var a=this.stack[this.cArrPos],l;for(l=0;l<16;l+=1)a.transform[l]=r[l];this.cArrPos+=1;var c=this.stack[this.cArrPos];c.opacity=a.opacity,c.fillStyle=a.fillStyle,c.strokeStyle=a.strokeStyle,c.lineWidth=a.lineWidth,c.lineCap=a.lineCap,c.lineJoin=a.lineJoin,c.miterLimit=a.miterLimit},CVContextData.prototype.setOpacity=function(o){this.stack[this.cArrPos].opacity=o},CVContextData.prototype.setContext=function(o){this.nativeContext=o},CVContextData.prototype.fillStyle=function(o){this.stack[this.cArrPos].fillStyle!==o&&(this.currentFillStyle=o,this.stack[this.cArrPos].fillStyle=o)},CVContextData.prototype.strokeStyle=function(o){this.stack[this.cArrPos].strokeStyle!==o&&(this.currentStrokeStyle=o,this.stack[this.cArrPos].strokeStyle=o)},CVContextData.prototype.lineWidth=function(o){this.stack[this.cArrPos].lineWidth!==o&&(this.currentLineWidth=o,this.stack[this.cArrPos].lineWidth=o)},CVContextData.prototype.lineCap=function(o){this.stack[this.cArrPos].lineCap!==o&&(this.currentLineCap=o,this.stack[this.cArrPos].lineCap=o)},CVContextData.prototype.lineJoin=function(o){this.stack[this.cArrPos].lineJoin!==o&&(this.currentLineJoin=o,this.stack[this.cArrPos].lineJoin=o)},CVContextData.prototype.miterLimit=function(o){this.stack[this.cArrPos].miterLimit!==o&&(this.currentMiterLimit=o,this.stack[this.cArrPos].miterLimit=o)},CVContextData.prototype.transform=function(o){this.transformMat.cloneFromProps(o);var r=this.cTr;this.transformMat.multiply(r),r.cloneFromProps(this.transformMat.props);var a=r.props;this.nativeContext.setTransform(a[0],a[1],a[4],a[5],a[12],a[13])},CVContextData.prototype.opacity=function(o){var r=this.stack[this.cArrPos].opacity;r*=o<0?0:o,this.stack[this.cArrPos].opacity!==r&&(this.currentOpacity!==o&&(this.nativeContext.globalAlpha=o,this.currentOpacity=o),this.stack[this.cArrPos].opacity=r)},CVContextData.prototype.fill=function(o){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(o)},CVContextData.prototype.fillRect=function(o,r,a,l){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(o,r,a,l)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(o,r,a){this.completeLayers=!1,this.layers=o.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(o,r,a),this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,r.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var o=this.canvasContext;o.beginPath(),o.moveTo(0,0),o.lineTo(this.data.w,0),o.lineTo(this.data.w,this.data.h),o.lineTo(0,this.data.h),o.lineTo(0,0),o.clip();var r,a=this.layers.length;for(r=a-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame()},CVCompElement.prototype.destroy=function(){var o,r=this.layers.length;for(o=r-1;o>=0;o-=1)this.elements[o]&&this.elements[o].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(o){return new CVCompElement(o,this.globalData,this)};function CanvasRenderer(o,r){this.animationItem=o,this.renderConfig={clearCanvas:r&&r.clearCanvas!==void 0?r.clearCanvas:!0,context:r&&r.context||null,progressiveLoad:r&&r.progressiveLoad||!1,preserveAspectRatio:r&&r.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:r&&r.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:r&&r.contentVisibility||"visible",className:r&&r.className||"",id:r&&r.id||"",runExpressions:!r||r.runExpressions===void 0||r.runExpressions},this.renderConfig.dpr=r&&r.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=r&&r.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(o){return new CVCompElement(o,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var r=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var a=this.finalTransform.mat.toCSS();r.transform=a,r.webkitTransform=a}this.finalTransform._opMdf&&(r.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(o,r,a){this.initElement(o,r,a)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var o;this.data.hasMask?(o=createNS("rect"),o.setAttribute("width",this.data.sw),o.setAttribute("height",this.data.sh),o.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(o=createTag("div"),o.style.width=this.data.sw+"px",o.style.height=this.data.sh+"px",o.style.backgroundColor=this.data.sc),this.layerElement.appendChild(o)};function HShapeElement(o,r,a){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(o,r,a),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var o;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),o=this.svgElement;else{o=createNS("svg");var r=this.comp.data?this.comp.data:this.globalData.compSize;o.setAttribute("width",r.w),o.setAttribute("height",r.h),o.appendChild(this.shapesContainer),this.layerElement.appendChild(o)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=o},HShapeElement.prototype.getTransformedPoint=function(o,r){var a,l=o.length;for(a=0;a<l;a+=1)r=o[a].mProps.v.applyToPointArray(r[0],r[1],0);return r},HShapeElement.prototype.calculateShapeBoundingBox=function(o,r){var a=o.sh.v,l=o.transformers,c,u=a._length,d,f,m,y;if(!(u<=1)){for(c=0;c<u-1;c+=1)d=this.getTransformedPoint(l,a.v[c]),f=this.getTransformedPoint(l,a.o[c]),m=this.getTransformedPoint(l,a.i[c+1]),y=this.getTransformedPoint(l,a.v[c+1]),this.checkBounds(d,f,m,y,r);a.c&&(d=this.getTransformedPoint(l,a.v[c]),f=this.getTransformedPoint(l,a.o[c]),m=this.getTransformedPoint(l,a.i[0]),y=this.getTransformedPoint(l,a.v[0]),this.checkBounds(d,f,m,y,r))}},HShapeElement.prototype.checkBounds=function(o,r,a,l,c){this.getBoundsOfCurve(o,r,a,l);var u=this.shapeBoundingBox;c.x=bmMin(u.left,c.x),c.xMax=bmMax(u.right,c.xMax),c.y=bmMin(u.top,c.y),c.yMax=bmMax(u.bottom,c.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(o,r,a,l){for(var c=[[o[0],l[0]],[o[1],l[1]]],u,d,f,m,y,E,A,P=0;P<2;++P)d=6*o[P]-12*r[P]+6*a[P],u=-3*o[P]+9*r[P]-9*a[P]+3*l[P],f=3*r[P]-3*o[P],d|=0,u|=0,f|=0,u===0&&d===0||(u===0?(m=-f/d,m>0&&m<1&&c[P].push(this.calculateF(m,o,r,a,l,P))):(y=d*d-4*f*u,y>=0&&(E=(-d+bmSqrt(y))/(2*u),E>0&&E<1&&c[P].push(this.calculateF(E,o,r,a,l,P)),A=(-d-bmSqrt(y))/(2*u),A>0&&A<1&&c[P].push(this.calculateF(A,o,r,a,l,P)))));this.shapeBoundingBox.left=bmMin.apply(null,c[0]),this.shapeBoundingBox.top=bmMin.apply(null,c[1]),this.shapeBoundingBox.right=bmMax.apply(null,c[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,c[1])},HShapeElement.prototype.calculateF=function(o,r,a,l,c,u){return bmPow(1-o,3)*r[u]+3*bmPow(1-o,2)*o*a[u]+3*(1-o)*bmPow(o,2)*l[u]+bmPow(o,3)*c[u]},HShapeElement.prototype.calculateBoundingBox=function(o,r){var a,l=o.length;for(a=0;a<l;a+=1)o[a]&&o[a].sh?this.calculateShapeBoundingBox(o[a],r):o[a]&&o[a].it?this.calculateBoundingBox(o[a].it,r):o[a]&&o[a].style&&o[a].w&&this.expandStrokeBoundingBox(o[a].w,r)},HShapeElement.prototype.expandStrokeBoundingBox=function(o,r){var a=0;if(o.keyframes){for(var l=0;l<o.keyframes.length;l+=1){var c=o.keyframes[l].s;c>a&&(a=c)}a*=o.mult}else a=o.v*o.mult;r.x-=a,r.xMax+=a,r.y-=a,r.yMax+=a},HShapeElement.prototype.currentBoxContains=function(o){return this.currentBBox.x<=o.x&&this.currentBBox.y<=o.y&&this.currentBBox.width+this.currentBBox.x>=o.x+o.width&&this.currentBBox.height+this.currentBBox.y>=o.y+o.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var o=this.tempBoundingBox,r=999999;if(o.x=r,o.xMax=-r,o.y=r,o.yMax=-r,this.calculateBoundingBox(this.itemsData,o),o.width=o.xMax<o.x?0:o.xMax-o.x,o.height=o.yMax<o.y?0:o.yMax-o.y,this.currentBoxContains(o))return;var a=!1;if(this.currentBBox.w!==o.width&&(this.currentBBox.w=o.width,this.shapeCont.setAttribute("width",o.width),a=!0),this.currentBBox.h!==o.height&&(this.currentBBox.h=o.height,this.shapeCont.setAttribute("height",o.height),a=!0),a||this.currentBBox.x!==o.x||this.currentBBox.y!==o.y){this.currentBBox.w=o.width,this.currentBBox.h=o.height,this.currentBBox.x=o.x,this.currentBBox.y=o.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var l=this.shapeCont.style,c="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";l.transform=c,l.webkitTransform=c}}};function HTextElement(o,r,a){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(o,r,a)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var o=createNS("g");this.maskedElement.appendChild(o),this.innerElem=o}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var o=this.textProperty.currentData;this.renderedLetters=createSizedArray(o.l?o.l.length:0);var r=this.innerElem.style,a=o.fc?this.buildColor(o.fc):"rgba(0,0,0,0)";r.fill=a,r.color=a,o.sc&&(r.stroke=this.buildColor(o.sc),r.strokeWidth=o.sw+"px");var l=this.globalData.fontManager.getFontByName(o.f);if(!this.globalData.fontManager.chars)if(r.fontSize=o.finalSize+"px",r.lineHeight=o.finalSize+"px",l.fClass)this.innerElem.className=l.fClass;else{r.fontFamily=l.fFamily;var c=o.fWeight,u=o.fStyle;r.fontStyle=u,r.fontWeight=c}var d,f,m=o.l;f=m.length;var y,E,A,P=this.mHelper,R,x="",M=0;for(d=0;d<f;d+=1){if(this.globalData.fontManager.chars?(this.textPaths[M]?y=this.textPaths[M]:(y=createNS("path"),y.setAttribute("stroke-linecap",lineCapEnum[1]),y.setAttribute("stroke-linejoin",lineJoinEnum[2]),y.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[M]?(E=this.textSpans[M],A=E.children[0]):(E=createTag("div"),E.style.lineHeight=0,A=createNS("svg"),A.appendChild(y),styleDiv(E)))):this.isMasked?y=this.textPaths[M]?this.textPaths[M]:createNS("text"):this.textSpans[M]?(E=this.textSpans[M],y=this.textPaths[M]):(E=createTag("span"),styleDiv(E),y=createTag("span"),styleDiv(y),E.appendChild(y)),this.globalData.fontManager.chars){var $=this.globalData.fontManager.getCharData(o.finalText[d],l.fStyle,this.globalData.fontManager.getFontByName(o.f).fFamily),V;if($?V=$.data:V=null,P.reset(),V&&V.shapes&&V.shapes.length&&(R=V.shapes[0].it,P.scale(o.finalSize/100,o.finalSize/100),x=this.createPathShape(P,R),y.setAttribute("d",x)),this.isMasked)this.innerElem.appendChild(y);else{if(this.innerElem.appendChild(E),V&&V.shapes){document.body.appendChild(A);var B=A.getBBox();A.setAttribute("width",B.width+2),A.setAttribute("height",B.height+2),A.setAttribute("viewBox",B.x-1+" "+(B.y-1)+" "+(B.width+2)+" "+(B.height+2));var O=A.style,L="translate("+(B.x-1)+"px,"+(B.y-1)+"px)";O.transform=L,O.webkitTransform=L,m[d].yOffset=B.y-1}else A.setAttribute("width",1),A.setAttribute("height",1);E.appendChild(A)}}else if(y.textContent=m[d].val,y.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(y);else{this.innerElem.appendChild(E);var F=y.style,j="translate3d(0,"+-o.finalSize/1.2+"px,0)";F.transform=j,F.webkitTransform=j}this.isMasked?this.textSpans[M]=y:this.textSpans[M]=E,this.textSpans[M].style.display="block",this.textPaths[M]=y,M+=1}for(;M<this.textSpans.length;)this.textSpans[M].style.display="none",M+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var o;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),o=this.svgElement.style;var r="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";o.transform=r,o.webkitTransform=r}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!(!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)){var a,l,c=0,u=this.textAnimator.renderedLetters,d=this.textProperty.currentData.l;l=d.length;var f,m,y;for(a=0;a<l;a+=1)d[a].n?c+=1:(m=this.textSpans[a],y=this.textPaths[a],f=u[c],c+=1,f._mdf.m&&(this.isMasked?m.setAttribute("transform",f.m):(m.style.webkitTransform=f.m,m.style.transform=f.m)),m.style.opacity=f.o,f.sw&&f._mdf.sw&&y.setAttribute("stroke-width",f.sw),f.sc&&f._mdf.sc&&y.setAttribute("stroke",f.sc),f.fc&&f._mdf.fc&&(y.setAttribute("fill",f.fc),y.style.color=f.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var E=this.innerElem.getBBox();this.currentBBox.w!==E.width&&(this.currentBBox.w=E.width,this.svgElement.setAttribute("width",E.width)),this.currentBBox.h!==E.height&&(this.currentBBox.h=E.height,this.svgElement.setAttribute("height",E.height));var A=1;if(this.currentBBox.w!==E.width+A*2||this.currentBBox.h!==E.height+A*2||this.currentBBox.x!==E.x-A||this.currentBBox.y!==E.y-A){this.currentBBox.w=E.width+A*2,this.currentBBox.h=E.height+A*2,this.currentBBox.x=E.x-A,this.currentBBox.y=E.y-A,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),o=this.svgElement.style;var P="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";o.transform=P,o.webkitTransform=P}}}};function HCameraElement(o,r,a){this.initFrame(),this.initBaseData(o,r,a),this.initHierarchy();var l=PropertyFactory.getProp;if(this.pe=l(this,o.pe,0,0,this),o.ks.p.s?(this.px=l(this,o.ks.p.x,1,0,this),this.py=l(this,o.ks.p.y,1,0,this),this.pz=l(this,o.ks.p.z,1,0,this)):this.p=l(this,o.ks.p,1,0,this),o.ks.a&&(this.a=l(this,o.ks.a,1,0,this)),o.ks.or.k.length&&o.ks.or.k[0].to){var c,u=o.ks.or.k.length;for(c=0;c<u;c+=1)o.ks.or.k[c].to=null,o.ks.or.k[c].ti=null}this.or=l(this,o.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=l(this,o.ks.rx,0,degToRads,this),this.ry=l(this,o.ks.ry,0,degToRads,this),this.rz=l(this,o.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var o,r=this.comp.threeDElements.length,a,l,c;for(o=0;o<r;o+=1)if(a=this.comp.threeDElements[o],a.type==="3d"){l=a.perspectiveElem.style,c=a.container.style;var u=this.pe.v+"px",d="0px 0px 0px",f="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";l.perspective=u,l.webkitPerspective=u,c.transformOrigin=d,c.mozTransformOrigin=d,c.webkitTransformOrigin=d,l.transform=f,l.webkitTransform=f}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var o=this._isFirstFrame,r,a;if(this.hierarchy)for(a=this.hierarchy.length,r=0;r<a;r+=1)o=this.hierarchy[r].finalTransform.mProp._mdf||o;if(o||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(a=this.hierarchy.length-1,r=a;r>=0;r-=1){var l=this.hierarchy[r].finalTransform.mProp;this.mat.translate(-l.p.v[0],-l.p.v[1],l.p.v[2]),this.mat.rotateX(-l.or.v[0]).rotateY(-l.or.v[1]).rotateZ(l.or.v[2]),this.mat.rotateX(-l.rx.v).rotateY(-l.ry.v).rotateZ(l.rz.v),this.mat.scale(1/l.s.v[0],1/l.s.v[1],1/l.s.v[2]),this.mat.translate(l.a.v[0],l.a.v[1],l.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var c;this.p?c=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:c=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var u=Math.sqrt(Math.pow(c[0],2)+Math.pow(c[1],2)+Math.pow(c[2],2)),d=[c[0]/u,c[1]/u,c[2]/u],f=Math.sqrt(d[2]*d[2]+d[0]*d[0]),m=Math.atan2(d[1],f),y=Math.atan2(d[0],-d[2]);this.mat.rotateY(y).rotateX(-m)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var E=!this._prevMat.equals(this.mat);if((E||this.pe._mdf)&&this.comp.threeDElements){a=this.comp.threeDElements.length;var A,P,R;for(r=0;r<a;r+=1)if(A=this.comp.threeDElements[r],A.type==="3d"){if(E){var x=this.mat.toCSS();R=A.container.style,R.transform=x,R.webkitTransform=x}this.pe._mdf&&(P=A.perspectiveElem.style,P.perspective=this.pe.v+"px",P.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(o){this.prepareProperties(o,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(o,r,a){this.assetData=r.getAssetData(o.refId),this.initElement(o,r,a)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var o=this.globalData.getAssetsPath(this.assetData),r=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",o),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(r),r.crossOrigin="anonymous",r.src=o,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(o,r){this.animationItem=o,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:r&&r.className||"",imagePreserveAspectRatio:r&&r.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(r&&r.hideOnTransparent===!1),filterSize:{width:r&&r.filterSize&&r.filterSize.width||"400%",height:r&&r.filterSize&&r.filterSize.height||"400%",x:r&&r.filterSize&&r.filterSize.x||"-100%",y:r&&r.filterSize&&r.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var o=this.pendingElements.pop();o.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(o,r){var a=o.getBaseElement();if(a){var l=this.layers[r];if(!l.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(a,r);else{for(var c=0,u,d,f;c<r;)this.elements[c]&&this.elements[c]!==!0&&this.elements[c].getBaseElement&&(d=this.elements[c],f=this.layers[c].ddd?this.getThreeDContainerByPos(c):d.getBaseElement(),u=f||u),c+=1;u?(!l.ddd||!this.supports3d)&&this.layerElement.insertBefore(a,u):(!l.ddd||!this.supports3d)&&this.layerElement.appendChild(a)}else this.addTo3dContainer(a,r)}},HybridRendererBase.prototype.createShape=function(o){return this.supports3d?new HShapeElement(o,this.globalData,this):new SVGShapeElement(o,this.globalData,this)},HybridRendererBase.prototype.createText=function(o){return this.supports3d?new HTextElement(o,this.globalData,this):new SVGTextLottieElement(o,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(o){return this.camera=new HCameraElement(o,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(o){return this.supports3d?new HImageElement(o,this.globalData,this):new IImageElement(o,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(o){return this.supports3d?new HSolidElement(o,this.globalData,this):new ISolidElement(o,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(o){for(var r=0,a=this.threeDElements.length;r<a;){if(this.threeDElements[r].startPos<=o&&this.threeDElements[r].endPos>=o)return this.threeDElements[r].perspectiveElem;r+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(o,r){var a=createTag("div"),l,c;styleDiv(a);var u=createTag("div");if(styleDiv(u),r==="3d"){l=a.style,l.width=this.globalData.compSize.w+"px",l.height=this.globalData.compSize.h+"px";var d="50% 50%";l.webkitTransformOrigin=d,l.mozTransformOrigin=d,l.transformOrigin=d,c=u.style;var f="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";c.transform=f,c.webkitTransform=f}a.appendChild(u);var m={container:u,perspectiveElem:a,startPos:o,endPos:o,type:r};return this.threeDElements.push(m),m},HybridRendererBase.prototype.build3dContainers=function(){var o,r=this.layers.length,a,l="";for(o=0;o<r;o+=1)this.layers[o].ddd&&this.layers[o].ty!==3?(l!=="3d"&&(l="3d",a=this.createThreeDContainer(o,"3d")),a.endPos=Math.max(a.endPos,o)):(l!=="2d"&&(l="2d",a=this.createThreeDContainer(o,"2d")),a.endPos=Math.max(a.endPos,o));for(r=this.threeDElements.length,o=r-1;o>=0;o-=1)this.resizerElem.appendChild(this.threeDElements[o].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(o,r){for(var a=0,l=this.threeDElements.length;a<l;){if(r<=this.threeDElements[a].endPos){for(var c=this.threeDElements[a].startPos,u;c<r;)this.elements[c]&&this.elements[c].getBaseElement&&(u=this.elements[c].getBaseElement()),c+=1;u?this.threeDElements[a].container.insertBefore(o,u):this.threeDElements[a].container.appendChild(o);break}a+=1}},HybridRendererBase.prototype.configAnimation=function(o){var r=createTag("div"),a=this.animationItem.wrapper,l=r.style;l.width=o.w+"px",l.height=o.h+"px",this.resizerElem=r,styleDiv(r),l.transformStyle="flat",l.mozTransformStyle="flat",l.webkitTransformStyle="flat",this.renderConfig.className&&r.setAttribute("class",this.renderConfig.className),a.appendChild(r),l.overflow="hidden";var c=createNS("svg");c.setAttribute("width","1"),c.setAttribute("height","1"),styleDiv(c),this.resizerElem.appendChild(c);var u=createNS("defs");c.appendChild(u),this.data=o,this.setupGlobalData(o,c),this.globalData.defs=u,this.layers=o.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var o,r=this.layers?this.layers.length:0;for(o=0;o<r;o+=1)this.elements[o]&&this.elements[o].destroy&&this.elements[o].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var o=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight,a=o/r,l=this.globalData.compSize.w/this.globalData.compSize.h,c,u,d,f;l>a?(c=o/this.globalData.compSize.w,u=o/this.globalData.compSize.w,d=0,f=(r-this.globalData.compSize.h*(o/this.globalData.compSize.w))/2):(c=r/this.globalData.compSize.h,u=r/this.globalData.compSize.h,d=(o-this.globalData.compSize.w*(r/this.globalData.compSize.h))/2,f=0);var m=this.resizerElem.style;m.webkitTransform="matrix3d("+c+",0,0,0,0,"+u+",0,0,0,0,1,0,"+d+","+f+",0,1)",m.transform=m.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var o=this.globalData.compSize.w,r=this.globalData.compSize.h,a,l=this.threeDElements.length;for(a=0;a<l;a+=1){var c=this.threeDElements[a].perspectiveElem.style;c.webkitPerspective=Math.sqrt(Math.pow(o,2)+Math.pow(r,2))+"px",c.perspective=c.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(o){var r,a=o.length,l=createTag("div");for(r=0;r<a;r+=1)if(o[r].xt){var c=this.createComp(o[r],l,this.globalData.comp,null);c.initExpressions(),this.globalData.projectInterface.registerComposition(c)}};function HCompElement(o,r,a){this.layers=o.layers,this.supports3d=!o.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(o,r,a),this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,r.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(o,r){for(var a=0,l;a<r;)this.elements[a]&&this.elements[a].getBaseElement&&(l=this.elements[a].getBaseElement()),a+=1;l?this.layerElement.insertBefore(o,l):this.layerElement.appendChild(o)},HCompElement.prototype.createComp=function(o){return this.supports3d?new HCompElement(o,this.globalData,this):new SVGCompElement(o,this.globalData,this)};function HybridRenderer(o,r){this.animationItem=o,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:r&&r.className||"",imagePreserveAspectRatio:r&&r.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(r&&r.hideOnTransparent===!1),filterSize:{width:r&&r.filterSize&&r.filterSize.width||"400%",height:r&&r.filterSize&&r.filterSize.height||"400%",x:r&&r.filterSize&&r.filterSize.x||"-100%",y:r&&r.filterSize&&r.filterSize.y||"-100%"},runExpressions:!r||r.runExpressions===void 0||r.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(o){return this.supports3d?new HCompElement(o,this.globalData,this):new SVGCompElement(o,this.globalData,this)};var CompExpressionInterface=function(){return function(o){function r(a){for(var l=0,c=o.layers.length;l<c;){if(o.layers[l].nm===a||o.layers[l].ind===a)return o.elements[l].layerInterface;l+=1}return null}return Object.defineProperty(r,"_name",{value:o.data.nm}),r.layer=r,r.pixelAspect=1,r.height=o.data.h||o.globalData.compSize.h,r.width=o.data.w||o.globalData.compSize.w,r.pixelAspect=1,r.frameDuration=1/o.globalData.frameRate,r.displayStartTime=0,r.numLayers=o.layers.length,r}}();function _typeof$2(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function(a){return typeof a}:_typeof$2=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof$2(o)}function seedRandom(o,r){var a=this,l=256,c=6,u=52,d="random",f=r.pow(l,c),m=r.pow(2,u),y=m*2,E=l-1,A;function P(O,L,F){var j=[];L=L===!0?{entropy:!0}:L||{};var U=$(M(L.entropy?[O,B(o)]:O===null?V():O,3),j),G=new R(j),Y=function(){for(var ve=G.g(c),J=f,Z=0;ve<m;)ve=(ve+Z)*l,J*=l,Z=G.g(1);for(;ve>=y;)ve/=2,J/=2,Z>>>=1;return(ve+Z)/J};return Y.int32=function(){return G.g(4)|0},Y.quick=function(){return G.g(4)/4294967296},Y.double=Y,$(B(G.S),o),(L.pass||F||function(te,ve,J,Z){return Z&&(Z.S&&x(Z,G),te.state=function(){return x(G,{})}),J?(r[d]=te,ve):te})(Y,U,"global"in L?L.global:this==r,L.state)}r["seed"+d]=P;function R(O){var L,F=O.length,j=this,U=0,G=j.i=j.j=0,Y=j.S=[];for(F||(O=[F++]);U<l;)Y[U]=U++;for(U=0;U<l;U++)Y[U]=Y[G=E&G+O[U%F]+(L=Y[U])],Y[G]=L;j.g=function(te){for(var ve,J=0,Z=j.i,Me=j.j,ke=j.S;te--;)ve=ke[Z=E&Z+1],J=J*l+ke[E&(ke[Z]=ke[Me=E&Me+ve])+(ke[Me]=ve)];return j.i=Z,j.j=Me,J}}function x(O,L){return L.i=O.i,L.j=O.j,L.S=O.S.slice(),L}function M(O,L){var F=[],j=_typeof$2(O),U;if(L&&j=="object")for(U in O)try{F.push(M(O[U],L-1))}catch{}return F.length?F:j=="string"?O:O+"\0"}function $(O,L){for(var F=O+"",j,U=0;U<F.length;)L[E&U]=E&(j^=L[E&U]*19)+F.charCodeAt(U++);return B(L)}function V(){try{var O=new Uint8Array(l);return(a.crypto||a.msCrypto).getRandomValues(O),B(O)}catch{var L=a.navigator,F=L&&L.plugins;return[+new Date,a,F,a.screen,B(o)]}}function B(O){return String.fromCharCode.apply(0,O)}$(r.random(),o)}function initialize$2(o){seedRandom([],o)}var propTypes={SHAPE:"shape"};function _typeof$1(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function(a){return typeof a}:_typeof$1=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof$1(o)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(o){return o.constructor===Array||o.constructor===Float32Array}function isNumerable(o,r){return o==="number"||r instanceof Number||o==="boolean"||o==="string"}function $bm_neg(o){var r=_typeof$1(o);if(r==="number"||o instanceof Number||r==="boolean")return-o;if($bm_isInstanceOfArray(o)){var a,l=o.length,c=[];for(a=0;a<l;a+=1)c[a]=-o[a];return c}return o.propType?o.v:-o}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(o,r){var a=_typeof$1(o),l=_typeof$1(r);if(isNumerable(a,o)&&isNumerable(l,r)||a==="string"||l==="string")return o+r;if($bm_isInstanceOfArray(o)&&isNumerable(l,r))return o=o.slice(0),o[0]+=r,o;if(isNumerable(a,o)&&$bm_isInstanceOfArray(r))return r=r.slice(0),r[0]=o+r[0],r;if($bm_isInstanceOfArray(o)&&$bm_isInstanceOfArray(r)){for(var c=0,u=o.length,d=r.length,f=[];c<u||c<d;)(typeof o[c]=="number"||o[c]instanceof Number)&&(typeof r[c]=="number"||r[c]instanceof Number)?f[c]=o[c]+r[c]:f[c]=r[c]===void 0?o[c]:o[c]||r[c],c+=1;return f}return 0}var add=sum;function sub(o,r){var a=_typeof$1(o),l=_typeof$1(r);if(isNumerable(a,o)&&isNumerable(l,r))return a==="string"&&(o=parseInt(o,10)),l==="string"&&(r=parseInt(r,10)),o-r;if($bm_isInstanceOfArray(o)&&isNumerable(l,r))return o=o.slice(0),o[0]-=r,o;if(isNumerable(a,o)&&$bm_isInstanceOfArray(r))return r=r.slice(0),r[0]=o-r[0],r;if($bm_isInstanceOfArray(o)&&$bm_isInstanceOfArray(r)){for(var c=0,u=o.length,d=r.length,f=[];c<u||c<d;)(typeof o[c]=="number"||o[c]instanceof Number)&&(typeof r[c]=="number"||r[c]instanceof Number)?f[c]=o[c]-r[c]:f[c]=r[c]===void 0?o[c]:o[c]||r[c],c+=1;return f}return 0}function mul(o,r){var a=_typeof$1(o),l=_typeof$1(r),c;if(isNumerable(a,o)&&isNumerable(l,r))return o*r;var u,d;if($bm_isInstanceOfArray(o)&&isNumerable(l,r)){for(d=o.length,c=createTypedArray("float32",d),u=0;u<d;u+=1)c[u]=o[u]*r;return c}if(isNumerable(a,o)&&$bm_isInstanceOfArray(r)){for(d=r.length,c=createTypedArray("float32",d),u=0;u<d;u+=1)c[u]=o*r[u];return c}return 0}function div(o,r){var a=_typeof$1(o),l=_typeof$1(r),c;if(isNumerable(a,o)&&isNumerable(l,r))return o/r;var u,d;if($bm_isInstanceOfArray(o)&&isNumerable(l,r)){for(d=o.length,c=createTypedArray("float32",d),u=0;u<d;u+=1)c[u]=o[u]/r;return c}if(isNumerable(a,o)&&$bm_isInstanceOfArray(r)){for(d=r.length,c=createTypedArray("float32",d),u=0;u<d;u+=1)c[u]=o/r[u];return c}return 0}function mod(o,r){return typeof o=="string"&&(o=parseInt(o,10)),typeof r=="string"&&(r=parseInt(r,10)),o%r}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(o,r,a){if(r>a){var l=a;a=r,r=l}return Math.min(Math.max(o,r),a)}function radiansToDegrees(o){return o/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(o){return o*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(o,r){if(typeof o=="number"||o instanceof Number)return r=r||0,Math.abs(o-r);r||(r=helperLengthArray);var a,l=Math.min(o.length,r.length),c=0;for(a=0;a<l;a+=1)c+=Math.pow(r[a]-o[a],2);return Math.sqrt(c)}function normalize(o){return div(o,length(o))}function rgbToHsl(o){var r=o[0],a=o[1],l=o[2],c=Math.max(r,a,l),u=Math.min(r,a,l),d,f,m=(c+u)/2;if(c===u)d=0,f=0;else{var y=c-u;switch(f=m>.5?y/(2-c-u):y/(c+u),c){case r:d=(a-l)/y+(a<l?6:0);break;case a:d=(l-r)/y+2;break;case l:d=(r-a)/y+4;break}d/=6}return[d,f,m,o[3]]}function hue2rgb(o,r,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?o+(r-o)*6*a:a<1/2?r:a<2/3?o+(r-o)*(2/3-a)*6:o}function hslToRgb(o){var r=o[0],a=o[1],l=o[2],c,u,d;if(a===0)c=l,d=l,u=l;else{var f=l<.5?l*(1+a):l+a-l*a,m=2*l-f;c=hue2rgb(m,f,r+1/3),u=hue2rgb(m,f,r),d=hue2rgb(m,f,r-1/3)}return[c,u,d,o[3]]}function linear(o,r,a,l,c){if((l===void 0||c===void 0)&&(l=r,c=a,r=0,a=1),a<r){var u=a;a=r,r=u}if(o<=r)return l;if(o>=a)return c;var d=a===r?0:(o-r)/(a-r);if(!l.length)return l+(c-l)*d;var f,m=l.length,y=createTypedArray("float32",m);for(f=0;f<m;f+=1)y[f]=l[f]+(c[f]-l[f])*d;return y}function random(o,r){if(r===void 0&&(o===void 0?(o=0,r=1):(r=o,o=void 0)),r.length){var a,l=r.length;o||(o=createTypedArray("float32",l));var c=createTypedArray("float32",l),u=BMMath.random();for(a=0;a<l;a+=1)c[a]=o[a]+u*(r[a]-o[a]);return c}o===void 0&&(o=0);var d=BMMath.random();return o+d*(r-o)}function createPath(o,r,a,l){var c,u=o.length,d=shapePool.newElement();d.setPathData(!!l,u);var f=[0,0],m,y;for(c=0;c<u;c+=1)m=r&&r[c]?r[c]:f,y=a&&a[c]?a[c]:f,d.setTripleAt(o[c][0],o[c][1],y[0]+o[c][0],y[1]+o[c][1],m[0]+o[c][0],m[1]+o[c][1],c,!0);return d}function initiateExpression(elem,data,property){function noOp(o){return o}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=(function o(r,a){var l,c,u=this.pv.length?this.pv.length:1,d=createTypedArray("float32",u);r=5;var f=Math.floor(time*r);for(l=0,c=0;l<f;){for(c=0;c<u;c+=1)d[c]+=-a+a*2*BMMath.random();l+=1}var m=time*r,y=m-Math.floor(m),E=createTypedArray("float32",u);if(u>1){for(c=0;c<u;c+=1)E[c]=this.pv[c]+d[c]+(-a+a*2*BMMath.random())*y;return E}return this.pv+d[0]+(-a+a*2*BMMath.random())*y}).bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(o,r){return loopIn(o,r,!0)}function loopOutDuration(o,r){return loopOut(o,r,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(o,r){var a=[r[0]-o[0],r[1]-o[1],r[2]-o[2]],l=Math.atan2(a[0],Math.sqrt(a[1]*a[1]+a[2]*a[2]))/degToRads,c=-Math.atan2(a[1],a[2])/degToRads;return[c,l,0]}function easeOut(o,r,a,l,c){return applyEase(easeOutBez,o,r,a,l,c)}function easeIn(o,r,a,l,c){return applyEase(easeInBez,o,r,a,l,c)}function ease(o,r,a,l,c){return applyEase(easeInOutBez,o,r,a,l,c)}function applyEase(o,r,a,l,c,u){c===void 0?(c=a,u=l):r=(r-a)/(l-a),r>1?r=1:r<0&&(r=0);var d=o(r);if($bm_isInstanceOfArray(c)){var f,m=c.length,y=createTypedArray("float32",m);for(f=0;f<m;f+=1)y[f]=(u[f]-c[f])*d+c[f];return y}return(u-c)*d+c}function nearestKey(o){var r,a=data.k.length,l,c;if(!data.k.length||typeof data.k[0]=="number")l=0,c=0;else if(l=-1,o*=elem.comp.globalData.frameRate,o<data.k[0].t)l=1,c=data.k[0].t;else{for(r=0;r<a-1;r+=1)if(o===data.k[r].t){l=r+1,c=data.k[r].t;break}else if(o>data.k[r].t&&o<data.k[r+1].t){o-data.k[r].t>data.k[r+1].t-o?(l=r+2,c=data.k[r+1].t):(l=r+1,c=data.k[r].t);break}l===-1&&(l=r+1,c=data.k[r].t)}var u={};return u.index=l,u.time=c/elem.comp.globalData.frameRate,u}function key(o){var r,a,l;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+o);o-=1,r={time:data.k[o].t/elem.comp.globalData.frameRate,value:[]};var c=Object.prototype.hasOwnProperty.call(data.k[o],"s")?data.k[o].s:data.k[o-1].e;for(l=c.length,a=0;a<l;a+=1)r[a]=c[a],r.value[a]=c[a];return r}function framesToTime(o,r){return r||(r=elem.comp.globalData.frameRate),o/r}function timeToFrames(o,r){return!o&&o!==0&&(o=time),r||(r=elem.comp.globalData.frameRate),o*r}function seedRandom(o){BMMath.seedrandom(randSeed+o)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(o,r){return typeof value=="string"?r===void 0?value.substring(o):value.substring(o,r):""}function substr(o,r){return typeof value=="string"?r===void 0?value.substr(o):value.substr(o,r):""}function posterizeTime(o){time=o===0?0:Math.floor(time*o)/o,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(o){return value=o,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var o={};o.initExpressions=r,o.resetFrame=ExpressionManager.resetFrame;function r(a){var l=0,c=[];function u(){l+=1}function d(){l-=1,l===0&&m()}function f(y){c.indexOf(y)===-1&&c.push(y)}function m(){var y,E=c.length;for(y=0;y<E;y+=1)c[y].release();c.length=0}a.renderer.compInterface=CompExpressionInterface(a.renderer),a.renderer.globalData.projectInterface.registerComposition(a.renderer),a.renderer.globalData.pushExpression=u,a.renderer.globalData.popExpression=d,a.renderer.globalData.registerExpressionProperty=f}return o}(),MaskManagerInterface=function(){function o(a,l){this._mask=a,this._data=l}Object.defineProperty(o.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(o.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}});var r=function(l){var c=createSizedArray(l.viewData.length),u,d=l.viewData.length;for(u=0;u<d;u+=1)c[u]=new o(l.viewData[u],l.masksProperties[u]);var f=function(y){for(u=0;u<d;){if(l.masksProperties[u].nm===y)return c[u];u+=1}return null};return f};return r}(),ExpressionPropertyInterface=function(){var o={pv:0,v:0,mult:1},r={pv:[0,0,0],v:[0,0,0],mult:1};function a(d,f,m){Object.defineProperty(d,"velocity",{get:function(){return f.getVelocityAtTime(f.comp.currentFrame)}}),d.numKeys=f.keyframes?f.keyframes.length:0,d.key=function(y){if(!d.numKeys)return 0;var E="";"s"in f.keyframes[y-1]?E=f.keyframes[y-1].s:"e"in f.keyframes[y-2]?E=f.keyframes[y-2].e:E=f.keyframes[y-2].s;var A=m==="unidimensional"?new Number(E):Object.assign({},E);return A.time=f.keyframes[y-1].t/f.elem.comp.globalData.frameRate,A.value=m==="unidimensional"?E[0]:E,A},d.valueAtTime=f.getValueAtTime,d.speedAtTime=f.getSpeedAtTime,d.velocityAtTime=f.getVelocityAtTime,d.propertyGroup=f.propertyGroup}function l(d){(!d||!("pv"in d))&&(d=o);var f=1/d.mult,m=d.pv*f,y=new Number(m);return y.value=m,a(y,d,"unidimensional"),function(){return d.k&&d.getValue(),m=d.v*f,y.value!==m&&(y=new Number(m),y.value=m,a(y,d,"unidimensional")),y}}function c(d){(!d||!("pv"in d))&&(d=r);var f=1/d.mult,m=d.data&&d.data.l||d.pv.length,y=createTypedArray("float32",m),E=createTypedArray("float32",m);return y.value=E,a(y,d,"multidimensional"),function(){d.k&&d.getValue();for(var A=0;A<m;A+=1)E[A]=d.v[A]*f,y[A]=E[A];return y}}function u(){return o}return function(d){return d?d.propType==="unidimensional"?l(d):c(d):u}}(),TransformExpressionInterface=function(){return function(o){function r(d){switch(d){case"scale":case"Scale":case"ADBE Scale":case 6:return r.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return r.rotation;case"ADBE Rotate X":return r.xRotation;case"ADBE Rotate Y":return r.yRotation;case"position":case"Position":case"ADBE Position":case 2:return r.position;case"ADBE Position_0":return r.xPosition;case"ADBE Position_1":return r.yPosition;case"ADBE Position_2":return r.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return r.anchorPoint;case"opacity":case"Opacity":case 11:return r.opacity;default:return null}}Object.defineProperty(r,"rotation",{get:ExpressionPropertyInterface(o.r||o.rz)}),Object.defineProperty(r,"zRotation",{get:ExpressionPropertyInterface(o.rz||o.r)}),Object.defineProperty(r,"xRotation",{get:ExpressionPropertyInterface(o.rx)}),Object.defineProperty(r,"yRotation",{get:ExpressionPropertyInterface(o.ry)}),Object.defineProperty(r,"scale",{get:ExpressionPropertyInterface(o.s)});var a,l,c,u;return o.p?u=ExpressionPropertyInterface(o.p):(a=ExpressionPropertyInterface(o.px),l=ExpressionPropertyInterface(o.py),o.pz&&(c=ExpressionPropertyInterface(o.pz))),Object.defineProperty(r,"position",{get:function(){return o.p?u():[a(),l(),c?c():0]}}),Object.defineProperty(r,"xPosition",{get:ExpressionPropertyInterface(o.px)}),Object.defineProperty(r,"yPosition",{get:ExpressionPropertyInterface(o.py)}),Object.defineProperty(r,"zPosition",{get:ExpressionPropertyInterface(o.pz)}),Object.defineProperty(r,"anchorPoint",{get:ExpressionPropertyInterface(o.a)}),Object.defineProperty(r,"opacity",{get:ExpressionPropertyInterface(o.o)}),Object.defineProperty(r,"skew",{get:ExpressionPropertyInterface(o.sk)}),Object.defineProperty(r,"skewAxis",{get:ExpressionPropertyInterface(o.sa)}),Object.defineProperty(r,"orientation",{get:ExpressionPropertyInterface(o.or)}),r}}(),LayerExpressionInterface=function(){function o(y){var E=new Matrix;if(y!==void 0){var A=this._elem.finalTransform.mProp.getValueAtTime(y);A.clone(E)}else{var P=this._elem.finalTransform.mProp;P.applyToMatrix(E)}return E}function r(y,E){var A=this.getMatrix(E);return A.props[12]=0,A.props[13]=0,A.props[14]=0,this.applyPoint(A,y)}function a(y,E){var A=this.getMatrix(E);return this.applyPoint(A,y)}function l(y,E){var A=this.getMatrix(E);return A.props[12]=0,A.props[13]=0,A.props[14]=0,this.invertPoint(A,y)}function c(y,E){var A=this.getMatrix(E);return this.invertPoint(A,y)}function u(y,E){if(this._elem.hierarchy&&this._elem.hierarchy.length){var A,P=this._elem.hierarchy.length;for(A=0;A<P;A+=1)this._elem.hierarchy[A].finalTransform.mProp.applyToMatrix(y)}return y.applyToPointArray(E[0],E[1],E[2]||0)}function d(y,E){if(this._elem.hierarchy&&this._elem.hierarchy.length){var A,P=this._elem.hierarchy.length;for(A=0;A<P;A+=1)this._elem.hierarchy[A].finalTransform.mProp.applyToMatrix(y)}return y.inversePoint(E)}function f(y){var E=new Matrix;if(E.reset(),this._elem.finalTransform.mProp.applyToMatrix(E),this._elem.hierarchy&&this._elem.hierarchy.length){var A,P=this._elem.hierarchy.length;for(A=0;A<P;A+=1)this._elem.hierarchy[A].finalTransform.mProp.applyToMatrix(E);return E.inversePoint(y)}return E.inversePoint(y)}function m(){return[1,1,1,1]}return function(y){var E;function A(M){R.mask=new MaskManagerInterface(M,y)}function P(M){R.effect=M}function R(M){switch(M){case"ADBE Root Vectors Group":case"Contents":case 2:return R.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return E;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return R.effect;case"ADBE Text Properties":return R.textInterface;default:return null}}R.getMatrix=o,R.invertPoint=d,R.applyPoint=u,R.toWorld=a,R.toWorldVec=r,R.fromWorld=c,R.fromWorldVec=l,R.toComp=a,R.fromComp=f,R.sampleImage=m,R.sourceRectAtTime=y.sourceRectAtTime.bind(y),R._elem=y,E=TransformExpressionInterface(y.finalTransform.mProp);var x=getDescriptor(E,"anchorPoint");return Object.defineProperties(R,{hasParent:{get:function(){return y.hierarchy.length}},parent:{get:function(){return y.hierarchy[0].layerInterface}},rotation:getDescriptor(E,"rotation"),scale:getDescriptor(E,"scale"),position:getDescriptor(E,"position"),opacity:getDescriptor(E,"opacity"),anchorPoint:x,anchor_point:x,transform:{get:function(){return E}},active:{get:function(){return y.isInRange}}}),R.startTime=y.data.st,R.index=y.data.ind,R.source=y.data.refId,R.height=y.data.ty===0?y.data.h:100,R.width=y.data.ty===0?y.data.w:100,R.inPoint=y.data.ip/y.comp.globalData.frameRate,R.outPoint=y.data.op/y.comp.globalData.frameRate,R._name=y.data.nm,R.registerMaskInterface=A,R.registerEffectsInterface=P,R}}(),propertyGroupFactory=function(){return function(o,r){return function(a){return a=a===void 0?1:a,a<=0?o:r(a-1)}}}(),PropertyInterface=function(){return function(o,r){var a={_name:o};function l(c){return c=c===void 0?1:c,c<=0?a:r(c-1)}return l}}(),EffectsExpressionInterface=function(){var o={createEffectsInterface:r};function r(c,u){if(c.effectsManager){var d=[],f=c.data.ef,m,y=c.effectsManager.effectElements.length;for(m=0;m<y;m+=1)d.push(a(f[m],c.effectsManager.effectElements[m],u,c));var E=c.data.ef||[],A=function(R){for(m=0,y=E.length;m<y;){if(R===E[m].nm||R===E[m].mn||R===E[m].ix)return d[m];m+=1}return null};return Object.defineProperty(A,"numProperties",{get:function(){return E.length}}),A}return null}function a(c,u,d,f){function m(R){for(var x=c.ef,M=0,$=x.length;M<$;){if(R===x[M].nm||R===x[M].mn||R===x[M].ix)return x[M].ty===5?E[M]:E[M]();M+=1}throw new Error}var y=propertyGroupFactory(m,d),E=[],A,P=c.ef.length;for(A=0;A<P;A+=1)c.ef[A].ty===5?E.push(a(c.ef[A],u.effectElements[A],u.effectElements[A].propertyGroup,f)):E.push(l(u.effectElements[A],c.ef[A].ty,f,y));return c.mn==="ADBE Color Control"&&Object.defineProperty(m,"color",{get:function(){return E[0]()}}),Object.defineProperties(m,{numProperties:{get:function(){return c.np}},_name:{value:c.nm},propertyGroup:{value:y}}),m.enabled=c.en!==0,m.active=m.enabled,m}function l(c,u,d,f){var m=ExpressionPropertyInterface(c.p);function y(){return u===10?d.comp.compInterface(c.p.v):m()}return c.p.setGroupProperty&&c.p.setGroupProperty(PropertyInterface("",f)),y}return o}(),ShapePathInterface=function(){return function(r,a,l){var c=a.sh;function u(f){return f==="Shape"||f==="shape"||f==="Path"||f==="path"||f==="ADBE Vector Shape"||f===2?u.path:null}var d=propertyGroupFactory(u,l);return c.setGroupProperty(PropertyInterface("Path",d)),Object.defineProperties(u,{path:{get:function(){return c.k&&c.getValue(),c}},shape:{get:function(){return c.k&&c.getValue(),c}},_name:{value:r.nm},ix:{value:r.ix},propertyIndex:{value:r.ix},mn:{value:r.mn},propertyGroup:{value:l}}),u}}(),ShapeExpressionInterface=function(){function o(x,M,$){var V=[],B,O=x?x.length:0;for(B=0;B<O;B+=1)x[B].ty==="gr"?V.push(a(x[B],M[B],$)):x[B].ty==="fl"?V.push(l(x[B],M[B],$)):x[B].ty==="st"?V.push(d(x[B],M[B],$)):x[B].ty==="tm"?V.push(f(x[B],M[B],$)):x[B].ty==="tr"||(x[B].ty==="el"?V.push(y(x[B],M[B],$)):x[B].ty==="sr"?V.push(E(x[B],M[B],$)):x[B].ty==="sh"?V.push(ShapePathInterface(x[B],M[B],$)):x[B].ty==="rc"?V.push(A(x[B],M[B],$)):x[B].ty==="rd"?V.push(P(x[B],M[B],$)):x[B].ty==="rp"?V.push(R(x[B],M[B],$)):x[B].ty==="gf"?V.push(c(x[B],M[B],$)):V.push(u(x[B],M[B])));return V}function r(x,M,$){var V,B=function(F){for(var j=0,U=V.length;j<U;){if(V[j]._name===F||V[j].mn===F||V[j].propertyIndex===F||V[j].ix===F||V[j].ind===F)return V[j];j+=1}return typeof F=="number"?V[F-1]:null};B.propertyGroup=propertyGroupFactory(B,$),V=o(x.it,M.it,B.propertyGroup),B.numProperties=V.length;var O=m(x.it[x.it.length-1],M.it[M.it.length-1],B.propertyGroup);return B.transform=O,B.propertyIndex=x.cix,B._name=x.nm,B}function a(x,M,$){var V=function(F){switch(F){case"ADBE Vectors Group":case"Contents":case 2:return V.content;default:return V.transform}};V.propertyGroup=propertyGroupFactory(V,$);var B=r(x,M,V.propertyGroup),O=m(x.it[x.it.length-1],M.it[M.it.length-1],V.propertyGroup);return V.content=B,V.transform=O,Object.defineProperty(V,"_name",{get:function(){return x.nm}}),V.numProperties=x.np,V.propertyIndex=x.ix,V.nm=x.nm,V.mn=x.mn,V}function l(x,M,$){function V(B){return B==="Color"||B==="color"?V.color:B==="Opacity"||B==="opacity"?V.opacity:null}return Object.defineProperties(V,{color:{get:ExpressionPropertyInterface(M.c)},opacity:{get:ExpressionPropertyInterface(M.o)},_name:{value:x.nm},mn:{value:x.mn}}),M.c.setGroupProperty(PropertyInterface("Color",$)),M.o.setGroupProperty(PropertyInterface("Opacity",$)),V}function c(x,M,$){function V(B){return B==="Start Point"||B==="start point"?V.startPoint:B==="End Point"||B==="end point"?V.endPoint:B==="Opacity"||B==="opacity"?V.opacity:null}return Object.defineProperties(V,{startPoint:{get:ExpressionPropertyInterface(M.s)},endPoint:{get:ExpressionPropertyInterface(M.e)},opacity:{get:ExpressionPropertyInterface(M.o)},type:{get:function(){return"a"}},_name:{value:x.nm},mn:{value:x.mn}}),M.s.setGroupProperty(PropertyInterface("Start Point",$)),M.e.setGroupProperty(PropertyInterface("End Point",$)),M.o.setGroupProperty(PropertyInterface("Opacity",$)),V}function u(){function x(){return null}return x}function d(x,M,$){var V=propertyGroupFactory(U,$),B=propertyGroupFactory(j,V);function O(G){Object.defineProperty(j,x.d[G].nm,{get:ExpressionPropertyInterface(M.d.dataProps[G].p)})}var L,F=x.d?x.d.length:0,j={};for(L=0;L<F;L+=1)O(L),M.d.dataProps[L].p.setGroupProperty(B);function U(G){return G==="Color"||G==="color"?U.color:G==="Opacity"||G==="opacity"?U.opacity:G==="Stroke Width"||G==="stroke width"?U.strokeWidth:null}return Object.defineProperties(U,{color:{get:ExpressionPropertyInterface(M.c)},opacity:{get:ExpressionPropertyInterface(M.o)},strokeWidth:{get:ExpressionPropertyInterface(M.w)},dash:{get:function(){return j}},_name:{value:x.nm},mn:{value:x.mn}}),M.c.setGroupProperty(PropertyInterface("Color",V)),M.o.setGroupProperty(PropertyInterface("Opacity",V)),M.w.setGroupProperty(PropertyInterface("Stroke Width",V)),U}function f(x,M,$){function V(O){return O===x.e.ix||O==="End"||O==="end"?V.end:O===x.s.ix?V.start:O===x.o.ix?V.offset:null}var B=propertyGroupFactory(V,$);return V.propertyIndex=x.ix,M.s.setGroupProperty(PropertyInterface("Start",B)),M.e.setGroupProperty(PropertyInterface("End",B)),M.o.setGroupProperty(PropertyInterface("Offset",B)),V.propertyIndex=x.ix,V.propertyGroup=$,Object.defineProperties(V,{start:{get:ExpressionPropertyInterface(M.s)},end:{get:ExpressionPropertyInterface(M.e)},offset:{get:ExpressionPropertyInterface(M.o)},_name:{value:x.nm}}),V.mn=x.mn,V}function m(x,M,$){function V(O){return x.a.ix===O||O==="Anchor Point"?V.anchorPoint:x.o.ix===O||O==="Opacity"?V.opacity:x.p.ix===O||O==="Position"?V.position:x.r.ix===O||O==="Rotation"||O==="ADBE Vector Rotation"?V.rotation:x.s.ix===O||O==="Scale"?V.scale:x.sk&&x.sk.ix===O||O==="Skew"?V.skew:x.sa&&x.sa.ix===O||O==="Skew Axis"?V.skewAxis:null}var B=propertyGroupFactory(V,$);return M.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",B)),M.transform.mProps.p.setGroupProperty(PropertyInterface("Position",B)),M.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",B)),M.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",B)),M.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",B)),M.transform.mProps.sk&&(M.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",B)),M.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",B))),M.transform.op.setGroupProperty(PropertyInterface("Opacity",B)),Object.defineProperties(V,{opacity:{get:ExpressionPropertyInterface(M.transform.mProps.o)},position:{get:ExpressionPropertyInterface(M.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(M.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(M.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(M.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(M.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(M.transform.mProps.sa)},_name:{value:x.nm}}),V.ty="tr",V.mn=x.mn,V.propertyGroup=$,V}function y(x,M,$){function V(L){return x.p.ix===L?V.position:x.s.ix===L?V.size:null}var B=propertyGroupFactory(V,$);V.propertyIndex=x.ix;var O=M.sh.ty==="tm"?M.sh.prop:M.sh;return O.s.setGroupProperty(PropertyInterface("Size",B)),O.p.setGroupProperty(PropertyInterface("Position",B)),Object.defineProperties(V,{size:{get:ExpressionPropertyInterface(O.s)},position:{get:ExpressionPropertyInterface(O.p)},_name:{value:x.nm}}),V.mn=x.mn,V}function E(x,M,$){function V(L){return x.p.ix===L?V.position:x.r.ix===L?V.rotation:x.pt.ix===L?V.points:x.or.ix===L||L==="ADBE Vector Star Outer Radius"?V.outerRadius:x.os.ix===L?V.outerRoundness:x.ir&&(x.ir.ix===L||L==="ADBE Vector Star Inner Radius")?V.innerRadius:x.is&&x.is.ix===L?V.innerRoundness:null}var B=propertyGroupFactory(V,$),O=M.sh.ty==="tm"?M.sh.prop:M.sh;return V.propertyIndex=x.ix,O.or.setGroupProperty(PropertyInterface("Outer Radius",B)),O.os.setGroupProperty(PropertyInterface("Outer Roundness",B)),O.pt.setGroupProperty(PropertyInterface("Points",B)),O.p.setGroupProperty(PropertyInterface("Position",B)),O.r.setGroupProperty(PropertyInterface("Rotation",B)),x.ir&&(O.ir.setGroupProperty(PropertyInterface("Inner Radius",B)),O.is.setGroupProperty(PropertyInterface("Inner Roundness",B))),Object.defineProperties(V,{position:{get:ExpressionPropertyInterface(O.p)},rotation:{get:ExpressionPropertyInterface(O.r)},points:{get:ExpressionPropertyInterface(O.pt)},outerRadius:{get:ExpressionPropertyInterface(O.or)},outerRoundness:{get:ExpressionPropertyInterface(O.os)},innerRadius:{get:ExpressionPropertyInterface(O.ir)},innerRoundness:{get:ExpressionPropertyInterface(O.is)},_name:{value:x.nm}}),V.mn=x.mn,V}function A(x,M,$){function V(L){return x.p.ix===L?V.position:x.r.ix===L?V.roundness:x.s.ix===L||L==="Size"||L==="ADBE Vector Rect Size"?V.size:null}var B=propertyGroupFactory(V,$),O=M.sh.ty==="tm"?M.sh.prop:M.sh;return V.propertyIndex=x.ix,O.p.setGroupProperty(PropertyInterface("Position",B)),O.s.setGroupProperty(PropertyInterface("Size",B)),O.r.setGroupProperty(PropertyInterface("Rotation",B)),Object.defineProperties(V,{position:{get:ExpressionPropertyInterface(O.p)},roundness:{get:ExpressionPropertyInterface(O.r)},size:{get:ExpressionPropertyInterface(O.s)},_name:{value:x.nm}}),V.mn=x.mn,V}function P(x,M,$){function V(L){return x.r.ix===L||L==="Round Corners 1"?V.radius:null}var B=propertyGroupFactory(V,$),O=M;return V.propertyIndex=x.ix,O.rd.setGroupProperty(PropertyInterface("Radius",B)),Object.defineProperties(V,{radius:{get:ExpressionPropertyInterface(O.rd)},_name:{value:x.nm}}),V.mn=x.mn,V}function R(x,M,$){function V(L){return x.c.ix===L||L==="Copies"?V.copies:x.o.ix===L||L==="Offset"?V.offset:null}var B=propertyGroupFactory(V,$),O=M;return V.propertyIndex=x.ix,O.c.setGroupProperty(PropertyInterface("Copies",B)),O.o.setGroupProperty(PropertyInterface("Offset",B)),Object.defineProperties(V,{copies:{get:ExpressionPropertyInterface(O.c)},offset:{get:ExpressionPropertyInterface(O.o)},_name:{value:x.nm}}),V.mn=x.mn,V}return function(x,M,$){var V;function B(L){if(typeof L=="number")return L=L===void 0?1:L,L===0?$:V[L-1];for(var F=0,j=V.length;F<j;){if(V[F]._name===L)return V[F];F+=1}return null}function O(){return $}return B.propertyGroup=propertyGroupFactory(B,O),V=o(x,M,B.propertyGroup),B.numProperties=V.length,B._name="Contents",B}}(),TextExpressionInterface=function(){return function(o){var r;function a(l){switch(l){case"ADBE Text Document":return a.sourceText;default:return null}}return Object.defineProperty(a,"sourceText",{get:function(){o.textProperty.getValue();var c=o.textProperty.currentData.t;return(!r||c!==r.value)&&(r=new String(c),r.value=c||new String(c),Object.defineProperty(r,"style",{get:function(){return{fillColor:o.textProperty.currentData.fc}}})),r}}),a}}();function _typeof(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(a){return typeof a}:_typeof=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(o)}var FootageInterface=function(){var o=function(l){var c="",u=l.getFootageData();function d(){return c="",u=l.getFootageData(),f}function f(m){if(u[m])return c=m,u=u[m],_typeof(u)==="object"?f:u;var y=m.indexOf(c);if(y!==-1){var E=parseInt(m.substr(y+c.length),10);return u=u[E],_typeof(u)==="object"?f:u}return""}return d},r=function(l){function c(u){return u==="Outline"?c.outlineInterface():null}return c._name="Outline",c.outlineInterface=o(l),c};return function(a){function l(c){return c==="Data"?l.dataInterface:null}return l._name="Data",l.dataInterface=r(a),l}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(o){return interfaces[o]||null}var expressionHelpers=function(){function o(d,f,m){f.x&&(m.k=!0,m.x=!0,m.initiateExpression=ExpressionManager.initiateExpression,m.effectsSequence.push(m.initiateExpression(d,f,m).bind(m)))}function r(d){return d*=this.elem.globalData.frameRate,d-=this.offsetTime,d!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<d?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(d,this._cachingAtTime),this._cachingAtTime.lastFrame=d),this._cachingAtTime.value}function a(d){var f=-.01,m=this.getValueAtTime(d),y=this.getValueAtTime(d+f),E=0;if(m.length){var A;for(A=0;A<m.length;A+=1)E+=Math.pow(y[A]-m[A],2);E=Math.sqrt(E)*100}else E=0;return E}function l(d){if(this.vel!==void 0)return this.vel;var f=-.001,m=this.getValueAtTime(d),y=this.getValueAtTime(d+f),E;if(m.length){E=createTypedArray("float32",m.length);var A;for(A=0;A<m.length;A+=1)E[A]=(y[A]-m[A])/f}else E=(y-m)/f;return E}function c(){return this.pv}function u(d){this.propertyGroup=d}return{searchExpressions:o,getSpeedAtTime:a,getVelocityAtTime:l,getValueAtTime:r,getStaticValueAtTime:c,setGroupProperty:u}}();function addPropertyDecorator(){function o(P,R,x){if(!this.k||!this.keyframes)return this.pv;P=P?P.toLowerCase():"";var M=this.comp.renderedFrame,$=this.keyframes,V=$[$.length-1].t;if(M<=V)return this.pv;var B,O;x?(R?B=Math.abs(V-this.elem.comp.globalData.frameRate*R):B=Math.max(0,V-this.elem.data.ip),O=V-B):((!R||R>$.length-1)&&(R=$.length-1),O=$[$.length-1-R].t,B=V-O);var L,F,j;if(P==="pingpong"){var U=Math.floor((M-O)/B);if(U%2!==0)return this.getValueAtTime((B-(M-O)%B+O)/this.comp.globalData.frameRate,0)}else if(P==="offset"){var G=this.getValueAtTime(O/this.comp.globalData.frameRate,0),Y=this.getValueAtTime(V/this.comp.globalData.frameRate,0),te=this.getValueAtTime(((M-O)%B+O)/this.comp.globalData.frameRate,0),ve=Math.floor((M-O)/B);if(this.pv.length){for(j=new Array(G.length),F=j.length,L=0;L<F;L+=1)j[L]=(Y[L]-G[L])*ve+te[L];return j}return(Y-G)*ve+te}else if(P==="continue"){var J=this.getValueAtTime(V/this.comp.globalData.frameRate,0),Z=this.getValueAtTime((V-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(j=new Array(J.length),F=j.length,L=0;L<F;L+=1)j[L]=J[L]+(J[L]-Z[L])*((M-V)/this.comp.globalData.frameRate)/5e-4;return j}return J+(J-Z)*((M-V)/.001)}return this.getValueAtTime(((M-O)%B+O)/this.comp.globalData.frameRate,0)}function r(P,R,x){if(!this.k)return this.pv;P=P?P.toLowerCase():"";var M=this.comp.renderedFrame,$=this.keyframes,V=$[0].t;if(M>=V)return this.pv;var B,O;x?(R?B=Math.abs(this.elem.comp.globalData.frameRate*R):B=Math.max(0,this.elem.data.op-V),O=V+B):((!R||R>$.length-1)&&(R=$.length-1),O=$[R].t,B=O-V);var L,F,j;if(P==="pingpong"){var U=Math.floor((V-M)/B);if(U%2===0)return this.getValueAtTime(((V-M)%B+V)/this.comp.globalData.frameRate,0)}else if(P==="offset"){var G=this.getValueAtTime(V/this.comp.globalData.frameRate,0),Y=this.getValueAtTime(O/this.comp.globalData.frameRate,0),te=this.getValueAtTime((B-(V-M)%B+V)/this.comp.globalData.frameRate,0),ve=Math.floor((V-M)/B)+1;if(this.pv.length){for(j=new Array(G.length),F=j.length,L=0;L<F;L+=1)j[L]=te[L]-(Y[L]-G[L])*ve;return j}return te-(Y-G)*ve}else if(P==="continue"){var J=this.getValueAtTime(V/this.comp.globalData.frameRate,0),Z=this.getValueAtTime((V+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(j=new Array(J.length),F=j.length,L=0;L<F;L+=1)j[L]=J[L]+(J[L]-Z[L])*(V-M)/.001;return j}return J+(J-Z)*(V-M)/.001}return this.getValueAtTime((B-((V-M)%B+V))/this.comp.globalData.frameRate,0)}function a(P,R){if(!this.k)return this.pv;if(P=(P||.4)*.5,R=Math.floor(R||5),R<=1)return this.pv;var x=this.comp.renderedFrame/this.comp.globalData.frameRate,M=x-P,$=x+P,V=R>1?($-M)/(R-1):1,B=0,O=0,L;this.pv.length?L=createTypedArray("float32",this.pv.length):L=0;for(var F;B<R;){if(F=this.getValueAtTime(M+B*V),this.pv.length)for(O=0;O<this.pv.length;O+=1)L[O]+=F[O];else L+=F;B+=1}if(this.pv.length)for(O=0;O<this.pv.length;O+=1)L[O]/=R;else L/=R;return L}function l(P){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var R=this._transformCachingAtTime.v;if(R.cloneFromProps(this.pre.props),this.appliedTransformations<1){var x=this.a.getValueAtTime(P);R.translate(-x[0]*this.a.mult,-x[1]*this.a.mult,x[2]*this.a.mult)}if(this.appliedTransformations<2){var M=this.s.getValueAtTime(P);R.scale(M[0]*this.s.mult,M[1]*this.s.mult,M[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var $=this.sk.getValueAtTime(P),V=this.sa.getValueAtTime(P);R.skewFromAxis(-$*this.sk.mult,V*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var B=this.r.getValueAtTime(P);R.rotate(-B*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var O=this.rz.getValueAtTime(P),L=this.ry.getValueAtTime(P),F=this.rx.getValueAtTime(P),j=this.or.getValueAtTime(P);R.rotateZ(-O*this.rz.mult).rotateY(L*this.ry.mult).rotateX(F*this.rx.mult).rotateZ(-j[2]*this.or.mult).rotateY(j[1]*this.or.mult).rotateX(j[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var U=this.px.getValueAtTime(P),G=this.py.getValueAtTime(P);if(this.data.p.z){var Y=this.pz.getValueAtTime(P);R.translate(U*this.px.mult,G*this.py.mult,-Y*this.pz.mult)}else R.translate(U*this.px.mult,G*this.py.mult,0)}else{var te=this.p.getValueAtTime(P);R.translate(te[0]*this.p.mult,te[1]*this.p.mult,-te[2]*this.p.mult)}return R}function c(){return this.v.clone(new Matrix)}var u=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(P,R,x){var M=u(P,R,x);return M.dynamicProperties.length?M.getValueAtTime=l.bind(M):M.getValueAtTime=c.bind(M),M.setGroupProperty=expressionHelpers.setGroupProperty,M};var d=PropertyFactory.getProp;PropertyFactory.getProp=function(P,R,x,M,$){var V=d(P,R,x,M,$);V.kf?V.getValueAtTime=expressionHelpers.getValueAtTime.bind(V):V.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(V),V.setGroupProperty=expressionHelpers.setGroupProperty,V.loopOut=o,V.loopIn=r,V.smooth=a,V.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(V),V.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(V),V.numKeys=R.a===1?R.k.length:0,V.propertyIndex=R.ix;var B=0;return x!==0&&(B=createTypedArray("float32",R.a===1?R.k[0].s.length:R.k.length)),V._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:B},expressionHelpers.searchExpressions(P,R,V),V.k&&$.addDynamicProperty(V),V};function f(P){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),P*=this.elem.globalData.frameRate,P-=this.offsetTime,P!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<P?this._caching.lastIndex:0,this._cachingAtTime.lastTime=P,this.interpolateShape(P,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var m=ShapePropertyFactory.getConstructorFunction(),y=ShapePropertyFactory.getKeyframedConstructorFunction();function E(){}E.prototype={vertices:function(R,x){this.k&&this.getValue();var M=this.v;x!==void 0&&(M=this.getValueAtTime(x,0));var $,V=M._length,B=M[R],O=M.v,L=createSizedArray(V);for($=0;$<V;$+=1)R==="i"||R==="o"?L[$]=[B[$][0]-O[$][0],B[$][1]-O[$][1]]:L[$]=[B[$][0],B[$][1]];return L},points:function(R){return this.vertices("v",R)},inTangents:function(R){return this.vertices("i",R)},outTangents:function(R){return this.vertices("o",R)},isClosed:function(){return this.v.c},pointOnPath:function(R,x){var M=this.v;x!==void 0&&(M=this.getValueAtTime(x,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(M));for(var $=this._segmentsLength,V=$.lengths,B=$.totalLength*R,O=0,L=V.length,F=0,j;O<L;){if(F+V[O].addedLength>B){var U=O,G=M.c&&O===L-1?0:O+1,Y=(B-F)/V[O].addedLength;j=bez.getPointInSegment(M.v[U],M.v[G],M.o[U],M.i[G],Y,V[O]);break}else F+=V[O].addedLength;O+=1}return j||(j=M.c?[M.v[0][0],M.v[0][1]]:[M.v[M._length-1][0],M.v[M._length-1][1]]),j},vectorOnPath:function(R,x,M){R==1?R=this.v.c:R==0&&(R=.999);var $=this.pointOnPath(R,x),V=this.pointOnPath(R+.001,x),B=V[0]-$[0],O=V[1]-$[1],L=Math.sqrt(Math.pow(B,2)+Math.pow(O,2));if(L===0)return[0,0];var F=M==="tangent"?[B/L,O/L]:[-O/L,B/L];return F},tangentOnPath:function(R,x){return this.vectorOnPath(R,x,"tangent")},normalOnPath:function(R,x){return this.vectorOnPath(R,x,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([E],m),extendPrototype([E],y),y.prototype.getValueAtTime=f,y.prototype.initiateExpression=ExpressionManager.initiateExpression;var A=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(P,R,x,M,$){var V=A(P,R,x,M,$);return V.propertyIndex=R.ix,V.lock=!1,x===3?expressionHelpers.searchExpressions(P,R.pt,V):x===4&&expressionHelpers.searchExpressions(P,R.ks,V),V.k&&P.addDynamicProperty(V),V}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function o(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(r,a){var l=this.calculateExpression(a);if(r.t!==l){var c={};return this.copyData(c,r),c.t=l.toString(),c.__complete=!1,c}return r},TextProperty.prototype.searchProperty=function(){var r=this.searchKeyframes(),a=this.searchExpressions();return this.kf=r||a,this.kf},TextProperty.prototype.searchExpressions=o}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function o(r,a){var l=createNS("feMerge");l.setAttribute("result",r);var c,u;for(u=0;u<a.length;u+=1)c=createNS("feMergeNode"),c.setAttribute("in",a[u]),l.appendChild(c),l.appendChild(c);return l}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(o,r,a,l,c){this.filterManager=r;var u=createNS("feColorMatrix");u.setAttribute("type","matrix"),u.setAttribute("color-interpolation-filters","linearRGB"),u.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=u,u.setAttribute("result",l+"_tint_1"),o.appendChild(u),u=createNS("feColorMatrix"),u.setAttribute("type","matrix"),u.setAttribute("color-interpolation-filters","sRGB"),u.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),u.setAttribute("result",l+"_tint_2"),o.appendChild(u),this.matrixFilter=u;var d=this.createMergeNode(l,[c,l+"_tint_1",l+"_tint_2"]);o.appendChild(d)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var r=this.filterManager.effectElements[0].p.v,a=this.filterManager.effectElements[1].p.v,l=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+l+" 0"),this.matrixFilter.setAttribute("values",a[0]-r[0]+" 0 0 0 "+r[0]+" "+(a[1]-r[1])+" 0 0 0 "+r[1]+" "+(a[2]-r[2])+" 0 0 0 "+r[2]+" 0 0 0 1 0")}};function SVGFillFilter(o,r,a,l){this.filterManager=r;var c=createNS("feColorMatrix");c.setAttribute("type","matrix"),c.setAttribute("color-interpolation-filters","sRGB"),c.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),c.setAttribute("result",l),o.appendChild(c),this.matrixFilter=c}SVGFillFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var r=this.filterManager.effectElements[2].p.v,a=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+r[0]+" 0 0 0 0 "+r[1]+" 0 0 0 0 "+r[2]+" 0 0 0 "+a+" 0")}};function SVGStrokeEffect(o,r,a){this.initialized=!1,this.filterManager=r,this.elem=a,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var o=this.elem.layerElement.children||this.elem.layerElement.childNodes,r,a,l,c;for(this.filterManager.effectElements[1].p.v===1?(c=this.elem.maskManager.masksProperties.length,l=0):(l=this.filterManager.effectElements[0].p.v-1,c=l+1),a=createNS("g"),a.setAttribute("fill","none"),a.setAttribute("stroke-linecap","round"),a.setAttribute("stroke-dashoffset",1),l;l<c;l+=1)r=createNS("path"),a.appendChild(r),this.paths.push({p:r,m:l});if(this.filterManager.effectElements[10].p.v===3){var u=createNS("mask"),d=createElementID();u.setAttribute("id",d),u.setAttribute("mask-type","alpha"),u.appendChild(a),this.elem.globalData.defs.appendChild(u);var f=createNS("g");for(f.setAttribute("mask","url("+getLocationHref()+"#"+d+")");o[0];)f.appendChild(o[0]);this.elem.layerElement.appendChild(f),this.masker=u,a.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(o=this.elem.layerElement.children||this.elem.layerElement.childNodes;o.length;)this.elem.layerElement.removeChild(o[0]);this.elem.layerElement.appendChild(a),this.elem.layerElement.removeAttribute("mask"),a.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=a},SVGStrokeEffect.prototype.renderFrame=function(o){this.initialized||this.initialize();var r,a=this.paths.length,l,c;for(r=0;r<a;r+=1)if(this.paths[r].m!==-1&&(l=this.elem.maskManager.viewData[this.paths[r].m],c=this.paths[r].p,(o||this.filterManager._mdf||l.prop._mdf)&&c.setAttribute("d",l.lastPath),o||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||l.prop._mdf)){var u;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var d=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,f=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,m=c.getTotalLength();u="0 0 0 "+m*d+" ";var y=m*(f-d),E=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,A=Math.floor(y/E),P;for(P=0;P<A;P+=1)u+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+" ";u+="0 "+m*10+" 0 0"}else u="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;c.setAttribute("stroke-dasharray",u)}if((o||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2),(o||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(o||this.filterManager.effectElements[3].p._mdf)){var R=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(R[0]*255)+","+bmFloor(R[1]*255)+","+bmFloor(R[2]*255)+")")}};function SVGTritoneFilter(o,r,a,l){this.filterManager=r;var c=createNS("feColorMatrix");c.setAttribute("type","matrix"),c.setAttribute("color-interpolation-filters","linearRGB"),c.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),o.appendChild(c);var u=createNS("feComponentTransfer");u.setAttribute("color-interpolation-filters","sRGB"),u.setAttribute("result",l),this.matrixFilter=u;var d=createNS("feFuncR");d.setAttribute("type","table"),u.appendChild(d),this.feFuncR=d;var f=createNS("feFuncG");f.setAttribute("type","table"),u.appendChild(f),this.feFuncG=f;var m=createNS("feFuncB");m.setAttribute("type","table"),u.appendChild(m),this.feFuncB=m,o.appendChild(u)}SVGTritoneFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var r=this.filterManager.effectElements[0].p.v,a=this.filterManager.effectElements[1].p.v,l=this.filterManager.effectElements[2].p.v,c=l[0]+" "+a[0]+" "+r[0],u=l[1]+" "+a[1]+" "+r[1],d=l[2]+" "+a[2]+" "+r[2];this.feFuncR.setAttribute("tableValues",c),this.feFuncG.setAttribute("tableValues",u),this.feFuncB.setAttribute("tableValues",d)}};function SVGProLevelsFilter(o,r,a,l){this.filterManager=r;var c=this.filterManager.effectElements,u=createNS("feComponentTransfer");(c[10].p.k||c[10].p.v!==0||c[11].p.k||c[11].p.v!==1||c[12].p.k||c[12].p.v!==1||c[13].p.k||c[13].p.v!==0||c[14].p.k||c[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",u)),(c[17].p.k||c[17].p.v!==0||c[18].p.k||c[18].p.v!==1||c[19].p.k||c[19].p.v!==1||c[20].p.k||c[20].p.v!==0||c[21].p.k||c[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",u)),(c[24].p.k||c[24].p.v!==0||c[25].p.k||c[25].p.v!==1||c[26].p.k||c[26].p.v!==1||c[27].p.k||c[27].p.v!==0||c[28].p.k||c[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",u)),(c[31].p.k||c[31].p.v!==0||c[32].p.k||c[32].p.v!==1||c[33].p.k||c[33].p.v!==1||c[34].p.k||c[34].p.v!==0||c[35].p.k||c[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",u)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(u.setAttribute("color-interpolation-filters","sRGB"),o.appendChild(u)),(c[3].p.k||c[3].p.v!==0||c[4].p.k||c[4].p.v!==1||c[5].p.k||c[5].p.v!==1||c[6].p.k||c[6].p.v!==0||c[7].p.k||c[7].p.v!==1)&&(u=createNS("feComponentTransfer"),u.setAttribute("color-interpolation-filters","sRGB"),u.setAttribute("result",l),o.appendChild(u),this.feFuncRComposed=this.createFeFunc("feFuncR",u),this.feFuncGComposed=this.createFeFunc("feFuncG",u),this.feFuncBComposed=this.createFeFunc("feFuncB",u))}SVGProLevelsFilter.prototype.createFeFunc=function(o,r){var a=createNS(o);return a.setAttribute("type","table"),r.appendChild(a),a},SVGProLevelsFilter.prototype.getTableValue=function(o,r,a,l,c){for(var u=0,d=256,f,m=Math.min(o,r),y=Math.max(o,r),E=Array.call(null,{length:d}),A,P=0,R=c-l,x=r-o;u<=256;)f=u/256,f<=m?A=x<0?c:l:f>=y?A=x<0?l:c:A=l+R*Math.pow((f-o)/x,1/a),E[P]=A,P+=1,u+=256/(d-1);return E.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var r,a=this.filterManager.effectElements;this.feFuncRComposed&&(o||a[3].p._mdf||a[4].p._mdf||a[5].p._mdf||a[6].p._mdf||a[7].p._mdf)&&(r=this.getTableValue(a[3].p.v,a[4].p.v,a[5].p.v,a[6].p.v,a[7].p.v),this.feFuncRComposed.setAttribute("tableValues",r),this.feFuncGComposed.setAttribute("tableValues",r),this.feFuncBComposed.setAttribute("tableValues",r)),this.feFuncR&&(o||a[10].p._mdf||a[11].p._mdf||a[12].p._mdf||a[13].p._mdf||a[14].p._mdf)&&(r=this.getTableValue(a[10].p.v,a[11].p.v,a[12].p.v,a[13].p.v,a[14].p.v),this.feFuncR.setAttribute("tableValues",r)),this.feFuncG&&(o||a[17].p._mdf||a[18].p._mdf||a[19].p._mdf||a[20].p._mdf||a[21].p._mdf)&&(r=this.getTableValue(a[17].p.v,a[18].p.v,a[19].p.v,a[20].p.v,a[21].p.v),this.feFuncG.setAttribute("tableValues",r)),this.feFuncB&&(o||a[24].p._mdf||a[25].p._mdf||a[26].p._mdf||a[27].p._mdf||a[28].p._mdf)&&(r=this.getTableValue(a[24].p.v,a[25].p.v,a[26].p.v,a[27].p.v,a[28].p.v),this.feFuncB.setAttribute("tableValues",r)),this.feFuncA&&(o||a[31].p._mdf||a[32].p._mdf||a[33].p._mdf||a[34].p._mdf||a[35].p._mdf)&&(r=this.getTableValue(a[31].p.v,a[32].p.v,a[33].p.v,a[34].p.v,a[35].p.v),this.feFuncA.setAttribute("tableValues",r))}};function SVGDropShadowEffect(o,r,a,l,c){var u=r.container.globalData.renderConfig.filterSize,d=r.data.fs||u;o.setAttribute("x",d.x||u.x),o.setAttribute("y",d.y||u.y),o.setAttribute("width",d.width||u.width),o.setAttribute("height",d.height||u.height),this.filterManager=r;var f=createNS("feGaussianBlur");f.setAttribute("in","SourceAlpha"),f.setAttribute("result",l+"_drop_shadow_1"),f.setAttribute("stdDeviation","0"),this.feGaussianBlur=f,o.appendChild(f);var m=createNS("feOffset");m.setAttribute("dx","25"),m.setAttribute("dy","0"),m.setAttribute("in",l+"_drop_shadow_1"),m.setAttribute("result",l+"_drop_shadow_2"),this.feOffset=m,o.appendChild(m);var y=createNS("feFlood");y.setAttribute("flood-color","#00ff00"),y.setAttribute("flood-opacity","1"),y.setAttribute("result",l+"_drop_shadow_3"),this.feFlood=y,o.appendChild(y);var E=createNS("feComposite");E.setAttribute("in",l+"_drop_shadow_3"),E.setAttribute("in2",l+"_drop_shadow_2"),E.setAttribute("operator","in"),E.setAttribute("result",l+"_drop_shadow_4"),o.appendChild(E);var A=this.createMergeNode(l,[l+"_drop_shadow_4",c]);o.appendChild(A)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){if((o||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),o||this.filterManager.effectElements[0].p._mdf){var r=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(r[0]*255),Math.round(r[1]*255),Math.round(r[2]*255)))}if((o||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),o||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var a=this.filterManager.effectElements[3].p.v,l=(this.filterManager.effectElements[2].p.v-90)*degToRads,c=a*Math.cos(l),u=a*Math.sin(l);this.feOffset.setAttribute("dx",c),this.feOffset.setAttribute("dy",u)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(o,r,a){this.initialized=!1,this.filterManager=r,this.filterElem=o,this.elem=a,a.matteElement=createNS("g"),a.matteElement.appendChild(a.layerElement),a.matteElement.appendChild(a.transformedElement),a.baseElement=a.matteElement}SVGMatte3Effect.prototype.findSymbol=function(o){for(var r=0,a=_svgMatteSymbols.length;r<a;){if(_svgMatteSymbols[r]===o)return _svgMatteSymbols[r];r+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(o,r){var a=o.layerElement.parentNode;if(a){for(var l=a.children,c=0,u=l.length;c<u&&l[c]!==o.layerElement;)c+=1;var d;c<=u-2&&(d=l[c+1]);var f=createNS("use");f.setAttribute("href","#"+r),d?a.insertBefore(f,d):a.appendChild(f)}},SVGMatte3Effect.prototype.setElementAsMask=function(o,r){if(!this.findSymbol(r)){var a=createElementID(),l=createNS("mask");l.setAttribute("id",r.layerId),l.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(r);var c=o.globalData.defs;c.appendChild(l);var u=createNS("symbol");u.setAttribute("id",a),this.replaceInParent(r,a),u.appendChild(r.layerElement),c.appendChild(u);var d=createNS("use");d.setAttribute("href","#"+a),l.appendChild(d),r.data.hd=!1,r.show()}o.setMatte(r.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var o=this.filterManager.effectElements[0].p.v,r=this.elem.comp.elements,a=0,l=r.length;a<l;)r[a]&&r[a].data.ind===o&&this.setElementAsMask(this.elem,r[a]),a+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(o,r,a,l){o.setAttribute("x","-100%"),o.setAttribute("y","-100%"),o.setAttribute("width","300%"),o.setAttribute("height","300%"),this.filterManager=r;var c=createNS("feGaussianBlur");c.setAttribute("result",l),o.appendChild(c),this.feGaussianBlur=c}SVGGaussianBlurEffect.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var r=.3,a=this.filterManager.effectElements[0].p.v*r,l=this.filterManager.effectElements[1].p.v,c=l==3?0:a,u=l==2?0:a;this.feGaussianBlur.setAttribute("stdDeviation",c+" "+u);var d=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",d)}};function TransformEffect(){}TransformEffect.prototype.init=function(o){this.effectsManager=o,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(o){if(this._opMdf=!1,this._mdf=!1,o||this.effectsManager._mdf){var r=this.effectsManager.effectElements,a=r[0].p.v,l=r[1].p.v,c=r[2].p.v===1,u=r[3].p.v,d=c?u:r[4].p.v,f=r[5].p.v,m=r[6].p.v,y=r[7].p.v;this.matrix.reset(),this.matrix.translate(-a[0],-a[1],a[2]),this.matrix.scale(d*.01,u*.01,1),this.matrix.rotate(-y*degToRads),this.matrix.skewFromAxis(-f*degToRads,(m+90)*degToRads),this.matrix.translate(l[0],l[1],0),this._mdf=!0,this.opacity!==r[8].p.v&&(this.opacity=r[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(o,r){this.init(r)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(o){this.init(o)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})}(lottie$3,lottie$3.exports)),lottie$3.exports}var lottieExports=requireLottie();const lottie=getDefaultExportFromCjs(lottieExports),lottie$1=Object.freeze(Object.defineProperty({__proto__:null,default:lottie},Symbol.toStringTag,{value:"Module"})),lottie_client_funiu1oBjt=defineNuxtPlugin(()=>({provide:{lottie}}));//! moment.js
4503//! version : 2.30.1
4504//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4505//! license : MIT
4506//! momentjs.com
4507var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(o){hookCallback=o}function isArray(o){return o instanceof Array||Object.prototype.toString.call(o)==="[object Array]"}function isObject(o){return o!=null&&Object.prototype.toString.call(o)==="[object Object]"}function hasOwnProp(o,r){return Object.prototype.hasOwnProperty.call(o,r)}function isObjectEmpty(o){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(o).length===0;var r;for(r in o)if(hasOwnProp(o,r))return!1;return!0}function isUndefined(o){return o===void 0}function isNumber(o){return typeof o=="number"||Object.prototype.toString.call(o)==="[object Number]"}function isDate(o){return o instanceof Date||Object.prototype.toString.call(o)==="[object Date]"}function map(o,r){var a=[],l,c=o.length;for(l=0;l<c;
vendor: 30,297 bytes, lines 4507-4510
4507++l)a.push(r(o[l],l));return a}function extend(o,r){for(var a in r)hasOwnProp(r,a)&&(o[a]=r[a]);return hasOwnProp(r,"toString")&&(o.toString=r.toString),hasOwnProp(r,"valueOf")&&(o.valueOf=r.valueOf),o}function createUTC(o,r,a,l){return createLocalOrUTC(o,r,a,l,!0).utc()}function defaultParsingFlags(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function getParsingFlags(o){return o._pf==null&&(o._pf=defaultParsingFlags()),o._pf}var some;Array.prototype.some?some=Array.prototype.some:some=function(o){var r=Object(this),a=r.length>>>0,l;for(l=0;l<a;l++)if(l in r&&o.call(this,r[l],l,r))return!0;return!1};function isValid(o){var r=null,a=!1,l=o._d&&!isNaN(o._d.getTime());if(l&&(r=getParsingFlags(o),a=some.call(r.parsedDateParts,function(c){return c!=null}),l=r.overflow<0&&!r.empty&&!r.invalidEra&&!r.invalidMonth&&!r.invalidWeekday&&!r.weekdayMismatch&&!r.nullInput&&!r.invalidFormat&&!r.userInvalidated&&(!r.meridiem||r.meridiem&&a),o._strict&&(l=l&&r.charsLeftOver===0&&r.unusedTokens.length===0&&r.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(o))o._isValid=l;else return l;return o._isValid}function createInvalid(o){var r=createUTC(NaN);return o!=null?extend(getParsingFlags(r),o):getParsingFlags(r).userInvalidated=!0,r}var momentProperties=hooks.momentProperties=[],updateInProgress=!1;function copyConfig(o,r){var a,l,c,u=momentProperties.length;if(isUndefined(r._isAMomentObject)||(o._isAMomentObject=r._isAMomentObject),isUndefined(r._i)||(o._i=r._i),isUndefined(r._f)||(o._f=r._f),isUndefined(r._l)||(o._l=r._l),isUndefined(r._strict)||(o._strict=r._strict),isUndefined(r._tzm)||(o._tzm=r._tzm),isUndefined(r._isUTC)||(o._isUTC=r._isUTC),isUndefined(r._offset)||(o._offset=r._offset),isUndefined(r._pf)||(o._pf=getParsingFlags(r)),isUndefined(r._locale)||(o._locale=r._locale),u>0)for(a=0;a<u;a++)l=momentProperties[a],c=r[l],isUndefined(c)||(o[l]=c);return o}function Moment(o){copyConfig(this,o),this._d=new Date(o._d!=null?o._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),updateInProgress===!1&&(updateInProgress=!0,hooks.updateOffset(this),updateInProgress=!1)}function isMoment(o){return o instanceof Moment||o!=null&&o._isAMomentObject!=null}function warn(o){hooks.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+o)}function deprecate(o,r){var a=!0;return extend(function(){if(hooks.deprecationHandler!=null&&hooks.deprecationHandler(null,o),a){var l=[],c,u,d,f=arguments.length;for(u=0;u<f;u++){if(c="",typeof arguments[u]=="object"){c+=`
4508[`+u+"] ";for(d in arguments[0])hasOwnProp(arguments[0],d)&&(c+=d+": "+arguments[0][d]+", ");c=c.slice(0,-2)}else c=arguments[u];l.push(c)}warn(o+`
4509Arguments: `+Array.prototype.slice.call(l).join("")+`
4510`+new Error().stack),a=!1}return r.apply(this,arguments)},r)}var deprecations={};function deprecateSimple(o,r){hooks.deprecationHandler!=null&&hooks.deprecationHandler(o,r),deprecations[o]||(warn(r),deprecations[o]=!0)}hooks.suppressDeprecationWarnings=!1;hooks.deprecationHandler=null;function isFunction(o){return typeof Function<"u"&&o instanceof Function||Object.prototype.toString.call(o)==="[object Function]"}function set(o){var r,a;for(a in o)hasOwnProp(o,a)&&(r=o[a],isFunction(r)?this[a]=r:this["_"+a]=r);this._config=o,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(o,r){var a=extend({},o),l;for(l in r)hasOwnProp(r,l)&&(isObject(o[l])&&isObject(r[l])?(a[l]={},extend(a[l],o[l]),extend(a[l],r[l])):r[l]!=null?a[l]=r[l]:delete a[l]);for(l in o)hasOwnProp(o,l)&&!hasOwnProp(r,l)&&isObject(o[l])&&(a[l]=extend({},a[l]));return a}function Locale(o){o!=null&&this.set(o)}var keys;Object.keys?keys=Object.keys:keys=function(o){var r,a=[];for(r in o)hasOwnProp(o,r)&&a.push(r);return a};var defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar(o,r,a){var l=this._calendar[o]||this._calendar.sameElse;return isFunction(l)?l.call(r,a):l}function zeroFill(o,r,a){var l=""+Math.abs(o),c=r-l.length,u=o>=0;return(u?a?"+":"":"-")+Math.pow(10,Math.max(0,c)).toString().substr(1)+l}var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={};function addFormatToken(o,r,a,l){var c=l;typeof l=="string"&&(c=function(){return this[l]()}),o&&(formatTokenFunctions[o]=c),r&&(formatTokenFunctions[r[0]]=function(){return zeroFill(c.apply(this,arguments),r[1],r[2])}),a&&(formatTokenFunctions[a]=function(){return this.localeData().ordinal(c.apply(this,arguments),o)})}function removeFormattingTokens(o){return o.match(/\[[\s\S]/)?o.replace(/^\[|\]$/g,""):o.replace(/\\/g,"")}function makeFormatFunction(o){var r=o.match(formattingTokens),a,l;for(a=0,l=r.length;a<l;a++)formatTokenFunctions[r[a]]?r[a]=formatTokenFunctions[r[a]]:r[a]=removeFormattingTokens(r[a]);return function(c){var u="",d;for(d=0;d<l;d++)u+=isFunction(r[d])?r[d].call(c,o):r[d];return u}}function formatMoment(o,r){return o.isValid()?(r=expandFormat(r,o.localeData()),formatFunctions[r]=formatFunctions[r]||makeFormatFunction(r),formatFunctions[r](o)):o.localeData().invalidDate()}function expandFormat(o,r){var a=5;function l(c){return r.longDateFormat(c)||c}for(localFormattingTokens.lastIndex=0;a>=0&&localFormattingTokens.test(o);)o=o.replace(localFormattingTokens,l),localFormattingTokens.lastIndex=0,a-=1;return o}var defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function longDateFormat(o){var r=this._longDateFormat[o],a=this._longDateFormat[o.toUpperCase()];return r||!a?r:(this._longDateFormat[o]=a.match(formattingTokens).map(function(l){return l==="MMMM"||l==="MM"||l==="DD"||l==="dddd"?l.slice(1):l}).join(""),this._longDateFormat[o])}var defaultInvalidDate="Invalid date";function invalidDate(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal(o){return this._ordinal.replace("%d",o)}var defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(o,r,a,l){var c=this._relativeTime[a];return isFunction(c)?c(o,r,a,l):c.replace(/%d/i,o)}function pastFuture(o,r){var a=this._relativeTime[o>0?"future":"past"];return isFunction(a)?a(r):a.replace(/%s/i,r)}var aliases={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function normalizeUnits(o){return typeof o=="string"?aliases[o]||aliases[o.toLowerCase()]:void 0}function normalizeObjectUnits(o){var r={},a,l;for(l in o)hasOwnProp(o,l)&&(a=normalizeUnits(l),a&&(r[a]=o[l]));return r}var priorities={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function getPrioritizedUnits(o){var r=[],a;for(a in o)hasOwnProp(o,a)&&r.push({unit:a,priority:priorities[a]});return r.sort(function(l,c){return l.priority-c.priority}),r}var match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match6=/[+-]?\d{6}/,match1to2=/\d\d?/,match3to4=/\d\d\d\d?/,match5to6=/\d\d\d\d\d\d?/,match1to3=/\d{1,3}/,match1to4=/\d{1,4}/,match1to6=/[+-]?\d{1,6}/,matchUnsigned=/\d+/,matchSigned=/[+-]?\d+/,matchOffset=/Z|[+-]\d\d:?\d\d/gi,matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi,matchTimestamp=/[+-]?\d+(\.\d{1,3})?/,matchWord=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,match1to2NoLeadingZero=/^[1-9]\d?/,match1to2HasZero=/^([1-9]\d|\d)/,regexes;regexes={};function addRegexToken(o,r,a){regexes[o]=isFunction(r)?r:function(l,c){return l&&a?a:r}}function getParseRegexForToken(o,r){return hasOwnProp(regexes,o)?regexes[o](r._strict,r._locale):new RegExp(unescapeFormat(o))}function unescapeFormat(o){return regexEscape(o.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(r,a,l,c,u){return a||l||c||u}))}function regexEscape(o){return o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function absFloor(o){return o<0?Math.ceil(o)||0:Math.floor(o)}function toInt(o){var r=+o,a=0;return r!==0&&isFinite(r)&&(a=absFloor(r)),a}var tokens={};function addParseToken(o,r){var a,l=r,c;for(typeof o=="string"&&(o=[o]),isNumber(r)&&(l=function(u,d){d[r]=toInt(u)}),c=o.length,a=0;a<c;a++)tokens[o[a]]=l}function addWeekParseToken(o,r){addParseToken(o,function(a,l,c,u){c._w=c._w||{},r(a,c._w,c,u)})}function addTimeToArrayFromToken(o,r,a){r!=null&&hasOwnProp(tokens,o)&&tokens[o](r,a._a,a,o)}function isLeapYear(o){return o%4===0&&o%100!==0||o%400===0}var YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,WEEK=7,WEEKDAY=8;addFormatToken("Y",0,0,function(){var o=this.year();return o<=9999?zeroFill(o,4):"+"+o});addFormatToken(0,["YY",2],0,function(){return this.year()%100});addFormatToken(0,["YYYY",4],0,"year");addFormatToken(0,["YYYYY",5],0,"year");addFormatToken(0,["YYYYYY",6,!0],0,"year");addRegexToken("Y",matchSigned);addRegexToken("YY",match1to2,match2);addRegexToken("YYYY",match1to4,match4);addRegexToken("YYYYY",match1to6,match6);addRegexToken("YYYYYY",match1to6,match6);addParseToken(["YYYYY","YYYYYY"],YEAR);addParseToken("YYYY",function(o,r){r[YEAR]=o.length===2?hooks.parseTwoDigitYear(o):toInt(o)});addParseToken("YY",function(o,r){r[YEAR]=hooks.parseTwoDigitYear(o)});addParseToken("Y",function(o,r){r[YEAR]=parseInt(o,10)});function daysInYear(o){return isLeapYear(o)?366:365}hooks.parseTwoDigitYear=function(o){return toInt(o)+(toInt(o)>68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(o,r){return function(a){return a!=null?(set$1(this,o,a),hooks.updateOffset(this,r),this):get$1(this,o)}}function get$1(o,r){if(!o.isValid())return NaN;var a=o._d,l=o._isUTC;switch(r){case"Milliseconds":return l?a.getUTCMilliseconds():a.getMilliseconds();case"Seconds":return l?a.getUTCSeconds():a.getSeconds();case"Minutes":return l?a.getUTCMinutes():a.getMinutes();case"Hours":return l?a.getUTCHours():a.getHours();case"Date":return l?a.getUTCDate():a.getDate();case"Day":return l?a.getUTCDay():a.getDay();case"Month":return l?a.getUTCMonth():a.getMonth();case"FullYear":return l?a.getUTCFullYear():a.getFullYear();default:return NaN}}function set$1(o,r,a){var l,c,u,d,f;if(!(!o.isValid()||isNaN(a))){switch(l=o._d,c=o._isUTC,r){case"Milliseconds":return void(c?l.setUTCMilliseconds(a):l.setMilliseconds(a));case"Seconds":return void(c?l.setUTCSeconds(a):l.setSeconds(a));case"Minutes":return void(c?l.setUTCMinutes(a):l.setMinutes(a));case"Hours":return void(c?l.setUTCHours(a):l.setHours(a));case"Date":return void(c?l.setUTCDate(a):l.setDate(a));case"FullYear":break;default:return}u=a,d=o.month(),f=o.date(),f=f===29&&d===1&&!isLeapYear(u)?28:f,c?l.setUTCFullYear(u,d,f):l.setFullYear(u,d,f)}}function stringGet(o){return o=normalizeUnits(o),isFunction(this[o])?this[o]():this}function stringSet(o,r){if(typeof o=="object"){o=normalizeObjectUnits(o);var a=getPrioritizedUnits(o),l,c=a.length;for(l=0;l<c;l++)this[a[l].unit](o[a[l].unit])}else if(o=normalizeUnits(o),isFunction(this[o]))return this[o](r);return this}function mod(o,r){return(o%r+r)%r}var indexOf;Array.prototype.indexOf?indexOf=Array.prototype.indexOf:indexOf=function(o){var r;for(r=0;r<this.length;++r)if(this[r]===o)return r;return-1};function daysInMonth(o,r){if(isNaN(o)||isNaN(r))return NaN;var a=mod(r,12);return o+=(r-a)/12,a===1?isLeapYear(o)?29:28:31-a%7%2}addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1});addFormatToken("MMM",0,0,function(o){return this.localeData().monthsShort(this,o)});addFormatToken("MMMM",0,0,function(o){return this.localeData().months(this,o)});addRegexToken("M",match1to2,match1to2NoLeadingZero);addRegexToken("MM",match1to2,match2);addRegexToken("MMM",function(o,r){return r.monthsShortRegex(o)});addRegexToken("MMMM",function(o,r){return r.monthsRegex(o)});addParseToken(["M","MM"],function(o,r){r[MONTH]=toInt(o)-1});addParseToken(["MMM","MMMM"],function(o,r,a,l){var c=a._locale.monthsParse(o,l,a._strict);c!=null?r[MONTH]=c:getParsingFlags(a).invalidMonth=o});var defaultLocaleMonths="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,defaultMonthsShortRegex=matchWord,defaultMonthsRegex=matchWord;function localeMonths(o,r){return o?isArray(this._months)?this._months[o.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(r)?"format":"standalone"][o.month()]:isArray(this._months)?this._months:this._months.standalone}function localeMonthsShort(o,r){return o?isArray(this._monthsShort)?this._monthsShort[o.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(r)?"format":"standalone"][o.month()]:isArray(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(o,r,a){var l,c,u,d=o.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],l=0;l<12;++l)u=createUTC([2e3,l]),this._shortMonthsParse[l]=this.monthsShort(u,"").toLocaleLowerCase(),this._longMonthsParse[l]=this.months(u,"").toLocaleLowerCase();return a?r==="MMM"?(c=indexOf.call(this._shortMonthsParse,d),c!==-1?c:null):(c=indexOf.call(this._longMonthsParse,d),c!==-1?c:null):r==="MMM"?(c=indexOf.call(this._shortMonthsParse,d),c!==-1?c:(c=indexOf.call(this._longMonthsParse,d),c!==-1?c:null)):(c=indexOf.call(this._longMonthsParse,d),c!==-1?c:(c=indexOf.call(this._shortMonthsParse,d),c!==-1?c:null))}function localeMonthsParse(o,r,a){var l,c,u;if(this._monthsParseExact)return handleStrictParse.call(this,o,r,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),l=0;l<12;l++){if(c=createUTC([2e3,l]),a&&!this._longMonthsParse[l]&&(this._longMonthsParse[l]=new RegExp("^"+this.months(c,"").replace(".","")+"$","i"),this._shortMonthsParse[l]=new RegExp("^"+this.monthsShort(c,"").replace(".","")+"$","i")),!a&&!this._monthsParse[l]&&(u="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[l]=new RegExp(u.replace(".",""),"i")),a&&r==="MMMM"&&this._longMonthsParse[l].test(o))return l;if(a&&r==="MMM"&&this._shortMonthsParse[l].test(o))return l;if(!a&&this._monthsParse[l].test(o))return l}}function setMonth(o,r){if(!o.isValid())return o;if(typeof r=="string"){if(/^\d+$/.test(r))r=toInt(r);else if(r=o.localeData().monthsParse(r),!isNumber(r))return o}var a=r,l=o.date();return l=l<29?l:Math.min(l,daysInMonth(o.year(),a)),o._isUTC?o._d.setUTCMonth(a,l):o._d.setMonth(a,l),o}function getSetMonth(o){return o!=null?(setMonth(this,o),hooks.updateOffset(this,!0),this):get$1(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(o){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),o?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex),this._monthsShortStrictRegex&&o?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(o){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),o?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex),this._monthsStrictRegex&&o?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function o(m,y){return y.length-m.length}var r=[],a=[],l=[],c,u,d,f;for(c=0;c<12;c++)u=createUTC([2e3,c]),d=regexEscape(this.monthsShort(u,"")),f=regexEscape(this.months(u,"")),r.push(d),a.push(f),l.push(f),l.push(d);r.sort(o),a.sort(o),l.sort(o),this._monthsRegex=new RegExp("^("+l.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function createDate(o,r,a,l,c,u,d){var f;return o<100&&o>=0?(f=new Date(o+400,r,a,l,c,u,d),isFinite(f.getFullYear())&&f.setFullYear(o)):f=new Date(o,r,a,l,c,u,d),f}function createUTCDate(o){var r,a;return o<100&&o>=0?(a=Array.prototype.slice.call(arguments),a[0]=o+400,r=new Date(Date.UTC.apply(null,a)),isFinite(r.getUTCFullYear())&&r.setUTCFullYear(o)):r=new Date(Date.UTC.apply(null,arguments)),r}function firstWeekOffset(o,r,a){var l=7+r-a,c=(7+createUTCDate(o,0,l).getUTCDay()-r)%7;return-c+l-1}function dayOfYearFromWeeks(o,r,a,l,c){var u=(7+a-l)%7,d=firstWeekOffset(o,l,c),f=1+7*(r-1)+u+d,m,y;return f<=0?(m=o-1,y=daysInYear(m)+f):f>daysInYear(o)?(m=o+1,y=f-daysInYear(o)):(m=o,y=f),{year:m,dayOfYear:y}}function weekOfYear(o,r,a){var l=firstWeekOffset(o.year(),r,a),c=Math.floor((o.dayOfYear()-l-1)/7)+1,u,d;return c<1?(d=o.year()-1,u=c+weeksInYear(d,r,a)):c>weeksInYear(o.year(),r,a)?(u=c-weeksInYear(o.year(),r,a),d=o.year()+1):(d=o.year(),u=c),{week:u,year:d}}function weeksInYear(o,r,a){var l=firstWeekOffset(o,r,a),c=firstWeekOffset(o+1,r,a);return(daysInYear(o)-l+c)/7}addFormatToken("w",["ww",2],"wo","week");addFormatToken("W",["WW",2],"Wo","isoWeek");addRegexToken("w",match1to2,match1to2NoLeadingZero);addRegexToken("ww",match1to2,match2);addRegexToken("W",match1to2,match1to2NoLeadingZero);addRegexToken("WW",match1to2,match2);addWeekParseToken(["w","ww","W","WW"],function(o,r,a,l){r[l.substr(0,1)]=toInt(o)});function localeWeek(o){return weekOfYear(o,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(o){var r=this.localeData().week(this);return o==null?r:this.add((o-r)*7,"d")}function getSetISOWeek(o){var r=weekOfYear(this,1,4).week;return o==null?r:this.add((o-r)*7,"d")}addFormatToken("d",0,"do","day");addFormatToken("dd",0,0,function(o){return this.localeData().weekdaysMin(this,o)});addFormatToken("ddd",0,0,function(o){return this.localeData().weekdaysShort(this,o)});addFormatToken("dddd",0,0,function(o){return this.localeData().weekdays(this,o)});addFormatToken("e",0,0,"weekday");addFormatToken("E",0,0,"isoWeekday");addRegexToken("d",match1to2);addRegexToken("e",match1to2);addRegexToken("E",match1to2);addRegexToken("dd",function(o,r){return r.weekdaysMinRegex(o)});addRegexToken("ddd",function(o,r){return r.weekdaysShortRegex(o)});addRegexToken("dddd",function(o,r){return r.weekdaysRegex(o)});addWeekParseToken(["dd","ddd","dddd"],function(o,r,a,l){var c=a._locale.weekdaysParse(o,l,a._strict);c!=null?r.d=c:getParsingFlags(a).invalidWeekday=o});addWeekParseToken(["d","e","E"],function(o,r,a,l){r[l]=toInt(o)});function parseWeekday(o,r){return typeof o!="string"?o:isNaN(o)?(o=r.weekdaysParse(o),typeof o=="number"?o:null):parseInt(o,10)}function parseIsoWeekday(o,r){return typeof o=="string"?r.weekdaysParse(o)%7||7:isNaN(o)?null:o}function shiftWeekdays(o,r){return o.slice(r,7).concat(o.slice(0,r))}var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;function localeWeekdays(o,r){var a=isArray(this._weekdays)?this._weekdays:this._weekdays[o&&o!==!0&&this._weekdays.isFormat.test(r)?"format":"standalone"];return o===!0?shiftWeekdays(a,this._week.dow):o?a[o.day()]:a}function localeWeekdaysShort(o){return o===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):o?this._weekdaysShort[o.day()]:this._weekdaysShort}function localeWeekdaysMin(o){return o===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):o?this._weekdaysMin[o.day()]:this._weekdaysMin}function handleStrictParse$1(o,r,a){var l,c,u,d=o.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],l=0;l<7;++l)u=createUTC([2e3,1]).day(l),this._minWeekdaysParse[l]=this.weekdaysMin(u,"").toLocaleLowerCase(),this._shortWeekdaysParse[l]=this.weekdaysShort(u,"").toLocaleLowerCase(),this._weekdaysParse[l]=this.weekdays(u,"").toLocaleLowerCase();return a?r==="dddd"?(c=indexOf.call(this._weekdaysParse,d),c!==-1?c:null):r==="ddd"?(c=indexOf.call(this._shortWeekdaysParse,d),c!==-1?c:null):(c=indexOf.call(this._minWeekdaysParse,d),c!==-1?c:null):r==="dddd"?(c=indexOf.call(this._weekdaysParse,d),c!==-1||(c=indexOf.call(this._shortWeekdaysParse,d),c!==-1)?c:(c=indexOf.call(this._minWeekdaysParse,d),c!==-1?c:null)):r==="ddd"?(c=indexOf.call(this._shortWeekdaysParse,d),c!==-1||(c=indexOf.call(this._weekdaysParse,d),c!==-1)?c:(c=indexOf.call(this._minWeekdaysParse,d),c!==-1?c:null)):(c=indexOf.call(this._minWeekdaysParse,d),c!==-1||(c=indexOf.call(this._weekdaysParse,d),c!==-1)?c:(c=indexOf.call(this._shortWeekdaysParse,d),c!==-1?c:null))}function localeWeekdaysParse(o,r,a){var l,c,u;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,o,r,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),l=0;l<7;l++){if(c=createUTC([2e3,1]).day(l),a&&!this._fullWeekdaysParse[l]&&(this._fullWeekdaysParse[l]=new RegExp("^"+this.weekdays(c,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[l]=new RegExp("^"+this.weekdaysShort(c,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[l]=new RegExp("^"+this.weekdaysMin(c,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[l]||(u="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[l]=new RegExp(u.replace(".",""),"i")),a&&r==="dddd"&&this._fullWeekdaysParse[l].test(o))return l;if(a&&r==="ddd"&&this._shortWeekdaysParse[l].test(o))return l;if(a&&r==="dd"&&this._minWeekdaysParse[l].test(o))return l;if(!a&&this._weekdaysParse[l].test(o))return l}}function getSetDayOfWeek(o){if(!this.isValid())return o!=null?this:NaN;var r=get$1(this,"Day");return o!=null?(o=parseWeekday(o,this.localeData()),this.add(o-r,"d")):r}function getSetLocaleDayOfWeek(o){if(!this.isValid())return o!=null?this:NaN;var r=(this.day()+7-this.localeData()._week.dow)%7;return o==null?r:this.add(o-r,"d")}function getSetISODayOfWeek(o){if(!this.isValid())return o!=null?this:NaN;if(o!=null){var r=parseIsoWeekday(o,this.localeData());return this.day(this.day()%7?r:r-7)}else return this.day()||7}function weekdaysRegex(o){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),o?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&o?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(o){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(o){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function o(E,A){return A.length-E.length}var r=[],a=[],l=[],c=[],u,d,f,m,y;for(u=0;u<7;u++)d=createUTC([2e3,1]).day(u),f=regexEscape(this.weekdaysMin(d,"")),m=regexEscape(this.weekdaysShort(d,"")),y=regexEscape(this.weekdays(d,"")),r.push(f),a.push(m),l.push(y),c.push(f),c.push(m),c.push(y);r.sort(o),a.sort(o),l.sort(o),c.sort(o),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour");addFormatToken("h",["hh",2],0,hFormat);addFormatToken("k",["kk",2],0,kFormat);addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)});addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)});addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(o,r){addFormatToken(o,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),r)})}meridiem("a",!0);meridiem("A",!1);function matchMeridiem(o,r){return r._meridiemParse}addRegexToken("a",matchMeridiem);addRegexToken("A",matchMeridiem);addRegexToken("H",match1to2,match1to2HasZero);addRegexToken("h",match1to2,match1to2NoLeadingZero);addRegexToken("k",match1to2,match1to2NoLeadingZero);addRegexToken("HH",match1to2,match2);addRegexToken("hh",match1to2,match2);addRegexToken("kk",match1to2,match2);addRegexToken("hmm",match3to4);addRegexToken("hmmss",match5to6);addRegexToken("Hmm",match3to4);addRegexToken("Hmmss",match5to6);addParseToken(["H","HH"],HOUR);addParseToken(["k","kk"],function(o,r,a){var l=toInt(o);r[HOUR]=l===24?0:l});addParseToken(["a","A"],function(o,r,a){a._isPm=a._locale.isPM(o),a._meridiem=o});addParseToken(["h","hh"],function(o,r,a){r[HOUR]=toInt(o),getParsingFlags(a).bigHour=!0});addParseToken("hmm",function(o,r,a){var l=o.length-2;r[HOUR]=toInt(o.substr(0,l)),r[MINUTE]=toInt(o.substr(l)),getParsingFlags(a).bigHour=!0});addParseToken("hmmss",function(o,r,a){var l=o.length-4,c=o.length-2;r[HOUR]=toInt(o.substr(0,l)),r[MINUTE]=toInt(o.substr(l,2)),r[SECOND]=toInt(o.substr(c)),getParsingFlags(a).bigHour=!0});addParseToken("Hmm",function(o,r,a){var l=o.length-2;r[HOUR]=toInt(o.substr(0,l)),r[MINUTE]=toInt(o.substr(l))});addParseToken("Hmmss",function(o,r,a){var l=o.length-4,c=o.length-2;r[HOUR]=toInt(o.substr(0,l)),r[MINUTE]=toInt(o.substr(l,2)),r[SECOND]=toInt(o.substr(c))});function localeIsPM(o){return(o+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(o,r,a){return o>11?a?"pm":"PM":a?"am":"AM"}var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},globalLocale;function commonPrefix(o,r){var a,l=Math.min(o.length,r.length);for(a=0;a<l;a+=1)if(o[a]!==r[a])return a;return l}function normalizeLocale(o){return o&&o.toLowerCase().replace("_","-")}function chooseLocale(o){for(var r=0,a,l,c,u;r<o.length;){for(u=normalizeLocale(o[r]).split("-"),a=u.length,l=normalizeLocale(o[r+1]),l=l?l.split("-"):null;a>0;){if(c=loadLocale(u.slice(0,a).join("-")),c)return c;if(l&&l.length>=a&&commonPrefix(u,l)>=a-1)break;a--}r++}return globalLocale}function isLocaleNameSane(o){return!!(o&&o.match("^[^/\\\\]*$"))}function loadLocale(o){var r=null,a;if(locales[o]===void 0&&typeof module<"u"&&module&&module.exports&&isLocaleNameSane(o))try{r=globalLocale._abbr,a=require,a("./locale/"+o),getSetGlobalLocale(r)}catch{locales[o]=null}return locales[o]}function getSetGlobalLocale(o,r){var a;return o&&(isUndefined(r)?a=getLocale(o):a=defineLocale(o,r),a?globalLocale=a:typeof console<"u"&&console.warn&&console.warn("Locale "+o+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(o,r){if(r!==null){var a,l=baseConfig;if(r.abbr=o,locales[o]!=null)deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),l=locales[o]._config;else if(r.parentLocale!=null)if(locales[r.parentLocale]!=null)l=locales[r.parentLocale]._config;else if(a=loadLocale(r.parentLocale),a!=null)l=a._config;else return localeFamilies[r.parentLocale]||(localeFamilies[r.parentLocale]=[]),localeFamilies[r.parentLocale].push({name:o,config:r}),null;return locales[o]=new Locale(mergeConfigs(l,r)),localeFamilies[o]&&localeFamilies[o].forEac
vendor: 13,056 bytes, line 4510
4510h(function(c){defineLocale(c.name,c.config)}),getSetGlobalLocale(o),locales[o]}else return delete locales[o],null}function updateLocale(o,r){if(r!=null){var a,l,c=baseConfig;locales[o]!=null&&locales[o].parentLocale!=null?locales[o].set(mergeConfigs(locales[o]._config,r)):(l=loadLocale(o),l!=null&&(c=l._config),r=mergeConfigs(c,r),l==null&&(r.abbr=o),a=new Locale(r),a.parentLocale=locales[o],locales[o]=a),getSetGlobalLocale(o)}else locales[o]!=null&&(locales[o].parentLocale!=null?(locales[o]=locales[o].parentLocale,o===getSetGlobalLocale()&&getSetGlobalLocale(o)):locales[o]!=null&&delete locales[o]);return locales[o]}function getLocale(o){var r;if(o&&o._locale&&o._locale._abbr&&(o=o._locale._abbr),!o)return globalLocale;if(!isArray(o)){if(r=loadLocale(o),r)return r;o=[o]}return chooseLocale(o)}function listLocales(){return keys(locales)}function checkOverflow(o){var r,a=o._a;return a&&getParsingFlags(o).overflow===-2&&(r=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||a[HOUR]===24&&(a[MINUTE]!==0||a[SECOND]!==0||a[MILLISECOND]!==0)?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(o)._overflowDayOfYear&&(r<YEAR||r>DATE)&&(r=DATE),getParsingFlags(o)._overflowWeeks&&r===-1&&(r=WEEK),getParsingFlags(o)._overflowWeekday&&r===-1&&(r=WEEKDAY),getParsingFlags(o).overflow=r),o}var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(o){var r,a,l=o._i,c=extendedIsoRegex.exec(l)||basicIsoRegex.exec(l),u,d,f,m,y=isoDates.length,E=isoTimes.length;if(c){for(getParsingFlags(o).iso=!0,r=0,a=y;r<a;r++)if(isoDates[r][1].exec(c[1])){d=isoDates[r][0],u=isoDates[r][2]!==!1;break}if(d==null){o._isValid=!1;return}if(c[3]){for(r=0,a=E;r<a;r++)if(isoTimes[r][1].exec(c[3])){f=(c[2]||" ")+isoTimes[r][0];break}if(f==null){o._isValid=!1;return}}if(!u&&f!=null){o._isValid=!1;return}if(c[4])if(tzRegex.exec(c[4]))m="Z";else{o._isValid=!1;return}o._f=d+(f||"")+(m||""),configFromStringAndFormat(o)}else o._isValid=!1}function extractFromRFC2822Strings(o,r,a,l,c,u){var d=[untruncateYear(o),defaultLocaleMonthsShort.indexOf(r),parseInt(a,10),parseInt(l,10),parseInt(c,10)];return u&&d.push(parseInt(u,10)),d}function untruncateYear(o){var r=parseInt(o,10);return r<=49?2e3+r:r<=999?1900+r:r}function preprocessRFC2822(o){return o.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday(o,r,a){if(o){var l=defaultLocaleWeekdaysShort.indexOf(o),c=new Date(r[0],r[1],r[2]).getDay();if(l!==c)return getParsingFlags(a).weekdayMismatch=!0,a._isValid=!1,!1}return!0}function calculateOffset(o,r,a){if(o)return obsOffsets[o];if(r)return 0;var l=parseInt(a,10),c=l%100,u=(l-c)/100;return u*60+c}function configFromRFC2822(o){var r=rfc2822.exec(preprocessRFC2822(o._i)),a;if(r){if(a=extractFromRFC2822Strings(r[4],r[3],r[2],r[5],r[6],r[7]),!checkWeekday(r[1],a,o))return;o._a=a,o._tzm=calculateOffset(r[8],r[9],r[10]),o._d=createUTCDate.apply(null,o._a),o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),getParsingFlags(o).rfc2822=!0}else o._isValid=!1}function configFromString(o){var r=aspNetJsonRegex.exec(o._i);if(r!==null){o._d=new Date(+r[1]);return}if(configFromISO(o),o._isValid===!1)delete o._isValid;else return;if(configFromRFC2822(o),o._isValid===!1)delete o._isValid;else return;o._strict?o._isValid=!1:hooks.createFromInputFallback(o)}hooks.createFromInputFallback=deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(o){o._d=new Date(o._i+(o._useUTC?" UTC":""))});function defaults(o,r,a){return o??r??a}function currentDateArray(o){var r=new Date(hooks.now());return o._useUTC?[r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()]:[r.getFullYear(),r.getMonth(),r.getDate()]}function configFromArray(o){var r,a,l=[],c,u,d;if(!o._d){for(c=currentDateArray(o),o._w&&o._a[DATE]==null&&o._a[MONTH]==null&&dayOfYearFromWeekInfo(o),o._dayOfYear!=null&&(d=defaults(o._a[YEAR],c[YEAR]),(o._dayOfYear>daysInYear(d)||o._dayOfYear===0)&&(getParsingFlags(o)._overflowDayOfYear=!0),a=createUTCDate(d,0,o._dayOfYear),o._a[MONTH]=a.getUTCMonth(),o._a[DATE]=a.getUTCDate()),r=0;r<3&&o._a[r]==null;++r)o._a[r]=l[r]=c[r];for(;r<7;r++)o._a[r]=l[r]=o._a[r]==null?r===2?1:0:o._a[r];o._a[HOUR]===24&&o._a[MINUTE]===0&&o._a[SECOND]===0&&o._a[MILLISECOND]===0&&(o._nextDay=!0,o._a[HOUR]=0),o._d=(o._useUTC?createUTCDate:createDate).apply(null,l),u=o._useUTC?o._d.getUTCDay():o._d.getDay(),o._tzm!=null&&o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),o._nextDay&&(o._a[HOUR]=24),o._w&&typeof o._w.d<"u"&&o._w.d!==u&&(getParsingFlags(o).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(o){var r,a,l,c,u,d,f,m,y;r=o._w,r.GG!=null||r.W!=null||r.E!=null?(u=1,d=4,a=defaults(r.GG,o._a[YEAR],weekOfYear(createLocal(),1,4).year),l=defaults(r.W,1),c=defaults(r.E,1),(c<1||c>7)&&(m=!0)):(u=o._locale._week.dow,d=o._locale._week.doy,y=weekOfYear(createLocal(),u,d),a=defaults(r.gg,o._a[YEAR],y.year),l=defaults(r.w,y.week),r.d!=null?(c=r.d,(c<0||c>6)&&(m=!0)):r.e!=null?(c=r.e+u,(r.e<0||r.e>6)&&(m=!0)):c=u),l<1||l>weeksInYear(a,u,d)?getParsingFlags(o)._overflowWeeks=!0:m!=null?getParsingFlags(o)._overflowWeekday=!0:(f=dayOfYearFromWeeks(a,l,c,u,d),o._a[YEAR]=f.year,o._dayOfYear=f.dayOfYear)}hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(o){if(o._f===hooks.ISO_8601){configFromISO(o);return}if(o._f===hooks.RFC_2822){configFromRFC2822(o);return}o._a=[],getParsingFlags(o).empty=!0;var r=""+o._i,a,l,c,u,d,f=r.length,m=0,y,E;for(c=expandFormat(o._f,o._locale).match(formattingTokens)||[],E=c.length,a=0;a<E;a++)u=c[a],l=(r.match(getParseRegexForToken(u,o))||[])[0],l&&(d=r.substr(0,r.indexOf(l)),d.length>0&&getParsingFlags(o).unusedInput.push(d),r=r.slice(r.indexOf(l)+l.length),m+=l.length),formatTokenFunctions[u]?(l?getParsingFlags(o).empty=!1:getParsingFlags(o).unusedTokens.push(u),addTimeToArrayFromToken(u,l,o)):o._strict&&!l&&getParsingFlags(o).unusedTokens.push(u);getParsingFlags(o).charsLeftOver=f-m,r.length>0&&getParsingFlags(o).unusedInput.push(r),o._a[HOUR]<=12&&getParsingFlags(o).bigHour===!0&&o._a[HOUR]>0&&(getParsingFlags(o).bigHour=void 0),getParsingFlags(o).parsedDateParts=o._a.slice(0),getParsingFlags(o).meridiem=o._meridiem,o._a[HOUR]=meridiemFixWrap(o._locale,o._a[HOUR],o._meridiem),y=getParsingFlags(o).era,y!==null&&(o._a[YEAR]=o._locale.erasConvertYear(y,o._a[YEAR])),configFromArray(o),checkOverflow(o)}function meridiemFixWrap(o,r,a){var l;return a==null?r:o.meridiemHour!=null?o.meridiemHour(r,a):(o.isPM!=null&&(l=o.isPM(a),l&&r<12&&(r+=12),!l&&r===12&&(r=0)),r)}function configFromStringAndArray(o){var r,a,l,c,u,d,f=!1,m=o._f.length;if(m===0){getParsingFlags(o).invalidFormat=!0,o._d=new Date(NaN);return}for(c=0;c<m;c++)u=0,d=!1,r=copyConfig({},o),o._useUTC!=null&&(r._useUTC=o._useUTC),r._f=o._f[c],configFromStringAndFormat(r),isValid(r)&&(d=!0),u+=getParsingFlags(r).charsLeftOver,u+=getParsingFlags(r).unusedTokens.length*10,getParsingFlags(r).score=u,f?u<l&&(l=u,a=r):(l==null||u<l||d)&&(l=u,a=r,d&&(f=!0));extend(o,a||r)}function configFromObject(o){if(!o._d){var r=normalizeObjectUnits(o._i),a=r.day===void 0?r.date:r.day;o._a=map([r.year,r.month,a,r.hour,r.minute,r.second,r.millisecond],function(l){return l&&parseInt(l,10)}),configFromArray(o)}}function createFromConfig(o){var r=new Moment(checkOverflow(prepareConfig(o)));return r._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function prepareConfig(o){var r=o._i,a=o._f;return o._locale=o._locale||getLocale(o._l),r===null||a===void 0&&r===""?createInvalid({nullInput:!0}):(typeof r=="string"&&(o._i=r=o._locale.preparse(r)),isMoment(r)?new Moment(checkOverflow(r)):(isDate(r)?o._d=r:isArray(a)?configFromStringAndArray(o):a?configFromStringAndFormat(o):configFromInput(o),isValid(o)||(o._d=null),o))}function configFromInput(o){var r=o._i;isUndefined(r)?o._d=new Date(hooks.now()):isDate(r)?o._d=new Date(r.valueOf()):typeof r=="string"?configFromString(o):isArray(r)?(o._a=map(r.slice(0),function(a){return parseInt(a,10)}),configFromArray(o)):isObject(r)?configFromObject(o):isNumber(r)?o._d=new Date(r):hooks.createFromInputFallback(o)}function createLocalOrUTC(o,r,a,l,c){var u={};return(r===!0||r===!1)&&(l=r,r=void 0),(a===!0||a===!1)&&(l=a,a=void 0),(isObject(o)&&isObjectEmpty(o)||isArray(o)&&o.length===0)&&(o=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=c,u._l=a,u._i=o,u._f=r,u._strict=l,createFromConfig(u)}function createLocal(o,r,a,l){return createLocalOrUTC(o,r,a,l,!1)}var prototypeMin=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=createLocal.apply(null,arguments);return this.isValid()&&o.isValid()?o<this?this:o:createInvalid()}),prototypeMax=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=createLocal.apply(null,arguments);return this.isValid()&&o.isValid()?o>this?this:o:createInvalid()});function pickBy(o,r){var a,l;if(r.length===1&&isArray(r[0])&&(r=r[0]),!r.length)return createLocal();for(a=r[0],l=1;l<r.length;++l)(!r[l].isValid()||r[l][o](a))&&(a=r[l]);return a}function min(){var o=[].slice.call(arguments,0);return pickBy("isBefore",o)}function max(){var o=[].slice.call(arguments,0);return pickBy("isAfter",o)}var now=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid(o){var r,a=!1,l,c=ordering.length;for(r in o)if(hasOwnProp(o,r)&&!(indexOf.call(ordering,r)!==-1&&(o[r]==null||!isNaN(o[r]))))return!1;for(l=0;l<c;++l)if(o[ordering[l]]){if(a)return!1;parseFloat(o[ordering[l]])!==toInt(o[ordering[l]])&&(a=!0)}return!0}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(o){var r=normalizeObjectUnits(o),a=r.year||0,l=r.quarter||0,c=r.month||0,u=r.week||r.isoWeek||0,d=r.day||0,f=r.hour||0,m=r.minute||0,y=r.second||0,E=r.millisecond||0;this._isValid=isDurationValid(r),this._milliseconds=+E+y*1e3+m*6e4+f*1e3*60*60,this._days=+d+u*7,this._months=+c+l*3+a*12,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(o){return o instanceof Duration}function absRound(o){return o<0?Math.round(-1*o)*-1:Math.round(o)}function compareArrays(o,r,a){var l=Math.min(o.length,r.length),c=Math.abs(o.length-r.length),u=0,d;for(d=0;d<l;d++)toInt(o[d])!==toInt(r[d])&&u++;return u+c}function offset(o,r){addFormatToken(o,0,0,function(){var a=this.utcOffset(),l="+";return a<0&&(a=-a,l="-"),l+zeroFill(~~(a/60),2)+r+zeroFill(~~a%60,2)})}offset("Z",":");offset("ZZ","");addRegexToken("Z",matchShortOffset);addRegexToken("ZZ",matchShortOffset);addParseToken(["Z","ZZ"],function(o,r,a){a._useUTC=!0,a._tzm=offsetFromString(matchShortOffset,o)});var chunkOffset=/([\+\-]|\d\d)/gi;function offsetFromString(o,r){var a=(r||"").match(o),l,c,u;return a===null?null:(l=a[a.length-1]||[],c=(l+"").match(chunkOffset)||["-",0,0],u=+(c[1]*60)+toInt(c[2]),u===0?0:c[0]==="+"?u:-u)}function cloneWithOffset(o,r){var a,l;return r._isUTC?(a=r.clone(),l=(isMoment(o)||isDate(o)?o.valueOf():createLocal(o).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+l),hooks.updateOffset(a,!1),a):createLocal(o).local()}function getDateOffset(o){return-Math.round(o._d.getTimezoneOffset())}hooks.updateOffset=function(){};function getSetOffset(o,r,a){var l=this._offset||0,c;if(!this.isValid())return o!=null?this:NaN;
vendor: 28,474 bytes, line 4510
4510if(o!=null){if(typeof o=="string"){if(o=offsetFromString(matchShortOffset,o),o===null)return this}else Math.abs(o)<16&&!a&&(o=o*60);return!this._isUTC&&r&&(c=getDateOffset(this)),this._offset=o,this._isUTC=!0,c!=null&&this.add(c,"m"),l!==o&&(!r||this._changeInProgress?addSubtract(this,createDuration(o-l,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?l:getDateOffset(this)}function getSetZone(o,r){return o!=null?(typeof o!="string"&&(o=-o),this.utcOffset(o,r),this):-this.utcOffset()}function setOffsetToUTC(o){return this.utcOffset(0,o)}function setOffsetToLocal(o){return this._isUTC&&(this.utcOffset(0,o),this._isUTC=!1,o&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var o=offsetFromString(matchOffset,this._i);o!=null?this.utcOffset(o):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(o){return this.isValid()?(o=o?createLocal(o).utcOffset():0,(this.utcOffset()-o)%60===0):!1}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var o={},r;return copyConfig(o,this),o=prepareConfig(o),o._a?(r=o._isUTC?createUTC(o._a):createLocal(o._a),this._isDSTShifted=this.isValid()&&compareArrays(o._a,r.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:!1}function isUtcOffset(){return this.isValid()?this._isUTC:!1}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(o,r){var a=o,l=null,c,u,d;return isDuration(o)?a={ms:o._milliseconds,d:o._days,M:o._months}:isNumber(o)||!isNaN(+o)?(a={},r?a[r]=+o:a.milliseconds=+o):(l=aspNetRegex.exec(o))?(c=l[1]==="-"?-1:1,a={y:0,d:toInt(l[DATE])*c,h:toInt(l[HOUR])*c,m:toInt(l[MINUTE])*c,s:toInt(l[SECOND])*c,ms:toInt(absRound(l[MILLISECOND]*1e3))*c}):(l=isoRegex.exec(o))?(c=l[1]==="-"?-1:1,a={y:parseIso(l[2],c),M:parseIso(l[3],c),w:parseIso(l[4],c),d:parseIso(l[5],c),h:parseIso(l[6],c),m:parseIso(l[7],c),s:parseIso(l[8],c)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(d=momentsDifference(createLocal(a.from),createLocal(a.to)),a={},a.ms=d.milliseconds,a.M=d.months),u=new Duration(a),isDuration(o)&&hasOwnProp(o,"_locale")&&(u._locale=o._locale),isDuration(o)&&hasOwnProp(o,"_isValid")&&(u._isValid=o._isValid),u}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(o,r){var a=o&&parseFloat(o.replace(",","."));return(isNaN(a)?0:a)*r}function positiveMomentsDifference(o,r){var a={};return a.months=r.month()-o.month()+(r.year()-o.year())*12,o.clone().add(a.months,"M").isAfter(r)&&--a.months,a.milliseconds=+r-+o.clone().add(a.months,"M"),a}function momentsDifference(o,r){var a;return o.isValid()&&r.isValid()?(r=cloneWithOffset(r,o),o.isBefore(r)?a=positiveMomentsDifference(o,r):(a=positiveMomentsDifference(r,o),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function createAdder(o,r){return function(a,l){var c,u;return l!==null&&!isNaN(+l)&&(deprecateSimple(r,"moment()."+r+"(period, number) is deprecated. Please use moment()."+r+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=a,a=l,l=u),c=createDuration(a,l),addSubtract(this,c,o),this}}function addSubtract(o,r,a,l){var c=r._milliseconds,u=absRound(r._days),d=absRound(r._months);o.isValid()&&(l=l??!0,d&&setMonth(o,get$1(o,"Month")+d*a),u&&set$1(o,"Date",get$1(o,"Date")+u*a),c&&o._d.setTime(o._d.valueOf()+c*a),l&&hooks.updateOffset(o,u||d))}var add=createAdder(1,"add"),subtract=createAdder(-1,"subtract");function isString(o){return typeof o=="string"||o instanceof String}function isMomentInput(o){return isMoment(o)||isDate(o)||isString(o)||isNumber(o)||isNumberOrStringArray(o)||isMomentInputObject(o)||o===null||o===void 0}function isMomentInputObject(o){var r=isObject(o)&&!isObjectEmpty(o),a=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c,u,d=l.length;for(c=0;c<d;c+=1)u=l[c],a=a||hasOwnProp(o,u);return r&&a}function isNumberOrStringArray(o){var r=isArray(o),a=!1;return r&&(a=o.filter(function(l){return!isNumber(l)&&isString(o)}).length===0),r&&a}function isCalendarSpec(o){var r=isObject(o)&&!isObjectEmpty(o),a=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],c,u;for(c=0;c<l.length;c+=1)u=l[c],a=a||hasOwnProp(o,u);return r&&a}function getCalendarFormat(o,r){var a=o.diff(r,"days",!0);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function calendar$1(o,r){arguments.length===1&&(arguments[0]?isMomentInput(arguments[0])?(o=arguments[0],r=void 0):isCalendarSpec(arguments[0])&&(r=arguments[0],o=void 0):(o=void 0,r=void 0));var a=o||createLocal(),l=cloneWithOffset(a,this).startOf("day"),c=hooks.calendarFormat(this,l)||"sameElse",u=r&&(isFunction(r[c])?r[c].call(this,a):r[c]);return this.format(u||this.localeData().calendar(c,this,createLocal(a)))}function clone(){return new Moment(this)}function isAfter(o,r){var a=isMoment(o)?o:createLocal(o);return this.isValid()&&a.isValid()?(r=normalizeUnits(r)||"millisecond",r==="millisecond"?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(r).valueOf()):!1}function isBefore(o,r){var a=isMoment(o)?o:createLocal(o);return this.isValid()&&a.isValid()?(r=normalizeUnits(r)||"millisecond",r==="millisecond"?this.valueOf()<a.valueOf():this.clone().endOf(r).valueOf()<a.valueOf()):!1}function isBetween(o,r,a,l){var c=isMoment(o)?o:createLocal(o),u=isMoment(r)?r:createLocal(r);return this.isValid()&&c.isValid()&&u.isValid()?(l=l||"()",(l[0]==="("?this.isAfter(c,a):!this.isBefore(c,a))&&(l[1]===")"?this.isBefore(u,a):!this.isAfter(u,a))):!1}function isSame(o,r){var a=isMoment(o)?o:createLocal(o),l;return this.isValid()&&a.isValid()?(r=normalizeUnits(r)||"millisecond",r==="millisecond"?this.valueOf()===a.valueOf():(l=a.valueOf(),this.clone().startOf(r).valueOf()<=l&&l<=this.clone().endOf(r).valueOf())):!1}function isSameOrAfter(o,r){return this.isSame(o,r)||this.isAfter(o,r)}function isSameOrBefore(o,r){return this.isSame(o,r)||this.isBefore(o,r)}function diff(o,r,a){var l,c,u;if(!this.isValid())return NaN;if(l=cloneWithOffset(o,this),!l.isValid())return NaN;switch(c=(l.utcOffset()-this.utcOffset())*6e4,r=normalizeUnits(r),r){case"year":u=monthDiff(this,l)/12;break;case"month":u=monthDiff(this,l);break;case"quarter":u=monthDiff(this,l)/3;break;case"second":u=(this-l)/1e3;break;case"minute":u=(this-l)/6e4;break;case"hour":u=(this-l)/36e5;break;case"day":u=(this-l-c)/864e5;break;case"week":u=(this-l-c)/6048e5;break;default:u=this-l}return a?u:absFloor(u)}function monthDiff(o,r){if(o.date()<r.date())return-monthDiff(r,o);var a=(r.year()-o.year())*12+(r.month()-o.month()),l=o.clone().add(a,"months"),c,u;return r-l<0?(c=o.clone().add(a-1,"months"),u=(r-l)/(l-c)):(c=o.clone().add(a+1,"months"),u=(r-l)/(c-l)),-(a+u)||0}hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function toString(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(o){if(!this.isValid())return null;var r=o!==!0,a=r?this.clone().utc():this;return a.year()<0||a.year()>9999?formatMoment(a,r?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction(Date.prototype.toISOString)?r?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(a,"Z")):formatMoment(a,r?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var o="moment",r="",a,l,c,u;return this.isLocal()||(o=this.utcOffset()===0?"moment.utc":"moment.parseZone",r="Z"),a="["+o+'("]',l=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",c="-MM-DD[T]HH:mm:ss.SSS",u=r+'[")]',this.format(a+l+c+u)}function format(o){o||(o=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var r=formatMoment(this,o);return this.localeData().postformat(r)}function from(o,r){return this.isValid()&&(isMoment(o)&&o.isValid()||createLocal(o).isValid())?createDuration({to:this,from:o}).locale(this.locale()).humanize(!r):this.localeData().invalidDate()}function fromNow(o){return this.from(createLocal(),o)}function to(o,r){return this.isValid()&&(isMoment(o)&&o.isValid()||createLocal(o).isValid())?createDuration({from:this,to:o}).locale(this.locale()).humanize(!r):this.localeData().invalidDate()}function toNow(o){return this.to(createLocal(),o)}function locale(o){var r;return o===void 0?this._locale._abbr:(r=getLocale(o),r!=null&&(this._locale=r),this)}var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(o){return o===void 0?this.localeData():this.locale(o)});function localeData(){return this._locale}var MS_PER_SECOND=1e3,MS_PER_MINUTE=60*MS_PER_SECOND,MS_PER_HOUR=60*MS_PER_MINUTE,MS_PER_400_YEARS=(365*400+97)*24*MS_PER_HOUR;function mod$1(o,r){return(o%r+r)%r}function localStartOfDate(o,r,a){return o<100&&o>=0?new Date(o+400,r,a)-MS_PER_400_YEARS:new Date(o,r,a).valueOf()}function utcStartOfDate(o,r,a){return o<100&&o>=0?Date.UTC(o+400,r,a)-MS_PER_400_YEARS:Date.UTC(o,r,a)}function startOf(o){var r,a;if(o=normalizeUnits(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?utcStartOfDate:localStartOfDate,o){case"year":r=a(this.year(),0,1);break;case"quarter":r=a(this.year(),this.month()-this.month()%3,1);break;case"month":r=a(this.year(),this.month(),1);break;case"week":r=a(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":r=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":r=a(this.year(),this.month(),this.date());break;case"hour":r=this._d.valueOf(),r-=mod$1(r+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":r=this._d.valueOf(),r-=mod$1(r,MS_PER_MINUTE);break;case"second":r=this._d.valueOf(),r-=mod$1(r,MS_PER_SECOND);break}return this._d.setTime(r),hooks.updateOffset(this,!0),this}function endOf(o){var r,a;if(o=normalizeUnits(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?utcStartOfDate:localStartOfDate,o){case"year":r=a(this.year()+1,0,1)-1;break;case"quarter":r=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":r=a(this.year(),this.month()+1,1)-1;break;case"week":r=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":r=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":r=a(this.year(),this.month(),this.date()+1)-1;break;case"hour":r=this._d.valueOf(),r+=MS_PER_HOUR-mod$1(r+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":r=this._d.valueOf(),r+=MS_PER_MINUTE-mod$1(r,MS_PER_MINUTE)-1;break;case"second":r=this._d.valueOf(),r+=MS_PER_SECOND-mod$1(r,MS_PER_SECOND)-1;break}return this._d.setTime(r),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray$1(){var o=this;return[o.year(),o.month(),o.date(),o.hour(),o.minute(),o.second(),o.millisecond()]}function toObject(){var o=this;return{years:o.year(),months:o.month(),date:o.date(),hours:o.hours(),minutes:o.minutes(),seconds:o.seconds(),milliseconds:o.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr");addFormatToken("NN",0,0,"eraAbbr");addFormatToken("NNN",0,0,"eraAbbr");addFormatToken("NNNN",0,0,"eraName");addFormatToken("NNNNN",0,0,"eraNarrow");addFormatToken("y",["y",1],"yo","eraYear");addFormatToken("y",["yy",2],0,"eraYear");addFormatToken("y",["yyy",3],0,"eraYear");addFormatToken("y",["yyyy",4],0,"eraYear");addRegexToken("N",matchEraAbbr);addRegexToken("NN",matchEraAbbr);addRegexToken("NNN",matchEraAbbr);addRegexToken("NNNN",matchEraName);addRegexToken("NNNNN",matchEraNarrow);addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(o,r,a,l){var c=a._locale.erasParse(o,l,a._strict);c?getParsingFlags(a).era=c:getParsingFlags(a).invalidEra=o});addRegexToken("y",matchUnsigned);addRegexToken("yy",matchUnsigned);addRegexToken("yyy",matchUnsigned);addRegexToken("yyyy",matchUnsigned);addRegexToken("yo",matchEraYearOrdinal);addParseToken(["y","yy","yyy","yyyy"],YEAR);addParseToken(["yo"],function(o,r,a,l){var c;a._locale._eraYearOrdinalRegex&&(c=o.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?r[YEAR]=a._locale.eraYearOrdinalParse(o,c):r[YEAR]=parseInt(o,10)});function localeEras(o,r){var a,l,c,u=this._eras||getLocale("en")._eras;for(a=0,l=u.length;a<l;++a){switch(typeof u[a].since){case"string":c=hooks(u[a].since).startOf("day"),u[a].since=c.valueOf();break}switch(typeof u[a].until){case"undefined":u[a].until=1/0;break;case"string":c=hooks(u[a].until).startOf("day").valueOf(),u[a].until=c.valueOf();break}}return u}function localeErasParse(o,r,a){var l,c,u=this.eras(),d,f,m;for(o=o.toUpperCase(),l=0,c=u.length;l<c;++l)if(d=u[l].name.toUpperCase(),f=u[l].abbr.toUpperCase(),m=u[l].narrow.toUpperCase(),a)switch(r){case"N":case"NN":case"NNN":if(f===o)return u[l];break;case"NNNN":if(d===o)return u[l];break;case"NNNNN":if(m===o)return u[l];break}else if([d,f,m].indexOf(o)>=0)return u[l]}function localeErasConvertYear(o,r){var a=o.since<=o.until?1:-1;return r===void 0?hooks(o.since).year():hooks(o.since).year()+(r-o.offset)*a}function getEraName(){var o,r,a,l=this.localeData().eras();for(o=0,r=l.length;o<r;++o)if(a=this.clone().startOf("day").valueOf(),l[o].since<=a&&a<=l[o].until||l[o].until<=a&&a<=l[o].since)return l[o].name;return""}function getEraNarrow(){var o,r,a,l=this.localeData().eras();for(o=0,r=l.length;o<r;++o)if(a=this.clone().startOf("day").valueOf(),l[o].since<=a&&a<=l[o].until||l[o].until<=a&&a<=l[o].since)return l[o].narrow;return""}function getEraAbbr(){var o,r,a,l=this.localeData().eras();for(o=0,r=l.length;o<r;++o)if(a=this.clone().startOf("day").valueOf(),l[o].since<=a&&a<=l[o].until||l[o].until<=a&&a<=l[o].since)return l[o].abbr;return""}function getEraYear(){var o,r,a,l,c=this.localeData().eras();for(o=0,r=c.length;o<r;++o)if(a=c[o].since<=c[o].until?1:-1,l=this.clone().startOf("day").valueOf(),c[o].since<=l&&l<=c[o].until||c[o].until<=l&&l<=c[o].since)return(this.year()-hooks(c[o].since).year())*a+c[o].offset;return this.year()}function erasNameRegex(o){return hasOwnProp(this,"_erasNameRegex")||computeErasParse.call(this),o?this._erasNameRegex:this._erasRegex}function erasAbbrRegex(o){return hasOwnProp(this,"_erasAbbrRegex")||computeErasParse.call(this),o?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex(o){return hasOwnProp(this,"_erasNarrowRegex")||computeErasParse.call(this),o?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr(o,r){return r.erasAbbrRegex(o)}function matchEraName(o,r){return r.erasNameRegex(o)}function matchEraNarrow(o,r){return r.erasNarrowRegex(o)}function matchEraYearOrdinal(o,r){return r._eraYearOrdinalRegex||matchUnsigned}function computeErasParse(){var o=[],r=[],a=[],l=[],c,u,d,f,m,y=this.eras();for(c=0,u=y.length;c<u;++c)d=regexEscape(y[c].name),f=regexEscape(y[c].abbr),m=regexEscape(y[c].narrow),r.push(d),o.push(f),a.push(m),l.push(d),l.push(f),l.push(m);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100});addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100});function addWeekYearFormatToken(o,r){addFormatToken(0,[o,o.length],0,r)}addWeekYearFormatToken("gggg","weekYear");addWeekYearFormatToken("ggggg","weekYear");addWeekYearFormatToken("GGGG","isoWeekYear");addWeekYearFormatToken("GGGGG","isoWeekYear");addRegexToken("G",matchSigned);addRegexToken("g",matchSigned);addRegexToken("GG",match1to2,match2);addRegexToken("gg",match1to2,match2);addRegexToken("GGGG",match1to4,match4);addRegexToken("gggg",match1to4,match4);addRegexToken("GGGGG",match1to6,match6);addRegexToken("ggggg",match1to6,match6);addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(o,r,a,l){r[l.substr(0,2)]=toInt(o)});addWeekParseToken(["gg","GG"],function(o,r,a,l){r[l]=hooks.parseTwoDigitYear(o)});function getSetWeekYear(o){return getSetWeekYearHelper.call(this,o,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(o){return getSetWeekYearHelper.call(this,o,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getISOWeeksInISOWeekYear(){return weeksInYear(this.isoWeekYear(),1,4)}function getWeeksInYear(){var o=this.localeData()._week;return weeksInYear(this.year(),o.dow,o.doy)}function getWeeksInWeekYear(){var o=this.localeData()._week;return weeksInYear(this.weekYear(),o.dow,o.doy)}function getSetWeekYearHelper(o,r,a,l,c){var u;return o==null?weekOfYear(this,l,c).year:(u=weeksInYear(o,l,c),r>u&&(r=u),setWeekAll.call(this,o,r,a,l,c))}function setWeekAll(o,r,a,l,c){var u=dayOfYearFromWeeks(o,r,a,l,c),d=createUTCDate(u.year,0,u.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter");addRegexToken("Q",match1);addParseToken("Q",function(o,r){r[MONTH]=(toInt(o)-1)*3});function getSetQuarter(o){return o==null?Math.ceil((this.month()+1)/3):this.month((o-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date");addRegexToken("D",match1to2,match1to2NoLeadingZero);addRegexToken("DD",match1to2,match2);addRegexToken("Do",function(o,r){return o?r._dayOfMonthOrdinalParse||r._ordinalParse:r._dayOfMonthOrdinalParseLenient});addParseToken(["D","DD"],DATE);addParseToken("Do",function(o,r){r[DATE]=toInt(o.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear");addRegexToken("DDD",match1to3);addRegexToken("DDDD",match3);addParseToken(["DDD","DDDD"],function(o,r,a){a._dayOfYear=toInt(o)});function getSetDayOfYear(o){var r=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return o==null?r:this.add(o-r,"d")}addFormatToken("m",["mm",2],0,"minute");addRegexToken("m",match1to2,match1to2HasZero);addRegexToken("mm",match1to2,match2);addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second");addRegexToken("s",match1to2,match1to2HasZero);addRegexToken("ss",match1to2,match2);addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)});addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)});addFormatToken(0,["SSS",3],0,"millisecond");addFormatToken(0,["SSSS",4],0,function(){return this.millisecond()*10});addFormatToken(0,["SSSSS",5],0,function(){return this.millisecond()*100});addFormatToken(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});addFormatToken(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});addFormatToken(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});addFormatToken(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});addRegexToken("S",match1to3,match1);addRegexToken("SS",match1to3,match2);addRegexToken("SSS",match1to3,match3);var token,getSetMillisecond;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);function parseMs(o,r){r[MILLISECOND]=toInt(("0."+o)*1e3)}for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr");addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var proto=Moment.prototype;proto.add=add;proto.calendar=calendar$1;proto.clone=clone;proto.diff=diff;proto.endOf=endOf;proto.format=format;proto.from=from;proto.fromNow=fromNow;proto.to=to;proto.toNow=toNow;proto.get=stringGet;proto.invalidAt=invalidAt;proto.isAfter=isAfter;proto.isBefore=isBefore;proto.isBetween=isBetween;proto.isSame=isSame;proto.isSameOrAfter=isSameOrAfter;proto.isSameOrBefore=isSameOrBefore;proto.isValid=isValid$2;proto.lang=lang;proto.locale=locale;proto.localeData=localeData;proto.max=prototypeMax;proto.min=prototypeMin;proto.parsingFlags=parsingFlags;proto.set=stringSet;proto.startOf=startOf;proto.subtract=subtract;proto.toArray=toArray$1;proto.toObject=toObject;proto.toDate=toDate;proto.toISOString=toISOString;proto.inspect=inspect;typeof Symbol<"u"&&Symbol.for!=null&&(proto[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});proto.toJSON=toJSON;proto.toString=toString;proto.unix=unix;proto.valueOf=valueOf;proto.creationData=creationData;proto.eraName=getEraName;proto.eraNarrow=getEraNarrow;proto.eraAbbr=getEraAbbr;proto.eraYear=getEraYear;proto.year=getSetYear;proto.isLeapYear=getIsLeapYear;proto.weekYear=getSetWeekYear;proto.isoWeekYear=getSetISOWeekYear;proto.quarter=proto.quarters=getSetQuarter;proto.month=getSetMonth;proto.daysInMonth=getDaysInMonth;proto.week=proto.weeks=getSetWeek;proto.isoWeek=proto.isoWeeks=getSetISOWeek;proto.weeksInYear=getWeeksInYear;proto.weeksInWeekYear=getWeeksInWeekYear;proto.isoWeeksInYear=getISOWeeksInYear;proto.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear;proto.date=getSetDayOfMonth;proto.day=proto.days=getSetDayOfWeek;proto.weekday=getSetLocaleDayOfWeek;proto.isoWeekday=getSetISODayOfWeek;proto.dayOfYear=getSetDayOfYear;proto.hour=proto.hours=getSetHour;proto.minute=proto.minutes=getSetMinute;proto.second=proto.seconds=getSetSecond;proto.millisecond=proto.milliseconds=getSetMillisecond;proto.utcOffset=getSetOffset;proto.utc=setOffsetToUTC;proto.local=setOffsetToLocal;proto.parseZone=setOffsetToParsedOffset;proto.hasAlignedHourOffset=hasAlignedHourOffset;proto.isDST=isDaylightSavingTime;proto.isLocal=isLocal;proto.isUtcOffset=isUtcOffset;proto.isUtc=isUtc;proto.isUTC=isUtc;proto.zoneAbbr=getZoneAbbr;proto.zoneName=getZoneName;proto.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth);proto.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth);proto.years=deprecate("years accessor is deprecated. Use year instead",getSetYear);proto.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone);proto.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(o){return createLocal(o*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(o){return o}var proto$1=Locale.prototype;proto$1.calendar=calendar;proto$1.longDateFormat=longDateFormat;proto$1.invalidDate=invalidDate;proto$1.ordinal=ordinal;proto$1.preparse=preParsePostFormat;proto$1.postformat=preParsePostFormat;proto$1.relativeTime=relativeTime;proto$1.pastFuture=pastFuture;proto$1.set=set;proto$1.eras=localeEras;proto$1.erasParse=localeErasParse;proto$1.erasConvertYear=localeErasConvertYear;proto$1.erasAbbrRegex=erasAbbrRegex;proto$1.erasNameRegex=erasNameRegex;proto$1.erasNarrowRegex=erasNarrowRegex;proto$1.months=localeMonths;proto$1.monthsShort=localeMonthsShort;proto$1.monthsParse=localeMonthsParse;proto$1.monthsRegex=monthsRegex;proto$1.monthsShortRegex=monthsShortRegex;proto$1.week=localeWeek;proto$1.firstDayOfYear=localeFirstDayOfYear;proto$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1.weekdays=localeWeekdays;proto$1.weekdaysMin=localeWeekdaysMin;proto$1.weekdaysShort=localeWeekdaysShort;proto$1.weekdaysParse=localeWeekdaysParse;proto$1.weekdaysRegex=weekdaysRegex;proto$1.weekdaysShortRegex=weekdaysShortRegex;proto$1.weekdaysMinRegex=weekdaysMinRegex;proto$1.isPM=localeIsPM;proto$1.meridiem=localeMeridiem;function get$1$1(o,r,a,l){var c=getLocale(),u=createUTC().set(l,r);return c[a](u,o)}function listMonthsImpl(o,r,a){if(isNumber(o)&&(r=o,o=void 0),o=o||"",r!=null)return get$1$1(o,r,a,"month");var l,c=[];for(l=0;l<12;l++)c[l]=get$1$1(o,l,a,"month");return c}function listWeekdaysImpl(o,r,a,l){typeof o=="boolean"?(isNumber(r)&&(a=r,r=void 0),r=r||""):(r=o,a=r,o=!1,isNumber(r)&&(a=r,r=void 0),r=r||"");var c=getLocale(),u=o?c._week.dow:0,d,f=[];if(a!=null)return get$1$1(r,(a+u)%7,l,"day");for(d=0;d<7;d++)f[d]=get$1$1(r,(d+u)%7,l,"day");return f}function listMonths(o,r){return listMonthsImpl(o,r,"months")}function listMonthsShort(o,r){return listMonthsImpl(o,r,"monthsShort")}function listWeekdays(o,r,a){return listWeekdaysImpl(o,r,a,"weekdays")}function listWeekdaysShort(o,r,a){return listWeekdaysImpl(o,r,a,"weekdaysShort")}function listWeekdaysMin(o,r,a){return listWeekdaysImpl(o,r,a,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(o){var r=o%10,a=toInt(o%100/10)===1?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return o+a}});hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale);hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs;function abs(){var o=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),o.milliseconds=mathAbs(o.milliseconds),o.seconds=mathAbs(o.seconds),o.minutes=mathAbs(o.minutes),o.hours=mathAbs(o.hours),o.months=mathAbs(o.months),o.years=mathAbs(o.years),this}function addSubtract$1(o,r,a,l){var c=createDuration(r,a);return o._milliseconds+=l*c._milliseconds,o._days+=l*c._days,o._months+=l*c._months,o._bubble()}function add$1(o,r){return addSubtract$1(this,o,r,1)}function subtract$1(o,r){return addSubtract$1(this,o,r,-1)}function absCeil(o){return o<0?Math.floor(o):Math.ceil(o)}function bubble(){var o=this._milliseconds,r=this._days,a=this._months,l=this._data,c,u,d,f,m;return o>=0&&r>=0&&a>=0||o<=0&&r<=0&&a<=0||(o+=absCeil(monthsToDays(a)+r)*864e5,r=0,a=0),l.milliseconds=o%1e3,c=absFloor(o/1e3),l.seconds=c%60,u=absFloor(c/60),l.minutes=u%60,d=absFloor(u/60),l.hours=d%24,r+=absFloor(d/24),m=absFloor(daysToMonths(r)),a+=m,r-=absCeil(monthsToDays(m)),f=absFloor(a/12),a%=12,l.days=r,l.months=a,l.years=f,this}function daysToMonths(o){return o*4800/146097}function monthsToDays(o){return o*146097/4800}function as(o){if(!this.isValid())return NaN;var r,a,l=this._milliseconds;if(o=normalizeUnits(o),o==="month"||o==="quarter"||o==="year")switch(r=this._days+l/864e5,a=this._months+daysToMonths(r),o){case"month":return a;case"quarter":return a/3;case"year":return a/12}else switch(r=this._days+Math.round(monthsToDays(this._months)),o){case"week":return r/7+l/6048e5;case"day":return r+l/864e5;case"hour":return r*24+l/36e5;case"minute":return r*1440+l/6e4;case"second":return r*86400+l/1e3;case"millisecond":return Math.floor(r*864e5)+l;default:throw new Error("Unknown unit "+o)}}function makeAs(o){return function(){return this.as(o)}}var asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),as
4510Hours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asQuarters=makeAs("Q"),asYears=makeAs("y"),valueOf$1=asMilliseconds;function clone$1(){return createDuration(this)}function get$2(o){return o=normalizeUnits(o),this.isValid()?this[o+"s"]():NaN}function makeGetter(o){return function(){return this.isValid()?this._data[o]:NaN}}var milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(o,r,a,l,c){return c.relativeTime(r||1,!!a,o,l)}function relativeTime$1(o,r,a,l){var c=createDuration(o).abs(),u=round(c.as("s")),d=round(c.as("m")),f=round(c.as("h")),m=round(c.as("d")),y=round(c.as("M")),E=round(c.as("w")),A=round(c.as("y")),P=u<=a.ss&&["s",u]||u<a.s&&["ss",u]||d<=1&&["m"]||d<a.m&&["mm",d]||f<=1&&["h"]||f<a.h&&["hh",f]||m<=1&&["d"]||m<a.d&&["dd",m];return a.w!=null&&(P=P||E<=1&&["w"]||E<a.w&&["ww",E]),P=P||y<=1&&["M"]||y<a.M&&["MM",y]||A<=1&&["y"]||["yy",A],P[2]=r,P[3]=+o>0,P[4]=l,substituteTimeAgo.apply(null,P)}function getSetRelativeTimeRounding(o){return o===void 0?round:typeof o=="function"?(round=o,!0):!1}function getSetRelativeTimeThreshold(o,r){return thresholds[o]===void 0?!1:r===void 0?thresholds[o]:(thresholds[o]=r,o==="s"&&(thresholds.ss=r-1),!0)}function humanize(o,r){if(!this.isValid())return this.localeData().invalidDate();var a=!1,l=thresholds,c,u;return typeof o=="object"&&(r=o,o=!1),typeof o=="boolean"&&(a=o),typeof r=="object"&&(l=Object.assign({},thresholds,r),r.s!=null&&r.ss==null&&(l.ss=r.s-1)),c=this.localeData(),u=relativeTime$1(this,!a,l,c),a&&(u=c.pastFuture(+this,u)),c.postformat(u)}var abs$1=Math.abs;function sign(o){return(o>0)-(o<0)||+o}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var o=abs$1(this._milliseconds)/1e3,r=abs$1(this._days),a=abs$1(this._months),l,c,u,d,f=this.asSeconds(),m,y,E,A;return f?(l=absFloor(o/60),c=absFloor(l/60),o%=60,l%=60,u=absFloor(a/12),a%=12,d=o?o.toFixed(3).replace(/\.?0+$/,""):"",m=f<0?"-":"",y=sign(this._months)!==sign(f)?"-":"",E=sign(this._days)!==sign(f)?"-":"",A=sign(this._milliseconds)!==sign(f)?"-":"",m+"P"+(u?y+u+"Y":"")+(a?y+a+"M":"")+(r?E+r+"D":"")+(c||l||o?"T":"")+(c?A+c+"H":"")+(l?A+l+"M":"")+(o?A+d+"S":"")):"P0D"}var proto$2=Duration.prototype;proto$2.isValid=isValid$1;proto$2.abs=abs;proto$2.add=add$1;proto$2.subtract=subtract$1;proto$2.as=as;proto$2.asMilliseconds=asMilliseconds;proto$2.asSeconds=asSeconds;proto$2.asMinutes=asMinutes;proto$2.asHours=asHours;proto$2.asDays=asDays;proto$2.asWeeks=asWeeks;proto$2.asMonths=asMonths;proto$2.asQuarters=asQuarters;proto$2.asYears=asYears;proto$2.valueOf=valueOf$1;proto$2._bubble=bubble;proto$2.clone=clone$1;proto$2.get=get$2;proto$2.milliseconds=milliseconds;proto$2.seconds=seconds;proto$2.minutes=minutes;proto$2.hours=hours;proto$2.days=days;proto$2.weeks=weeks;proto$2.months=months;proto$2.years=years;proto$2.humanize=humanize;proto$2.toISOString=toISOString$1;proto$2.toString=toISOString$1;proto$2.toJSON=toISOString$1;proto$2.locale=locale;proto$2.localeData=localeData;proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1);proto$2.lang=lang;addFormatToken("X",0,0,"unix");addFormatToken("x",0,0,"valueOf");addRegexToken("x",matchSigned);addRegexToken("X",matchTimestamp);addParseToken("X",function(o,r,a){a._d=new Date(parseFloat(o)*1e3)});addParseToken("x",function(o,r,a){a._d=new Date(toInt(o))});//! moment.js
4511hooks.version="2.30.1";setHookCallback(createLocal);hooks.fn=proto;hooks.min=min;hooks.max=max;hooks.now=now;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const moment=Object.freeze(Object.defineProperty({__proto__:null,default:hooks},Symbol.toStringTag,{value:"Module"}));var vueTimerHook_cjs={};const require$$0=getAugmentedNamespace(vue_runtime_esmBundler);/*!
4512  * vue-timer-hook v1.0.84
4513  * (c) 2023 Eduardo San Martin Morote
4514  * @license MIT
4515  */var hasRequiredVueTimerHook_cjs;function requireVueTimerHook_cjs(){if(hasRequiredVueTimerHook_cjs)return vueTimerHook_cjs;hasRequiredVueTimerHook_cjs=1,Object.defineProperty(vueTimerHook_cjs,"__esModule",{value:!0});var o=require$$0;class r{static getTimeFromSeconds(P){const R=o.computed(()=>Math.ceil(P.value)),x=o.computed(()=>Math.floor(R.value/(60*60*24))),M=o.computed(()=>Math.floor(R.value%(60*60*24)/(60*60))),$=o.computed(()=>Math.floor(R.value%(60*60)/60));return{seconds:o.computed(()=>Math.floor(R.value%60)),minutes:$,hours:M,days:x}}static getSecondsFromExpiry(P,R){const x=new Date().getTime(),M=P-x;if(M>0){const $=M/1e3;return R?Math.round($):$}return 0}static getSecondsFromPrevTime(P,R){const M=new Date().getTime()-P;if(M>0){const $=M/1e3;return R?Math.round($):$}return 0}static getSecondsFromTimeNow(){const P=new Date,R=P.getTime(),x=P.getTimezoneOffset()*60;return R/1e3-x}static getFormattedTimeFromSeconds(P,R){const{seconds:x,minutes:M,hours:$}
4515=r.getTimeFromSeconds(P),V=o.computed(()=>R==="12-hour"?$.value>=12?"pm":"am":""),B=o.computed(()=>R==="12-hour"?$.value%12:$.value);return{seconds:x,minutes:M,hours:B,ampm:V}}}class a{static expiryTimestamp(P){const R=new Date(P).getTime()>0;return R||console.warn("vue-timer-hook: { useTimer } Invalid expiryTimestamp settings",P),R}}const l=A=>typeof A=="number";function c(A,P){let R;const x=()=>{R&&(clearInterval(R),R=void 0)},M=$=>(x(),!$&&!P?void 0:R=setInterval(A,$||P));return l(P)&&M(),{remove:x,start:M}}const u=1e3;function d(A){if(!a.expiryTimestamp(A))return null;const P=r.getSecondsFromExpiry(A),R=Math.floor((P-Math.floor(P))*1e3);return R>0?R:u}const f=(A=60,P=!0)=>{let R;const x=o.reactive({expiryTimestamp:A,seconds:r.getSecondsFromExpiry(A),isRunning:P,isExpired:!1,didStart:P,delay:d(A)});function M(){x.isExpired=!0,x.isRunning=!1,x.delay=null,R&&R.remove()}function $(){x.isRunning=!1,R&&R.remove()}function V(L=A,F=!0){$(),x.delay=d(L),x.didStart=F,x.isExpired=!1,x.expiryTimestamp=L,x.seconds=r.getSecondsFromExpiry(L),x.didStart&&O()}function B(){const L=new Date,F=L.setMilliseconds(L.getMilliseconds()+x.seconds*1e3);V(F)}function O(){x.didStart?(x.seconds=r.getSecondsFromExpiry(x.expiryTimestamp),x.isRunning=!0,R=c(()=>{x.delay!==u&&(x.delay=u);const L=r.getSecondsFromExpiry(x.expiryTimestamp);x.seconds=L,L<=0&&M()},x.isRunning?x.delay:null)):B()}return V(A,P),{...r.getTimeFromSeconds(o.toRef(x,"seconds")),start:O,pause:$,resume:B,restart:V,isRunning:o.toRef(x,"isRunning"),isExpired:o.toRef(x,"isExpired")}},m=()=>new Date().getTime(),y=(A=60,P=!0)=>{let R;const x=o.ref(A),M=o.ref(m()),$=o.ref(x.value+r.getSecondsFromPrevTime(M.value||0,!0)),V=o.ref(P);function B(){M.value=m(),V.value=!0,$.value=x.value+r.getSecondsFromPrevTime(M.value,!0),R=c(()=>{$.value=x.value+r.getSecondsFromPrevTime(M.value,!0)},V.value?1e3:!1)}function O(){x.value=$.value,V.value=!1,R&&R.remove()}function L(F=0,j=!0){O(),V.value=j,x.value=F,$.value=+x.value,r.getSecondsFromPrevTime(M.value,!0),V.value&&B()}return V.value&&B(),{...r.getTimeFromSeconds($),start:B,pause:O,reset:L,isRunning:V}},E=(A="24-hour")=>{const P=o.ref(r.getSecondsFromTimeNow());return c(()=>{P.value=r.getSecondsFromTimeNow()},1e3),{...r.getFormattedTimeFromSeconds(P,A)}};return vueTimerHook_cjs.useStopwatch=y,vueTimerHook_cjs.useTime=E,vueTimerHook_cjs.useTimer=f,vueTimerHook_cjs}var vueTimerHook_cjsExports=requireVueTimerHook_cjs(),sticksy$1={};/**
4516 * Sticksy.js
4517 * A library for making cool things like fixed widgets.
4518 * Dependency-free. ES5 code.
4519 * -
4520 * @version 0.2.0
4521 * @url https://github.com/kovart/sticksy
4522 * @author Artem Kovalchuk <[email protected]>
4523 * @license The MIT License (MIT)
4524 */var hasRequiredSticksy$1;function requireSticksy$1(){if(hasRequiredSticksy$1)return sticksy$1;hasRequiredSticksy$1=1,window.Sticksy=function(){var r={STATIC:"static",FIXED:"fixed",STUCK:"stuck"};function a(c,u){if(!c)throw new Error("You have to specify the target element");if(typeof c!="string"&&!(c instanceof Element))throw new Error("Expected a string or element, but got: "+Object.prototype.toString.call(c));var d=l.findElement(c);if(!d)throw new Error("Cannot find target element: "+c);var f=d.parentNode;if(!f)throw new Error("Cannot find container of target element: "+c);u=u||{},this._props={containerEl:f,targetEl:d,topSpacing:u.topSpacing||0,enabled:u.enabled||!0,listen:u.listen||!1},this.onStateChanged=null,this.nodeRef=d,this._initialize()}a.instances=[],a.enabledInstances=[],a.prototype._initialize=function(){var c=this;this.state=r.STATIC,this._stickyNodes=[],this._dummyNodes=[];for(var u=this._props.targetEl;u;){var d=u.cloneNode(!0);d.style.visibility="hidden",d.style.pointerEvents="none",d.className+=" sticksy-dummy-node",d.removeAttribute("id"),this._props.targetEl.parentNode.insertBefore(d,this._props.targetEl),this._stickyNodes.push(u),this._dummyNodes.push(d),u=u.nextElementSibling}this._stickyNodesHeight=0,this._limits={top:0,bottom:0},this._isListening=!1,this._props.containerEl.style.position="relative",this._shouldCollapseMargins=getComputedStyle(this._props.containerEl).display.indexOf("flex")===-1,this._props.listen&&(this._mutationObserver=new MutationObserver(function(){c.hardRefresh()}),this._startListen()),a.instances.push(this),this._props.enabled&&a.enabledInstances.push(this),this.hardRefresh()},a.prototype._startListen=function(){!this._props.listen||this._isListening||(this._mutationObserver.observe(this._props.containerEl,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this._isListening=!0)},a.prototype._stopListen=function(){!this._props.listen||!this._isListening||(this._mutationObserver.disconnect(),this._isListening=!1)},a.prototype._calcState=function(c){return c<this._limits.top?r.STATIC:c>=this._limits.bottom?r.STUCK:r.FIXED},a.prototype._updateStickyNodesHeight=function(){this._stickyNodesHeight=l.getComputedBox(this._stickyNodes[this._stickyNodes.length-1]).bottomWithMargin-l.getComputedBox(this._stickyNodes[0]).topWithMargin},a.prototype._updateLimits=function(){var c=this._props.containerEl,u=this._stickyNodes,d=l.getComputedBox(c),f=l.getComputedBox(u[0]);this._limits={top:f.topWithMargin-this._props.topSpacing,bottom:d.bottom-d.paddingBottom-this._props.topSpacing-this._stickyNodesHeight}},a.prototype._applyState=function(c){c===r.STATIC?(this._resetElements(this._stickyNodes),this._disableElements(this._dummyNodes)):(this._fixElementsSize(this._stickyNodes),c===r.FIXED?this._fixElements(this._stickyNodes):this._stuckElements(this._stickyNodes),this._enableElements(this._dummyNodes))},a.prototype.refresh=function(){var c=this._calcState(window.pageYOffset,this._limits);c!==this.state&&(this.state=c,this._stopListen(),this._applyState(c),this._startListen(),typeof this.onStateChanged=="function"&&this.onStateChanged(c))},a.prototype.hardRefresh=function(){this._stopListen();var c=this.state;this.state=r.STATIC,this._applyState(this.state),this._fixElementsSize(this._stickyNodes),this._updateStickyNodesHeight(),this._updateLimits(),this.state=this._calcState(window.pageYOffset,this._limits),this._applyState(this.state),this._startListen(),typeof this.onStateChanged=="function"&&c!==this.state&&this.onStateChanged(this.state)},a.prototype.enable=function(){this._props.enabled=!0,a.enabledInstances.push(this),this.hardRefresh()},a.prototype.disable=function(){this._props.enabled=!1,this.state=r.STATIC,this._applyState(this.state),a.enabledInstances.splice(a.enabledInstances.indexOf(this),1)},a.prototype._fixElements=function(c){for(var u=0,d=this._props.topSpacing,f=0;f<c.length;f++){var m=c[f],y=l.getComputedBox(m),E=this._shouldCollapseMargins?Math.max(0,u-y.marginTop):u;m.style.position="fixed",m.style.top=d+E+"px",m.style.bottom="",d+=y.height+y.marginTop+E,u=y.marginBottom}},a.prototype._stuckElements=function(c){for(var u=0,d=l.getComputedBox(this._props.containerEl).paddingBottom,f=c.length-1;f>=0;f--){var m=c[f],y=l.getComputedBox(m),E=this._shouldCollapseMargins?Math.max(0,u-y.marginBottom):u;m.style.position="absolute",m.style.top="auto",m.style.bottom=d+E+"px",d+=y.height+y.marginBottom+E,u=y.marginTop}}
4524,a.prototype._resetElements=function(c){c.forEach(function(u){u.style.position="",u.style.top="",u.style.bottom="",u.style.height="",u.style.width=""})},a.prototype._disableElements=function(c){c.forEach(function(u){u.style.display="none"})},a.prototype._enableElements=function(c){for(var u=0;u<c.length;u++)c[u].style.display=getComputedStyle(this._stickyNodes[u]).display},a.prototype._fixElementsSize=function(){for(var c=0;c<this._stickyNodes.length;c++){var u=this._stickyNodes[c],d=getComputedStyle(u);u.style.width=d.width,u.style.height=d.height}},a.refreshAll=function(){for(var c=0;c<a.enabledInstances.length;c++)a.enabledInstances[c].refresh()},a.hardRefreshAll=function(){for(var c=0;c<a.enabledInstances.length;c++)a.enabledInstances[c].hardRefresh()},a.enableAll=function(){a.enabledInstances=a.instances.slice(),this.hardRefreshAll()},a.disableAll=function(){for(var c=a.enabledInstances.slice(),u=0;u<c.length;u++)a.enabledInstances[u].disable();a.enabledInstances=[]},a.initializeAll=function(c,u,d){if(typeof c>"u")throw new Error("'target' parameter is undefined");var f=[];c instanceof Element?f=[c]:typeof c.length<"u"&&c.length>0&&c[0]instanceof Element?f=typeof c.get=="function"?c.get():c:typeof c=="string"&&(f=document.querySelectorAll(c)||[]);var m=[],y=[];if(f.forEach(function(E){m.indexOf(E.parentNode)===-1&&(m.push(E.parentNode),y.push(E))}),!d&&!y.length)throw new Error("There are no elements to initialize");return y.map(function(E){return new a(E,u)})},window.addEventListener("scroll",a.refreshAll),window.addEventListener("resize",a.hardRefreshAll);var l={parseNumber:function(c){return parseFloat(c)||0},findElement:function(c,u){return u||(u=document),typeof c=="string"?u.querySelector(c):c instanceof Element?c:void 0},getComputedBox:function(c){var u=c.getBoundingClientRect(),d=getComputedStyle(c);return{height:u.height,width:u.width,top:window.pageYOffset+u.top,bottom:window.pageYOffset+u.bottom,marginTop:l.parseNumber(d.marginTop),marginBottom:l.parseNumber(d.marginBottom),paddingTop:l.parseNumber(d.paddingTop),paddingBottom:l.parseNumber(d.paddingBottom),topWithMargin:window.pageYOffset+u.top-l.parseNumber(d.marginTop),bottomWithMargin:window.pageYOffset+u.bottom+l.parseNumber(d.marginBottom)}}};return a}();var o=window.$||window.jQuery||window.Zepto;return o&&(o.fn.sticksy=function(a){return window.Sticksy.initializeAll(this,a)}),sticksy$1}var sticksy,hasRequiredSticksy;function requireSticksy(){return hasRequiredSticksy||(hasRequiredSticksy=1,sticksy=requireSticksy$1()),sticksy}requireSticksy();const moment_client_nzgYItVHLe=defineNuxtPlugin(()=>({provide:{moment:hooks,timerCountdown:vueTimerHook_cjsExports.useTimer}}));var postscribe$2={exports:{}};/**
4525 * @file postscribe
4526 * @description Asynchronously write javascript, even with document.write.
4527 * @version v2.0.8
4528 * @see {@link https://krux.github.io/postscribe}
4529 * @license MIT
4530 * @author Derek Brans
4531 * @copyright 2016 Krux Digital, Inc
4532 */var postscribe$1=postscribe$2.exports,hasRequiredPostscribe;function requirePostscribe(){return hasRequiredPostscribe||(hasRequiredPostscribe=1,function(o,r){(function(l,c){o.exports=c()})(postscribe$1,function(){return function(a){var l={};function c(u){if(l[u])return l[u].exports;var d=l[u]={exports:{},id:u,loaded:!1};return a[u].call(d.exports,d,d.exports,c),d.loaded=!0,d.exports}return c.m=a,c.c=l,c.p="",c(0)}([function(a,l,c){var u=c(1),d=f(u);function f(m){return m&&m.__esModule?m:{default:m}}a.exports=d.default},function(a,l,c){l.__esModule=!0;var u=Object.assign||function(L){for(var F=1;F<arguments.length;F++){var j=arguments[F];for(var U in j)Object.prototype.hasOwnProperty.call(j,U)&&(L[U]=j[U])}return L};l.default=O;var d=c(2),f=A(d),m=c(4),y=E(m);function E(L){if(L&&L.__esModule)return L;var F={};if(L!=null)for(var j in L)Object.prototype.hasOwnProperty.call(L,j)&&(F[j]=L[j]);return F.default=L,F}function A(L){return L&&L.__esModule?L:{default:L}}function P(){}var R={afterAsync:P,afterDequeue:P,afterStreamStart:P,afterWrite:P,autoFix:!0,beforeEnqueue:P,beforeWriteToken:function(F){return F},beforeWrite:function(F){return F},done:P,error:function(F){throw new Error(F.msg)},releaseAsync:!1},x=0,M=[],$=null;function V(){var L=M.shift();if(L){var F=y.last(L);F.afterDequeue(),L.stream=B.apply(void 0,L),F.afterStreamStart()}}function B(L,F,j){$=new f.default(L,j),$.id=x++,$.name=j.name||$.id,O.streams[$.name]=$;var U=L.ownerDocument,G={close:U.close,open:U.open,write:U.write,writeln:U.writeln};function Y(ve){ve=j.beforeWrite(ve),$.write(ve),j.afterWrite(ve)}u(U,{close:P,open:P,write:function(){for(var J=arguments.length,Z=Array(J),Me=0;Me<J;Me++)Z[Me]=arguments[Me];return Y(Z.join(""))},writeln:function(){for(var J=arguments.length,Z=Array(J),Me=0;Me<J;Me++)Z[Me]=arguments[Me];return Y(Z.join("")+`
4533`)}});var te=$.win.onerror||P;return $.win.onerror=function(ve,J,Z){j.error({msg:ve+" - "+J+": "+Z}),te.apply($.win,[ve,J,Z])},$.write(F,function(){u(U,G),$.win.onerror=te,j.done(),$=null,V()}),$}function O(L,F,j){if(y.isFunction(j))j={done:j};else if(j==="clear"){M=[],$=null,x=0;return}j=y.defaults(j,R),/^#/.test(L)?L=window.document.getElementById(L.substr(1)):L=L.jquery?L[0]:L;var U=[L,F,j];return L.postscribe={cancel:function(){U.stream?U.stream.abort():U[1]=P}},j.beforeEnqueue(U),M.push(U),$||V(),L.postscribe}u(O,{streams:{},queue:M,WriteStream:f.default})}
4533,function(a,l,c){l.__esModule=!0;var u=Object.assign||function(O){for(var L=1;L<arguments.length;L++){var F=arguments[L];for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&(O[j]=F[j])}return O},d=c(3),f=A(d),m=c(4),y=E(m);function E(O){if(O&&O.__esModule)return O;var L={};if(O!=null)for(var F in O)Object.prototype.hasOwnProperty.call(O,F)&&(L[F]=O[F]);return L.default=O,L}function A(O){return O&&O.__esModule?O:{default:O}}function P(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}var R="data-ps-",x="ps-style",M="ps-script";function $(O,L){var F=R+L,j=O.getAttribute(F);return y.existy(j)?String(j):j}function V(O,L){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,j=R+L;y.existy(F)&&F!==""?O.setAttribute(j,F):O.removeAttribute(j)}var B=function(){function O(L){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P(this,O),this.root=L,this.options=F,this.doc=L.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new f.default("",{autoFix:F.autoFix}),this.actuals=[L],this.proxyHistory="",this.proxyRoot=this.doc.createElement(L.nodeName),this.scriptStack=[],this.writeQueue=[],V(this.proxyRoot,"proxyof",0)}return O.prototype.write=function(){var F;for((F=this.writeQueue).push.apply(F,arguments);!this.deferredRemote&&this.writeQueue.length;){var j=this.writeQueue.shift();y.isFunction(j)?this._callFunction(j):this._writeImpl(j)}},O.prototype._callFunction=function(F){var j={type:"function",value:F.name||F.toString()};this._onScriptStart(j),F.call(this.win,this.doc),this._onScriptDone(j)},O.prototype._writeImpl=function(F){this.parser.append(F);for(var j=void 0,U=void 0,G=void 0,Y=[];(j=this.parser.readToken())&&!(U=y.isScript(j))&&!(G=y.isStyle(j));)j=this.options.beforeWriteToken(j),j&&Y.push(j);Y.length>0&&this._writeStaticTokens(Y),U&&this._handleScriptToken(j),G&&this._handleStyleToken(j)},O.prototype._writeStaticTokens=function(F){var j=this._buildChunk(F);return j.actual?(j.html=this.proxyHistory+j.actual,this.proxyHistory+=j.proxy,this.proxyRoot.innerHTML=j.html,this._walkChunk(),j):null},O.prototype._buildChunk=function(F){for(var j=this.actuals.length,U=[],G=[],Y=[],te=F.length,ve=0;ve<te;ve++){var J=F[ve],Z=J.toString();if(U.push(Z),J.attrs){if(!/^noscript$/i.test(J.tagName)){var Me=j++;G.push(Z.replace(/(\/?>)/," "+R+"id="+Me+" $1")),J.attrs.id!==M&&J.attrs.id!==x&&Y.push(J.type==="atomicTag"?"":"<"+J.tagName+" "+R+"proxyof="+Me+(J.unary?" />":">"))}}else G.push(Z),Y.push(J.type==="endTag"?Z:"")}return{tokens:F,raw:U.join(""),actual:G.join(""),proxy:Y.join("")}},O.prototype._walkChunk=function(){for(var F=void 0,j=[this.proxyRoot];y.existy(F=j.shift());){var U=F.nodeType===1,G=U&&$(F,"proxyof");if(!G){U&&(this.actuals[$(F,"id")]=F,V(F,"id"));var Y=F.parentNode&&$(F.parentNode,"proxyof");Y&&this.actuals[Y].appendChild(F)}j.unshift.apply(j,y.toArray(F.childNodes))}},O.prototype._handleScriptToken=function(F){var j=this,U=this.parser.clear();U&&this.writeQueue.unshift(U),F.src=F.attrs.src||F.attrs.SRC,F=this.options.beforeWriteToken(F),F&&(F.src&&this.scriptStack.length?this.deferredRemote=F:this._onScriptStart(F),this._writeScriptToken(F,function(){j._onScriptDone(F)}))},O.prototype._handleStyleToken=function(F){var j=this.parser.clear();j&&this.writeQueue.unshift(j),F.type=F.attrs.type||F.attrs.TYPE||"text/css",F=this.options.beforeWriteToken(F),F&&this._writeStyleToken(F),j&&this.write()},O.prototype._writeStyleToken=function(F){var j=this._buildStyle(F);this._insertCursor(j,x),F.content&&(j.styleSheet&&!j.sheet?j.styleSheet.cssText=F.content:j.appendChild(this.doc.createTextNode(F.content)))},O.prototype._buildStyle=function(F){var j=this.doc.createElement(F.tagName);return j.setAttribute("type",F.type),y.eachKey(F.attrs,function(U,G){j.setAttribute(U,G)}),j},O.prototype._insertCursor=function(F,j){this._writeImpl('<span id="'+j+'"/>');var U=this.doc.getElementById(j);U&&U.parentNode.replaceChild(F,U)},O.prototype._onScriptStart=function(F){F.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(F)},O.prototype._onScriptDone=function(F){if(F!==this.scriptStack[0]){this.options.error({msg:"Bad script nesting or script finished twice"});return}this.scriptStack.shift(),this.write.apply(this,F.outerWrites),!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)},O.prototype._writeScriptToken=function(F,j){var U=this._buildScript(F),G=this._shouldRelease(U),Y=this.options.afterAsync;F.src&&(U.src=F.src,this._scriptLoadHandler(U,G?Y:function(){j(),Y()}));try{this._insertCursor(U,M),(!U.src||G)&&j()}catch(te){this.options.error(te),j()}},O.prototype._buildScript=function(F){var j=this.doc.createElement(F.tagName);return y.eachKey(F.attrs,function(U,G){j.setAttribute(U,G)}),F.content&&(j.text=F.content),j},O.prototype._scriptLoadHandler=function(F,j){function U(){F=F.onload=F.onreadystatechange=F.onerror=null}var G=this.options.error;function Y(){U(),j!=null&&j(),j=null}function te(J){U(),G(J),j!=null&&j(),j=null}function ve(J,Z){var Me=J["on"+Z];Me!=null&&(J["_on"+Z]=Me)}ve(F,"load"),ve(F,"error"),u(F,{onload:function(){if(F._onload)try{F._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(Z){te({msg:"onload handler failed "+Z+" @ "+F.src})}Y()},onerror:function(){if(F._onerror)try{F._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(Z){te({msg:"onerror handler failed "+Z+" @ "+F.src});return}te({msg:"remote script failed "+F.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(F.readyState)&&Y()}})},O.prototype._shouldRelease=function(F){var j=/^script$/i.test(F.nodeName);return!j||!!(this.options.releaseAsync&&F.src&&F.hasAttribute("async"))},O}();l.default=B},function(a,l,c){/**
4534 * @file prescribe
4535 * @description Tiny, forgiving HTML parser
4536 * @version vundefined
4537 * @see {@link https://github.com/krux/prescribe/}
4538 * @license MIT
4539 * @author Derek Brans
4540 * @copyright 2016 Krux Digital, Inc
4541 */(function(d,f){a.exports=f()})(this,function(){return function(u){var d={};function f(m){if(d[m])return d[m].exports;var y=d[m]={exports:{},id:m,loaded:!1};return u[m].call(y.exports,y,y.exports,f),y.loaded=!0,y.exports}return f.m=u,f.c=d,f.p="",f(0)}([function(u,d,f){var m=f(1),y=E(m);
4541function E(A){return A&&A.__esModule?A:{default:A}}u.exports=y.default},function(u,d,f){d.__esModule=!0;var m=f(2),y=$(m),E=f(3),A=$(E),P=f(6),R=M(P),x=f(5);function M(F){return F&&F.__esModule?F:{default:F}}function $(F){if(F&&F.__esModule)return F;var j={};if(F!=null)for(var U in F)Object.prototype.hasOwnProperty.call(F,U)&&(j[U]=F[U]);return j.default=F,j}function V(F,j){if(!(F instanceof j))throw new TypeError("Cannot call a class as a function")}var B={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},O=function(){function F(){var j=this,U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};V(this,F),this.stream=U;var Y=!1,te={};for(var ve in y)y.hasOwnProperty(ve)&&(G.autoFix&&(te[ve+"Fix"]=!0),Y=Y||te[ve+"Fix"]);Y?(this._readToken=(0,R.default)(this,te,function(){return j._readTokenImpl()}),this._peekToken=(0,R.default)(this,te,function(){return j._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return F.prototype.append=function(U){this.stream+=U},F.prototype.prepend=function(U){this.stream=U+this.stream},F.prototype._readTokenImpl=function(){var U=this._peekTokenImpl();if(U)return this.stream=this.stream.slice(U.length),U},F.prototype._peekTokenImpl=function(){for(var U in B)if(B.hasOwnProperty(U)&&B[U].test(this.stream)){var G=A[U](this.stream);if(G)return G.type==="startTag"&&/script|style/i.test(G.tagName)?null:(G.text=this.stream.substr(0,G.length),G)}},F.prototype.peekToken=function(){return this._peekToken()},F.prototype.readToken=function(){return this._readToken()},F.prototype.readTokens=function(U){for(var G=void 0;G=this.readToken();)if(U[G.type]&&U[G.type](G)===!1)return},F.prototype.clear=function(){var U=this.stream;return this.stream="",U},F.prototype.rest=function(){return this.stream},F}();d.default=O,O.tokenToString=function(F){return F.toString()},O.escapeAttributes=function(F){var j={};for(var U in F)F.hasOwnProperty(U)&&(j[U]=(0,x.escapeQuotes)(F[U],null));return j},O.supports=y;for(var L in y)y.hasOwnProperty(L)&&(O.browserHasFlaw=O.browserHasFlaw||!y[L]&&L)},function(u,d){d.__esModule=!0;var f=!1,m=!1,y=window.document.createElement("div");try{var E="<P><I></P></I>";y.innerHTML=E,d.tagSoup=f=y.innerHTML!==E}catch{d.tagSoup=f=!1}try{y.innerHTML="<P><i><P></P></i></P>",d.selfClose=m=y.childNodes.length===2}catch{d.selfClose=m=!1}y=null,d.tagSoup=f,d.selfClose=m},function(u,d,f){d.__esModule=!0;var m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $};d.comment=A,d.chars=P,d.startTag=R,d.atomicTag=x,d.endTag=M;var y=f(4),E={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i};function A($){var V=$.indexOf("-->");if(V>=0)return new y.CommentToken($.substr(4,V-1),V+3)}function P($){var V=$.indexOf("<");return new y.CharsToken(V>=0?V:$.length)}function R($){var V=$.indexOf(">");if(V!==-1){var B=$.match(E.startTag);if(B){var O=function(){var L={},F={},j=B[2];return B[2].replace(E.attr,function(U,G){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(L[arguments[5]]="",F[arguments[5]]=!0):L[G]=arguments[2]||arguments[3]||arguments[4]||E.fillAttr.test(G)&&G||"":L[G]="",j=j.replace(U,"")}),{v:new y.StartTagToken(B[1],B[0].length,L,F,!!B[3],j.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if((typeof O>"u"?"undefined":m(O))==="object")return O.v}}}function x($){var V=R($);if(V){var B=$.slice(V.length);if(B.match(new RegExp("</\\s*"+V.tagName+"\\s*>","i"))){var O=B.match(new RegExp("([\\s\\S]*?)</\\s*"+V.tagName+"\\s*>","i"));if(O)return new y.AtomicTagToken(V.tagName,O[0].length+V.length,V.attrs,V.booleanAttrs,O[1])}}}function M($){var V=$.match(E.endTag);if(V)return new y.EndTagToken(V[1],V[0].length)}},function(u,d,f){d.__esModule=!0,d.EndTagToken=d.AtomicTagToken=d.StartTagToken=d.TagToken=d.CharsToken=d.CommentToken=d.Token=void 0;var m=f(5);function y(A,P){if(!(A instanceof P))throw new TypeError("Cannot call a class as a function")}d.Token=function A(P,R){y(this,A),this.type=P,this.length=R,this.text=""},d.CommentToken=function(){function A(P,R){y(this,A),this.type="comment",this.length=R||(P?P.length:0),this.text="",this.content=P}return A.prototype.toString=function(){return"<!--"+this.content},A}(),d.CharsToken=function(){function A(P){y(this,A),this.type="chars",this.length=P,this.text=""}return A.prototype.toString=function(){return this.text},A}();var E=d.TagToken=function(){function A(P,R,x,M,$){y(this,A),this.type=P,this.length=x,this.text="",this.tagName=R,this.attrs=M,this.booleanAttrs=$,this.unary=!1,this.html5Unary=!1}return A.formatTag=function(R){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,M="<"+R.tagName;for(var $ in R.attrs)if(R.attrs.hasOwnProperty($)){M+=" "+$;var V=R.attrs[$];(typeof R.booleanAttrs>"u"||typeof R.booleanAttrs[$]>"u")&&(M+='="'+(0,m.escapeQuotes)(V)+'"')}return R.rest&&(M+=" "+R.rest),R.unary&&!R.html5Unary?M+="/>":M+=">",x!=null&&(M+=x+"</"+R.tagName+">"),M},A}();d.StartTagToken=function(){function A(P,R,x,M,$,V){y(this,A),this.type="startTag",this.length=R,this.text="",this.tagName=P,this.attrs=x,this.booleanAttrs=M,this.html5Unary=!1,this.unary=$,this.rest=V}return A.prototype.toString=function(){return E.formatTag(this)},A}(),d.AtomicTagToken=function(){function A(P,R,x,M,$){y(this,A),this.type="atomicTag",this.length=R,this.text="",this.tagName=P,this.attrs=x,this.booleanAttrs=M,this.unary=!1,this.html5Unary=!1,this.content=$}return A.prototype.toString=function(){return E.formatTag(this,this.content)},A}(),d.EndTagToken=function(){function A(P,R){y(this,A),this.type="endTag",this.length=R,this.text="",this.tagName=P}return A.prototype.toString=function(){return"</"+this.tagName+">"},A}()},function(u,d){d.__esModule=!0,d.escapeQuotes=f;function f(m){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return m?m.replace(/([^"]*)"/g,function(E,A){return/\\/.test(A)?A+'"':A+'\\"'}):y}},function(u,d){d.__esModule=!0,d.default=R;var f=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,m=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i;function y(x){return x&&x.type==="startTag"&&(x.unary=f.test(x.tagName)||x.unary,x.html5Unary=!/\/>$/.test(x.text)),x}function E(x,M){var $=x.stream,V=y(M());return x.stream=$,V}function A(x,M){var $=M.pop();x.prepend("</"+$.tagName+">")}function P(){var x=[];return x.last=function(){return this[this.length-1]},x.lastTagNameEq=function(M){var $=this.last();return $&&$.tagName&&$.tagName.toUpperCase()===M.toUpperCase()},x.containsTagName=function(M){for(var $=0,V;V=this[$];$++)if(V.tagName===M)return!0;return!1},x}function R(x,M,$){var V=P(),B={startTag:function(F){var j=F.tagName;j.toUpperCase()==="TR"&&V.lastTagNameEq("TABLE")?(x.prepend("<TBODY>"),O()):M.selfCloseFix&&m.test(j)&&V.containsTagName(j)?V.lastTagNameEq(j)?A(x,V):(x.prepend("</"+F.tagName+">"),O()):F.unary||V.push(F)},endTag:function(F){var j=V.last();j?M.tagSoupFix&&!V.lastTagNameEq(F.tagName)?A(x,V):V.pop():M.tagSoupFix&&($(),O())}};function O(){var L=E(x,$);L&&B[L.type]&&B[L.type](L)}return function(){return O(),y($())}}}])})}
4541,function(a,l){l.__esModule=!0;var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M};l.existy=u,l.isFunction=d,l.each=f,l.eachKey=m,l.defaults=y,l.toArray=E,l.last=A,l.isTag=P,l.isScript=R,l.isStyle=x;function u(M){return M!=null}function d(M){return typeof M=="function"}function f(M,$,V){var B=void 0,O=M&&M.length||0;for(B=0;B<O;B++)$.call(V,M[B],B)}function m(M,$,V){for(var B in M)M.hasOwnProperty(B)&&$.call(V,B,M[B])}function y(M,$){return M=M||{},m($,function(V,B){u(M[V])||(M[V]=B)}),M}function E(M){try{return Array.prototype.slice.call(M)}catch{var $=function(){var B=[];return f(M,function(O){B.push(O)}),{v:B}}();if((typeof $>"u"?"undefined":c($))==="object")return $.v}}function A(M){return M[M.length-1]}function P(M,$){return!M||!(M.type==="startTag"||M.type==="atomicTag")||!("tagName"in M)?!1:!!~M.tagName.toLowerCase().indexOf($)}function R(M){return P(M,"script")}function x(M){return P(M,"style")}}])})}(postscribe$2)),postscribe$2.exports}var postscribeExports=requirePostscribe();const postscribe=getDefaultExportFromCjs(postscribeExports),postscribe_client_QT21k0RUuw=defineNuxtPlugin(()=>({provide:{postscribe}})),affiliateStore=defineStore("affiliate",{state:()=>({visitedUrls:[],isProcessing:!1}),actions:{async pushToAnalytics(o){var r;if(!this.isProcessing){this.isProcessing=!0;try{const a=window.location.href,l=new URL(a).origin+new URL(a).pathname,c=useCookie("referralLink");c.value||(c.value=l);let u;try{const f=await $fetch("/api/user-meta");u=f==null?void 0:f.client_ip}catch{}const d=(r=useStore$1().project)==null?void 0:r.id;if(!d)return;await $fetch(`${useRuntimeConfig().public.apiBase}/api/affiliate-center/programs`,{method:"POST",headers:{"Cache-Control":"no-cache, no-store, max-age=0, must-revalidate",Pragma:"no-cache"},cache:"no-store",body:{link:l,ip:u,ref:o,project_id:d}})}catch(a){console.error(a)}finally{this.isProcessing=!1}}}},persist:{paths:["visitedUrls"]}}),referral_client_JnVASE2uRk=defineNuxtPlugin(()=>{const o=useRoute$1(),r=affiliateStore(),a=o.query.ref||useCookie("referralCode").value;a&&r.pushToAnalytics(String(a))}),resolveFetch$3=o=>o?(...r)=>o(...r):(...r)=>fetch(...r);class FunctionsError extends Error{constructor(r,a="FunctionsError",l){super(r),this.name=a,this.context=l}}class FunctionsFetchError extends FunctionsError{constructor(r){super("Failed to send a request to the Edge Function","FunctionsFetchError",r)}}class FunctionsRelayError extends FunctionsError{constructor(r){super("Relay Error invoking the Edge Function","FunctionsRelayError",r)}}class FunctionsHttpError extends FunctionsError{constructor(r){super("Edge Function returned a non-2xx status code","FunctionsHttpError",r)}}var FunctionRegion;(function(o){o.Any="any",o.ApNortheast1="ap-northeast-1",o.ApNortheast2="ap-northeast-2",o.ApSouth1="ap-south-1",o.ApSoutheast1="ap-southeast-1",o.ApSoutheast2="ap-southeast-2",o.CaCentral1="ca-central-1",o.EuCentral1="eu-central-1",o.EuWest1="eu-west-1",o.EuWest2="eu-west-2",o.EuWest3="eu-west-3",o.SaEast1="sa-east-1",o.UsEast1="us-east-1",o.UsWest1="us-west-1",o.UsWest2="us-west-2"})(FunctionRegion||(FunctionRegion={}));class FunctionsClient{constructor(r,{headers:a={},customFetch:l,region:c=FunctionRegion.Any}={}){this.url=r,this.headers=a,this.region=c,this.fetch=resolveFetch$3(l)}setAuth(r){this.headers.Authorization=`Bearer ${r}`}invoke(r){return __awaiter(this,arguments,void 0,function*(a,l={}){var c;let u,d;try{const{headers:f,method:m,body:y,signal:E,timeout:A}=l;let P={},{region:R}=l;R||(R=this.region);const x=new URL(`${this.url}/${a}`);R&&R!=="any"&&(P["x-region"]=R,x.searchParams.set("forceFunctionRegion",R));let M;y&&(f&&!Object.prototype.hasOwnProperty.call(f,"Content-Type")||!f)?typeof Blob<"u"&&y instanceof Blob||y instanceof ArrayBuffer?(P["Content-Type"]="application/octet-stream",M=y):typeof y=="string"?(P["Content-Type"]="text/plain",M=y):typeof FormData<"u"&&y instanceof FormData?M=y:(P["Content-Type"]="application/json",M=JSON.stringify(y)):y&&typeof y!="str
4541ing"&&!(typeof Blob<"u"&&y instanceof Blob)&&!(y instanceof ArrayBuffer)&&!(typeof FormData<"u"&&y instanceof FormData)?M=JSON.stringify(y):M=y;let $=E;A&&(d=new AbortController,u=setTimeout(()=>d.abort(),A),E?($=d.signal,E.addEventListener("abort",()=>d.abort())):$=d.signal);const V=yield this.fetch(x.toString(),{method:m||"POST",headers:Object.assign(Object.assign(Object.assign({},P),this.headers),f),body:M,signal:$}).catch(F=>{throw new FunctionsFetchError(F)}),B=V.headers.get("x-relay-error");if(B&&B==="true")throw new FunctionsRelayError(V);if(!V.ok)throw new FunctionsHttpError(V);let O=((c=V.headers.get("Content-Type"))!==null&&c!==void 0?c:"text/plain").split(";")[0].trim(),L;return O==="application/json"?L=yield V.json():O==="application/octet-stream"||O==="application/pdf"?L=yield V.blob():O==="text/event-stream"?L=V:O==="multipart/form-data"?L=yield V.formData():L=yield V.text(),{data:L,error:null,response:V}}catch(f){return{data:null,error:f,response:f instanceof FunctionsHttpError||f instanceof FunctionsRelayError?f.context:void 0}}finally{u&&clearTimeout(u)}})}}var PostgrestError=class extends Error{constructor(o){super(o.message),this.name="PostgrestError",this.details=o.details,this.hint=o.hint,this.co
4541de=o.code}},PostgrestBuilder=class{constructor(o){var r,a,l;this.shouldThrowOnError=!1,this.method=o.method,this.url=o.url,this.headers=new Headers(o.headers),this.schema=o.schema,this.body=o.body,this.shouldThrowOnError=(r=o.shouldThrowOnError)!==null&&r!==void 0?r:!1,this.signal=o.signal,this.isMaybeSingle=(a=o.isMaybeSingle)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(l=o.urlLengthLimit)!==null&&l!==void 0?l:8e3,o.fetch?this.fetch=o.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(o,r){return this.headers=new Headers(this.headers),this.headers.set(o,r),this}then(o,r){var a=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const l=this.fetch;let c=l(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async u=>{let d=null,f=null,m=null,y=u.status,E=u.statusText;if(u.ok){var A,P;if(a.method!=="HEAD"){var R;const V=await u.text();V===""||(a.headers.get("Accept")==="text/csv"||a.headers.get("Accept")&&(!((R=a.headers.get("Accept"))===null||R===void 0)&&R.includes("application/vnd.pgrst.plan+text"))?f=V:f=JSON.parse(V))}const M=(A=a.headers.get("Prefer"))===null||A===void 0?void 0:A.match(/count=(exact|planned|estimated)/),$=(P=u.headers.get("content-range"))===null||P===void 0?void 0:P.split("/");M&&$&&$.length>1&&(m=parseInt($[1])),a.isMaybeSingle&&a.method==="GET"&&Array.isArray(f)&&(f.length>1?(d={code:"PGRST116",details:`Results contain ${f.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},f=null,m=null,y=406,E="Not Acceptable"):f.length===1?f=f[0]:f=null)}else{var x;const M=await u.text();try{d=JSON.parse(M),Array.isArray(d)&&u.status===404&&(f=[],d=null,y=200,E="OK")}catch{u.status===404&&M===""?(y=204,E="No Content"):d={message:M}}if(d&&a.isMaybeSingle&&(!(d==null||(x=d.details)===null||x===void 0)&&x.includes("0 rows"))&&(d=null,y=200,E="OK"),d&&a.shouldThrowOnError)throw new PostgrestError(d)}return{error:d,data:f,count:m,status:y,statusText:E}});return this.shouldThrowOnError||(c=c.catch(u=>{var d;let f="",m="",y="";const E=u==null?void 0:u.cause;if(E){var A,P,R,x;const V=(A=E==null?void 0:E.message)!==null&&A!==void 0?A:"",B=(P=E==null?void 0:E.code)!==null&&P!==void 0?P:"";f=`${(R=u==null?void 0:u.name)!==null&&R!==void 0?R:"FetchError"}: ${u==null?void 0:u.message}`,f+=`
4542
4543Caused by: ${(x=E==null?void 0:E.name)!==null&&x!==void 0?x:"Error"}: ${V}`,B&&(f+=` (${B})`),E!=null&&E.stack&&(f+=`
4544${E.stack}`)}else{var M;f=(M=u==null?void 0:u.stack)!==null&&M!==void 0?M:""}const $=this.url.toString().length;return(u==null?void 0:u.name)==="AbortError"||(u==null?void 0:u.code)==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",$>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${$} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((E==null?void 0:E.name)==="HeadersOverflowError"||(E==null?void 0:E.code)==="UND_ERR_HEADERS_OVERFLOW")&&(y="",m="HTTP headers exceeded server limits (typically 16KB)",$>this.urlLengthLimit&&(m+=`. Your request URL is ${$} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(d=u==null?void 0:u.name)!==null&&d!==void 0?d:"FetchError"}: ${u==null?void 0:u.message}`,details:f,hint:m,code:y},data:null,count:null,status:0,statusText:""}})),c.then(o,r)}returns(){return this}overrideTypes(){return this}},PostgrestTransformBuilder=class extends PostgrestBuilder{select(o){let r=!1;const a=(o??"*").split("").map(l=>/\s/.test(l)&&!r?"":(l==='"'&&(r=!r),l)).join("");return this.url.searchParams.set("select",a),this.headers.append("Prefer","return=representation"),this}order(o,{ascending:r=!0,nullsFirst:a,foreignTable:l,referencedTable:c=l}={}){const u=c?`${c}.order`:"order",d=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${d?`${d},`:""}${o}.${r?"asc":"desc"}${a===void 0?"":a?".nullsfirst":".nullslast"}`),this}limit(o,{foreignTable:r,referencedTable:a=r}={}){const l=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${o}`),this}range(o,r,{foreignTable:a,referencedTable:l=a}={}){const c=typeof l>"u"?"offset":`${l}.offset`,u=typeof l>"u"?"limit":`${l}.limit`;return this.url.searchParams.set(c,`${o}`),this.url.searchParams.set(u,`${r-o+1}`),this}abortSignal(o){return this.signal=o,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
4544explain({analyze:o=!1,verbose:r=!1,settings:a=!1,buffers:l=!1,wal:c=!1,format:u="text"}={}){var d;const f=[o?"analyze":null,r?"verbose":null,a?"settings":null,l?"buffers":null,c?"wal":null].filter(Boolean).join("|"),m=(d=this.headers.get("Accept"))!==null&&d!==void 0?d:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${m}"; options=${f};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(o){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${o}`),this}};const PostgrestReservedCharsRegexp=new RegExp("[,()]");var PostgrestFilterBuilder=class extends PostgrestTransformBuilder{eq(o,r){return this.url.searchParams.append(o,`eq.${r}`),this}neq(o,r){return this.url.searchParams.append(o,`neq.${r}`),this}gt(o,r){return this.url.searchParams.append(o,`gt.${r}`),this}gte(o,r){return this.url.searchParams.append(o,`gte.${r}`),this}lt(o,r){return this.url.searchParams.append(o,`lt.${r}`),this}lte(o,r){return this.url.searchParams.append(o,`lte.${r}`),this}like(o,r){return this.url.searchParams.append(o,`like.${r}`),this}likeAllOf(o,r){return this.url.searchParams.append(o,`like(all).{${r.join(",")}}`),this}likeAnyOf(o,r){return this.url.searchParams.append(o,`like(any).{${r.join(",")}}`),this}ilike(o,r){return this.url.searchParams.append(o,`ilike.${r}`),this}ilikeAllOf(o,r){return this.url.searchParams.append(o,`ilike(all).{${r.join(",")}}`),this}ilikeAnyOf(o,r){return this.url.searchParams.append(o,`ilike(any).{${r.join(",")}}`),this}regexMatch(o,r){return this.url.searchParams.append(o,`match.${r}`),this}regexIMatch(o,r){return this.url.searchParams.append(o,`imatch.${r}`),this}is(o,r){return this.url.searchParams.append(o,`is.${r}`),this}isDistinct(o,r){return this.url.searchParams.append(o,`isdistinct.${r}`),this}in(o,r){const a=Array.from(new Set(r)).map(l=>typeof l=="string"&&PostgrestReservedCharsRegexp.test(l)?`"${l}"`:`${l}`).join(",");return this.url.searchParams.append(o,`in.(${a})`),this}notIn(o,r){const a=Array.from(new Set(r)).map(l=>typeof l=="string"&&PostgrestReservedCharsRegexp.test(l)?`"${l}"`:`${l}`).join(",");return this.url.searchParams.append(o,`not.in.(${a})`),this}contains(o,r){return typeof r=="string"?this.url.searchParams.append(o,`cs.${r}`):Array.isArray(r)?this.url.searchParams.append(o,`cs.{${r.join(",")}}`):this.url.searchParams.append(o,`cs.${JSON.stringify(r)}`),this}containedBy(o,r){return typeof r=="string"?this.url.searchParams.append(o,`cd.${r}`):Array.isArray(r)?this.url.searchParams.append(o,`cd.{${r.join(",")}}`):this.url.searchParams.append(o,`cd.${JSON.stringify(r)}`),this}rangeGt(o,r){return this.url.searchParams.append(o,`sr.${r}`),this}rangeGte(o,r){return this.url.searchParams.append(o,`nxl.${r}`),this}rangeLt(o,r){return this.url.searchParams.append(o,`sl.${r}`),this}rangeLte(o,r){return this.url.searchParams.append(o,`nxr.${r}`),this}rangeAdjacent(o,r){return this.url.searchParams.append(o,`adj.${r}`),this}overlaps(o,r){return typeof r=="string"?this.url.searchParams.append(o,`ov.${r}`):this.url.searchParams.append(o,`ov.{${r.join(",")}}`),this}textSearch(o,r,{config:a,type:l}={}){let c="";l==="plain"?c="pl":l==="phrase"?c="ph":l==="websearch"&&(c="w");const u=a===void 0?"":`(${a})`;return this.url.searchParams.append(o,`${c}fts${u}.${r}`),this}match(o){return Object.entries(o).forEach(([r,a])=>{this.url.searchParams.append(r,`eq.${a}`)}),this}not(o,r,a){return this.url.searchParams.append(o,`not.${r}.${a}`),this}or(o,{foreignTable:r,referencedTable:a=r}={}){const l=a?`${a}.or`:"or";return this.url.searchParams.append(l,`(${o})`),this}filter(o,r,a){return this.url.searchParams.append(o,`${r}.${a}`),this}},PostgrestQueryBuilder=class{constructor(o,{headers:r={},schema:a,fetch:l,urlLengthLimit:c=8e3}){this.url=o,this.headers=new Headers(r),this.schema=a,this.fetch=l,this.urlLengthLimit=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(o,r){const{head:a=!1,count:l}=r??{},c=a?"HEAD":"GET";let u=!1;const d=(o??"*").split("").map(y=>/\s/.test(y)&&!u?"":(y==='"'&&(u=!u),y)).join(""),{url:f,headers:m}=this.cloneRequestState();return f.searchParams.set("select",d),l&&m.append("Prefer",`count=${l}`),new PostgrestFilterBuilder({method:c,url:f,headers:m,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(o,{count:r,defaultToNull:a=!0}={}){var l;const c="POST",{url:u,headers:d}=this.cloneRequestState();if(r&&d.append("Prefer",`count=${r}`),a||d.append("Prefer","missing=default"),Array.isArray(o)){const f=o.reduce((m,y)=>m.concat(Object.keys(y)),[]);if(f.length>0){const m=[...new Set(f)].map(y=>`"${y}"`);u.searchParams.set("columns",m.join(","))}}return new PostgrestFilterBuilder({method:c,url:u,headers:d,schema:this.schema,body:o,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(o,{onConflict:r,ignoreDuplicates:a=!1,count:l,defaultToNull:c=!0}={}){var u;const d="POST",{url:f,headers:m}=this.cloneRequestState();if(m.append("Prefer",`resolution=${a?"ignore":"merge"}-duplicates`),r!==void 0&&f.searchParams.set("on_conflict",r),l&&m.append("Prefer",`count=${l}`),c||m.append("Prefer","missing=default"),Array.isArray(o)){const y=o.reduce((E,A)=>E.concat(Object.keys(A)),[]);if(y.length>0){const E=[...new Set(y)].map(A=>`"${A}"`);f.searchParams.set("columns",E.join(","))}}return new PostgrestFilterBuilder({method:d,url:f,headers:m,schema:this.schema,body:o,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit})}update(o,{count:r}={}){var a;const l="PATCH",{url:c,headers:u}=this.cloneRequestState();return r&&u.append("Prefer",`count=${r}`),new PostgrestFilterBuilder({method:l,url:c,headers:u,schema:this.schema,body:o,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:o}={}){var r;const a="DELETE",{url:l,headers:c}=this.cloneRequestState();return o&&c.append("Prefer",`count=${o}`),new PostgrestFilterBuilder({method:a,url:l,headers:c,schema:this.schema,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}};function _typeof$2(o){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$2(o)}function toPrimitive$2(o,r){if(_typeof$2(o)!="object"||!o)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var l=a.call(o,r);if(_typeof$2(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(o)}function toPropertyKey$2(o){var r=toPrimitive$2(o,"string");return _typeof$2(r)=="symbol"?r:r+""}function _defineProperty$2(o,r,a){return(r=toPropertyKey$2(r))in o?Object.defineProperty(o,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[r]=a,o}function ownKeys$2(o,r){var a=Object.keys(o);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);r&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(o,c).enumerable})),a.push.apply(a,l)}return a}function _objectSpread2$2(o){for(var r=1;r<arguments.length;r++){var a=arguments[r]!=null?arguments[r]:{};
4544r%2?ownKeys$2(Object(a),!0).forEach(function(l){_defineProperty$2(o,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(a)):ownKeys$2(Object(a)).forEach(function(l){Object.defineProperty(o,l,Object.getOwnPropertyDescriptor(a,l))})}return o}var PostgrestClient=class Bc{constructor(r,{headers:a={},schema:l,fetch:c,timeout:u,urlLengthLimit:d=8e3}={}){this.url=r,this.headers=new Headers(a),this.schemaName=l,this.urlLengthLimit=d;const f=c??globalThis.fetch;u!==void 0&&u>0?this.fetch=(m,y)=>{const E=new AbortController,A=setTimeout(()=>E.abort(),u),P=y==null?void 0:y.signal;if(P){if(P.aborted)return clearTimeout(A),f(m,y);const R=()=>{clearTimeout(A),E.abort()};return P.addEventListener("abort",R,{once:!0}),f(m,_objectSpread2$2(_objectSpread2$2({},y),{},{signal:E.signal})).finally(()=>{clearTimeout(A),P.removeEventListener("abort",R)})}return f(m,_objectSpread2$2(_objectSpread2$2({},y),{},{signal:E.signal})).finally(()=>clearTimeout(A))}:this.fetch=f}from(r){if(!r||typeof r!="string"||r.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new PostgrestQueryBuilder(new URL(`${this.url}/${r}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(r){return new Bc(this.url,{headers:this.headers,schema:r,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(r,a={},{head:l=!1,get:c=!1,count:u}={}){var d;let f;const m=new URL(`${this.url}/rpc/${r}`);let y;const E=R=>R!==null&&typeof R=="object"&&(!Array.isArray(R)||R.some(E)),A=l&&Object.values(a).some(E);A?(f="POST",y=a):l||c?(f=l?"HEAD":"GET",Object.entries(a).filter(([R,x])=>x!==void 0).map(([R,x])=>[R,Array.isArray(x)?`{${x.join(",")}}`:`${x}`]).forEach(([R,x])=>{m.searchParams.append(R,x)})):(f="POST",y=a);const P=new Headers(this.headers);return A?P.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&P.set("Prefer",`count=${u}`),new PostgrestFilterBuilder({method:f,url:m,headers:P,schema:this.schemaName,body:y,fetch:(d=this.fetch)!==null&&d!==void 0?d:fetch,urlLengthLimit:this.urlLengthLimit})}};class WebSocketFactory{constructor(){}static detectEnvironment(){var r;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((r=navigator.userAgent)===null||r===void 0)&&r.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const a=globalThis.process;if(a){const l=a.versions;if(l&&l.node){const c=l.node,u=parseInt(c.replace(/^v/,"").split(".")[0]);return u>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${u} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${u} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
4545import ws from "ws"
4546new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const r=this.detectEnvironment();if(r.constructor)return r.constructor;let a=r.error||"WebSocket not supported in this environment.";throw r.workaround&&(a+=`
4547
4548Suggested solution: ${r.workaround}`),new Error(a)}static createWebSocket(r,a){const l=this.getWebSocketConstructor();return new l(r,a)}static isWebSocketSupported(){try{const r=this.detectEnvironment();return r.type==="native"||r.type==="ws"}catch{return!1}}}const version$3="2.99.0",DEFAULT_VERSION=`realtime-js/${version$3}`,VSN_1_0_0="1.0.0",VSN_2_0_0="2.0.0",DEFAULT_VSN=VSN_2_0_0,DEFAULT_TIMEOUT=1e4,WS_CLOSE_NORMAL=1e3,MAX_PUSH_BUFFER_SIZE=100;var SOCKET_STATES;(function(o){o[o.connecting=0]="connecting",o[o.open=1]="open",o[o.closing=2]="closing",o[o.closed=3]="closed"})(SOCKET_STATES||(SOCKET_STATES={}));var CHANNEL_STATES;(function(o){o.closed="closed",o.errored="errored",o.joined="joined",o.joining="joining",o.leav
4548ing="leaving"})(CHANNEL_STATES||(CHANNEL_STATES={}));var CHANNEL_EVENTS;(function(o){o.close="phx_close",o.error="phx_error",o.join="phx_join",o.reply="phx_reply",o.leave="phx_leave",o.access_token="access_token"})(CHANNEL_EVENTS||(CHANNEL_EVENTS={}));var TRANSPORTS;(function(o){o.websocket="websocket"})(TRANSPORTS||(TRANSPORTS={}));var CONNECTION_STATE;(function(o){o.Connecting="connecting",o.Open="open",o.Closing="closing",o.Closed="closed"})(CONNECTION_STATE||(CONNECTION_STATE={}));class Serializer{constructor(r){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=r??[]}encode(r,a){if(r.event===this.BROADCAST_EVENT&&!(r.payload instanceof ArrayBuffer)&&typeof r.payload.event=="string")return a(this._binaryEncodeUserBroadcastPush(r));let l=[r.join_ref,r.ref,r.topic,r.event,r.payload];return a(JSON.stringify(l))}_binaryEncodeUserBroadcastPush(r){var a;return this._isArrayBuffer((a=r.payload)===null||a===void 0?void 0:a.payload)?this._encodeBinaryUserBroadcastPush(r):this._encodeJsonUserBroadcastPush(r)}_encodeBinaryUserBroadcastPush(r){var a,l;const c=(l=(a=r.payload)===null||a===void 0?void 0:a.payload)!==null&&l!==void 0?l:new ArrayBuffer(0);return this._encodeUserBroadcastPush(r,this.BINARY_ENCODING,c)}_encodeJsonUserBroadcastPush(r){var a,l;const c=(l=(a=r.payload)===null||a===void 0?void 0:a.payload)!==null&&l!==void 0?l:{},d=new TextEncoder().encode(JSON.stringify(c)).buffer;return this._encodeUserBroadcastPush(r,this.JSON_ENCODING,d)}_encodeUserBroadcastPush(r,a,l){var c,u;const d=r.topic,f=(c=r.ref)!==null&&c!==void 0?c:"",m=(u=r.join_ref)!==null&&u!==void 0?u:"",y=r.payload.event,E=this.allowedMetadataKeys?this._pick(r.payload,this.allowedMetadataKeys):{},A=Object.keys(E).length===0?"":JSON.stringify(E);if(m.length>255)throw new Error(`joinRef length ${m.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`ref length ${f.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`topic length ${d.length} exceeds maximum of 255`);if(y.length>255)throw new Error(`userEvent length ${y.length} exceeds maximum of 255`);if(A.length>255)throw new Error(`metadata length ${A.length} exceeds maximum of 255`);const P=this.USER_BROADCAST_PUSH_META_LENGTH+m.length+f.length+d.length+y.length+A.length,R=new ArrayBuffer(this.HEADER_LENGTH+P);let x=new DataView(R),M=0;x.setUint8(M++,this.KINDS.userBroadcastPush),x.setUint8(M++,m.length),x.setUint8(M++,f.length),x.setUint8(M++,d.length),x.setUint8(M++,y.length),x.setUint8(M++,A.length),x.setUint8(M++,a),Array.from(m,V=>x.setUint8(M++,V.charCodeAt(0))),Array.from(f,V=>x.setUint8(M++,V.charCodeAt(0))),Array.from(d,V=>x.setUint8(M++,V.charCodeAt(0))),Array.from(y,V=>x.setUint8(M++,V.charCodeAt(0))),Array.from(A,V=>x.setUint8(M++,V.charCodeAt(0)));var $=new Uint8Array(R.byteLength+l.byteLength);return $.set(new Uint8Array(R),0),$.set(new Uint8Array(l),R.byteLength),$.buffer}decode(r,a){if(this._isArrayBuffer(r)){let l=this._binaryDecode(r);return a(l)}if(typeof r=="string"){const l=JSON.parse(r),[c,u,d,f,m]=l;return a({join_ref:c,ref:u,topic:d,event:f,payload:m})}return a({})}_binaryDecode(r){const a=new DataView(r),l=a.getUint8(0),c=new TextDecoder;switch(l){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(r,a,c)}}_decodeUserBroadcast(r,a,l){const c=a.getUint8(1),u=a.getUint8(2),d=a.getUint8(3),f=a.getUint8(4);let m=this.HEADER_LENGTH+4;const y=l.decode(r.slice(m,m+c));m=m+c;const E=l.decode(r.slice(m,m+u));m=m+u;const A=l.decode(r.slice(m,m+d));m=m+d;const P=r.slice(m,r.byteLength),R=f===this.JSON_ENCODING?JSON.parse(l.decode(P)):P,x={type:this.BROADCAST_EVENT,event:E,payload:R};return d>0&&(x.meta=JSON.parse(A)),{join_ref:null,ref:null,topic:y,event:this.BROADCAST_EVENT,payload:x}}_isArrayBuffer(r){var a;return r instanceof ArrayBuffer||((a=r==null?void 0:r.constructor)===null||a===void 0?void 0:a.name)==="ArrayBuffer"}_pick(r,a){return!r||typeof r!="object"?{}:Object.fromEntries(Object.entries(r).filter(([l])=>a.includes(l)))}}class Timer{constructor(r,a){this.callback=r,this.timerCalc=a,this.timer=void 0,this.tries=0,this.callback=r,this.timerCalc=a}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var PostgresTypes;(function(o){o.abstime="abstime",o.bool="bool",o.date="date",o.daterange="daterange",o.float4="float4",o.float8="float8",o.int2="int2",o.int4="int4",o.int4range="int4range",o.int8="int8",o.int8range="int8range",o.json="json",o.jsonb="jsonb",o.money="money",o.numeric="numeric",o.oid="oid",o.reltime="reltime",o.text="text",o.time="time",o.timestamp="timestamp",o.timestamptz="timestamptz",o.timetz="timetz",o.tsrange="tsrange",o.tstzrange="tstzrange"}
4548)(PostgresTypes||(PostgresTypes={}));const convertChangeData=(o,r,a={})=>{var l;const c=(l=a.skipTypes)!==null&&l!==void 0?l:[];return r?Object.keys(r).reduce((u,d)=>(u[d]=convertColumn(d,o,r,c),u),{}):{}},convertColumn=(o,r,a,l)=>{const c=r.find(f=>f.name===o),u=c==null?void 0:c.type,d=a[o];return u&&!l.includes(u)?convertCell(u,d):noop$1(d)},convertCell=(o,r)=>{if(o.charAt(0)==="_"){const a=o.slice(1,o.length);return toArray(r,a)}switch(o){case PostgresTypes.bool:return toBoolean(r);case PostgresTypes.float4:case PostgresTypes.float8:case PostgresTypes.int2:case PostgresTypes.int4:case PostgresTypes.int8:case PostgresTypes.numeric:case PostgresTypes.oid:return toNumber(r);case PostgresTypes.json:case PostgresTypes.jsonb:return toJson(r);case PostgresTypes.timestamp:return toTimestampString(r);case PostgresTypes.abstime:case PostgresTypes.date:case PostgresTypes.daterange:case PostgresTypes.int4range:case PostgresTypes.int8range:case PostgresTypes.money:case PostgresTypes.reltime:case PostgresTypes.text:case PostgresTypes.time:case PostgresTypes.timestamptz:case PostgresTypes.timetz:case PostgresTypes.tsrange:case PostgresTypes.tstzrange:return noop$1(r);default:return noop$1(r)}},noop$1=o=>o,toBoolean=o=>{switch(o){case"t":return!0;case"f":return!1;default:return o}},toNumber=o=>{if(typeof o=="string"){const r=parseFloat(o);if(!Number.isNaN(r))return r}return o},toJson=o=>{if(typeof o=="string")try{return JSON.parse(o)}catch{return o}return o},toArray=(o,r)=>
vendor: 8,042 bytes, line 4548
4548{if(typeof o!="string")return o;const a=o.length-1,l=o[a];if(o[0]==="{"&&l==="}"){let u;const d=o.slice(1,a);try{u=JSON.parse("["+d+"]")}catch{u=d?d.split(","):[]}return u.map(f=>convertCell(r,f))}return o},toTimestampString=o=>typeof o=="string"?o.replace(" ","T"):o,httpEndpointURL=o=>{const r=new URL(o);return r.protocol=r.protocol.replace(/^ws/i,"http"),r.pathname=r.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),r.pathname===""||r.pathname==="/"?r.pathname="/api/broadcast":r.pathname=r.pathname+"/api/broadcast",r.href};class Push{constructor(r,a,l={},c=DEFAULT_TIMEOUT){this.channel=r,this.event=a,this.payload=l,this.timeout=c,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(r){this.timeout=r,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(r){this.payload=Object.assign(Object.assign({},this.payload),r)}receive(r,a){var l;return this._hasReceived(r)&&a((l=this.receivedResp)===null||l===void 0?void 0:l.response),this.recHooks.push({status:r,callback:a}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const r=a=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=a,this._matchReceive(a)};this.channel._on(this.refEvent,{},r),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(r,a){this.refEvent&&this.channel._trigger(this.refEvent,{status:r,response:a})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:r,response:a}){this.recHooks.filter(l=>l.status===r).forEach(l=>l.callback(a))}_hasReceived(r){return this.receivedResp&&this.receivedResp.status===r}}var REALTIME_PRESENCE_LISTEN_EVENTS;(function(o){o.SYNC="sync",o.JOIN="join",o.LEAVE="leave"})(REALTIME_PRESENCE_LISTEN_EVENTS||(REALTIME_PRESENCE_LISTEN_EVENTS={}));class RealtimePresence{constructor(r,a){this.channel=r,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const l=(a==null?void 0:a.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(l.state,{},c=>{const{onJoin:u,onLeave:d,onSync:f}=this.caller;this.joinRef=this.channel._joinRef(),this.state=RealtimePresence.syncState(this.state,c,u,d),this.pendingDiffs.forEach(m=>{this.state=RealtimePresence.syncDiff(this.state,m,u,d)}),this.pendingDiffs=[],f()}),this.channel._on(l.diff,{},c=>{const{onJoin:u,onLeave:d,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(c):(this.state=RealtimePresence.syncDiff(this.state,c,u,d),f())}),this.onJoin((c,u,d)=>{this.channel._trigger("presence",{event:"join",key:c,currentPresences:u,newPresences:d})}),this.onLeave((c,u,d)=>{this.channel._trigger("presence",{event:"leave",key:c,currentPresences:u,leftPresences:d})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(r,a,l,c){const u=this.cloneDeep(r),d=this.transformState(a),f={},m={};return this.map(u,(y,E)=>{d[y]||(m[y]=E)}),this.map(d,(y,E)=>{const A=u[y];if(A){const P=E.map($=>$.presence_ref),R=A.map($=>$.presence_ref),x=E.filter($=>R.indexOf($.presence_ref)<0),M=A.filter($=>P.indexOf($.presence_ref)<0);x.length>0&&(f[y]=x),M.length>0&&(m[y]=M)}else f[y]=E}),this.syncDiff(u,{joins:f,leaves:m},l,c)}static syncDiff(r,a,l,c){const{joins:u,leaves:d}={joins:this.transformState(a.joins),leaves:this.transformState(a.leaves)};return l||(l=()=>{}),c||(c=()=>{}),this.map(u,(f,m)=>{var y;const E=(y=r[f])!==null&&y!==void 0?y:[];if(r[f]=this.cloneDeep(m),E.length>0){const A=r[f].map(R=>R.presence_ref),P=E.filter(R=>A.indexOf(R.presence_ref)<0);r[f].unshift(...P)}l(f,E,m)}),this.map(d,(f,m)=>{let y=r[f];if(!y)return;const E=m.map(A=>A.presence_ref);y=y.filter(A=>E.indexOf(A.presence_ref)<0),r[f]=y,c(f,y,m),y.length===0&&delete r[f]}),r}static map(r,a){return Object.getOwnPropertyNames(r).map(l=>a(l,r[l]))}static transformState(r){return r=this.cloneDeep(r),Object.getOwnPropertyNames(r).reduce((a,l)=>{const c=r[l];return"metas"in c?a[l]=c.metas.map(u=>(u.presence_ref=u.phx_ref,delete u.phx_ref,delete u.phx_ref_prev,u)):a[l]=c,a},{})}static cloneDeep(r){return JSON.parse(JSON.stringify(r))}onJoin(r){this.caller.onJoin=r}onLeave(r){this.caller.onLeave=r}onSync(r){this.caller.onSync=r}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var REALTIME_POSTGRES_CHANGES_LISTEN_EVENT;(function(o){o.ALL="*",o.INSERT="INSERT",o.UPDATE="UPDATE",o.DELETE="DELETE"})(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT||(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT={}));var REALTIME_LISTEN_TYPES;(function(o){o.BROADCAST="broadcast",o.PRESENCE="presence",o.POSTGRES_CHANGES="postgres_changes",o.SYSTEM="system"})(REALTIME_LISTEN_TYPES||(REALTIME_LISTEN_TYPES={}));var REALTIME_SUBSCRIBE_STATES;(function(o){o.SUBSCRIBED="SUBSCRIBED",o.TIMED_OUT="TIMED_OUT",o.CLOSED="CLOSED",o.CHANNEL_ERROR="CHANNEL_ERROR"})(REALTIME_SUBSCRIBE_STATES||(REALTIME_SUBSCRIBE_STATES={}));class RealtimeChannel{constructor(r,a={config:{}},l){var c,u;if(this.topic=r,this.params=a,this.socket=l,this.bindings={},this.state=CHANNEL_STATES.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=r.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},a.config),this.timeout=this.socket.timeout,this.joinPush=new Push(this,CHANNEL_EVENTS.join,this.params,this.timeout),this.rejoinTimer=new Timer(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=CHANNEL_STATES.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(d=>d.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=CHANNEL_STATES.closed,this.socket._remove(this)}),this._onError(d=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,d),this.state=CHANNEL_STATES.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=CHANNEL_STATES.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",d=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,d),this.state=CHANNEL_STATES.errored,this.rejoinTimer.scheduleTimeout())}),this._on(CHANNEL_EVENTS.reply,{},(d,f)=>{this._trigger(this._replyEventName(f),d)}),this.presence=new RealtimePresence(this),this.broadcastEndpointURL=httpEndpointURL(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((u=(c=this.params.config)===null||c===void 0?void 0:c.broadcast)===null||u===void 0)&&u.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(r,a=this.timeout){var l,c,u;if(this.socket.isConnected()||this.socket.connect(),this.state==CHANNEL_STATES.closed){const{config:{broadcast:d,presence:f,private:m}}=this.params,y=(c=(l=this.bindings.postgres_changes)===null||l===void 0?void 0:l.map(R=>R.filter))!==null&&c!==void 0?c:[],E=!!this.bindings[REALTIME_LISTEN_TYPES.PRESENCE]&&this.bindings[REALTIME_LISTEN_TYPES.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,A={},P={broadcast:d,presence:Object.assign(Object.assign({},f),{enabled:E}),postgres_changes:y,private:m};this.socket.accessTokenValue&&(A.access_token=this.socket.accessTokenValue),this._onError(R=>
4548r==null?void 0:r(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR,R)),this._onClose(()=>r==null?void 0:r(REALTIME_SUBSCRIBE_STATES.CLOSED)),this.updateJoinPayload(Object.assign({config:P},A)),this.joinedOnce=!0,this._rejoin(a),this.joinPush.receive("ok",async({postgres_changes:R})=>{var x;if(this.socket._isManualToken()||this.socket.setAuth(),R===void 0){r==null||r(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);return}else{const M=this.bindings.postgres_changes,$=(x=M==null?void 0:M.length)!==null&&x!==void 0?x:0,V=[];for(let B=0;B<$;B++){const O=M[B],{filter:{event:L,schema:F,table:j,filter:U}}=O,G=R&&R[B];if(G&&G.event===L&&RealtimeChannel.isFilterValueEqual(G.schema,F)&&RealtimeChannel.isFilterValueEqual(G.table,j)&&RealtimeChannel.isFilterValueEqual(G.filter,U))V.push(Object.assign(Object.assign({},O),{id:G.id}));else{this.unsubscribe(),this.state=CHANNEL_STATES.errored,r==null||r(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=V,r&&r(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);return}}).receive("error",R=>{this.state=CHANNEL_STATES.errored,r==null||r(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(R).join(", ")||"error")))}).receive("timeout",()=>{r==null||r(REALTIME_SUBSCRIBE_STATES.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(r,a={}){return await this.send({type:"presence",event:"track",payload:r},a.timeout||this.timeout)}async untrack(r={}){return await this.send({type:"presence",event:"untrack"},r)}on(r,a,l){return this.state===CHANNEL_STATES.joined&&r===REALTIME_LISTEN_TYPES.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(r,a,l)}async httpSend(r,a,l={}){var c;if(a==null)return Promise.reject("Payload is required for httpSend()");const u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const d={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:r,payload:a,private:this.private}]})},f=await this._fetchWithTimeout(this.broadcastEndpointURL,d,(c=l.timeout)!==null&&c!==void 0?c:this.timeout);if(f.status===202)return{success:!0};let m=f.statusText;try{const y=await f.json();m=y.error||y.message||m}catch{}return Promise.reject(new Error(m))}async send(r,a={}){var l,c;if(!this._canPush()&&r.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
4548in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:d}=r,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const m={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:d,private:this.private}]})};try{const y=await this._fetchWithTimeout(this.broadcastEndpointURL,m,(l=a.timeout)!==null&&l!==void 0?l:this.timeout);return await((c=y.body)===null||c===void 0?void 0:c.cancel()),y.ok?"ok":"error"}catch(y){return y.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var d,f,m;const y=this._push(r.type,r,a.timeout||this.timeout);r.type==="broadcast"&&!(!((m=(f=(d=this.params)===null||d===void 0?void 0:d.config)===null||f===void 0?void 0:f.broadcast)===null||m===void 0)&&m.ack)&&u("ok"),y.receive("ok",()=>u("ok")),y.receive("error",()=>u("error")),y.receive("timeout",()=>u("timed out"))})}updateJoinPayload(r){this.joinPush.updatePayload(r)}unsubscribe(r=this.timeout){this.state=CHANNEL_STATES.leaving;const a=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(CHANNEL_EVENTS.close,"leave",this._joinRef())};this.joinPush.destroy();let l=null;return new Promise(c=>{l=new Push(this,CHANNEL_EVENTS.leave,{},r),l.receive("ok",()=>{a(),c("ok")}).receive("timeout",()=>{a(),c("timed out")}).receive("error",()=>{c("error")}),l.send(),this._canPush()||l.trigger("ok",{})}).finally(()=>{l==null||l.destroy()})}teardown(){this.pushBuffer.forEach(r=>r.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=CHANNEL_STATES.closed,this.bindings={}}async _fetchWithTimeout(r,a,l){const c=new AbortController,u=setTimeout(()=>c.abort(),l),d=await this.socket.fetch(r,Object.assign(Object.assign({},a),{signal:c.signal}));return clearTimeout(u),d}_push(r,a,l=this.timeout){if(!this.joinedOnce)throw`tried to push '${r}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let c=new Push(this,r,a,l);return this._canPush()?c.send():this._addToPushBuffer(c),c}_addToPushBuffer(r){if(r.startTimeout(),this.pushBuffer.push(r),this.pushBuffer.length>MAX_PUSH_BUFFER_SIZE){const a=this.pushBuffer.shift();a&&(a.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload))}}_onMessage(r,a,l){return a}_isMember(r){return this.topic===r}_joinRef(){return this.joinPush.ref}_trigger(r,a,l){var c,u;const d=r.toLocaleLowerCase(),{close:f,error:m,leave:y,join:E}=CHANNEL_EVENTS;if(l&&[f,m,y,E].indexOf(d)>=0&&l!==this._joinRef())return;let P=this._onMessage(d,a,l);if(a&&!P)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(d)?(c=this.bindings.postgres_changes)===null||c===void 0||c.filter(R=>{var x,M,$;return((x=R.filter)===null||x===void 0?void 0:x.event)==="*"||(($=(M=R.filter)===null||M===void 0?void 0:M.event)===null||$===void 0?void 0:$.toLocaleLowerCase())===d}).map(R=>R.callback(P,l)):(u=this.bindings[d])===null||u===void 0||u.filter(R=>{var x,M,$,V,B,O;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in R){const L=R.id,F=(x=R.filter)===null||x===void 0?void 0:x.event;return L&&((M=a.ids)===null||M===void 0?void 0:M.includes(L))&&(F==="*"||(F==null?void 0:F.toLocaleLowerCase())===(($=a.data)===null||$===void 0?void 0:$.type.toLocaleLowerCase()))}else{const L=(B=(V=R==null?void 0:R.filter)===null||V===void 0?void 0:V.event)===null||B===void 0?void 0:B.toLocaleLowerCase();return L==="*"||L===((O=a==null?void 0:a.event)===null||O===void 0?void 0:O.toLocaleLowerCase())}else return R.type.toLocaleLowerCase()===d}).map(R=>{if(typeof P=="object"&&"ids"in P){const x=P.data,{schema:M,table:$,commit_timestamp:V,type:B,errors:O}=x;P=Object.assign(Object.assign({},{schema:M,table:$,commit_timestamp:V,eventType:B,new:{},old:{},errors:O}),this._getPayloadRecords(x))}R.callback(P,l)})}_isClosed(){return this.state===CHANNEL_STATES.closed}_isJoined(){return this.state===CHANNEL_STATES.joined}_isJoining(){return this.state===CHANNEL_STATES.joining}_isLeaving(){return this.state===CHANNEL_STATES.leaving}_replyEventName(r){return`chan_reply_${r}`}_on(r,a,l){const c=r.toLocaleLowerCase(),u={type:c,filter:a,callback:l};return this.bindings[c]?this.bindings[c].push(u):this.bindings[c]=[u],this}_off(r,a){const l=r.toLocaleLowerCase();return this.bindings[l]&&(this.bindings[l]=this.bindings[l].filter(c=>{var u;return!(((u=c.type)===null||u===void 0?void 0:u.toLocaleLowerCase())===l&&RealtimeChannel.isEqual(c.filter,a))})),this}static isEqual(r,a){if(Object.keys(r).length!==Object.keys(a).length)return!1;for(const l in r)if(r[l]!==a[l])return!1;return!0}static isFilterValueEqual(r,a){return(r??void 0)===(a??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(r){this._on(CHANNEL_EVENTS.close,{},r)}_onError(r){this._on(CHANNEL_EVENTS.error,{},a=>r(a))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(r=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=CHANNEL_STATES.joining,this.joinPush.resend(r))}_getPayloadRecords(r){const a={new:{},old:{}};return(r.type==="INSERT"||r.type==="UPDATE")&&(a.new=convertChangeData(r.columns,r.record)),(r.type==="UPDATE"||r.type==="DELETE")&&(a.old=convertChangeData(r.columns,r.old_record)),a}}const noop=()=>{},CONNECTION_TIMEOUTS={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},RECONNECT_INTERVALS=[1e3,2e3,5e3,1e4],DEFAULT_RECONNECT_FALLBACK=1e4,WORKER_SCRIPT=`
4549  addEventListener("message", (e) => {
4550    if (e.data.event === "start") {
4551      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
4552    }
4553  });`;class RealtimeClient{constructor(r,a){var l;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=DEFAULT_TIMEOUT,this.transport=null,this.heartbeatIntervalMs=CONNECTION_TIMEOUTS.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=noop,this.ref=0,this.reconnectTimer=null,this.vsn=DEFAULT_
4553VSN,this.logger=noop,this.conn=null,this.sendBuffer=[],this.serializer=new Serializer,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((l=a==null?void 0:a.params)===null||l===void 0)&&l.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=a.params.apikey,this.endPoint=`${r}/${TRANSPORTS.websocket}`,this.httpEndpoint=httpEndpointURL(r),this._initializeOptions(a),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(a==null?void 0:a.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=WebSocketFactory.createWebSocket(this.endpointURL())}catch(r){this._setConnectionState("disconnected");const a=r.message;throw a.includes("Node.js")?new Error(`${a}
4554
4555To use Realtime in Node.js, you need to provide a WebSocket implementation:
4556
4557Option 1: Use Node.js 22+ which has native WebSocket support
4558Option 2: Install and provide the "ws" package:
4559
4560  npm install ws
4561
4562  import ws from "ws"
4563  const client = new RealtimeClient(url, {
4564    ...options,
4565    transport: ws
4566  })`):new Error(`WebSocket not available: ${a}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(r,a){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const l=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(l),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(r?this.conn.close(r,a??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(r){const a=await r.unsubscribe();return this.channels.length===0&&this.disconnect(),a}async removeAllChannels(){const r=await Promise.all(this.channels.map(a=>a.unsubscribe()));return this.channels=[],this.disconnect(),r}log(r,a,l){this.logger(r,a,l)}connectionState(){switch(this.conn&&this.conn.readyState){case SOCKET_STATES.connecting:return CONNECTION_STATE.Connecting;case SOCKET_STATES.open:return CONNECTION_STATE.Open;case SOCKET_STATES.closing:return CONNECTION_STATE.Closing;default:return CONNECTION_STATE.Closed}}isConnected(){return this.connectionState()===CONNECTION_STATE.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(r,a={config:{}}){const l=`realtime:${r}`,c=this.getChannels().find(u=>u.topic===l);if(c)return c;{const u=new RealtimeChannel(`realtime:${r}`,a,this);return this.channels.push(u),u}}push(r){const{topic:a,event:l,payload:c,ref:u}=r,d=()=>{this.encode(r,f=>{var m;(m=this.conn)===null||m===void 0||m.send(f)})};this.log("push",`${a} ${l} (${u})`,c),this.isConnected()?d():this.sendBuffer.push(d)}async setAuth(r=null){this._authPromise=this._performAuth(r);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var r;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(a){this.log("error","error in heartbeat callback",a)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(a){this.log("error","error in heartbeat callback",a)}this._wasManualDisconnect=!1,(r=this.conn)===null||r===void 0||r.close(WS_CLOSE_NORMAL,"heartbeat timeout"),setTimeout(()=>{var a;this.isConnected()||(a=this.reconnectTimer)===null||a===void 0||a.scheduleTimeout()},CONNECTION_TIMEOUTS.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(a){this.log("error","error in heartbeat callback",a)}this._setAuthSafely("heartbeat")}onHeartbeat(r){this.heartbeatCallback=r}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(r=>r()),this.sendBuffer=[])}_makeRef(){let r=this.ref+1;return r===this.ref?this.ref=0:this.ref=r,this.ref.toString()}_leaveOpenTopic(r){let a=this.channels.find(l=>l.topic===r&&(l._isJoined()||l._isJoining()));a&&(this.log("transport",`leaving duplicate topic "${r}"`),a.unsubscribe())}_remove(r){this.channels=this.channels.filter(a=>a.topic!==r.topic)}_onConnMessage(r){this.decode(r.data,a=>{if(a.topic==="phoenix"&&a.event==="phx_reply"&&a.ref&&a.ref===this.pendingHeartbeatRef){const y=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(a.payload.status==="ok"?"ok":"error",y)}catch(E){this.log("error","error in heartbeat callback",E)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:l,event:c,payload:u,ref:d}=a,f=d?`(${d})`:"",m=u.status||"";this.log("receive",`${m} ${l} ${c} ${f}`.trim(),u),this.channels.filter(y=>
4566y._isMember(l)).forEach(y=>y._trigger(c,u,d)),this._triggerStateCallbacks("message",a)})}_clearTimer(r){var a;r==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):r==="reconnect"&&((a=this.reconnectTimer)===null||a===void 0||a.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=r=>this._onConnError(r),this.conn.onmessage=r=>this._onConnMessage(r),this.conn.onclose=r=>this._onConnClose(r),this.conn.readyState===SOCKET_STATES.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===SOCKET_STATES.open||this.conn.readyState===SOCKET_STATES.connecting)try{this.conn.close()}catch(r){this.log("error","Error closing connection",r)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(r=>r.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.accessTokenValue&&(this.channels.forEach(a=>{a.updateJoinPayload({access_token:this.accessTokenValue})}),this.sendBuffer=[],this.channels.forEach(a=>{a._isJoining()&&(a.joinPush.sent=!1,a.joinPush.send())})),this.flushSendBuffer()}).catch(a=>{this.log("error","error waiting for auth on connect",a),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const r=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(r),this.workerRef.onerror=a=>{this.log("worker","worker error",a.message),this._terminateWorker()},this.workerRef.onmessage=a=>{a.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(r){var a;this._setConnectionState("disconnected"),this.log("transport","close",r),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(a=this.reconnectTimer)===null||a===void 0||a.scheduleTimeout(),this._triggerStateCallbacks("close",r)}_onConnError(r){this._setConnectionState("disconnected"),this.log("transport",`${r}`),this._triggerChanError(),this._triggerStateCallbacks("error",r);try{this.heartbeatCallback("error")}catch(a){this.log("error","error in heartbeat callback",a)}}_triggerChanError(){this.channels.forEach(r=>r._trigger(CHANNEL_EVENTS.error))}_appendParams(r,a){if(Object.keys(a).length===0)return r;const l=r.match(/\?/)?"&":"?",c=new URLSearchParams(a);return`${r}${l}${c}`}_workerObjectUrl(r){let a;if(r)a=r;else{const l=new Blob([WORKER_SCRIPT],{type:"application/javascript"});a=URL.createObjectURL(l)}return a}_setConnectionState(r,a=!1){this._connectionState=r,r==="connecting"?this._wasManualDisconnect=!1:r==="disconnecting"&&(this._wasManualDisconnect=a)}async _performAuth(r=null){let a,l=!1;if(r)a=r,l=!0;else if(this.accessToken)try{a=await this.accessToken()}catch(c){this.log("error","Error fetching access token from callback",c),a=this.accessTokenValue}else a=this.accessTokenValue;l?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=a&&(this.accessTokenValue=a,this.channels.forEach(c=>{const u={access_token:a,version:DEFAULT_VERSION};a&&c.updateJoinPayload(u),c.joinedOnce&&c._isJoined()&&c._push(CHANNEL_EVENTS.access_token,{access_token:a})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(r="general"){this._isManualToken()||this.setAuth().catch(a=>{this.log("error",`Error setting auth in ${r}`,a)})}_triggerStateCallbacks(r,a){try{this.stateChangeCallbacks[r].forEach(l=>{try{l(a)}catch(c){this.log("error",`error in ${r} callback`,c)}})}catch(l){this.log("error",`error triggering ${r} callbacks`,l)}}_setupReconnectionTimer(){this.reconnectTimer=new Timer(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},CONNECTION_TIMEOUTS.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(r){var a,l,c,u,d,f,m,y,E,A,P,R;switch(this.transport=(a=r==null?void 0:r.transport)!==null&&a!==void 0?a:null,this.timeout=(l=r==null?void 0:r.timeout)!==null&&l!==void 0?l:DEFAULT_TIMEOUT,this.heartbeatIntervalMs=(c=r==null?void 0:r.heartbeatIntervalMs)!==null&&c!==void 0?c:CONNECTION_TIMEOUTS.HEARTBEAT_INTERVAL,this.worker=(u=r==null?void 0:r.worker)!==null&&u!==void 0?u:!1,this.accessToken=(d=r==null?void 0:r.accessToken)!==null&&d!==void 0?d:null,this.heartbeatCallback=(f=r==null?void 0:r.heartbeatCallback)!==null&&f!==void 0?f:noop,this.vsn=(m=r==null?void 0:r.vsn)!==null&&m!==void 0?m:DEFAULT_
4566VSN,r!=null&&r.params&&(this.params=r.params),r!=null&&r.logger&&(this.logger=r.logger),(r!=null&&r.logLevel||r!=null&&r.log_level)&&(this.logLevel=r.logLevel||r.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(y=r==null?void 0:r.reconnectAfterMs)!==null&&y!==void 0?y:x=>RECONNECT_INTERVALS[x-1]||DEFAULT_RECONNECT_FALLBACK,this.vsn){case VSN_1_0_0:this.encode=(E=r==null?void 0:r.encode)!==null&&E!==void 0?E:(x,M)=>M(JSON.stringify(x)),this.decode=(A=r==null?void 0:r.decode)!==null&&A!==void 0?A:(x,M)=>M(JSON.parse(x));break;case VSN_2_0_0:this.encode=(P=r==null?void 0:r.encode)!==null&&P!==void 0?P:this.serializer.encode.bind(this.serializer),this.decode=(R=r==null?void 0:r.decode)!==null&&R!==void 0?R:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=r==null?void 0:r.workerUrl}}}var IcebergError=class extends Error{constructor(o,r){var a;super(o),this.name="IcebergError",this.status=r.status,this.icebergType=r.icebergType,this.icebergCode=r.icebergCode,this.details=r.details,this.isCommitStateUnknown=r.icebergType==="CommitStateUnknownException"||[500,502,504].includes(r.status)&&((a=r.icebergType)==null?void 0:a.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function buildUrl(o,r,a){const l=new URL(r,o);if(a)for(const[c,u]of Object.entries(a))u!==void 0&&l.searchParams.set(c,u);return l.toString()}async function buildAuthHeaders(o){return!o||o.type==="none"?{}:o.type==="bearer"?{Authorization:`Bearer ${o.token}`}:o.type==="header"?{[o.name]:o.value}:o.type==="custom"?await o.getHeaders():{}}function createFetchClient(o){const r=o.fetchImpl??globalThis.fetch;return{async request({method:a,path:l,query:c,body:u,headers:d}){const f=buildUrl(o.baseUrl,l,c),m=await buildAuthHeaders(o.auth),y=await r(f,{method:a,headers:{...u?{"Content-Type":"application/json"}:{},...m,...d},body:u?JSON.stringify(u):void 0}),E=await y.text(),A=(y.headers.get("content-type")||"").includes("application/json"),P=A&&E?JSON.parse(E):E;if(!y.ok){const R=A?P:void 0,x=R==null?void 0:R.error;throw new IcebergError((x==null?void 0:x.message)??`Request failed with status ${y.status}`,{status:y.status,icebergType:x==null?void 0:x.type,icebergCode:x==null?void 0:x.code,details:R})}return{status:y.status,headers:y.headers,data:P}}}}function namespaceToPath(o){return o.join("�")}var NamespaceOperations=class{constructor(o,r=""){this.client=o,this.prefix=r}async listNamespaces(o){const r=o?{parent:namespaceToPath(o.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:r})).data.namespaces.map(l=>({namespace:l}))}async createNamespace(o,r){const a={namespace:o.namespace,properties:r==null?void 0:r.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:a})).data}async dropNamespace(o){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${namespaceToPath(o.namespace)}`})}async loadNamespaceMetadata(o){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${namespaceToPath(o.namespace)}`})).data.properties}}async namespaceExists(o){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${namespaceToPath(o.namespace)}`}),!0}catch(r){if(r instanceof IcebergError&&r.status===404)return!1;throw r}}async createNamespaceIfNotExists(o,r){try{return await this.createNamespace(o,r)}catch(a){if(a instanceof IcebergError&&a.status===409)return;throw a}}};function namespaceToPath2(o){return o.join("�")}var TableOperations=class{constructor(o,r="",a){this.client=o,this.prefix=r,this.accessDelegation=a}async listTables(o){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${namespaceToPath2(o.namespace)}/tables`})).data.identifiers}async createTable(o,r){const a={};return this.accessDelegation&&(a["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${namespaceToPath2(o.namespace)}/tables`,body:r,headers:a})).data.metadata}async updateTable(o,r){const a=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${namespaceToPath2(o.namespace)}/tables/${o.name}`,body:r});return{"metadata-location":a.data["metadata-location"],metadata:a.data.metadata}}async dropTable(o,r){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${namespaceToPath2(o.namespace)}/tables/${o.name}`,query:{purgeRequested:String((r==null?void 0:r.purge)??!1)}})}async loadTable(o){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${namespaceToPath2(o.namespace)}/tables/${o.name}`,headers:r})).data.metadata}async tableExists(o){const r={};this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${namespaceToPath2(o.namespace)}/tables/${o.name}`,headers:r}),!0}catch(a){if(a instanceof IcebergError&&a.status===404)return!1;throw a}}async createTableIfNotExists(o,r){try{return await this.createTable(o,r)}catch(a){if(a instanceof IcebergError&&a.status===409)return await this.loadTable({namespace:o.namespace,name:r.name});throw a}}},IcebergRestCatalog=class{constructor(o){var l;let r="v1";o.catalogName&&(r+=`/${o.catalogName}`);const a=o.baseUrl.endsWith("/")?o.baseUrl:`${o.baseUrl}/`;this.client=createFetchClient({baseUrl:a,auth:o.auth,fetchImpl:o.fetch}),this.accessDelegation=(l=o.accessDelegation)==null?void 0:l.join(","),this.namespaceOps=new NamespaceOperations(this.client,r),this.tableOps=new TableOperations(this.client,r,this.accessDelegation)}async listNamespaces(o){return this.namespaceOps.listNamespaces(o)}async createNamespace(o,r){return this.namespaceOps.createNamespace(o,r)}async dropNamespace(o){await this.namespaceOps.dropNamespace(o)}async loadNamespaceMetadata(o){return this.namespaceOps.loadNamespaceMetadata(o)}async listTables(o){return this.tableOps.listTables(o)}
4566async createTable(o,r){return this.tableOps.createTable(o,r)}async updateTable(o,r){return this.tableOps.updateTable(o,r)}async dropTable(o,r){await this.tableOps.dropTable(o,r)}async loadTable(o){return this.tableOps.loadTable(o)}async namespaceExists(o){return this.namespaceOps.namespaceExists(o)}async tableExists(o){return this.tableOps.tableExists(o)}async createNamespaceIfNotExists(o,r){return this.namespaceOps.createNamespaceIfNotExists(o,r)}async createTableIfNotExists(o,r){return this.tableOps.createTableIfNotExists(o,r)}},StorageError=class extends Error{constructor(o,r="storage",a,l){super(o),this.__isStorageError=!0,this.namespace=r,this.name=r==="vectors"?"StorageVectorsError":"StorageError",this.status=a,this.statusCode=l}};function isStorageError(o){return typeof o=="object"&&o!==null&&"__isStorageError"in o}var StorageApiError=class extends StorageError{constructor(o,r,a,l="storage"){super(o,l,r,a),this.name=l==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=r,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},StorageUnknownError=class extends StorageError{constructor(o,r,a="storage"){super(o,a),this.name=a==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=r}};const resolveFetch$2=o=>o?(...r)=>o(...r):(...r)=>fetch(...r),isPlainObject=o=>{if(typeof o!="object"||o===null)return!1;const r=Object.getPrototypeOf(o);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in o)&&!(Symbol.iterator in o)},recursiveToCamel=o=>{if(Array.isArray(o))return o.map(a=>recursiveToCamel(a));if(typeof o=="function"||o!==Object(o))return o;const r={};return Object.entries(o).forEach(([a,l])=>{const c=a.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));r[c]=recursiveToCamel(l)}),r},isValidBucketName=o=>!o||typeof o!="string"||o.length===0||o.length>100||o.trim()!==o||o.includes("/")||o.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(o);function _typeof$1(o){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$1(o)}function toPrimitive$1(o,r){if(_typeof$1(o)!="object"||!o)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var l=a.call(o,r);if(_typeof$1(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(o)}function toPropertyKey$1(o){var r=toPrimitive$1(o,"string");return _typeof$1(r)=="symbol"?r:r+""}function _defineProperty$1(o,r,a){return(r=toPropertyKey$1(r))in o?Object.defineProperty(o,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[r]=a,o}function ownKeys$1(o,r){var a=Object.keys(o);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);r&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(o,c).enumerable})),a.push.apply(a,l)}return a}function _objectSpread2$1(o){for(var r=1;r<arguments.length;r++){var a=arguments[r]!=null?arguments[r]:{};r%2?ownKeys$1(Object(a),!0).forEach(function(l){_defineProperty$1(o,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(a)):ownKeys$1(Object(a)).forEach(function(l){Object.defineProperty(o,l,Object.getOwnPropertyDescriptor(a,l))})}return o}const _getErrorMessage$1=o=>{var r;return o.msg||o.message||o.error_description||(typeof o.error=="string"?o.error:(r=o.error)===null||r===void 0?void 0:r.message)||JSON.stringify(o)},handleError$1=async(o,r,a,l)=>{if(o&&typeof o=="object"&&"status"in o&&"ok"in o&&typeof o.status=="number"){const c=o,u=c.status||500;if(typeof c.json=="function")c.json().then(d=>{const f=(d==null?void 0:d.statusCode)||(d==null?void 0:d.code)||u+"";r(new StorageApiError(_getErrorMessage$1(d),u,f,l))}).catch(()=>{if(l==="vectors"){const d=u+"";r(new StorageApiError(c.statusText||`HTTP ${u} error`,u,d,l))}else{const d=u+"";r(new StorageApiError(c.statusText||`HTTP ${u} error`,u,d,l))}});else{const d=u+"";r(new StorageApiError(c.statusText||`HTTP ${u} error`,u,d,l))}}else r(new StorageUnknownError(_getErrorMessage$1(o),o,l))}
4566,_getRequestParams$1=(o,r,a,l)=>{const c={method:o,headers:(r==null?void 0:r.headers)||{}};return o==="GET"||o==="HEAD"||!l?_objectSpread2$1(_objectSpread2$1({},c),a):(isPlainObject(l)?(c.headers=_objectSpread2$1({"Content-Type":"application/json"},r==null?void 0:r.headers),c.body=JSON.stringify(l)):c.body=l,r!=null&&r.duplex&&(c.duplex=r.duplex),_objectSpread2$1(_objectSpread2$1({},c),a))};async function _handleRequest$1(o,r,a,l,c,u,d){return new Promise((f,m)=>{o(a,_getRequestParams$1(r,l,c,u)).then(y=>{if(!y.ok)throw y;if(l!=null&&l.noResolveJson)return y;if(d==="vectors"){const E=y.headers.get("content-type");if(y.headers.get("content-length")==="0"||y.status===204)return{};if(!E||!E.includes("application/json"))return{}}return y.json()}).then(y=>f(y)).catch(y=>handleError$1(y,m,l,d))})}function createFetchApi(o="storage"){return{get:async(r,a,l,c)=>_handleRequest$1(r,"GET",a,l,c,void 0,o),post:async(r,a,l,c,u)=>_handleRequest$1(r,"POST",a,c,u,l,o),put:async(r,a,l,c,u)=>_handleRequest$1(r,"PUT",a,c,u,l,o),head:async(r,a,l,c)=>_handleRequest$1(r,"HEAD",a,_objectSpread2$1(_objectSpread2$1({},l),{},{noResolveJson:!0}),c,void 0,o),remove:async(r,a,l,c,u)=>_handleRequest$1(r,"DELETE",a,c,u,l,o)}}const defaultApi=createFetchApi("storage"),{get,post,put,head,remove}=defaultApi,vectorsApi=createFetchApi("vectors");var BaseApiClient=class{constructor(o,r={},a,l="storage"){this.shouldThrowOnError=!1,this.url=o,this.headers=r,this.fetch=resolveFetch$2(a),this.namespace=l}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(o,r){return this.headers=_objectSpread2$1(_objectSpread2$1({},this.headers),{},{[o]:r}),this}async handleOperation(o){var r=this;try{return{data:await o(),error:null}}catch(a){if(r.shouldThrowOnError)throw a;if(isStorageError(a))return{data:null,error:a};throw a}}},StreamDownloadBuilder=class{constructor(o,r){this.downloadFn=o,this.shouldThrowOnError=r}then(o,r){return this.execute().then(o,r)}async execute(){var o=this;try{return{data:(await o.downloadFn()).body,error:null}}catch(r){if(o.shouldThrowOnError)throw r;if(isStorageError(r))return{data:null,error:r};throw r}}};let _Symbol$toStringTag;_Symbol$toStringTag=Symbol.toStringTag;var BlobDownloadBuilder=class{constructor(o,r){this.downloadFn=o,this.shouldThrowOnError=r,this[_Symbol$toStringTag]="BlobDownloadBuilder",this.promise=null}asStream(){return new StreamDownloadBuilder(this.downloadFn,this.shouldThrowOnError)}then(o,r){return this.getPromise().then(o,r)}catch(o){return this.getPromise().catch(o)}finally(o){return this.getPromise().finally(o)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var o=this;try{return{data:await(await o.downloadFn()).blob(),error:null}}catch(r){if(o.shouldThrowOnError)throw r;if(isStorageError(r))return{data:null,error:r};throw r}}};const DEFAULT_SEARCH_OPTIONS={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},DEFAULT_FILE_OPTIONS={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var StorageFileApi=class extends BaseApiClient{constructor(o,r={},a,l){super(o,r,l,"storage"),this.bucketId=a}async uploadOrUpdate(o,r,a,l){var c=this;return c.handleOperation(async()=>{let u;const d=_objectSpread2$1(_objectSpread2$1({},DEFAULT_FILE_OPTIONS),l);let f=_objectSpread2$1(_objectSpread2$1({},c.headers),o==="POST"&&{"x-upsert":String(d.upsert)});const m=d.metadata;typeof Blob<"u"&&a instanceof Blob?(u=new FormData,u.append("cacheControl",d.cacheControl),m&&u.append("metadata",c.encodeMetadata(m)),u.append("",a)):typeof FormData<"u"&&a instanceof FormData?(u=a,u.has("cacheControl")||u.append("cacheControl",d.cacheControl),m&&!u.has("metadata")&&u.append("metadata",c.encodeMetadata(m))):(u=a,f["cache-control"]=`max-age=${d.cacheControl}`,f["content-type"]=d.contentType,m&&(f["x-metadata"]=c.toBase64(c.encodeMetadata(m))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!d.duplex&&(d.duplex="half")),l!=null&&l.headers&&(f=_objectSpread2$1(_objectSpread2$1({},f),l.headers));const y=c._removeEmptyFolders(r),E=c._getFinalPath(y),A=await(o=="PUT"?put:post)(c.fetch,`${c.url}/object/${E}`,u,_objectSpread2$1({headers:f},d!=null&&d.duplex?{duplex:d.duplex}:{}));return{path:y,id:A.Id,fullPath:A.Key}})}async upload(o,r,a){return this.uploadOrUpdate("POST",o,r,a)}async uploadToSignedUrl(o,r,a,l){var c=this;const u=c._removeEmptyFolders(o),d=c._getFinalPath(u),f=new URL(c.url+`/object/upload/sign/${d}`);return f.searchParams.set("token",r),c.handleOperation(async()=>{let m;const y=_objectSpread2$1({upsert:DEFAULT_FILE_OPTIONS.upsert},l),E=_objectSpread2$1(_objectSpread2$1({},c.headers),{"x-upsert":String(y.upsert)});
4566return typeof Blob<"u"&&a instanceof Blob?(m=new FormData,m.append("cacheControl",y.cacheControl),m.append("",a)):typeof FormData<"u"&&a instanceof FormData?(m=a,m.append("cacheControl",y.cacheControl)):(m=a,E["cache-control"]=`max-age=${y.cacheControl}`,E["content-type"]=y.contentType),{path:u,fullPath:(await put(c.fetch,f.toString(),m,{headers:E})).Key}})}async createSignedUploadUrl(o,r){var a=this;return a.handleOperation(async()=>{let l=a._getFinalPath(o);const c=_objectSpread2$1({},a.headers);r!=null&&r.upsert&&(c["x-upsert"]="true");const u=await post(a.fetch,`${a.url}/object/upload/sign/${l}`,{},{headers:c}),d=new URL(a.url+u.url),f=d.searchParams.get("token");if(!f)throw new StorageError("No token returned by API");return{signedUrl:d.toString(),path:o,token:f}})}async update(o,r,a){return this.uploadOrUpdate("PUT",o,r,a)}async move(o,r,a){var l=this;return l.handleOperation(async()=>await post(l.fetch,`${l.url}/object/move`,{bucketId:l.bucketId,sourceKey:o,destinationKey:r,destinationBucket:a==null?void 0:a.destinationBucket},{headers:l.headers}))}async copy(o,r,a){var l=this;return l.handleOperation(async()=>({path:(await post(l.fetch,`${l.url}/object/copy`,{bucketId:l.bucketId,sourceKey:o,destinationKey:r,destinationBucket:a==null?void 0:a.destinationBucket},{headers:l.headers})).Key}))}async createSignedUrl(o,r,a){var l=this;return l.handleOperation(async()=>{let c=l._getFinalPath(o),u=await post(l.fetch,`${l.url}/object/sign/${c}`,_objectSpread2$1({expiresIn:r},a!=null&&a.transform?{transform:a.transform}:{}),{headers:l.headers});const d=a!=null&&a.download?`&download=${a.download===!0?"":a.download}`:"",f=a!=null&&a.transform&&u.signedURL.includes("/object/sign/")?u.signedURL.replace("/object/sign/","/render/image/sign/"):u.signedURL;return{signedUrl:encodeURI(`${l.url}${f}${d}`)}})}async createSignedUrls(o,r,a){var l=this;return l.handleOperation(async()=>{const c=await post(l.fetch,`${l.url}/object/sign/${l.bucketId}`,{expiresIn:r,paths:o},{headers:l.headers}),u=a!=null&&a.download?`&download=${a.download===!0?"":a.download}`:"";return c.map(d=>_objectSpread2$1(_objectSpread2$1({},d),{},{signedUrl:d.signedURL?encodeURI(`${l.url}${d.signedURL}${u}`):null}))})}download(o,r,a){const l=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",c=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),u=c?`?${c}`:"",d=this._getFinalPath(o),f=()=>get(this.fetch,`${this.url}/${l}/${d}${u}`,{headers:this.headers,noResolveJson:!0},a);return new BlobDownloadBuilder(f,this.shouldThrowOnError)}async info(o){var r=this;const a=r._getFinalPath(o);return r.handleOperation(async()=>recursiveToCamel(await get(r.fetch,`${r.url}/object/info/${a}`,{headers:r.headers})))}async exists(o){var r=this;const a=r._getFinalPath(o);try{return await head(r.fetch,`${r.url}/object/${a}`,{headers:r.headers}),{data:!0,error:null}}catch(c){if(r.shouldThrowOnError)throw c;if(isStorageError(c)){var l;const u=c instanceof StorageApiError?c.status:c instanceof StorageUnknownError?(l=c.originalError)===null||l===void 0?void 0:l.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:c}}throw c}}getPublicUrl(o,r){const a=this._getFinalPath(o),l=[],c=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";c!==""&&l.push(c);const u=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",d=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});d!==""&&l.push(d);let f=l.join("&");return f!==""&&(f=`?${f}`),{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${a}${f}`)}}}async remove(o){var r=this;return r.handleOperation(async()=>await remove(r.fetch,`${r.url}/object/${r.bucketId}`,{prefixes:o},{headers:r.headers}))}async list(o,r,a){var l=this;return l.handleOperation(async()=>{const c=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},DEFAULT_SEARCH_OPTIONS),r),{},{prefix:o||""});return await post(l.fetch,`${l.url}/object/list/${l.bucketId}`,c,{headers:l.headers},a)})}async listV2(o,r){var a=this;return a.handleOperation(async()=>{const l=_objectSpread2$1({},o);return await post(a.fetch,`${a.url}/object/list-v2/${a.bucketId}`,l,{headers:a.headers},r)})}encodeMetadata(o){return JSON.stringify(o)}toBase64(o){return typeof Buffer<"u"?Buffer.from(o).toString("base64"):btoa(o)}_getFinalPath(o){return`${this.bucketId}/${o.replace(/^\/+/,"")}`}_removeEmptyFolders(o){return o.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(o){const r=[];return o.width&&r.push(`width=${o.width}`),o.height&&r.push(`height=${o.height}`),o.resize&&r.push(`resize=${o.resize}`),o.format&&r.push(`format=${o.format}`),o.quality&&r.push(`quality=${o.quality}`),r.join("&")}};const version$2="2.99.0",DEFAULT_HEADERS$2={"X-Client-Info":`storage-js/${version$2}`};var StorageBucketApi=class extends BaseApiClient{constructor(o,r={},a,l){const c=new URL(o);l!=null&&l.useNewHostname&&/supabase\.(co|in|red)$/.test(c.hostname)&&!c.hostname.includes("storage.supabase.")&&(c.hostname=c.hostname.replace("supabase.","storage.supabase."));const u=c.href.replace(/\/$/,""),d=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$2),r);super(u,d,a,"storage")}async listBuckets(o){var r=this;return r.handleOperation(async()=>{const a=r.listBucketOptionsToQueryString(o);return await get(r.fetch,`${r.url}/bucket${a}`,{headers:r.headers})})}async getBucket(o){var r=this;return r.handleOperation(async()=>await get(r.fetch,`${r.url}/bucket/${o}`,{headers:r.headers}))}async createBucket(o,r={public:!1}){var a=this;return a.handleOperation(async()=>await post(a.fetch,`${a.url}/bucket`,{id:o,name:o,type:r.type,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:a.headers}))}async updateBucket(o,r){var a=this;return a.handleOperation(async()=>await put(a.fetch,`${a.url}/bucket/${o}`,{id:o,name:o,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:a.headers}))}async emptyBucket(o){var r=this;return r.handleOperation(async()=>await post(r.fetch,`${r.url}/bucket/${o}/empty`,{},{headers:r.headers}))}async deleteBucket(o){var r=this;return r.handleOperation(async()=>await remove(r.fetch,`${r.url}/bucket/${o}`,{},{headers:r.headers}))}listBucketOptionsToQueryString(o){const r={};return o&&("limit"in o&&(r.limit=String(o.limit)),"offset"in o&&(r.offset=String(o.offset)),o.search&&(r.search=o.search),o.sortColumn&&(r.sortColumn=o.sortColumn),o.sortOrder&&(r.sortOrder=o.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}},StorageAnalyticsClient=class extends BaseApiClient{constructor(o,r={},a){const l=o.replace(/\/$/,""),c=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$2),r);super(l,c,a,"storage")}async createBucket(o){var r=this;return r.handleOperation(async()=>await post(r.fetch,`${r.url}/bucket`,{name:o},{headers:r.headers}))}async listBuckets(o){var r=this;return r.handleOperation(async()=>{const a=new URLSearchParams;(o==null?void 0:o.limit)!==void 0&&a.set("limit",o.limit.toString()),(o==null?void 0:o.offset)!==void 0&&a.set("offset",o.offset.toString()),o!=null&&o.sortColumn&&a.set("sortColumn",o.sortColumn),o!=null&&o.sortOrder&&a.set("sortOrder",o.sortOrder),o!=null&&o.search&&a.set("search",o.search);const l=a.toString(),c=l?`${r.url}/bucket?${l}`:`${r.url}/bucket`;return await get(r.fetch,c,{headers:r.headers})})}async deleteBucket(o){var r=this;return r.handleOperation(async()=>await remove(r.fetch,`${r.url}/bucket/${o}`,{},{headers:r.headers}))}
4566from(o){var r=this;if(!isValidBucketName(o))throw new StorageError("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const a=new IcebergRestCatalog({baseUrl:this.url,catalogName:o,auth:{type:"custom",getHeaders:async()=>r.headers},fetch:this.fetch}),l=this.shouldThrowOnError;return new Proxy(a,{get(c,u){const d=c[u];return typeof d!="function"?d:async(...f)=>{try{return{data:await d.apply(c,f),error:null}}catch(m){if(l)throw m;return{data:null,error:m}}}}})}},VectorIndexApi=class extends BaseApiClient{constructor(o,r={},a){const l=o.replace(/\/$/,""),c=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$2),{},{"Content-Type":"application/json"},r);super(l,c,a,"vectors")}async createIndex(o){var r=this;return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/CreateIndex`,o,{headers:r.headers})||{})}async getIndex(o,r){var a=this;return a.handleOperation(async()=>await vectorsApi.post(a.fetch,`${a.url}/GetIndex`,{vectorBucketName:o,indexName:r},{headers:a.headers}))}async listIndexes(o){var r=this;return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/ListIndexes`,o,{headers:r.headers}))}async deleteIndex(o,r){var a=this;return a.handleOperation(async()=>await vectorsApi.post(a.fetch,`${a.url}/DeleteIndex`,{vectorBucketName:o,indexName:r},{headers:a.headers})||{})}},VectorDataApi=class extends BaseApiClient{constructor(o,r={},a){const l=o.replace(/\/$/,""),c=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$2),{},{"Content-Type":"application/json"},r);super(l,c,a,"vectors")}async putVectors(o){var r=this;if(o.vectors.length<1||o.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/PutVectors`,o,{headers:r.headers})||{})}async getVectors(o){var r=this;return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/GetVectors`,o,{headers:r.headers}))}async listVectors(o){var r=this;if(o.segmentCount!==void 0){if(o.segmentCount<1||o.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(o.segmentIndex!==void 0&&(o.segmentIndex<0||o.segmentIndex>=o.segmentCount))throw new Error(`segmentIndex must be between 0 and ${o.segmentCount-1}`)}return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/ListVectors`,o,{headers:r.headers}))}async queryVectors(o){var r=this;return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/QueryVectors`,o,{headers:r.headers}))}async deleteVectors(o){var r=this;if(o.keys.length<1||o.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/DeleteVectors`,o,{headers:r.headers})||{})}},VectorBucketApi=class extends BaseApiClient{constructor(o,r={},a){const l=o.replace(/\/$/,""),c=_objectSpread2$1(_objectSpread2$1({},DEFAULT_HEADERS$2),{},{"Content-Type":"application/json"},r);super(l,c,a,"vectors")}async createBucket(o){var r=this;return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/CreateVectorBucket`,{vectorBucketName:o},{headers:r.headers})||{})}async getBucket(o){var r=this;return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/GetVectorBucket`,{vectorBucketName:o},{headers:r.headers}))}async listBuckets(o={}){var r=this;return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/ListVectorBuckets`,o,{headers:r.headers}))}async deleteBucket(o){var r=this;return r.handleOperation(async()=>await vectorsApi.post(r.fetch,`${r.url}/DeleteVectorBucket`,{vectorBucketName:o},{headers:r.headers})||{})}},StorageVectorsClient=class extends VectorBucketApi{constructor(o,r={}){super(o,r.headers||{},r.fetch)}from(o){return new VectorBucketScope(this.url,this.headers,o,this.fetch)}async createBucket(o){var r=()=>super.createBucket,a=this;return r().call(a,o)}async getBucket(o){var r=()=>super.getBucket,a=this;return r().call(a,o)}async listBuckets(o={}){var r=()=>super.listBuckets,a=this;return r().call(a,o)}async deleteBucket(o){var r=()=>super.deleteBucket,a=this;return r().call(a,o)}},VectorBucketScope=class extends VectorIndexApi{constructor(o,r,a,l){super(o,r,l),this.vectorBucketName=a}async createIndex(o){var r=()=>super.createIndex,a=this;return r().call(a,_objectSpread2$1(_objectSpread2$1({},o),{},{vectorBucketName:a.vectorBucketName}))}async listIndexes(o={}){var r=()=>super.listIndexes,a=this;return r().call(a,_objectSpread2$1(_objectSpread2$1({},o),{},{vectorBucketName:a.vectorBucketName}))}async getIndex(o){var r=()=>super.getIndex,a=this;return r().call(a,a.vectorBucketName,o)}async deleteIndex(o){var r=()=>super.deleteIndex,a=this;return r().call(a,a.vectorBucketName,o)}index(o){return new VectorIndexScope(this.url,this.headers,this.vectorBucketName,o,this.fetch)}},VectorIndexScope=class extends VectorDataApi{constructor(o,r,a,l,c){super(o,r,c),this.vectorBucketName=a,this.indexName=l}async putVectors(o){var r=()=>super.putVectors,a=this;return r().call(a,_objectSpread2$1(_objectSpread2$1({},o),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async getVectors(o){var r=()=>super.getVectors,a=this;return r().call(a,_objectSpread2$1(_objectSpread2$1({},o),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async listVectors(o={}){var r=()=>super.listVectors,a=this;return r().call(a,_objectSpread2$1(_objectSpread2$1({},o),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async queryVectors(o){var r=()=>super.queryVectors,a=this;return r().call(a,_objectSpread2$1(_objectSpread2$1({},o),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async deleteVectors(o){var r=()=>super.deleteVectors,a=this;return r().call(a,_objectSpread2$1(_objectSpread2$1({},o),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}},StorageClient=class extends StorageBucketApi{constructor(o,r={},a,l){super(o,r,a,l)}from(o){return new StorageFileApi(this.url,this.headers,o,this.fetch)}get vectors(){return new StorageVectorsClient(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new StorageAnalyticsClient(this.url+"/iceberg",this.headers,this.fetch)}};const version$1="2.99.0",AUTO_REFRESH_TICK_DURATION_MS=30*1e3,AUTO_REFRESH_TICK_THRESHOLD=3,EXPIRY_MARGIN_MS=AUTO_REFRESH_TICK_THRESHOLD*AUTO_REFRESH_TICK_DURATION_MS,GOTRUE_URL="http://localhost:9999",STORAGE_KEY="supabase.auth.token",DEFAULT_HEADERS$1={"X-Client-Info":`gotrue-js/${version$1}`},API_VERSION_HEADER_NAME="X-Supabase-Api-Version",API_VERSIONS={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},BASE64URL_REGEX=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,JWKS_TTL=10*60*1e3;
4566class AuthError extends Error{constructor(r,a,l){super(r),this.__isAuthError=!0,this.name="AuthError",this.status=a,this.code=l}}function isAuthError(o){return typeof o=="object"&&o!==null&&"__isAuthError"in o}class AuthApiError extends AuthError{constructor(r,a,l){super(r,a,l),this.name="AuthApiError",this.status=a,this.code=l}}function isAuthApiError(o){return isAuthError(o)&&o.name==="AuthApiError"}class AuthUnknownError extends AuthError{constructor(r,a){super(r),this.name="AuthUnknownError",this.originalError=a}}class CustomAuthError extends AuthError{constructor(r,a,l,c){super(r,l,c),this.name=a,this.status=l}}class AuthSessionMissingError extends CustomAuthError{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function isAuthSessionMissingError(o){return isAuthError(o)&&o.name==="AuthSessionMissingError"}class AuthInvalidTokenResponseError extends CustomAuthError{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class AuthInvalidCredentialsError extends CustomAuthError{constructor(r){super(r,"AuthInvalidCredentialsError",400,void 0)}}class AuthImplicitGrantRedirectError extends CustomAuthError{constructor(r,a=null){super(r,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=a}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function isAuthImplicitGrantRedirectError(o){return isAuthError(o)&&o.name==="AuthImplicitGrantRedirectError"}class AuthPKCEGrantCodeExchangeError extends CustomAuthError{constructor(r,a=null){super(r,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=a}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class AuthPKCECodeVerifierMissingError extends CustomAuthError{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class AuthRetryableFetchError extends CustomAuthError{constructor(r,a){super(r,"AuthRetryableFetchError",a,void 0)}}function isAuthRetryableFetchError(o){return isAuthError(o)&&o.name==="AuthRetryableFetchError"}class AuthWeakPasswordError extends CustomAuthError{constructor(r,a,l){super(r,"AuthWeakPasswordError",a,"weak_password"),this.reasons=l}}class AuthInvalidJwtError extends CustomAuthError{constructor(r){super(r,"AuthInvalidJwtError",400,"invalid_jwt")}}const TO_BASE64URL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),IGNORE_BASE64URL=` 	
4567\r=`.split(""),FROM_BASE64URL=(()=>{const o=new Array(128);for(let r=0;r<o.length;r+=1)o[r]=-1;for(let r=0;r<IGNORE_BASE64URL.length;r+=1)o[IGNORE_BASE64URL[r].charCodeAt(0)]=-2;for(let r=0;r<TO_BASE64URL.length;r+=1)o[TO_BASE64URL[r].charCodeAt(0)]=r;return o})();function byteToBase64URL(o,r,a){if(o!==null)for(r.queue=r.queue<<8|o,r.queuedBits+=8;r.queuedBits>=6;){const l=r.queue>>r.queuedBits-6&63;a(TO_BASE64URL[l]),r.queuedBits-=6}else if(r.queuedBits>0)for(r.queue=r.queue<<6-r.queuedBits,r.queuedBits=6;r.queuedBits>=6;){const l=r.queue>>r.queuedBits-6&63;a(TO_BASE64URL[l]),r.queuedBits-=6}}function byteFromBase64URL(o,r,a){const l=FROM_BASE64URL[o];if(l>-1)for(r.queue=r.queue<<6|l,r.queuedBits+=6;r.queuedBits>=8;)a(r.queue>>r.queuedBits-8&255),r.queuedBits-=8;else{if(l===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(o)}"`)}}function stringFromBase64URL(o){const r=[],a=d=>{r.push(String.fromCodePoint(d))},l={utf8seq:0,codepoint:0},c={queue:0,queuedBits:0},u=d=>{stringFromUTF8(d,l,a)};for(let d=0;d<o.length;d+=1)byteFromBase64URL(o.charCodeAt(d),c,u);return r.join("")}function codepointToUTF8(o,r){if(o<=127){r(o);return}else if(o<=2047){r(192|o>>6),r(128|o&63);return}else if(o<=65535){r(224|o>>12),r(128|o>>6&63),r(128|o&63);return}else if(o<=1114111){r(240|o>>18),r(128|o>>12&63),r(128|o>>6&63),r(128|o&63);return}throw new Error(`Unrecognized Unicode codepoint: ${o.toString(16)}`)}function stringToUTF8(o,r){for(let a=0;a<o.length;
4567a+=1){let l=o.charCodeAt(a);if(l>55295&&l<=56319){const c=(l-55296)*1024&65535;l=(o.charCodeAt(a+1)-56320&65535|c)+65536,a+=1}codepointToUTF8(l,r)}}function stringFromUTF8(o,r,a){if(r.utf8seq===0){if(o<=127){a(o);return}for(let l=1;l<6;l+=1)if(!(o>>7-l&1)){r.utf8seq=l;break}if(r.utf8seq===2)r.codepoint=o&31;else if(r.utf8seq===3)r.codepoint=o&15;else if(r.utf8seq===4)r.codepoint=o&7;else throw new Error("Invalid UTF-8 sequence");r.utf8seq-=1}else if(r.utf8seq>0){if(o<=127)throw new Error("Invalid UTF-8 sequence");r.codepoint=r.codepoint<<6|o&63,r.utf8seq-=1,r.utf8seq===0&&a(r.codepoint)}}function base64UrlToUint8Array(o){const r=[],a={queue:0,queuedBits:0},l=c=>{r.push(c)};for(let c=0;c<o.length;c+=1)byteFromBase64URL(o.charCodeAt(c),a,l);return new Uint8Array(r)}function stringToUint8Array(o){const r=[];return stringToUTF8(o,a=>r.push(a)),new Uint8Array(r)}function bytesToBase64URL(o){const r=[],a={queue:0,queuedBits:0},l=c=>{r.push(c)};return o.forEach(c=>byteToBase64URL(c,a,l)),byteToBase64URL(null,a,l),r.join("")}function expiresAt(o){return Math.round(Date.now()/1e3)+o}function generateCallbackId(){return Symbol("auth-callback")}const isBrowser=()=>typeof window<"u"&&typeof document<"u",localStorageWriteTests={tested:!1,writable:!1},supportsLocalStorage=()=>{if(!isBrowser())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(localStorageWriteTests.tested)return localStorageWriteTests.writable;const o=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(o,o),globalThis.localStorage.removeItem(o),localStorageWriteTests.tested=!0,localStorageWriteTests.writable=!0}catch{localStorageWriteTests.tested=!0,localStorageWriteTests.writable=!1}return localStorageWriteTests.writable};function parseParametersFromURL(o){const r={},a=new URL(o);if(a.hash&&a.hash[0]==="#")try{new URLSearchParams(a.hash.substring(1)).forEach((c,u)=>{r[u]=c})}catch{}return a.searchParams.forEach((l,c)=>{r[c]=l}),r}const resolveFetch$1=o=>o?(...r)=>o(...r):(...r)=>fetch(...r),looksLikeFetchResponse=o=>typeof o=="object"&&o!==null&&"status"in o&&"ok"in o&&"json"in o&&typeof o.json=="function",setItemAsync=async(o,r,a)=>{await o.setItem(r,JSON.stringify(a))},getItemAsync=async(o,r)=>{const a=await o.getItem(r);if(!a)return null;try{return JSON.parse(a)}catch{return a}},removeItemAsync=async(o,r)=>{await o.removeItem(r)};class Deferred{constructor(){this.promise=new Deferred.promiseConstructor((r,a)=>{this.resolve=r,this.reject=a})}}Deferred.promiseConstructor=Promise;function decodeJWT(o){const r=o.split(".");if(r.length!==3)throw new AuthInvalidJwtError("Invalid JWT structure");for(let l=0;l<r.length;l++)if(!BASE64URL_REGEX.test(r[l]))throw new AuthInvalidJwtError("JWT not in base64url format");return{header:JSON.parse(stringFromBase64URL(r[0])),payload:JSON.parse(stringFromBase64URL(r[1])),signature:base64UrlToUint8Array(r[2]),raw:{header:r[0],payload:r[1]}}}async function sleep(o){return await new Promise(r=>{setTimeout(()=>r(null),o)})}function retryable(o,r){return new Promise((l,c)=>{(async()=>{for(let u=0;u<1/0;u++)try{const d=await o(u);if(!r(u,null,d)){l(d);return}}catch(d){if(!r(u,d)){c(d);return}}})()})}function dec2hex(o){return("0"+o.toString(16)).substr(-2)}function generatePKCEVerifier(){const r=new Uint32Array(56);if(typeof crypto>"u"){const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",l=a.length;let c="";for(let u=0;u<56;u++)c+=a.charAt(Math.floor(Math.random()*l));return c}return crypto.getRandomValues(r),Array.from(r,dec2hex).join("")}async function sha256(o){const a=new TextEncoder().encode(o),l=await crypto.subtle.digest("SHA-256",a),c=new Uint8Array(l);return Array.from(c).map(u=>String.fromCharCode(u)).join("")}async function generatePKCEChallenge(o){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),o;const a=await sha256(o);return btoa(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function getCodeChallengeAndMethod(o,r,a=!1){const l=generatePKCEVerifier();let c=l;a&&(c+="/PASSWORD_RECOVERY"),await setItemAsync(o,`${r}-code-verifier`,c);const u=await generatePKCEChallenge(l);return[u,l===u?"plain":"s256"]}const API_VERSION_REGEX=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function parseResponseAPIVersion(o){const r=o.headers.get(API_VERSION_HEADER_NAME);if(!r||!r.match(API_VERSION_REGEX))return null;try{return new Date(`${r}T00:00:00.0Z`)}catch{return null}}function validateExp(o){if(!o)throw new Error("Missing exp claim");const r=Math.floor(Date.now()/1e3);if(o<=r)throw new Error("JWT has expired")}function getAlgorithm(o){switch(o){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const UUID_REGEX=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function validateUUID(o){if(!UUID_REGEX.test(o))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function userNotAvailableProxy(){const o={};return new Proxy(o,{get:(r,a)=>{if(a==="__isUserNotAvailableProxy")return!0;
4567if(typeof a=="symbol"){const l=a.toString();if(l==="Symbol(Symbol.toPrimitive)"||l==="Symbol(Symbol.toStringTag)"||l==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${a}" property of the session object is not supported. Please use getUser() instead.`)},set:(r,a)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${a}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(r,a)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${a}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function insecureUserWarningProxy(o,r){return new Proxy(o,{get:(a,l,c)=>{if(l==="__isInsecureUserWarningProxy")return!0;if(typeof l=="symbol"){const u=l.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(a,l,c)}return!r.value&&typeof l=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),r.value=!0),Reflect.get(a,l,c)}})}function deepClone(o){return JSON.parse(JSON.stringify(o))}const _getErrorMessage=o=>o.msg||o.message||o.error_description||o.error||JSON.stringify(o),NETWORK_ERROR_CODES=[502,503,504];async function handleError(o){var r;if(!looksLikeFetchResponse(o))throw new AuthRetryableFetchError(_getErrorMessage(o),0);if(NETWORK_ERROR_CODES.includes(o.status))throw new AuthRetryableFetchError(_getErrorMessage(o),o.status);let a;try{a=await o.json()}catch(u){throw new AuthUnknownError(_getErrorMessage(u),u)}let l;const c=parseResponseAPIVersion(o);if(c&&c.getTime()>=API_VERSIONS["2024-01-01"].timestamp&&typeof a=="object"&&a&&typeof a.code=="string"?l=a.code:typeof a=="object"&&a&&typeof a.error_code=="string"&&(l=a.error_code),l){if(l==="weak_password")throw new AuthWeakPasswordError(_getErrorMessage(a),o.status,((r=a.weak_password)===null||r===void 0?void 0:r.reasons)||[]);if(l==="session_not_found")throw new AuthSessionMissingError}else if(typeof a=="object"&&a&&typeof a.weak_password=="object"&&a.weak_password&&Array.isArray(a.weak_password.reasons)&&a.weak_password.reasons.length&&a.weak_password.reasons.reduce((u,d)=>u&&typeof d=="string",!0))throw new AuthWeakPasswordError(_getErrorMessage(a),o.status,a.weak_password.reasons);throw new AuthApiError(_getErrorMessage(a),o.status||500,l)}
4567const _getRequestParams=(o,r,a,l)=>{const c={method:o,headers:(r==null?void 0:r.headers)||{}};return o==="GET"?c:(c.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},r==null?void 0:r.headers),c.body=JSON.stringify(l),Object.assign(Object.assign({},c),a))};async function _request(o,r,a,l){var c;const u=Object.assign({},l==null?void 0:l.headers);u[API_VERSION_HEADER_NAME]||(u[API_VERSION_HEADER_NAME]=API_VERSIONS["2024-01-01"].name),l!=null&&l.jwt&&(u.Authorization=`Bearer ${l.jwt}`);const d=(c=l==null?void 0:l.query)!==null&&c!==void 0?c:{};l!=null&&l.redirectTo&&(d.redirect_to=l.redirectTo);const f=Object.keys(d).length?"?"+new URLSearchParams(d).toString():"",m=await _handleRequest(o,r,a+f,{headers:u,noResolveJson:l==null?void 0:l.noResolveJson},{},l==null?void 0:l.body);return l!=null&&l.xform?l==null?void 0:l.xform(m):{data:Object.assign({},m),error:null}}async function _handleRequest(o,r,a,l,c,u){const d=_getRequestParams(r,l,c,u);let f;try{f=await o(a,Object.assign({},d))}catch(m){throw console.error(m),new AuthRetryableFetchError(_getErrorMessage(m),0)}if(f.ok||await handleError(f),l!=null&&l.noResolveJson)return f;try{return await f.json()}catch(m){await handleError(m)}}function _sessionResponse(o){var r;let a=null;
4567hasSession(o)&&(a=Object.assign({},o),o.expires_at||(a.expires_at=expiresAt(o.expires_in)));const l=(r=o.user)!==null&&r!==void 0?r:o;return{data:{session:a,user:l},error:null}}function _sessionResponsePassword(o){const r=_sessionResponse(o);return!r.error&&o.weak_password&&typeof o.weak_password=="object"&&Array.isArray(o.weak_password.reasons)&&o.weak_password.reasons.length&&o.weak_password.message&&typeof o.weak_password.message=="string"&&o.weak_password.reasons.reduce((a,l)=>a&&typeof l=="string",!0)&&(r.data.weak_password=o.weak_password),r}function _userResponse(o){var r;return{data:{user:(r=o.user)!==null&&r!==void 0?r:o},error:null}}function _ssoResponse(o){return{data:o,error:null}}function _generateLinkResponse(o){const{action_link:r,email_otp:a,hashed_token:l,redirect_to:c,verification_type:u}=o,d=__rest(o,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:r,email_otp:a,hashed_token:l,redirect_to:c,verification_type:u},m=Object.assign({},d);return{data:{properties:f,user:m},error:null}}function _noResolveJsonResponse(o){return o}function hasSession(o){return o.access_token&&o.refresh_token&&o.expires_in}const SIGN_OUT_SCOPES=["global","local","others"];class GoTrueAdminApi{constructor({url:r="",headers:a={},fetch:l}){this.url=r,this.headers=a,this.fetch=resolveFetch$1(l),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(r,a=SIGN_OUT_SCOPES[0]){if(SIGN_OUT_SCOPES.indexOf(a)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${SIGN_OUT_SCOPES.join(", ")}`);try{return await _request(this.fetch,"POST",`${this.url}/logout?scope=${a}`,{headers:this.headers,jwt:r,noResolveJson:!0}),{data:null,error:null}}catch(l){if(isAuthError(l))return{data:null,error:l};throw l}}async inviteUserByEmail(r,a={}){try{return await _request(this.fetch,"POST",`${this.url}/invite`,{body:{email:r,data:a.data},headers:this.headers,redirectTo:a.redirectTo,xform:_userResponse})}catch(l){if(isAuthError(l))return{data:{user:null},error:l};throw l}}async generateLink(r){try{const{options:a}=r,l=__rest(r,["options"]),c=Object.assign(Object.assign({},l),a);return"newEmail"in l&&(c.new_email=l==null?void 0:l.newEmail,delete c.newEmail),await _request(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:c,headers:this.headers,xform:_generateLinkResponse,redirectTo:a==null?void 0:a.redirectTo})}catch(a){if(isAuthError(a))return{data:{properties:null,user:null},error:a};throw a}}async createUser(r){try{return await _request(this.fetch,"POST",`${this.url}/admin/users`,{body:r,headers:this.headers,xform:_userResponse})}catch(a){if(isAuthError(a))return{data:{user:null},error:a};throw a}}async listUsers(r){var a,l,c,u,d,f,m;try{const y={nextPage:null,lastPage:0,total:0},E=await _request(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(l=(a=r==null?void 0:r.page)===null||a===void 0?void 0:a.toString())!==null&&l!==void 0?l:"",per_page:(u=(c=r==null?void 0:r.perPage)===null||c===void 0?void 0:c.toString())!==null&&u!==void 0?u:""}
vendor: 2,233 bytes, line 4567
4567,xform:_noResolveJsonResponse});if(E.error)throw E.error;const A=await E.json(),P=(d=E.headers.get("x-total-count"))!==null&&d!==void 0?d:0,R=(m=(f=E.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&m!==void 0?m:[];return R.length>0&&(R.forEach(x=>{const M=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),$=JSON.parse(x.split(";")[1].split("=")[1]);y[`${$}Page`]=M}),y.total=parseInt(P)),{data:Object.assign(Object.assign({},A),y),error:null}}catch(y){if(isAuthError(y))return{data:{users:[]},error:y};throw y}}async getUserById(r){validateUUID(r);try{return await _request(this.fetch,"GET",`${this.url}/admin/users/${r}`,{headers:this.headers,xform:_userResponse})}catch(a){if(isAuthError(a))return{data:{user:null},error:a};throw a}}async updateUserById(r,a){validateUUID(r);try{return await _request(this.fetch,"PUT",`${this.url}/admin/users/${r}`,{body:a,headers:this.headers,xform:_userResponse})}catch(l){if(isAuthError(l))return{data:{user:null},error:l};throw l}}async deleteUser(r,a=!1){validateUUID(r);try{return await _request(this.fetch,"DELETE",`${this.url}/admin/users/${r}`,{headers:this.headers,body:{should_soft_delete:a},xform:_userResponse})}catch(l){if(isAuthError(l))return{data:{user:null},error:l};throw l}}async _listFactors(r){validateUUID(r.userId);try{const{data:a,error:l}=await _request(this.fetch,"GET",`${this.url}/admin/users/${r.userId}/factors`,{headers:this.headers,xform:c=>({data:{factors:c},error:null})});return{data:a,error:l}}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _deleteFactor(r){validateUUID(r.userId),validateUUID(r.id);try{return{data:await _request(this.fetch,"DELETE",`${this.url}/admin/users/${r.userId}/factors/${r.id}`,{headers:this.headers}),error:null}}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _listOAuthClients(r){var a,l,c,u,d,f,m;try{const y={nextPage:null,lastPage:0,total:0},E=await _request(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(l=(a=r==null?void 0:r.page)===null||a===void 0?void 0:a.toString())!==null&&l!==void 0?l:"",per_page:(u=(c=r==null?void 0:r.perPage)===null||c===void 0?void 0:c.toString())!==null&&u!==void 0?u:""}
4567,xform:_noResolveJsonResponse});if(E.error)throw E.error;const A=await E.json(),P=(d=E.headers.get("x-total-count"))!==null&&d!==void 0?d:0,R=(m=(f=E.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&m!==void 0?m:[];return R.length>0&&(R.forEach(x=>{const M=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),$=JSON.parse(x.split(";")[1].split("=")[1]);y[`${$}Page`]=M}),y.total=parseInt(P)),{data:Object.assign(Object.assign({},A),y),error:null}}catch(y){if(isAuthError(y))return{data:{clients:[]},error:y};throw y}}async _createOAuthClient(r){try{return await _request(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _getOAuthClient(r){try{return await _request(this.fetch,"GET",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _updateOAuthClient(r,a){try{return await _request(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${r}`,{body:a,headers:this.headers,xform:l=>({data:l,error:null})})}catch(l){if(isAuthError(l))return{data:null,error:l};throw l}}async _deleteOAuthClient(r){try{return await _request(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _regenerateOAuthClientSecret(r){try{return await _request(this.fetch,"POST",`${this.url}/admin/oauth/clients/${r}/regenerate_secret`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _listCustomProviders(r){try{const a={};return r!=null&&r.type&&(a.type=r.type),await _request(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:a,xform:l=>{var c;return{data:{providers:(c=l==null?void 0:l.providers)!==null&&c!==void 0?c:[]},error:null}}})}catch(a){if(isAuthError(a))return{data:{providers:[]},error:a};throw a}}async _createCustomProvider(r){try{return await _request(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:r,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _getCustomProvider(r){try{return await _request(this.fetch,"GET",`${this.url}/admin/custom-providers/${r}`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}async _updateCustomProvider(r,a){try{return await _request(this.fetch,"PUT",`${this.url}/admin/custom-providers/${r}`,{body:a,headers:this.headers,xform:l=>({data:l,error:null})})}catch(l){if(isAuthError(l))return{data:null,error:l};throw l}}async _deleteCustomProvider(r){try{return await _request(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${r}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(a){if(isAuthError(a))return{data:null,error:a};throw a}}}function memoryLocalStorageAdapter(o={}){return{getItem:r=>o[r]||null,setItem:(r,a)=>{o[r]=a},removeItem:r=>{delete o[r]}}}const internals={debug:!!(globalThis&&supportsLocalStorage()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class LockAcquireTimeoutError extends Error{constructor(r){super(r),this.isAcquireTimeout=!0}}class NavigatorLockAcquireTimeoutError extends LockAcquireTimeoutError{}async function navigatorLock(o,r,a){internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",o,r);const l=new globalThis.AbortController;r>0&&setTimeout(()=>{l.abort(),internals.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",o)},r),await Promise.resolve();try{return await globalThis.navigator.locks.request(o,r===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:l.signal},async c=>{if(c){internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",o,c.name);try{return await a()}finally{internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",o,c.name)}}else{if(r===0)throw internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",o),new NavigatorLockAcquireTimeoutError(`Acquiring an exclusive Navigator LockManager lock "${o}" immediately failed`);if(internals.debug)try{const u=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(u,null,"  "))}catch(u){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",u)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await a()}})}catch(c){if((c==null?void 0:c.name)==="AbortError"&&r>0)return internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",o),console.warn(`@
4567supabase/gotrue-js: Lock "${o}" was not released within ${r}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(o,{mode:"exclusive",steal:!0},async u=>{if(u){internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",o,u.name);try{return await a()}finally{internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",o,u.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await a()}));throw c}}function polyfillGlobalThis(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function getAddress(o){if(!/^0x[a-fA-F0-9]{40}$/.test(o))throw new Error(`@supabase/auth-js: Address "${o}" is invalid.`);return o.toLowerCase()}function fromHex(o){return parseInt(o,16)}function toHex(o){const r=new TextEncoder().encode(o);return"0x"+Array.from(r,l=>l.toString(16).padStart(2,"0")).join("")}function createSiweMessage(o){var r;const{chainId:a,domain:l,expirationTime:c,issuedAt:u=new Date,nonce:d,notBefore:f,requestId:m,resources:y,scheme:E,uri:A,version:P}=o;{if(!Number.isInteger(a))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${a}`);if(!l)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(d&&d.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${d}`);if(!A)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(P!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${P}`);if(!((r=o.statement)===null||r===void 0)&&r.includes(`
4568`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${o.statement}`)}const R=getAddress(o.address),x=E?`${E}://${l}`:l,M=o.statement?`${o.statement}
4569`:"",$=`${x} wants you to sign in with your Ethereum account:
4570${R}
4571
4572${M}`;let V=`URI: ${A}
4573Version: ${P}
4574Chain ID: ${a}${d?`
4575Nonce: ${d}`:""}
4576Issued At: ${u.toISOString()}`;if(c&&(V+=`
4577Expiration Time: ${c.toISOString()}`),f&&(V+=`
4578Not Before: ${f.toISOString()}`),m&&(V+=`
4579Request ID: ${m}`),y){let B=`
4580Resources:`;for(const O of y){if(!O||typeof O!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${O}`);B+=`
4581- ${O}`}V+=B}return`${$}
4582${V}`}class WebAuthnError extends Error{constructor({message:r,code:a,cause:l,name:c}){var u;super(r,{cause:l}),this.__isWebAuthnError=!0,this.name=(u=c??(l instanceof Error?l.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=a}}class WebAuthnUnknownError extends WebAuthnError{constructor(r,a){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:a,message:r}),this.name="WebAuthnUnknownError",this.originalError=a}}function identifyRegistrationError({error:o,options:r}){var a,l,c;const{publicKey:u}=r;if(!u)throw Error("options was missing required publicKey property");if(o.name==="AbortError"){if(r.signal instanceof AbortSignal)return new WebAuthnError({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:o})}else if(o.name==="ConstraintError"){if(((a=u.authenticatorSelection)===null||a===void 0?void 0:a.requireResidentKey)===!0)return new WebAuthnError({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:o});if(r.mediation==="conditional"&&((l=u.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new WebAuthnError({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:o});if(((c=u.authenticatorSelection)===null||c===void 0?void 0:c.userVerification)==="required")return new WebAuthnError({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:o})}else{if(o.name==="InvalidStateError")return new WebAuthnError({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:o});if(o.name==="NotAllowedError")return new WebAuthnError({message:o.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:o});if(o.name==="NotSupportedError")return u.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new WebAuthnError({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:o}):new WebAuthnError({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:o});if(o.name==="SecurityError"){const d=window.location.hostname;if(isValidDomain(d)){if(u.rp.id!==d)return new WebAuthnError({message:`The RP ID "${u.rp.id}
4582" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:o})}else return new WebAuthnError({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:o})}else if(o.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new WebAuthnError({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:o})}else if(o.name==="UnknownError")return new WebAuthnError({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:o})}return new WebAuthnError({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:o})}function identifyAuthenticationError({error:o,options:r}){const{publicKey:a}=r;if(!a)throw Error("options was missing required publicKey property");if(o.name==="AbortError"){if(r.signal instanceof AbortSignal)return new WebAuthnError({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:o})}else{if(o.name==="NotAllowedError")return new WebAuthnError({message:o.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:o});if(o.name==="SecurityError"){const l=window.location.hostname;if(isValidDomain(l)){if(a.rpId!==l)return new WebAuthnError({message:`The RP ID "${a.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:o})}else return new WebAuthnError({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:o})}else if(o.name==="UnknownError")return new WebAuthnError({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:o})}return new WebAuthnError({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:o})}class WebAuthnAbortService{createNewAbortSignal(){if(this.controller){const a=new Error("Cancelling existing WebAuthn API call for new one");a.name="AbortError",this.controller.abort(a)}const r=new AbortController;return this.controller=r,r.signal}cancelCeremony(){if(this.controller){const r=new Error("Manually cancelling existing WebAuthn API call");r.name="AbortError",this.controller.abort(r),this.controller=void 0}}}const webAuthnAbortService=new WebAuthnAbortService;function deserializeCredentialCreationOptions(o){if(!o)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(o);const{challenge:r,user:a,excludeCredentials:l}=o,c=__rest(o,["challenge","user","excludeCredentials"]),u=base64UrlToUint8Array(r).buffer,d=Object.assign(Object.assign({},a),{id:base64UrlToUint8Array(a.id).buffer}),f=Object.assign(Object.assign({},c),{challenge:u,user:d});if(l&&l.length>0){f.excludeCredentials=new Array(l.length);for(let m=0;m<l.length;m++){const y=l[m];f.excludeCredentials[m]=Object.assign(Object.assign({},y),{id:base64UrlToUint8Array(y.id).buffer,type:y.type||"public-key",transports:y.transports})}}return f}function deserializeCredentialRequestOptions(o){if(!o)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(o);const{challenge:r,allowCredentials:a}=o,l=__rest(o,["challenge","allowCredentials"]),c=base64UrlToUint8Array(r).buffer,u=Object.assign(Object.assign({},l),{challenge:c});if(a&&a.length>0){u.allowCredentials=new Array(a.length);for(let d=0;d<a.length;d++){const f=a[d];u.allowCredentials[d]=Object.assign(Object.assign({},f),{id:base64UrlToUint8Array(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function serializeCredentialCreationResponse(o){var r;if("toJSON"in o&&typeof o.toJSON=="function")return o.toJSON();const a=o;return{id:o.id,rawId:o.id,response:{attestationObject:bytesToBase64URL(new Uint8Array(o.response.attestationObject)),clientDataJSON:bytesToBase64URL(new Uint8Array(o.response.clientDataJSON))},type:"public-key",clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:(r=a.authenticatorAttachment)!==null&&r!==void 0?r:void 0}}function serializeCredentialRequestResponse(o){var r;if("toJSON"in o&&typeof o.toJSON=="function")return o.toJSON();const a=o,l=o.getClientExtensionResults(),c=o.response;return{id:o.id,rawId:o.id,response:{authenticatorData:bytesToBase64URL(new Uint8Array(c.authenticatorData)),clientDataJSON:bytesToBase64URL(new Uint8Array(c.clientDataJSON)),signature:bytesToBase64URL(new Uint8Array(c.signature)),userHandle:c.userHandle?bytesToBase64URL(new Uint8Array(c.userHandle)):void 0},type:"public-key",clientExtensionResults:l,authenticatorAttachment:(r=a.authenticatorAttachment)!==null&&r!==void 0?r:void 0}}function isValidDomain(o){return o==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(o)}function browserSupportsWebAuthn(){var o,r;return!!(isBrowser()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((o=navigator==null?void 0:navigator.credentials)===null||o===void 0?void 0:o.create)=="function"&&typeof((r=navigator==null?void 0:navigator.credentials)===null||r===void 0?void 0:r.get)=="function")}async function createCredential(o){try{const r=await navigator.credentials.create(o);return r?r instanceof PublicKeyCredential?{data:r,error:null}:{data:null,error:new WebAuthnUnknownError("Browser returned unexpected credential type",r)}:{data:null,error:new WebAuthnUnknownError("Empty credential response",r)}}catch(r){return{data:null,error:identifyRegistrationError({error:r,options:o})}}}async function getCredential(o){try{const r=await navigator.credentials.get(o);return r?r instanceof PublicKeyCredential?{data:r,error:null}:{data:null,error:new WebAuthnUnknownError("Browser returned unexpected credential type",r)}:{data:null,error:new WebAuthnUnknownError("Empty credential response",r)}}catch(r){return{data:null,error:identifyAuthenticationError({error:r,options:o})}}}const DEFAULT_CREATION_OPTIONS={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},DEFAULT_REQUEST_OPTIONS={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function deepMerge(...o){const r=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),a=c=>c instanceof ArrayBuffer||ArrayBuffer.isView(c),l={};for(const c of o)if(c)for(const u in c){const d=c[u];if(d!==void 0)if(Array.isArray(d))l[u]=d;else if(a(d))l[u]=d;else if(r(d)){const f=l[u];r(f)?l[u]=deepMerge(f,d):l[u]=deepMerge(d)}else l[u]=d}return l}function mergeCredentialCreationOptions(o,r){return deepMerge(DEFAULT_CREATION_OPTIONS,o,r||{})}function mergeCredentialRequestOptions(o,r){return deepMerge(DEFAULT_REQUEST_OPTIONS,o,r||{})}class WebAuthnApi{constructor(r){this.client=r,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(r){return this.client.mfa.enroll(Object.assign(Object.assign({},r),{factorType:"webauthn"}))}async _challenge({factorId:r,webauthn:a,friendlyName:l,signal:c},u){var d;try{const{data:f,error:m}=await this.client.mfa.challenge({factorId:r,webauthn:a});if(!f)return{data:null,error:m};const y=c??webAuthnAbortService.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:E}=f.webauthn.credential_options.publicKey;if(!E.name){const A=l;if(A)E.name=`${E.id}:${A}`;else{const R=(await this.client.getUser()).data.user,x=((d=R==null?void 0:R.user_metadata)===null||d===void 0?void 0:d.name)||(R==null?void 0:R.email)||(R==null?void 0:R.id)||"User";E.name=`${E.id}:${x}`}}E.displayName||(E.displayName=E.name)}switch(f.webauthn.type){case"create":{const E=mergeCredentialCreationOptions(f.webauthn.credential_options.publicKey,u==null?void 0:u.create),{data:A,error:P}=await createCredential({publicKey:E,signal:y});return A?{data:{factorId:r,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:A}},error:null}:{data:null,error:P}}case"request":{const E=mergeCredentialRequestOptions(f.webauthn.credential_options.publicKey,u==null?void 0:u.request),{data:A,error:P}=await getCredential(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:E,signal:y}));return A?{data:{factorId:r,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:A}},error:null}:{data:null,error:P}}}}catch(f){return isAuthError(f)?{data:null,error:f}:{data:null,error:new AuthUnknownError("Unexpected error in challenge",f)}}}async _verify({challengeId:r,factorId:a,webauthn:l}){return this.client.mfa.verify({factorId:a,challengeId:r,webauthn:l})}async _authenticate({factorId:r,webauthn:{rpId:a=typeof window<"u"?window.location.hostname:void 0,rpOrigins:l=typeof window<"u"?[window.location.origin]:void 0,signal:c}={}},u){if(!a)return{data:null,error:new AuthError("rpId is required for WebAuthn authentication")};try{if(!browserSupportsWebAuthn())return{data:null,error:new AuthUnknownError("Browser does not support WebAuthn",null)};const{data:d,error:f}=await this.challenge({factorId:r,webauthn:{rpId:a,rpOrigins:l},signal:c},{request:u});if(!d)return{data:null,error:f};const{webauthn:m}=d;return this._verify({factorId:r,challengeId:d.challengeId,webauthn:{type:m.type,rpId:a,rpOrigins:l,credential_response:m.credential_response}})}catch(d){return isAuthError(d)?{data:null,error:d}:{data:null,error:new AuthUnknownError("Unexpected error in authenticate",d)}}}async _register({friendlyName:r,webauthn:{rpId:a=typeof window<"u"?window.location.hostname:void 0,rpOrigins:l=typeof window<"u"?[window.location.origin]:void 0,signal:c}={}},u){if(!a)return{data:null,error:new AuthError("rpId is required for WebAuthn registration")};try{if(!browserSupportsWebAuthn())return{data:null,error:new AuthUnknownError("Browser does not support WebAuthn",null)};const{data:d,error:f}=await this._enroll({friendlyName:r});if(!d)return await this.client.mfa.listFactors().then(E=>{var A;return(A=E.data)===null||A===void 0?void 0:A.all.find(P=>P.factor_type==="webauthn"&&P.friendly_name===r&&P.status!=="unverified")}).then(E=>E?this.client.mfa.unenroll({factorId:E==null?void 0:E.id}):void 0),{data:null,error:f};const{data:m,error:y}=await this._challenge({factorId:d.id,friendlyName:d.friendly_name,webauthn:{rpId:a,rpOrigins:l},signal:c},{create:u});return m?this._verify({factorId:d.id,challengeId:m.challengeId,webauthn:{rpId:a,rpOrigins:l,type:m.webauthn.type,credential_response:m.webauthn.credential_response}}):{data:null,error:y}}catch(d){return isAuthError(d)?{data:null,error:d}:{data:null,error:new AuthUnknownError("Unexpected error in register",d)}}}}polyfillGlobalThis();const DEFAULT_OPTIONS={url:GOTRUE_URL,storageKey:STORAGE_KEY,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:DEFAULT_HEADERS$1,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function lockNoOp(o,r,a){return await a()}const GLOBAL_JWKS={};class GoTrueClient{get jwks(){var r,a;return(a=(r=GLOBAL_JWKS[this.storageKey])===null||r===void 0?void 0:r.jwks)!==null&&a!==void 0?a:{keys:[]}}set jwks(r){GLOBAL_JWKS[this.storageKey]=Object.assign(Object.assign({},GLOBAL_JWKS[this.storageKey]),{jwks:r})}get jwks_cached_at(){var r,a;return(a=(r=GLOBAL_JWKS[this.storageKey])===null||r===void 0?void 0:r.cachedAt)!==null&&a!==void 0?a:Number.MIN_SAFE_INTEGER}set jwks_cached_at(r){GLOBAL_JWKS[this.storageKey]=Object.assign(Object.assign({},GLOBAL_JWKS[this.storageKey]),{cachedAt:r})}constructor(r){var a,l,c;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},DEFAULT_OPTIONS),r);if(this.storageKey=u.storageKey,this.instanceID=(a=GoTrueClient.nextInstanceID[this.storageKey])!==null&&a!==void 0?a:0,GoTrueClient.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&isBrowser()){const d=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(d),this.logDebugMessages&&console.trace(d)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.admin=new GoTrueAdminApi({url:u.url,headers:u.headers,fetch:u.fetch}),this.url=u.url,this.headers=u.headers,this.fetch=resolveFetch$1(u.fetch),this.lock=u.lock||lockNoOp,this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCu
4582stomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock?this.lock=u.lock:this.persistSession&&isBrowser()&&(!((l=globalThis==null?void 0:globalThis.navigator)===null||l===void 0)&&l.locks)?this.lock=navigatorLock:this.lock=lockNoOp,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new WebAuthnApi(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(u.storage?this.storage=u.storage:supportsLocalStorage()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=memoryLocalStorageAdapter(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=memoryLocalStorageAdapter(this.memoryStorage)),isBrowser()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(d){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",d)}(c=this.broadcastChannel)===null||c===void 0||c.addEventListener("message",async d=>{this._debug("received broadcast notification from other tab or client",d);try{await this._notifyAllSubscribers(d.data.event,d.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}u.skipAutoInitialize||this.initialize().catch(d=>{this._debug("#initialize()","error",d)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(r){if(this.throwOnError&&r&&r.error)throw r.error;return r}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${version$1}) ${new Date().toISOString()}`}_debug(...r){return this.logDebugMessages&&this.logger(this._logPrefix(),...r),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var r;try{let a={},l="none";if(isBrowser()&&(a=parseParametersFromURL(window.location.href),this._isImplicitGrantCallback(a)?l="implicit":await this._isPKCECallback(a)&&(l="pkce")),isBrowser()&&this.detectSessionInUrl&&l!=="none"){const{data:c,error:u}=await this._getSessionFromURL(a,l);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),isAuthImplicitGrantRedirectError(u)){const m=(r=u.details)===null||r===void 0?void 0:r.code;if(m==="identity_already_exists"||m==="identity_not_found"||m==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:d,redirectType:f}=c;return this._debug("#_initialize()","detected session in URL",d,"redirect type",f),await this._saveSession(d),setTimeout(async()=>{f==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",d):await this._notifyAllSubscribers("SIGNED_IN",d)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(a){return isAuthError(a)?this._returnResult({error:a}):this._returnResult({error:new AuthUnknownError("Unexpected error during initialization",a)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(r){var a,l,c;try{const u=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(l=(a=r==null?void 0:r.options)===null||a===void 0?void 0:a.data)!==null&&l!==void 0?l:{},gotrue_meta_security:{captcha_token:(c=r==null?void 0:r.options)===null||c===void 0?void 0:c.captchaToken}},xform:_sessionResponse}),{data:d,error:f}=u;if(f||!d)return this._returnResult({data:{user:null,session:null},error:f});const m=d.session,y=d.user;return d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",m)),this._returnResult({data:{user:y,session:m},error:null})}catch(u){if(isAuthError(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(r){var a,l,c;try{let u;if("email"in r){const{email:E,password:A,options:P}=r;let R=null,x=null;this.flowType==="pkce"&&([R,x]=await getCodeChallengeAndMethod(this.storage,this.storageKey)),u=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:P==null?void 0:P.emailRedirectTo,body:{email:E,password:A,data:(a=P==null?void 0:P.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:P==null?void 0:P.captchaToken},code_challenge:R,code_challenge_method:x},xform:_sessionResponse})}else if("phone"in r){const{phone:E,password:A,options:P}=r;u=await _request(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:E,password:A,data:(l=P==null?void 0:P.data)!==null&&l!==void 0?l:{},channel:(c=P==null?void 0:P.channel)!==null&&c!==void 0?c:"sms",gotrue_meta_security:{captcha_token:P==null?void 0:P.captchaToken}},xform:_sessionResponse})}else throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a password");const{data:d,error:f}=u;if(f||!d)return await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f});const m=d.session,y=d.user;return d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",m)),this._returnResult({data:{user:y,session:m},error:null})}catch(u){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(r){try{let a;if("email"in r){const{email:u,password:d,options:f}=r;a=await _request(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:d,gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:_sessionResponsePassword})}else if("phone"in r){const{phone:u,password:d,options:f}=r;a=await _request(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:d,gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:_sessionResponsePassword})}else throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a password");const{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});
4582if(!l||!l.session||!l.user){const u=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:Object.assign({user:l.user,session:l.session},l.weak_password?{weakPassword:l.weak_password}:null),error:c})}catch(a){if(isAuthError(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithOAuth(r){var a,l,c,u;return await this._handleProviderSignIn(r.provider,{redirectTo:(a=r.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=r.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=r.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:(u=r.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(r){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(r))}async signInWithWeb3(r){const{chain:a}=r;switch(a){case"ethereum":return await this.signInWithEthereum(r);case"solana":return await this.signInWithSolana(r);default:throw new Error(`@supabase/auth-js: Unsupported chain "${a}"`)}}async signInWithEthereum(r){var a,l,c,u,d,f,m,y,E,A,P;let R,x;if("message"in r)R=r.message,x=r.signature;else{const{chain:M,wallet:$,statement:V,options:B}=r;let O;if(isBrowser())if(typeof $=="object")O=$;else{const Y=window;if("ethereum"in Y&&typeof Y.ethereum=="object"&&"request"in Y.ethereum&&typeof Y.ethereum.request=="function")O=Y.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof $!="object"||!(B!=null&&B.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");O=$}const L=new URL((a=B==null?void 0:B.url)!==null&&a!==void 0?a:window.location.href),F=await O.request({method:"eth_requestAccounts"}).then(Y=>Y).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!F||F.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const j=getAddress(F[0]);let U=(l=B==null?void 0:B.signInWithEthereum)===null||l===void 0?void 0:l.chainId;if(!U){const Y=await O.request({method:"eth_chainId"});U=fromHex(Y)}const G={domain:L.host,address:j,statement:V,uri:L.href,version:"1",chainId:U,nonce:(c=B==null?void 0:B.signInWithEthereum)===null||c===void 0?void 0:c.nonce,issuedAt:(d=(u=B==null?void 0:B.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&d!==void 0?d:new Date,expirationTime:(f=B==null?void 0:B.signInWithEthereum)===null||f===void 0?void 0:f.expirationTime,notBefore:(m=B==null?void 0:B.signInWithEthereum)===null||m===void 0?void 0:m.notBefore,requestId:(y=B==null?void 0:B.signInWithEthereum)===null||y===void 0?void 0:y.requestId,resources:(E=B==null?void 0:B.signInWithEthereum)===null||E===void 0?void 0:E.resources};R=createSiweMessage(G),x=await O.request({method:"personal_sign",params:[toHex(R),j]})}try{const{data:M,error:$}=await _request(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:R,signature:x},!((A=r.options)===null||A===void 0)&&A.captchaToken?{gotrue_meta_security:{captcha_token:(P=r.options)===null||P===void 0?void 0:P.captchaToken}}:null),xform:_sessionResponse});if($)throw $;
4582if(!M||!M.session||!M.user){const V=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null},error:V})}return M.session&&(await this._saveSession(M.session),await this._notifyAllSubscribers("SIGNED_IN",M.session)),this._returnResult({data:Object.assign({},M),error:$})}catch(M){if(isAuthError(M))return this._returnResult({data:{user:null,session:null},error:M});throw M}}async signInWithSolana(r){var a,l,c,u,d,f,m,y,E,A,P,R;let x,M;if("message"in r)x=r.message,M=r.signature;else{const{chain:$,wallet:V,statement:B,options:O}=r;let L;if(isBrowser())if(typeof V=="object")L=V;else{const j=window;if("solana"in j&&typeof j.solana=="object"&&("signIn"in j.solana&&typeof j.solana.signIn=="function"||"signMessage"in j.solana&&typeof j.solana.signMessage=="function"))L=j.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof V!="object"||!(O!=null&&O.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");L=V}const F=new URL((a=O==null?void 0:O.url)!==null&&a!==void 0?a:window.location.href);if("signIn"in L&&L.signIn){const j=await L.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},O==null?void 0:O.signInWithSolana),{version:"1",domain:F.host,uri:F.href}),B?{statement:B}:null));let U;if(Array.isArray(j)&&j[0]&&typeof j[0]=="object")U=j[0];else if(j&&typeof j=="object"&&"signedMessage"in j&&"signature"in j)U=j;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in U&&"signature"in U&&(typeof U.signedMessage=="string"||U.signedMessage instanceof Uint8Array)&&U.signature instanceof Uint8Array)x=typeof U.signedMessage=="string"?U.signedMessage:new TextDecoder().decode(U.signedMessage),M=U.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in L)||typeof L.signMessage!="function"||!("publicKey"in L)||typeof L!="object"||!L.publicKey||!("toBase58"in L.publicKey)||typeof L.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");x=[`${F.host} wants you to sign in with your Solana account:`,L.publicKey.toBase58(),...B?["",B,""]:[""],"Version: 1",`URI: ${F.href}`,`Issued At: ${(c=(l=O==null?void 0:O.signInWithSolana)===null||l===void 0?void 0:l.issuedAt)!==null&&c!==void 0?c:new Date().toISOString()}`,...!((u=O==null?void 0:O.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${O.signInWithSolana.notBefore}`]:[],...!((d=O==null?void 0:O.signInWithSolana)===null||d===void 0)&&d.expirationTime?[`Expiration Time: ${O.signInWithSolana.expirationTime}`]:[],...!((f=O==null?void 0:O.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${O.signInWithSolana.chainId}`]:[],...!((m=O==null?void 0:O.signInWithSolana)===null||m===void 0)&&m.nonce?[`Nonce: ${O.signInWithSolana.nonce}`]:[],...!((y=O==null?void 0:O.signInWithSolana)===null||y===void 0)&&y.requestId?[`Request ID: ${O.signInWithSolana.requestId}`]:[],...!((A=(E=O==null?void 0:O.signInWithSolana)===null||E===void 0?void 0:E.resources)===null||A===void 0)&&A.length?["Resources",...O.signInWithSolana.resources.map(U=>`- ${U}`)]:[]].join(`
4583`);const j=await L.signMessage(new TextEncoder().encode(x),"utf8");if(!j||!(j instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");M=j}}try{const{data:$,error:V}=await _request(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:x,signature:bytesToBase64URL(M)},!((P=r.options)===null||P===void 0)&&P.captchaToken?{gotrue_meta_security:{captcha_token:(R=r.options)===null||R===void 0?void 0:R.captchaToken}}:null),xform:_sessionResponse});if(V)throw V;
4583if(!$||!$.session||!$.user){const B=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null},error:B})}return $.session&&(await this._saveSession($.session),await this._notifyAllSubscribers("SIGNED_IN",$.session)),this._returnResult({data:Object.assign({},$),error:V})}catch($){if(isAuthError($))return this._returnResult({data:{user:null,session:null},error:$});throw $}}async _exchangeCodeForSession(r){const a=await getItemAsync(this.storage,`${this.storageKey}-code-verifier`),[l,c]=(a??"").split("/");try{if(!l&&this.flowType==="pkce")throw new AuthPKCECodeVerifierMissingError;const{data:u,error:d}=await _request(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:r,code_verifier:l},xform:_sessionResponse});if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),d)throw d;if(!u||!u.session||!u.user){const f=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null,redirectType:null},error:f})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:c??null}),error:d})}catch(u){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(r){try{const{options:a,provider:l,token:c,access_token:u,nonce:d}=r,f=await _request(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:l,id_token:c,access_token:u,nonce:d,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:_sessionResponse}),{data:m,error:y}=f;if(y)return this._returnResult({data:{user:null,session:null},error:y});
4583if(!m||!m.session||!m.user){const E=new AuthInvalidTokenResponseError;return this._returnResult({data:{user:null,session:null},error:E})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:m,error:y})}catch(a){if(isAuthError(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithOtp(r){var a,l,c,u,d;try{if("email"in r){const{email:f,options:m}=r;let y=null,E=null;this.flowType==="pkce"&&([y,E]=await getCodeChallengeAndMethod(this.storage,this.storageKey));const{error:A}=await _request(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(a=m==null?void 0:m.data)!==null&&a!==void 0?a:{},create_user:(l=m==null?void 0:m.shouldCreateUser)!==null&&l!==void 0?l:!0,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken},code_challenge:y,code_challenge_method:E},redirectTo:m==null?void 0:m.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:A})}if("phone"in r){const{phone:f,options:m}=r,{data:y,error:E}=await _request(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,data:(c=m==null?void 0:m.data)!==null&&c!==void 0?c:{},create_user:(u=m==null?void 0:m.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken},channel:(d=m==null?void 0:m.channel)!==null&&d!==void 0?d:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:y==null?void 0:y.message_id},error:E})}throw new AuthInvalidCredentialsError("You must provide either an email or phone number.")}catch(f){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async verifyOtp(r){var a,l;try{let c,u;"options"in r&&(c=(a=r.options)===null||a===void 0?void 0:a.redirectTo,u=(l=r.options)===null||l===void 0?void 0:l.captchaToken);const{data:d,error:f}=await _request(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},r),{gotrue_meta_security:{captcha_token:u}}),redirectTo:c,xform:_sessionResponse});if(f)throw f;if(!d)throw new Error("An error occurred on token verification.");const m=d.session,y=d.user;return m!=null&&m.access_token&&(await this._saveSession(m),await this._notifyAllSubscribers(r.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",m)),this._returnResult({data:{user:y,session:m},error:null})}catch(c){if(isAuthError(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithSSO(r){var a,l,c,u,d;try{let f=null,m=null;this.flowType==="pkce"&&([f,m]=await getCodeChallengeAndMethod(this.storage,this.storageKey));const y=await _request(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in r?{provider_id:r.providerId}:null),"domain"in r?{domain:r.domain}:null),{redirect_to:(l=(a=r.options)===null||a===void 0?void 0:a.redirectTo)!==null&&l!==void 0?l:void 0}),!((c=r==null?void 0:r.options)===null||c===void 0)&&c.captchaToken?{gotrue_meta_security:{captcha_token:r.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:f,code_challenge_method:m}),headers:this.headers,xform:_ssoResponse});return!((u=y.data)===null||u===void 0)&&u.url&&isBrowser()&&!(!((d=r.options)===null||d===void 0)&&d.skipBrowserRedirect)&&window.location.assign(y.data.url),this._returnResult(y)}catch(f){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async r=>{const{data:{session:a},error:l}=r;if(l)throw l;if(!a)throw new AuthSessionMissingError;const{error:c}=await _request(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:a.access_token});return this._returnResult({data:{user:null,session:null},error:c})})}catch(r){if(isAuthError(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async resend(r){try{const a=`${this.url}/resend`;if("email"in r){const{email:l,type:c,options:u}=r,{error:d}=await _request(this.fetch,"POST",a,{headers:this.headers,body:{email:l,type:c,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},redirectTo:u==null?void 0:u.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}else if("phone"in r){const{phone:l,type:c,options:u}=r,{data:d,error:f}=await _request(this.fetch,"POST",a,{headers:this.headers,body:{phone:l,type:c,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:f})}throw new AuthInvalidCredentialsError("You must provide either an email or phone number and a type")}catch(a){if(isAuthError(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async a=>a))}async _acquireLock(r,a){this._debug("#_acquireLock","begin",r);try{if(this.lockAcquired){const l=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),c=(async()=>(await l,await a()))();return this.pendingInLock.push((async()=>{try{await c}catch{}})()),c}return await this.lock(`lock:${this.storageKey}`,r,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const l=a();for(this.pendingInLock.push((async()=>{try{await l}catch{}})()),await l;this.pendingInLock.length;){const c=[...this.pendingInLock];await Promise.all(c),this.pendingInLock.splice(0,c.length)}return await l}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(r){this._debug("#_useSession","begin");try{const a=await this.__loadSession();return await r(a)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let r=null;const a=await getItemAsync(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",a),a!==null&&(this._isValidSession(a)?r=a:(this._debug("#getSession()","session from storage is not val
4583id"),await this._removeSession())),!r)return{data:{session:null},error:null};const l=r.expires_at?r.expires_at*1e3-Date.now()<EXPIRY_MARGIN_MS:!1;if(this._debug("#__loadSession()",`session has${l?"":" not"} expired`,"expires_at",r.expires_at),!l){if(this.userStorage){const d=await getItemAsync(this.userStorage,this.storageKey+"-user");d!=null&&d.user?r.user=d.user:r.user=userNotAvailableProxy()}if(this.storage.isServer&&r.user&&!r.user.__isUserNotAvailableProxy){const d={value:this.suppressGetSessionWarning};r.user=insecureUserWarningProxy(r.user,d),d.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:r},error:null}}const{data:c,error:u}=await this._callRefreshToken(r.refresh_token);return u?this._returnResult({data:{session:null},error:u}):this._returnResult({data:{session:c},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(r){if(r)return await this._getUser(r);await this.initializePromise;const a=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return a.data.user&&(this.suppressGetSessionWarning=!0),a}async _getUser(r){try{return r?await _request(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:r,xform:_userResponse}):await this._useSession(async a=>{var l,c,u;const{data:d,error:f}=a;if(f)throw f;return!(!((l=d.session)===null||l===void 0)&&l.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new AuthSessionMissingError}:await _request(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0,xform:_userResponse})})}catch(a){if(isAuthError(a))return isAuthSessionMissingError(a)&&(await this._removeSession(),await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:a});throw a}}async updateUser(r,a={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(r,a))}async _updateUser(r,a={}){try{return await this._useSession(async l=>{const{data:c,error:u}=l;if(u)throw u;if(!c.session)throw new AuthSessionMissingError;const d=c.session;let f=null,m=null;this.flowType==="pkce"&&r.email!=null&&([f,m]=await getCodeChallengeAndMethod(this.storage,this.storageKey));const{data:y,error:E}=await _request(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:a==null?void 0:a.emailRedirectTo,body:Object.assign(Object.assign({},r),{code_challenge:f,code_challenge_method:m}),jwt:d.access_token,xform:_userResponse});if(E)throw E;return d.user=y.user,await this._saveSession(d),await this._notifyAllSubscribers("USER_UPDATED",d),this._returnResult({data:{user:d.user},error:null})})}catch(l){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(l))return this._returnResult({data:{user:null},error:l});throw l}}async setSession(r){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(r))}async _setSession(r){try{if(!r.access_token||!r.refresh_token)throw new AuthSessionMissingError;const a=Date.now()/1e3;let l=a,c=!0,u=null;const{payload:d}=decodeJWT(r.access_token);if(d.exp&&(l=d.exp,c=l<=a),c){const{data:f,error:m}=await this._callRefreshToken(r.refresh_token);if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!f)return{data:{user:null,session:null},error:null};u=f}else{const{data:f,error:m}=await this._getUser(r.access_token);if(m)return this._returnResult({data:{user:null,session:null},error:m});u={access_token:r.access_token,refresh_token:r.refresh_token,user:f.user,token_type:"bearer",expires_in:l-a,expires_at:l},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(a){if(isAuthError(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}}async refreshSession(r){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(r))}async _refreshSession(r){try{return await this._useSession(async a=>{var l;if(!r){const{data:d,error:f}=a;if(f)throw f;r=(l=d.session)!==null&&l!==void 0?l:void 0}if(!(r!=null&&r.refresh_token))throw new AuthSessionMissingError;
4583const{data:c,error:u}=await this._callRefreshToken(r.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):c?this._returnResult({data:{user:c.user,session:c},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(a){if(isAuthError(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async _getSessionFromURL(r,a){try{if(!isBrowser())throw new AuthImplicitGrantRedirectError("No browser detected.");if(r.error||r.error_description||r.error_code)throw new AuthImplicitGrantRedirectError(r.error_description||"Error in URL with unspecified error_description",{error:r.error||"unspecified_error",code:r.error_code||"unspecified_code"});switch(a){case"implicit":if(this.flowType==="pkce")throw new AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");break;default:}if(a==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!r.code)throw new AuthPKCEGrantCodeExchangeError("No code detected.");const{data:B,error:O}=await this._exchangeCodeForSession(r.code);if(O)throw O;const L=new URL(window.location.href);return L.searchParams.delete("code"),window.history.replaceState(window.history.state,"",L.toString()),{data:{session:B.session,redirectType:null},error:null}}const{provider_token:l,provider_refresh_token:c,access_token:u,refresh_token:d,expires_in:f,expires_at:m,token_type:y}=r;if(!u||!f||!d||!y)throw new AuthImplicitGrantRedirectError("No session defined in URL");const E=Math.round(Date.now()/1e3),A=parseInt(f);let P=E+A;m&&(P=parseInt(m));const R=P-E;R*1e3<=AUTO_REFRESH_TICK_DURATION_MS&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${R}s, should have been closer to ${A}s`);const x=P-A;E-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,P,E):E-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,P,E);const{data:M,error:$}=await this._getUser(u);if($)throw $;const V={provider_token:l,provider_refresh_token:c,access_token:u,expires_in:A,expires_at:P,refresh_token:d,token_type:y,user:M.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:V,redirectType:r.type},error:null})}catch(l){if(isAuthError(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(r){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),r):!!(r.access_token||r.error_description)}async _isPKCECallback(r){const a=await getItemAsync(this.storage,`${this.storageKey}-code-verifier`);return!!(r.code&&a)}async signOut(r={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(r))}async _signOut({scope:r}={scope:"global"}){return await this._useSession(async a=>{var l;const{data:c,error:u}=a;if(u&&!isAuthSessionMissingError(u))return this._returnResult({error:u});const d=(l=c.session)===null||l===void 0?void 0:l.access_token;if(d){const{error:f}=await this.admin.signOut(d,r);if(f&&!(isAuthApiError(f)&&(f.status===404||f.status===401||f.status===403)||isAuthSessionMissingError(f)))return this._returnResult({error:f})}return r!=="others"&&(await this._removeSession(),await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(r){const a=generateCallbackId(),l={id:a,callback:r,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",a),this.stateChangeEmitters.delete(a)}};return this._debug("#onAuthStateChange()","registered callback with id",a),this.stateChangeEmitters.set(a,l),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(a)})))(),{data:{subscription:l}}}async _emitInitialSession(r){return await this._useSession(async a=>{var l,c;try{const{data:{session:u},error:d}=a;if(d)throw d;await((l=this.stateChangeEmitters.get(r))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",r,"session",u)}catch(u){await((c=this.stateChangeEmitters.get(r))===null||c===void 0?void 0:c.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",r,"error",u),console.error(u)}})}async resetPasswordForEmail(r,a={}){let l=null,c=null;this.flowType==="pkce"&&([l,c]=await getCodeChallengeAndMethod(this.storage,this.storageKey,!0));try{return await _request(this.fetch,"POST",`${this.url}/recover`,{body:{email:r,code_challenge:l,code_challenge_method:c,gotrue_meta_security:{captcha_token:a.captchaToken}},headers:this.headers,redirectTo:a.redirectTo})}catch(u){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var r;try{const{data:a,error:l}=await this.getUser();if(l)throw l;return this._returnResult({data:{identities:(r=a.user.identities)!==null&&r!==void 0?r:[]},error:null})}catch(a){if(isAuthError(a))return this._returnResult({data:null,error:a});throw a}}async linkIdentity(r){return"token"in r?this.linkIdentityIdToken(r):this.linkIdentityOAuth(r)}async linkIdentityOAuth(r){var a;try{const{data:l,error:c}=await this._useSession(async u=>{var d,f,m,y,E;const{data:A,error:P}=u;if(P)throw P;const R=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,r.provider,{redirectTo:(d=r.options)===null||d===void 0?void 0:d.redirectTo,scopes:(f=r.options)===null||f===void 0?void 0:f.scopes,queryParams:(m=r.options)===null||m===void 0?void 0:m.queryParams,skipBrowserRedirect:!0});return await _request(this.fetch,"GET",R,{headers:this.headers,jwt:(E=(y=A.session)===null||y===void 0?void 0:y.access_token)!==null&&E!==void 0?E:void 0})});if(c)throw c;return isBrowser()&&!(!((a=r.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(l==null?void 0:l.url),this._returnResult({data:{provider:r.provider,url:l==null?void 0:l.url},error:null})}catch(l){if(isAuthError(l))return this._returnResult({data:{provider:r.provider,url:null},error:l});throw l}}async linkIdentityIdToken(r){return await this._useSession(async a=>{var l;try{const{error:c,data:{session:u}}=a;if(c)throw c;const{options:d,provider:f,token:m,access_token:y,nonce:E}=r,A=await _request(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(l=u==null?void 0:u.access_token)!==null&&l!==void 0?l:void 0,body:{provider:f,id_token:m,access_token:y,nonce:E,link_identity:!0,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:_sessionResponse}),{data:P,error:R}=A;return R?this._returnResult({data:{user:null,session:null},error:R}):!P||!P.session||!P.user?this._returnResult({data:{user:null,session:null}
4583,error:new AuthInvalidTokenResponseError}):(P.session&&(await this._saveSession(P.session),await this._notifyAllSubscribers("USER_UPDATED",P.session)),this._returnResult({data:P,error:R}))}catch(c){if(await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`),isAuthError(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}})}async unlinkIdentity(r){try{return await this._useSession(async a=>{var l,c;const{data:u,error:d}=a;if(d)throw d;return await _request(this.fetch,"DELETE",`${this.url}/user/identities/${r.identity_id}`,{headers:this.headers,jwt:(c=(l=u.session)===null||l===void 0?void 0:l.access_token)!==null&&c!==void 0?c:void 0})})}catch(a){if(isAuthError(a))return this._returnResult({data:null,error:a});throw a}}async _refreshAccessToken(r){const a=`#_refreshAccessToken(${r.substring(0,5)}...)`;this._debug(a,"begin");try{const l=Date.now();return await retryable(async c=>(c>0&&await sleep(200*Math.pow(2,c-1)),this._debug(a,"refreshing attempt",c),await _request(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:r},headers:this.headers,xform:_sessionResponse})),(c,u)=>{const d=200*Math.pow(2,c);return u&&isAuthRetryableFetchError(u)&&Date.now()+d-l<AUTO_REFRESH_TICK_DURATION_MS})}catch(l){if(this._debug(a,"error",l),isAuthError(l))return this._returnResult({data:{session:null,user:null},error:l});throw l}finally{this._debug(a,"end")}}_isValidSession(r){return typeof r=="object"&&r!==null&&"access_token"in r&&"refresh_token"in r&&"expires_at"in r}async _handleProviderSignIn(r,a){const l=await this._getUrlForProvider(`${this.url}/authorize`,r,{redirectTo:a.redirectTo,scopes:a.scopes,queryParams:a.queryParams});return this._debug("#_handleProviderSignIn()","provider",r,"options",a,"url",l),isBrowser()&&!a.skipBrowserRedirect&&window.location.assign(l),{data:{provider:r,url:l},error:null}}async _recoverAndRefresh(){var r,a;const l="#_recoverAndRefresh()";this._debug(l,"begin");try{const c=await getItemAsync(this.storage,this.storageKey);if(c&&this.userStorage){let d=await getItemAsync(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!d&&(d={user:c.user},await setItemAsync(this.userStorage,this.storageKey+"-user",d)),c.user=(r=d==null?void 0:d.user)!==null&&r!==void 0?r:userNotAvailableProxy()}else if(c&&!c.user&&!c.user){const d=await getItemAsync(this.storage,this.storageKey+"-user");d&&(d!=null&&d.user)?(c.user=d.user,await removeItemAsync(this.storage,this.storageKey+"-user"),await setItemAsync(this.storage,this.storageKey,c)):c.user=userNotAvailableProxy()}if(this._debug(l,"session from storage",c),!this._isValidSession(c)){this._debug(l,"session is not valid"),c!==null&&await this._removeSession();return}const u=((a=c.expires_at)!==null&&a!==void 0?a:1/0)*1e3-Date.now()<EXPIRY_MARGIN_MS;if(this._debug(l,`session has${u?"":" not"} expired with margin of ${EXPIRY_MARGIN_MS}s`),u){if(this.autoRefreshToken&&c.refresh_token){const{error:d}=await this._callRefreshToken(c.refresh_token);d&&(console.error(d),isAuthRetryableFetchError(d)||(this._debug(l,"refresh failed with a non-retryable error, removing the session",d),await this._removeSession()))}}else if(c.user&&c.user.__isUserNotAvailableProxy===!0)try{const{data:d,error:f}=await this._getUser(c.access_token);!f&&(d!=null&&d.user)?(c.user=d.user,await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)):this._debug(l,"could not get user data, skipping SIGNED_IN notification")}catch(d){console.error("Error getting user data:",d),this._debug(l,"error getting user data, skipping SIGNED_IN notification",d)}else await this._notifyAllSubscribers("SIGNED_IN",c)}catch(c){this._debug(l,"error",c),console.error(c);return}finally{this._debug(l,"end")}}async _callRefreshToken(r){var a,l;if(!r)throw new AuthSessionMissingError;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const c=`#_callRefreshToken(${r.substring(0,5)}...)`;this._debug(c,"begin");try{this.refreshingDeferred=new Deferred;const{data:u,error:d}=await this._refreshAccessToken(r);if(d)throw d;if(!u.session)throw new AuthSessionMissingError;await this._saveSession(u.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const f={data:u.session,error:null};return this.refreshingDeferred.resolve(f),f}catch(u){if(this._debug(c,"error",u),isAuthError(u)){const d={data:null,error:u};return isAuthRetryableFetchError(u)||await this._removeSession(),(a=this.refreshingDeferred)===null||a===void 0||a.resolve(d),d}throw(l=this.refreshingDeferred)===null||l===void 0||l.reject(u),u}finally{this.refreshingDeferred=null,this._debug(c,"end")}}async _notifyAllSubscribers(r,a,l=!0){const c=`#_notifyAllSubscribers(${r})`;this._debug(c,"begin",a,`broadcast = ${l}`);try{this.broadcastChannel&&l&&this.broadcastChannel.postMessage({event:r,session:a});const u=[],d=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(r,a)}catch(m){u.push(m)}});if(await Promise.all(d),u.length>0){for(let f=0;f<u.length;f+=1)console.error(u[f]);throw u[0]}}finally{this._debug(c,"end")}}async _saveSession(r){this._debug("#_saveSession()",r),this.suppressGetSessionWarning=!0,await removeItemAsync(this.storage,`${this.storageKey}-code-verifier`);const a=Object.assign({},r),l=a.user&&a.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!l&&a.user&&await setItemAsync(this.userStorage,this.storageKey+"-user",{user:a.user});const c=Object.assign({},a);delete c.user;const u=deepClone(c);await setItemAsync(this.storage,this.storageKey,u)}else{const c=deepClone(a);await setItemAsync(this.storage,this.storageKey,c)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await removeItemAsync(this.storage,this.storageKey),await removeItemAsync(this.storage,this.storageKey+"-code-verifier"),await removeItemAsync(this.storage,this.storageKey+"-user"),this.userStorage&&await removeItemAsync(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const r=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{r&&isBrowser()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",r)}
4583catch(a){console.error("removing visibilitychange callback failed",a)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const r=setInterval(()=>this._autoRefreshTokenTick(),AUTO_REFRESH_TICK_DURATION_MS);this.autoRefreshTicker=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r);const a=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=a,a&&typeof a=="object"&&typeof a.unref=="function"?a.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(a)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const r=this.autoRefreshTicker;this.autoRefreshTicker=null,r&&clearInterval(r);const a=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,a&&clearTimeout(a)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const r=Date.now();try{return await this._useSession(async a=>{const{data:{session:l}}=a;if(!l||!l.refresh_token||!l.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const c=Math.floor((l.expires_at*1e3-r)/AUTO_REFRESH_TICK_DURATION_MS);this._debug("#_autoRefreshTokenTick()",`access token expires in ${c} ticks, a tick lasts ${AUTO_REFRESH_TICK_DURATION_MS}ms, refresh threshold is ${AUTO_REFRESH_TICK_THRESHOLD} ticks`),c<=AUTO_REFRESH_TICK_THRESHOLD&&await this._callRefreshToken(l.refresh_token)})}catch(a){console.error("Auto refresh tick failed with error. This is likely a transient error.",a)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(r){if(r.isAcquireTimeout||r instanceof LockAcquireTimeoutError)this._debug("auto refresh token tick lock not available");else throw r}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!isBrowser()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(r){this._debug("#visibilityChangedCallback","error",r)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(r){console.error("_handleVisibilityChange",r)}}async _onVisibilityChanged(r){const a=`#_onVisibilityChanged(${r})`;this._debug(a,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),r||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(a,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(r,a,l){const c=[`provider=${encodeURIComponent(a)}`];if(l!=null&&l.redirectTo&&c.push(`redirect_to=${encodeURIComponent(l.redirectTo)}`),l!=null&&l.scopes&&c.push(`scopes=${encodeURIComponent(l.scopes)}`),this.flowType==="pkce"){const[u,d]=await getCodeChallengeAndMethod(this.storage,this.storageKey),f=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(d)}`});c.push(f.toString())}if(l!=null&&l.queryParams){const u=new URLSearchParams(l.queryParams);c.push(u.toString())}return l!=null&&l.skipBrowserRedirect&&c.push(`skip_http_redirect=${l.skipBrowserRedirect}`),`${r}?${c.join("&")}`}async _unenroll(r){try{return await this._useSession(async a=>{var l;const{data:c,error:u}=a;return u?this._returnResult({data:null,error:u}):await _request(this.fetch,"DELETE",`${this.url}/factors/${r.factorId}`,{headers:this.headers,jwt:(l=c==null?void 0:c.session)===null||l===void 0?void 0:l.access_token})})}catch(a){if(isAuthError(a))return this._returnResult({data:null,error:a});throw a}}async _enroll(r){try{return await this._useSession(async a=>{var l,c;const{data:u,error:d}=a;if(d)return this._returnResult({data:null,error:d});const f=Object.assign({friendly_name:r.friendlyName,factor_type:r.factorType},r.factorType==="phone"?{phone:r.phone}:r.factorType==="totp"?{issuer:r.issuer}:{}),{data:m,error:y}=await _request(this.fetch,"POST",`${this.url}/factors`,{body:f,headers:this.headers,jwt:(l=u==null?void 0:u.session)===null||l===void 0?void 0:l.access_token});return y?this._returnResult({data:null,error:y}):(r.factorType==="totp"&&m.type==="totp"&&(!((c=m==null?void 0:m.totp)===null||c===void 0)&&c.qr_code)&&(m.totp.qr_code=`data:image/svg+xml;utf-8,${m.totp.qr_code}`),this._returnResult({data:m,error:null}))})}catch(a){if(isAuthError(a))return this._returnResult({data:null,error:a});throw a}}async _verify(r){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async a=>{var l;const{data:c,error:u}=a;if(u)return this._returnResult({data:null,error:u});const d=Object.assign({challenge_id:r.challengeId},"webauthn"in r?{webauthn:Object.assign(Object.assign({},r.webauthn),{credential_response:r.webauthn.type==="create"?serializeCredentialCreationResponse(r.webauthn.credential_response):serializeCredentialRequestResponse(r.webauthn.credential_response)})}:{code:r.code}),{data:f,error:m}=await _request(this.fetch,"POST",`${this.url}/factors/${r.factorId}/verify`,{body:d,headers:this.headers,jwt:(l=c==null?void 0:c.session)===null||l===void 0?void 0:l.access_token});return m?this._returnResult({data:null,error:m}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+f.expires_in},f)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",f),this._returnResult({data:f,error:m}))})}catch(a){if(isAuthError(a))return this._returnResult({data:null,error:a});throw a}})}async _challenge(r){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async a=>{var l;const{data:c,error:u}=a;if(u)return this._returnResult({data:null,error:u});const d=await _request(this.fetch,"POST",`${this.url}/factors/${r.factorId}/challenge`,{body:r,headers:this.headers,jwt:(l=c==null?void 0:c.session)===null||l===void 0?void 0:l.access_token});if(d.error)return d;const{data:f}=d;if(f.type!=="webauthn")return{data:f,error:null};switch(f.webauthn.type){case"create":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:deserializeCredentialCreationOptions(f.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},f),{webauthn:Object.assign(Object.assign({},f.webauthn),{credential_options:Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:deserializeCredentialRequestOptions(f.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(isAuthError(a))return this._returnResult({data:null,error:a});throw a}})}async _challengeAndVerify(r){const{data:a,error:l}=await this._challenge({factorId:r.factorId});return l?this._returnResult({data:null,error:l}):await this._verify({factorId:r.factorId,challengeId:a.id,code:r.code})}async _listFactors(){var r;const{data:{user:a},error:l}=await this.getUser();if(l)return{data:null,error:l};const c={all:[],phone:[],totp:[],webauthn:[]};for(const u of(r=a==null?void 0:a.factors)!==null&&r!==void 0?r:[])c.all.push(u),u.status==="verified"&&c[u.factor_type].push(u);return{data:c,error:null}}async _getAuthenticatorAssuranceLevel(r){var a,l,c,u;if(r)try{const{payload:R}=decodeJWT(r);let x=null;R.aal&&(x=R.aal);let M=x;const{data:{user:$},error:V}=await this.getUser(r);if(V)return this._returnResult({data:null,error:V});((l=(a=$==null?void 0:$.factors)===null||a===void 0?void 0:a.filter(L=>L.status==="verified"))!==null&&l!==void 0?l:[]).length>0&&(M="aal2");const O=R.amr||[];return{data:{currentLevel:x,nextLevel:M,currentAuthenticationMethods:O},error:null}}catch(R){if(isAuthError(R))return this._returnResult({data:null,error:R});throw R}const{data:{session:d},error:f}
4583=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!d)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:m}=decodeJWT(d.access_token);let y=null;m.aal&&(y=m.aal);let E=y;((u=(c=d.user.factors)===null||c===void 0?void 0:c.filter(R=>R.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(E="aal2");const P=m.amr||[];return{data:{currentLevel:y,nextLevel:E,currentAuthenticationMethods:P},error:null}}async _getAuthorizationDetails(r){try{return await this._useSession(async a=>{const{data:{session:l},error:c}=a;return c?this._returnResult({data:null,error:c}):l?await _request(this.fetch,"GET",`${this.url}/oauth/authorizations/${r}`,{headers:this.headers,jwt:l.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new AuthSessionMissingError})})}catch(a){if(isAuthError(a))return this._returnResult({data:null,error:a});throw a}}async _approveAuthorization(r,a){try{return await this._useSession(async l=>{const{data:{session:c},error:u}=l;if(u)return this._returnResult({data:null,error:u});if(!c)return this._returnResult({data:null,error:new AuthSessionMissingError});const d=await _request(this.fetch,"POST",`${this.url}/oauth/authorizations/${r}/consent`,{headers:this.headers,jwt:c.access_token,body:{action:"approve"},xform:f=>({data:f,error:null})});return d.data&&d.data.redirect_url&&isBrowser()&&!(a!=null&&a.skipBrowserRedirect)&&window.location.assign(d.data.redirect_url),d})}catch(l){if(isAuthError(l))return this._returnResult({data:null,error:l});throw l}}async _denyAuthorization(r,a){try{return await this._useSession(async l=>{const{data:{session:c},error:u}=l;if(u)return this._returnResult({data:null,error:u});if(!c)return this._returnResult({data:null,error:new AuthSessionMissingError});const d=await _request(this.fetch,"POST",`${this.url}/oauth/authorizations/${r}/consent`,{headers:this.headers,jwt:c.access_token,body:{action:"deny"},xform:f=>({data:f,error:null})});return d.data&&d.data.redirect_url&&isBrowser()&&!(a!=null&&a.skipBrowserRedirect)&&window.location.assign(d.data.redirect_url),d})}catch(l){if(isAuthError(l))return this._returnResult({data:null,error:l});throw l}}async _listOAuthGrants(){try{return await this._useSession(async r=>{const{data:{session:a},error:l}=r;return l?this._returnResult({data:null,error:l}):a?await _request(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new AuthSessionMissingError})})}catch(r){if(isAuthError(r))return this._returnResult({data:null,error:r});throw r}}async _revokeOAuthGrant(r){try{return await this._useSession(async a=>{const{data:{session:l},error:c}=a;return c?this._returnResult({data:null,error:c}):l?(await _request(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:l.access_token,query:{client_id:r.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new AuthSessionMissingError})})}catch(a){if(isAuthError(a))return this._returnResult({data:null,error:a});throw a}}async fetchJwk(r,a={keys:[]}){let l=a.keys.find(f=>f.kid===r);if(l)return l;const c=Date.now();if(l=this.jwks.keys.find(f=>f.kid===r),l&&this.jwks_cached_at+JWKS_TTL>c)return l;const{data:u,error:d}=await _request(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(d)throw d;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=c,l=u.keys.find(f=>f.kid===r),!l)?null:l}async getClaims(r,a={}){try{let l=r;if(!l){const{data:R,error:x}
4583=await this.getSession();if(x||!R.session)return this._returnResult({data:null,error:x});l=R.session.access_token}const{header:c,payload:u,signature:d,raw:{header:f,payload:m}}=decodeJWT(l);a!=null&&a.allowExpired||validateExp(u.exp);const y=!c.alg||c.alg.startsWith("HS")||!c.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(c.kid,a!=null&&a.keys?{keys:a.keys}:a==null?void 0:a.jwks);if(!y){const{error:R}=await this.getUser(l);if(R)throw R;return{data:{claims:u,header:c,signature:d},error:null}}const E=getAlgorithm(c.alg),A=await crypto.subtle.importKey("jwk",y,E,!0,["verify"]);if(!await crypto.subtle.verify(E,A,d,stringToUint8Array(`${f}.${m}`)))throw new AuthInvalidJwtError("Invalid JWT signature");return{data:{claims:u,header:c,signature:d},error:null}}catch(l){if(isAuthError(l))return this._returnResult({data:null,error:l});throw l}}}GoTrueClient.nextInstanceID={};const AuthClient=GoTrueClient,version="2.99.0";let JS_ENV="";typeof Deno<"u"?JS_ENV="deno":typeof document<"u"?JS_ENV="web":typeof navigator<"u"&&navigator.product==="ReactNative"?JS_ENV="react-native":JS_ENV="node";const DEFAULT_HEADERS={"X-Client-Info":`supabase-js-${JS_ENV}/${version}`},DEFAULT_GLOBAL_OPTIONS={headers:DEFAULT_HEADERS},DEFAULT_DB_OPTIONS={schema:"public"},DEFAULT_AUTH_OPTIONS={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},DEFAULT_REALTIME_OPTIONS={};function _typeof(o){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(o)}function toPrimitive(o,r){if(_typeof(o)!="object"||!o)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var l=a.call(o,r);if(_typeof(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(o)}function toPropertyKey(o){var r=toPrimitive(o,"string");return _typeof(r)=="symbol"?r:r+""}function _defineProperty(o,r,a){return(r=toPropertyKey(r))in o?Object.defineProperty(o,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[r]=a,o}function ownKeys(o,r){var a=Object.keys(o);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);r&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(o,c).enumerable})),a.push.apply(a,l)}return a}function _objectSpread2(o){for(var r=1;r<arguments.length;r++){var a=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(a),!0).forEach(function(l){_defineProperty(o,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach(function(l){Object.defineProperty(o,l,Object.getOwnPropertyDescriptor(a,l))})}return o}const resolveFetch=o=>o?(...r)=>o(...r):(...r)=>fetch(...r),resolveHeadersConstructor=()=>Headers,fetchWithAuth=(o,r,a)=>{const l=resolveFetch(a),c=resolveHeadersConstructor();return async(u,d)=>{var f;const m=(f=await r())!==null&&f!==void 0?f:o;let y=new c(d==null?void 0:d.headers);return y.has("apikey")||y.set("apikey",o),y.has("Authorization")||y.set("Authorization",`Bearer ${m}`),l(u,_objectSpread2(_objectSpread2({},d),{},{headers:y}))}};function ensureTrailingSlash(o){return o.endsWith("/")?o:o+"/"}function applySettingDefaults(o,r){var a,l;const{db:c,auth:u,realtime:d,global:f}=o,{db:m,auth:y,realtime:E,global:A}=r,P={db:_objectSpread2(_objectSpread2({},m),c),auth:_objectSpread2(_objectSpread2({},y),u),realtime:_objectSpread2(_objectSpread2({},E),d),storage:{},global:_objectSpread2(_objectSpread2(_objectSpread2({},A),f),{},{headers:_objectSpread2(_objectSpread2({},(a=A==null?void 0:A.headers)!==null&&a!==void 0?a:{}),(l=f==null?void 0:f.headers)!==null&&l!==void 0?l:{})}),accessToken:async()=>""};return o.accessToken?P.accessToken=o.accessToken:delete P.accessToken,P}function validateSupabaseUrl(o){const r=o==null?void 0:o.trim();if(!r)throw new Error("supabaseUrl is required.");if(!r.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(ensureTrailingSlash(r))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var SupabaseAuthClient=class extends AuthClient{constructor(o){super(o)}},SupabaseClient=class{constructor(o,r,a){var l,c;this.supabaseUrl=o,this.supabaseKey=r;const u=validateSupabaseUrl(o);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const d=`sb-${u.hostname.split(".")[0]}-auth-token`,f={db:DEFAULT_DB_OPTIONS,realtime:DEFAULT_REALTIME_OPTIONS,auth:_objectSpread2
4583(_objectSpread2({},DEFAULT_AUTH_OPTIONS),{},{storageKey:d}),global:DEFAULT_GLOBAL_OPTIONS},m=applySettingDefaults(a??{},f);if(this.storageKey=(l=m.auth.storageKey)!==null&&l!==void 0?l:"",this.headers=(c=m.global.headers)!==null&&c!==void 0?c:{},m.accessToken)this.accessToken=m.accessToken,this.auth=new Proxy({},{get:(E,A)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(A)} is not possible`)}});else{var y;this.auth=this._initSupabaseAuthClient((y=m.auth)!==null&&y!==void 0?y:{},this.headers,m.global.fetch)}this.fetch=fetchWithAuth(r,this._getAccessToken.bind(this),m.global.fetch),this.realtime=this._initRealtimeClient(_objectSpread2({headers:this.headers,accessToken:this._getAccessToken.bind(this)},m.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(E=>this.realtime.setAuth(E)).catch(E=>console.warn("Failed to set initial Realtime auth token:",E)),this.rest=new PostgrestClient(new URL("rest/v1",u).href,{headers:this.headers,schema:m.db.schema,fetch:this.fetch,timeout:m.db.timeout,urlLengthLimit:m.db.urlLengthLimit}),this.storage=new StorageClient(this.storageUrl.href,this.headers,this.fetch,a==null?void 0:a.storage),m.accessToken||this._listenForAuthEvents()}get functions(){return new FunctionsClient(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}
4583from(o){return this.rest.from(o)}schema(o){return this.rest.schema(o)}rpc(o,r={},a={head:!1,get:!1,count:void 0}){return this.rest.rpc(o,r,a)}channel(o,r={config:{}}){return this.realtime.channel(o,r)}getChannels(){return this.realtime.getChannels()}removeChannel(o){return this.realtime.removeChannel(o)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var o=this,r,a;if(o.accessToken)return await o.accessToken();const{data:l}=await o.auth.getSession();return(r=(a=l.session)===null||a===void 0?void 0:a.access_token)!==null&&r!==void 0?r:o.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:o,persistSession:r,detectSessionInUrl:a,storage:l,userStorage:c,storageKey:u,flowType:d,lock:f,debug:m,throwOnError:y},E,A){const P={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new SupabaseAuthClient({url:this.authUrl.href,headers:_objectSpread2(_objectSpread2({},P),E),storageKey:u,autoRefreshToken:o,persistSession:r,detectSessionInUrl:a,storage:l,userStorage:c,flowType:d,lock:f,debug:m,throwOnError:y,fetch:A,hasCustomAuthorizationHeader:Object.keys(this.headers).some(R=>R.toLowerCase()==="authorization")})}_initRealtimeClient(o){return new RealtimeClient(this.realtimeUrl.href,_objectSpread2(_objectSpread2({},o),{},{params:_objectSpread2(_objectSpread2({},{apikey:this.supabaseKey}),o==null?void 0:o.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((o,r)=>{this._handleTokenChanged(o,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(o,r,a){(o==="TOKEN_REFRESHED"||o==="SIGNED_IN")&&this.changedAccessToken!==a?(this.changedAccessToken=a,this.realtime.setAuth(a)):o==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const createClient=(o,r,a)=>new SupabaseClient(o,r,a);function shouldShowDeprecationWarning(){if(typeof window<"u")return!1;const o=globalThis.process;if(!o)return!1;const r=o.version;if(r==null)return!1;const a=r.match(/^v(\d+)\./);return a?parseInt(a[1],10)<=18:!1}shouldShowDeprecationWarning()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const supabase_h6iDxIS7Fl=defineNuxtPlugin(()=>{const o=useRuntimeConfig(),r=o.public.supabaseUrl,a=o.public.supabaseAnonKey;return!r||!a?(console.warn("[supabase] Missing public config"),{provide:{supabase:null}}):{provide:{supabase:createClient(r,a,{auth:{persistSession:!1,autoRefreshToken:!1}})}}});function t(){return t=Object.assign?Object.assign.bind():function(o){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l])}return o},t.apply(this,arguments)}var s={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,smartBackspace:!0,shuffle:!1,backDelay:700,fadeOut:!1,fadeOutClass:"typed-fade-out",fadeOutDelay:500,loop:!1,loopCount:1/0,showCursor:!0,cursorChar:"|",autoInsertCss:!0,attr:null,bindInputFocusEvents:!1,contentType:"html",onBegin:function(o){},onComplete:function(o){},preStringTyped:function(o,r){},onStringTyped:function(o,r){},onLastStringBackspaced:function(o){},onTypingPaused:function(o,r){},onTypingResumed:function(o,r){},onReset:function(o){},onStop:function(o,r){},onStart:function(o,r){},onDestroy:function(o){}},e=new(function(){function o(){}var r=o.prototype;return r.load=function(a,l,c){if(a.el=typeof c=="string"?document.querySelector(c):c,a.options=t({},s,l),a.isInput=a.el.tagName.toLowerCase()==="input",a.attr=a.options.attr,a.bindInputFocusEvents=a.options.bindInputFocusEvents,a.showCursor=!a.isInput&&a.options.showCursor,a.cursorChar=a.options.cursorChar,a.cursorBlinking=!0,a.elContent=a.attr?a.el.getAttribute(a.attr):a.el.textContent,a.contentType=a.options.contentType,a.typeSpeed=a.options.typeSpeed,a.startDelay=a.options.startDelay,a.backSpeed=a.options.backSpeed,a.smartBackspace=a.options.smartBackspace,a.backDelay=a.options.backDelay,a.fadeOut=a.options.fadeOut,a.fadeOutClass=a.options.fadeOutClass,a.fadeOutDelay=a.options.fadeOutDelay,a.isPaused=!1,a.strings=a.options.strings.map(function(y){return y.trim()}),a.stringsElement=typeof a.options.stringsElement=="string"?document.querySelector(a.options.stringsElement):a.options.stringsElement,a.stringsElement){a.strings=[],a.stringsElement.style.cssText="clip: rect(0 0 0 0);clip-path:inset(50%);
4583height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;";var u=Array.prototype.slice.apply(a.stringsElement.children),d=u.length;if(d)for(var f=0;f<d;f+=1)a.strings.push(u[f].innerHTML.trim())}for(var m in a.strPos=0,a.currentElContent=this.getCurrentElContent(a),a.currentElContent&&a.currentElContent.length>0&&(a.strPos=a.currentElContent.length-1,a.strings.unshift(a.currentElContent)),a.sequence=[],a.strings)a.sequence[m]=m;a.arrayPos=0,a.stopNum=0,a.loop=a.options.loop,a.loopCount=a.options.loopCount,a.curLoop=0,a.shuffle=a.options.shuffle,a.pause={status:!1,typewrite:!0,curString:"",curStrPos:0},a.typingComplete=!1,a.autoInsertCss=a.options.autoInsertCss,a.autoInsertCss&&(this.appendCursorAnimationCss(a),this.appendFadeOutAnimationCss(a))},r.getCurrentElContent=function(a){return a.attr?a.el.getAttribute(a.attr):a.isInput?a.el.value:a.contentType==="html"?a.el.innerHTML:a.el.textContent},r.appendCursorAnimationCss=function(a){var l="data-typed-js-cursor-css";if(a.showCursor&&!document.querySelector("["+l+"]")){var c=document.createElement("style");c.setAttribute(l,"true"),c.innerHTML=`
4584        .typed-cursor{
4585          opacity: 1;
4586        }
4587        .typed-cursor.typed-cursor--blink{
4588          animation: typedjsBlink 0.7s infinite;
4589          -webkit-animation: typedjsBlink 0.7s infinite;
4590                  animation: typedjsBlink 0.7s infinite;
4591        }
4592        @keyframes typedjsBlink{
4593          50% { opacity: 0.0; }
4594        }
4595        @-webkit-keyframes typedjsBlink{
4596          0% { opacity: 1; }
4597          50% { opacity: 0.0; }
4598          100% { opacity: 1; }
4599        }
4600      `,document.body.appendChild(c)}},r.appendFadeOutAnimationCss=function(a){var l="data-typed-fadeout-js-css";if(a.fadeOut&&!document.querySelector("["+l+"]")){var c=document.createElement("style");c.setAttribute(l,"true"),c.innerHTML=`
4601        .typed-fade-out{
4602          opacity: 0;
4603          transition: opacity .25s;
4604        }
4605        .typed-cursor.typed-cursor--blink.typed-fade-out{
4606          -webkit-animation: 0;
4607          animation: 0;
4608        }
4609      `,document.body.appendChild(c)}},o}()),n=new(function(){function o(){}var r=o.prototype;return r.typeHtmlChars=function(a,l,c){if(c.contentType!=="html")return l;var u=a.substring(l).charAt(0);if(u==="<"||u==="&"){var d;for(d=u==="<"?">":";";a.substring(l+1).charAt(0)!==d&&!(1+ ++l>a.length););l++}return l},r.backSpaceHtmlChars=function(a,l,c){if(c.contentType!=="html")return l;var u=a.substring(l).charAt(0);if(u===">"||u===";"){var d;for(d=u===">"?"<":"&";a.substring(l-1).charAt(0)!==d&&!(--l<0););l--}return l},o}()),i=function(){function o(a,l){e.load(this,l,a),this.begin()}var r=o.prototype;return r.toggle=function(){this.pause.status?this.start():this.stop()},r.stop=function(){this.typingComplete||this.pause.status||(this.toggleBlinking(!0),this.pause.status=!0,this.options.onStop(this.arrayPos,this))},r.start=function(){this.typingComplete||this.pause.status&&(this.pause.status=!1,this.pause.typewrite?this.typewrite(this.pause.curString,this.pause.curStrPos):this.backspace(this.pause.curString,this.pause.curStrPos),this.options.onStart(this.arrayPos,this))},r.destroy=function(){this.reset(!1),this.options.onDestroy(this)},r.reset=function(a){a===void 0&&(a=!0),clearInterval(this.timeout),this.replaceText(""),this.cursor&&this.cursor.parentNode&&(this.cursor.parentNode.removeChild(this.cursor),this.cursor=null),this.strPos=0,this.arrayPos=0,this.curLoop=0,a&&(this.insertCursor(),this.options.onReset(this),this.begin())},r.begin=function(){var a=this;this.options.onBegin(this),this.typingComplete=!1,this.shuffleStringsIfNeeded(this),this.insertCursor(),this.bindInputFocusEvents&&this.bindFocusEvents(),this.timeout=setTimeout(function(){a.strPos===0?a.typewrite(a.strings[a.sequence[a.arrayPos]],a.strPos):a.backspace(a.strings[a.sequence[a.arrayPos]],a.strPos)},this.startDelay)},r.typewrite=function(a,l){var c=this;this.fadeOut&&this.el.classList.contains(this.fadeOutClass)&&(this.el.classList.remove(this.fadeOutClass),this.cursor&&this.cursor.classList.remove(this.fadeOutClass));var u=this.humanizer(this.typeSpeed),d=1;this.pause.status!==!0?this.timeout=setTimeout(function(){l=n.typeHtmlChars(a,l,c);var f=0,m=a.substring(l);if(m.charAt(0)==="^"&&/^\^\d+/.test(m)){var y=1;y+=(m=/\d+/.exec(m)[0]).length,f=parseInt(m),c.temporaryPause=!0,c.options.onTypingPaused(c.arrayPos,c),a=a.substring(0,l)+a.substring(l+y),c.toggleBlinking(!0)}if(m.charAt(0)==="`"){for(;a.substring(l+d).charAt(0)!=="`"&&(d++,!(l+d>a.length)););var E=a.substring(0,l),A=a.substring(E.length+1,l+d),P=a.substring(l+d+1);a=E+A+P,d--}c.timeout=setTimeout(function(){c.toggleBlinking(!1),l>=a.length?c.doneTyping(a,l):c.keepTyping(a,l,d),c.temporaryPause&&(c.temporaryPause=!1,c.options.onTypingResumed(c.arrayPos,c))},f)},u):this.setPauseStatus(a,l,!0)},r.keepTyping=function(a,l,c){l===0&&(this.toggleBlinking(!1),this.options.preStringTyped(this.arrayPos,this));var u=a.substring(0,l+=c);this.replaceText(u),this.typewrite(a,l)},r.doneTyping=function(a,l){var c=this;this.options.onStringTyped(this.arrayPos,this),this.toggleBlinking(!0),this.arrayPos===this.strings.length-1&&(this.complete(),this.loop===!1||this.curLoop===this.loopCount)||(this.timeout=setTimeout(function(){c.backspace(a,l)},this.backDelay))},r.backspace=function(a,l){var c=this;if(this.pause.status!==!0){if(this.fadeOut)return this.initFadeOut();this.toggleBlinking(!1);var u=this.humanizer(this.backSpeed);this.timeout=setTimeout(function(){l=n.backSpaceHtmlChars(a,l,c);var d=a.substring(0,l);if(c.replaceText(d),c.smartBackspace){var f=c.strings[c.arrayPos+1];c.stopNum=f&&d===f.substring(0,l)?l:0}l>c.stopNum?(l--,c.backspace(a,l)):l<=c.stopNum&&(c.arrayPos++,c.arrayPos===c.strings.length?(c.arrayPos=0,c.options.onLastStringBackspaced(),c.shuffleStringsIfNeeded(),c.begin()):c.typewrite(c.strings[c.sequence[c.arrayPos
4609]],l))},u)}else this.setPauseStatus(a,l,!1)},r.complete=function(){this.options.onComplete(this),this.loop?this.curLoop++:this.typingComplete=!0},r.setPauseStatus=function(a,l,c){this.pause.typewrite=c,this.pause.curString=a,this.pause.curStrPos=l},r.toggleBlinking=function(a){this.cursor&&(this.pause.status||this.cursorBlinking!==a&&(this.cursorBlinking=a,a?this.cursor.classList.add("typed-cursor--blink"):this.cursor.classList.remove("typed-cursor--blink")))},r.humanizer=function(a){return Math.round(Math.random()*a/2)+a},r.shuffleStringsIfNeeded=function(){this.shuffle&&(this.sequence=this.sequence.sort(function(){return Math.random()-.5}))},r.initFadeOut=function(){var a=this;return this.el.className+=" "+this.fadeOutClass,this.cursor&&(this.cursor.className+=" "+this.fadeOutClass),setTimeout(function(){a.arrayPos++,a.replaceText(""),a.strings.length>a.arrayPos?a.typewrite(a.strings[a.sequence[a.arrayPos]],0):(a.typewrite(a.strings[0],0),a.arrayPos=0)},this.fadeOutDelay)},r.replaceText=function(a){this.attr?this.el.setAttribute(this.attr,a):this.isInput?this.el.value=a:this.contentType==="html"?this.el.innerHTML=a:this.el.textContent=a},r.bindFocusEvents=function(){var a=this;this.isInput&&(this.el.addEventListener("focus",function(l){a.stop()}),this.el.addEventListener("blur",function(l){a.el.value&&a.el.value.length!==0||a.start()}))},r.insertCursor=function(){this.showCursor&&(this.cursor||(this.cursor=document.createElement("span"),this.cursor.className="typed-cursor",this.cursor.setAttribute("aria-hidden",!0),this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)))},o}();const typed_client_vAkPClHvTZ=defineNuxtPlugin(o=>({provide:{typedInit:()=>{typeof window<"u"&&[...document.querySelectorAll("typed")].forEach(r=>{const a=r.getAttribute("words").split("|");a.length&&(r.textContent="",new i(r,{strings:a,typeSpeed:parseInt(r.getAttribute("speed")||"70"),backSpeed:parseInt(r.getAttribute("backspeed")||"70"),fadeOut:r.getAttribute("fade")==="true",contentType:"html",backDelay:500,loop:!0}))})},typedNew:r=>{if(typeof window<"u"){const a=r.getAttribute("words").split("|");if(!a.length)return;r.textContent="",new i(r,{strings:a,typeSpeed:parseInt(r.getAttribute("speed")||"70"),backSpeed:parseInt(r.getAttribute("backspeed")||"70"),fadeOut:r.getAttribute("fade")==="true",contentType:"html",backDelay:500,loop:!0})}}}}));function useFakeBeacon(){const o=(a,l,c)=>{const u=document.createElement("script");u.src=a,u.onload=window[l],u.async=!0,c?document.body.append(u):document.head.append(u)};return{load:(a,l,c=!1)=>{{if(document.querySelector(`[src="${a}"]`))return;o(a,l,c),onBeforeUnmount(()=>{const u=document.querySelector(`[src="${a}"]`);u&&u.remove()})}}}}const vue_aos_client_nlOTbQH58f=defineNuxtPlugin(o=>{if(typeof window<"u"){const{load:r}=useFakeBeacon();let a=!1,l=!1,c=!1;(()=>{const E="aos-stylesheet";if(!document.getElementById(E)){const A=document.createElement("link");A.id=E,A.rel="stylesheet",A.href="https://unpkg.com/[email protected]/dist/aos.css",document.head.appendChild(A)}})();const d=()=>{a||window.AOS&&typeof window.AOS.init=="function"&&(window.AOS.init({disable:()=>!1,anchorPlacement:"top-bottom",offset:(()=>{const E=matchMedia("(max-width: 767px)").matches,A=document.querySelector('[data-sticky], header[style*="position: fixed"], header.is-sticky'),P=(A==null?void 0:A.offsetHeight)||0;return E?P+16:0})(),once:!0,mirror:!1,duration:600,easing:"ease-out-cubic"}),a=!0)},f=()=>{const E=window.innerHeight||document.documentElement.clientHeight;let A=0;document.querySelectorAll("[data-aos]:not([data-aos-anchor])").forEach(P=>{if(P.offsetHeight>E*.9){const x=document.createElement("span");x.setAttribute("aria-hidden","true"),x.style.cssText="position:relative;display:block;width:1px;height:1px;";const M=P.id||`aos-anchor-${Date.now()}-${A++}`;x.id=`${M}__marker`,P.before(x),P.setAttribute("data-aos-anchor",`#${x.id}`),P.setAttribute("data-aos-anchor-placement","top-bottom")}})},m=()=>{window.AOS&&(typeof window.AOS.refreshHard=="function"?window.AOS.refreshHard():typeof window.AOS.refresh=="function"&&window.AOS.refresh())},y=()=>{var E;a||!l||!c||(d(),f(),m(),(E=document==null?void 0:document.fonts)!=null&&E.ready&&document.fonts.ready.then(()=>m()).catch(()=>{}))};window.onAOSScriptReady=()=>{l=!0,y()},o.hooks.hook("app:mounted",()=>{c=!0;const A=matchMedia("(max-width: 767px)").matches?350:150,P=window._$delayHydration?A:0;setTimeout(y,P);const R=()=>{f(),m()};window.addEventListener("resize",R,{passive:!0}),window.addEventListener("orientationchange",R,{passive:!0}),new MutationObserver(M=>{for(const $ of M)if($.type==="childList"&&[...$.addedNodes].some(B=>{var O,L;return B.nodeType===1&&(((O=B.hasAttribute)==null?void 0:O.call(B,"data-aos"))||((L=B.querySelector)==null?void 0:L.call(B,"[data-aos]")))})){clearTimeout(window.__aosMoT),window.__aosMoT=setTimeout(()=>{f(),m()},50);break}}).observe(document.body,{childList:!0,subtree:!0})}),window.addEventListener("load",()=>{y(),setTimeout(y,50)},{once:!0}),r("https://unpkg.com/[email protected]/dist/aos.js","onAOSScriptReady")}});var ms,gs,ii,_s,ys,vs,bs;class ElementObserver{constructor(r,a){nn(this,ms);nn(this,gs);nn(this,ii,!1);nn(this,_s,[]);nn(this,ys,[]);nn(this,vs,new Deferred$2);nn(this,bs,new Deferred$2);ki(this,ms,r.register(a,this.onIntersecting.bind(this))),ki(this,gs,()=>r.unregister(a))}get observer(){return lr(this,ms)}get inView(){return lr(this,ii)}onIntersecting(r){r?(lr(this,vs).resolve(),ki(this,ii,!0),lr(this,_s).forEac
4609h(a=>a())):lr(this,ii)&&(lr(this,bs).resolve(),ki(this,ii,!1),lr(this,ys).forEach(a=>a()))}enterViewOnce(){return lr(this,vs).promise}enterView(r){lr(this,_s).push(r)}leaveViewOnce(){return lr(this,bs).promise}leaveView(r){lr(this,ys).push(r)}destroy(){lr(this,gs).call(this)}}ms=new WeakMap,gs=new WeakMap,ii=new WeakMap,_s=new WeakMap,ys=new WeakMap,vs=new WeakMap,bs=new WeakMap;var Oi,si;class IntersectionObservable{constructor(r){nn(this,Oi);nn(this,si,new Map);ki(this,Oi,new window.IntersectionObserver(a=>this.next(a),r))}next(r){r.forEach(({target:a,isIntersecting:l})=>{lr(this,si).has(a)&&lr(this,si).get(a)(l)})}register(r,a){lr(this,si).set(r,a),lr(this,Oi).observe(r)}unregister(r){lr(this,si).delete(r),lr(this,Oi).unobserve(r)}}Oi=new WeakMap,si=new WeakMap;const getIntersectionObservable=o=>{const{node:r,key:a}=getNodeAndKey(o);r.observables.has(a)||r.observables.set(a,new IntersectionObservable(o));const l=r.observables.get(a);return{register:(c,u)=>l.register(c,u),unregister:c=>l.unregister(c)}},getNodeAndKey=({root:o,...r})=>{const a=o||window.document.documentElement;return a.observables||(a.observables=new Map),{key:JSON.stringify({...r}),node:a}},getElementObserver=(o,r)=>{const a=getScrollableParent(o),l={...getDefaultOptions(a),...r},c=getIntersectionObservable(l);return new ElementObserver(c,o)},getDefaultOptions=o=>({root:o!==window.document.documentElement&&o||void 0,threshold:[0]}),isElementOutViewport=function(o){const r=o.getBoundingClientRect(),a=getScrollableParent(o);let l={left:0,top:0};a&&"getBoundingClientRect"in a&&(l=a.getBoundingClientRect());const c={x:r.left+l.left,y:r.top+l.top},u={x:(a==null?void 0:a.offsetWidth)||window.innerWidth,y:(a==null?void 0:a.offsetHeight)||window.innerHeight};return r.bottom<0||r.right<0||c.x>u.x||c.y>u.y},regex=/(auto|scroll)/,style=(o,r)=>getComputedStyle(o,null).getPropertyValue(r),scroll=o=>regex.test(style(o,"overflow")+style(o,"overflow-y")+style(o,"overflow-x")),getScrollableParent=(o,r=[])=>{if(!(!o||o===document.body)){const a=o;return(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth)&&scroll(a)?a:(r.push(a),getScrollableParent(a.parentNode,r))}},CLASS_FONT_ACTIVE="font-active",observers=new Map,vFont={install(o){o.directive("font",{created(r,a,l){var u;const c=a.instance;if(c){c.fontsReady=c.fontsReady||new Map;let d=[];if(Array.isArray(a.value)?d=a.value:d.push(a.value),d.length){const{isCritical:f,fontCollection:m}=getFirstFont(d),y=d.map(({definition:A})=>A),E=m.add(y);r.setAttribute(E.name,E.value),c.fontsReady.set(r,f),f&&(typeof((u=l.props)==null?void 0:u.class)=="string"&&(l.props.class=[...l.props.class.split(" "),f&&CLASS_FONT_ACTIVE].filter(Boolean).join(" ")),emit(l.props,"onLoad:font",y))}}},getSSRProps(r){const a=getValueList(r.value);if(a.length){const{isCritical:l,fontCollection:c}=getFirstFont(a),u=a.map(({definition:f})=>f),d=c.add(u);return{[d.name]:d.value,class:l?"font-active":void 0}}},updated(r,a,l){var c,u;(u=(c=a.instance)==null?void 0:c.fontsReady)!=null&&u.get(r)&&(r.classList.add(CLASS_FONT_ACTIVE),emit(l.props,"onLoad:font",getValueList(a.value).map(d=>d.definition)))},async mounted(r,a,l){if(getFirstFont(getValueList(a.value))){const{isCritical:u,runtimeConfig:d}=getFirstFont(getValueList(a.value));if(u||!isElementOutViewport(r))activateFonts(r,a,l);else{const f=getElementObserver(r,{rootMargin:d.lazyOffsetAsset||"0%"});observers.set(r,f),await f.enterViewOnce(),activateFonts(r,a,l)}}},unmounted(r){observers.delete(r)}})}};function getValueList(o){return Array.isArray(o)?o:[o]}function getFirstFont(o){return o[0]}async function activateFonts(o,r,a){var c,u;const l=getValueList(r.value).map(({definition:d})=>d);await Promise.all(l.filter(d=>!d.media||window.matchMedia(d.media).matches).map(d=>d.load())),o.classList.add(CLASS_FONT_ACTIVE),(u=(c=r.instance)==null?void 0:c.fontsReady)==null||u.set(o,!0),emit(a.props,"onLoad:font",l)}const emit=(o,r,a)=>{typeof(o==null?void 0:o[String(r)])=="function"&&o[String(r)](a)};function btoa$1(o){return typeof window<"u"&&"btoa"in window?window.btoa(o):Buffer.from(o).toString("base64")}class Font{constructor(r,{src:a,type:l,fallbackFamily:c},{media:u,selector:d}={},f,m){nr(this,"family");nr(this,"style");nr(this,"weight");nr(this,"src");nr(this,"type");nr(this,"fallbackFamily");nr(this,"rootSelector");nr(this,"selector");nr(this,"media");nr(this,"loaded");this.family=r,this.style=m||"normal",this.weight=f||400,this.src=a,this.type=`font/${l}`,this.fallbackFamily=c,this.rootSelector="",this.selector=d||"",this.media=u,this.loaded=new Deferred$2}toJSON(){return{family:this.family,style:this.style,weight:this.weight,src:this.src,type:this.t
4609ype,fallbackFamily:this.fallbackFamily,rootSelector:this.rootSelector,selector:this.selector,media:this.media}}async load(){const r="fonts"in window.document&&await window.document.fonts.ready;if(r&&!r.check(`${this.style} ${this.weight} 12px '${this.family}'`)){const a=Array.from(r).find(l=>fontFamilyNormalize(l.family)===this.family&&l.style===this.style&&weightNormalize(l.weight)===weightNormalize(this.weight));await(a==null?void 0:a.load())}}getKey(){const r={...this};return delete r.src,delete r.rootSelector,delete r.loaded,btoa$1(JSON.stringify(r))}getCSSText({usedFontaine:r=!1}={}){const a=createSelector(this.rootSelector,this.selector),l=`"${this.family}"`;return wrapByMedia(`${a} {
4610        font-family: ${[getFontaineFallback(this.family,r)].filter(Boolean).concat(this.fallbackFamily.join(", "))};
4611        font-weight: ${this.weight};
4612        font-style: ${this.style};
4613      }
4614      ${addFontActive(a)} {
4615        font-family: ${[l].concat(this.fallbackFamily).join(", ")};
4616      }`,this.media)}getNoScriptCSSText(){const r=createSelector(this.rootSelector,this.selector),a=`"${this.family}"`;return wrapByMedia(`${r} {
4617        font-family: ${[a].concat(this.fallbackFamily).join(", ")};
4618        font-weight: ${this.weight};
4619        font-style: ${this.style};
4620      }`,this.media)}setRootSelector(r){this.rootSelector=`${r.name}="${r.value}"`}}function createSelector(o,r){return joinSelectors(splitSelector(r).map(a=>`[${o}] ${a}`))}function addFontActive(o){return joinSelectors(splitSelector(o).map(r=>`.font-active${r}`))}function splitSelector(o){return o.split(",").map(r=>r.trim())}function joinSelectors(o){return o.join(", ").trim()}function wrapByMedia(o,r){return r&&`@media ${r} { ${o} }`||o}function fontFamilyNormalize(o){return o.replace(/"(.*)"/,"$1")}function weightNormalize(o){switch(o=String(o),o){case"400":return"normal";case"700":return"bold";default:return o}}function getFontaineFallback(o,r){return r?`"${o} fallback"`:""}class FontList{constructor(r=[]){nr(this,"list");this.list=r.map(a=>(a.variances=a.variances.map(l=>({style:"normal",weight:400,...l})),a))}getFont(r,a,l,c){a=a||400,l=l||"normal",c=c||{selector:void 0,media:void 0};const u=this.list.find(d=>d.family===r);if(!u)throw new Error(`font family ${r} not found, please define in module options`);return getFontVariance(u,a,l,c)}}function getFontVariance(o,r,a,l={selector:void 0,media:void 0}){const c=o.variances.find(f=>f.weight===r&&f.style===a);if(!c)throw new Error(`font variance with ${r} and ${a} for font-family ${o.family} not found`);const{src:u,type:d}=c;
4620return new Font(o.family,{src:u,type:d,fallbackFamily:o.fallback},l,r,a)}const dimensionCache=new Map;async function getImageSize(o){if(!dimensionCache.has(o)){const{width:r,height:a}=await new Promise(l=>{let c=new globalThis.Image;c.onload=()=>{const u={width:(c==null?void 0:c.naturalWidth)||0,height:(c==null?void 0:c.naturalHeight)||0};c=void 0,l(u)},c.src=o});dimensionCache.set(o,{width:r,height:a})}return dimensionCache.get(o)}class FontsCollection{constructor(r=[]){nr(this,"list",[]);this.list=r}get size(){return this.list.length}toJSON(){return{list:this.list.map(r=>({...r,fontCollection:r.fontCollection.toJSON()}))}}}const logDebug=(...o)=>{console.log("[DEBUG][BOOSTER]:",...o)};var define_process_env_default={};function useBoosterHead(){const o=injectHead(),r=useRouter$1(),{public:{booster:{debug:a}}}=useRuntimeConfig(),l=ref$1(new FontsCollection);let c;watch(()=>l.value,f=>{const m=createEntry(f,a);c==null||c.dispose(),nextTick(()=>{c=o.push(()=>m)})}),r.beforeEach(()=>{nextTick(()=>{const f=l.value.list.filter(m=>!u.value.includes(m));l.value=new FontsCollection(f),u.value=[]})});const u=ref$1([]);return{push:({fontCollection:f,isCritical:m,options:y})=>{if(!l)throw new Error("pushFontCollection must be called before setupHead");const E=!f.list.length;let A;return E&&(A={fontCollection:f,isCritical:m,options:y},l.value=new FontsCollection([...l.value.list,A]),A=l.value.list[l.value.list.length-1]),{dispose:()=>E&&u.value.push(A)}},collection:l}}function createEntry(o,r){r&&logDebug("Head Font Collections:",o.toJSON());const a=o.list.filter(({fontCollection:l})=>l.size);return{link:define_process_env_default.prerender?prepareItems(a.filter(({fontCollection:l})=>l.size).map(({fontCollection:l,isCritical:c})=>l.getPreloadDescriptions(c)).flat()):void 0,style:prepareItems(a.map(({fontCollection:l,options:c})=>l.getStyleDescriptions(c)).flat()),noscript:define_process_env_default.prerender&&prepareItems(a.map(({fontCollection:l})=>l.getNoScriptStyleDescriptions()).flat())||void 0}}function prepareItems(o){return Array.from(new Map(o.map(r=>[r.key,{...r,key:void 0}])).values())}function useBoosterHydrate(){return(o,r)=>(typeof o=="function"?r=r||hydrateOnVisible({rootMargin:useRuntimeConfig().public.booster.lazyOffsetComponent||"0%"}):r=void 0,defineAsyncComponent({loader:o,hydrate:r}))}const plugin_client_QHzhVBB2Ll=defineNuxtPlugin({name:"booster-plugin",enforce:"post",async setup(o){let r,a;const l=useBoosterHydrate(),c=([r,a]=executeAsync(()=>__vitePreload(()=>import("./C3daKE3O.js"),[],import.meta.url).then(f=>f.default||f)),r=await r,a(),r),u=new FontList(c),d=useBoosterHead();o.provide("booster",{head:d,getImageSize,hydrate:l,getFont:u.getFont.bind(u),crossorigin:"anonymous",isBrowserSupported:()=>isSupportedBrowser({regex:""}),targetFormats:["webp","avif","jpg|jpeg|png|gif"],densities:"x1 x2"})},hooks:{"app:created"(){const{vueApp:o}=useNuxtApp();o.use(vFont)}}}),plugins=[revive_payload_client_QhxXdWjLM0,unhead_lihN7BCnVg,plugin$1,payload_client_2iWSt8t1oS,navigation_repaint_client_hME4SMlvhI,chunk_reload_client_xDBfISZ1yy,plugin,components_plugin_KR1HBZs4kY,prefetch_client_7nmECofin6,nuxt_plugin_UNTZVpCIPu,plugin_cKjbZu64EM,plugin_wy0B721ODc,component_resolver_xxPFjJyTvq,directives_GDwrTGmylM,event_bus_JNcXIfrhYt,firebase_Tc1lVUbp7M,google_recaptcha_client_jYwap73s4d,gravatar_za4rpH4Ai3,gtag_client_Zw8EQXNVTz,lodash_oeOolPNC0c,lottie_client_funiu1oBjt,moment_client_nzgYItVHLe,postscribe_client_QT21k0RUuw,referral_client_JnVASE2uRk,supabase_h6iDxIS7Fl,typed_client_vAkPClHvTZ,vue_aos_client_nlOTbQH58f,plugin_client_QHzhVBB2Ll],removeUndefinedProps=o=>{const r=Object.create(null);for(const a in o){const l=o[a];l!==void 0&&(r[a]=l)}return r},setupForUseMeta=(o,r)=>(a,l)=>(useHead(()=>o({...removeUndefinedProps(a),...l.attrs},l)),()=>{var c,u;return r?(u=(c=l.slots).default)==null?void 0:u.call(c):null}),globalProps={accesskey:String,autocapitalize:String,autofocus:{type:Boolean,default:void 0},class:[String,Object,Array],contenteditable:{type:Boolean,default:void 0},contextmenu:String,dir:String,draggable:{type:Boolean,default:void 0},enterkeyhint:String,exportparts:String,hidden:{type:Boolean,default:void 0},id:String,inputmode:String,is:String,itemid:String,itemprop:String,itemref:String,itemscope:String,itemtype:String,lang:String,nonce:String,part:String,slot:String,spellcheck:{type:Boolean,default:void 0},style:[String,Object,Array],tabindex:String,title:String,translate:String},Link=defineComponent({name:"Link",inheritAttrs:!1,props:{...globalProps,as:String,crossorigin:String,disabled:Boolean,fetchpriority:String,href:String,hreflang:String,imagesizes:String,imagesrcset:String,integrity:String,media:String,prefetch:{type:Boolean,default:void 0},referrerpolicy:String,rel:String,sizes:String,title:String,type:String,methods:String,target:String,body:Boolean,renderPri
4620ority:[String,Number]},setup:setupForUseMeta(o=>({link:[o]}))}),Meta=defineComponent({name:"Meta",inheritAttrs:!1,props:{...globalProps,charset:String,content:String,httpEquiv:String,name:String,body:Boolean,renderPriority:[String,Number]},setup:setupForUseMeta(o=>{const r={...o};return r.httpEquiv&&(r["http-equiv"]=r.httpEquiv,delete r.httpEquiv),{meta:[r]}})}),Style=defineComponent({name:"Style",inheritAttrs:!1,props:{...globalProps,type:String,media:String,nonce:String,title:String,scoped:{type:Boolean,default:void 0},body:Boolean,renderPriority:[String,Number]},setup:setupForUseMeta((o,{slots:r})=>{var c,u,d;const a={...o},l=(d=(u=(c=r.default)==null?void 0:c.call(r))==null?void 0:u[0])==null?void 0:d.children;return l&&(a.children=l),{style:[a]}})}),Head=defineComponent({name:"Head",inheritAttrs:!1,setup:(o,r)=>()=>{var a,l;return(l=(a=r.slots).default)==null?void 0:l.call(a)}});function defaultEstimatedProgress(o,r){const a=r/o*100;return 2/Math.PI*100*Math.atan(a/50)}function createLoadingIndicator(o={}){const{duration:r=2e3,throttle:a=200,hideDelay:l=500,resetDelay:c=400}=o,u=o.estimatedProgress||defaultEstimatedProgress,d=useNuxtApp(),f=ref$1(0),m=ref$1(!1),y=ref$1(!1);let E=!1,A,P,R,x;const M=()=>{y.value=!1,$(0)};function $(U=0){if(!d.isHydrating){if(U>=100)return B();L(),f.value=U<0?0:U,a?P=setTimeout(()=>{m.value=!0,F()},a):(m.value=!0,F())}}function V(){R=setTimeout(()=>{m.value=!1,x=setTimeout(()=>{f.value=0},c)},l)}function B(U={}){f.value=100,E=!0,L(),O(),U.error&&(y.value=!0),U.force?(f.value=0,m.value=!1):V()}function O(){clearTimeout(R),clearTimeout(x)}function L(){clearTimeout(P),cancelAnimationFrame(A)}function F(){E=!1;let U;function G(Y){if(E)return;U??(U=Y);const te=Y-U;f.value=Math.max(0,Math.min(100,u(r,te))),A=requestAnimationFrame(G)}A=requestAnimationFrame(G)}let j=()=>{};{const U=d.hook("page:loading:start",()=>{M()}),G=d.hook("page:loading:end",()=>{B()}),Y=d.hook("vue:error",()=>B());j=()=>{Y(),U(),G(),L()}}return{_cleanup:j,progress:computed(()=>f.value),isLoading:computed(()=>m.value),error:computed(()=>y.value),start:M,set:$,finish:B,clear:L}}function useLoadingIndicator(o={}){const r=useNuxtApp(),a=r._loadingIndicator=r._loadingIndicator||createLoadingIndicator(o);return getCurrentScope()&&(r._loadingIndicatorDeps=r._loadingIndicatorDeps||0,r._loadingIndicatorDeps++,onScopeDispose(()=>{r._loadingIndicatorDeps--,r._loadingIndicatorDeps===0&&(a._cleanup(),delete r._loadingIndicator)})),a}const __nuxt_component_2=defineComponent({name:"NuxtLoadingIndicator",props:{throttle:{type:Number,default:200},duration:{type:Number,default:2e3},height:{type:Number,default:3},color:{type:[String,Boolean],default:"repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)"},errorColor:{type:String,default:"repeating-linear-gradient(to right,#f87171 0%,#ef4444 100%)"},estimatedProgress:{type:Function,required:!1}},setup(o,{slots:r,expose:a}){const{progress:l,isLoading:c,error:u,start:d,finish:f,clear:m}=useLoadingIndicator({duration:o.duration,throttle:o.throttle,estimatedProgress:o.estimatedProgress});return a({progress:l,isLoading:c,error:u,start:d,finish:f,clear:m}),()=>h("div",{class:"nuxt-loading-indicator",style:{position:"fixed",top:0,right:0,left:0,pointerEvents:"none",width:"auto",height:`${o.height}px`,opacity:c.value?1:0,background:u.value?o.errorColor:o.color||void 0,backgroundSize:`${100/l.value*100}% auto`,transform:`scaleX(${l.value}%)`,transformOrigin:"left",transition:"transform 0.1s, height 0.4s, opacity 0.4s",zIndex:999999}},r)}}),RouteProvider=defineComponent({props:{vnode:{type:Object,required:!0},route:{type:Object,required:!0},vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(o){const r=o.renderKey,a=o.route,l={};for(const c in o.route)Object.defineProperty(l,c,{get:()=>r===o.renderKey?o.route[c]:a[c],enumerable:!0});return provide(PageRouteSymbol,shallowReactive(l)),()=>h(o.vnode,{ref:o.vnodeRef})}}),__nuxt_component_3=defineComponent({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(o,{attrs:r,slots:a,expose:l}){const c=useNuxtApp(),u=ref$1(),d=inject(PageRouteSymbol,null);let f;l({pageRef:u});const m=inject(LayoutMetaSymbol,null);let y;const E=c.deferHydration();if(c.isHydrating){const P=c.hooks.hookOnce("app:error",E);useRouter$1().beforeEach(P)}o.pageKey&&watch(()=>o.pageKey,(P,R)=>
4620{P!==R&&c.callHook("page:loading:start")});let A=!1;return()=>h(RouterView,{name:o.name,route:o.route,...r},{default:P=>{const R=haveParentRoutesRendered(d,P.route,P.Component),x=d&&d.matched.length===P.route.matched.length;if(!P.Component){if(y&&!x)return y;E();return}if(y&&m&&!m.isCurrent(P.route))return y;if(R&&d&&(!m||m!=null&&m.isCurrent(d)))return x?y:null;const M=generateRouteKey$1(P,o.pageKey);!c.isHydrating&&!hasChildrenRoutes(d,P.route,P.Component)&&f===M&&(c.callHook("page:loading:end"),A=!0),f=M;const $=!!(o.transition??P.route.meta.pageTransition??appPageTransition),V=$&&_mergeTransitionProps([o.transition,P.route.meta.pageTransition,appPageTransition,{onAfterLeave:()=>{c.callHook("page:transition:finish",P.Component)}}].filter(Boolean)),B=o.keepalive??P.route.meta.keepalive??appKeepalive;return y=_wrapInTransition($&&V,wrapInKeepAlive(B,h(Suspense,{suspensible:!0,onPending:()=>c.callHook("page:start",P.Component),onResolve:()=>{nextTick(()=>c.callHook("page:finish",P.Component).then(()=>{if(!A)return c.callHook("page:loading:end");A=!1}).finally(E))}},{default:()=>{const O=h(RouteProvider,{key:M||void 0,vnode:a.default?h(Fragment,void 0,a.default(P)):P.Component,route:P.route,renderKey:M||void 0,trackRootNodes:$,vnodeRef:u});return B&&(O.type.name=P.Component.type.name||P.Component.type.__name||"RouteProvider"),O}}))).default(),y}})}});function _mergeTransitionProps(o){const r=o.map(a=>({...a,onAfterLeave:a.onAfterLeave?toArray$2(a.onAfterLeave):void 0}));return defu(...r)}function haveParentRoutesRendered(o,r,a){if(!o)return!1;const l=r.matched.findIndex(c=>{var u;return((u=c.components)==null?void 0:u.default)===(a==null?void 0:a.type)});return!l||l===-1?!1:r.matched.slice(0,l).some((c,u)=>{var d,f,m;return((d=c.components)==null?void 0:d.default)!==((m=(f=o.matched[u])==null?void 0:f.components)==null?void 0:m.default)})||a&&generateRouteKey$1({route:r,Component:a})!==generateRouteKey$1({route:o,Component:a})}function hasChildrenRoutes(o,r,a){return o?r.matched.findIndex(c=>{var u;return((u=c.components)==null?void 0:u.default)===(a==null?void 0:a.type)})<r.matched.length-1:!1}const setInterval$1=window.setInterval;function useAnalytics(o){var M;const{$supabase:r}=useNuxtApp(),a=useRoute$1(),l=useRouter$1(),c=!!((M=o==null?void 0:o.getCookieContent)!=null&&M.enabled);let u=null;const d=()=>{try{const $=!c,V=localStorage.getItem("estage_cookie_accepted_all")==="true",B=localStorage.getItem("estage_cookie_accepted_performance")==="true";return $||V||B}catch{return!c}},f=()=>{if(!d())return{};const $=localStorage.getItem("es-visitor"),V=$?JSON.parse($):{};return localStorage.getItem("es-meta-user")&&(V.user_id=localStorage.getItem("es-meta-user")),V},m=()=>a.query.source||a.query.ts,y=()=>{d()&&(m()||f().id)&&setTimeout(()=>{const $=m()?[]:f().history||[],V=m()||f().page||o.getPage.id.toString(),B=!$.includes(V);$.push(V),useFetch("/api/analytics/navigate-from",{method:"POST",body:{from:document.referrer,site:o.getProject.id,userAgent:navigator.userAgent,page:o.getPage.id.toString(),uniq:B,hash:m()||f().hash,user_id:f().user_id,history:$}},"$jWSkS6EAdN").then(({data:O})=>{var F,j,U;const L=m()?{}:f().visitIds||{};L[o.getPage.id.toString()]=(j=(F=O.value)==null?void 0:F.visitor)==null?void 0:j.id,localStorage.setItem("es-visitor",JSON.stringify({...(U=O.value)==null?void 0:U.visitor,visitIds:L})),E(),l.push({query:{...a.query,ts:void 0,source:void 0}})})},1e3)},E=()=>{d()&&(P(),setInterval$1(()=>{const $=f().visitIds||{};useFetch(`/api/analytics/${$[o.getPage.id.toString()]}/navigate-from`,{method:"PUT",body:{page:o.getPage.id.toString(),user_id:f().user_id,site:o.getProject.id}},"$7ssYkMlTI6")},9e4))},A=()=>{u&&(u.untrack(),r&&r.removeChannel(u),u=null)},P=()=>{if(!d()||!r)return;const $=o.getPage.id.toString(),V=f().hash;if(!V)return;const B=`online:${$}:${V}`;u=r.channel(B,{config:{presence:{key:V}}}).subscribe(O=>{O==="SUBSCRIBED"&&u.track({online_at:new Date().toISOString()})}),window.addEventListener("pagehide",A),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?A():document.visibilityState==="visible"&&!u&&P()})};let R=null,x=null;onMounted(()=>
4620{if(!o.getPage)return;const $=()=>{const V=f().visitIds||{};f().id&&(V[o.getPage.id.toString()]||f().page===o.getPage.id.toString())&&!m()?E():y()};if(d()){$();return}R=()=>{d()&&($(),window.removeEventListener("estage:consent-applied",R),window.removeEventListener("storage",x))},x=V=>{!V||!V.key||!V.key.startsWith("estage_cookie_")||R()},window.addEventListener("estage:consent-applied",R),window.addEventListener("storage",x)}),onBeforeUnmount(()=>{R&&window.removeEventListener("estage:consent-applied",R),x&&window.removeEventListener("storage",x),window.removeEventListener("pagehide",A),A()})}function useModal(){const o=useRuntimeConfig(),{project:r}=useStore(),{$_:a,$moment:l}=useNuxtApp(),c={onScroll:[],onClick:[],onTimer:[],onExit:[]},u=[],d=async()=>useFetch(`${o.public.apiBase}/api/site/${r.getProject.subdomain}/modals`,{key:`modals:${r.getProject.subdomain}`,server:!1,lazy:!0},"$By1W67UWLY").then(({data:M})=>{var $,V;return r.setModals((V=($=M.value)==null?void 0:$.data)==null?void 0:V.data)}),f=(M,$)=>$fetch(`${o.public.apiBase}/api/site/${$??r.getProject.subdomain}/modals/${M}`),m=()=>{r.getModals.forEach(M=>{r.getPage&&a.get(M,"settings.trigger.trigger",null)&&(!M.settings.trigger.pages.length||M.settings.trigger.pages.includes(r.getPage.id))&&c[M.settings.trigger.trigger].push(M)})},y=()=>{c.onTimer.forEach((M,$)=>{M.settings.trigger.pages.id&&M.settings.trigger.pages.id!==r.getPage.id||u.push(setTimeout(()=>{c.onTimer.splice($,1),R(M.id)},l(a.get(M,"settings.trigger.value","00:00:00"),"HH:mm:ss").diff(l().startOf("day"),"milliseconds")))})},E=()=>{const M=parseInt((100*(window.scrollY+window.innerHeight)/document.body.scrollHeight).toFixed());c.onScroll.forEach(($,V)=>{$.settings.trigger.pages.id&&$.settings.trigger.pages.id!==r.getPage.id||M>=a.get($,"settings.trigger.value")&&(c.onScroll.splice(V,1),R($.id),c.onScroll.length||document.removeEventListener("scroll",E))})},A=M=>{c.onClick.forEach(($,V)=>{$.settings.trigger.pages.id===r.getPage.id&&(c.onClick.splice(V,1),R($.id),c.onScroll.length||document.removeEventListener("click",A))})},P=()=>{c.onExit.forEach((M,$)=>{M.settings.trigger.pages.id&&M.settings.trigger.pages.id!==r.getPage.id||(c.onExit.splice($,1),R(M.id),c.onExit.length||document.removeEventListener("mouseleave",P))})},R=async(M,$=null)=>{const V=r.modals.find(({id:B})=>B===M);if($&&!V){const{data:B}=await f(M,$.subdomain);r.setModal(B),r.lastModal=B.id;return}if(r.setModal(),V)setTimeout(()=>{r.setModal(V),r.lastModal=V.id});else{const{data:B}=await f(M);r.setModal(B),r.lastModal=B.id}};return{loadModals:d,initModalEvent:()=>{m(),c.onTimer.length&&y(),c.onScroll.length&&document.addEventListener("scroll",E),c.onClick.length&&document.addEventListener("click",A),c.onExit.length&&document.addEventListener("mouseleave",P)},openModalByID:R}}function useClickActions(){const{openModalByID:o}=useModal();return{scrollToElement:l=>{const c=document.querySelector(`[data-id='${l}'], [data-uid='${l}'], [data-sid='${l}']`);if(c)return c.scrollIntoView({behavior:"smooth",block:"start"})},openModal:(l,c=null)=>o(l,c)}}function useClickAction(){const{scrollToElement:o,openModal:r}=useClickActions(),{$bus:a}=useNuxtApp();onMounted(()=>{document.addEventListener("click",l=>{let c=!1;try{const u=JSON.parse(l.target.getAttribute("datavuehref"));c=u&&u.href.id=="cookie-consent"}catch(u){console.error(u)}if(c&&a){const u=new CustomEvent("app:toggle-cookie-consent",{detail:{toggle:!0}});a.dispatchEvent(u),l.preventDefault();return}if(l.target.getAttribute("linktype")==="modal"){const u=JSON.parse(l.target.getAttribute("datavuehref"));return r(u.href.modal_id)}if(l.target.getAttribute("linktype")==="scroll-to-element"){const u=JSON.parse(l.target.getAttribute("datavuehref"));return o(u.href.uid)}})})}function useLoadingIndicatorSubject(){const{$_:o}=useNuxtApp();return{indicatorColorSubject:c=>o.get(c,"loadingIndicator.color","#1ABC9C"),indicatorHeightSubject:c=>Number(o.get(c,"loadingIndicator.height",3)),indicatorShowSubject:c=>o.get(c,"loadingIndicator.show",!0)}}function useParseEmbedCode(){function o(c){return typeof window<"u"?r(c):a(c)}function r(c){const u={},d=new DOMParser().parseFromString(c,"text/html"),f=d.querySelectorAll("script");f.length&&(u.script=Array.from(f).map(A=>{const P={};
4620return A.src&&(P.src=A.src),A.async&&(P.async=!0),A.defer&&(P.defer=!0),A.textContent.trim()&&(P.innerHTML=A.textContent.trim()),P}));const m=d.querySelectorAll("style");m.length&&(u.style=Array.from(m).map(A=>({innerHTML:A.textContent.trim()})));const y=d.querySelectorAll("link");y.length&&(u.link=Array.from(y).map(A=>{const P={};for(const R of A.attributes)P[R.name]=R.value||!0;return P}));const E=d.querySelectorAll("meta");return E.length&&(u.meta=Array.from(E).map(A=>{const P={};for(const R of A.attributes)P[R.name]=R.value||!0;return P})),u}function a(c){const u=c.replace(/<script\b([^>]*)\/>/gi,"<script$1><\/script>"),d={script:/<script\b[^>]*>([\s\S]*?)<\/script>/g,style:/<style\b[^>]*>([\s\S]*?)<\/style>/g,link:/<link\b[^>]*?>/g,meta:/<meta\b[^>]*?>/g};let f={};for(let m in d){let y=[],E;for(;(E=d[m].exec(u))!==null;){const A=l(E[0],m);m==="link"?y.push(A):y.push({...A,...E[1]&&{innerHTML:E[1].trim()}})}y.length&&(f[m]=y)}return f}function l(c,u){var E;const d={},f=((E=c.match(/^<[^>]+>/))==null?void 0:E[0])||"",m=/([a-z\-]+)(=(?:"([^"]+)"|'([^']+)'))?/g;let y;for(;(y=m.exec(f))!==null;)u==="script"&&(y[1]==="async"||y[1]==="defer")?d[y[1]]=y[3]||y[4]||!0:u==="script"&&y[1]==="src"?d[y[1]]=y[3]||y[4]||null:u!=="script"&&(d[y[1]]=y[3]||!0);return d}return{extractEmbedCodes:o}}const resolveApiBases=()=>{const o=useRuntimeConfig();return{site:`${o.public.apiBase}/api/site`,blog:`${o.public.blogApiBase}/api/projects`}},ROUTE_BOOTSTRAP_PENDING_KEY="route-bootstrap:pending-count",stylesheetPreloadCache=new Map,EMPTY_RESULT=Object.freeze({data:null,error:null}),normalizeSiteKey=(o="")=>String(o||"").trim().replace(/^https?:\/\//i,"").replace(/\/.*$/,"").replace(/^www\./i,"").replace(/\.$/,""),getStringValue=o=>Array.isArray(o)?String(o[0]||""):typeof o=="string"?o:"",serializeError=(o,r="")=>{var c,u,d;const a=((c=o==null?void 0:o.response)==null?void 0:c._data)??(o==null?void 0:o.data)??null,l=typeof a=="object"&&((a==null?void 0:a.message)||(a==null?void 0:a.error))||(typeof a=="string"?a:"")||"";return{statusCode:(o==null?void 0:o.statusCode)||(o==null?void 0:o.status)||((u=o==null?void 0:o.response)==null?void 0:u.status)||null,statusMessage:(o==null?void 0:o.statusMessage)||((d=o==null?void 0:o.response)==null?void 0:d.statusText)||l||"",message:(o==null?void 0:o.message)||l||"Request failed",url:r||(o==null?void 0:o.request)||"",data:a}},createResult=(o=null,r=null)=>({data:o,error:r}),getCookieSource=()=>typeof document<"u"&&document.cookie||"",getCookieValue=(o,r)=>{if(!o||!r)return"";const a=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=o.match(new RegExp(`(?:^|;\\s*)${a}=([^;]*)`));if(!l)return"";try{return decodeURIComponent(l[1])}catch{return l[1]}},buildSiteUrl=(o,r,a="")=>{const l=normalizeSiteKey(r),c=String(a||"").split("/").filter(Boolean).map(u=>encodeURIComponent(u)).join("/");return`${o.site}/${encodeURIComponent(l)}${c?`/${c}`:""}`},buildBlogUrl=(o,r,a="")=>{const l=String(a||"").split("/").filter(Boolean).map(c=>encodeURIComponent(c)).join("/");return`${o.blog}/${encodeURIComponent(String(r||""))}${l?`/${l}`:""}`},fetchJson=async(o,r={})=>{try{const a=await $fetch(o,r);return createResult((a==null?void 0:a.data)??null,null)}catch(a){return createResult(null,serializeError(a,o))}},withSiteFallback=async({apiBases:o,projectDomain:r,fallbackSiteKey:a,resourcePath:l,params:c,initialResult:u})=>u!=null&&u.data||!a||normalizeSiteKey(a)===normalizeSiteKey(r)?u||EMPTY_RESULT:fetchJson(buildSiteUrl(o,a,l),{params:c}),matchesProjectDomain=(o,r)=>{if(!o)return!1;const a=normalizeSiteKey(r);return[o==null?void 0:o.subdomain,o==null?void 0:o.domain].map(c=>normalizeSiteKey(c)).filter(Boolean).includes(a)},resolveFirstSlugPart=o=>{var a;const r=(a=o.params)==null?void 0:a.slug;return Array.isArray(r)?r[0]||"":r||""},resolveSitePageSlug=o=>{var l;const r=(l=o.params)==null?void 0:l.slug,a=Array.isArray(r)?r.join("/"):r||"";return!a||a==="null"?"home-page":`page/${a}`},resolveProjectDomain=()=>{const o=normalizeSiteKey(window.location.host);if(!o)return"";const r=o.split(".");return r.length>=3&&r[1]==="estage"?r[0]:o},resolveClientUrl=(o="")=>{if(!o)return"";try{return new URL(String(o),window.location.href).href}catch{return String(o)}},preloadStylesheet=(o="")=>{if(!o)return Promise.resolve();const r=resolveClientUrl(o);if(!r)return Promise.resolve();if(stylesheetPreloadCache.has(r))return stylesheetPreloadCache.get(r);const a=new Promise(l=>{const c=y=>{var E;((E=y==null?void 0:y.dataset)==null?void 0:E.routeBootstrapPreload)==="true"&&y.remove(),l()},u=Array.from(document.querySelectorAll('link[rel="stylesheet"][href], link[rel="preload"][as="style"][href]')).filter(y=>resolveClientUrl(y.getAttribute("href"))===r);if(u.find(y=>y.rel==="stylesheet")){c(null);return}const f=u.find(y=>{var E;return((E=y.dataset)==null?void 0:E.routeBootstrapPreload)==="true"});if(f){f.addEventListener("load",()=>c(null),{once:!0}),f.addEventListener("error",()=>c(null),{once:!0});return}if(u.length>0){c(null);return}
4620const m=document.createElement("link");m.rel="preload",m.as="style",m.href=r,m.crossOrigin="anonymous",m.dataset.routeBootstrapPreload="true",m.addEventListener("load",()=>c(m),{once:!0}),m.addEventListener("error",()=>c(m),{once:!0}),document.head.appendChild(m)});return stylesheetPreloadCache.set(r,a),a},preloadStylesheets=async(o=[])=>{const r=Array.from(new Set(o.map(a=>String(a||"").trim()).filter(Boolean)));await Promise.all(r.map(a=>preloadStylesheet(a)))},useRouteBootstrapPending=()=>{const o=useState(ROUTE_BOOTSTRAP_PENDING_KEY,()=>0);return computed(()=>o.value>0)},useRouteBootstrapData=()=>{var M,$;const o=useRoute$1(),r=resolveApiBases(),a=String(o.name||""),l=resolveProjectDomain(),c=resolveFirstSlugPart(o),u=resolveSitePageSlug(o),d=getStringValue((M=o.query)==null?void 0:M.preview),f=getStringValue(($=o.query)==null?void 0:$.hash),m=getCookieSource(),{project:y}=useStore(),E=y.getProject,A=matchesProjectDomain(E,l),P=`route-bootstrap:${a}:${l}:${o.fullPath}`,R=useState(ROUTE_BOOTSTRAP_PENDING_KEY,()=>0),x=async V=>{R.value+=1;try{return await V()}finally{R.value=Math.max(0,R.value-1)}};return useAsyncData(P,()=>x(async()=>{var G,Y,te,ve,J,Z,Me,ke,se,xe,Q,ie,Fe,Ne,nt,ct,pt;const V=A?Promise.resolve(createResult(E,null)):fetchJson(buildSiteUrl(r,l),{params:{hide_css:1,content_only:1,pageIdOrSlug:c}});if(a==="slug"){const _t=`pk-p-${o.params.slug}`,yt=getCookieValue(m,_t),je={content_only:1,...d&&{preview:d,draft:1},password:yt?encodeURIComponent(yt):""},it=fetchJson(buildSiteUrl(r,l,u),{params:je}),st=fetchJson(buildSiteUrl(r,l,"css")),[lt,vt,ze]=await Promise.all([V,it,st]),Pe=(G=lt.data)==null?void 0:G.subdomain,[Se,Le]=await Promise.all([withSiteFallback({apiBases:r,projectDomain:l,fallbackSiteKey:Pe,resourcePath:u,params:je,initialResult:vt}),withSiteFallback({apiBases:r,projectDomain:l,fallbackSiteKey:Pe,resourcePath:"css",initialResult:ze})]),qe=!!(d||f);return await preloadStylesheets([qe?(Y=lt.data)==null?void 0:Y.global_css_draft:(te=lt.data)==null?void 0:te.global_css,qe?(ve=Se.data)==null?void 0:ve.css_file_draft:(J=Se.data)==null?void 0:J.css_file,qe?(Z=Le.data)==null?void 0:Z.css_file_draft:(Me=Le.data)==null?void 0:Me.css_file]),{project:lt,sitePage:Se,siteCss:Le}}const B=["blog","blog-title"].includes(a),O=B?fetchJson(buildSiteUrl(r,l,"css")):Promise.resolve(EMPTY_RESULT),[L,F]=await Promise.all([V,O]),j=(ke=L.data)==null?void 0:ke.subdomain,U=B?await withSiteFallback({apiBases:r,projectDomain:l,fallbackSiteKey:j,resourcePath:"css",initialResult:F}):EMPTY_RESULT;if(a==="blog"){const _t=(se=L.data)==null?void 0:se.id,yt=_t?await fetchJson(buildBlogUrl(r,_t,"blog/posts/layout"),{params:{type:"home"}}):EMPTY_RESULT;return await preloadStylesheets([(xe=L.data)==null?void 0:xe.global_css,(Q=U.data)==null?void 0:Q.css_file]),{project:L,siteCss:U,blogLayout:yt}}if(a==="blog-title"){const _t=(ie=L.data)==null?void 0:ie.id,yt=getStringValue((Fe=o.params)==null?void 0:Fe.title),je=_t?`pk-${_t}-b-${yt}`:"",it=getCookieValue(m,je),st={password:it?encodeURIComponent(it):"",...f&&{hash:f}},[lt,vt]=_t?await Promise.all([fetchJson(buildBlogUrl(r,_t,`blog/posts/${yt}`),{params:st}),fetchJson(buildBlogUrl(r,_t,"blog/posts/layout"),{params:{type:"post_template"}})]):[EMPTY_RESULT,EMPTY_RESULT];return await preloadStylesheets([f?(Ne=L.data)==null?void 0:Ne.global_css_draft:(nt=L.data)==null?void 0:nt.global_css,f?(ct=U.data)==null?void 0:ct.css_file_draft:(pt=U.data)==null?void 0:pt.css_file]),{project:L,siteCss:U,blogPost:lt,blogTemplate:vt}}return{project:L,siteCss:U}}),{server:!0,lazy:!1,watch:!1,default:()=>({project:EMPTY_RESULT,siteCss:EMPTY_RESULT})})},_export_sfc=(o,r)=>{const a=o.__vccOpts||o;for(const[l,c]of r)a[l]=c;return a},_hoisted_1$2={class:"max-w-screen h-full"},_hoisted_2$1={class:"page-wrapper position-relative h-full"},_hoisted_3$1=["innerHTML"],DEFAULT_FAVICON="/favicon.ico",_sfc_main$2={__name:"app",async setup(o){const r=(ze,Pe=1)=>{if(typeof ze!="function")return;const Se=window.requestIdleCallback;if(Se)try{Se(ze,{timeout:2e3});return}catch{}setTimeout(ze,Pe)},a=defineAsyncComponent({loader:()=>__vitePreload(()=>
4620import("./rG_qII_y.js"),__vite__mapDeps([101,6]),import.meta.url),suspensible:!1}),l=defineAsyncComponent({loader:()=>__vitePreload(()=>import("./DhPD0UR1.js"),__vite__mapDeps([99,30,10,28,16,6,100]),import.meta.url),suspensible:!1}),c=defineAsyncComponent({loader:()=>__vitePreload(()=>import("./CyasXceV.js"),__vite__mapDeps([167,168,6,169,170]),import.meta.url),suspensible:!1}),u=defineAsyncComponent({loader:()=>__vitePreload(()=>import("./JZvnEAid.js"),__vite__mapDeps([109,106,6,107,110,111]),import.meta.url),suspensible:!1}),d=defineAsyncComponent({loader:()=>__vitePreload(()=>import("./rt99bgqH.js"),__vite__mapDeps([326,6,327]),import.meta.url),suspensible:!1}),f=defineAsyncComponent({loader:()=>__vitePreload(()=>import("./91EGfbzc.js"),__vite__mapDeps([105,106,6,107,108]),import.meta.url),suspensible:!1}),m=(ze,Pe=null)=>{try{return ze?typeof ze=="string"?JSON.parse(ze):ze:Pe}catch{return Pe}},{$_:y}=useNuxtApp(),E=useRoute$1(),A=useRuntimeConfig(),{project:P,authStore:R}=useStore(),{extractEmbedCodes:x}=useParseEmbedCode(),{loadModals:M,initModalEvent:$}=useModal(),{indicatorColorSubject:V,indicatorHeightSubject:B,indicatorShowSubject:O}=useLoadingIndicatorSubject();useClickAction();const L=computed(()=>["403","404","restriction-group-id","member-login","member-logout","member-reset-password","system-maintenance"].includes(E.name));if(E.query.e_hash){const ze=useCookie("e_hash");ze.value=String(E.query.e_hash),window.close()}const F=useRouteBootstrapPending(),j=ref$1(!0),U=ref$1(!1),G=computed(()=>P.getGlobalStyle||{}),Y=ze=>y.get(G.value,["code_injection",ze],"")||"",te=computed(()=>V(G.value)),ve=computed(()=>B(G.value)),J=computed(()=>O(G.value)),Z=ref$1(!0),Me=ze=>{Z.value=!!ze},ke=ref$1(null);try{const ze=y.get(P,["project","social_share"],null);ze&&(ke.value=m(ze,null))}catch(ze){console.error("Social share parsing error:",ze)}const se=computed(()=>{const ze=ke.value,Pe=P.page;if(!ze||!Pe||!(ze!=null&&ze.links)||ze.links.length===0)return!1;const{is_blog:Se,id:Le}=Pe,qe=Se?ze.all_posts:ze.all_pages,He=(Se?ze.exclude_posts:ze.exclude_pages)||[];return!!qe&&!He.includes(Le)}),xe=computed(()=>{var Pe;const ze=(Pe=G.value)==null?void 0:Pe.favicon;return ze?String(ze):DEFAULT_FAVICON}),Q=computed(()=>{var Se;const Pe=(Se=xe.value.split("?")[0].split("#")[0].split(".").pop())==null?void 0:Se.toLowerCase();return Pe==="svg"?"image/svg+xml":Pe==="png"?"image/png":Pe==="ico"?"image/x-icon":"image/png"}),ie=ze=>String(ze||"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim(),Fe=ze=>{const Pe=String(ze||"").trim();return Pe?/^https?:\/\//i.test(Pe)?Pe:`https://${Pe.replace(/^\/+/,"")}`:""},Ne=computed(()=>P.page||null),nt=computed(()=>{var Se,Le;const ze=String(((Se=P.getProject)==null?void 0:Se.domain)||"").trim();if(ze)return ze;const Pe=String(((Le=P.getProject)==null?void 0:Le.subdomain)||"").trim();return Pe?`${Pe}.estage.site`:""}),ct=computed(()=>{const ze=Ne.value,Pe=Fe(nt.value);if(!Pe)return"";const Se=String((ze==null?void 0:ze.canonical_url)||"").trim();if(Se)return/^https?:\/\//i.test(Se)?Se:Se.includes(".")?`https://${Se.replace(/^\/+/,"")}`:`${Pe.replace(/\/$/,"")}/${Se.replace(/^\/+/,"")}`;const Le=String((ze==null?void 0:ze.slug)||""),qe=(ze==null?void 0:ze.is_home)||Le==="home-page";return!Le||qe?Pe:`${Pe.replace(/\/$/,"")}/${Le.replace(/^\/+/,"")}`}),pt=computed(()=>{var ze,Pe,Se;return ie(((ze=Ne.value)==null?void 0:ze.meta_title)||((Pe=Ne.value)==null?void 0:Pe.title)||((Se=P.getProject)==null?void 0:Se.name))}),_t=computed(()=>{var ze,Pe,Se,Le;return ie(((ze=Ne.value)==null?void 0:ze.meta_description)||((Pe=Ne.value)==null?void 0:Pe.seo_description)||((Se=Ne.value)==null?void 0:Se.description)||((Le=P.getProject)==null?void 0:Le.description)||pt.value)}),yt=computed(()=>{var He,Ye,ot;const ze=m((He=Ne.value)==null?void 0:He.settings,{}),Pe=String((ze==null?void 0:ze.open_graph_image)||"").trim();if(Pe)return Pe;const Se=m((Ye=P.getProject)==null?void 0:Ye.fb_open_graph_image,{}),Le=String((Se==null?void 0:Se.src)||"").trim();if(Le)return Le;const qe=m((ot=P.getProject)==null?void 0:ot.org_logo,{});return String((qe==null?void 0:qe.src)||"").trim()});useSeoMeta(()=>({title:pt.value||"Website",description:_t.value||pt.value||"Website",ogTitle:pt.value||"Website",ogDescription:_t.value||pt.value||"Website",ogType:"website",ogUrl:ct.value||void 0,ogImage:yt.value||void 0,twitterCard:yt.value?"summary_large_image":"summary",twitterTitle:pt.value||"Website",twitterDescription:_t.value||pt.value||"Website",twitterImage:yt.value||void 0})),useHead({meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{name:"format-detection",content:"telephone=no"}],...x(Y("head"))}),useHead(()=>
4620({link:[{rel:"preconnect",href:A.public.apiBase,crossorigin:"anonymous"},...ct.value?[{key:"canonical",rel:"canonical",href:ct.value}]:[],{key:"favicon",rel:"icon",type:Q.value,href:xe.value},{key:"shortcut",rel:"shortcut icon",href:xe.value},{key:"apple",rel:"apple-touch-icon",href:xe.value}]}));const je=computed(()=>{const ze=E.query.ua;return ze?`/api/hydration?force=${encodeURIComponent(String(ze))}`:"/api/hydration"});useHead({script:[{src:je.value,fetchpriority:"high",crossorigin:"anonymous",defer:!0,"data-hydration-ignore":!0}]}),useAnalytics(P);const it=async()=>{await nextTick(),await new Promise(ze=>requestAnimationFrame(()=>requestAnimationFrame(ze)))},st=async()=>{const ze=[document.head,document.querySelector(".page-wrapper")||document.querySelector(".project-container")].filter(Boolean);ze.length&&await new Promise(Pe=>{let qe=!1,He=null,Ye=null;const ot=()=>{qe||(qe=!0,Qe.disconnect(),He&&clearTimeout(He),Ye&&clearTimeout(Ye),Pe())},et=()=>{He&&clearTimeout(He),He=window.setTimeout(ot,140)},Qe=new MutationObserver(Ze=>{Ze.some(at=>{if(at.type==="childList")return at.addedNodes.length>0||at.removedNodes.length>0;if(at.type==="attributes"){const ht=at.target;return ht instanceof HTMLElement?!ht.classList.contains("e_preloader"):!1}
4620return!1})&&et()});for(const Ze of ze)Qe.observe(Ze,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","src","href","media","disabled"]});Ye=window.setTimeout(ot,1200),et()})},lt=async()=>{const ze=Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).filter(Pe=>!Pe.sheet);ze.length&&await Promise.race([Promise.all(ze.map(Pe=>new Promise(Se=>{const Le=()=>Se();Pe.addEventListener("load",Le,{once:!0}),Pe.addEventListener("error",Le,{once:!0})}))),new Promise(Pe=>window.setTimeout(Pe,1200))])},vt=async()=>{var ze;await it(),await st(),await it(),await lt(),(ze=document.fonts)!=null&&ze.ready&&await Promise.race([document.fonts.ready.catch(()=>{}),new Promise(Pe=>window.setTimeout(Pe,500))]),await it()};{let ze=0,Pe=null,Se=!1;watch(F,async Le=>{const qe=++ze;if(Pe&&(clearTimeout(Pe),Pe=null),Le){if(!Se){j.value=!0;return}Pe=window.setTimeout(()=>{qe!==ze||!F.value||(j.value=!0)},120);return}await vt(),qe===ze&&(j.value=!1,Se=!0)},{immediate:!0})}return onMounted(()=>{try{if(!R||!P)throw new Error("Required stores not initialized");r(()=>{var ze,Pe,Se,Le;U.value=!0,(Se=(ze=R.getUser)==null?void 0:(Pe=ze.call(R)).catch)==null||Se.call(Pe,qe=>console.error("User fetch failed:",qe)),(Le=R.me)==null||Le.call(R),M().then($).catch(qe=>console.error("Modal initialization failed:",qe))})}catch(ze){console.error("Initialization error:",ze)}}),(ze,Pe)=>{var Ye;const Se=Style,Le=Head,qe=__nuxt_component_2,He=__nuxt_component_3;return openBlock(),createElementBlock(Fragment,null,[U.value&&se.value&&!L.value?(openBlock(),createBlock(unref(d),{key:0,section:ke.value},null,8,["section"])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_1$2,[U.value&&!L.value?(openBlock(),createBlock(unref(a),{key:0})):createCommentVNode("",!0),createBaseVNode("div",{class:normalizeClass([{"mounting-state":j.value},"project-container apper"])},[(Ye=unref(P))!=null&&Ye.getGlobalStyle?(openBlock(),createBlock(Le,{key:0},{default:withCtx(()=>{var ot,et,Qe;return[createVNode(Se,{type:"text/css",children:(et=(ot=unref(P))==null?void 0:ot.getGlobalStyle)==null?void 0:et.rawStyles},null,8,["children"]),(Qe=ke.value)!=null&&Qe.css?(openBlock(),createBlock(Se,{key:0,type:"text/css",children:ke.value.css},null,8,["children"])):createCommentVNode("",!0)]}),_:1})):createCommentVNode("",!0),createBaseVNode("div",_hoisted_2$1,[J.value?(openBlock(),createBlock(qe,{key:0,color:te.value,height:ve.value},null,8,["color","height"])):createCommentVNode("",!0),createBaseVNode("main",{class:normalizeClass({"sticky-footer-container":Z.value}),role:"main"},[createVNode(He,{onStickyFooterUpdated:Me})],2),U.value?(openBlock(),createBlock(unref(l),{key:1})):createCommentVNode("",!0),U.value?(openBlock(),createBlock(unref(u),{key:2})):createCommentVNode("",!0),U.value?(openBlock(),createBlock(unref(f),{key:3})):createCommentVNode("",!0),U.value&&unref(P)&&!L.value?(openBlock(),createBlock(unref(c),{key:4})):createCommentVNode("",!0),createVNode(Se,{children:"[data-aos]{pointer-events:unset!important;}"})])],2),U.value&&!L.value?(openBlock(),createBlock(unref(a),{key:1,bottom:!0})):createCommentVNode("",!0),createBaseVNode("div",{innerHTML:Y("body")},null,8,_hoisted_3$1)])],64)}}},AppComponent=_export_sfc(_sfc_main$2,[["__scopeId","data-v-ea9dd8a6"]]),_hoisted_1$1={class:"vh-100 d-flex align-items-center justify-content-center text-center"},_hoisted_2={class:"mx-6"},_hoisted_3={class:"d-flex mb-md-5 mb-2"},_hoisted_4={key:0,width:"100%",height:"186",viewBox:"0 0 600 186",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_hoisted_5={class:"mb-3"},_hoisted_6=["textContent"],_hoisted_7={key:0},_sfc_main$1={__name:"error",props:{error:{required:!0}},setup(o){const r=o,a=computed(()=>{var u;return Number((u=r.error)==null?void 0:u.statusCode)||404}),l=computed(()=>a.value===403?"Access denied":a.value===404?"Page Not Found":"Something went wrong"),c=computed(()=>a.value===403?"This site isn’t available in your country right now.":(a.value===404,"The page you are looking for has been removed or is currently unavailable..."));return onMounted(()=>{}),(u,d)=>{const f=Style;return openBlock(),createElementBlock("div",null,[createVNode(f,{type:"text/css"},{default:withCtx(()=>
4620d[0]||(d[0]=[createTextVNode(`.el-parapgraph p, .el-subheadline p, .el-headline p {margin:0!important;}.mark-1,.mark-2,.mark-3,.mark-9{margin: 2px;padding: 2px 20px;}.el-parapgraph .mark-4, .el-parapgraph .mark-5, .el-parapgraph .mark-6, .el-parapgraph .mark-7,.el-parapgraph .mark-8{padding: 0;}.z-1000{z-index:1000;}.navbar-brand img{height:inherit}*,:after,:before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:#fff;color:#212529;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;margin:0}hr{background-color:currentColor;border:0;color:inherit;margin:1rem 0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{font-weight:500;line-height:1.2;margin-bottom:.5rem;margin-top:0}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}abbr[data-bs-original-title],abbr[title]{cursor:help;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{font-style:normal;line-height:inherit;margin-bottom:1rem}ol,ul{padding-left:2rem}dl,ol,ul{margin-bottom:1rem;margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{background-color:#fcf8e3;padding:.2em}sub,sup{font-size:.75em;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{direction:ltr;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;unicode-bidi:bidi-override}pre{display:block;font-size:.875em;margin-bottom:1rem;margin-top:0;overflow:auto}pre code{color:inherit;font-size:inherit;word-break:normal}code{word-wrap:break-word;color:#d63384;font-size:.875em}a>code{color:inherit}kbd{background-color:#212529;border-radius:.2rem;color:#fff;font-size:.875em;padding:.2rem .4rem}kbd kbd{font-size:1em;font-weight:700;padding:0}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{border-collapse:collapse;caption-side:bottom}caption{color:#6c757d;padding-bottom:.5rem;padding-top:.5rem;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border:0 solid;border-color:inherit}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}
4620[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{border-style:none;padding:0}textarea{resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{float:left;font-size:calc(1.275rem + .3vw);line-height:inherit;margin-bottom:.5rem;padding:0;width:100%}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}iframe{border:0}summary{cursor:pointer;display:list-item}progress{vertical-align:baseline}[hidden]{display:none!important}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-left:calc(var(--bs-gutter-x)/-2);margin-right:calc(var(--bs-gutter-x)/-2);margin-top:calc(var(--bs-gutter-y)*-1)}.row>*{flex-shrink:0;margin-top:var(--bs-gutter-y);max-width:100%;padding-left:calc(var(--bs-gutter-x)/2);padding-right:calc(var(--bs-gutter-x)/2);width:100%}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.3333333333%}.col-2{flex:0 0 auto;width:16.6666666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.3333333333%}.col-5{flex:0 0 auto;width:41.6666666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.3333333333%}.col-8{flex:0 0 auto;width:66.6666666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.3333333333%}.col-11{flex:0 0 auto;width:91.6666666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.3333333333%}.offset-2{margin-left:16.6666666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.3333333333%}.offset-5{margin-left:41.6666666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.3333333333%}.offset-8{margin-left:66.6666666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.3333333333%}.offset-11{margin-left:91.6666666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.3333333333%}.col-sm-2{flex:0 0 auto;width:16.6666666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.3333333333%}.col-sm-5{flex:0 0 auto;width:41.6666666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.3333333333%}.col-sm-8{flex:0 0 auto;width:66.6666666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.3333333333%}.col-sm-11{flex:0 0 auto;width:91.6666666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.3333333333%}.offset-sm-2{margin-left:16.6666666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.3333333333%}.offset-sm-5{margin-left:41.6666666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.3333333333%}.offset-sm-8{margin-left:66.6666666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.3333333333%}.offset-sm-11{margin-left:91.6666666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}
4620.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.3333333333%}.col-md-2{flex:0 0 auto;width:16.6666666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.3333333333%}.col-md-5{flex:0 0 auto;width:41.6666666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.3333333333%}.col-md-8{flex:0 0 auto;width:66.6666666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.3333333333%}.col-md-11{flex:0 0 auto;width:91.6666666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.3333333333%}.offset-md-2{margin-left:16.6666666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.3333333333%}.offset-md-5{margin-left:41.6666666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.3333333333%}.offset-md-8{margin-left:66.6666666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.3333333333%}.offset-md-11{margin-left:91.6666666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}
4620.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.3333333333%}.col-lg-2{flex:0 0 auto;width:16.6666666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.3333333333%}.col-lg-5{flex:0 0 auto;width:41.6666666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.3333333333%}.col-lg-8{flex:0 0 auto;width:66.6666666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.3333333333%}.col-lg-11{flex:0 0 auto;width:91.6666666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.3333333333%}.offset-lg-2{margin-left:16.6666666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.3333333333%}.offset-lg-5{margin-left:41.6666666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.3333333333%}.offset-lg-8{margin-left:66.6666666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.3333333333%}.offset-lg-11{margin-left:91.6666666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.3333333333%}.col-xl-2{flex:0 0 auto;width:16.6666666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.3333333333%}.col-xl-5{flex:0 0 auto;width:41.6666666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.3333333333%}.col-xl-8{flex:0 0 auto;width:66.6666666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.3333333333%}.col-xl-11{flex:0 0 auto;width:91.6666666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.3333333333%}.offset-xl-2{margin-left:16.6666666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.3333333333%}.offset-xl-5{margin-left:41.6666666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.3333333333%}.offset-xl-8{margin-left:66.6666666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.3333333333%}.offset-xl-11{margin-left:91.6666666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.3333333333%}.col-xxl-2{flex:0 0 auto;width:16.6666666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.3333333333%}.col-xxl-5{flex:0 0 auto;width:41.6666666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.3333333333%}.col-xxl-8{flex:0 0 auto;width:66.6666666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.3333333333%}.col-xxl-11{flex:0 0 auto;width:91.6666666667%}.col-xxl-12{flex:0 0 auto;width:100%}
4620.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.3333333333%}.offset-xxl-2{margin-left:16.6666666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.3333333333%}.offset-xxl-5{margin-left:41.6666666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.3333333333%}.offset-xxl-8{margin-left:66.6666666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.3333333333%}.offset-xxl-11{margin-left:91.6666666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}} /*! * Bootstrap Utilities v5.0.0 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */.clearfix:after{clear:both;content:"";display:block}.link-primary{color:#0d6efd}.link-primary:focus,.link-primary:hover{color:#0a58ca}.link-secondary{color:#6c757d}.link-secondary:focus,.link-secondary:hover{color:#565e64}.link-success{color:#198754}.link-success:focus,.link-success:hover{color:#146c43}.link-info{color:#0dcaf0}.link-info:focus,.link-info:hover{color:#3dd5f3}.link-warning{color:#ffc107}.link-warning:focus,.link-warning:hover{color:#ffcd39}.link-danger{color:#dc3545}.link-danger:focus,.link-danger:hover{color:#b02a37}.link-light{color:#f8f9fa}.link-light:focus,.link-light:hover{color:#f9fafb}.link-dark{color:#212529}.link-dark:focus,.link-dark:hover{color:#1a1e21}.ratio{position:relative;width:100%}.ratio:before{content:"";display:block;padding-top:var(--bs-aspect-ratio)}.ratio>*{height:100%;left:0;position:absolute;top:0;width:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{top:0}.fixed-bottom,.fixed-top{left:0;position:fixed;right:0;z-index:1030}.fixed-bottom{bottom:0}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.stretched-link:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:1}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}
4620.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:1px solid #dee2e6!important}.border-0{border:0!important}.border-top{border-top:1px solid #dee2e6!important}.border-top-0{border-top:0!important}.border-end{border-right:1px solid #dee2e6!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:1px solid #dee2e6!important}.border-start-0{border-left:0!important}.border-primary{border-color:#0d6efd!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#198754!important}.border-info{border-color:#0dcaf0!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#212529!important}.border-white{border-color:#fff!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-left:0!important;margin-right:0!important}.mx-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-3{margin-left:1rem!important;margin-right:1rem!important}.mx-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-5{margin-left:3rem!important;margin-right:3rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-0{margin-bottom:0!important;margin-top:0!important}.my-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.my-3{margin-bottom:1rem!important;margin-top:1rem!important}.my-4{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.my-5{margin-bottom:3rem!important;margin-top:3rem!important}.my-auto{margin-bottom:auto!important;margin-top:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-left:0!important;padding-right:0!important}.px-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-3{padding-left:1rem!important;padding-right:1rem!important}.px-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-5{padding-left:3rem!important;padding-right:3rem!important}.py-0{padding-bottom:0!important;padding-top:0!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-3{padding-bottom:1rem!important;padding-top:1rem!important}.py-4{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-5{padding-bottom:3rem!important;padding-top:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}
4620.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{color:#0d6efd!important}.text-secondary{color:#6c757d!important}.text-success{color:#198754!important}.text-info{color:#0dcaf0!important}.text-warning{color:#ffc107!important}.text-danger{color:#dc3545!important}.text-light{color:#f8f9fa!important}.text-dark{color:#212529!important}.text-white{color:#fff!important}.text-body{color:#212529!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:hsla(0,0%,100%,.5)!important}.text-reset{color:inherit!important}.bg-primary{background-color:#0d6efd!important}.bg-secondary{background-color:#6c757d!important}.bg-success{background-color:#198754!important}.bg-info{background-color:#0dcaf0!important}.bg-warning{background-color:#ffc107!important}.bg-danger{background-color:#dc3545!important}.bg-light{background-color:#f8f9fa!important}.bg-dark{background-color:#212529!important}.bg-body,.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;-ms-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:.25rem!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:.2rem!important}.rounded-2{border-radius:.25rem!important}.rounded-3{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-top{border-top-left-radius:.25rem!important}.rounded-end,.rounded-top{border-top-right-radius:.25rem!important}.rounded-bottom,.rounded-end{border-bottom-right-radius:.25rem!important}.rounded-bottom,.rounded-start{border-bottom-left-radius:.25rem!important}.rounded-start{border-top-left-radius:.25rem!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}
4620.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-left:0!important;margin-right:0!important}.mx-sm-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-sm-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-sm-3{margin-left:1rem!important;margin-right:1rem!important}.mx-sm-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-sm-5{margin-left:3rem!important;margin-right:3rem!important}.mx-sm-auto{margin-left:auto!important;margin-right:auto!important}.my-sm-0{margin-bottom:0!important;margin-top:0!important}.my-sm-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-sm-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.my-sm-3{margin-bottom:1rem!important;margin-top:1rem!important}.my-sm-4{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.my-sm-5{margin-bottom:3rem!important;margin-top:3rem!important}.my-sm-auto{margin-bottom:auto!important;margin-top:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-left:0!important;padding-right:0!important}.px-sm-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-sm-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-sm-3{padding-left:1rem!important;padding-right:1rem!important}.px-sm-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-sm-5{padding-left:3rem!important;padding-right:3rem!important}.py-sm-0{padding-bottom:0!important;padding-top:0!important}.py-sm-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-sm-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-sm-3{padding-bottom:1rem!important;padding-top:1rem!important}.py-sm-4{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-sm-5{padding-bottom:3rem!important;padding-top:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}
4620.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-left:0!important;margin-right:0!important}.mx-md-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-md-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-md-3{margin-left:1rem!important;margin-right:1rem!important}.mx-md-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-md-5{margin-left:3rem!important;margin-right:3rem!important}.mx-md-auto{margin-left:auto!important;margin-right:auto!important}.my-md-0{margin-bottom:0!important;margin-top:0!important}.my-md-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-md-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.my-md-3{margin-bottom:1rem!important;margin-top:1rem!important}.my-md-4{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.my-md-5{margin-bottom:3rem!important;margin-top:3rem!important}.my-md-auto{margin-bottom:auto!important;margin-top:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-left:0!important;padding-right:0!important}.px-md-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-md-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-md-3{padding-left:1rem!important;padding-right:1rem!important}.px-md-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-md-5{padding-left:3rem!important;padding-right:3rem!important}.py-md-0{padding-bottom:0!important;padding-top:0!important}.py-md-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-md-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-md-3{padding-bottom:1rem!important;padding-top:1rem!important}.py-md-4{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-md-5{padding-bottom:3rem!important;padding-top:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}
4620.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-left:0!important;margin-right:0!important}.mx-lg-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-lg-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-lg-3{margin-left:1rem!important;margin-right:1rem!important}.mx-lg-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-lg-5{margin-left:3rem!important;margin-right:3rem!important}.mx-lg-auto{margin-left:auto!important;margin-right:auto!important}.my-lg-0{margin-bottom:0!important;margin-top:0!important}.my-lg-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-lg-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.my-lg-3{margin-bottom:1rem!important;margin-top:1rem!important}.my-lg-4{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.my-lg-5{margin-bottom:3rem!important;margin-top:3rem!important}.my-lg-auto{margin-bottom:auto!important;margin-top:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-left:0!important;padding-right:0!important}.px-lg-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-lg-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-lg-3{padding-left:1rem!important;padding-right:1rem!important}.px-lg-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-lg-5{padding-left:3rem!important;padding-right:3rem!important}.py-lg-0{padding-bottom:0!important;padding-top:0!important}.py-lg-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-lg-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-lg-3{padding-bottom:1rem!important;padding-top:1rem!important}.py-lg-4{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-lg-5{padding-bottom:3rem!important;padding-top:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}
4620.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-left:0!important;margin-right:0!important}.mx-xl-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-xl-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-xl-3{margin-left:1rem!important;margin-right:1rem!important}.mx-xl-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-xl-5{margin-left:3rem!important;margin-right:3rem!important}.mx-xl-auto{margin-left:auto!important;margin-right:auto!important}.my-xl-0{margin-bottom:0!important;margin-top:0!important}.my-xl-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-xl-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.my-xl-3{margin-bottom:1rem!important;margin-top:1rem!important}.my-xl-4{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.my-xl-5{margin-bottom:3rem!important;margin-top:3rem!important}.my-xl-auto{margin-bottom:auto!important;margin-top:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-left:0!important;padding-right:0!important}.px-xl-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-xl-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-xl-3{padding-left:1rem!important;padding-right:1rem!important}.px-xl-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-xl-5{padding-left:3rem!important;padding-right:3rem!important}.py-xl-0{padding-bottom:0!important;padding-top:0!important}.py-xl-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-xl-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-xl-3{padding-bottom:1rem!important;padding-top:1rem!important}.py-xl-4{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-xl-5{padding-bottom:3rem!important;padding-top:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}
4620.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-left:0!important;margin-right:0!important}.mx-xxl-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-xxl-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-xxl-3{margin-left:1rem!important;margin-right:1rem!important}.mx-xxl-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-xxl-5{margin-left:3rem!important;margin-right:3rem!important}.mx-xxl-auto{margin-left:auto!important;margin-right:auto!important}.my-xxl-0{margin-bottom:0!important;margin-top:0!important}.my-xxl-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-xxl-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.my-xxl-3{margin-bottom:1rem!important;margin-top:1rem!important}.my-xxl-4{margin-bottom:1.5rem!important;margin-top:1.5rem!important}.my-xxl-5{margin-bottom:3rem!important;margin-top:3rem!important}.my-xxl-auto{margin-bottom:auto!important;margin-top:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-left:0!important;padding-right:0!important}.px-xxl-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-xxl-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-xxl-3{padding-left:1rem!important;padding-right:1rem!important}.px-xxl-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-xxl-5{padding-left:3rem!important;padding-right:3rem!important}.py-xxl-0{padding-bottom:0!important;padding-top:0!important}.py-xxl-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-xxl-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-xxl-3{padding-bottom:1rem!important;padding-top:1rem!important}.py-xxl-4{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-xxl-5{padding-bottom:3rem!important;padding-top:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}
4620.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}@-webkit-keyframes progress-bar-stripes{0%{background-position-x:1rem}}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{background-color:#e9ecef;border-radius:.25rem;font-size:.75rem;height:1rem}.progress,.progress-bar{display:flex;overflow:hidden}.progress-bar{background-color:#0d6efd;color:#fff;flex-direction:column;justify-content:center;text-align:center;transition:width .6s ease;white-space:nowrap}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.btn{background-color:transparent;border:1px solid transparent;border-radius:.25rem;color:#212529;cursor:pointer;display:inline-block;font-size:1rem;font-weight:400;line-height:1.5;padding:.375rem .75rem;text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn-check:focus+.btn,.btn:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.25);outline:0}.btn.disabled,.btn:disabled,fieldset:disabled .btn{opacity:.65;pointer-events:none}.btn-primary{background-color:#0d6efd;border-color:#0d6efd;color:#fff}.btn-check:focus+.btn-primary,.btn-primary:focus,.btn-primary:hover{background-color:#0b5ed7;border-color:#0a58ca;color:#fff}.btn-check:focus+.btn-primary,.btn-primary:focus{box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-check:active+.btn-primary,.btn-check:checked+.btn-primary,.btn-primary.active,.btn-primary:active,.show>.btn-primary.dropdown-toggle{background-color:#0a58ca;border-color:#0a53be;color:#fff}.btn-check:active+.btn-primary:focus,.btn-check:checked+.btn-primary:focus,.btn-primary.active:focus,.btn-primary:active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-primary.disabled,.btn-primary:disabled{background-color:#0d6efd;border-color:#0d6efd;color:#fff}.btn-secondary{background-color:#6c757d;border-color:#6c757d;color:#fff}.btn-check:focus+.btn-secondary,.btn-secondary:focus,.btn-secondary:hover{background-color:#5c636a;border-color:#565e64;color:#fff}.btn-check:focus+.btn-secondary,.btn-secondary:focus{box-shadow:0 0 0 .25rem hsla(208,6%,54%,.5)}
4620.btn-check:active+.btn-secondary,.btn-check:checked+.btn-secondary,.btn-secondary.active,.btn-secondary:active,.show>.btn-secondary.dropdown-toggle{background-color:#565e64;border-color:#51585e;color:#fff}.btn-check:active+.btn-secondary:focus,.btn-check:checked+.btn-secondary:focus,.btn-secondary.active:focus,.btn-secondary:active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem hsla(208,6%,54%,.5)}.btn-secondary.disabled,.btn-secondary:disabled{background-color:#6c757d;border-color:#6c757d;color:#fff}.btn-success{background-color:#198754;border-color:#198754;color:#fff}.btn-check:focus+.btn-success,.btn-success:focus,.btn-success:hover{background-color:#157347;border-color:#146c43;color:#fff}.btn-check:focus+.btn-success,.btn-success:focus{box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-check:active+.btn-success,.btn-check:checked+.btn-success,.btn-success.active,.btn-success:active,.show>.btn-success.dropdown-toggle{background-color:#146c43;border-color:#13653f;color:#fff}.btn-check:active+.btn-success:focus,.btn-check:checked+.btn-success:focus,.btn-success.active:focus,.btn-success:active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-success.disabled,.btn-success:disabled{background-color:#198754;border-color:#198754;color:#fff}.btn-info{background-color:#0dcaf0;border-color:#0dcaf0;color:#000}.btn-check:focus+.btn-info,.btn-info:focus,.btn-info:hover{background-color:#31d2f2;border-color:#25cff2;color:#000}.btn-check:focus+.btn-info,.btn-info:focus{box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-check:active+.btn-info,.btn-check:checked+.btn-info,.btn-info.active,.btn-info:active,.show>.btn-info.dropdown-toggle{background-color:#3dd5f3;border-color:#25cff2;color:#000}.btn-check:active+.btn-info:focus,.btn-check:checked+.btn-info:focus,.btn-info.active:focus,.btn-info:active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-info.disabled,.btn-info:disabled{background-color:#0dcaf0;border-color:#0dcaf0;color:#000}.btn-warning{background-color:#ffc107;border-color:#ffc107;color:#000}.btn-check:focus+.btn-warning,.btn-warning:focus,.btn-warning:hover{background-color:#ffca2c;border-color:#ffc720;color:#000}.btn-check:focus+.btn-warning,.btn-warning:focus{box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-check:active+.btn-warning,.btn-check:checked+.btn-warning,.btn-warning.active,.btn-warning:active,.show>.btn-warning.dropdown-toggle{background-color:#ffcd39;border-color:#ffc720;color:#000}.btn-check:active+.btn-warning:focus,.btn-check:checked+.btn-warning:focus,.btn-warning.active:focus,.btn-warning:active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-warning.disabled,.btn-warning:disabled{background-color:#ffc107;border-color:#ffc107;color:#000}.btn-danger{background-color:#dc3545;border-color:#dc3545;color:#fff}.btn-check:focus+.btn-danger,.btn-danger:focus,.btn-danger:hover{background-color:#bb2d3b;border-color:#b02a37;color:#fff}.btn-check:focus+.btn-danger,.btn-danger:focus{box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-check:active+.btn-danger,.btn-check:checked+.btn-danger,.btn-danger.active,.btn-danger:active,.show>.btn-danger.dropdown-toggle{background-color:#b02a37;border-color:#a52834;color:#fff}.btn-check:active+.btn-danger:focus,.btn-check:checked+.btn-danger:focus,.btn-danger.active:focus,.btn-danger:active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{background-color:#dc3545;border-color:#dc3545;color:#fff}.btn-light{background-color:#f8f9fa;border-color:#f8f9fa;color:#000}.btn-check:focus+.btn-light,.btn-light:focus,.btn-light:hover{background-color:#f9fafb;border-color:#f9fafb;color:#000}.btn-check:focus+.btn-light,.btn-light:focus{box-shadow:0 0 0 .25rem hsla(210,2%,83%,.5)}.btn-check:active+.btn-light,.btn-check:checked+.btn-light,.btn-light.active,.btn-light:active,.show>.btn-light.dropdown-toggle{background-color:#f9fafb;border-color:#f9fafb;color:#000}.btn-check:active+.btn-light:focus,.btn-check:checked+.btn-light:focus,.btn-light.active:focus,.btn-light:active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .25rem hsla(210,2%,83%,.5)}
4620.btn-light.disabled,.btn-light:disabled{background-color:#f8f9fa;border-color:#f8f9fa;color:#000}.btn-dark{background-color:#212529;border-color:#212529;color:#fff}.btn-check:focus+.btn-dark,.btn-dark:focus,.btn-dark:hover{background-color:#1c1f23;border-color:#1a1e21;color:#fff}.btn-check:focus+.btn-dark,.btn-dark:focus{box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-check:active+.btn-dark,.btn-check:checked+.btn-dark,.btn-dark.active,.btn-dark:active,.show>.btn-dark.dropdown-toggle{background-color:#1a1e21;border-color:#191c1f;color:#fff}.btn-check:active+.btn-dark:focus,.btn-check:checked+.btn-dark:focus,.btn-dark.active:focus,.btn-dark:active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-dark.disabled,.btn-dark:disabled{background-color:#212529;border-color:#212529;color:#fff}.btn-outline-primary{border-color:#0d6efd;color:#0d6efd}.btn-outline-primary:hover{background-color:#0d6efd;border-color:#0d6efd;color:#fff}.btn-check:focus+.btn-outline-primary,.btn-outline-primary:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-check:active+.btn-outline-primary,.btn-check:checked+.btn-outline-primary,.btn-outline-primary.active,.btn-outline-primary.dropdown-toggle.show,.btn-outline-primary:active{background-color:#0d6efd;border-color:#0d6efd;color:#fff}.btn-check:active+.btn-outline-primary:focus,.btn-check:checked+.btn-outline-primary:focus,.btn-outline-primary.active:focus,.btn-outline-primary.dropdown-toggle.show:focus,.btn-outline-primary:active:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{background-color:transparent;color:#0d6efd}.btn-outline-secondary{border-color:#6c757d;color:#6c757d}.btn-outline-secondary:hover{background-color:#6c757d;border-color:#6c757d;color:#fff}.btn-check:focus+.btn-outline-secondary,.btn-outline-secondary:focus{box-shadow:0 0 0 .25rem hsla(208,7%,46%,.5)}.btn-check:active+.btn-outline-secondary,.btn-check:checked+.btn-outline-secondary,.btn-outline-secondary.active,.btn-outline-secondary.dropdown-toggle.show,.btn-outline-secondary:active{background-color:#6c757d;border-color:#6c757d;color:#fff}.btn-check:active+.btn-outline-secondary:focus,.btn-check:checked+.btn-outline-secondary:focus,.btn-outline-secondary.active:focus,.btn-outline-secondary.dropdown-toggle.show:focus,.btn-outline-secondary:active:focus{box-shadow:0 0 0 .25rem hsla(208,7%,46%,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{background-color:transparent;color:#6c757d}.btn-outline-success{border-color:#198754;color:#198754}.btn-outline-success:hover{background-color:#198754;border-color:#198754;color:#fff}.btn-check:focus+.btn-outline-success,.btn-outline-success:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-check:active+.btn-outline-success,.btn-check:checked+.btn-outline-success,.btn-outline-success.active,.btn-outline-success.dropdown-toggle.show,.btn-outline-success:active{background-color:#198754;border-color:#198754;color:#fff}.btn-check:active+.btn-outline-success:focus,.btn-check:checked+.btn-outline-success:focus,.btn-outline-success.active:focus,.btn-outline-success.dropdown-toggle.show:focus,.btn-outline-success:active:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{background-color:transparent;color:#198754}.btn-outline-info{border-color:#0dcaf0;color:#0dcaf0}.btn-outline-info:hover{background-color:#0dcaf0;border-color:#0dcaf0;color:#000}.btn-check:focus+.btn-outline-info,.btn-outline-info:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-check:active+.btn-outline-info,.btn-check:checked+.btn-outline-info,.btn-outline-info.active,.btn-outline-info.dropdown-toggle.show,.btn-outline-info:active{background-color:#0dcaf0;border-color:#0dcaf0;color:#000}.btn-check:active+.btn-outline-info:focus,.btn-check:checked+.btn-outline-info:focus,.btn-outline-info.active:focus,.btn-outline-info.dropdown-toggle.show:focus,.btn-outline-info:active:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{background-color:transparent;color:#0dcaf0}.btn-outline-warning{border-color:#ffc107;color:#ffc107}.btn-outline-warning:hover{background-color:#ffc107;border-color:#ffc107;color:#000}.btn-check:focus+.btn-outline-warning,.btn-outline-warning:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}
4620.btn-check:active+.btn-outline-warning,.btn-check:checked+.btn-outline-warning,.btn-outline-warning.active,.btn-outline-warning.dropdown-toggle.show,.btn-outline-warning:active{background-color:#ffc107;border-color:#ffc107;color:#000}.btn-check:active+.btn-outline-warning:focus,.btn-check:checked+.btn-outline-warning:focus,.btn-outline-warning.active:focus,.btn-outline-warning.dropdown-toggle.show:focus,.btn-outline-warning:active:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{background-color:transparent;color:#ffc107}.btn-outline-danger{border-color:#dc3545;color:#dc3545}.btn-outline-danger:hover{background-color:#dc3545;border-color:#dc3545;color:#fff}.btn-check:focus+.btn-outline-danger,.btn-outline-danger:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-check:active+.btn-outline-danger,.btn-check:checked+.btn-outline-danger,.btn-outline-danger.active,.btn-outline-danger.dropdown-toggle.show,.btn-outline-danger:active{background-color:#dc3545;border-color:#dc3545;color:#fff}.btn-check:active+.btn-outline-danger:focus,.btn-check:checked+.btn-outline-danger:focus,.btn-outline-danger.active:focus,.btn-outline-danger.dropdown-toggle.show:focus,.btn-outline-danger:active:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{background-color:transparent;color:#dc3545}.btn-outline-light{border-color:#f8f9fa;color:#f8f9fa}.btn-outline-light:hover{background-color:#f8f9fa;border-color:#f8f9fa;color:#000}.btn-check:focus+.btn-outline-light,.btn-outline-light:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}
4620.btn-check:active+.btn-outline-light,.btn-check:checked+.btn-outline-light,.btn-outline-light.active,.btn-outline-light.dropdown-toggle.show,.btn-outline-light:active{background-color:#f8f9fa;border-color:#f8f9fa;color:#000}.btn-check:active+.btn-outline-light:focus,.btn-check:checked+.btn-outline-light:focus,.btn-outline-light.active:focus,.btn-outline-light.dropdown-toggle.show:focus,.btn-outline-light:active:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{background-color:transparent;color:#f8f9fa}.btn-outline-dark{border-color:#212529;color:#212529}.btn-outline-dark:hover{background-color:#212529;border-color:#212529;color:#fff}.btn-check:focus+.btn-outline-dark,.btn-outline-dark:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-check:active+.btn-outline-dark,.btn-check:checked+.btn-outline-dark,.btn-outline-dark.active,.btn-outline-dark.dropdown-toggle.show,.btn-outline-dark:active{background-color:#212529;border-color:#212529;color:#fff}.btn-check:active+.btn-outline-dark:focus,.btn-check:checked+.btn-outline-dark:focus,.btn-outline-dark.active:focus,.btn-outline-dark.dropdown-toggle.show:focus,.btn-outline-dark:active:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{background-color:transparent;color:#212529}.btn-link{color:#0d6efd;font-weight:400;text-decoration:underline}.btn-link:hover{color:#0a58ca}.btn-link.disabled,.btn-link:disabled{color:#6c757d}.btn-lg{border-radius:.3rem;font-size:1.25rem;padding:.5rem 1rem}.btn-sm{border-radius:.2rem;font-size:.875rem;padding:.25rem .5rem}.card{word-wrap:break-word;background-clip:border-box;background-color:#fff;border:1px solid rgba(0,0,0,.125);border-radius:.25rem;display:flex;flex-direction:column;min-width:0;position:relative}.card>hr{margin-left:0;margin-right:0}.card>.list-group{border-bottom:inherit;border-top:inherit}.card>.list-group:first-child{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px);border-top-width:0}.card>.list-group:last-child{border-bottom-left-radius:calc(.25rem - 1px);border-bottom-right-radius:calc(.25rem - 1px);border-bottom-width:0}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:1rem}.card-title{margin-bottom:.5rem}.card-subtitle{margin-top:-.25rem}.card-subtitle,.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1rem}.card-header{background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125);margin-bottom:0;padding:.5rem 1rem}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125);padding:.5rem 1rem}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{border-bottom:0;margin-bottom:-.5rem}.card-header-pills,.card-header-tabs{margin-left:-.5rem;margin-right:-.5rem}.card-img-overlay{border-radius:calc(.25rem - 1px);bottom:0;left:0;padding:1rem;position:absolute;right:0;top:0}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-left-radius:calc(.25rem - 1px);border-bottom-right-radius:calc(.25rem - 1px)}.card-group>.card{margin-bottom:.75rem}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{border-left:0;margin-left:0}.card-group>.card:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.form-control{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-clip:padding-box;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;color:#212529;display:block;font-size:1rem;font-weight:400;line-height:1.5;padding:.375rem .75rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not(:-moz-read-only){cursor:pointer}.form-control[type=file]:not(:disabled):not(:read-only){cursor:pointer}.form-control:focus{background-color:#fff;border-color:#86b7fe;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);color:#212529;outline:0}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:-moz-read-only{background-color:#e9ecef;opacity:1}.form-control:disabled,.form-control:read-only{background-color:#e9ecef;opacity:1}.form-control::file-selector-button{-webkit-margin-end:.75rem;background-color:#e9ecef;border:0 solid;border-color:inherit;border-inline-end-width:1px;border-radius:0;color:#212529;margin:-.375rem -.75rem;margin-inline-end:.75rem;padding:.375rem .75rem;pointer-events:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not(:-moz-read-only)::file-selector-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not(:read-only)::file-selector-button{background-color:#dde0e3}.form-control::-webkit-file-upload-button{-webkit-margin-end:.75rem;background-color:#e9ecef;border:0 solid;border-color:inherit;border-inline-end-width:1px;border-radius:0;color:#212529;margin:-.375rem -.75rem;margin-inline-end:.75rem;padding:.375rem .75rem;pointer-events:none;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}}.form-control:hover:not(:disabled):not(:read-only)::-webkit-file-upload-button{background-color:#dde0e3}.form-control-plaintext{background-color:transparent;border:solid transparent;border-width:1px 0;color:#212529;display:block;line-height:1.5;margin-bottom:0;padding:.375rem 0;width:100%}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-left:0;padding-right:0}.form-control-sm{border-radius:.2rem;font-size:.875rem;min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem}.form-control-sm::file-selector-button{-webkit-margin-end:.5rem;margin:-.25rem -.5rem;margin-inline-end:.5rem;padding:.25rem .5rem}.form-control-sm::-webkit-file-upload-button{-webkit-margin-end:.5rem;margin:-.25rem -.5rem;margin-inline-end:.5rem;padding:.25rem .5rem}.form-control-lg{border-radius:.3rem;font-size:1.25rem;min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem}.form-control-lg::file-selector-button{-webkit-margin-end:1rem;margin:-.5rem -1rem;margin-inline-end:1rem;padding:.5rem 1rem}.form-control-lg::-webkit-file-upload-button{-webkit-margin-end:1rem;margin:-.5rem -1rem;margin-inline-end:1rem;padding:.5rem 1rem}textarea.form-control{padding-top:10px;min-height:calc(6.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{height:auto;max-width:3rem;padding:.375rem}.form-control-color:not(:disabled):not(:-moz-read-only){cursor:pointer}.form-control-color:not(:disabled):not(:read-only){cursor:pointer}.form-control-color::-moz-color-swatch{border-radius:.25rem;height:1.5em}.form-control-color::-webkit-color-swatch{border-radius:.25rem;height:1.5em}.navbar{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;padding-bottom:.5rem;padding-top:.5rem;position:relative}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{align-items:center;display:flex;flex-wrap:inherit;justify-content:space-between}.navbar-brand{font-size:1.25rem;margin-right:1rem;padding-bottom:.3125rem;padding-top:.3125rem;text-decoration:none;white-space:nowrap}.navbar-nav{display:flex;flex-direction:column;list-style:none;margin-bottom:0;padding-left:0}.navbar-nav .nav-link{padding-left:0;padding-right:0}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-bottom:.5rem;padding-top:.5rem}.navbar-collapse{align-items:center;flex-basis:100%;flex-grow:1}.navbar-toggler{background-color:transparent;border:1px solid transparent;border-radius:.25rem;font-size:1.25rem;line-height:1;padding:.25rem .75rem;
4620transition:box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{box-shadow:0 0 0 .25rem;outline:0;text-decoration:none}.navbar-toggler-icon{background-position:50%;background-repeat:no-repeat;background-size:100%;display:inline-block;height:1.5em;vertical-align:middle;width:1.5em}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-left:.5rem;padding-right:.5rem}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-left:.5rem;padding-right:.5rem}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-left:.5rem;padding-right:.5rem}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-left:.5rem;padding-right:.5rem}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-left:.5rem;padding-right:.5rem}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-left:.5rem;padding-right:.5rem}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand,.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.55)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{border-color:rgba(0,0,0,.1);color:rgba(0,0,0,.55)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-light .navbar-text{color:rgba(0,0,0,.55)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand,.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:hsla(0,0%,100%,.55)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:hsla(0,0%,100%,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:hsla(0,0%,100%,.25)}.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.55)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255, 255, 255, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-dark .navbar-text{color:hsla(0,0%,100%,.55)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.nav-link{text-decoration:none}.list-unstyled{list-style:none!important;padding:0}.dropdown-item:hover{background:rgba(233,236,239,.5);}.dropdown-item a{display:block;padding:10px 0}.navbar-colapsed{display:none}@media (min-width:1100px){.navbar-colapsed{display:block!important}}.me-4{margin-right:1.5rem!important}.collapse:not(.show){display:none}.list-inline{list-style:none;padding-left:0}.list-inline .list-inline-item{display:inline-block}.btn{border-radius:.3rem}.top-0{top:0}.img-fluid{height:auto;max-width:100%}.page *{overflow-wrap:anywhere!important}header .btn{white-space:nowrap!important}header{white-space:nowrap}.row-wrapper{display:flex;flex-wrap:wrap;margin-left:-15px;margin-right:-15px}.btn:not(.page-link){font-weight:700;padding:13px 41px}.row.display-flex>[class*=col-]{display:flex;flex-direction:column}.center-util{left:50%;transform:translate(-50%,-50%)}.center-util,.center-y-util{position:absolute;top:50%;z-index:10}.center-y-util{transform:translateY(-50%)}.center-x-util{left:50%;position:absolute;transform:translateX(-50%);z-index:10}.image-size-utils{-o-object-fit:contain;object-fit:contain;-o-object-position:center center;object-position:center center}.play-btn{align-items:center;background-color:#fff;border-radius:50%;display:flex;font-size:19px;height:80px;justify-content:center;transition:.2s;width:80px}.play-btn:hover{cursor:pointer;height:90px;width:90px}p{margin-bottom:0}.left-0{left:0!important}.no-gutters>.col,.no-gutters>[class*=col-]{padding-left:0;padding-right:0}.bubble{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='422' height='401' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M337.854 33.049c29.539 15.025 53.012 41.649 63.299 72.227 10.286 30.314 6.857 64.056 10.549 100.169 3.956 36.114 14.77 74.337 8.176 110.978-6.593 36.641-30.594 71.436-63.826 81.19-33.232 9.489-75.431-5.8-111.564-16.344-36.133-10.544-66.2-16.343-101.278-24.779-35.078-8.699-75.167-20.297-102.86-46.13-27.43-26.097-42.727-66.428-38.77-104.651 3.956-38.222 27.165-74.336 48.792-110.713C72 58.618 92.044 21.977 123.166 8.006c31.122-13.97 73.321-5.008 111.827 1.055 38.507 6.063 73.585 8.962 102.861 23.988Z' fill='%23EDEDED'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='422' height='401' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M337.854 33.049c29.539 15.025 53.012 41.649 63.299 72.227 10.286 30.314 6.857 64.056 10.549 100.169 3.956 36.114 14.77 74.337 8.176 110.978-6.593 36.641-30.594 71.436-63.826 81.19-33.232 9.489-75.431-5.8-111.564-16.344-36.133-10.544-66.2-16.343-101.278-24.779-35.078-8.699-75.167-20.297-102.86-46.13-27.43-26.097-42.727-66.428-38.77-104.651 3.956-38.222 27.165-74.336 48.792-110.713C72 58.618 92.044 21.977 123.166 8.006c31.122-13.97 73.321-5.008 111.827 1.055 38.507 6.063 73.585 8.962 102.861 23.988Z' fill='%23EDEDED'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}.circle{border-radius:50%;width:auto}.cursor-pointer{cursor:pointer!important}.swiper-left-arrow{margin-left:-40px}.swiper-right-arrow{margin-right:-40px}.right-0{right:0!important}.navbar-expand-lg .navbar-nav .nav-link{padding-left:.9rem;padding-right:.9rem}header{padding:15px 44px}.hover-style-underline:hover{opacity:1!important}.hover-style-underline:hover a{position:relative}.hover-style-underline:hover a:before{bottom:0;content:"";height:0;left:0;position:absolute;transition:.2s;width:100%}.hover-style-transform a{transition:.4s}.hover-style-transform:not(.router-link-active):hover a:not(.disable-style){transform:translateY(-5px)}.navbar-colapsed .collapse-nav{display:none}.mark-4,.mark-5,.mark-6,.mark-7,.mark-8{background-position:bottom!important;background-repeat:no-repeat!important;box-sizing:content-box;display:inline-block;line-height:1.3;padding-bottom:5px}@media (min-width:1100px){.hs-mega-menu-container{left:0;min-width:250px;padding-top:20px;position:absolute;top:100%;z-index:1000}.hs-mega-menu-container .hs-mega-menu{background:#fff;border-top:2px solid;box-shadow:0 1px 2px #ccc;z-index:100}.hs-mega-menu-container .hs-mega-menu .dropdown-item:active,.hs-mega-menu-container .hs-mega-menu .dropdown-item:focus{background:inherit;color:inherit}}@media (max-width:1100px){.dropdown-link{padding:.5rem 0}.navbar-nav>div{width:100%}.hs-mega-menu{border-top:2px solid;margin-top:10px}}@media (max-width:520px){.collapse-nav{flex-wrap:wrap!important}.collapse-nav .navbar-nav .d-flex{display:block!important;width:100%}.collapse-nav .navbar-nav .d-flex .nav-item{margin-bottom:10px}.swiper-left-arrow,.swiper-right-arrow{display:none}}.squared{border-radius:0!important}.pill{border-radius:50rem!important}.form-pill .form-control{border-radius:20rem!important}.form-rounded .form-control{border-radius:9px!important}.form-control{font-size:16px;height:50px;padding:0 20px}.form-control-sm{font-size:14px;height:45px}.btn:not(.page-link).size-sm{padding:8px 38px}spanr{font-size:unset!important}.icon-editable{font-size:30px}.icon-editable .sm{font-size:20px}.icon-editable .lg{font-size:60px}.icon-editable .xl{font-size:90px}.shape-1 .inner-container{overflow:hidden}.shape-1 img{-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}.shape-1 .mask-border,.shape-1 img{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='200' height='200' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='100' cy='100' r='100' fill='%23EDEDED'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='200' height='200' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='100' cy='100' r='100' fill='%23EDEDED'/%3E%3C/svg%3E")}.shape-2 .inner-container{overflow:visible}.shape-2 img{overflow:hidden}.shape-2 .mask-border,.shape-2 img{border-radius:20px}.shape-3 .inner-container{overflow:hidden}.shape-3 img{-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}.shape-3 .mask-border,.shape-3 img{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='422' height='401' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M337.854 33.049c29.539 15.025 53.012 41.649 63.299 72.227 10.286 30.314 6.857 64.056 10.549 100.169 3.956 36.114 14.77 74.337 8.176 110.978-6.593 36.641-30.594 71.436-63.826 81.19-33.232 9.489-75.431-5.8-111.564-16.344-36.133-10.544-66.2-16.343-101.278-24.779-35.078-8.699-75.167-20.297-102.86-46.13-27.43-26.097-42.727-66.428-38.77-104.651 3.956-38.222 27.165-74.336 48.792-110.713C72 58.618 92.044 21.977 123.166 8.006c31.122-13.97 73.321-5.008 111.827 1.055 38.507 6.063 73.585 8.962 102.861 23.988Z' fill='%23EDEDED'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='422' height='401' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M337.854 33.049c29.539 15.025 53.012 41.649 63.299 72.227 10.286 30.314 6.857 64.056 10.549 100.169 3.956 36.114 14.77 74.337 8.176 110.978-6.593 36.641-30.594 71.436-63.826 81.19-33.232 9.489-75.431-5.8-111.564-16.344-36.133-10.544-66.2-16.343-101.278-24.779-35.078-8.699-75.167-20.297-102.86-46.13-27.43-26.097-42.727-66.428-38.77-104.651 3.956-38.222 27.165-74.336 48.792-110.713C72 58.618 92.044 21.977 123.166 8.006c31.122-13.97 73.321-5.008 111.827 1.055 38.507 6.063 73.585 8.962 102.861 23.988Z' fill='%23EDEDED'/%3E%3C/svg%3E")}.mask-border{left:50%;-webkit-mask-position:center center;-webkit-mask-repeat:no-repeat;-webkit-mask-size:contain;position:absolute;top:50%;transform:translate(-50%,-50%) scale(.8)}.social-link-circle{border-radius:50%}.social-link{align-items:center;display:flex;height:30px;justify-content:center;text-decoration:none;width:30px}p:empty:after{color:transparent;content:"-"}.embed-responsive{display:block;overflow:hidden;padding:0;position:relative;width:100%}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{border:0;bottom:0;height:100%;left:0;position:absolute;top:0;width:100%}.embed-responsive-16by9:before{padding-top:56.25%}.embed-responsive:before{content:"";display:block}spanb{padding-bottom:10px}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1140px}}.grecaptcha-badge{display:none!important}.overlay-inner{height:100%;left:0;position:absolute;top:0;width:100%;z-index:100}.blog-title{letter-spacing:10px;text-transform:uppercase}.h-52{height:13rem}.posts-container{box-shadow:0 1px 4px rgba(0,0,0,.18)}.font-size-11{font-size:11px!important}.post-text{-webkit-line-clamp:3;-webkit-box-orient:vertical;color:#6e747a;display:-webkit-box;font-size:15px;line-height:22px;margin-bottom:20px;overflow:hidden}.post-title{color:#212529;font-size:21px;font-weight:700}.font-size-13{font-size:13px!important}.text-muted{color:#6c757d!important}.title{font-size:21px;font-weight:700}.category{color:#6e747a;
4620cursor:pointer;font-size:15px;padding:13px 0}.category a{color:#6e747a;text-decoration:none}.category.color-primary,.category:hover{color:#326dff}.category:not(:last-child){border-bottom:1px solid #e3e3e3}.b-avatar{display:inline-flex;flex-shrink:0;font-size:inherit;font-weight:400;height:2.5rem;line-height:1;max-height:auto;max-width:100%;overflow:visible;position:relative;text-align:center;transition:color .15s ease-in-out,background-color .15s ease-in-out,box-shadow .15s ease-in-out;vertical-align:middle;width:2.5rem}.b-avatar,.social-icon{align-items:center;justify-content:center}.social-icon{border-radius:2px;display:flex;height:33px;width:35.44px}.social-share{position:fixed;right:0;top:50%;transform:translateY(-50%)}.social-share .share-network-facebook,.social-share .share-network-linkedin,.social-share .share-network-twitter{color:#fff;display:block;padding:10px}.form-control-pill .form-control{border-radius:25rem!important}element.style{background-color:#1c2630}mark{box-sizing:content-box;color:inherit!important;display:inline-block;padding:0}.text-right{text-align:right}.form-group{margin-bottom:1rem}.d-contents{display:contents!important}.hs-video-bg-video,hs-video-bg-preview{height:100%;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}.hs-video-bg-video iframe,.hs-video-bg-video video{border:0;bottom:0;height:100%;left:0;position:absolute;top:0;width:100%}button.d-block{display:block!important;width:100%}.fallback,.player{background-color:transparent;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.transition{transition:.4s}.blog-horizpntal-line-layout .blog-sidebar{background-color:transparent!important}.blog-horizpntal-line-layout .top-container .title{display:none}.blog-horizpntal-line-layout .top-container .pill{border-radius:5px!important}.inner-container{bottom:0;left:0;pointer-events:none;position:absolute;right:0;top:0}.featured-items-3 .featured-text{min-height:50%;background:#fbfbfb;position:absolute;right:0;right:-50%;top:50%;transform:translateY(-50%);width:80%;z-index:2}.featured-items-3 .featured-text p{margin-bottom:0}.video-overlay:before{background:transparent;content:"";cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.about-us-1 .headline-divider{width:230px}.about-us-1 .headline-divider-sm{display:flex;justify-content:center}.about-us-1 .offset-left-lg{padding-left:10rem!important}.about-us-1 .transform-image-lg{height:285px;left:-362px;position:absolute;top:50%;transform:translateY(-50%);width:459px}.about-us-1 .image-fit{width:100%}.images-group-1{padding:100px 60px}.images-group-1 .img{border-radius:3px;box-shadow:inset 0 0 0 4px #fff}.images-group-1 .img-transform:first-child .img-responsive-bg{min-height:242px!important;width:188px!important}.images-group-1 .img-transform:nth-child(3){left:90%;position:absolute!important;top:-10%}.images-group-1 .img-transform:nth-child(3) .img-responsive-bg{min-height:182px!important;width:155px!important}.images-group-1 .img-transform:nth-child(2){left:70%;position:absolute!important;top:50%}.images-group-1 .img-transform:nth-child(2) .img-responsive-bg{min-height:182px!important;width:155px!important}.btn-icon{align-items:center;display:flex;height:36px;justify-content:center;padding:0!important;width:36px}.step-progress{position:relative}.step-progress:before{background-color:#ececec;bottom:2px;box-shadow:inset 0 1px 2px rgba(0,0,0,.23);content:"";left:0;position:absolute;top:2px;width:4px}.step-progress .step-item{cursor:pointer;font-family:"Poppins";font-weight:500;line-height:1.2;padding-left:1.5rem;position:relative}.step-progress .step-item:not(:last-child){margin-bottom:2rem}.step-progress .step-item:before{border-radius:50%;content:"";height:18px;left:-7px;position:absolute;top:50%;transform:translateY(-50%);width:18px}.step-progress .step-item.active,.step-progress .step-item:hover{font-weight:700}.step-progress .step-item.active:before{background:#e8bf16;border:4px solid #ececec}.step-progress .step-item.active:after{color:#000;content:"\\f054";font-family:"Font Awesome 5 Free";font-size:.75rem;margin-left:.75rem;position:relative;top:-1px}.size-xl{font-size:21px!important;padding:17px 65px!important}.size-xxl{font-size:23px!important;padding:29px 65px!important}.size-lg{font-size:18px!important;padding:16px 50px!important}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col
4620-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{padding-left:12px;padding-right:12px}.btn:not(:disabled):hover{opacity:.9!important}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{margin-left:auto;margin-right:auto;padding-left:15px;padding-right:15px;width:100%}header .container{padding-left:0;padding-right:0}.inner-section{z-index:2}.line-clamp{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.btn-secondary{background:#e2e5ec;border-color:#e2e5ec;color:#6e747a}.header-mobile .nav-item{margin-bottom:10px}.header-mobile .nav-item .nav-link{display:block;text-align:center}.header-mobile .hs-mega-menu{box-shadow:0 1px 2px #ccc}.header-mobile .btn{display:block;width:100%}.nav-link{padding:.5rem 10px}button{white-space:nowrap;}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{display:none;height:100%;left:0;outline:0;overflow:scroll;position:fixed;top:0;width:100%;z-index:1060}.modal-dialog{margin:.5rem;pointer-events:none;position:relative;width:auto}.modal.fade .modal-dialog{transform:translateY(-50px);transition:transform .3s ease-out}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - 1rem)}
4620.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{align-items:center;display:flex;min-height:calc(100% - 1rem)}.modal-content{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;display:flex;flex-direction:column;outline:0;pointer-events:auto;position:relative;width:100%}.modal-backdrop{opacity:.8!important;background-color:#000;height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:1040}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{align-items:center;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px);display:flex;flex-shrink:0;justify-content:space-between;padding:1rem}.modal-header .btn-close{margin:-.5rem -.5rem -.5rem auto;padding:.5rem}.modal-title{line-height:1.5;margin-bottom:0}.modal-body{flex:1 1 auto;padding:1rem;position:relative}.modal-footer{align-items:center;border-bottom-left-radius:calc(.3rem - 1px);border-bottom-right-radius:calc(.3rem - 1px);border-top:1px solid #dee2e6;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;padding:.75rem}.modal-footer>*{margin:.25rem}@media (min-width:576px){.modal-dialog{margin:1.75rem auto;max-width:500px}.modal-dialog-scrollable{height:calc(100% - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.modal-fullscreen{height:100%;margin:0;max-width:none;width:100vw}.modal-fullscreen .modal-content{border:0;border-radius:0;height:100%}.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}.modal-fullscreen .modal-footer{border-radius:0}@media (max-width:575.98px){.modal-fullscreen-sm-down{height:100%;margin:0;max-width:none;width:100vw}.modal-fullscreen-sm-down .modal-content{border:0;border-radius:0;height:100%}.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}.modal-fullscreen-sm-down .modal-footer{border-radius:0}}@media (max-width:767.98px){.modal-fullscreen-md-down{height:100%;margin:0;max-width:none;width:100vw}.modal-fullscreen-md-down .modal-content{border:0;border-radius:0;height:100%}.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}.modal-fullscreen-md-down .modal-footer{border-radius:0}}@media (max-width:991.98px){.modal-fullscreen-lg-down{height:100%;margin:0;max-width:none;width:100vw}.modal-fullscreen-lg-down .modal-content{border:0;border-radius:0;height:100%}.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}.modal-fullscreen-lg-down .modal-footer{border-radius:0}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{height:100%;margin:0;max-width:none;width:100vw}.modal-fullscreen-xl-down .modal-content{border:0;border-radius:0;height:100%}.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}.modal-fullscreen-xl-down .modal-footer{border-radius:0}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{height:100%;margin:0;max-width:none;width:100vw}.modal-fullscreen-xxl-down .modal-content{border:0;border-radius:0;height:100%}.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}.modal-fullscreen-xxl-down .modal-footer{border-radius:0}}`)])),_:1}),createBaseVNode("div",_hoisted_1$1,[createBaseVNode("div",_hoisted_2,[createBaseVNode("div",_hoisted_3,[unref(a)===404?(openBlock(),createElementBlock("svg",_hoisted_4,d[1]||(d[1]=[createStaticVNode('<path d="M133 112V12C133 5.92487 128.075 1 122 1H106C98.5442 1 92.5 7.04416 92.5 14.5H57C52.3056 14.5 48.5 18.3056 48.5 23C48.5 27.6944 52.3056 31.5 57 31.5H75C78.5899 31.5 81.5 34.4101 81.5 38C81.5 41.5899 78.5899 44.5 75 44.5H25C19.4772 44.5 15 48.9772 15 54.5V56.5C15 62.0228 19.4772 66.5 25 66.5H46.5L4.95006 116.269C2.39797 119.326 1 123.181 1 127.164V131C1 137.627 6.37258 143 13 143H96V167.5C96 177.441 104.059 185.5 114 185.5H115C124.941 185.5 133 177.441 133 167.5V143H144.5C153.06 143 160 136.06 160 127.5C160 118.94 153.06 112 144.5 112H133Z" fill="#3D82EA" stroke="#3D82EA"></path><path d="M97.5 112.5V54.5L47 112.5H97.5Z" fill="white" stroke="white"></path><path d="M572 112V12C572 5.92487 567.075 1 561 1H545C537.544 1 531.5 7.04416 531.5 14.5H496C491.306 14.5 487.5 18.3056 487.5 23C487.5 27.6944 491.306 31.5 496 31.5H514C517.59 31.5 520.5 34.4101 520.5 38C520.5 41.5899 517.59 44.5 514 44.5H464C458.477 44.5 454 48.9772 454 54.5V56.5C454 62.0228 458.477 66.5 464 66.5H485.5L443.95 116.269C441.398 119.326 440 123.181 440 127.164V131C440 137.
4620627 445.373 143 452 143H535V167.5C535 177.441 543.059 185.5 553 185.5H554C563.941 185.5 572 177.441 572 167.5V143H583.5C592.06 143 599 136.06 599 127.5C599 118.94 592.06 112 583.5 112H572Z" fill="#3D82EA" stroke="#3D82EA"></path><path d="M536.5 112.5V54.5L486 112.5H536.5Z" fill="white" stroke="white"></path><path d="M291.5 186C340.377 186 380 146.377 380 97.5C380 48.6228 340.377 9 291.5 9C242.623 9 203 48.6228 203 97.5C203 146.377 242.623 186 291.5 186Z" fill="#3D82EA"></path><path d="M291 156C323.585 156 350 129.585 350 97C350 64.4152 323.585 38 291 38C258.415 38 232 64.4152 232 97C232 129.585 258.415 156 291 156Z" fill="white"></path>',6)]))):createCommentVNode("",!0)]),createBaseVNode("h1",_hoisted_5,toDisplayString(unref(l)),1),createBaseVNode("p",{class:"mb-5",textContent:toDisplayString(unref(c))},null,8,_hoisted_6),unref(a)===404?(openBlock(),createElementBlock("div",_hoisted_7,d[2]||(d[2]=[createBaseVNode("a",{class:"btn btn-light border",href:"/"}," Go Home ",-1)]))):createCommentVNode("",!0)])])])}}},_hoisted_1={key:0},_sfc_main={__name:"nuxt-root",setup(o){const r=()=>null,a=useNuxtApp(),l=a.deferHydration();if(a.isHydrating){const m=a.hooks.hookOnce("app:error",l);useRouter$1().beforeEach(m)}const c=!1;provide(PageRouteSymbol,useRoute$1()),a.hooks.callHookWith(m=>m.map(y=>y()),"vue:setup");const u=useError(),d=!1;onErrorCaptured((m,y,E)=>{if(a.hooks.callHook("vue:error",m,y,E).catch(A=>console.error("[nuxt] Error in `vue:error` hook",A)),isNuxtError(m)&&(m.fatal||m.unhandled))return a.runWithContext(()=>showError(m)),!1});const f=!1;return(m,y)=>(openBlock(),createBlock(Suspense,{onResolve:unref(l)},{default:withCtx(()=>[unref(d)?(openBlock(),createElementBlock("div",_hoisted_1)):unref(u)?(openBlock(),createBlock(unref(_sfc_main$1),{key:1,error:unref(u)},null,8,["error"])):unref(f)?(openBlock(),createBlock(unref(r),{key:2,context:unref(f)},null,8,["context"])):unref(c)?(openBlock(),createBlock(resolveDynamicComponent(unref(c)),{key:3})):(openBlock(),createBlock(unref(AppComponent),{key:4}))]),_:1},8,["onResolve"]))}};let entry;{let o;entry=async function(){var d,f;if(o)return o;const l=!!(((d=window.__NUXT__)==null?void 0:d.serverRendered)??((f=document.getElementById("__NUXT_DATA__"))==null?void 0:f.dataset.ssr)==="true")?createSSRApp(_sfc_main):createApp(_sfc_main),c=createNuxtApp({vueApp:l});async function u(m){await c.callHook("app:error",m),c.payload.error=c.payload.error||createError(m)}l.config.errorHandler=u,c.hook("app:suspense:resolve",()=>{l.config.errorHandler===u&&(l.config.errorHandler=void 0)});try{await applyPlugins(c,plugins)}catch(m){u(m)}try{await c.hooks.callHook("app:created",l),await c.hooks.callHook("app:beforeMount",l),l.mount(vueAppRootContainer),await c.hooks.callHook("app:mounted",l),await nextTick()}catch(m){u(m)}return l},o=entry().catch(r=>{throw console.error("Error while mounting app:",r),r})}const entry$1=o=>entry(o),entry$2=Object.freeze(Object.defineProperty({__proto__:null,default:entry$1},Symbol.toStringTag,{value:"Module"}));export{inject as $,withDirectives as A,vModelText as B,vModelDynamic as C,useCookie as D,_ as E,Fragment as F,Swal as G,Head as H,shallowRef as I,useRoute$1 as J,useRouter$1 as K,Link as L,createError$1 as M,withAsyncContext as N,useHead as O,useParseEmbedCode as P,useModal as Q,nextTick as R,Style as S,Transition as T,useRouteBootstrapData as U,navigateTo as V,useRuntimeConfig as W,Meta as X,isMemoSame as Y,defineComponent as Z,_export_sfc as _,createElementBlock as a,defineAsyncComponent as a$,useRoute as a0,layouts as a1,appLayoutTransition as a2,_wrapInTransition as a3,h as a4,mergeProps as a5,Suspense as a6,PageRouteSymbol as a7,provide as a8,LayoutMetaSymbol as a9,sendError as aA,setHeader as aB,proxyRequest as aC,commonjsGlobal as aD,getCurrentInstance as aE,resolveDirective as aF,getCurrentScope as aG,onScopeDispose as aH,shallowReadonly as aI,hooks as aJ,withKeys as aK,defineStore as aL,useStore$1 as aM,authStore as aN,onBeforeMount as aO,requestIdleCallback as aP,cancelIdleCallback as aQ,parseQuery$1 as aR,resolveRouteObject as aS,hasProtocol as aT,joinURL as aU,withTrailingSlash as aV,withoutTrailingSlash as aW,nuxtLinkDefaults as aX,defu as aY,useAttrs as aZ,shallowReactive as a_,useFetch as aa,useAsyncData as ab,showError as ac,defineNuxtRouteMiddleware as ad,executeAsync as ae,resolutionStore as af,onNuxtReady as ag,vModelCheckbox as ah,renderSlot as ai,onUnmounted as aj,vShow as ak,createSlots as al,useClickActions as am,resolve
4620Component as an,normalizeProps as ao,guardReactiveProps as ap,useState as aq,toHandlers as ar,TransitionGroup as as,getAugmentedNamespace as at,moment as au,getDefaultExportFromCjs as av,blogPostsStore as aw,createError as ax,defineEventHandler as ay,getQuery as az,createBlock as b,pushScopeId as b0,popScopeId as b1,withScopeId as b2,markRaw as b3,GoogleAuthProvider as b4,Teleport as b5,reactive as b6,readonly as b7,toRaw as b8,watchEffect as b9,toValue as ba,hasInjectionContext as bb,useRouter as bc,getElementObserver as bd,vModelSelect as be,useId as bf,cloneVNode as bg,vModelRadio as bh,toRefs as bi,collection as bj,getDocs as bk,entry$2 as bl,computed as c,createCommentVNode as d,createBaseVNode as e,unref as f,createVNode as g,resolveDynamicComponent as h,ref$1 as i,normalizeStyle as j,useNuxtApp as k,lottie$1 as l,watch as m,normalizeClass as n,openBlock as o,onMounted as p,onBeforeUnmount as q,renderList as r,createStaticVNode as s,createTextVNode as t,useStore as u,toDisplayString as v,withCtx as w,isRef as x,setInterval$1 as y,withModifiers as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.