PageSourceSearch

https://openplanner.fr/assets/index-B347TT6i.js

js openplanner.fr collected 2026-09-25 22:15:49 UTC 1,932,443 bytes, 3,763 lines download raw bytes

1function __vite__mapDeps(indexes) {
2  if (!__vite__mapDeps.viteFileDeps) {
3    __vite__mapDeps.viteFileDeps = ["assets/EventSettings-D9PAC6IZ.js","assets/diffDays-CfIy2u1u.js","assets/TextFieldElementPrivate-CWabjQj9.js","assets/scheduleConstants-Ck3Kh9Jq.js","assets/ContentCopy-Ep9U0WLV.js","assets/Collapse-s3F65JDR.js","assets/Api-CmaPb114.js","assets/TypographyCopyable-CQQzPSIS.js","assets/EventPublic-Cn0BkzVU.js","assets/EventWhatsApp-BtXjk5Ke.js","assets/index-BHbLDZRg.js","assets/Settings-B1e3XiKA.js","assets/EventSlack-Bz3QXeHU.js","assets/EventSchedule-C5I__ZWU.js","assets/TemplateCardContent-CNgwt25J.js","assets/Edit-Cc5UmuDR.js","assets/TemplateCardContent-25kts_BN.css","assets/__vite-browser-external-D7Ct-6yo.js","assets/EventScheduleTemplate-BsfHsi5W.js","assets/generateFirestoreId-Ca37iInK.js","assets/ImportExport-XdhSXzKG.js","assets/EventSessions-CEhHrcF5.js","assets/Bluesky-BtCvu4s2.js","assets/Edit-Ds7j_WDf.js","assets/updateSpeaker-CWKYsjuU.js","assets/EventSpeakers-CrwrOulD.js","assets/LinearProgress-CPe5xlCg.js","assets/types-CcQt0Yq5.js","assets/EventSponsors-529kG0Ed.js","assets/useSponsors-Dmc16mXw.js","assets/DeleteRounded-OPmFq9P8.js","assets/downloadImages-y51jyR6g.js","assets/DragIndicator-Dg_CcOxd.js","assets/index-DIIm5txE.js","assets/index-DswlrrBd.css","assets/jobStatus-DUH7ReE7.js","assets/useJobsPosts---xZg8LJ.js","assets/Sponsor-BEne1JjU.js","assets/JobPosts-B60Re6fi.js","assets/EventTeam-DienYctR.js","assets/sortable.esm-DMH6glXu.js","assets/ConfirmTooltipButton-CVhIFWrU.js","assets/EventFaq-7aBbgU2v.js","assets/EventBlocks-CQnaqbVg.js","assets/blockUtils-BAJXVG4f.js","assets/EventBlock-tpKwt8ET.js","assets/EventTickets-B7lQrXZS.js","assets/PublicApp-DNSKi1k4.js","assets/PublicApp-D90yFW3B.css"]
4  }
5  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
6}
7var tK=Object.defineProperty;var nK=(e,t,n)=>t in e?tK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fS=(e,t,n)=>(nK(e,typeof t!="symbol"?t+"":t,n),n),q2=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var $l=(e,t,n)=>(q2(e,t,"read from private field"),n?n.call(e):t.get(e)),hv=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ja=(e,t,n,r)=>(q2(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var hS=(e,t,n,r)=>({set _(o){ja(e,t,o,n)},get _(){return $l(e,t,r)}});function rK(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var K2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Oa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var hB={exports:{}},F1={},pB={exports:{}},Rt={};/**
8 * @license React
9 * react.production.min.js
10 *
11 * Copyright (c) Facebook, Inc. and its affiliates.
12 *
13 * This source code is licensed under the MIT license found in the
14 * LICENSE file in the root directory of this source tree.
15 */var oy=Symbol.for("react.element"),oK=Symbol.for("react.portal"),iK=Symbol.for("react.fragment"),sK=Symbol.for("react.strict_mode"),aK=Symbol.for("react.profiler"),lK=Symbol.for("react.provider"),uK=Symbol.for("react.context"),cK=Symbol.for("react.forward_ref"),dK=Symbol.for("react.suspense"),fK=Symbol.for("react.memo"),hK=Symbol.for("react.lazy"),Q2=Symbol.iterator;function pK(e){return e===null||typeof e!="object"?null:(e=Q2&&e[Q2]||e["@@iterator"],typeof e=="function"?e:null)}var mB={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gB=Object.assign,yB={};
vendor: 6,378 bytes, lines 15-23
15function Lh(e,t,n){this.props=e,this.context=t,this.refs=yB,this.updater=n||mB}Lh.prototype.isReactComponent={};Lh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Lh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function vB(){}vB.prototype=Lh.prototype;function kk(e,t,n){this.props=e,this.context=t,this.refs=yB,this.updater=n||mB}var Pk=kk.prototype=new vB;Pk.constructor=kk;gB(Pk,Lh.prototype);Pk.isPureReactComponent=!0;var Y2=Array.isArray,bB=Object.prototype.hasOwnProperty,Tk={current:null},wB={key:!0,ref:!0,__self:!0,__source:!0};function CB(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)bB.call(t,r)&&!wB.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:oy,type:e,key:i,ref:s,props:o,_owner:Tk.current}}function mK(e,t){return{$$typeof:oy,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Rk(e){return typeof e=="object"&&e!==null&&e.$$typeof===oy}function gK(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var X2=/\/+/g;function pS(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gK(""+e.key):t.toString(36)}function xb(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case oy:case oK:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+pS(s,0):r,Y2(o)?(n="",e!=null&&(n=e.replace(X2,"$&/")+"/"),xb(o,t,n,"",function(u){return u})):o!=null&&(Rk(o)&&(o=mK(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(X2,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Y2(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+pS(i,a);s+=xb(i,t,n,l,o)}else if(l=pK(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+pS(i,a++),s+=xb(i,t,n,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function pv(e,t,n){if(e==null)return e;var r=[],o=0;return xb(e,r,"","",function(i){return t.call(n,i,o++)}),r}function yK(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var To={current:null},Sb={transition:null},vK={ReactCurrentDispatcher:To,ReactCurrentBatchConfig:Sb,ReactCurrentOwner:Tk};Rt.Children={map:pv,forEach:function(e,t,n){pv(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return pv(e,function(){t++}),t},toArray:function(e){return pv(e,function(t){return t})||[]},only:function(e){if(!Rk(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Rt.Component=Lh;Rt.Fragment=iK;Rt.Profiler=aK;Rt.PureComponent=kk;Rt.StrictMode=sK;Rt.Suspense=dK;Rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vK;Rt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=gB({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Tk.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)bB.call(t,l)&&!wB.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:oy,type:e.type,key:o,ref:i,props:r,_owner:s}};Rt.createContext=function(e){return e={$$typeof:uK,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:lK,_context:e},e.Consumer=e};Rt.createElement=CB;Rt.createFactory=function(e){var t=CB.bind(null,e);return t.type=e,t};Rt.createRef=function(){return{current:null}};Rt.forwardRef=function(e){return{$$typeof:cK,render:e}};Rt.isValidElement=Rk;Rt.lazy=function(e){return{$$typeof:hK,_payload:{_status:-1,_result:e},_init:yK}};Rt.memo=function(e,t){return{$$typeof:fK,type:e,compare:t===void 0?null:t}};Rt.startTransition=function(e){var t=Sb.transition;Sb.transition={};try{e()}finally{Sb.transition=t}};Rt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Rt.useCallback=function(e,t){return To.current.useCallback(e,t)};Rt.useContext=function(e){return To.current.useContext(e)};Rt.useDebugValue=function(){};Rt.useDeferredValue=function(e){return To.current.useDeferredValue(e)};Rt.useEffect=function(e,t){return To.current.useEffect(e,t)};Rt.useId=function(){return To.current.useId()};Rt.useImperativeHandle=function(e,t,n){return To.current.useImperativeHandle(e,t,n)};Rt.useInsertionEffect=function(e,t){return To.current.useInsertionEffect(e,t)};Rt.useLayoutEffect=function(e,t){return To.current.useLayoutEffect(e,t)};Rt.useMemo=function(e,t){return To.current.useMemo(e,t)};Rt.useReducer=function(e,t,n){return To.current.useReducer(e,t,n)};Rt.useRef=function(e){return To.current.useRef(e)};Rt.useState=function(e){return To.current.useState(e)};Rt.useSyncExternalStore=function(e,t,n){return To.current.useSyncExternalStore(e,t,n)};Rt.useTransition=function(){return To.current.useTransition()};Rt.version="18.2.0";pB.exports=Rt;var m=pB.exports;const ot=Fh(m),C0=rK({__proto__:null,default:ot},[m]);/**
16 * @license React
17 * react-jsx-runtime.production.min.js
18 *
19 * Copyright (c) Facebook, Inc. and its affiliates.
20 *
21 * This source code is licensed under the MIT license found in the
22 * LICENSE file in the root directory of this source tree.
23 */var bK=m,wK=Symbol.for("react.element"),CK=Symbol.for("react.fragment"),xK=Object.prototype.hasOwnProperty,SK=bK.__SECRET_INT
vendor: 1,673 bytes, line 23
23ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_K={key:!0,ref:!0,__self:!0,__source:!0};function xB(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)xK.call(t,r)&&!_K.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:wK,type:e,key:i,ref:s,props:o,_owner:SK.current}}F1.Fragment=CK;F1.jsx=xB;F1.jsxs=xB;hB.exports=F1;var T=hB.exports;function EK(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function IK(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var AK=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(IK(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=EK(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++}
vendor: 12,916 bytes, lines 23-30
23,t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Jr="-ms-",x0="-moz-",qt="-webkit-",SB="comm",Ok="rule",Mk="decl",kK="@import",_B="@keyframes",PK="@layer",TK=Math.abs,L1=String.fromCharCode,RK=Object.assign;function OK(e,t){return Mr(e,0)^45?(((t<<2^Mr(e,0))<<2^Mr(e,1))<<2^Mr(e,2))<<2^Mr(e,3):0}function EB(e){return e.trim()}function MK(e,t){return(e=t.exec(e))?e[0]:e}function Kt(e,t,n){return e.replace(t,n)}function IE(e,t){return e.indexOf(t)}function Mr(e,t){return e.charCodeAt(t)|0}function Jm(e,t,n){return e.slice(t,n)}function Qs(e){return e.length}function Dk(e){return e.length}function mv(e,t){return t.push(e),e}function DK(e,t){return e.map(t).join("")}var N1=1,rh=1,IB=0,Yo=0,sr=0,Nh="";function V1(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:N1,column:rh,length:s,return:""}}function xp(e,t){return RK(V1("",null,null,"",null,null,0),e,{length:-e.length},t)}function $K(){return sr}function FK(){return sr=Yo>0?Mr(Nh,--Yo):0,rh--,sr===10&&(rh=1,N1--),sr}function fi(){return sr=Yo<IB?Mr(Nh,Yo++):0,rh++,sr===10&&(rh=1,N1++),sr}function ua(){return Mr(Nh,Yo)}function _b(){return Yo}function iy(e,t){return Jm(Nh,e,t)}function Zm(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function AB(e){return N1=rh=1,IB=Qs(Nh=e),Yo=0,[]}function kB(e){return Nh="",e}function Eb(e){return EB(iy(Yo-1,AE(e===91?e+2:e===40?e+1:e)))}function LK(e){for(;(sr=ua())&&sr<33;)fi();return Zm(e)>2||Zm(sr)>3?"":" "}function NK(e,t){for(;--t&&fi()&&!(sr<48||sr>102||sr>57&&sr<65||sr>70&&sr<97););return iy(e,_b()+(t<6&&ua()==32&&fi()==32))}function AE(e){for(;fi();)switch(sr){case e:return Yo;case 34:case 39:e!==34&&e!==39&&AE(sr);break;case 40:e===41&&AE(e);break;case 92:fi();break}return Yo}function VK(e,t){for(;fi()&&e+sr!==57;)if(e+sr===84&&ua()===47)break;return"/*"+iy(t,Yo-1)+"*"+L1(e===47?e:fi())}function BK(e){for(;!Zm(ua());)fi();return iy(e,Yo)}function jK(e){return kB(Ib("",null,null,null,[""],e=AB(e),0,[0],e))}function Ib(e,t,n,r,o,i,s,a,l){for(var u=0,c=0,d=s,f=0,h=0,p=0,g=1,b=1,y=1,v=0,w="",C=o,A=i,S=r,_=w;b;)switch(p=v,v=fi()){case 40:if(p!=108&&Mr(_,d-1)==58){IE(_+=Kt(Eb(v),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:_+=Eb(v);break;case 9:case 10:case 13:case 32:_+=LK(p);break;case 92:_+=NK(_b()-1,7);continue;case 47:switch(ua()){case 42:case 47:mv(zK(VK(fi(),_b()),t,n),l);break;default:_+="/"}break;case 123*g:a[u++]=Qs(_)*y;case 125*g:case 59:case 0:switch(v){case 0:case 125:b=0;case 59+c:y==-1&&(_=Kt(_,/\f/g,"")),h>0&&Qs(_)-d&&mv(h>32?Z2(_+";",r,n,d-1):Z2(Kt(_," ","")+";",r,n,d-2),l);break;case 59:_+=";";default:if(mv(S=J2(_,t,n,u,c,o,a,w,C=[],A=[],d),i),v===123)if(c===0)Ib(_,t,S,S,C,i,d,a,A);else switch(f===99&&Mr(_,3)===110?100:f){case 100:case 108:case 109:case 115:Ib(e,S,S,r&&mv(J2(e,S,S,0,0,o,a,w,o,C=[],d),A),o,A,d,a,r?C:A);break;default:Ib(_,S,S,S,[""],A,0,a,A)}}u=c=h=0,g=y=1,w=_="",d=s;break;case 58:d=1+Qs(_),h=p;default:if(g<1){if(v==123)--g;else if(v==125&&g++==0&&FK()==125)continue}switch(_+=L1(v),v*g){case 38:y=c>0?1:(_+="\f",-1);break;case 44:a[u++]=(Qs(_)-1)*y,y=1;break;case 64:ua()===45&&(_+=Eb(fi())),f=ua(),c=d=Qs(w=_+=BK(_b())),v++;break;case 45:p===45&&Qs(_)==2&&(g=0)}}return i}function J2(e,t,n,r,o,i,s,a,l,u,c){for(var d=o-1,f=o===0?i:[""],h=Dk(f),p=0,g=0,b=0;p<r;++p)for(var y=0,v=Jm(e,d+1,d=TK(g=s[p])),w=e;y<h;++y)(w=EB(g>0?f[y]+" "+v:Kt(v,/&\f/g,f[y])))&&(l[b++]=w);return V1(e,t,n,o===0?Ok:a,l,u,c)}function zK(e,t,n){return V1(e,t,n,SB,L1($K()),Jm(e,2,-2),0)}function Z2(e,t,n,r){return V1(e,t,n,Mk,Jm(e,0,r),Jm(e,r+1,-1),r)}function Pf(e,t){for(var n="",r=Dk(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function UK(e,t,n,r){switch(e.type){case PK:if(e.children.length)break;case kK:case Mk:return e.return=e.return||e.value;case SB:return"";case _B:return e.return=e.value+"{"+Pf(e.children,r)+"}";case Ok:e.value=e.props.join(",")}return Qs(n=Pf(e.children,r))?e.return=e.value+"{"+n+"}":""}function HK(e){var t=Dk(e);return function(n,r,o,i){for(var s="",a=0;a<t;a++)s+=e[a](n,r,o,i)||"";return s}}function WK(e){return function(t){t.root||(t=t.return)&&e(t)}}function PB(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var GK=function(t,n,r){for(var o=0,i=0;o=i,i=ua(),o===38&&i===12&&(n[r]=1),!Zm(i);)fi();return iy(t,Yo)},qK=function(t,n){var r=-1,o=44;do switch(Zm(o)){case 0:o===38&&ua()===12&&(n[r]=1),t[r]+=GK(Yo-1,n,r);break;case 2:t[r]+=Eb(o);break;case 4:if(o===44){t[++r]=ua()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=L1(o)}while(o=fi());return t},KK=function(t,n){return kB(qK(AB(t),n))},eM=new WeakMap,QK=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!eM.get(r))&&!o){eM.set(t,!0);for(var i=[],s=KK(n,i),a=r.props,l=0,u=0;l<s.length;l++)for(var c=0;c<a.length;c++,u++)t.props[u]=i[l]?s[l].replace(/&\f/g,a[c]):a[c]+" "+s[l]}}},YK=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function TB(e,t){switch(OK(e,t)){case 5103:return qt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return qt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return qt+e+x0+e+Jr+e+e;case 6828:case 4268:return qt+e+Jr+e+e;case 6165:return qt+e+Jr+"flex-"+e+e;case 5187:return qt+e+Kt(e,/(\w+).+(:[^]+)/,qt+"box-$1$2"+Jr+"flex-$1$2")+e;case 5443:return qt+e+Jr+"flex-item-"+Kt(e,/flex-|-self/,"")+e;case 4675:return qt+e+Jr+"flex-line-pack"+Kt(e,/align-content|flex-|-self/,"")+e;case 5548:return qt+e+Jr+Kt(e,"shrink","negative")+e;case 5292:return qt+e+Jr+Kt(e,"basis","preferred-size")+e;case 6060:return qt+"box-"+Kt(e,"-grow","")+qt+e+Jr+Kt(e,"grow","positive")+e;case 4554:return qt+Kt(e,/([^-])(transform)/g,"$1"+qt+"$2")+e;case 6187:return Kt(Kt(Kt(e,/(zoom-|grab)/,qt+"$1"),/(image-set)/,qt+"$1"),e,"")+e;case 5495:case 3959:return Kt(e,/(image-set\([^]*)/,qt+"$1$`$1");case 4968:return Kt(Kt(e,/(.+:)(flex-)?(.*)/,qt+"box-pack:$3"+Jr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+qt+e+e;case 4095:case 3583:case 4068:case 2532:return Kt(e,/(.+)-inline(.+)/,qt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Qs(e)-1-t>6)switch(Mr(e,t+1)){case 109:if(Mr(e,t+4)!==45)break;case 102:return Kt(e,/(.+:)(.+)-([^]+)/,"$1"+qt+"$2-$3$1"+x0+(Mr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~IE(e,"stretch")?TB(Kt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Mr(e,t+1)!==115)break;case 6444:switch(Mr(e,Qs(e)-3-(~IE(e,"!important")&&10))){case 107:return Kt(e,":",":"+qt)+e;case 101:return Kt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+qt+(Mr(e,14)===45?"inline-":"")+"box$3$1"+qt+"$2$3$1"+Jr+"$2box$3")+e}break;case 5936:switch(Mr(e,t+11)){case 114:return qt+e+Jr+Kt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return qt+e+Jr+Kt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return qt+e+Jr+Kt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return qt+e+Jr+e+e}return e}var XK=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Mk:t.return=TB(t.value,t.length);break;case _B:return Pf([xp(t,{value:Kt(t.value,"@","@"+qt)})],o);case Ok:if(t.length)return DK(t.props,function(i){switch(MK(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pf([xp(t,{props:[Kt(i,/:(read-\w+)/,":"+x0+"$1")]})],o);case"::placeholder":return Pf([xp(t,{props:[Kt(i,/:(plac\w+)/,":"+qt+"input-$1")]}),xp(t,{props:[Kt(i,/:(plac\w+)/,":"+x0+"$1")]}),xp(t,{props:[Kt(i,/:(plac\w+)/,Jr+"input-$1")]})],o)}return""})}},JK=[XK],RB=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var b=g.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=t.stylisPlugins||JK,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var b=g.getAttribute("data-emotion").split(" "),y=1;y<b.length;y++)i[b[y]]=!0;a.push(g)});var l,u=[QK,YK];{var c,d=[UK,WK(function(g){c.insert(g)})],f=HK(u.concat(o,d)),h=function(b){return Pf(jK(b),f)};l=function(b,y,v,w){c=v,h(b?b+"{"+y.styles+"}":y.styles),w&&(p.inserted[y.name]=!0)}}var p={key:n,sheet:new AK({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return p.sheet.hydrate(a),p};function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}const ZK=Object.freeze(Object.defineProperty({__proto__:null,default:x},Symbol.toStringTag,{value:"Module"}));var OB={exports:{}},sn={};/** @license React v16.13.1
24 * react-is.production.min.js
25 *
26 * Copyright (c) Facebook, Inc. and its affiliates.
27 *
28 * This source code is licensed under the MIT license found in the
29 * LICENSE file in the root directory of this source tree.
30 */var Er=typeof Symbol=="function"&&Symbol.for,$k=Er?Symbol.for("react.element"):60103,Fk=Er?Symbol.for("react.portal"):60106,B1=Er?Symbol.for("react.fragment"):60107,j1=Er?Symbol.for("react.strict_mode"):60108,z1=Er?Symbol.for("react.profiler"):60114,U1=Er?Symbol.for("react.provider"):60109,H1=Er?Symbol.for("react.context"):60110,Lk=Er?Symbol.for("react.async_mode"):60111,W1=Er?Symbol.for("react.concurrent_mode"):60111,G1=Er?Symbol.for("react.forward_ref"):60112,q1=Er?Symbol.for("react.suspense"):60113,eQ=Er?Symbol.for("react.suspense_list"):60120,K1=Er?Symbol.for("react.memo"):60115,Q1=Er?Symbol.for("react.lazy"):60116,tQ=Er?Symbol.for("react.block"):60121,nQ=Er?Symbol.for("react.fundamental"):60117,rQ=Er?Symbol.for("react.responder"):60118,oQ=Er?Symbol.for("react.scope"):60119;function Si(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case $k:switch(e=e.type,e){case Lk:case W1:case B1:case z1:case j1:case q1:return e;default:switch(e=e&&e.$$typeof,e){case H1:case G1:case Q1:case K1:case U1:return e;default:return t}}case Fk:return t}}}function MB(e){return Si(e)===W1}sn.AsyncMode=Lk;sn.ConcurrentMode=W1;sn.ContextConsumer=H1;sn.ContextProvider=U1;sn.Element=$k;sn.ForwardRef=G1;sn.Fragment=B1;sn.Lazy=Q1;sn.Memo=K1;sn.Portal=Fk;sn.Profiler=z1;sn.StrictMode=j1;sn.Suspense=q1;sn.isAsyncMode=function(e){return MB(e)||Si(e)===Lk};sn.isConcurrentMode=MB;sn.isContextConsumer=function(e){return Si(e)===H1};sn.isContextProvider=function(e){return Si(e)===U1};sn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===$k};sn.isForwardRef=function(e){return Si(e)===G1};sn.isFragment=function(e){return Si(e)===B1};sn.isLazy=function(e){return Si(e)===Q1};sn.isMemo=function(e){return Si(e)===K1};sn.isPortal=function(e){return Si(e)===Fk};sn.isProfiler=function(e){return Si(e)===z1};sn.isStrictMode=function(e){return Si(e)===j1};sn.isSuspense=function(e){return Si(e)===q1};sn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===B1||e===W1||e===z1||e===j1||e===q1||e===eQ||typeof e=="object"&&e!==null&&(e.$$typeof===Q1||e.$$typeof===K1||e.$$typeof===U1||e.$$typeof===H1||e.$$typeof===G1||e.$$typeof===nQ||e.$$typeof===rQ||e.$$typeof===oQ||e.$$typeof===tQ)};sn.typeOf=Si;OB.exports=sn;var iQ=OB.exports,Nk=iQ,sQ={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},aQ={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},lQ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},DB={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Vk={};Vk[Nk.ForwardRef]=lQ;Vk[Nk.Memo]=DB;function tM(e){return Nk.isMemo(e)?DB:Vk[e.$$typeof]||sQ}var uQ=Object.defineProperty,cQ=Object.getOwnPropertyNames,nM=Object.getOwnPropertySymbols,dQ=Object.getOwnPropertyDescriptor,fQ=Object.getPrototypeOf,rM=Object.prototype;function $B(e,t,n){if(typeof t!="string"){if(rM){var r=fQ(t);r&&r!==rM&&$B(e,r,n)}var o=cQ(t);nM&&(o=o.concat(nM(t)));for(var i=tM(e),s=tM(t),a=0;a<o.length;++a){var l=o[a];if(!aQ[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=dQ(t,l);try{uQ(e,l,u)}catch{}}}}return e}var hQ=$B;const oM=Fh(hQ);var pQ=!0;
vendor: 4,478 bytes, line 30
30function FB(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Bk=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||pQ===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},jk=function(t,n,r){Bk(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function mQ(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var gQ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yQ=/[A-Z]|^ms/g,vQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,LB=function(t){return t.charCodeAt(1)===45},iM=function(t){return t!=null&&typeof t!="boolean"},mS=PB(function(e){return LB(e)?e:e.replace(yQ,"-$&").toLowerCase()}),sM=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(vQ,function(r,o,i){return Ys={name:o,styles:i,next:Ys},o})}return gQ[t]!==1&&!LB(t)&&typeof n=="number"&&n!==0?n+"px":n};function eg(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Ys={name:n.name,styles:n.styles,next:Ys},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Ys={name:r.name,styles:r.styles,next:Ys},r=r.next;var o=n.styles+";";return o}return bQ(e,t,n)}case"function":{if(e!==void 0){var i=Ys,s=n(e);return Ys=i,eg(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function bQ(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=eg(e,t,n[o])+";";else for(var i in n){var s=n[i];if(typeof s!="object")t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":iM(s)&&(r+=mS(i)+":"+sM(i,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var a=0;a<s.length;a++)iM(s[a])&&(r+=mS(i)+":"+sM(i,s[a])+";");else{var l=eg(e,t,s);switch(i){case"animation":case"animationName":{r+=mS(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var aM=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ys,Y1=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,i="";Ys=void 0;var s=t[0];s==null||s.raw===void 0?(o=!1,i+=eg(r,n,s)):i+=s[0];for(var a=1;a<t.length;a++)i+=eg(r,n,t[a]),o&&(i+=s[a]);aM.lastIndex=0;for(var l="",u;(u=aM.exec(i))!==null;)l+="-"+u[1];var c=mQ(i)+l;return{name:c,styles:i,next:Ys}},wQ=function(t){return t()},NB=C0.useInsertionEffect?C0.useInsertionEffect:!1,VB=NB||wQ,lM=NB||m.useLayoutEffect,sy={}.hasOwnProperty,BB=m.createContext(typeof HTMLElement<"u"?RB({key:"css"}):null),CQ=BB.Provider,zk=function(t){return m.forwardRef(function(n,r){var o=m.useContext(BB);return t(n,o,r)})},Vh=m.createContext({}),kE="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Uk=function(t,n){var r={};for(var o in n)sy.call(n,o)&&(r[o]=n[o]);return r[kE]=t,r},xQ=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Bk(n,r,o),VB(function(){return jk(n,r,o)}),null},SQ=zk(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[kE],i=[r],s="";typeof e.className=="string"?s=FB(t.registered,i,e.className):e.className!=null&&(s=e.className+" ");var a=Y1(i,void 0,m.useContext(Vh));s+=t.key+"-"+a.name;var l={};for(var u in e)sy.call(e,u)&&u!=="css"&&u!==kE&&(l[u]=e[u]);return l.ref=n,l.className=s,m.createElement(m.Fragment,null,m.createElement(xQ,{cache:t,serialized:a,isStringTag:typeof o=="str
vendor: 11,124 bytes, lines 30-47
30ing"}),m.createElement(o,l))}),Hk=SQ,Ft=T.Fragment;function I(e,t,n){return sy.call(t,"css")?T.jsx(Hk,Uk(e,t),n):T.jsx(e,t,n)}function J(e,t,n){return sy.call(t,"css")?T.jsxs(Hk,Uk(e,t),n):T.jsxs(e,t,n)}var PE={},jB={exports:{}},_i={},zB={exports:{}},UB={};/**
31 * @license React
32 * scheduler.production.min.js
33 *
34 * Copyright (c) Facebook, Inc. and its affiliates.
35 *
36 * This source code is licensed under the MIT license found in the
37 * LICENSE file in the root directory of this source tree.
38 */(function(e){function t(P,B){var E=P.length;P.push(B);e:for(;0<E;){var z=E-1>>>1,H=P[z];if(0<o(H,B))P[z]=B,P[E]=H,E=z;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var B=P[0],E=P.pop();if(E!==B){P[0]=E;e:for(var z=0,H=P.length,j=H>>>1;z<j;){var G=2*(z+1)-1,Q=P[G],ee=G+1,Y=P[ee];if(0>o(Q,E))ee<H&&0>o(Y,Q)?(P[z]=Y,P[ee]=E,z=ee):(P[z]=Q,P[G]=E,z=G);else if(ee<H&&0>o(Y,E))P[z]=Y,P[ee]=E,z=ee;else break e}}return B}function o(P,B){var E=P.sortIndex-B.sortIndex;return E!==0?E:P.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(P){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=P)r(u),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(u)}}function C(P){if(g=!1,w(P),!p)if(n(l)!==null)p=!0,D(A);else{var B=n(u);B!==null&&L(C,B.startTime-P)}}function A(P,B){p=!1,g&&(g=!1,y(k),k=-1),h=!0;var E=f;try{for(w(B),d=n(l);d!==null&&(!(d.expirationTime>B)||P&&!O());){var z=d.callback;if(typeof z=="function"){d.callback=null,f=d.priorityLevel;var H=z(d.expirationTime<=B);B=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(l)&&r(l),w(B)}else r(l);d=n(l)}if(d!==null)var j=!0;else{var G=n(u);G!==null&&L(C,G.startTime-B),j=!1}return j}finally{d=null,f=E,h=!1}}var S=!1,_=null,k=-1,M=5,R=-1;function O(){return!(e.unstable_now()-R<M)}function F(){if(_!==null){var P=e.unstable_now();R=P;var B=!0;try{B=_(!0,P)}finally{B?N():(S=!1,_=null)}}else S=!1}var N;if(typeof v=="function")N=function(){v(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,$=V.port2;V.port1.onmessage=F,N=function(){$.postMessage(null)}}else N=function(){b(F,0)};function D(P){_=P,S||(S=!0,N())}function L(P,B){k=b(function(){P(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,D(A))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(P){switch(f){case 1:case 2:case 3:var B=3;break;default:B=f}var E=f;f=B;try{return P()}finally{f=E}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,B){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var E=f;f=P;try{return B()}finally{f=E}},e.unstable_scheduleCallback=function(P,B,E){var z=e.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?z+E:z):E=z,P){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=E+H,P={id:c++,callback:B,priorityLevel:P,startTime:E,expirationTime:H,sortIndex:-1},E>z?(P.sortIndex=E,t(u,P),n(l)===null&&P===n(u)&&(g?(y(k),k=-1):g=!0,L(C,E-z))):(P.sortIndex=H,t(l,P),p||h||(p=!0,D(A))),P},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(P){var B=f;return function(){var E=f;f=B;try{return P.apply(this,arguments)}finally{f=E}}}})(UB);zB.exports=UB;var _Q=zB.exports;/**
39 * @license React
40 * react-dom.production.min.js
41 *
42 * Copyright (c) Facebook, Inc. and its affiliates.
43 *
44 * This source code is licensed under the MIT license found in the
45 * LICENSE file in the root directory of this source tree.
46 */var HB=m,yi=_Q;function De(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var WB=new Set,tg={};function hd(e,t){oh(e,t),oh(e+"Capture",t)}function oh(e,t){for(tg[e]=t,e=0;e<t.length;e++)WB.add(t[e])}var fl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),TE=Object.prototype.hasOwnProperty,EQ=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,uM={},cM={};function IQ(e){return TE.call(cM,e)?!0:TE.call(uM,e)?!1:EQ.test(e)?cM[e]=!0:(uM[e]=!0,!1)}function AQ(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function kQ(e,t,n,r){if(t===null||typeof t>"u"||AQ(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ro(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Br={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Br[e]=new Ro(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Br[t]=new Ro(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Br[e]=new Ro(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Br[e]=new Ro(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Br[e]=new Ro(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Br[e]=new Ro(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Br[e]=new Ro(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Br[e]=new Ro(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Br[e]=new Ro(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wk=/[\-:]([a-z])/g;function Gk(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wk,Gk);Br[t]=new Ro(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wk,Gk);Br[t]=new Ro(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wk,Gk);Br[t]=new Ro(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Br[e]=new Ro(e,1,!1,e.toLowerCase(),null,!1,!1)});Br.xlinkHref=new Ro("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Br[e]=new Ro(e,1,!1,e.toLowerCase(),null,!0,!0)});function qk(e,t,n,r){var o=Br.hasOwnProperty(t)?Br[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(kQ(t,n,o,r)&&(n=null),r||o===null?IQ(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var _l=HB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gv=Symbol.for("react.element"),lf=Symbol.for("react.portal"),uf=Symbol.for("react.fragment"),Kk=Symbol.for("react.strict_mode"),RE=Symbol.for("react.profiler"),GB=Symbol.for("react.provider"),qB=Symbol.for("react.context"),Qk=Symbol.for("react.forward_ref"),OE=Symbol.for("react.suspense"),ME=Symbol.for("react.suspense_list"),Yk=Symbol.for("react.memo"),Kl=Symbol.for("react.lazy"),KB=Symbol.for("react.offscreen"),dM=Symbol.iterator;function Sp(e){return e===null||typeof e!="object"?null:(e=dM&&e[dM]||e["@@iterator"],typeof e=="function"?e:null)}var Fn=Object.assign,gS;function Qp(e){if(gS===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);gS=t&&t[1]||""}return`
47`+gS+e}var yS=!1;function vS(e,t){if(!e||yS)return"";yS=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 4,297 bytes, lines 47-50
47catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
48`),i=r.stack.split(`
49`),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a]){var l=`
50`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{yS=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qp(e):""}function PQ(e){switch(e.tag){case 5:return Qp(e.type);case 16:return Qp("Lazy");case 13:return Qp("Suspense");case 19:return Qp("SuspenseList");case 0:case 2:case 15:return e=vS(e.type,!1),e;case 11:return e=vS(e.type.render,!1),e;case 1:return e=vS(e.type,!0),e;default:return""}}function DE(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case uf:return"Fragment";case lf:return"Portal";case RE:return"Profiler";case Kk:return"StrictMode";case OE:return"Suspense";case ME:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qB:return(e.displayName||"Context")+".Consumer";case GB:return(e._context.displayName||"Context")+".Provider";case Qk:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yk:return t=e.displayName||null,t!==null?t:DE(e.type)||"Memo";case Kl:t=e._payload,e=e._init;try{return DE(e(t))}catch{}}return null}function TQ(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return DE(t);case 8:return t===Kk?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Tu(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function QB(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function RQ(e){var t=QB(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yv(e){e._valueTracker||(e._valueTracker=RQ(e))}function YB(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=QB(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function S0(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $E(e,t){var n=t.checked;return Fn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function fM(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Tu(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function XB(e,t){t=t.checked,t!=null&&qk(e,"checked",t,!1)}function FE(e,t){XB(e,t);var n=Tu(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?LE(e,t.type,n):t.hasOwnProperty("defaultValue")&&LE(e,t.type,Tu(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}
vendor: 4,187 bytes, line 50
50function hM(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function LE(e,t,n){(t!=="number"||S0(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yp=Array.isArray;function Tf(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Tu(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function NE(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(De(91));return Fn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function pM(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(De(92));if(Yp(n)){if(1<n.length)throw Error(De(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Tu(n)}}function JB(e,t){var n=Tu(t.value),r=Tu(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function mM(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ZB(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function VE(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ZB(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var vv,e5=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(vv=vv||document.createElement("div"),vv.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=vv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ng(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},OQ=["Webkit","ms","Moz","O"];Object.keys(xm).forEach(function(e){OQ.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xm[t]=xm[e]})});function t5(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xm.hasOwnProperty(e)&&xm[e]?(""+t).trim():t+"px"}function n5(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=t5(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var MQ=Fn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function BE(e,t){if(t){if(MQ[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(De(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(De(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(De(61))}if(t.style!=null&&typeof t.style!="object")throw Error(De(62))}}function jE(e,t){if(e.indexOf("-")===-1)return typeof t.is=="str
50ing";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var zE=null;function Xk(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var UE=null,Rf=null,Of=null;function gM(e){if(e=uy(e)){if(typeof UE!="function")throw Error(De(280));var t=e.stateNode;t&&(t=tC(t),UE(e.stateNode,e.type,t))}}function r5(e){Rf?Of?Of.push(e):Of=[e]:Rf=e}function o5(){if(Rf){var e=Rf,t=Of;if(Of=Rf=null,gM(e),t)for(e=0;e<t.length;e++)gM(t[e])}}function i5(e,t){return e(t)}function s5(){}var bS=!1;function a5(e,t,n){if(bS)return e(t,n);bS=!0;try{return i5(e,t,n)}finally{bS=!1,(Rf!==null||Of!==null)&&(s5(),o5())}}function rg(e,t){var n=e.stateNode;if(n===null)return null;var r=tC(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(De(231,t,typeof n));return n}var HE=!1;if(fl)try{var _p={};Object.defineProperty(_p,"passive",{get:function(){HE=!0}}),window.addEventListener("test",_p,_p),window.removeEventListener("test",_p,_p)}catch{HE=!1}function DQ(e,t,n,r,o,i,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Sm=!1,_0=null,E0=!1,WE=null,$Q={onError:function(e){Sm=!0,_0=e}};function FQ(e,t,n,r,o,i,s,a,l){Sm=!1,_0=null,DQ.apply($Q,arguments)}function LQ(e,t,n,r,o,i,s,a,l){if(FQ.apply(this,arguments),Sm){if(Sm){var u=_0;Sm=!1,_0=null}else throw Error(De(198));E0||(E0=!0,WE=u)}}function pd(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function l5(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yM(e){if(pd(e)!==e)throw Error(De(188))}function NQ(e){var t=e.alternate;if(!t){if(t=pd(e),t===null)throw Error(De(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return yM(o),e;if(i===r)return yM(o),t;i=i.sibling}throw Error(De(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(De(189))}}if(n.alternate!==r)throw Error(De(190))}if(n.tag!==3)throw Error(De(188));return n.stateNode.current===n?e:t}function u5(e){return e=NQ(e),e!==null?c5(e):null}function c5(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=c5(e);if(t!==null)return t;e=e.sibling}return null}var d5=yi.unstable_scheduleCallback,vM=yi.unstable_cancelCallback,VQ=yi.unstable_shouldYield,BQ=yi.unstable_requestPaint,Kn=yi.unstable_now,jQ=yi.unstable_getCurrentPriorityLevel,Jk=yi.unstable_ImmediatePriority,f5=yi.unstable_UserBlockingPriority,I0=yi.unstable_NormalPriority,zQ=yi.unstable_LowPriority,h5=yi.unstable_IdlePriority,X1=null,ca=null;function UQ(e){if(ca&&typeof ca.onCommitFiberRoot=="function")try{ca.onCommitFiberRoot(X1,e,void 0,(e.current.flags&128)===128)}catch{}}var Is=Math.clz32?Math.clz32:GQ,HQ=Math.log,WQ=Math.LN2;function GQ(e){return e>>>=0,e===0?32:31-(HQ(e)/WQ|0)|0}var bv=64,wv=4194304;function Xp(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function A0(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Xp(a):(i&=s,i!==0&&(r=Xp(i)))}else s=n&~o,s!==0?r=Xp(s):i!==0&&(r=Xp(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Is(t),o=1<<n,r|=e[n],t&=~o;return r}function qQ(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function KQ(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Is(i),a=1<<s,l=o[s];l===-1?(!(a&n)||a&r)&&(o[s]=qQ(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function GE(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function p5(){var e=bv;return bv<<=1,!(bv&4194240)&&(bv=64),e}function wS(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ay(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Is(t),e[t]=n}function QQ(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Is(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Zk(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Is(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var rn=0;function m5(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var g5,eP,y5,v5,b5,qE=!1,Cv=[],vu=null,bu=null,wu=null,og=new Map,ig=new Map,Zl=[],YQ="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function bM(e,t){switch(e){case"focusin":case"focusout":vu=null;break;case"dragenter":case"dragleave":bu=null;break;case"mouseover":case"mouseout":wu=null;break;case"pointerover":case"pointerout":og.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ig.delete(t.pointerId)}}function Ep(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=uy(t),t!==null&&eP(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function XQ(e,t,n,r,o){switch(t){case"focusin":return vu=Ep(vu,e,t,n,r,o),!0;case"dragenter":return bu=Ep(bu,e,t,n,r,o),!0;case"mouseover":return wu=Ep(wu,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return og.set(i,Ep(og.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ig.set(i,Ep(ig.get(i)||null,e,t,n,r,o)),!0}return!1}function w5(e){var t=hc(e.target);if(t!==null){var n=pd(t);if(n!==null){if(t=n.tag,t===13){if(t=l5(n),t!==null){e.blockedOn=t,b5(e.priority,function(){y5(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ab(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=KE(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);zE=r,n.target.dispatchEvent(r),zE=null}else return t=uy(n),t!==null&&eP(t),e.blockedOn=n,!1;t.shift()}return!0}function wM(e,t,n){Ab(e)&&n.delete(t)}function JQ(){qE=!1,vu!==null&&Ab(vu)&&(vu=null),bu!==null&&Ab(bu)&&(bu=null),wu!==null&&Ab(wu)&&(wu=null),og.forEach(wM),ig.forEach(wM)}function Ip(e,t){e.blockedOn===t&&(e.blockedOn=null,qE||(qE=!0,yi.unstable_scheduleCallback(yi.unstable_NormalPriority,JQ)))}function sg(e){function t(o){return Ip(o,e)}if(0<Cv.length){Ip(Cv[0],e);for(var n=1;n<Cv.length;n++){var r=Cv[n];r.blockedOn===e&&(r.blockedOn=null)}}for(vu!==null&&Ip(vu,e),bu!==null&&Ip(bu,e),wu!==null&&Ip(wu,e),og.forEach(t),ig.forEach(t),n=0;n<Zl.length;n++)r=Zl[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Zl.length&&(n=Zl[0],n.blockedOn===null);)w5(n),n.blockedOn===null&&Zl.shift()}var Mf=_l.ReactCurrentBatchConfig,k0=!0;function ZQ(e,t,n,r){var o=rn,i=Mf.transition;Mf.transition=null;try{rn=1,tP(e,t,n,r)}finally{rn=o,Mf.transition=i}}function eY(e,t,n,r){var o=rn,i=Mf.transition;Mf.transition=null;try{rn=4,tP(e,t,n,r)}finally{rn=o,Mf.transition=i}}function tP(e,t,n,r){if(k0){var o=KE(e,t,n,r);if(o===null)TS(e,t,r,P0,n),bM(e,r);else if(XQ(o,e,t,n,r))r.stopPropagation();else if(bM(e,r),t&4&&-1<YQ.indexOf(e)){for(;o!==null;){var i=uy(o);if(i!==null&&g5(i),i=KE(e,t,n,r),i===null&&TS(e,t,r,P0,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else TS(e,t,r,null,n)}}var P0=null;
vendor: 9,429 bytes, line 50
50function KE(e,t,n,r){if(P0=null,e=Xk(r),e=hc(e),e!==null)if(t=pd(e),t===null)e=null;else if(n=t.tag,n===13){if(e=l5(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return P0=e,null}function C5(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(jQ()){case Jk:return 1;case f5:return 4;case I0:case zQ:return 16;case h5:return 536870912;default:return 16}default:return 16}}var cu=null,nP=null,kb=null;function x5(){if(kb)return kb;var e,t=nP,n=t.length,r,o="value"in cu?cu.value:cu.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return kb=o.slice(e,1<r?1-r:void 0)}function Pb(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function xv(){return!0}function CM(){return!1}function Ei(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?xv:CM,this.isPropagationStopped=CM,this}return Fn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=xv)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=xv)},persist:function(){},isPersistent:xv}),t}var Bh={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rP=Ei(Bh),ly=Fn({},Bh,{view:0,detail:0}),tY=Ei(ly),CS,xS,Ap,J1=Fn({},ly,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oP,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ap&&(Ap&&e.type==="mousemove"?(CS=e.screenX-Ap.screenX,xS=e.screenY-Ap.screenY):xS=CS=0,Ap=e),CS)},movementY:function(e){return"movementY"in e?e.movementY:xS}}),xM=Ei(J1),nY=Fn({},J1,{dataTransfer:0}),rY=Ei(nY),oY=Fn({},ly,{relatedTarget:0}),SS=Ei(oY),iY=Fn({},Bh,{animationName:0,elapsedTime:0,pseudoElement:0}),sY=Ei(iY),aY=Fn({},Bh,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lY=Ei(aY),uY=Fn({},Bh,{data:0}),SM=Ei(uY),cY={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dY={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},fY={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hY(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fY[e])?!!t[e]:!1}function oP(){return hY}var pY=Fn({},ly,{key:function(e){if(e.key){var t=cY[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pb(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dY[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oP,charCode:function(e){return e.type==="keypress"?Pb(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pb(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mY=Ei(pY),gY=Fn({},J1,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_M=Ei(gY),yY=Fn({},ly,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oP}),vY=Ei(yY),bY=Fn({},Bh,{propertyName:0,elapsedTime:0,pseudoElement:0}),wY=Ei(bY),CY=Fn({},J1,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),xY=Ei(CY),SY=[9,13,27,32],iP=fl&&"CompositionEvent"in window,_m=null;fl&&"documentMode"in document&&(_m=document.documentMode);var _Y=fl&&"TextEvent"in window&&!_m,S5=fl&&(!iP||_m&&8<_m&&11>=_m),EM=" ",IM=!1;function _5(e,t){switch(e){case"keyup":return SY.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function E5(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cf=!1;function EY(e,t){switch(e){case"compositionend":return E5(t);case"keypress":return t.which!==32?null:(IM=!0,EM);case"textInput":return e=t.data,e===EM&&IM?null:e;default:return null}}function IY(e,t){if(cf)return e==="compositionend"||!iP&&_5(e,t)?(e=x5(),kb=nP=cu=null,cf=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return S5&&t.locale!=="ko"?null:t.data;default:return null}}var AY={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function AM(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!AY[e.type]:t==="textarea"}function I5(e,t,n,r){r5(r),t=T0(t,"onChange"),0<t.length&&(n=new rP("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Em=null,ag=null;function kY(e){L5(e,0)}function Z1(e){var t=hf(e);if(YB(t))return e}function PY(e,t){if(e==="change")return t}var A5=!1;if(fl){var _S;if(fl){var ES="oninput"in document;if(!ES){var kM=document.createElement("div");kM.setAttribute("oninput","return;"),ES=typeof kM.oninput=="function"}_S=ES}else _S=!1;A5=_S&&(!document.documentMode||9<document.documentMode)}function PM(){Em&&(Em.detachEvent("onpropertychange",k5),ag=Em=null)}function k5(e){if(e.propertyName==="value"&&Z1(ag)){var t=[];I5(t,ag,e,Xk(e)),a5(kY,t)}}function TY(e,t,n){e==="focusin"?(PM(),Em=t,ag=n,Em.attachEvent("onpropertychange",k5)):e==="focusout"&&PM()}function RY(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Z1(ag)}function OY(e,t){if(e==="click")return Z1(t)}function MY(e,t){if(e==="input"||e==="change")return Z1(t)}function DY(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rs=typeof Object.is=="function"?Object.is:DY;function lg(e,t){if(Rs(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!TE.call(t,o)||!Rs(e[o],t[o]))return!1}return!0}function TM(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function RM(e,t){var n=TM(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=TM(n)}}function P5(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?P5(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function T5(){for(var e=window,t=S0();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=S0(e.document)}return t}function sP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $Y(e){var t=T5(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&P5(n.ownerDocument.documentElement,n)){if(r!==null&&sP(n)){if
vendor: 4,319 bytes, line 50
50(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=RM(n,i);var s=RM(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var FY=fl&&"documentMode"in document&&11>=document.documentMode,df=null,QE=null,Im=null,YE=!1;function OM(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;YE||df==null||df!==S0(r)||(r=df,"selectionStart"in r&&sP(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Im&&lg(Im,r)||(Im=r,r=T0(QE,"onSelect"),0<r.length&&(t=new rP("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=df)))}function Sv(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ff={animationend:Sv("Animation","AnimationEnd"),animationiteration:Sv("Animation","AnimationIteration"),animationstart:Sv("Animation","AnimationStart"),transitionend:Sv("Transition","TransitionEnd")},IS={},R5={};fl&&(R5=document.createElement("div").style,"AnimationEvent"in window||(delete ff.animationend.animation,delete ff.animationiteration.animation,delete ff.animationstart.animation),"TransitionEvent"in window||delete ff.transitionend.transition);function eC(e){if(IS[e])return IS[e];if(!ff[e])return e;var t=ff[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in R5)return IS[e]=t[n];return e}var O5=eC("animationend"),M5=eC("animationiteration"),D5=eC("animationstart"),$5=eC("transitionend"),F5=new Map,MM="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Vu(e,t){F5.set(e,t),hd(t,[e])}for(var AS=0;AS<MM.length;AS++){var kS=MM[AS],LY=kS.toLowerCase(),NY=kS[0].toUpperCase()+kS.slice(1);Vu(LY,"on"+NY)}Vu(O5,"onAnimationEnd");Vu(M5,"onAnimationIteration");Vu(D5,"onAnimationStart");Vu("dblclick","onDoubleClick");Vu("focusin","onFocus");Vu("focusout","onBlur");Vu($5,"onTransitionEnd");oh("onMouseEnter",["mouseout","mouseover"]);oh("onMouseLeave",["mouseout","mouseover"]);oh("onPointerEnter",["pointerout","pointerover"]);oh("onPointerLeave",["pointerout","pointerover"]);hd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hd("onBeforeInput",["compositionend","keypress","textInput","paste"]);hd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jp="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),VY=new Set("cancel close invalid load scroll toggle".split(" ").concat(Jp));
vendor: 3,983 bytes, line 50
50function DM(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,LQ(r,t,void 0,e),e.currentTarget=null}function L5(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;DM(o,a,u),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;DM(o,a,u),i=l}}}if(E0)throw e=WE,E0=!1,WE=null,e}function yn(e,t){var n=t[tI];n===void 0&&(n=t[tI]=new Set);var r=e+"__bubble";n.has(r)||(N5(t,e,2,!1),n.add(r))}function PS(e,t,n){var r=0;t&&(r|=4),N5(n,e,r,t)}var _v="_reactListening"+Math.random().toString(36).slice(2);function ug(e){if(!e[_v]){e[_v]=!0,WB.forEach(function(n){n!=="selectionchange"&&(VY.has(n)||PS(n,!1,e),PS(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_v]||(t[_v]=!0,PS("selectionchange",!1,t))}}function N5(e,t,n,r){switch(C5(t)){case 1:var o=ZQ;break;case 4:o=eY;break;default:o=tP}n=o.bind(null,t,n,e),o=void 0,!HE||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function TS(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=hc(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}a5(function(){var u=i,c=Xk(n),d=[];e:{var f=F5.get(e);if(f!==void 0){var h=rP,p=e;switch(e){case"keypress":if(Pb(n)===0)break e;case"keydown":case"keyup":h=mY;break;case"focusin":p="focus",h=SS;break;case"focusout":p="blur",h=SS;break;case"beforeblur":case"afterblur":h=SS;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=xM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=rY;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=vY;break;case O5:case M5:case D5:h=sY;break;case $5:h=wY;break;case"scroll":h=tY;break;case"wheel":h=xY;break;case"copy":case"cut":case"paste":h=lY;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=_M}var g=(t&4)!==0,b=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var v=u,w;v!==null;){w=v;var C=w.stateNode;if(w.tag===5&&C!==null&&(w=C,y!==null&&(C=rg(v,y),C!=null&&g.push(cg(v,C,w)))),b)break;v=v.return}0<g.length&&(f=new h(f,p,null,n,c),d.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==zE&&(p=n.relatedTarget||n.fromElement)&&(hc(p)||p[hl]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?hc(p):null,p!==null&&(b=pd(p),p!==b||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=u),h!==p)){if(g=xM,C="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(g=_M,C="onPointerLeave",y="onPointerEnter",v="pointer"),b=h==null?f:hf(h),w=p==null?f:hf(p),f=new g(C,v+"leave",h,n,c),f.target=b,f.relatedTarget=w,C=null,hc(c)===u&&(g=new g(y,v+"enter",p,n,c),g.target=w,g.relatedTarget=b,C=g),b=C,h&&p)t:{for(g=h,y=p,v=0,w=g;w;w=Rd(w))v++;for(w=0,C=y;C;C=Rd(C))w++;for(;0<v-w;)g=Rd(g),v--;for(;0<w-v;)y=Rd(y),w--;for(;v--;){if(g===y||y!==null&&g===y.alternate)break t;g=Rd(g),y=Rd(y)}g=null}else g=null;h!==null&&$M(d,f,h,g,!1),p!==null&&b!==null&&$M(d,b,p,g,!0)}}
vendor: 8,435 bytes, lines 50-51
50e:{if(f=u?hf(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var A=PY;else if(AM(f))if(A5)A=MY;else{A=RY;var S=TY}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(A=OY);if(A&&(A=A(e,u))){I5(d,A,n,c);break e}S&&S(e,f,u),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&LE(f,"number",f.value)}switch(S=u?hf(u):window,e){case"focusin":(AM(S)||S.contentEditable==="true")&&(df=S,QE=u,Im=null);break;case"focusout":Im=QE=df=null;break;case"mousedown":YE=!0;break;case"contextmenu":case"mouseup":case"dragend":YE=!1,OM(d,n,c);break;case"selectionchange":if(FY)break;case"keydown":case"keyup":OM(d,n,c)}var _;if(iP)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else cf?_5(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(S5&&n.locale!=="ko"&&(cf||k!=="onCompositionStart"?k==="onCompositionEnd"&&cf&&(_=x5()):(cu=c,nP="value"in cu?cu.value:cu.textContent,cf=!0)),S=T0(u,k),0<S.length&&(k=new SM(k,e,null,n,c),d.push({event:k,listeners:S}),_?k.data=_:(_=E5(n),_!==null&&(k.data=_)))),(_=_Y?EY(e,n):IY(e,n))&&(u=T0(u,"onBeforeInput"),0<u.length&&(c=new SM("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=_))}L5(d,t)})}function cg(e,t,n){return{instance:e,listener:t,currentTarget:n}}function T0(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=rg(e,n),i!=null&&r.unshift(cg(e,i,o)),i=rg(e,t),i!=null&&r.push(cg(e,i,o))),e=e.return}return r}function Rd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function $M(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,o?(l=rg(n,i),l!=null&&s.unshift(cg(n,l,a))):o||(l=rg(n,i),l!=null&&s.push(cg(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var BY=/\r\n?/g,jY=/\u0000|\uFFFD/g;function FM(e){return(typeof e=="string"?e:""+e).replace(BY,`
51`).replace(jY,"")}function Ev(e,t,n){if(t=FM(t),FM(e)!==t&&n)throw Error(De(425))}function R0(){}var XE=null,JE=null;function ZE(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var eI=typeof setTimeout=="function"?setTimeout:void 0,zY=typeof clearTimeout=="function"?clearTimeout:void 0,LM=typeof Promise=="function"?Promise:void 0,UY=typeof queueMicrotask=="function"?queueMicrotask:typeof LM<"u"?function(e){return LM.resolve(null).then(e).catch(HY)}:eI;function HY(e){setTimeout(function(){throw e})}function RS(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),sg(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);sg(t)}function Cu(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function NM(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var jh=Math.random().toString(36).slice(2),Js="__reactFiber$"+jh,dg="__reactProps$"+jh,hl="__reactContainer$"+jh,tI="__reactEvents$"+jh,WY="__reactListeners$"+jh,GY="__reactHandles$"+jh;function hc(e){var t=e[Js];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hl]||n[Js]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=NM(e);e!==null;){if(n=e[Js])return n;e=NM(e)}return t}e=n,n=e.parentNode}return null}function uy(e){return e=e[Js]||e[hl],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function hf(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(De(33))}function tC(e){return e[dg]||null}var nI=[],pf=-1;function Bu(e){return{current:e}}function Sn(e){0>pf||(e.current=nI[pf],nI[pf]=null,pf--)}function pn(e,t){pf++,nI[pf]=e.current,e.current=t}var Ru={},co=Bu(Ru),Ho=Bu(!1),Uc=Ru;function ih(e,t){var n=e.type.contextTypes;if(!n)return Ru;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Wo(e){return e=e.childContextTypes,e!=null}function O0(){Sn(Ho),Sn(co)}function VM(e,t,n){if(co.current!==Ru)throw Error(De(168));pn(co,t),pn(Ho,n)}function V5(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(De(108,TQ(e)||"Unknown",o));return Fn({},n,r)}function M0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ru,Uc=co.current,pn(co,e),pn(Ho,Ho.current),!0}function BM(e,t,n){var r=e.stateNode;if(!r)throw Error(De(169));n?(e=V5(e,t,Uc),r.__reactInternalMemoizedMergedChildContext=e,Sn(Ho),Sn(co),pn(co,e)):Sn(Ho),pn(Ho,n)}var Ya=null,nC=!1,OS=!1;function B5(e){Ya===null?Ya=[e]:Ya.push(e)}function qY(e){nC=!0,B5(e)}function ju(){if(!OS&&Ya!==null){OS=!0;var e=0,t=rn;try{var n=Ya;for(rn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ya=null,nC=!1}catch(o){throw Ya!==null&&(Ya=Ya.slice(e+1)),d5(Jk,ju),o}finally{rn=t,OS=!1}}return null}var mf=[],gf=0,D0=null,$0=0,Fi=[],Li=0,Hc=null,Ja=1,Za="";function nc(e,t){mf[gf++]=$0,mf[gf++]=D0,D0=e,$0=t}function j5(e,t,n){Fi[Li++]=Ja,Fi[Li++]=Za,Fi[Li++]=Hc,Hc=e;var r=Ja;e=Za;var o=32-Is(r)-1;r&=~(1<<o),n+=1;var i=32-Is(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Ja=1<<32-Is(t)+o|n<<o|r,Za=i+e}else Ja=1<<i|n<<o|r,Za=e}function aP(e){e.return!==null&&(nc(e,1),j5(e,1,0))}function lP(e){for(;e===D0;)D0=mf[--gf],mf[gf]=null,$0=mf[--gf],mf[gf]=null;for(;e===Hc;)Hc=Fi[--Li],Fi[Li]=null,Za=Fi[--Li],Fi[Li]=null,Ja=Fi[--Li],Fi[Li]=null}var hi=null,ai=null,Pn=!1,ws=null;function z5(e,t){var n=zi(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function jM(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,hi=e,ai=Cu(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,hi=e,ai=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Hc!==null?{id:Ja,overflow:Za}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=zi(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,hi=e,ai=null,!0):!1;default:return!1}}function rI(e){return(e.mode&1)!==0&&(e.flags&128)===0}function oI(e){if(Pn){var t=ai;if(t){var n=t;if(!jM(e,t)){if(rI(e))throw Error(De(418));t=Cu(n.nextSibling);var r=hi;t&&jM(e,t)?z5(r,n):(e.flags=e.flags&-4097|2,Pn=!1,hi=e)}}else{if(rI(e))throw Error(De(418));e.flags=e.flags&-4097|2,Pn=!1,hi=e}}}function zM(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;hi=e}function Iv(e){if(e!==hi)return!1;if(!Pn)return zM(e),Pn=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ZE(e.type,e.memoizedProps)),t&&(t=ai)){if(rI(e))throw U5(),Error(De(418));for(;t;)z5(e,t),t=Cu(t.nextSibling)}if(zM(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(De(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ai=Cu(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ai=null}}else ai=hi?Cu(e.stateNode.nextSibling):null;return!0}function U5(){for(var e=ai;e;)e=Cu(e.nextSibling)}function sh(){ai=hi=null,Pn=!1}function uP(e){ws===null?ws=[e]:ws.push(e)}var KY=_l.ReactCurrentBatchConfig;function ms(e,t){if(e&&e.defaultProps){t=Fn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var F0=Bu(null),L0=null,yf=null,cP=null;function dP(){cP=yf=L0=null}function fP(e){var t=F0.current;Sn(F0),e._currentValue=t}function iI(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}
vendor: 4,707 bytes, line 51
51function Df(e,t){L0=e,cP=yf=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(zo=!0),e.firstContext=null)}function Qi(e){var t=e._currentValue;if(cP!==e)if(e={context:e,memoizedValue:t,next:null},yf===null){if(L0===null)throw Error(De(308));yf=e,L0.dependencies={lanes:0,firstContext:e}}else yf=yf.next=e;return t}var pc=null;function hP(e){pc===null?pc=[e]:pc.push(e)}function H5(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,hP(t)):(n.next=o.next,o.next=n),t.interleaved=n,pl(e,r)}function pl(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ql=!1;function pP(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function W5(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function sl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xu(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Nt&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,pl(e,n)}return o=r.interleaved,o===null?(t.next=t,hP(r)):(t.next=o.next,o.next=t),r.interleaved=t,pl(e,n)}function Tb(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zk(e,n)}}function UM(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function N0(e,t,n,r){var o=e.updateQueue;Ql=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,c=u=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,g=a;switch(f=t,h=n,g.tag){case 1:if(p=g.payload,typeof p=="function"){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(h,d,f):p,f==null)break e;d=Fn({},d,f);break e;case 2:Ql=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Gc|=s,e.lanes=s,e.memoizedState=d}}function HM(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(De(191,o));o.call(r)}}}var G5=new HB.Component().refs;function sI(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Fn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var rC={isMounted:function(e){return(e=e._reactInternals)?pd(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Io(),o=_u(e),i=sl(r,o);i.payload=t,n!=null&&(i.callback=n),t=xu(e,i,o),t!==null&&(As(t,e,o,r),Tb(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Io(),o=_u(e),i=sl(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=xu(e,i,o),t!==null&&(As(t,e,o,r),Tb(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Io(),r=_u(e),o=sl(n,r);o.tag=2,t!=null&&(o.callback=t),t=xu(e,o,r),t!==null&&(As(t,e,r,n),Tb(t,e,r))}};function WM(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!lg(n,r)||!lg(o,i):!0}function q5(e,t,n){var r=!1,o=Ru,i=t.contextType;return typeof i=="object"&&i!==null?i=Qi(i):(o=Wo(t)?Uc:co.current,r=t.contextTypes,i=(r=r!=null)?
vendor: 5,077 bytes, line 51
51ih(e,o):Ru),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=rC,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function GM(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&rC.enqueueReplaceState(t,t.state,null)}function aI(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=G5,pP(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Qi(i):(i=Wo(t)?Uc:co.current,o.context=ih(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(sI(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&rC.enqueueReplaceState(o,o.state,null),N0(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function kp(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(De(309));var r=n.stateNode}if(!r)throw Error(De(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;a===G5&&(a=o.refs={}),s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(De(284));if(!n._owner)throw Error(De(290,e))}return e}function Av(e,t){throw e=Object.prototype.toString.call(t),Error(De(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qM(e){var t=e._init;return t(e._payload)}function K5(e){function t(y,v){if(e){var w=y.deletions;w===null?(y.deletions=[v],y.flags|=16):w.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function o(y,v){return y=Eu(y,v),y.index=0,y.sibling=null,y}function i(y,v,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<v?(y.flags|=2,v):w):(y.flags|=2,v)):(y.flags|=1048576,v)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,v,w,C){return v===null||v.tag!==6?(v=VS(w,y.mode,C),v.return=y,v):(v=o(v,w),v.return=y,v)}function l(y,v,w,C){var A=w.type;return A===uf?c(y,v,w.props.children,C,w.key):v!==null&&(v.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Kl&&qM(A)===v.type)?(C=o(v,w.props),C.ref=kp(y,v,w),C.return=y,C):(C=Fb(w.type,w.key,w.props,null,y.mode,C),C.ref=kp(y,v,w),C.return=y,C)}function u(y,v,w,C){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=BS(w,y.mode,C),v.return=y,v):(v=o(v,w.children||[]),v.return=y,v)}function c(y,v,w,C,A){return v===null||v.tag!==7?(v=Rc(w,y.mode,C,A),v.return=y,v):(v=o(v,w),v.return=y,v)}function d(y,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=VS(""+v,y.mode,w),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case gv:return w=Fb(v.type,v.key,v.props,null,y.mode,w),w.ref=kp(y,null,v),w.return=y,w;case lf:return v=BS(v,y.mode,w),v.return=y,v;case Kl:var C=v._init;return d(y,C(v._payload),w)}if(Yp(v)||Sp(v))return v=Rc(v,y.mode,w,null),v.return=y,v;Av(y,v)}return null}function f(y,v,w,C){var A=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return A!==null?null:a(y,v,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case gv:return w.key===A?l(y,v,w,C):null;case lf:return w.key===A?u(y,v,w,C):null;case Kl:return A=w._init,f(y,v,A(w._payload),C)}if(Yp(w)||Sp(w))return A!==null?null:c(y,v,w,C,null);Av(y,w)}return null}function h(y,v,w,C,A){if(typeof C=="string"&&C!==""||typeof C=="number")return y=y.get(w)||null,a(v,y,""+C,A);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case gv:return y=y.get(C.key===null?w:C.key)||null,l(v,y,C,A);case lf:return y=y.get(C.key===null?w:C.key)||null,u(v,y,C,A);case Kl:var S=C._init;return h(y,v,w,S(C._payload),A)}if(Yp(C)||Sp(C))return y=y.get(w)||null,c(v,y,C,A,null);Av(v,C)}return null}function p(y,v,w,C){for(var A=null,S=null,_=v,k=v=0,M=null;_!==null&&k<w.length;k++){_.index>k?(M=_,_=null):M=_.sibling;var R=f(y,_,w[k],C);if(R===null){_===null&&(_=M);break}e&&_&&R.alternate===null&&t(y,_),v=i(R,v,k),S===null?A=R:S.sibling=R,S=R,_=M}if(k===w.length)return n(y,_),Pn&&nc(y,k),A;if(_===null){for(;k<w.length;k++)_=d(y,w[k],C),_!==null&&(v=i(_,v,k),S===null?A=_:S.sibling=_,S=_);return Pn&&nc(y,k),A}for(_=r(y,_);k<w.length;k++)M=h(_,y,k,w[k],C),M!==null&&(e&&M.alternate!==null&&_.delete(M.key===null?k:M.key),v=i(M,v,k),S===null?A=M:S.sibling=M,S=M);return e&&_.forEach(function(O){return t(y,O)}),Pn&&nc(y,k),A}
vendor: 23,253 bytes, lines 51-53
51function g(y,v,w,C){var A=Sp(w);if(typeof A!="function")throw Error(De(150));if(w=A.call(w),w==null)throw Error(De(151));for(var S=A=null,_=v,k=v=0,M=null,R=w.next();_!==null&&!R.done;k++,R=w.next()){_.index>k?(M=_,_=null):M=_.sibling;var O=f(y,_,R.value,C);if(O===null){_===null&&(_=M);break}e&&_&&O.alternate===null&&t(y,_),v=i(O,v,k),S===null?A=O:S.sibling=O,S=O,_=M}if(R.done)return n(y,_),Pn&&nc(y,k),A;if(_===null){for(;!R.done;k++,R=w.next())R=d(y,R.value,C),R!==null&&(v=i(R,v,k),S===null?A=R:S.sibling=R,S=R);return Pn&&nc(y,k),A}for(_=r(y,_);!R.done;k++,R=w.next())R=h(_,y,k,R.value,C),R!==null&&(e&&R.alternate!==null&&_.delete(R.key===null?k:R.key),v=i(R,v,k),S===null?A=R:S.sibling=R,S=R);return e&&_.forEach(function(F){return t(y,F)}),Pn&&nc(y,k),A}function b(y,v,w,C){if(typeof w=="object"&&w!==null&&w.type===uf&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case gv:e:{for(var A=w.key,S=v;S!==null;){if(S.key===A){if(A=w.type,A===uf){if(S.tag===7){n(y,S.sibling),v=o(S,w.props.children),v.return=y,y=v;break e}}else if(S.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Kl&&qM(A)===S.type){n(y,S.sibling),v=o(S,w.props),v.ref=kp(y,S,w),v.return=y,y=v;break e}n(y,S);break}else t(y,S);S=S.sibling}w.type===uf?(v=Rc(w.props.children,y.mode,C,w.key),v.return=y,y=v):(C=Fb(w.type,w.key,w.props,null,y.mode,C),C.ref=kp(y,v,w),C.return=y,y=C)}return s(y);case lf:e:{for(S=w.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),v=o(v,w.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=BS(w,y.mode,C),v.return=y,y=v}return s(y);case Kl:return S=w._init,b(y,v,S(w._payload),C)}if(Yp(w))return p(y,v,w,C);if(Sp(w))return g(y,v,w,C);Av(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),v=o(v,w),v.return=y,y=v):(n(y,v),v=VS(w,y.mode,C),v.return=y,y=v),s(y)):n(y,v)}return b}var ah=K5(!0),Q5=K5(!1),cy={},da=Bu(cy),fg=Bu(cy),hg=Bu(cy);function mc(e){if(e===cy)throw Error(De(174));return e}function mP(e,t){switch(pn(hg,t),pn(fg,e),pn(da,cy),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:VE(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=VE(t,e)}Sn(da),pn(da,t)}function lh(){Sn(da),Sn(fg),Sn(hg)}function Y5(e){mc(hg.current);var t=mc(da.current),n=VE(t,e.type);t!==n&&(pn(fg,e),pn(da,n))}function gP(e){fg.current===e&&(Sn(da),Sn(fg))}var Mn=Bu(0);function V0(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var MS=[];function yP(){for(var e=0;e<MS.length;e++)MS[e]._workInProgressVersionPrimary=null;MS.length=0}var Rb=_l.ReactCurrentDispatcher,DS=_l.ReactCurrentBatchConfig,Wc=0,$n=null,hr=null,Cr=null,B0=!1,Am=!1,pg=0,QY=0;function Wr(){throw Error(De(321))}function vP(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rs(e[n],t[n]))return!1;return!0}function bP(e,t,n,r,o,i){if(Wc=i,$n=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Rb.current=e===null||e.memoizedState===null?ZY:eX,e=n(r,o),Am){i=0;do{if(Am=!1,pg=0,25<=i)throw Error(De(301));i+=1,Cr=hr=null,t.updateQueue=null,Rb.current=tX,e=n(r,o)}while(Am)}if(Rb.current=j0,t=hr!==null&&hr.next!==null,Wc=0,Cr=hr=$n=null,B0=!1,t)throw Error(De(300));return e}function wP(){var e=pg!==0;return pg=0,e}function Us(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Cr===null?$n.memoizedState=Cr=e:Cr=Cr.next=e,Cr}function Yi(){if(hr===null){var e=$n.alternate;e=e!==null?e.memoizedState:null}else e=hr.next;var t=Cr===null?$n.memoizedState:Cr.next;if(t!==null)Cr=t,hr=e;else{if(e===null)throw Error(De(310));hr=e,e={memoizedState:hr.memoizedState,baseState:hr.baseState,baseQueue:hr.baseQueue,queue:hr.queue,next:null},Cr===null?$n.memoizedState=Cr=e:Cr=Cr.next=e}return Cr}function mg(e,t){return typeof t=="function"?t(e):t}function $S(e){var t=Yi(),n=t.queue;if(n===null)throw Error(De(311));n.lastRenderedReducer=e;var r=hr,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var a=s=null,l=null,u=i;do{var c=u.lane;if((Wc&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,$n.lanes|=c,Gc|=c}u=u.next}while(u!==null&&u!==i);l===null?s=r:l.next=a,Rs(r,t.memoizedState)||(zo=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,$n.lanes|=i,Gc|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function FS(e){var t=Yi(),n=t.queue;if(n===null)throw Error(De(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Rs(i,t.memoizedState)||(zo=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function X5(){}function J5(e,t){var n=$n,r=Yi(),o=t(),i=!Rs(r.memoizedState,o);if(i&&(r.memoizedState=o,zo=!0),r=r.queue,CP(tj.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Cr!==null&&Cr.memoizedState.tag&1){if(n.flags|=2048,gg(9,ej.bind(null,n,r,o,t),void 0,null),xr===null)throw Error(De(349));Wc&30||Z5(n,t,o)}return o}function Z5(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$n.updateQueue,t===null?(t={lastEffect:null,stores:null},$n.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ej(e,t,n,r){t.value=n,t.getSnapshot=r,nj(t)&&rj(e)}function tj(e,t,n){return n(function(){nj(t)&&rj(e)})}function nj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rs(e,n)}catch{return!0}}function rj(e){var t=pl(e,1);t!==null&&As(t,e,1,-1)}function KM(e){var t=Us();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mg,lastRenderedState:e},t.queue=e,e=e.dispatch=JY.bind(null,$n,e),[t.memoizedState,e]}function gg(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=$n.updateQueue,t===null?(t={lastEffect:null,stores:null},$n.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function oj(){return Yi().memoizedState}function Ob(e,t,n,r){var o=Us();$n.flags|=e,o.memoizedState=gg(1|t,n,void 0,r===void 0?null:r)}function oC(e,t,n,r){var o=Yi();r=r===void 0?null:r;var i=void 0;if(hr!==null){var s=hr.memoizedState;if(i=s.destroy,r!==null&&vP(r,s.deps)){o.memoizedState=gg(t,n,i,r);return}}$n.flags|=e,o.memoizedState=gg(1|t,n,i,r)}function QM(e,t){return Ob(8390656,8,e,t)}function CP(e,t){return oC(2048,8,e,t)}function ij(e,t){return oC(4,2,e,t)}function sj(e,t){return oC(4,4,e,t)}function aj(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lj(e,t,n){return n=n!=null?n.concat([e]):null,oC(4,4,aj.bind(null,t,e),n)}function xP(){}function uj(e,t){var n=Yi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vP(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function cj(e,t){var n=Yi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vP(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function dj(e,t,n){return Wc&21?(Rs(n,t)||(n=p5(),$n.lanes|=n,Gc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,zo=!0),e.memoizedState=n)}function YY(e,t){var n=rn;rn=n!==0&&4>n?n:4,e(!0);var r=DS.transition;DS.transition={};try{e(!1),t()}finally{rn=n,DS.transition=r}}function fj(){return Yi().memoizedState}function XY(e,t,n){var r=_u(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hj(e))pj(t,n);else if(n=H5(e,t,n,r),n!==null){var o=Io();As(n,e,r,o),mj(n,t,r)}}function JY(e,t,n){var r=_u(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hj(e))pj(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Rs(a,s)){var l=t.interleaved;l===null?(o.next=o,hP(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=H5(e,t,o,r),n!==null&&(o=Io(),As(n,e,r,o),mj(n,t,r))}}function hj(e){var t=e.alternate;return e===$n||t!==null&&t===$n}function pj(e,t){Am=B0=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mj(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zk(e,n)}}var j0={readContext:Qi,useCallback:Wr,useContext:Wr,useEffect:Wr,useImperativeHandle:Wr,useInsertionEffect:Wr,useLayoutEffect:Wr,useMemo:Wr,useReducer:Wr,useRef:Wr,useState:Wr,useDebugValue:Wr,useDeferredValue:Wr,useTransition:Wr,useMutableSource:Wr,useSyncExternalStore:Wr,useId:Wr,unstable_isNewReconciler:!1},ZY={readContext:Qi,useCallback:function(e,t){return Us().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:QM,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ob(4194308,4,aj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ob(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ob(4,2,e,t)},useMemo:function(e,t){var n=Us();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Us();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=XY.bind(null,$n,e),[r.memoizedState,e]},useRef:function(e){var t=Us();return e={current:e},t.memoizedState=e},useState:KM,useDebugValue:xP,useDeferredValue:function(e){return Us().memoizedState=e},useTransition:function(){var e=KM(!1),t=e[0];return e=YY.bind(null,e[1]),Us().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$n,o=Us();if(Pn){if(n===void 0)throw Error(De(407));n=n()}else{if(n=t(),xr===null)throw Error(De(349));Wc&30||Z5(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,QM(tj.bind(null,r,i,e),[e]),r.flags|=2048,gg(9,ej.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Us(),t=xr.identifierPrefix;if(Pn){var n=Za,r=Ja;n=(r&~(1<<32-Is(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pg++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=QY++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},eX={readContext:Qi,useCallback:uj,useContext:Qi,useEffect:CP,useImperativeHandle:lj,useInsertionEffect:ij,useLayoutEffect:sj,useMemo:cj,useReducer:$S,useRef:oj,useState:function(){return $S(mg)},useDebugValue:xP,useDeferredValue:function(e){var t=Yi();return dj(t,hr.memoizedState,e)},useTransition:function(){var e=$S(mg)[0],t=Yi().memoizedState;return[e,t]},useMutableSource:X5,useSyncExternalStore:J5,useId:fj,unstable_isNewReconciler:!1},tX={readContext:Qi,useCallback:uj,useContext:Qi,useEffect:CP,useImperativeHandle:lj,useInsertionEffect:ij,useLayoutEffect:sj,useMemo:cj,useReducer:FS,useRef:oj,useState:function(){return FS(mg)},useDebugValue:xP,useDeferredValue:function(e){var t=Yi();return hr===null?t.memoizedState=e:dj(t,hr.memoizedState,e)},useTransition:function(){var e=FS(mg)[0],t=Yi().memoizedState;return[e,t]},useMutableSource:X5,useSyncExternalStore:J5,useId:fj,unstable_isNewReconciler:!1};function uh(e,t){try{var n="",r=t;do n+=PQ(r),r=r.return;while(r);var o=n}catch(i){o=`
52Error generating stack: `+i.message+`
53`+i.stack}return{value:e,source:t,stack:o,digest:null}}function LS(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function lI(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var nX=typeof WeakMap=="function"?WeakMap:Map;function gj(e,t,n){n=sl(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){U0||(U0=!0,vI=r),lI(e,t)},n}function yj(e,t,n){n=sl(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){lI(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){lI(e,t),typeof r!="function"&&(Su===null?Su=new Set([this]):Su.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function YM(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new nX;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=gX.bind(null,e,t,n),t.then(e,e))}function XM(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function JM(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=sl(-1,1),t.tag=2,xu(n,t,1))),n.lanes|=1),e)}var rX=_l.ReactCurrentOwner,zo=!1;function wo(e,t,n,r){t.child=e===null?Q5(t,null,n,r):ah(t,e.child,n,r)}function ZM(e,t,n,r,o){n=n.render;var i=t.ref;return Df(t,o),r=bP(e,t,n,r,i,o),n=wP(),e!==null&&!zo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ml(e,t,o)):(Pn&&n&&aP(t),t.flags|=1,wo(e,t,r,o),t.child)}function eD(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!TP(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,vj(e,t,i,r,o)):(e=Fb(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:lg,n(s,r)&&e.ref===t.ref)return ml(e,t,o)}return t.flags|=1,e=Eu(i,r),e.ref=t.ref,e.return=t,t.child=e}function vj(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(lg(i,r)&&e.ref===t.ref)if(zo=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(zo=!0);else return t.lanes=e.lanes,ml(e,t,o)}return uI(e,t,n,r,o)}function bj(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},pn(bf,ni),ni|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,pn(bf,ni),ni|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,pn(bf,ni),ni|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,pn(bf,ni),ni|=r;return wo(e,t,o,n),t.child}function wj(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function uI(e,t,n,r,o){var i=Wo(n)?Uc:co.current;return i=ih(t,i),Df(t,o),n=bP(e,t,n,r,i,o),r=wP(),e!==null&&!zo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ml(e,t,o)):(Pn&&r&&aP(t),t.flags|=1,wo(e,t,n,o),t.child)}function tD(e,t,n,r,o){if(Wo(n)){var i=!0;M0(t)}else i=!1;if(Df(t,o),t.stateNode===null)Mb(e,t),q5(t,n,r),aI(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Qi(u):(u=Wo(n)?Uc:co.current,u=ih(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&GM(t,s,r,u),Ql=!1;var f=t.memoizedState;s.state=f,N0(t,r,s,o),l=t.memoizedState,a!==r||f!==l||Ho.current||Ql?(typeof c=="function"&&(sI(t,n,c,r),l=t.memoizedState),(a=Ql||WM(t,n,a,r,f,l,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,W5(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:ms(t.type,a),s.props=u,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Qi(l):(l=Wo(n)?Uc:co.current,l=ih(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&GM(t,s,r,l),Ql=!1,f=t.memoizedState,s.state=f,N0(t,r,s,o);var p=t.memoizedState;a!==d||f!==p||Ho.current||Ql?(typeof h=="function"&&(sI(t,n,h,r),p=t.memoizedState),(u=Ql||WM(t,n,u,r,f,p,l)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return cI(e,t,n,r,i,o)}function cI(e,t,n,r,o,i){wj(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&BM(t,n,!1),ml(e,t,i);r=t.stateNode,rX.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=ah(t,e.child,null,i),t.child=ah(t,null,a,i)):wo(e,t,a,i),t.memoizedState=r.state,o&&BM(t,n,!0),t.child}function Cj(e){var t=e.stateNode;t.pendingContext?VM(e,t.pendingContext,t.pendingContext!==t.context):t.context&&VM(e,t.context,!1),mP(e,t.containerInfo)}function nD(e,t,n,r,o){return sh(),uP(o),t.flags|=256,wo(e,t,n,r),t.child}var dI={dehydrated:null,treeContext:null,retryLane:0};function fI(e){return{baseLanes:e,cachePool:null,transitions:null}}function xj(e,t,n){var r=t.pendingProps,o=Mn.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),pn(Mn,o&1),e===null)return oI(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=aC(s,r,0,null),e=Rc(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=fI(n),t.memoizedState=dI,e):SP(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return oX(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Eu(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=Eu(a,i):(i=Rc(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?fI(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=dI,r}return i=e.child,e=i.sibling,r=Eu(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function SP(e,t){return t=aC({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function kv(e,t,n,r){return r!==null&&uP(r),ah(t,e.child,null,n),e=SP(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oX(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=LS(Error(De(422))),kv(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=aC({mode:"visible",children:r.children},o,0,null),i=Rc(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&ah(t,e.child,null,s),t.child.memoizedState=fI(s),t.memoizedState=dI,i);if(!(t.mode&1))return kv(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(De(419)),r=LS(i,r,void 0),kv(e,t,s,r)}if(a=(s&e.childLanes)!==0,zo||a){if(r=xr,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,pl(e,o),As(r,e,o,-1))}return PP(),r=LS(Error(De(421))),kv(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=yX.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,ai=Cu(o.nextSibling),hi=t,Pn=!0,ws=null,e!==null&&(Fi[Li++]=Ja,Fi[Li++]=Za,Fi[Li++]=Hc,Ja=e.id,Za=e.overflow,Hc=t),t=SP(t,r.children),t.flags|=4096,t)}function rD(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),iI(e.return,t,n)}function NS(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Sj(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(wo(e,t,r.children,n),r=Mn.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rD(e,n,t);else if(e.tag===19)rD(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(pn(Mn,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&V0(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),NS(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&V0(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}NS(t,!0,n,null,i);break;case"together":NS(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Mb(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ml(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gc|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(De(153));
vendor: 4,747 bytes, line 53
53if(t.child!==null){for(e=t.child,n=Eu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Eu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function iX(e,t,n){switch(t.tag){case 3:Cj(t),sh();break;case 5:Y5(t);break;case 1:Wo(t.type)&&M0(t);break;case 4:mP(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;pn(F0,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(pn(Mn,Mn.current&1),t.flags|=128,null):n&t.child.childLanes?xj(e,t,n):(pn(Mn,Mn.current&1),e=ml(e,t,n),e!==null?e.sibling:null);pn(Mn,Mn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Sj(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),pn(Mn,Mn.current),r)break;return null;case 22:case 23:return t.lanes=0,bj(e,t,n)}return ml(e,t,n)}var _j,hI,Ej,Ij;_j=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};hI=function(){};Ej=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,mc(da.current);var i=null;switch(n){case"input":o=$E(e,o),r=$E(e,r),i=[];break;case"select":o=Fn({},o,{value:void 0}),r=Fn({},r,{value:void 0}),i=[];break;case"textarea":o=NE(e,o),r=NE(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=R0)}BE(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(tg.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(tg.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&yn("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Ij=function(e,t,n,r){n!==r&&(t.flags|=4)};function Pp(e,t){if(!Pn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function sX(e,t,n){var r=t.pendingProps;switch(lP(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gr(t),null;case 1:return Wo(t.type)&&O0(),Gr(t),null;case 3:return r=t.stateNode,lh(),Sn(Ho),Sn(co),yP(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Iv(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ws!==null&&(CI(ws),ws=null))),hI(e,t),Gr(t),null;case 5:gP(t);var o=mc(hg.current);if(n=t.type,e!==null&&t.stateNode!=null)Ej(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(De(166));return Gr(t),null}if(e=mc(da.current),Iv(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Js]=t,r[dg]=i,e=(t.mode&1)!==0,n){case"dialog":yn("cancel",r),yn("close",r);break;case"iframe":case"object":case"embed":yn("load",r);break;case"video":case"audio":for(o=0;o<Jp.length;o++)yn(Jp[o],r);break;case"source":yn("error",r);break;case"img":case"image":case"link":yn("error",r),yn("load",r);break;case"details":yn("toggle",r);break;case"input":fM(r,i),yn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},yn("invalid",r);break;case"textarea":pM(r,i),yn("invalid",r)}BE(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];
vendor: 18,947 bytes, line 53
53s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Ev(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Ev(r.textContent,a,e),o=["children",""+a]):tg.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&yn("scroll",r)}switch(n){case"input":yv(r),hM(r,i,!0);break;case"textarea":yv(r),mM(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=R0)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ZB(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Js]=t,e[dg]=r,_j(e,t,!1,!1),t.stateNode=e;e:{switch(s=jE(n,r),n){case"dialog":yn("cancel",e),yn("close",e),o=r;break;case"iframe":case"object":case"embed":yn("load",e),o=r;break;case"video":case"audio":for(o=0;o<Jp.length;o++)yn(Jp[o],e);o=r;break;case"source":yn("error",e),o=r;break;case"img":case"image":case"link":yn("error",e),yn("load",e),o=r;break;case"details":yn("toggle",e),o=r;break;case"input":fM(e,r),o=$E(e,r),yn("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Fn({},r,{value:void 0}),yn("invalid",e);break;case"textarea":pM(e,r),o=NE(e,r),yn("invalid",e);break;default:o=r}BE(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?n5(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&e5(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ng(e,l):typeof l=="number"&&ng(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(tg.hasOwnProperty(i)?l!=null&&i==="onScroll"&&yn("scroll",e):l!=null&&qk(e,i,l,s))}switch(n){case"input":yv(e),hM(e,r,!1);break;case"textarea":yv(e),mM(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Tu(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Tf(e,!!r.multiple,i,!1):r.defaultValue!=null&&Tf(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=R0)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Gr(t),null;case 6:if(e&&t.stateNode!=null)Ij(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(De(166));if(n=mc(hg.current),mc(da.current),Iv(t)){if(r=t.stateNode,n=t.memoizedProps,r[Js]=t,(i=r.nodeValue!==n)&&(e=hi,e!==null))switch(e.tag){case 3:Ev(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ev(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Js]=t,t.stateNode=r}return Gr(t),null;case 13:if(Sn(Mn),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pn&&ai!==null&&t.mode&1&&!(t.flags&128))U5(),sh(),t.flags|=98560,i=!1;else if(i=Iv(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(De(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(De(317));i[Js]=t}else sh(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gr(t),i=!1}else ws!==null&&(CI(ws),ws=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Mn.current&1?pr===0&&(pr=3):PP())),t.updateQueue!==null&&(t.flags|=4),Gr(t),null);case 4:return lh(),hI(e,t),e===null&&ug(t.stateNode.containerInfo),Gr(t),null;case 10:return fP(t.type._context),Gr(t),null;case 17:return Wo(t.type)&&O0(),Gr(t),null;case 19:if(Sn(Mn),i=t.memoizedState,i===null)return Gr(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Pp(i,!1);else{if(pr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=V0(e),s!==null){for(t.flags|=128,Pp(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return pn(Mn,Mn.current&1|2),t.child}e=e.sibling}i.tail!==null&&Kn()>ch&&(t.flags|=128,r=!0,Pp(i,!1),t.lanes=4194304)}else{if(!r)if(e=V0(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Pp(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Pn)return Gr(t),null}else 2*Kn()-i.renderingStartTime>ch&&n!==1073741824&&(t.flags|=128,r=!0,Pp(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Kn(),t.sibling=null,n=Mn.current,pn(Mn,r?n&1|2:n&1),t):(Gr(t),null);case 22:case 23:return kP(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ni&1073741824&&(Gr(t),t.subtreeFlags&6&&(t.flags|=8192)):Gr(t),null;case 24:return null;case 25:return null}throw Error(De(156,t.tag))}function aX(e,t){switch(lP(t),t.tag){case 1:return Wo(t.type)&&O0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return lh(),Sn(Ho),Sn(co),yP(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gP(t),null;case 13:if(Sn(Mn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(De(340));sh()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Sn(Mn),null;case 4:return lh(),null;case 10:return fP(t.type._context),null;case 22:case 23:return kP(),null;case 24:return null;default:return null}}var Pv=!1,no=!1,lX=typeof WeakSet=="function"?WeakSet:Set,Xe=null;function vf(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Hn(e,t,r)}else n.current=null}function pI(e,t,n){try{n()}catch(r){Hn(e,t,r)}}var oD=!1;function uX(e,t){if(XE=k0,e=T5(),sP(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(JE={focusedElem:e,selectionRange:n},k0=!1,Xe=t;Xe!==null;)if(t=Xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Xe=e;else for(;Xe!==null;){t=Xe;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,b=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:ms(t.type,g),b);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(De(163))}}catch(C){Hn(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,Xe=e;break}Xe=t.return}return p=oD,oD=!1,p}function km(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&pI(t,n,i)}o=o.next}while(o!==r)}}function iC(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function mI(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Aj(e){var t=e.alternate;t!==null&&(e.alternate=null,Aj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Js],delete t[dg],delete t[tI],delete t[WY],delete t[GY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kj(e){return e.tag===5||e.tag===3||e.tag===4}function iD(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kj(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gI(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=R0));else if(r!==4&&(e=e.child,e!==null))for(gI(e,t,n),e=e.sibling;e!==null;)gI(e,t,n),e=e.sibling}function yI(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(yI(e,t,n),e=e.sibling;e!==null;)yI(e,t,n),e=e.sibling}var Pr=null,bs=!1;function Fl(e,t,n){for(n=n.child;n!==null;)Pj(e,t,n),n=n.sibling}function Pj(e,t,n){if(ca&&typeof ca.onCommitFiberUnmount=="function")try{ca.onCommitFiberUnmount(X1,n)}catch{}switch(n.tag){case 5:no||vf(n,t);case 6:var r=Pr,o=bs;Pr=null,Fl(e,t,n),Pr=r,bs=o,Pr!==null&&(bs?(e=Pr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pr.removeChild(n.stateNode));break;case 18:Pr!==null&&(bs?(e=Pr,n=n.stateNode,e.nodeType===8?RS(e.parentNode,n):e.nodeType===1&&RS(e,n),sg(e)):RS(Pr,n.stateNode));break;case 4:r=Pr,o=bs,Pr=n.stateNode.containerInfo,bs=!0,Fl(e,t,n),Pr=r,bs=o;break;case 0:case 11:case 14:case 15:if(!no&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&pI(n,t,s),o=o.next}while(o!==r)}Fl(e,t,n);break;case 1:if(!no&&(vf(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Hn(n,t,a)}Fl(e,t,n);break;case 21:Fl(e,t,n);break;case 22:n.mode&1?(no=(r=no)||n.memoizedState!==null,Fl(e,t,n),no=r):Fl(e,t,n);break;default:Fl(e,t,n)}}function sD(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new lX),t.forEach(function(r){var o=vX.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function ls(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Pr=a.stateNode,bs=!1;break e;case 3:Pr=a.stateNode.containerInfo,bs=!0;break e;case 4:Pr=a.stateNode.containerInfo,bs=!0;break e}a=a.return}if(Pr===null)throw Error(De(160));Pj(i,s,o),Pr=null,bs=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(u){Hn(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Tj(t,e),t=t.sibling}function Tj(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ls(t,e),Bs(e),r&4){try{km(3,e,e.return),iC(3,e)}catch(g){Hn(e,e.return,g)}try{km(5,e,e.return)}catch(g){Hn(e,e.return,g)}}break;case 1:ls(t,e),Bs(e),r&512&&n!==null&&vf(n,n.return);break;case 5:if(ls(t,e),Bs(e),r&512&&n!==null&&vf(n,n.return),e.flags&32){var o=e.stateNode;try{ng(o,"")}catch(g){Hn(e,e.return,g)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&XB(o,i),jE(a,s);var u=jE(a,i);for(s=0;s<l.length;s+=2){var c=l[s],d=l[s+1];c==="style"?n5(o,d):c==="dangerouslySetInnerHTML"?e5(o,d):c==="children"?ng(o,d):qk(o,c,d,u)}switch(a){case"input":FE(o,i);break;case"textarea":JB(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Tf(o,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?Tf(o,!!i.multiple,i.defaultValue,!0):Tf(o,!!i.multiple,i.multiple?[]:"",!1))}o[dg]=i}catch(g){Hn(e,e.return,g)}}break;case 6:if(ls(t,e),Bs(e),r&4){if(e.stateNode===null)throw Error(De(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){Hn(e,e.return,g)}}break;case 3:if(ls(t,e),Bs(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{sg(t.containerInfo)}catch(g){Hn(e,e.return,g)}break;case 4:ls(t,e),Bs(e);break;case 13:ls(t,e),Bs(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(IP=Kn())),r&4&&sD(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(no=(u=no)||c,ls(t,e),no=u):ls(t,e),Bs(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Xe=e,c=e.child;c!==null;){for(d=Xe=c;Xe!==null;){switch(f=Xe,h=f.child,f.tag){case 0:case 11:case 14:case 15:km(4,f,f.return);break;case 1:vf(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){Hn(r,n,g)}}break;case 5:vf(f,f.return);break;case 22:if(f.memoizedState!==null){lD(d);continue}}h!==null?(h.return=f,Xe=h):lD(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=t5("display",s))}catch(g){Hn(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){Hn(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ls(t,e),Bs(e),r&4&&sD(e);break;case 21:break;default:ls(t,e),Bs(e)}}function Bs(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(kj(n)){var r=n;break e}n=n.return}throw Error(De(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ng(o,""),r.flags&=-33);var i=iD(e);yI(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=iD(e);gI(e,a,s);break;default:throw Error(De(161))}}catch(l){Hn(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function cX(e,t,n){Xe=e,Rj(e)}function Rj(e,t,n){for(var r=(e.mode&1)!==0;Xe!==null;){var o=Xe,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Pv;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||no;a=Pv;var u=no;if(Pv=s,(no=l)&&!u)for(Xe=o;Xe!==null;)s=Xe,l=s.child,s.tag===22&&s.memoizedState!==null?uD(o):l!==null?(l.return=s,Xe=l):uD(o);for(;i!==null;)Xe=i,Rj(i),i=i.sibling;Xe=o,Pv=a,no=u}aD(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,Xe=i):aD(e)}}function aD(e){for(;Xe!==null;){var t=Xe;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:no||iC(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!no)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ms(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&HM(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}HM(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&sg(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(De(163))}no||t.flags&512&&mI(t)}catch(f){Hn(t,t.return,f)}}if(t===e){Xe=null;break}if(n=t.sibling,n!==null){n.return=t.return,Xe=n;break}Xe=t.return}}function lD(e){for(;Xe!==null;){var t=Xe;if(t===e){Xe=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Xe=n;break}Xe=t.return}}function uD(e){for(;Xe!==null;){var t=Xe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{iC(4,t)}catch(l){Hn(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Hn(t,o,l)}}var i=t.return;try{mI(t)}catch(l){Hn(t,i,l)}break;case 5:var s=t.return;try{mI(t)}catch(l){Hn(t,s,l)}}}catch(l){Hn(t,t.return,l)}if(t===e){Xe=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Xe=a;break}Xe=t.return}}var dX=Math.ceil,z0=_l.ReactCurrentDispatcher,_P=_l.ReactCurrentOwner,Gi=_l.ReactCurrentBatchConfig,Nt=0,xr=null,ar=null,Lr=0,ni=0,bf=Bu(0),pr=0,yg=null,Gc=0,sC=0,EP=0,Pm=null,Fo=null,IP=0,ch=1/0,Qa=null,U0=!1,vI=null,Su=null,Tv=!1,du=null,H0=0,Tm=0,bI=null,Db=-1,$b=0;function Io(){return Nt&6?Kn():Db!==-1?Db:Db=Kn()}function _u(e){return e.mode&1?Nt&2&&Lr!==0?Lr&-Lr:KY.transition!==null?($b===0&&($b=p5()),$b):(e=rn,e!==0||(e=window.event,e=e===void 0?16:C5(e.type)),e):1}function As(e,t,n,r){if(50<Tm)throw Tm=0,bI=null,Error(De(185));ay(e,n,r),(!(Nt&2)||e!==xr)&&(e===xr&&(!(Nt&2)&&(sC|=n),pr===4&&eu(e,Lr)),Go(e,r),n===1&&Nt===0&&!(t.mode&1)&&(ch=Kn()+500,nC&&ju()))}function Go(e,t){var n=e.callbackNode;KQ(e,t);var r=A0(e,e===xr?Lr:0);if(r===0)n!==null&&vM(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vM(n),t===1)e.tag===0?qY(cD.bind(null,e)):B5(cD.bind(null,e)),UY(function(){!(Nt&6)&&ju()}),n=null;else{switch(m5(r)){case 1:n=Jk;break;case 4:n=f5;break;case 16:n=I0;break;case 536870912:n=h5;break;default:n=I0}n=Vj(n,Oj.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Oj(e,t){if(Db=-1,$b=0,Nt&6)throw Error(De(327));var n=e.callbackNode;if($f()&&e.callbackNode!==n)return null;var r=A0(e,e===xr?Lr:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=W0(e,r);else{t=r;var o=Nt;Nt|=2;var i=Dj();(xr!==e||Lr!==t)&&(Qa=null,ch=Kn()+500,Tc(e,t));do try{pX();break}catch(a){Mj(e,a)}while(!0);dP(),z0.current=i,Nt=o,ar!==null?t=0:(xr=null,Lr=0,t=pr)}if(t!==0){if(t===2&&(o=GE(e),o!==0&&(r=o,t=wI(e,o))),t===1)throw n=yg,Tc(e,0),eu(e,r),Go(e,Kn()),n;
vendor: 2,997 bytes, line 53
53if(t===6)eu(e,r);else{if(o=e.current.alternate,!(r&30)&&!fX(o)&&(t=W0(e,r),t===2&&(i=GE(e),i!==0&&(r=i,t=wI(e,i))),t===1))throw n=yg,Tc(e,0),eu(e,r),Go(e,Kn()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(De(345));case 2:rc(e,Fo,Qa);break;case 3:if(eu(e,r),(r&130023424)===r&&(t=IP+500-Kn(),10<t)){if(A0(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Io(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=eI(rc.bind(null,e,Fo,Qa),t);break}rc(e,Fo,Qa);break;case 4:if(eu(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Is(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Kn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dX(r/1960))-r,10<r){e.timeoutHandle=eI(rc.bind(null,e,Fo,Qa),r);break}rc(e,Fo,Qa);break;case 5:rc(e,Fo,Qa);break;default:throw Error(De(329))}}}return Go(e,Kn()),e.callbackNode===n?Oj.bind(null,e):null}function wI(e,t){var n=Pm;return e.current.memoizedState.isDehydrated&&(Tc(e,t).flags|=256),e=W0(e,t),e!==2&&(t=Fo,Fo=n,t!==null&&CI(t)),e}function CI(e){Fo===null?Fo=e:Fo.push.apply(Fo,e)}function fX(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Rs(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function eu(e,t){for(t&=~EP,t&=~sC,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Is(t),r=1<<n;e[n]=-1,t&=~r}}function cD(e){if(Nt&6)throw Error(De(327));$f();var t=A0(e,0);if(!(t&1))return Go(e,Kn()),null;var n=W0(e,t);if(e.tag!==0&&n===2){var r=GE(e);r!==0&&(t=r,n=wI(e,r))}if(n===1)throw n=yg,Tc(e,0),eu(e,t),Go(e,Kn()),n;if(n===6)throw Error(De(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,rc(e,Fo,Qa),Go(e,Kn()),null}function AP(e,t){var n=Nt;Nt|=1;try{return e(t)}finally{Nt=n,Nt===0&&(ch=Kn()+500,nC&&ju())}}function qc(e){du!==null&&du.tag===0&&!(Nt&6)&&$f();var t=Nt;Nt|=1;var n=Gi.transition,r=rn;try{if(Gi.transition=null,rn=1,e)return e()}finally{rn=r,Gi.transition=n,Nt=t,!(Nt&6)&&ju()}}function kP(){ni=bf.current,Sn(bf)}function Tc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,zY(n)),ar!==null)for(n=ar.return;n!==null;){var r=n;switch(lP(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&O0();break;case 3:lh(),Sn(Ho),Sn(co),yP();break;case 5:gP(r);break;case 4:lh();break;case 13:Sn(Mn);break;case 19:Sn(Mn);break;case 10:fP(r.type._context);break;case 22:case 23:kP()}n=n.return}if(xr=e,ar=e=Eu(e.current,null),Lr=ni=t,pr=0,yg=null,EP=sC=Gc=0,Fo=Pm=null,pc!==null){for(t=0;t<pc.length;t++)if(n=pc[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}pc=null}return e}function Mj(e,t){do{var n=ar;
vendor: 9,250 bytes, line 53
53try{if(dP(),Rb.current=j0,B0){for(var r=$n.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}B0=!1}if(Wc=0,Cr=hr=$n=null,Am=!1,pg=0,_P.current=null,n===null||n.return===null){pr=1,yg=t,ar=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Lr,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=XM(s);if(h!==null){h.flags&=-257,JM(h,s,a,i,t),h.mode&1&&YM(i,u,t),t=h,l=u;var p=t.updateQueue;if(p===null){var g=new Set;g.add(l),t.updateQueue=g}else p.add(l);break e}else{if(!(t&1)){YM(i,u,t),PP();break e}l=Error(De(426))}}else if(Pn&&a.mode&1){var b=XM(s);if(b!==null){!(b.flags&65536)&&(b.flags|=256),JM(b,s,a,i,t),uP(uh(l,a));break e}}i=l=uh(l,a),pr!==4&&(pr=2),Pm===null?Pm=[i]:Pm.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=gj(i,l,t);UM(i,y);break e;case 1:a=l;var v=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Su===null||!Su.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var C=yj(i,a,t);UM(i,C);break e}}i=i.return}while(i!==null)}Fj(n)}catch(A){t=A,ar===n&&n!==null&&(ar=n=n.return);continue}break}while(!0)}function Dj(){var e=z0.current;return z0.current=j0,e===null?j0:e}function PP(){(pr===0||pr===3||pr===2)&&(pr=4),xr===null||!(Gc&268435455)&&!(sC&268435455)||eu(xr,Lr)}function W0(e,t){var n=Nt;Nt|=2;var r=Dj();(xr!==e||Lr!==t)&&(Qa=null,Tc(e,t));do try{hX();break}catch(o){Mj(e,o)}while(!0);if(dP(),Nt=n,z0.current=r,ar!==null)throw Error(De(261));return xr=null,Lr=0,pr}function hX(){for(;ar!==null;)$j(ar)}function pX(){for(;ar!==null&&!VQ();)$j(ar)}function $j(e){var t=Nj(e.alternate,e,ni);e.memoizedProps=e.pendingProps,t===null?Fj(e):ar=t,_P.current=null}function Fj(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=aX(n,t),n!==null){n.flags&=32767,ar=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{pr=6,ar=null;return}}else if(n=sX(n,t,ni),n!==null){ar=n;return}if(t=t.sibling,t!==null){ar=t;return}ar=t=e}while(t!==null);pr===0&&(pr=5)}function rc(e,t,n){var r=rn,o=Gi.transition;try{Gi.transition=null,rn=1,mX(e,t,n,r)}finally{Gi.transition=o,rn=r}return null}function mX(e,t,n,r){do $f();while(du!==null);if(Nt&6)throw Error(De(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(De(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(QQ(e,i),e===xr&&(ar=xr=null,Lr=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Tv||(Tv=!0,Vj(I0,function(){return $f(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Gi.transition,Gi.transition=null;var s=rn;rn=1;var a=Nt;Nt|=4,_P.current=null,uX(e,n),Tj(n,e),$Y(JE),k0=!!XE,JE=XE=null,e.current=n,cX(n),BQ(),Nt=a,rn=s,Gi.transition=i}else e.current=n;if(Tv&&(Tv=!1,du=e,H0=o),i=e.pendingLanes,i===0&&(Su=null),UQ(n.stateNode),Go(e,Kn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(U0)throw U0=!1,e=vI,vI=null,e;return H0&1&&e.tag!==0&&$f(),i=e.pendingLanes,i&1?e===bI?Tm++:(Tm=0,bI=e):Tm=0,ju(),null}function $f(){if(du!==null){var e=m5(H0),t=Gi.transition,n=rn;try{if(Gi.transition=null,rn=16>e?16:e,du===null)var r=!1;else{if(e=du,du=null,H0=0,Nt&6)throw Error(De(331));var o=Nt;for(Nt|=4,Xe=e.current;Xe!==null;){var i=Xe,s=i.child;if(Xe.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(Xe=u;Xe!==null;){var c=Xe;switch(c.tag){case 0:case 11:case 15:km(8,c,i)}var d=c.child;if(d!==null)d.return=c,Xe=d;else for(;Xe!==null;){c=Xe;var f=c.sibling,h=c.return;if(Aj(c),c===u){Xe=null;break}if(f!==null){f.return=h,Xe=f;break}Xe=h}}}var p=i.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}Xe=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,Xe=s;else e:for(;Xe!==null;){if(i=Xe,i.flags&2048)switch(i.tag){case 0:case 11:case 15:km(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,Xe=y;break e}Xe=i.return}}var v=e.current;for(Xe=v;Xe!==null;){s=Xe;var w=s.child;if(s.subtreeFlags&2064&&w!==null)w.return=s,Xe=w;else e:for(s=v;Xe!==null;){if(a=Xe,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:iC(9,a)}}catch(A){Hn(a,a.return,A)}if(a===s){Xe=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,Xe=C;break e}Xe=a.return}}if(Nt=o,ju(),ca&&typeof ca.onPostCommitFiberRoot=="function")try{ca.onPostCommitFiberRoot(X1,e)}catch{}r=!0}return r}finally{rn=n,Gi.transition=t}}return!1}function dD(e,t,n){t=uh(n,t),t=gj(e,t,1),e=xu(e,t,1),t=Io(),e!==null&&(ay(e,1,t),Go(e,t))}function Hn(e,t,n){if(e.tag===3)dD(e,e,n);else for(;t!==null;){if(t.tag===3){dD(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Su===null||!Su.has(r))){e=uh(n,e),e=yj(t,e,1),t=xu(t,e,1),e=Io(),t!==null&&(ay(t,1,e),Go(t,e));break}}t=t.return}}function gX(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Io(),e.pingedLanes|=e.suspendedLanes&n,xr===e&&(Lr&n)===n&&(pr===4||pr===3&&(Lr&130023424)===Lr&&500>Kn()-IP?Tc(e,0):EP|=n),Go(e,t)}function Lj(e,t){t===0&&(e.mode&1?(t=wv,wv<<=1,!(wv&130023424)&&(wv=4194304)):t=1);var n=Io();e=pl(e,t),e!==null&&(ay(e,t,n),Go(e,n))}function yX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Lj(e,n)}function vX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(De(314))}r!==null&&r.delete(t),Lj(e,n)}var Nj;Nj=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ho.current)zo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zo=!1,iX(e,t,n);zo=!!(e.flags&131072)}else zo=!1,Pn&&t.flags&1048576&&j5(t,$0,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Mb(e,t),e=t.pendingProps;var o=ih(t,co.current);Df(t,n),o=bP(null,t,r,e,o,n);var i=wP();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Wo(r)?(i=!0,M0(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,pP(t),o.updater=rC,t.stateNode=o,o._reactInternals=t,aI(t,r,e,n),t=cI(null,t,r,!0,i,n)):(t.tag=0,Pn&&i&&aP(t),wo(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Mb(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=wX(r),e=ms(r,e),o){case 0:t=uI(null,t,r,e,n);break e;case 1:t=tD(null,t,r,e,n);break e;case 11:t=ZM(null,t,r,e,n);break e;case 14:t=eD(null,t,r,ms(r.type,e),n);break e}throw Error(De(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ms(r,o),uI(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ms(r,o),tD(e,t,r,o,n);case 3:e:{if(Cj(t),e===null)throw Error(De(387));r=t.pendingProps,i=t.memoizedState,o=i.element,W5(e,t),N0(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=uh(Error(De(423)),t),t=nD(e,t,r,n,o);break e}else if(r!==o){o=uh(Error(De(424)),t),t=nD(e,t,r,n,o);break e}else for(ai=Cu(t.stateNode.containerInfo.firstChild),hi=t,Pn=!0,ws=null,n=Q5(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(sh(),r===o){t=ml(e,t,n);break e}wo(e,t,r,n)}t=t.child}return t;case 5:return Y5(t),e===null&&oI(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,ZE(r,o)?s=null:i!==null&&ZE(r,i)&&(t.flags|=32),wj(e,t),wo(e,t,s,n),t.child;case 6:return e===null&&oI(t),null;case 13:return xj(e,t,n);case 4:return mP(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ah(t,null,r,n):wo(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ms(r,o),ZM(e,t,r,o,n);case 7:return wo(e,t,t.pendingProps,n),t.child;case 8:return wo(e,t,t.pendingProps.children,n),t.child;case 12:return wo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,pn(F0,r._currentValue),r._currentValue=s,i!==null)if(Rs(i.value,s)){if(i.children===o.children&&!Ho.current){t=ml(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=sl(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),iI(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(De(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),iI(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}wo(e,t,o.children,n),t=t.child}return t;
vendor: 10,668 bytes, line 53
53case 9:return o=t.type,r=t.pendingProps.children,Df(t,n),o=Qi(o),r=r(o),t.flags|=1,wo(e,t,r,n),t.child;case 14:return r=t.type,o=ms(r,t.pendingProps),o=ms(r.type,o),eD(e,t,r,o,n);case 15:return vj(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ms(r,o),Mb(e,t),t.tag=1,Wo(r)?(e=!0,M0(t)):e=!1,Df(t,n),q5(t,r,o),aI(t,r,o,n),cI(null,t,r,!0,e,n);case 19:return Sj(e,t,n);case 22:return bj(e,t,n)}throw Error(De(156,t.tag))};function Vj(e,t){return d5(e,t)}function bX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zi(e,t,n,r){return new bX(e,t,n,r)}function TP(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wX(e){if(typeof e=="function")return TP(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qk)return 11;if(e===Yk)return 14}return 2}function Eu(e,t){var n=e.alternate;return n===null?(n=zi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Fb(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")TP(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case uf:return Rc(n.children,o,i,t);case Kk:s=8,o|=8;break;case RE:return e=zi(12,n,t,o|2),e.elementType=RE,e.lanes=i,e;case OE:return e=zi(13,n,t,o),e.elementType=OE,e.lanes=i,e;case ME:return e=zi(19,n,t,o),e.elementType=ME,e.lanes=i,e;case KB:return aC(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case GB:s=10;break e;case qB:s=9;break e;case Qk:s=11;break e;case Yk:s=14;break e;case Kl:s=16,r=null;break e}throw Error(De(130,e==null?e:typeof e,""))}return t=zi(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Rc(e,t,n,r){return e=zi(7,e,r,t),e.lanes=n,e}function aC(e,t,n,r){return e=zi(22,e,r,t),e.elementType=KB,e.lanes=n,e.stateNode={isHidden:!1},e}function VS(e,t,n){return e=zi(6,e,null,t),e.lanes=n,e}function BS(e,t,n){return t=zi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function CX(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wS(0),this.expirationTimes=wS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wS(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function RP(e,t,n,r,o,i,s,a,l){return e=new CX(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=zi(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pP(i),e}function xX(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lf,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Bj(e){if(!e)return Ru;e=e._reactInternals;e:{if(pd(e)!==e||e.tag!==1)throw Error(De(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Wo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(De(171))}if(e.tag===1){var n=e.type;if(Wo(n))return V5(e,n,t)}return t}function jj(e,t,n,r,o,i,s,a,l){return e=RP(n,r,!0,e,o,i,s,a,l),e.context=Bj(null),n=e.current,r=Io(),o=_u(n),i=sl(r,o),i.callback=t??null,xu(n,i,o),e.current.lanes=o,ay(e,o,r),Go(e,r),e}function lC(e,t,n,r){var o=t.current,i=Io(),s=_u(o);return n=Bj(n),t.context===null?t.context=n:t.pendingContext=n,t=sl(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xu(o,t,s),e!==null&&(As(e,o,s,i),Tb(e,o,s)),s}function G0(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function fD(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function OP(e,t){fD(e,t),(e=e.alternate)&&fD(e,t)}function SX(){return null}var zj=typeof reportError=="function"?reportError:function(e){console.error(e)};function MP(e){this._internalRoot=e}uC.prototype.render=MP.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(De(409));lC(e,t,null,null)};uC.prototype.unmount=MP.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qc(function(){lC(null,e,null,null)}),t[hl]=null}};function uC(e){this._internalRoot=e}uC.prototype.unstable_scheduleHydration=function(e){if(e){var t=v5();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Zl.length&&t!==0&&t<Zl[n].priority;n++);Zl.splice(n,0,e),n===0&&w5(e)}};function DP(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hD(){}function _X(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=G0(s);i.call(u)}}var s=jj(t,r,e,0,null,!1,!1,"",hD);return e._reactRootContainer=s,e[hl]=s.current,ug(e.nodeType===8?e.parentNode:e),qc(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var u=G0(l);a.call(u)}}var l=RP(e,0,!1,null,null,!1,!1,"",hD);return e._reactRootContainer=l,e[hl]=l.current,ug(e.nodeType===8?e.parentNode:e),qc(function(){lC(t,l,n,r)}),l}function dC(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=G0(s);a.call(l)}}lC(t,s,e,o)}else s=_X(n,t,e,o,r);return G0(s)}g5=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Xp(t.pendingLanes);n!==0&&(Zk(t,n|1),Go(t,Kn()),!(Nt&6)&&(ch=Kn()+500,ju()))}break;case 13:qc(function(){var r=pl(e,1);if(r!==null){var o=Io();As(r,e,1,o)}}),OP(e,1)}};eP=function(e){if(e.tag===13){var t=pl(e,134217728);if(t!==null){var n=Io();As(t,e,134217728,n)}OP(e,134217728)}};y5=function(e){if(e.tag===13){var t=_u(e),n=pl(e,t);if(n!==null){var r=Io();As(n,e,t,r)}OP(e,t)}};v5=function(){return rn};b5=function(e,t){var n=rn;try{return rn=e,t()}finally{rn=n}};UE=function(e,t,n){switch(t){case"input":if(FE(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=tC(r);if(!o)throw Error(De(90));YB(r),FE(r,o)}}}break;case"textarea":JB(e,n);break;case"select":t=n.value,t!=null&&Tf(e,!!n.multiple,t,!1)}};i5=AP;s5=qc;var EX={usingClientEntryPoint:!1,Events:[uy,hf,tC,r5,o5,AP]},Tp={findFiberByHostInstance:hc,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},IX={bundleType:Tp.bundleType,version:Tp.version,rendererPackageName:Tp.rendererPackageName,rendererConfig:Tp.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_l.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=u5(e),e===null?null:e.stateNode},findFiberByHostInstance:Tp.findFiberByHostInstance||SX,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rv.isDisabled&&Rv.supportsFiber)try{X1=Rv.inject(IX),ca=Rv}catch{}}_i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=EX;_i.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!DP(t))throw Error(De(200));return xX(e,t,null,n)};_i.createRoot=function(e,t){if(!DP(e))throw Error(De(299));var n=!1,r="",o=zj;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=RP(e,1,!1,null,null,n,!1,r,o),e[hl]=t.current,ug(e.nodeType===8?e.parentNode:e),new MP(t)};_i.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(De(188)):(e=Object.keys(e).join(","),Error(De(268,e)));return e=u5(t),e=e===null?null:e.stateNode,e};_i.flushSync=function(e){return qc(e)};_i.hydrate=function(e,t,n){if(!cC(t))throw Error(De(200));return dC(null,e,t,!0,n)};_i.hydrateRoot=function(e,t,n){if(!DP(e))throw Error(De(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=zj;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=jj(t,null,e,1,n??null,o,!1,i,s),e[hl]=t.current,ug(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new uC(t)};_i.render=function(e,t,n){if(!cC(t))throw Error(De(200));return dC(null,e,t,!1,n)};_i.unmountComponentAtNode=function(e){if(!cC(e))throw Error(De(40));return e._reactRootContainer?(qc(function(){dC(null,null,e,!1,function(){e._reactRootContainer=null,e[hl]=null})}),!0):!1};_i.unstable_batchedUpdates=AP;_i.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!cC(n))throw Error(De(200));if(e==null||e._reactInternals===void 0)throw Error(De(38));return dC(e,t,n,!1,r)};_i.version="18.2.0-next-9e3b772b8-20220608";function Uj(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uj)}catch(e){console.error(e)}}Uj(),jB.exports=_i;var md=jB.exports;const Ov=Fh(md);var pD=md;PE.createRoot=pD.createRoot,PE.hydrateRoot=pD.hydrateRoot;const AX="modulepreload",kX=function(e){return"/"+e},mD={}
53,Nn=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.all(n.map(l=>{if(l=kX(l),l in mD)return;mD[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!r)for(let h=i.length-1;h>=0;h--){const p=i[h];if(p.href===l&&(!u||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":AX,u||(f.as="script",f.crossOrigin=""),f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}return o.then(()=>t()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})},PX={black:"#000",white:"#fff"},vg=PX,TX={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Od=TX,RX={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Md=RX,OX={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Dd=OX,MX={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},$d=MX,DX={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Fd=DX,$X={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Rp=$X,FX={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},LX=FX;function gl(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const NX=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),Kc="$$material";function de(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var VX=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRen
vendor: 4,939 bytes, line 53
53dering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,BX=PB(function(e){return VX.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),jX=function(t,n){var r=arguments;if(n==null||!sy.call(n,"css"))return m.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Hk,i[1]=Uk(t,n);for(var s=2;s<o;s++)i[s]=r[s];return m.createElement.apply(null,i)},zX=zk(function(e,t){var n=e.styles,r=Y1([n],void 0,m.useContext(Vh)),o=m.useRef();return lM(function(){var i=t.key+"-global",s=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,l=document.querySelector('style[data-emotion="'+i+" "+r.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),l!==null&&(a=!0,l.setAttribute("data-emotion",i),s.hydrate([l])),o.current=[s,a],function(){s.flush()}},[t]),lM(function(){var i=o.current,s=i[0],a=i[1];if(a){i[1]=!1;return}if(r.next!==void 0&&jk(t,r.next,!0),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush()}t.insert("",r,s,!1)},[t,r.name]),null});function Qc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Y1(t)}var El=function(){var t=Qc.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},UX=BX,HX=function(t){return t!=="theme"},gD=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?UX:HX},yD=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},WX=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Bk(n,r,o),VB(function(){return jk(n,r,o)}),null},GX=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,s;n!==void 0&&(i=n.label,s=n.target);var a=yD(t,n,r),l=a||gD(o),u=!l("as");return function(){var c=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,h=1;h<f;h++)d.push(c[h],c[0][h])}var p=zk(function(g,b,y){var v=u&&g.as||o,w="",C=[],A=g;if(g.theme==null){A={};for(var S in g)A[S]=g[S];A.theme=m.useContext(Vh)}typeof g.className=="string"?w=FB(b.registered,C,g.className):g.className!=null&&(w=g.className+" ");var _=Y1(d.concat(C),b.registered,A);w+=b.key+"-"+_.name,s!==void 0&&(w+=" "+s);var k=u&&a===void 0?gD(v):l,M={};for(var R in g)u&&R==="as"||k(R)&&(M[R]=g[R]);return M.className=w,M.ref=y,m.createElement(m.Fragment,null,m.createElement(WX,{cache:b,serialized:_,isStringTag:typeof v=="string"}),m.createElement(v,M))});
53return p.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=d,p.__emotion_forwardProp=a,Object.defineProperty(p,"toString",{value:function(){return"."+s}}),p.withComponent=function(g,b){return e(g,x({},n,b,{shouldForwardProp:yD(p,b,!0)})).apply(void 0,d)},p}},qX=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],xI=GX.bind();qX.forEach(function(e){xI[e]=xI(e)});var Hj={exports:{}},KX="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",QX=KX,YX=QX;function Wj(){}function Gj(){}Gj.resetWarningCache=Wj;var XX=function(){function e(r,o,i,s,a,l){if(l!==YX){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Gj,resetWarningCache:Wj};return n.PropTypes=n,n};Hj.exports=XX();var qj=Hj.exports;const ce=Fh(qj);let SI;typeof document=="object"&&(SI=RB({key:"css",prepend:!0}));function JX(e){const{injectFirst:t,children:n}=e;return t&&SI?T.jsx(CQ,{value:SI,children:n}):n}function ZX(e){return e==null||Object.keys(e).length===0}function Kj(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(ZX(o)?n:o):t;return T.jsx(zX,{styles:r})}function $P(e,t){return xI(e,t)}const Qj=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},eJ=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Kj,StyledEngineProvider:JX,ThemeContext:Vh,css:Qc,default:$P,internal_processStyles:Qj,keyframes:El},Symbol.toStringTag,{value:"Module"}));function Xa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yj(e){if(!Xa(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Yj(e[n])}),t}function Ao(e,t,n={clone:!0}){const r=n.clone?x({},e):e;return Xa(e)&&Xa(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Xa(t[o])&&o in e&&Xa(e[o])?r[o]=Ao(e[o],t[o],n):n.clone?r[o]=Xa(t[o])?Yj(t[o]):t[o]:r[o]=t[o])}),r}const tJ=Object.freeze(Object.defineProperty({__proto__:null,default:Ao,isPlainObject:Xa},Symbol.toStringTag,{value:"Module"})),nJ=["values","unit","step"],rJ=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>x({},n,{[r.key]:r.val}),{})};function Xj(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=de(e,nJ),i=rJ(t),s=Object.keys(i);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function u(f,h){const p=s.indexOf(h);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(p!==-1&&typeof t[s[p]]=="number"?t[s[p]]:h)-r/100}${n})`}function c(f){return s.indexOf(f)+1<s.length?u(f,s[s.indexOf(f)+1]):a(f)}function d(f){const h=s.indexOf(f);return h===0?a(s[1]):h===s.length-1?l(s[h]):u(f,s[s.indexOf(f)+1]).replace("@media","@media not all and")}return x({keys:s,values:i,up:a,down:l,between:u,only:c,not:d,unit:n},o)}const oJ={borderRadius:4},iJ=oJ;function Rm(e,t){return t?Ao(e,t,{clone:!1}):e}const FP={xs:0,sm:600,md:900,lg:1200,xl:1536},vD={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${FP[e]}px)`};function Xo(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||vD;return t.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const i=r.breakpoints||vD;return Object.keys(t).reduce((s,a)=>
53{if(Object.keys(i.values||FP).indexOf(a)!==-1){const l=i.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function Jj(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function Zj(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function sJ(e,...t){const n=Jj(e),r=[n,...t].reduce((o,i)=>Ao(o,i),{});return Zj(Object.keys(n),r)}function aJ(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i<e.length&&(n[o]=!0)}):r.forEach(o=>{e[o]!=null&&(n[o]=!0)}),n}function Oc({values:e,breakpoints:t,base:n}){const r=n||aJ(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[i],i=a):s[a]=e,s),{})}function ge(e){if(typeof e!="string")throw new Error(gl(7));return e.charAt(0).toUpperCase()+e.slice(1)}const lJ=Object.freeze(Object.defineProperty({__proto__:null,default:ge},Symbol.toStringTag,{value:"Module"}));function dh(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function q0(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=dh(e,n)||r,t&&(o=t(o,r,e)),o}function Xn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,u=dh(l,r)||{};return Xo(s,a,d=>{let f=q0(u,o,d);return d===f&&typeof d=="string"&&(f=q0(u,o,`${t}${d==="default"?"":ge(d)}`,d)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function uJ(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const cJ={m:"margin",p:"padding"},dJ={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},bD={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fJ=uJ(e=>{if(e.length>2)if(bD[e])e=bD[e];else return[e];const[t,n]=e.split(""),r=cJ[t],o=dJ[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),LP=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],NP=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...LP,...NP];function dy(e,t,n,r){var o;const i=(o=dh(e,t,!1))!=null?o:n;return typeof i=="number"?s=>typeof s=="string"?s:i*s:Array.isArray(i)?s=>typeof s=="string"?s:i[s]:typeof i=="function"?i:()=>{}}function VP(e){return dy(e,"spacing",8)}function Yc(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function hJ(e,t){return n=>e.reduce((r,o)=>(r[o]=Yc(t,n),r),{})}function pJ(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=fJ(n),i=hJ(o,r),s=e[n];return Xo(e,s,i)}function ez(e,t){const n=VP(e.theme);return Object.keys(e).map(r=>pJ(e,t,r,n)).reduce(Rm,{})}function jn(e){return ez(e,LP)}jn.propTypes={};jn.filterProps=LP;function zn(e){return ez(e,NP)}zn.propTypes={};zn.filterProps=NP;function mJ(e=8){if(e.mui)return e;const t=VP({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function fC(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?Rm(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Ni(e){return typeof e!="number"?e:`${e}px solid`}function ns(e,t){return Xn({prop:e,themeKey:"borders",transform:t})}const gJ=ns("border",Ni),yJ=ns("borderTop",Ni),vJ=ns("borderRight",Ni),bJ=ns("borderBottom",Ni),wJ=ns("borderLeft",Ni),CJ=ns("borderColor"),xJ=ns("borderTopColor"),SJ=ns("borderRightColor"),_J=ns("borderBottomColor"),EJ=ns("borderLeftColor"),IJ=ns("outline",Ni),AJ=ns("outlineColor"),hC=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=dy(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Yc(t,r)});return Xo(e,e.borderRadius,n)}return null};hC.propTypes={};hC.filterProps=["borderRadius"];fC(gJ,yJ,vJ,bJ,wJ,CJ,xJ,SJ,_J,EJ,hC,IJ,AJ);const pC=e=>{if(e.gap!==void 0&&e.gap!==null){const t=dy(e.theme,"spacing",8),n=r=>({gap:Yc(t,r)});return Xo(e,e.gap,n)}return null};pC.propTypes={};pC.filterProps=["gap"];const mC=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=dy(e.theme,"spacing",8),n=r=>({columnGap:Yc(t,r)});return Xo(e,e.columnGap,n)}return null};mC.propTypes={};mC.filterProps=["columnGap"];const gC=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=dy(e.theme,"spacing",8),n=r=>({rowGap:Yc(t,r)});return Xo(e,e.rowGap,n)}return null};gC.propTypes={};gC.filterProps=["rowGap"];const kJ=Xn({prop:"gridColumn"}),PJ=Xn({prop:"gridRow"}),TJ=Xn({prop:"gridAutoFlow"}),RJ=Xn({prop:"gridAutoColumns"}),OJ=Xn({prop:"gridAutoRows"}),MJ=Xn({prop:"gridTemplateColumns"}),DJ=Xn({prop:"gridTemplateRows"}),$J=Xn({prop:"gridTemplateAreas"}),FJ=Xn({prop:"gridArea"});
53fC(pC,mC,gC,kJ,PJ,TJ,RJ,OJ,MJ,DJ,$J,FJ);function Ff(e,t){return t==="grey"?t:e}const LJ=Xn({prop:"color",themeKey:"palette",transform:Ff}),NJ=Xn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ff}),VJ=Xn({prop:"backgroundColor",themeKey:"palette",transform:Ff});fC(LJ,NJ,VJ);function si(e){return e<=1&&e!==0?`${e*100}%`:e}const BJ=Xn({prop:"width",transform:si}),BP=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const i=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||FP[n];return i?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:si(n)}};return Xo(e,e.maxWidth,t)}return null};BP.filterProps=["maxWidth"];const jJ=Xn({prop:"minWidth",transform:si}),zJ=Xn({prop:"height",transform:si}),UJ=Xn({prop:"maxHeight",transform:si}),HJ=Xn({prop:"minHeight",transform:si});Xn({prop:"size",cssProperty:"width",transform:si});Xn({prop:"size",cssProperty:"height",transform:si});const WJ=Xn({prop:"boxSizing"});fC(BJ,BP,jJ,zJ,UJ,HJ,WJ);const GJ={border:{themeKey:"borders",transform:Ni},borderTop:{themeKey:"borders",transform:Ni},borderRight:{themeKey:"borders",transform:Ni},borderBottom:{themeKey:"borders",transform:Ni},borderLeft:{themeKey:"borders",transform:Ni},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ni},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:hC},color:{themeKey:"palette",transform:Ff},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ff},backgroundColor:{themeKey:"palette",transform:Ff},p:{style:zn},pt:{style:zn},pr:{style:zn},pb:{style:zn},pl:{style:zn},px:{style:zn},py:{style:zn},padding:{style:zn},paddingTop:{style:zn},paddingRight:{style:zn},paddingBottom:{style:zn},paddingLeft:{style:zn},paddingX:{style:zn},paddingY:{style:zn},paddingInline:{style:zn},paddingInlineStart:{style:zn},paddingInlineEnd:{style:zn},paddingBlock:{style:zn},paddingBlockStart:{style:zn},paddingBlockEnd:{style:zn},m:{style:jn},mt:{style:jn},mr:{style:jn},mb:{style:jn},ml:{style:jn},mx:{style:jn},my:{style:jn},margin:{style:jn},marginTop:{style:jn},marginRight:{style:jn},marginBottom:{style:jn},marginLeft:{style:jn},marginX:{style:jn},marginY:{style:jn},marginInline:{style:jn},marginInlineStart:{style:jn},marginInlineEnd:{style:jn},marginBlock:{style:jn},marginBlockStart:{style:jn},marginBlockEnd:{style:jn},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:pC},rowGap:{style:gC},columnGap:{style:mC},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:si},maxWidth:{style:BP},minWidth:{transform:si},height:{transform:si},maxHeight:{transform:si},minHeight:{transform:si},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},fy=GJ;function qJ(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function KJ(e,t){return typeof e=="function"?e(t):e}function tz(){function e(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:c,style:d}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=dh(o,u)||{};return d?d(s):Xo(s,r,p=>{let g=q0(f,c,p);return p===g&&typeof p=="string"&&(g=q0(f,c,`${n}${p==="default"?"":ge(p)}`,p)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const s=(r=i.unstable_sxConfig)!=null?r:fy;function a(l){let u=l;if(typeof l=="function")u=l(i);else if(typeof l!="object")return l;if(!u)return null;const c=Jj(i.breakpoints),d=Object.keys(c);let f=c;return Object.keys(u).forEach(h=>{const p=KJ(u[h],i);if(p!=null)if(typeof p=="object")if(s[h])f=Rm(f,e(h,p,i,s));else{const g=Xo({theme:i},p,b=>({[h]:b}));qJ(g,p)?f[h]=t({sx:p,theme:i}):f=Rm(f,g)}else f=Rm(f,e(h,p,i,s))}),Zj(d,f)}return Array.isArray(o)?o.map(a):a(o)}return t}const zh=tz();zh.filterProps=["sx"];function nz(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const QJ=["breakpoints","palette","spacing","shape"];function Uh(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}
vendor: 5,996 bytes, lines 53-61
53=e,s=de(e,QJ),a=Xj(n),l=mJ(o);let u=Ao({breakpoints:a,direction:"ltr",components:{},palette:x({mode:"light"},r),spacing:l,shape:x({},iJ,i)},s);return u.applyStyles=nz,u=t.reduce((c,d)=>Ao(c,d),u),u.unstable_sxConfig=x({},fy,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return zh({sx:d,theme:this})},u}const YJ=Object.freeze(Object.defineProperty({__proto__:null,default:Uh,private_createBreakpoints:Xj,unstable_applyStyles:nz},Symbol.toStringTag,{value:"Module"}));function XJ(e){return Object.keys(e).length===0}function jP(e=null){const t=m.useContext(Vh);return!t||XJ(t)?e:t}const JJ=Uh();function yC(e=JJ){return jP(e)}function ZJ({styles:e,themeId:t,defaultTheme:n={}}){const r=yC(n),o=typeof e=="function"?e(t&&r[t]||r):e;return T.jsx(Kj,{styles:o})}const eZ=["sx"],tZ=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:fy;return Object.keys(e).forEach(i=>{o[i]?r.systemProps[i]=e[i]:r.otherProps[i]=e[i]}),r};function hy(e){const{sx:t}=e,n=de(e,eZ),{systemProps:r,otherProps:o}=tZ(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...s)=>{const a=t(...s);return Xa(a)?x({},r,a):r}:i=x({},r,t),x({},o,{sx:i})}const nZ=Object.freeze(Object.defineProperty({__proto__:null,default:zh,extendSxProp:hy,unstable_createStyleFunctionSx:tz,unstable_defaultSxConfig:fy},Symbol.toStringTag,{value:"Module"})),wD=e=>e,rZ=()=>{let e=wD;return{configure(t){e=t},generate(t){return e(t)},reset(){e=wD}}},zP=rZ();function rz(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=rz(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xe(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rz(e))&&(r&&(r+=" "),r+=t);return r}const oZ=["className","component"];function iZ(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=$P("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(zh);return m.forwardRef(function(l,u){const c=yC(n),d=hy(l),{className:f,component:h="div"}=d,p=de(d,oZ);return T.jsx(i,x({as:h,ref:u,className:xe(f,o?o(r):r),theme:t&&c[t]||c},p))})}const oz={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ke(e,t,n="Mui"){const r=oz[t];return r?`${n}-${r}`:`${zP.generate(e)}-${t}`}function Qe(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Ke(e,o,n)}),r}var iz={exports:{}},an={};/**
54 * @license React
55 * react-is.production.min.js
56 *
57 * Copyright (c) Facebook, Inc. and its affiliates.
58 *
59 * This source code is licensed under the MIT license found in the
60 * LICENSE file in the root directory of this source tree.
61 */var UP=Symbol.for("react.element"),HP=Symbol.for("react.portal"),vC=Symbol.for("react.fragment"),bC=Symbol.for("react.strict_mode"),wC=Symbol.for("react.profiler"),CC=Symbol.for("react.provider"),xC=Symbol.for("react.context"),sZ=Symbol.for("react.server_context"),SC=Symbol.for("react.forward_ref"),_C=Symbol.for("react.suspense"),EC=Symbol.for("react.suspense_list"),IC=Symbol.for("react.memo"),AC=Symbol.for("react.lazy"),aZ=Symbol.for("react.offscreen"),sz;sz=Symbol.for("react.module.reference");function rs(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case UP:switch(e=e.type,e){case vC:case wC:case bC:case _C:case EC:return e;default:switch(e=e&&e.$$typeof,e){case sZ:case xC:case SC:case AC:case IC:case CC:return e;default:return t}}case HP:return t}}}an.ContextConsumer=xC;an.ContextProvider=CC;an.Element=UP;an.ForwardRef=SC;an.Fragment=vC;an.Lazy=AC;an.Memo=IC;an.Portal=HP;an.Profiler=wC;an.StrictMode=bC;an.Suspense=_C;an.SuspenseList=EC;an.isAsyncMode=function(){return!1};an.isConcurrentMode=function(){return!1};an.isContextConsumer=function(e){return rs(e)===xC};an.isContextProvider=function(e){return rs(e)===CC};an.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===UP};an.isForwardRef=function(e){return rs(e)===SC};an.isFragment=function(e){return rs(e)===vC};an.isLazy=function(e){return rs(e)===AC};an.isMemo=function(e){return rs(e)===IC};an.isPortal=function(e){return rs(e)===HP};an.isProfiler=function(e){return rs(e)===wC};an.isStrictMode=function(e){return rs(e)===bC};an.isSuspense=function(e){return rs(e)===_C};an.isSuspenseList=function(e){return rs(e)===EC};an.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vC||e===wC||e===bC||e===_C||e===EC||e===aZ||typeof e=="object"&&e!==null&&(e.$$typeof===AC||e.$$typeof===IC||e.$$typeof===CC||e.$$typeof===xC||e.$$typeof===SC||e.$$typeof===sz||e.getModuleId!==void 0)};an.typeOf=rs;iz.exports=an;var _I=iz.exports;const lZ=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function az(e){const t=`${e}`.match(lZ);return t&&t[1]||""}function lz(e,t=""){return e.displayName||e.name||az(e)||t}function CD(e,t,n){const r=lz(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function uZ(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return lz(e,"Component");if(typeof e=="object")switch(e.$$typeof){case _I.ForwardRef:return CD(e,e.render,"ForwardRef");case _I.Memo:return CD(e,e.type,"memo");default:return}}}const cZ=Object.freeze(Object.defineProperty({__proto__:null,default:uZ,getFunctionName:az},Symbol.toStringTag,{value:"Module"})),dZ=["ownerState"],fZ=["variants"],hZ=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function pZ(e){return Object.keys(e).length===0}function mZ(e){return typeof e=="string"&&e.charCodeAt(0)>96}function jS(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const gZ=Uh(),yZ=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Mv({defaultTheme:e,theme:t,themeId:n}){return pZ(t)?e:t[n]||t}function vZ(e){return e?(t,n)=>n[e]:null}
61function Lb(e,t){let{ownerState:n}=t,r=de(t,dZ);const o=typeof e=="function"?e(x({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>Lb(i,x({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let a=de(o,fZ);return i.forEach(l=>{let u=!0;typeof l.props=="function"?u=l.props(x({ownerState:n},r,n)):Object.keys(l.props).forEach(c=>{(n==null?void 0:n[c])!==l.props[c]&&r[c]!==l.props[c]&&(u=!1)}),u&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style(x({ownerState:n},r,n)):l.style))}),a}return o}function bZ(e={}){const{themeId:t,defaultTheme:n=gZ,rootShouldForwardProp:r=jS,slotShouldForwardProp:o=jS}=e,i=s=>zh(x({},s,{theme:Mv(x({},s,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(s,a={})=>{Qj(s,A=>A.filter(S=>!(S!=null&&S.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:f=vZ(yZ(u))}=a,h=de(a,hZ),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=d||!1;let b,y=jS;u==="Root"||u==="root"?y=r:u?y=o:mZ(s)&&(y=void 0);const v=$P(s,x({shouldForwardProp:y,label:b},h)),w=A=>typeof A=="function"&&A.__emotion_real!==A||Xa(A)?S=>Lb(A,x({},S,{theme:Mv({theme:S.theme,defaultTheme:n,themeId:t})})):A,C=(A,...S)=>{let _=w(A);const k=S?S.map(w):[];l&&f&&k.push(O=>{const F=Mv(x({},O,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const N=F.components[l].styleOverrides,V={};
61return Object.entries(N).forEach(([$,D])=>{V[$]=Lb(D,x({},O,{theme:F}))}),f(O,V)}),l&&!p&&k.push(O=>{var F;const N=Mv(x({},O,{defaultTheme:n,themeId:t})),V=N==null||(F=N.components)==null||(F=F[l])==null?void 0:F.variants;return Lb({variants:V},x({},O,{theme:N}))}),g||k.push(i);const M=k.length-S.length;if(Array.isArray(A)&&M>0){const O=new Array(M).fill("");_=[...A,...O],_.raw=[...A.raw,...O]}const R=v(_,...k);return s.muiName&&(R.muiName=s.muiName),R};return v.withConfig&&(C.withConfig=v.withConfig),C}}const gr=bZ();function kC(e,t){const n=x({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=x({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=x({},i),Object.keys(o).forEach(s=>{n[r][s]=kC(o[s],i[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function uz(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:kC(t.components[n].defaultProps,r)}function WP({props:e,name:t,defaultTheme:n,themeId:r}){let o=yC(n);return r&&(o=o[r]||o),uz({theme:o,name:t,props:e})}const Bt=typeof window<"u"?m.useLayoutEffect:m.useEffect;function wZ(e,t,n,r,o){const[i,s]=m.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return Bt(()=>{let a=!0;if(!n)return;const l=n(e),u=()=>{a&&s(l.matches)};return u(),l.addListener(u),()=>{a=!1,l.removeListener(u)}},[e,n]),i}const cz=m.useSyncExternalStore;function CZ(e,t,n,r,o){const i=m.useCallback(()=>t,[t]),s=m.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:c}=r(e);return()=>c}return i},[i,e,r,o,n]),[a,l]=m.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const c=n(e);return[()=>c.matches,d=>(c.addListener(d),()=>{c.removeListener(d)})]},[i,n,e]);return cz(l,a,s)}function Hh(e,t={}){const n=jP(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:o=!1,matchMedia:i=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=uz({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(cz!==void 0?CZ:wZ)(l,o,i,s,a)}function lc(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const xZ=Object.freeze(Object.defineProperty({__proto__:null,default:lc},Symbol.toStringTag,{value:"Module"}));function GP(e,t=0,n=1){return lc(e,t,n)}function SZ(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function PC(e){if(e.type)return e;if(e.charAt(0)==="#")return PC(SZ(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(gl(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(gl(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function qP(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function gs(e,t){return e=PC(e),t=GP(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,qP(e)}function _Z(e,t){if(e=PC(e),t=GP(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return qP(e)}function EZ(e,t){if(e=PC(e),t=GP(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return qP(e)}function IZ(e,t){return()=>null}function K0(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function zu(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function AZ(e,t){return()=>null}
61function Om(e,t){var n,r;return m.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function un(e){return e&&e.ownerDocument||document}function vi(e){return un(e).defaultView||window}function kZ(e,t){return()=>null}function bg(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let xD=0;function PZ(e){const[t,n]=m.useState(e),r=e||t;return m.useEffect(()=>{t==null&&(xD+=1,n(`mui-${xD}`))},[t]),r}const SD=C0.useId;function Jt(e){if(SD!==void 0){const t=SD();return e??t}return PZ(e)}function TZ(e,t,n,r,o){return null}function fa({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=m.useRef(e!==void 0),[i,s]=m.useState(t),a=o?e:i,l=m.useCallback(u=>{o||s(u)},[]);return[a,l]}function Vt(e){const t=m.useRef(e);return Bt(()=>{t.current=e}),m.useRef((...n)=>(0,t.current)(...n)).current}function bt(...e){return m.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{bg(n,t)})},e)}const _D={};function RZ(e,t){const n=m.useRef(_D);return n.current===_D&&(n.current=e(t)),n}const OZ=[];function MZ(e){m.useEffect(e,OZ)}let KP=class dz{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new dz}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}};function gc(){const e=RZ(KP.create).current;return MZ(e.disposeEffect),e}let TC=!0,EI=!1;const DZ=new KP,$Z={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function FZ(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&$Z[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function LZ(e){e.metaKey||e.altKey||e.ctrlKey||(TC=!0)}function zS(){TC=!1}function NZ(){this.visibilityState==="hidden"&&EI&&(TC=!0)}function VZ(e){e.addEventListener("keydown",LZ,!0),e.addEventListener("mousedown",zS,!0),e.addEventListener("pointerdown",zS,!0),e.addEventListener("touchstart",zS,!0),e.addEventListener("visibilitychange",NZ,!0)}function BZ(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return TC||FZ(t)}function py(){const e=m.useCallback(o=>{o!=null&&VZ(o.ownerDocument)},[]),t=m.useRef(!1);function n(){return t.current?(EI=!0,DZ.start(100,()=>{EI=!1}),t.current=!1,!0):!1}function r(o){return BZ(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function fz(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Ld;function hz(){if(Ld)return Ld;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Ld="reverse",e.scrollLeft>0?Ld="default":(e.scrollLeft=1,e.scrollLeft===0&&(Ld="negative")),document.body.removeChild(e),Ld}function jZ(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(hz()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const QP=e=>{const t=m.useRef({});return m.useEffect(()=>{t.current=e}),t.current},zZ={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},UZ=zZ;function Re(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((i,s)=>{if(s){const a=t(s);a!==""&&i.push(a),n&&n[s]&&i.push(n[s])}return i},[]).join(" ")}),r}const HZ=m.createContext(null),pz=HZ;function mz(){return m.useContext(pz)}const WZ=typeof Symbol=="function"&&Symbol.for,GZ=WZ?Symbol.for("mui.nested"):"__THEME_NESTED__";function qZ(e,t){return typeof t=="function"?t(e):x({},e,t)}function KZ(e){const{children:t,theme:n}=e,r=mz(),o=m.useMemo(()=>{const i=r===null?n:qZ(r,n);return i!=null&&(i[GZ]=r!==null),i},[n,r]);return T.jsx(pz.Provider,{value:o,children:t})}const QZ=["value"],gz=m.createContext();function YZ(e){let{value:t}=e,n=de(e,QZ);return T.jsx(gz.Provider,x({value:t??!0},n))}const gd=()=>{const e=m.useContext(gz);return e??!1},ED={};function ID(e,t,n,r=!1){return m.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),s=e?x({},t,{[e]:i}):i;return r?()=>s:s}return e?x({},t,{[e]:n}):x({},t,n)},[e,t,n,r])}function XZ(e){const{children:t,theme:n,themeId:r}=e,o=jP(ED),i=mz()||ED,s=ID(r,o,n),a=ID(r,i,n,!0),l=s.direction==="rtl";return T.jsx(KZ,{theme:a,children:T.jsx(Vh.Provider,{value:s,children:T.jsx(YZ,{value:l,children:t})})})}function wg(e){"@babel/helpers - typeof";return wg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wg(e)}function JZ(e,t){if(wg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(wg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fh(e){var t=JZ(e,"string");return wg(t)=="symbol"?t:t+""}const ZZ=["className","component","disableGutters","fixed","maxWidth","classes"],eee=Uh(),tee=gr("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ge(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),nee=e=>WP({props:e,name:"MuiContainer",defaultTheme:eee}),ree=(e,t)=>
61{const n=l=>Ke(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:s}=e,a={root:["root",s&&`maxWidth${ge(String(s))}`,o&&"fixed",i&&"disableGutters"]};return Re(a,n,r)};function oee(e={}){const{createStyledComponent:t=tee,useThemeProps:n=nee,componentName:r="MuiContainer"}=e,o=t(({theme:s,ownerState:a})=>x({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!a.disableGutters&&{paddingLeft:s.spacing(2),paddingRight:s.spacing(2),[s.breakpoints.up("sm")]:{paddingLeft:s.spacing(3),paddingRight:s.spacing(3)}}),({theme:s,ownerState:a})=>a.fixed&&Object.keys(s.breakpoints.values).reduce((l,u)=>{const c=u,d=s.breakpoints.values[c];return d!==0&&(l[s.breakpoints.up(c)]={maxWidth:`${d}${s.breakpoints.unit}`}),l},{}),({theme:s,ownerState:a})=>x({},a.maxWidth==="xs"&&{[s.breakpoints.up("xs")]:{maxWidth:Math.max(s.breakpoints.values.xs,444)}},a.maxWidth&&a.maxWidth!=="xs"&&{[s.breakpoints.up(a.maxWidth)]:{maxWidth:`${s.breakpoints.values[a.maxWidth]}${s.breakpoints.unit}`}}));return m.forwardRef(function(a,l){const u=n(a),{className:c,component:d="div",disableGutters:f=!1,fixed:h=!1,maxWidth:p="lg"}=u,g=de(u,ZZ),b=x({},u,{component:d,disableGutters:f,fixed:h,maxWidth:p}),y=ree(b,r);return T.jsx(o,x({as:d,ownerState:b,className:xe(y.root,c),ref:l},g))})}const iee=["component","direction","spacing","divider","children","className","useFlexGap"],see=Uh(),aee=gr("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function lee(e){return WP({props:e,name:"MuiStack",defaultTheme:see})}function uee(e,t){const n=m.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(m.cloneElement(t,{key:`separator-${i}`})),r),[])}const cee=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],dee=({ownerState:e,theme:t})=>{let n=x({display:"flex",flexDirection:"column"},Xo({theme:t},Oc({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=VP(t),o=Object.keys(t.breakpoints.values).reduce((l,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(l[u]=!0),l),{}),i=Oc({values:e.direction,base:o}),s=Oc({values:e.spacing,base:o});
61typeof i=="object"&&Object.keys(i).forEach((l,u,c)=>{if(!i[l]){const f=u>0?i[c[u-1]]:"column";i[l]=f}}),n=Ao(n,Xo({theme:t},s,(l,u)=>e.useFlexGap?{gap:Yc(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${cee(u?i[u]:e.direction)}`]:Yc(r,l)}}))}return n=sJ(t.breakpoints,n),n};function fee(e={}){const{createStyledComponent:t=aee,useThemeProps:n=lee,componentName:r="MuiStack"}=e,o=()=>Re({root:["root"]},l=>Ke(r,l),{}),i=t(dee);return m.forwardRef(function(l,u){const c=n(l),d=hy(c),{component:f="div",direction:h="column",spacing:p=0,divider:g,children:b,className:y,useFlexGap:v=!1}=d,w=de(d,iee),C={direction:h,spacing:p,useFlexGap:v},A=o();return T.jsx(i,x({as:f,ownerState:C,ref:u,className:xe(A.root,y)},w,{children:g?uee(b,g):b}))})}function hee(e,t){return x({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Jn={},yz={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(yz);var vz=yz.exports;const pee=Oa(NX),mee=Oa(xZ);var bz=vz;Object.defineProperty(Jn,"__esModule",{value:!0});var pt=Jn.alpha=Sz;Jn.blend=Aee;Jn.colorChannel=void 0;var Xc=Jn.darken=XP;Jn.decomposeColor=Xi;var gee=Jn.emphasize=Iee,yee=Jn.getContrastRatio=xee;Jn.getLuminance=Q0;Jn.hexToRgb=wz;Jn.hslToRgb=xz;var Jc=Jn.lighten=JP;Jn.private_safeAlpha=See;Jn.private_safeColorChannel=void 0;Jn.private_safeDarken=_ee;Jn.private_safeEmphasize=_z;Jn.private_safeLighten=Eee;Jn.recomposeColor=Wh;Jn.rgbToHex=Cee;var AD=bz(pee),vee=bz(mee);function YP(e,t=0,n=1){return(0,vee.default)(e,t,n)}function wz(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function bee(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Xi(e){if(e.type)return e;if(e.charAt(0)==="#")return Xi(wz(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,AD.default)(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error((0,AD.default)(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const Cz=e=>{const t=Xi(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Jn.colorChannel=Cz;const wee=(e,t)=>{try{return Cz(e)}catch{return e}};Jn.private_safeColorChannel=wee;function Wh(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Cee(e){if(e.indexOf("#")===0)return e;const{values:t}=Xi(e);return`#${t.map((n,r)=>bee(r===3?Math.round(255*n):n)).join("")}`}function xz(e){e=Xi(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=(u,c=(u+n/30)%12)=>o-i*Math.max(Math.min(c-3,9-c,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Wh({type:a,values:l})}function Q0(e){e=Xi(e);let t=e.type==="hsl"||e.type==="hsla"?Xi(xz(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function xee(e,t){const n=Q0(e),r=Q0(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Sz(e,t){return e=Xi(e),t=YP(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Wh(e)}function See(e,t,n){try{return Sz(e,t)}catch{return e}}function XP(e,t){if(e=Xi(e),t=YP(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Wh(e)}function _ee(e,t,n){try{return XP(e,t)}catch{return e}}function JP(e,t){if(e=Xi(e),t=YP(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Wh(e)}function Eee(e,t,n){try{return JP(e,t)}catch{return e}}
61function Iee(e,t=.15){return Q0(e)>.5?XP(e,t):JP(e,t)}function _z(e,t,n){try{return _z(e,t)}catch{return e}}function Aee(e,t,n,r=1){const o=(l,u)=>Math.round((l**(1/r)*(1-n)+u**(1/r)*n)**r),i=Xi(e),s=Xi(t),a=[o(i.values[0],s.values[0]),o(i.values[1],s.values[1]),o(i.values[2],s.values[2])];return Wh({type:"rgb",values:a})}const kee=["mode","contrastThreshold","tonalOffset"],kD={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:vg.white,default:vg.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},US={text:{primary:vg.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:vg.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function PD(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Jc(e.main,o):t==="dark"&&(e.dark=Xc(e.main,i)))}function Pee(e="light"){return e==="dark"?{main:Dd[200],light:Dd[50],dark:Dd[400]}:{main:Dd[700],light:Dd[400],dark:Dd[800]}}function Tee(e="light"){return e==="dark"?{main:Md[200],light:Md[50],dark:Md[400]}:{main:Md[500],light:Md[300],dark:Md[700]}}function Ree(e="light"){return e==="dark"?{main:Od[500],light:Od[300],dark:Od[700]}:{main:Od[700],light:Od[400],dark:Od[800]}}function Oee(e="light"){return e==="dark"?{main:$d[400],light:$d[300],dark:$d[700]}:{main:$d[700],light:$d[500],dark:$d[900]}}function Mee(e="light"){return e==="dark"?{main:Fd[400],light:Fd[300],dark:Fd[700]}:{main:Fd[800],light:Fd[500],dark:Fd[900]}}function Dee(e="light"){return e==="dark"?{main:Rp[400],light:Rp[300],dark:Rp[700]}:{main:"#ed6c02",light:Rp[500],dark:Rp[900]}}function $ee(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=de(e,kee),i=e.primary||Pee(t),s=e.secondary||Tee(t),a=e.error||Ree(t),l=e.info||Oee(t),u=e.success||Mee(t),c=e.warning||Dee(t);function d(g){return yee(g,US.text.primary)>=n?US.text.primary:kD.text.primary}const f=({color:g,name:b,mainShade:y=500,lightShade:v=300,darkShade:w=700})=>{if(g=x({},g),!g.main&&g[y]&&(g.main=g[y]),!g.hasOwnProperty("main"))throw new Error(gl(11,b?` (${b})`:"",y));if(typeof g.main!="string")throw new Error(gl(12,b?` (${b})`:"",JSON.stringify(g.main)));return PD(g,"light",v,r),PD(g,"dark",w,r),g.contrastText||(g.contrastText=d(g.main)),g},h={dark:US,light:kD};return Ao(x({common:x({},vg),mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:u,name:"success"}),grey:LX,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},h[t]),o)}const Fee=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Lee(e){return Math.round(e*1e5)/1e5}const TD={textTransform:"uppercase"},RD='"Roboto", "Helvetica", "Arial", sans-serif';function Nee(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=RD,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,f=de(n,Fee),h=o/14,p=d||(y=>`${y/u*h}rem`),g=(y,v,w,C,A)=>x({fontFamily:r,fontWeight:y,fontSize:p(v),lineHeight:w},r===RD?{letterSpacing:`${Lee(C/v)}em`}:{},A,c),b={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,TD),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,TD),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ao(x({htmlFontSize:u,pxToRem:p,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},b),f,{clone:!1})}const Vee=.2,Bee=.14,jee=.12;function An(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Vee})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Bee})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${jee})`].join(",")}const zee=["none",An(0,2,1,-1,0,1,1,0,0,1,3,0),An(0,3,1,-2,0,2,2,0,0,1,5,0),An(0,3,3,-2,0,3,4,0,0,1,8,0),An(0,2,4,-1,0,4,5,0,0,1,10,0),An(0,3,5,-1,0,5,8,0,0,1,14,0),An(0,3,5,-1,0,6,10,0,0,1,18,0),An(0,4,5,-2,0,7,10,1,0,2,16,1),An(0,5,5,-3,0,8,10,1,0,3,14,2),An(0,5,6,-3,0,9,12,1,0,3,16,2),An(0,6,6,-3,0,10,14,1,0,4,18,3),An(0,6,7,-4,0,11,15,1,0,4,20,3),An(0,7,8,-4,0,12,17,2,0,5,22,4),An(0,7,8,-4,0,13,19,2,0,5,24,4),An(0,7,9,-4,0,14,21,2,0,5,26,4),An(0,8,9,-5,0,15,22,2,0,6,28,5),An(0,8,10,-5,0,16,24,2,0,6,30,5),An(0,8,11,-5,0,17,26,2,0,6,32,5),An(0,9,11,-5,0,18,28,2,0,7,34,6),An(0,9,12,-6,0,19,29,2,0,7,36,6
61),An(0,10,13,-6,0,20,31,3,0,8,38,7),An(0,10,13,-6,0,21,33,3,0,8,40,7),An(0,10,14,-6,0,22,35,3,0,8,42,7),An(0,11,14,-7,0,23,36,3,0,9,44,8),An(0,11,15,-7,0,24,38,3,0,9,46,8)],Uee=["duration","easing","delay"],Hee={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Wee={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function OD(e){return`${Math.round(e)}ms`}function Gee(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function qee(e){const t=x({},Hee,e.easing),n=x({},Wee,e.duration);return x({getAutoHeightDuration:Gee,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=i;return de(i,Uee),(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof s=="string"?s:OD(s)} ${a} ${typeof l=="string"?l:OD(l)}`).join(",")}},e,{easing:t,duration:n})}const Kee={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Qee=Kee,Yee=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function ZP(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,s=de(e,Yee);if(e.vars)throw new Error(gl(18));const a=$ee(r),l=Uh(e);let u=Ao(l,{mixins:hee(l.breakpoints,n),palette:a,shadows:zee.slice(),typography:Nee(a,i),transitions:qee(o),zIndex:x({},Qee)});return u=Ao(u,s),u=t.reduce((c,d)=>Ao(c,d),u),u.unstable_sxConfig=x({},fy,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return zh({sx:d,theme:this})},u}function Xee(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Jee(e){return parseFloat(e)}const Zee=ZP(),RC=Zee;function Zn(){const e=yC(RC);return e[Kc]||e}function Je({props:e,name:t}){return WP({props:e,name:t,defaultTheme:RC,themeId:Kc})}var my={};const ete=Oa(ZK);var HS={exports:{}},MD;function tte(){return MD||(MD=1,function(e){function t(n,r){if(n==null)return{};var o={},i=Object.keys(n),s,a;for(a=0;a<i.length;a++)s=i[a],!(r.indexOf(s)>=0)&&(o[s]=n[s]);return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(HS)),HS.exports}const Ez=Oa(eJ),nte=Oa(tJ),rte=Oa(lJ),ote=Oa(cZ),ite=Oa(YJ),ste=Oa(nZ);var Gh=vz;Object.defineProperty(my,"__esModule",{value:!0});var ate=my.default=wte;my.shouldForwardProp=Nb;my.systemDefaultTheme=void 0;var Ti=Gh(ete),II=Gh(tte()),DD=pte(Ez),lte=nte;Gh(rte);Gh(ote);var ute=Gh(ite),cte=Gh(ste);const dte=["ownerState"],fte=["variants"],hte=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Iz(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Iz=function(r){return r?n:t})(e)}function pte(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Iz(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function mte(e){return Object.keys(e).length===0}function gte(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Nb(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const yte=my.systemDefaultTheme=(0,ute.default)(),vte=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Dv({defaultTheme:e,theme:t,themeId:n}){return mte(t)?e:t[n]||t}function bte(e){return e?(t,n)=>n[e]:null}function Vb(e,t){let{ownerState:n}=t,r=(0,II.default)(t,dte);const o=typeof e=="function"?e((0,Ti.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>Vb(i,(0,Ti.default)({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let a=(0,II.default)(o,fte);return i.forEach(l=>{let u=!0;typeof l.props=="function"?u=l.props((0,Ti.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(c=>{(n==null?void 0:n[c])!==l.props[c]&&r[c]!==l.props[c]&&(u=!1)}
61),u&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Ti.default)({ownerState:n},r,n)):l.style))}),a}return o}function wte(e={}){const{themeId:t,defaultTheme:n=yte,rootShouldForwardProp:r=Nb,slotShouldForwardProp:o=Nb}=e,i=s=>(0,cte.default)((0,Ti.default)({},s,{theme:Dv((0,Ti.default)({},s,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(s,a={})=>{(0,DD.internal_processStyles)(s,A=>A.filter(S=>!(S!=null&&S.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:f=bte(vte(u))}=a,h=(0,II.default)(a,hte),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=d||!1;let b,y=Nb;u==="Root"||u==="root"?y=r:u?y=o:gte(s)&&(y=void 0);const v=(0,DD.default)(s,(0,Ti.default)({shouldForwardProp:y,label:b},h)),w=A=>typeof A=="function"&&A.__emotion_real!==A||(0,lte.isPlainObject)(A)?S=>Vb(A,(0,Ti.default)({},S,{theme:Dv({theme:S.theme,defaultTheme:n,themeId:t})})):A,C=(A,...S)=>{let _=w(A);const k=S?S.map(w):[];l&&f&&k.push(O=>{const F=Dv((0,Ti.default)({},O,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[l]||!F.components[l].styleOverrides)return null;const N=F.components[l].styleOverrides,V={};
61return Object.entries(N).forEach(([$,D])=>{V[$]=Vb(D,(0,Ti.default)({},O,{theme:F}))}),f(O,V)}),l&&!p&&k.push(O=>{var F;const N=Dv((0,Ti.default)({},O,{defaultTheme:n,themeId:t})),V=N==null||(F=N.components)==null||(F=F[l])==null?void 0:F.variants;return Vb({variants:V},(0,Ti.default)({},O,{theme:N}))}),g||k.push(i);const M=k.length-S.length;if(Array.isArray(A)&&M>0){const O=new Array(M).fill("");_=[...A,...O],_.raw=[...A.raw,...O]}const R=v(_,...k);return s.muiName&&(R.muiName=s.muiName),R};return v.withConfig&&(C.withConfig=v.withConfig),C}}function OC(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Cte=e=>OC(e)&&e!=="classes",yr=Cte,he=ate({themeId:Kc,defaultTheme:RC,rootShouldForwardProp:yr}),xte=["theme"];function Ste(e){let{theme:t}=e,n=de(e,xte);const r=t[Kc];return T.jsx(XZ,x({},n,{themeId:r?Kc:void 0,theme:r||t}))}const $D=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function _te(e){return Ke("MuiSvgIcon",e)}Qe("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ete=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Ite=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${ge(t)}`,`fontSize${ge(n)}`]};return Re(o,_te,r)},Ate=he("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ge(n.color)}`],t[`fontSize${ge(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,i,s,a,l,u,c,d,f,h,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(s=i.pxToRem)==null?void 0:s.call(i,20))||"1.25rem",medium:((a=e.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((u=e.typography)==null||(c=u.pxToRem)==null?void 0:c.call(u,35))||"2.1875rem"}[t.fontSize],color:(d=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?d:{action:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.active,disabled:(p=(e.vars||e).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[t.color]}}),AI=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:c=!1,titleAccess:d,viewBox:f="0 0 24 24"}=r,h=de(r,Ete),p=m.isValidElement(o)&&o.type==="svg",g=x({},r,{color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:c,viewBox:f,hasSvgAsChild:p}),b={};c||(b.viewBox=f);const y=Ite(g);return T.jsxs(Ate,x({as:a,className:xe(y.root,i),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},b,h,p&&o.props,{ownerState:g,children:[p?o.props.children:o,d?T.jsx("title",{children:d}):null]}))});AI.muiName="SvgIcon";function Ze(e,t){function n(r,o){return T.jsx(AI,x({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return n.muiName=AI.muiName,m.memo(m.forwardRef(n))}const kte={configure:e=>{zP.configure(e)}},Pte=Object.freeze(Object.defineProperty({__proto__:null,capitalize:ge,createChainedFunction:K0,createSvgIcon:Ze,debounce:zu,deprecatedPropType:AZ,isMuiElement:Om,ownerDocument:un,ownerWindow:vi,requirePropFactory:kZ,setRef:bg,unstable_ClassNameGenerator:kte,unstable_useEnhancedEffect:Bt,unstable_useId:Jt,unsupportedProp:TZ,useControlled:fa,useEventCallback:Vt,useForkRef:bt,useIsFocusVisible:py},Symbol.toStringTag,{value:"Module"}));function qh(e){return Je}function kI(e,t){return kI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},kI(e,t)}function Az(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,kI(e,t)}const FD={disabled:!1},Y0=ot.createContext(null);var Tte=function(t){return t.scrollTop},Zp="unmounted",oc="exited",ic="entering",Kd="entered",PI="exiting",Il=function(e){Az(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var s=o,a=s&&!s.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?a?(l=oc,i.appearStatus=ic):l=Kd:r.unmountOnExit||r.mountOnEnter?l=Zp:l=oc,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===Zp?{status:oc}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==ic&&s!==Kd&&(i=ic):(s===ic||s===Kd)&&(i=PI)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter
vendor: 4,203 bytes, line 61
61:s,appear:a}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===ic){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Ov.findDOMNode(this);s&&Tte(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===oc&&this.setState({status:Zp})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[Ov.findDOMNode(this),a],u=l[0],c=l[1],d=this.getTimeouts(),f=a?d.appear:d.enter;if(!o&&!s||FD.disabled){this.safeSetState({status:Kd},function(){i.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:ic},function(){i.props.onEntering(u,c),i.onTransitionEnd(f,function(){i.safeSetState({status:Kd},function(){i.props.onEntered(u,c)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Ov.findDOMNode(this);if(!i||FD.disabled){this.safeSetState({status:oc},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:PI},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:oc},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Ov.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Zp)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=de(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ot.createElement(Y0.Provider,{value:null},typeof s=="function"?s(o,a):ot.cloneElement(ot.Children.only(s),a))},t}(ot.Component);Il.contextType=Y0;Il.propTypes={};function Nd(){}Il.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Nd,onEntering:Nd,onEntered:Nd,onExit:Nd,onExiting:Nd,onExited:Nd};Il.UNMOUNTED=Zp;Il.EXITED=oc;Il.ENTERING=ic;Il.ENTERED=Kd;Il.EXITING=PI;const eT=Il;function Rte(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tT(e,t){var n=function(i){return t&&m.isValidElement(i)?t(i):i},r=Object.create(null);return e&&m.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function Ote(e,t){e=e||{},t=t||{};function n(c){return c in t?t[c]:e[c]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var l in t){if(r[l])for(s=0;s<r[l].length;s++){var u=r[l][s];a[r[l][s]]=n(u)}a[l]=n(l)}for(s=0;s<o.length;s++)a[o[s]]=n(o[s]);return a}function yc(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Mte(e,t){return tT(e.children,function(n){return m.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:yc(n,"appear",e),enter:yc(n,"enter",e),exit:yc(n,"exit",e)})})}function Dte(e,t,n){var r=tT(e.children),o=Ote(t,r);return Object.keys(o).forEach(function(i){var s=o[i];if(m.isValidElement(s)){var a=i in t,l=i in r,u=t[i],c=m.isValidElement(u)&&!u.props.in;l&&(!a||c)?o[i]=m.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:yc(s,"exit",e),enter:yc(s,"enter",e)}):!l&&a&&!c?o[i]=m.cloneElement(s,{in:!1}):l&&a&&m.isValidElement(u)&&(o[i]=m.cloneElement(s,{onExited:n.bind(null,s),in:u.props.in,exit:yc(s,"exit",e),enter
61:yc(s,"enter",e)}))}}),o}var $te=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Fte={component:"div",childFactory:function(t){return t}},nT=function(e){Az(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var s=i.handleExited.bind(Rte(i));return i.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var s=i.children,a=i.handleExited,l=i.firstRender;return{children:l?Mte(o,a):Dte(o,s,a),firstRender:!1}},n.handleExited=function(o,i){var s=tT(this.props.children);o.key in s||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(a){var l=x({},a.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,s=o.childFactory,a=de(o,["component","childFactory"]),l=this.state.contextValue,u=$te(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,i===null?ot.createElement(Y0.Provider,{value:l},u):ot.createElement(Y0.Provider,{value:l},ot.createElement(i,a,u))},t}(ot.Component);nT.propTypes={};nT.defaultProps=Fte;const Lte=nT,rT=e=>e.scrollTop;function hh(e,t){var n,r;const{timeout:o,easing:i,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof i=="object"?i[t.mode]:i,delay:s.transitionDelay}}function Nte(e){return Ke("MuiPaper",e)}Qe("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Vte=["className","component","elevation","square","variant"],Bte=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Re(i,Nte,o)},jte=he("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return x({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&x({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${pt("#fff",$D(t.elevation))}, ${pt("#fff",$D(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),zte=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,u=de(r,Vte),c=x({},r,{component:i,elevation:s,square:a,variant:l}),d=Bte(c);return T.jsx(jte,x({as:i,ownerState:c,className:xe(d.root,o),ref:n},u))}),fo=zte;function ks(e){return typeof e=="string"}function wf(e,t,n){return e===void 0||ks(e)?t:x({},t,{ownerState:x({},t.ownerState,n)})}function Ute(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const Hte={disableDefaultClasses:!1},Wte=m.createContext(Hte);function Gte(e){const{disableDefaultClasses:t}=m.useContext(Wte);return n=>t?"":e(n)}function Mc(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function kz(e,t,n){return typeof e=="function"?e(t,n):e}function LD(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Pz(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const h=xe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),p=x({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),g=x({},n,o,r);return h.length>0&&(g.className=h),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:void 0}}const s=Mc(x({},o,r)),a=LD(r),l=LD(o),u=t(s),c=xe(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d=x({},u==null?void 0:u.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),f=x({},u,n,l,a);return c.length>0&&(f.className=c),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:u.ref}}const qte=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Wn(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}
61=e,s=de(e,qte),a=i?{}:kz(r,o),{props:l,internalRef:u}=Pz(x({},s,{externalSlotProps:a})),c=bt(u,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return wf(n,x({},l,{ref:c}),o)}const Kte=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Qte=["component","slots","slotProps"],Yte=["component"];function TI(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:s,internalForwardedProps:a}=t,l=de(t,Kte),{component:u,slots:c={[e]:void 0},slotProps:d={[e]:void 0}}=i,f=de(i,Qte),h=c[e]||r,p=kz(d[e],o),g=Pz(x({className:n},l,{externalForwardedProps:e==="root"?f:void 0,externalSlotProps:p})),{props:{component:b},internalRef:y}=g,v=de(g.props,Yte),w=bt(y,p==null?void 0:p.ref,t.ref),C=s?s(v):{},A=x({},o,C),S=e==="root"?b||u:b,_=wf(h,x({},e==="root"&&!u&&!c[e]&&a,e!=="root"&&!c[e]&&a,v,S&&{as:S},{ref:w}),A);return Object.keys(C).forEach(k=>{delete _[k]}),[h,_]}function Xte(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:u}=e,[c,d]=m.useState(!1),f=xe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),h={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},p=xe(n.child,c&&n.childLeaving,r&&n.childPulsate);return!a&&!c&&d(!0),m.useEffect(()=>{if(!a&&l!=null){const g=setTimeout(l,u);return()=>{clearTimeout(g)}}},[l,a,u]),T.jsx("span",{className:f,style:h,children:T.jsx("span",{className:p})})}const Mi=Qe("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Jte=["center","classes","className"];let MC=e=>e,ND,VD,BD,jD;const RI=550,Zte=80,ene=El(ND||(ND=MC`
62  0% {
63    transform: scale(0);
64    opacity: 0.1;
65  }
66
67  100% {
68    transform: scale(1);
69    opacity: 0.3;
70  }
71`)),tne=El(VD||(VD=MC`
72  0% {
73    opacity: 1;
74  }
75
76  100% {
77    opacity: 0;
78  }
79`)),nne=El(BD||(BD=MC`
80  0% {
81    transform: scale(1);
82  }
83
84  50% {
85    transform: scale(0.92);
86  }
87
88  100% {
89    transform: scale(1);
90  }
91`)),rne=he("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),one=he(Xte,{name:"MuiTouchRipple",slot:"Ripple"})(jD||(jD=MC`
92  opacity: 0;
93  position: absolute;
94
95  &.${0} {
96    opacity: 0.3;
97    transform: scale(1);
98    animation-name: ${0};
99    animation-duration: ${0}ms;
100    animation-timing-function: ${0};
101  }
102
103  &.${0} {
104    animation-duration: ${0}ms;
105  }
106
107  & .${0} {
108    opacity: 1;
109    display: block;
110    width: 100%;
111    height: 100%;
112    border-radius: 50%;
113    background-color: currentColor;
114  }
115
116  & .${0} {
117    opacity: 0;
118    animation-name: ${0};
119    animation-duration: ${0}ms;
120    animation-timing-function: ${0};
121  }
122
123  & .${0} {
124    position: absolute;
125    /* @noflip */
126    left: 0px;
127    top: 0;
128    animation-name: ${0};
129    animation-duration: 2500ms;
130    animation-timing-function: ${0};
131    animation-iteration-count: infinite;
132    animation-delay: 200ms;
133  }
134`),Mi.rippleVisible,ene,RI,({theme:e})=>e.transitions.easing.easeInOut,Mi.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Mi.child,Mi.childLeaving,tne,RI,({theme:e})=>e.transitions.easing.easeInOut,Mi.childPulsate,nne,({theme:e})=>e.transitions.easing.easeInOut),ine=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s}=r,a=de(r,Jte),[l,u]=m.useState([]),c=m.useRef(0),d=m.useRef(null);m.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=m.useRef(!1),h=gc(),p=m.useRef(null),g=m.useRef(null),b=m.useCallback(C=>{const{pulsate:A,rippleX:S,rippleY:_,rippleSize:k,cb:M}=C;u(R=>[...R,T.jsx(one,{classes:{ripple:xe(i.ripple,Mi.ripple),rippleVisible:xe(i.rippleVisible,Mi.rippleVisible),ripplePulsate:xe(i.ripplePulsate,Mi.ripplePulsate),child:xe(i.child,Mi.child),childLeaving:xe(i.childLeaving,Mi.childLeaving),childPulsate:xe(i.childPulsate,Mi.childPulsate)},timeout:RI,pulsate:A,rippleX:S,rippleY:_,rippleSize:k},c.current)]),c.current+=1,d.current=M},[i]),y=m.useCallback((C={},A={},S=()=>{})=>{const{pulsate:_=!1,center:k=o||A.pulsate,fakeElement:M=!1}=A;if((C==null?void 0:C.type)==="mousedown"&&f.current){f.current=!1;return}(C==null?void 0:C.type)==="touchstart"&&(f.current=!0);const R=M?null:g.current,O=R?R.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,N,V;if(k||C===void 0||C.clientX===0&&C.clientY===0||!C.clientX&&!C.touches)F=Math.round(O.width/2),N=Math.round(O.height/2);else{const{clientX:$,clientY:D}=C.touches&&C.touches.length>0?C.touches[0]:C;F=Math.round($-O.left),N=Math.round(D-O.top)}if(k)V=Math.sqrt((2*O.width**2+O.height**2)/3),V%2===0&&(V+=1);else{const $=Math.max(Math.abs((R?R.clientWidth:0)-F),F)*2+2,D=Math.max(Math.abs((R?R.clientHeight:0)-N),N)*2+2;V=Math.sqrt($**2+D**2)}C!=null&&C.touches?p.current===null&&(p.current=()=>{b({pulsate:_,rippleX:F,rippleY:N,rippleSize:V,cb:S})},h.start(Zte,()=>{p.current&&(p.current(),p.current=null)})):b({pulsate:_,rippleX:F,rippleY:N,rippleSize:V,cb:S})},[o,b,h]),v=m.useCallback(()=>{y({},{pulsate:!0})},[y]),w=m.useCallback((C,A)=>{if(h.clear(),(C==null?void 0:C.type)==="touchend"&&p.current){p.current(),p.current=null,h.start(0,()=>{w(C,A)});return}p.current=null,u(S=>S.length>0?S.slice(1):S),d.current=A},[h]);return m.useImperativeHandle(n,()=>({pulsate:v,start:y,stop:w}
134),[v,y,w]),T.jsx(rne,x({className:xe(Mi.root,i.root,s),ref:g},a,{children:T.jsx(Lte,{component:null,exit:!0,children:l})}))}),sne=ine;function ane(e){return Ke("MuiButtonBase",e)}const lne=Qe("MuiButtonBase",["root","disabled","focusVisible"]),une=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],cne=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,s=Re({root:["root",t&&"disabled",n&&"focusVisible"]},ane,o);return n&&r&&(s.root+=` ${r}`),s},dne=he("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${lne.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),fne=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:l="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:h="a",onBlur:p,onClick:g,onContextMenu:b,onDragLeave:y,onFocus:v,onFocusVisible:w,onKeyDown:C,onKeyUp:A,onMouseDown:S,onMouseLeave:_,onMouseUp:k,onTouchEnd:M,onTouchMove:R,onTouchStart:O,tabIndex:F=0,TouchRippleProps:N,touchRippleRef:V,type:$}=r,D=de(r,une),L=m.useRef(null),P=m.useRef(null),B=bt(P,V),{isFocusVisibleRef:E,onFocus:z,onBlur:H,ref:j}=py(),[G,Q]=m.useState(!1);u&&G&&Q(!1),m.useImperativeHandle(o,()=>({focusVisible:()=>{Q(!0),L.current.focus()}}),[]);const[ee,Y]=m.useState(!1);m.useEffect(()=>{Y(!0)},[]);const se=ee&&!c&&!u;m.useEffect(()=>{G&&f&&!c&&ee&&P.current.pulsate()},[c,f,G,ee]);function fe(te,ke,Ve=d){return Vt(Fe=>(ke&&ke(Fe),!Ve&&P.current&&P.current[te](Fe),!0))}const ve=fe("start",S),oe=fe("stop",b),ye=fe("stop",y),we=fe("stop",k),me=fe("stop",te=>{G&&te.preventDefault(),_&&_(te)}),be=fe("start",O),ie=fe("stop",M),pe=fe("stop",R),U=fe("stop",te=>{H(te),E.current===!1&&Q(!1),p&&p(te)},!1),q=Vt(te=>{L.current||(L.current=te.currentTarget),z(te),E.current===!0&&(Q(!0),w&&w(te)),v&&v(te)}),K=()=>{const te=L.current;return l&&l!=="button"&&!(te.tagName==="A"&&te.href)},ae=m.useRef(!1),ue=Vt(te=>{f&&!ae.current&&G&&P.current&&te.key===" "&&(ae.current=!0,P.current.stop(te,()=>{P.current.start(te)})),te.target===te.currentTarget&&K()&&te.key===" "&&te.preventDefault(),C&&C(te),te.target===te.currentTarget&&K()&&te.key==="Enter"&&!u&&(te.preventDefault(),g&&g(te))}),Z=Vt(te=>{f&&te.key===" "&&P.current&&G&&!te.defaultPrevented&&(ae.current=!1,P.current.stop(te,()=>{P.current.pulsate(te)})),A&&A(te),g&&te.target===te.currentTarget&&K()&&te.key===" "&&!te.defaultPrevented&&g(te)});let X=l;X==="button"&&(D.href||D.to)&&(X=h);const W={};X==="button"?(W.type=$===void 0?"button":$,W.disabled=u):(!D.href&&!D.to&&(W.role="button"),u&&(W["aria-disabled"]=u));const le=bt(n,j,L),_e=x({},r,{centerRipple:i,component:l,disabled:u,disableRipple:c,disableTouchRipple:d,focusRipple:f,tabIndex:F,focusVisible:G}),ne=cne(_e);return T.jsxs(dne,x({as:X,className:xe(ne.root,a),ownerState:_e,onBlur:U,onClick:g,onContextMenu:oe,onFocus:q,onKeyDown:ue,onKeyUp:Z,onMouseDown:ve,onMouseLeave:me,onMouseUp:we,onDragLeave:ye,onTouchEnd:ie,onTouchMove:pe,onTouchStart:be,ref:le,tabIndex:u?-1:F,type:$},W,D,{children:[s,se?T.jsx(sne,x({ref:B,center:i},N)):null]}))}),_a=fne;function hne(e){return Ke("MuiAlert",e)}const pne=Qe("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),zD=pne;function mne(e){return Ke("MuiIconButton",e)}const gne=Qe("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),yne=["edge","children","className","color","disabled","disableFocusRipple","size"],vne=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${ge(r)}`,o&&`edge${ge(o)}`,`size${ge(i)}`]};return Re(s,mne,t)},bne=he(_a,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ge(n.color)}`],n.edge&&t[`edge${ge(n.edge)}`],t[`size${ge(n.size)}`]]}})(({theme:e,ownerState:t})=>x({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:pt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return x({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&x({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":x({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:pt(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${gne.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),wne=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:l=!1,disableFocusRipple:u=!1,size:c="medium"}=r,d=de(r,yne),f=x({},r,{edge:o,color:a,disabled:l,disableFocusRipple:u,size:c}),h=vne(f);return T.jsx(bne,x({className:xe(h.root,s),centerRipple:!0,focusRipple:!u,disabled:l,ref:n},d,{ownerState:f,children:i}))}),Zt=wne,Cne=Ze(T.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}
134),"SuccessOutlined"),xne=Ze(T.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Sne=Ze(T.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),_ne=Ze(T.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Tz=Ze(T.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Ene=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],Ine=qh(),Ane=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${ge(n||r)}`,`${t}${ge(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Re(i,hne,o)},kne=he(fo,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ge(n.color||n.severity)}`]]}})(({theme:e})=>{const t=e.palette.mode==="light"?Xc:Jc,n=e.palette.mode==="light"?Jc:Xc;return x({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${zD.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.light).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${zD.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(([,r])=>r.main&&r.dark).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:x({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)})}))]})}),Pne=he("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Tne=he("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),UD=he("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),HD={success:T.jsx(Cne,{fontSize:"inherit"}),warning:T.jsx(xne,{fontSize:"inherit"}),error:T.jsx(Sne,{fontSize:"inherit"}),info:T.jsx(_ne,{fontSize:"inherit"})},Rne=m.forwardRef(function(t,n){const r=Ine({props:t,name:"MuiAlert"}),{action:o,children:i,className:s,closeText:a="Close",color:l,components:u={},componentsProps:c={},icon:d,iconMapping:f=HD,onClose:h,role:p="alert",severity:g="success",slotProps:b={},slots:y={},variant:v="standard"}=r,w=de(r,Ene),C=x({},r,{color:l,severity:g,variant:v,colorSeverity:l||g}),A=Ane(C),S={slots:x({closeButton:u.CloseButton,closeIcon:u.CloseIcon},y),slotProps:x({},c,b)},[_,k]=TI("closeButton",{elementType:Zt,externalForwardedProps:S,ownerState:C}),[M,R]=TI("closeIcon",{elementType:Tz,externalForwardedProps:S,ownerState:C});return T.jsxs(kne,x({role:p,elevation:0,ownerState:C,className:xe(A.root,s),ref:n},w,{children:[d!==!1?T.jsx(Pne,{ownerState:C,className:A.icon,children:d||f[g]||HD[g]}):null,T.jsx(Tne,{ownerState:C,className:A.message,children:i}),o!=null?T.jsx(UD,{ownerState:C,className:A.action,children:o}):null,o==null&&h?T.jsx(UD,{ownerState:C,className:A.action,children:T.jsx(_,x({size:"small","aria-label":a,title:a,c
134olor:"inherit",onClick:h},k,{children:T.jsx(M,x({fontSize:"small"},R))}))}):null]}))}),so=Rne;function One(e){return Ke("MuiTypography",e)}Qe("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Mne=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Dne=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=e,a={root:["root",i,e.align!=="inherit"&&`align${ge(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Re(a,One,s)},$ne=he("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ge(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>x({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),WD={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Fne={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Lne=e=>Fne[e]||e,Nne=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTypography"}),o=Lne(r.color),i=hy(x({},r,{color:o})),{align:s="inherit",className:a,component:l,gutterBottom:u=!1,noWrap:c=!1,paragraph:d=!1,variant:f="body1",variantMapping:h=WD}=i,p=de(i,Mne),g=x({},i,{align:s,color:o,className:a,component:l,gutterBottom:u,noWrap:c,paragraph:d,variant:f,variantMapping:h}),b=l||(d?"p":h[f]||WD[f])||"span",y=Dne(g);return T.jsx($ne,x({as:b,ref:n,ownerState:g,className:xe(y.root,a)},p))}),Ae=Nne;function Vne(e){return Ke("MuiAppBar",e)}Qe("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Bne=["className","color","enableColorOnDark","position"],jne=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${ge(t)}`,`position${ge(n)}`]};return Re(o,Vne,r)},$v=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,zne=he(fo,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ge(n.position)}`],t[`color${ge(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return x({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&x({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&x({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&x({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:$v(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:$v(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:$v(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:$v(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),Une=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=de(r,Bne),u=x({},r,{color:i,position:a,enableColorOnDark:s}),c=jne(u);return T.jsx(zne,x({square:!0,component:"header",ownerState:u,elevation:4,className:xe(c.root,o,a==="fixed"&&"mui-fixed"),ref:n},l))}),Hne=Une;function Wne(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=QP({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!o&&(s=!0);const{badgeContent:a,max:l=r}=s?i:e,u=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:u}}const Rz="base";function Gne(e){return`${Rz}--${e}`}function qne(e,t){return`${Rz}-${e}-${t}`}function Oz(e,t){const n=oz[t];return n?Gne(n):qne(e,t)}function Kne(e,t){const n={};return t.forEach(r=>{n[r]=Oz(e,r)}),n}function GD(e){return e.substring(2).toLowerCase()}function Qne(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function oT(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,s=m.useRef(!1),a=m.useRef(null),l=m.useRef(!1),u=m.useRef(!1);m.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const c=bt(t.ref,a),d=Vt(p=>{const g=u.current;u.current=!1;const b=un(a.current);if(!l.current||!a.current||"clientX"in p&&Qne(p,b))return;if(s.current){s.current=!1;return}let y;p.composedPath?y=p.composedPath().indexOf(a.current)>-1:y=!b.documentElement.contains(p.target)||a.current.contains(p.target),!y&&(n||!g)&&o(p)}),f=p=>g=>{u.current=!0;const b=t.props[p];b&&b(g)},h={ref:c};return i!==!1&&(h[i]=f(i)),m.useEffect(()=>{if(i!==!1){const p=GD(i),g=un(a.current),b=()=>{s.current=!0};return g.addEventListener(p,d),g.addEventListener("touchmove",b),()=>{g.removeEventListener(p,d),g.removeEventListener("touchmove",b)}}},[d,i]),r!==!1&&(h[r]=f(r)),m.useEffect(()=>{if(r!==!1){const p=GD(r),g=un(a.current);return g.addEventListener(p,d),()=>{g.removeEventListener(p,d)}}},[d,r]),T.jsx(m.Fragment,{children:m.cloneElement(t,h)})}const Yne=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Xne(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Jne(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Zne(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Jne(e))}function ere(e){const t=[],n=[];
134return Array.from(e.querySelectorAll(Yne)).forEach((r,o)=>{const i=Xne(r);i===-1||!Zne(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function tre(){return!0}function Mz(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=ere,isEnabled:s=tre,open:a}=e,l=m.useRef(!1),u=m.useRef(null),c=m.useRef(null),d=m.useRef(null),f=m.useRef(null),h=m.useRef(!1),p=m.useRef(null),g=bt(t.ref,p),b=m.useRef(null);m.useEffect(()=>{!a||!p.current||(h.current=!n)},[n,a]),m.useEffect(()=>{if(!a||!p.current)return;const w=un(p.current);return p.current.contains(w.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),h.current&&p.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[a]),m.useEffect(()=>{if(!a||!p.current)return;const w=un(p.current),C=_=>{b.current=_,!(r||!s()||_.key!=="Tab")&&w.activeElement===p.current&&_.shiftKey&&(l.current=!0,c.current&&c.current.focus())},A=()=>{const _=p.current;if(_===null)return;if(!w.hasFocus()||!s()||l.current){l.current=!1;return}if(_.contains(w.activeElement)||r&&w.activeElement!==u.current&&w.activeElement!==c.current)return;if(w.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!h.current)return;let k=[];if((w.activeElement===u.current||w.activeElement===c.current)&&(k=i(p.current)),k.length>0){var M,R;const O=!!((M=b.current)!=null&&M.shiftKey&&((R=b.current)==null?void 0:R.key)==="Tab"),F=k[0],N=k[k.length-1];typeof F!="string"&&typeof N!="string"&&(O?N.focus():F.focus())}else _.focus()};w.addEventListener("focusin",A),w.addEventListener("keydown",C,!0);const S=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(S),w.removeEventListener("focusin",A),w.removeEventListener("keydown",C,!0)}},[n,r,o,s,a,i]);const y=w=>{d.current===null&&(d.current=w.relatedTarget),h.current=!0,f.current=w.target;const C=t.props.onFocus;C&&C(w)},v=w=>{d.current===null&&(d.current=w.relatedTarget),h.current=!0};return T.jsxs(m.Fragment,{children:[T.jsx("div",{tabIndex:a?0:-1,onFocus:v,ref:u,"data-testid":"sentinelStart"}),m.cloneElement(t,{ref:g,onFocus:y}),T.jsx("div",{tabIndex:a?0:-1,onFocus:v,ref:c,"data-testid":"sentinelEnd"})]})}function nre(e){return typeof e=="function"?e():e}const Dz=m.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[s,a]=m.useState(null),l=bt(m.isValidElement(r)?r.ref:null,n);if(Bt(()=>{i||a(nre(o)||document.body)},[o,i]),Bt(()=>{if(s&&!i)return bg(n,s),()=>{bg(n,null)}},[n,s,i]),i){if(m.isValidElement(r)){const u={ref:l};return m.cloneElement(r,u)}return T.jsx(m.Fragment,{children:r})}return T.jsx(m.Fragment,{children:s&&md.createPortal(r,s)})});function rre(e){const t=un(e);return t.body===e?vi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Mm(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function qD(e){return parseInt(vi(e).getComputedStyle(e).paddingRight,10)||0}function ore(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function KD(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,s=>{const a=i.indexOf(s)===-1,l=!ore(s);a&&l&&Mm(s,o)})}function WS(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function ire(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(rre(r)){const s=fz(un(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${qD(r)+s}px`;const a=un(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${qD(l)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=un(r).body;else{const s=r.parentElement,a=vi(r);i=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>
134{n.forEach(({value:i,el:s,property:a})=>{i?s.style.setProperty(a,i):s.style.removeProperty(a)})}}function sre(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class are{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Mm(t.modalRef,!1);const o=sre(n);KD(n,t.mount,t.modalRef,o,!0);const i=WS(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=WS(this.containers,i=>i.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=ire(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=WS(this.containers,s=>s.modals.indexOf(t)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Mm(t.modalRef,n),KD(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Mm(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function lre(e){return typeof e=="function"?e():e}function ure(e){return e?e.props.hasOwnProperty("in"):!1}const cre=new are;function dre(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=cre,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:u,open:c,rootRef:d}=e,f=m.useRef({}),h=m.useRef(null),p=m.useRef(null),g=bt(p,d),[b,y]=m.useState(!c),v=ure(l);let w=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(w=!1);const C=()=>un(h.current),A=()=>(f.current.modalRef=p.current,f.current.mount=h.current,f.current),S=()=>{o.mount(A(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},_=Vt(()=>{const D=lre(t)||C().body;o.add(A(),D),p.current&&S()}),k=m.useCallback(()=>o.isTopModal(A()),[o]),M=Vt(D=>{h.current=D,D&&(c&&k()?S():p.current&&Mm(p.current,w))}),R=m.useCallback(()=>{o.remove(A(),w)},[w,o]);m.useEffect(()=>()=>{R()},[R]),m.useEffect(()=>{c?_():(!v||!i)&&R()},[c,R,v,i,_]);const O=D=>L=>{var P;(P=D.onKeyDown)==null||P.call(D,L),!(L.key!=="Escape"||L.which===229||!k())&&(n||(L.stopPropagation(),u&&u(L,"escapeKeyDown")))},F=D=>L=>{var P;(P=D.onClick)==null||P.call(D,L),L.target===L.currentTarget&&u&&u(L,"backdropClick")};return{getRootProps:(D={})=>{const L=Mc(e);delete L.onTransitionEnter,delete L.onTransitionExited;const P=x({},L,D);return x({role:"presentation"},P,{onKeyDown:O(P),ref:g})},getBackdropProps:(D={})=>{const L=D;return x({"aria-hidden":!0},L,{onClick:F(L),open:c})},getTransitionProps:()=>{const D=()=>{y(!1),s&&s()},L=()=>{y(!0),a&&a(),i&&R()};return{onEnter:K0(D,l==null?void 0:l.props.onEnter),onExited:K0(L,l==null?void 0:l.props.onExited)}},rootRef:g,portalRef:M,isTopModal:k,exited:b,hasTransition:v}}var qo="top",Ji="bottom",Zi="right",Ko="left",iT="auto",gy=[qo,Ji,Zi,Ko],ph="start",Cg="end",fre="clippingParents",$z="viewport",Op="popper",hre="reference",QD=gy.reduce(function(e,t){return e.concat([t+"-"+ph,t+"-"+Cg])},[]),Fz=[].concat(gy,[iT]).reduce(function(e,t){return e.concat([t,t+"-"+ph,t+"-"+Cg])},[]),pre="beforeRead",mre="read",gre="afterRead",yre="beforeMain",vre="main",bre="afterMain",wre="beforeWrite",Cre="write",xre="afterWrite",Sre=[pre,mre,gre,yre,vre,bre,wre,Cre,xre];function Ea(e){return e?(e.nodeName||"").toLowerCase():null}function bi(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zc(e){var t=bi(e).Element;return e instanceof t||e instanceof Element}function qi(e){var t=bi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function sT(e){if(typeof ShadowRoot>"u")return!1;var t=bi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function _re(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];
vendor: 18,856 bytes, line 134
134!qi(i)||!Ea(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function Ere(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!qi(o)||!Ea(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const Ire={name:"applyStyles",enabled:!0,phase:"write",fn:_re,effect:Ere,requires:["computeStyles"]};function ha(e){return e.split("-")[0]}var Dc=Math.max,X0=Math.min,mh=Math.round;function OI(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Lz(){return!/^((?!chrome|android).)*safari/i.test(OI())}function gh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&qi(e)&&(o=e.offsetWidth>0&&mh(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&mh(r.height)/e.offsetHeight||1);var s=Zc(e)?bi(e):window,a=s.visualViewport,l=!Lz()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/o,c=(r.top+(l&&a?a.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function aT(e){var t=gh(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Nz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&sT(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function yl(e){return bi(e).getComputedStyle(e)}function Are(e){return["table","td","th"].indexOf(Ea(e))>=0}function Uu(e){return((Zc(e)?e.ownerDocument:e.document)||window.document).documentElement}function DC(e){return Ea(e)==="html"?e:e.assignedSlot||e.parentNode||(sT(e)?e.host:null)||Uu(e)}function YD(e){return!qi(e)||yl(e).position==="fixed"?null:e.offsetParent}function kre(e){var t=/firefox/i.test(OI()),n=/Trident/i.test(OI());if(n&&qi(e)){var r=yl(e);if(r.position==="fixed")return null}var o=DC(e);for(sT(o)&&(o=o.host);qi(o)&&["html","body"].indexOf(Ea(o))<0;){var i=yl(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function yy(e){for(var t=bi(e),n=YD(e);n&&Are(n)&&yl(n).position==="static";)n=YD(n);return n&&(Ea(n)==="html"||Ea(n)==="body"&&yl(n).position==="static")?t:n||kre(e)||t}function lT(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dm(e,t,n){return Dc(e,X0(t,n))}function Pre(e,t,n){var r=Dm(e,t,n);return r>n?n:r}function Vz(){return{top:0,right:0,bottom:0,left:0}}function Bz(e){return Object.assign({},Vz(),e)}function jz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Tre=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Bz(typeof t!="number"?t:jz(t,gy))};function Rre(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=ha(n.placement),l=lT(a),u=[Ko,Zi].indexOf(a)>=0,c=u?"height":"width";if(!(!i||!s)){var d=Tre(o.padding,n),f=aT(i),h=l==="y"?qo:Ko,p=l==="y"?Ji:Zi,g=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],b=s[l]-n.rects.reference[l],y=yy(i),v=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,w=g/2-b/2,C=d[h],A=v-f[c]-d[p],S=v/2-f[c]/2+w,_=Dm(C,S,A),k=l;n.modifiersData[r]=(t={},t[k]=_,t.centerOffset=_-S,t)}}function Ore(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Nz(t.elements.popper,o)&&(t.elements.arrow=o))}const Mre={name:"arrow",enabled:!0,phase:"main",fn:Rre,effect:Ore,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function yh(e){return e.split("-")[1]}var Dre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $re(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:mh(n*o)/o||0,y:mh(r*o)/o||0}}function XD(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=s.x,h=f===void 0?0:f,p=s.y,g=p===void 0?0:p,b=typeof c=="function"?c({x:h,y:g}):{x:h,y:g};h=b.x,g=b.y;var y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),w=Ko,C=qo,A=window;if(u){var S=yy(n),_="clientHeight",k="clientWidth";if(S===bi(n)&&(S=Uu(n),yl(S).position!=="static"&&a==="absolute"&&(_="scrollHeight",k="scrollWidth")),S=S,o===qo||(o===Ko||o===Zi)&&i===Cg){C=Ji;var M=d&&S===A&&A.visualViewport?A.visualViewport.height:S[_];g-=M-r.height,g*=l?1:-1}if(o===Ko||(o===qo||o===Ji)&&i===Cg){w=Zi;var R=d&&S===A&&A.visualViewport?A.visualViewport.width:S[k];h-=R-r.width,h*=l?1:-1}}var O=Object.assign({position:a},u&&Dre),F=c===!0?$re({x:h,y:g},bi(n)):{x:h,y:g};if(h=F.x,g=F.y,l){var N;return Object.assign({},O,(N={},N[C]=v?"0":"",N[w]=y?"0":"",N.transform=(A.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",N))}return Object.assign({},O,(t={},t[C]=v?g+"px":"",t[w]=y?h+"px":"",t.transform="",t))}function Fre(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:ha(t.placement),variation:yh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,XD(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,XD(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Lre={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fre,data:{}};var Fv={passive:!0};function Nre(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,a=s===void 0?!0:s,l=bi(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Fv)}),a&&l.addEventListener("resize",n.update,Fv),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Fv)}),a&&l.removeEventListener("resize",n.update,Fv)}}const Vre={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Nre,data:{}};var Bre={left:"right",right:"left",bottom:"top",top:"bottom"};function Bb(e){return e.replace(/left|right|bottom|top/g,function(t){return Bre[t]})}var jre={start:"end",end:"start"};function JD(e){return e.replace(/start|end/g,function(t){return jre[t]})}function uT(e){var t=bi(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function cT(e){return gh(Uu(e)).left+uT(e).scrollLeft}function zre(e,t){var n=bi(e),r=Uu(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var u=Lz();(u||!u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+cT(e),y:l}}function Ure(e){var t,n=Uu(e),r=uT(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Dc(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Dc(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+cT(e),l=-r.scrollTop;return yl(o||n).direction==="rtl"&&(a+=Dc(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function dT(e){var t=yl(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function zz(e){return["html","body","#document"].indexOf(Ea(e))>=0?e.ownerDocument.body:qi(e)&&dT(e)?e:zz(DC(e))}function $m(e,t){var n;t===void 0&&(t=[]);var r=zz(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=bi(r),s=o?[i].concat(i.visualViewport||[],dT(r)?r:[]):r,a=t.concat(s);return o?a:a.concat($m(DC(s)))}function MI(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Hre(e,t){var n=gh(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function ZD(e,t,n){return t===$z?MI(zre(e,n)):Zc(t)?Hre(t,n):MI(Ure(Uu(e)))}function Wre(e){var t=$m(DC(e)),n=["absolute","fixed"].indexOf(yl(e).position)>=0,r=n&&qi(e)?yy(e):e;return Zc(r)?t.filter(function(o){return Zc(o)&&Nz(o,r)&&Ea(o)!=="body"}):[]}function Gre(e,t,n,r){var o=t==="clippingParents"?Wre(e):[].concat(t),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(l,u){var c=ZD(e,u,r);return l.top=Dc(c.top,l.top),l.right=X0(c.right,l.right),l.bottom=X0(c.bottom,l.bottom),l.left=Dc(c.left,l.left),l},ZD(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Uz(e){var t=e.reference,n=e.element,r=e.placement,o=r?ha(r):null,i=r?yh(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(o){case qo:l={x:s,y:t.y-n.height};break;case Ji:l={x:s,y:t.y+t.height};break;case Zi:l={x:t.x+t.width,y:a};break;case Ko:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=o?lT(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case ph:l[u]=l[u]-(t[c]/2-n[c]/2);break;case Cg:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function xg(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,s=i===void 0?e.strategy:i,a=n.boundary,l=a===void 0?fre:a,u=n.rootBoundary,c=u===void 0?$z:u,d=n.elementContext,f=d===void 0?Op:d,h=n.altBoundary,p=h===void 0?!1:h,g=n.padding,b=g===void 0?0:g,y=Bz(typeof b!="number"?b:jz(b,gy)),v=f===Op?hre:Op,w=e.rects.popper,C=e.elements[p?v:f],A=Gre(Zc(C)?C:C.contextElement||Uu(e.elements.popper),l,c,s),S=gh(e.elements.reference),_=Uz({reference:S,element:w,strategy:"absolute",placement:o}),k=MI(Object.assign({},w,_)),M=f===Op?k:S,R={top:A.top-M.top+y.top,bottom:M.bottom-A.bottom+y.bottom,left:A.left-M.left+y.left,right:M.right-A.right+y.right},O=e.modifiersData.offset;if(f===Op&&O){var F=O[o];Object.keys(R).forEach(function(N){var V=[Zi,Ji].indexOf(N)>=0?1:-1,$=[qo,Ji].indexOf(N)>=0?"y":"x";R[N]+=F[$]*V})}return R}function qre(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Fz:l,c=yh(r),d=c?a?QD:QD.filter(function(p){return yh(p)===c}):gy,f=d.filter(function(p){return u.indexOf(p)>=0});f.length===0&&(f=d);var h=f.reduce(function(p,g){return p[g]=xg(e,{placement:g,boundary:o,rootBoundary:i,padding:s})[ha(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}function Kre(e){if(ha(e)===iT)return[];var t=Bb(e);return[JD(e),t,JD(t)]}function Qre(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=h===void 0?!0:h,g=n.allowedAutoPlacements,b=t.options.placement,y=ha(b),v=y===b,w=l||(v||!p?[Bb(b)]:Kre(b)),C=[b].concat(w).reduce(function(G,Q){return G.concat(ha(Q)===iT?qre(t,{placement:Q,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:g}):Q)},[]),A=t.rects.reference,S=t.rects.popper,_=new Map,k=!0,M=C[0],R=0;R<C.length;R++){var O=C[R],F=ha(O),N=yh(O)===ph,V=[qo,Ji].indexOf(F)>=0,$=V?"width":"height",D=xg(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),L=V?N?Zi:Ko:N?Ji:qo;A[$]>S[$]&&(L=Bb(L));var P=Bb(L),B=[];if(i&&B.push(D[F]<=0),a&&B.push(D[L]<=0,D[P]<=0),B.every(function(G){return G})){M=O,k=!1;break}_.set(O,B)}if(k)for(var E=p?3:1,z=function(Q){var ee=C.find(function(Y){var se=_.get(Y);if(se)return se.slice(0,Q).every(function(fe){return fe})});if(ee)return M=ee,"break"},H=E;H>0;H--){var j=z(H);if(j==="break")break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}}const Yre={name:"flip",enabled:!0,phase:"main",fn:Qre,requiresIfExists:["offset"],data:{_skip:!1}};function e$(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function t$(e){return[qo,Zi,Ji,Ko].some(function(t){return e[t]>=0})}function Xre(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=xg(t,{elementContext:"reference"}),a=xg(t,{altBoundary:!0}),l=e$(s,r),u=e$(a,o,i),c=t$(l),d=t$(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const Jre={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Xre};function Zre(e,t,n){var r=ha(e),o=[Ko,qo].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Ko,Zi].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function eoe(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,s=Fz.reduce(function(c,d){return c[d]=Zre(d,t.rects,i),c},{}),a=s[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}const toe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eoe};function noe(e){var t=e.state,n=e.name;t.modifiersData[n]=Uz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const roe={name:"popperOffsets",enabled:!0,phase:"read",fn:noe,data:{}};function ooe(e){return e==="x"?"y":"x"}function ioe(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,p=n.tetherOffset,g=p===void 0?0:p,b=xg(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),y=ha(t.placement),v=yh(t.placement),w=!v,C=lT(y),A=ooe(C),S=t.modifiersData.popperOffsets,_=t.rects.reference,k=t.rects.popper,M=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,R=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(S){if(i){var N,V=C==="y"?qo:Ko,$=C==="y"?Ji:Zi,D=C==="y"?"height":"width",L=S[C],P=L+b[V],B=L-b[$],E=h?-k[D]/2:0,z=v===ph?_[D]:k[D],H=v===ph?-k[D]:-_[D],j=t.elements.arrow,G=h&&j?aT(j):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Vz(),ee=Q[V],Y=Q[$],se=Dm(0,_[D],G[D]),fe=w?_[D]/2-E-se-ee-R.mainAxis:z-se-ee-R.mainAxis,ve=w?-_[D]/2+E+se+Y+R.mainAxis:H+se+Y+R.mainAxis,oe=t.elements.arrow&&yy(t.elements.arrow),ye=oe?C==="y"?oe.clientTop||0:oe.clientLeft||0:0,we=(N=O==null?void 0:O[C])!=null?N:0,me=L+fe-we-ye,be=L+ve-we,ie=Dm(h?X0(P,me):P,L,h?Dc(B,be):B);S[C]=ie,F[C]=ie-L}if(a){var pe,U=C==="x"?qo:Ko,q=C==="x"?Ji:Zi,K=S[A],ae=A==="y"?"height":"width",ue=K+b[U],Z=K-b[q],X=[qo,Ko].indexOf(y)!==-1,W=(pe=O==null?void 0:O[A])!=null?pe:0,le=X?ue:K-_[ae]-k[ae]-W+R.altAxis,_e=X?K+_[ae]+k[ae]-W-R.altAxis:Z,ne=h&&X?Pre(le,K,_e):Dm(h?le:ue,K,h?_e:Z);S[A]=ne,F[A]=ne-K}t.modifiersData[r]=F}}const soe={name:"preventOverflow",enabled:!0,phase:"main",fn:ioe,requiresIfExists:["offset"]};function aoe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function loe(e){return e===bi(e)||!qi(e)?uT(e):aoe(e)}function uoe(e){var t=e.getBoundingClientRect(),n=mh(t.width)/e.offsetWidth||1,r=mh(t.height)/e.offsetHeight||1;return n!==1||r!==1}function coe(e,t,n){n===void 0&&(n=!1);var r=qi(t),o=qi(t)&&uoe(t),i=Uu(t),s=gh(e,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ea(t)!=="body"||dT(i))&&(a=loe(t)),qi(t)?(l=gh(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=cT(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function doe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function foe(e){var t=doe(e);return Sre.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function hoe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function poe(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var n$={placement:"bottom",modifiers:[],strategy:"absolute"};function r$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function moe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?n$:o;return function(a,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},n$,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],f=!1,h={state:c,setOptions:function(y){var v=typeof y=="function"?y(c.options):y;g(),c.options=Object.assign({},i,c.options,v),c.scrollParents={reference:Zc(a)?$m(a):a.contextElement?$m(a.contextElement):[],popper:$m(l)};var w=foe(poe([].concat(r,c.options.modifiers)));return c.orderedModifiers=w.filter(function(C){return C.enabled}),p(),h.update()},forceUpdate:function(){if(!f){var y=c.elements,v=y.reference,w=y.popper;if(r$(v,w)){c.rects={reference:coe(v,yy(w),c.options.strategy==="fixed"),popper:aT(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(R){return c.modifiersData[R.name]=Object.assign({},R.data)});for(var C=0;C<c.orderedModifiers.length;C++){if(c.reset===!0){c.reset=!1,C=-1;continue}var A=c.orderedModifiers[C],S=A.fn,_=A.options,k=_===void 0?{}:_,M=A.name;typeof S=="function"&&(c=S({state:c,options:k,name:M,instance:h})||c)}}}},update:hoe(function(){return new Promise(function(b){h.forceUpdate(),b(c)})}),destroy:function(){g(),f=!0}};if(!r$(a,l))return h;h.setOptions(u).then(function(b){!f&&u.onFirstUpdate&&u.onFirstUpdate(b)});
134function p(){c.orderedModifiers.forEach(function(b){var y=b.name,v=b.options,w=v===void 0?{}:v,C=b.effect;if(typeof C=="function"){var A=C({state:c,name:y,instance:h,options:w}),S=function(){};d.push(A||S)}})}function g(){d.forEach(function(b){return b()}),d=[]}return h}}var goe=[Vre,roe,Lre,Ire,toe,Yre,soe,Mre,Jre],yoe=moe({defaultModifiers:goe});const Hz="Popper";function voe(e){return Oz(Hz,e)}Kne(Hz,["root"]);const boe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],woe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Coe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function DI(e){return typeof e=="function"?e():e}function xoe(e){return e.nodeType!==void 0}const Soe=()=>Re({root:["root"]},Gte(voe)),_oe={},Eoe=m.forwardRef(function(t,n){var r;const{anchorEl:o,children:i,direction:s,disablePortal:a,modifiers:l,open:u,placement:c,popperOptions:d,popperRef:f,slotProps:h={},slots:p={},TransitionProps:g}=t,b=de(t,boe),y=m.useRef(null),v=bt(y,n),w=m.useRef(null),C=bt(w,f),A=m.useRef(C);Bt(()=>{A.current=C},[C]),m.useImperativeHandle(f,()=>w.current,[]);const S=Coe(c,s),[_,k]=m.useState(S),[M,R]=m.useState(DI(o));m.useEffect(()=>{w.current&&w.current.forceUpdate()}),m.useEffect(()=>{o&&R(DI(o))},[o]),Bt(()=>{if(!M||!u)return;const $=P=>{k(P.placement)};let D=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:P})=>{$(P)}}];l!=null&&(D=D.concat(l)),d&&d.modifiers!=null&&(D=D.concat(d.modifiers));const L=yoe(M,y.current,x({placement:S},d,{modifiers:D}));return A.current(L),()=>{L.destroy(),A.current(null)}},[M,a,l,u,d,S]);const O={placement:_};g!==null&&(O.TransitionProps=g);const F=Soe(),N=(r=p.root)!=null?r:"div",V=Wn({elementType:N,externalSlotProps:h.root,externalForwardedProps:b,additionalProps:{role:"tooltip",ref:v},ownerState:t,className:F.root});return T.jsx(N,x({},V,{children:typeof i=="function"?i(O):i}))}),Ioe=m.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:f=_oe,popperRef:h,style:p,transition:g=!1,slotProps:b={},slots:y={}}=t,v=de(t,woe),[w,C]=m.useState(!0),A=()=>{C(!1)},S=()=>{C(!0)};if(!l&&!c&&(!g||w))return null;let _;if(i)_=i;else if(r){const R=DI(r);_=R&&xoe(R)?un(R).body:un(null).body}const k=!c&&l&&(!g||w)?"none":void 0,M=g?{in:c,onEnter:A,onExited:S}:void 0;return T.jsx(Dz,{disablePortal:a,container:_,children:T.jsx(Eoe,x({anchorEl:r,direction:s,disablePortal:a,modifiers:u,ref:n,open:g?!w:c,placement:d,popperOptions:f,popperRef:h,slotProps:b,slots:y},v,{style:x({position:"fixed",top:0,left:0,display:k},p),TransitionProps:M,children:o}))})}),Aoe=2;function Wz(e,t){return e-t}function o$(e,t){var n;const{index:r}=(n=e.reduce((o,i,s)=>{const a=Math.abs(t-i);return o===null||a<o.distance||a===o.distance?{distance:a,index:s}:o},null))!=null?n:{};return r}function Lv(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function J0(e,t,n){return(e-t)*100/(n-t)}function koe(e,t,n){return(n-t)*e+t}function Poe(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Toe(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Poe(t)))}function i$({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(Wz)}function Nv({sliderRef:e,activeIndex:t,setActive:n}){var r,o;
134const i=un(e.current);if(!((r=e.current)!=null&&r.contains(i.activeElement))||Number(i==null||(o=i.activeElement)==null?void 0:o.getAttribute("data-index"))!==t){var s;(s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()}n&&n(t)}function Vv(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?Ute(e,t):!1}const Roe={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},Ooe=e=>e;let Bv;function s$(){return Bv===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Bv=CSS.supports("touch-action","none"):Bv=!0),Bv}function Moe(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:o=!1,isRtl:i=!1,marks:s=!1,max:a=100,min:l=0,name:u,onChange:c,onChangeCommitted:d,orientation:f="horizontal",rootRef:h,scale:p=Ooe,step:g=1,shiftStep:b=10,tabIndex:y,value:v}=e,w=m.useRef(),[C,A]=m.useState(-1),[S,_]=m.useState(-1),[k,M]=m.useState(!1),R=m.useRef(0),[O,F]=fa({controlled:v,default:n??l,name:"Slider"}),N=c&&((ne,te,ke)=>{const Ve=ne.nativeEvent||ne,Fe=new Ve.constructor(Ve.type,Ve);Object.defineProperty(Fe,"target",{writable:!0,value:{value:te,name:u}}),c(Fe,te,ke)}),V=Array.isArray(O);let $=V?O.slice().sort(Wz):[O];$=$.map(ne=>ne==null?l:lc(ne,l,a));const D=s===!0&&g!==null?[...Array(Math.floor((a-l)/g)+1)].map((ne,te)=>({value:l+g*te})):s||[],L=D.map(ne=>ne.value),{isFocusVisibleRef:P,onBlur:B,onFocus:E,ref:z}=py(),[H,j]=m.useState(-1),G=m.useRef(),Q=bt(z,G),ee=bt(h,Q),Y=ne=>te=>{var ke;const Ve=Number(te.currentTarget.getAttribute("data-index"));E(te),P.current===!0&&j(Ve),_(Ve),ne==null||(ke=ne.onFocus)==null||ke.call(ne,te)},se=ne=>te=>{var ke;B(te),P.current===!1&&j(-1),_(-1),ne==null||(ke=ne.onBlur)==null||ke.call(ne,te)},fe=(ne,te)=>{const ke=Number(ne.currentTarget.getAttribute("data-index")),Ve=$[ke],Fe=L.indexOf(Ve);let Ie=te;if(D&&g==null){const Be=L[L.length-1];Ie>Be?Ie=Be:Ie<L[0]?Ie=L[0]:Ie=Ie<Ve?L[Fe-1]:L[Fe+1]}if(Ie=lc(Ie,l,a),V){o&&(Ie=lc(Ie,$[ke-1]||-1/0,$[ke+1]||1/0));const Be=Ie;Ie=i$({values:$,newValue:Ie,index:ke});let Ee=ke;o||(Ee=Ie.indexOf(Be)),Nv({sliderRef:G,activeIndex:Ee})}F(Ie),j(ke),N&&!Vv(Ie,O)&&N(ne,Ie,ke),d&&d(ne,Ie)},ve=ne=>te=>{var ke;if(g!==null){const Ve=Number(te.currentTarget.getAttribute("data-index")),Fe=$[Ve];let Ie=null;(te.key==="ArrowLeft"||te.key==="ArrowDown")&&te.shiftKey||te.key==="PageDown"?Ie=Math.max(Fe-b,l):((te.key==="ArrowRight"||te.key==="ArrowUp")&&te.shiftKey||te.key==="PageUp")&&(Ie=Math.min(Fe+b,a)),Ie!==null&&(fe(te,Ie),te.preventDefault())}ne==null||(ke=ne.onKeyDown)==null||ke.call(ne,te)};Bt(()=>{if(r&&G.current.contains(document.activeElement)){var ne;(ne=document.activeElement)==null||ne.blur()}},[r]),r&&C!==-1&&A(-1),r&&H!==-1&&j(-1);const oe=ne=>te=>{var ke;(ke=ne.onChange)==null||ke.call(ne,te),fe(te,te.target.valueAsNumber)},ye=m.useRef();let we=f;i&&f==="horizontal"&&(we+="-reverse");const me=({finger:ne,move:te=!1})=>{const{current:ke}=G,{width:Ve,height:Fe,bottom:Ie,left:Be}=ke.getBoundingClientRect();let Ee;we.indexOf("vertical")===0?Ee=(Ie-ne.y)/Fe:Ee=(ne.x-Be)/Ve,we.indexOf("-reverse")!==-1&&(Ee=1-Ee);let Te;if(Te=koe(Ee,l,a),g)Te=Toe(Te,g,l);else{const lt=o$(L,Te);Te=L[lt]}Te=lc(Te,l,a);let We=0;if(V){te?We=ye.current:We=o$($,Te),o&&(Te=lc(Te,$[We-1]||-1/0,$[We+1]||1/0));const lt=Te;Te=i$({values:$,newValue:Te,index:We}),o&&te||(We=Te.indexOf(lt),ye.current=We)}return{newValue:Te,activeIndex:We}},be=Vt(ne=>{const te=Lv(ne,w);if(!te)return;if(R.current+=1,ne.type==="mousemove"&&ne.buttons===0){ie(ne);return}const{newValue:ke,activeIndex:Ve}=me({finger:te,move:!0});Nv({sliderRef:G,activeIndex:Ve,setActive:A}),F(ke),!k&&R.current>Aoe&&M(!0),N&&!Vv(ke,O)&&N(ne,ke,Ve)}),ie=Vt(ne=>{const te=Lv(ne,w);if(M(!1),!te)return;const{newValue:ke}=me({finger:te,move:!0});A(-1),ne.type==="touchend"&&_(-1),d&&d(ne,ke),w.current=void 0,U()}),pe=Vt(ne=>{if(r)return;s$()||ne.preventDefault();const te=ne.changedTouches[0];te!=null&&(w.current=te.identifier);const ke=Lv(ne,w);if(ke!==!1){const{newValue:Fe,activeIndex:Ie}=me({finger:ke});Nv({sliderRef:G,activeIndex:Ie,setActive:A}),F(Fe),N&&!Vv(Fe,O)&&N(ne,Fe,Ie)}R.current=0;const Ve=un(G.current);Ve.addEventListener("touchmove",be,{passive:!0}),Ve.addEventListener("touchend",ie,{passive:!0})}),U=m.useCallback(()=>{const ne=un(G.current);ne.removeEventListener("mousemove",be),ne.removeEventListener("mouseup",ie),ne.removeEventListener("touchmove",be),ne.removeEventListener("touchend",ie)},[ie,be]);m.useEffect(()=>{const{current:ne}=G;return ne.addEventListener("touchstart",pe,{passive:s$()}),()=>{ne.removeEventListener("touchstart",pe),U()}},[U,pe]),m.useEffect(()=>{r&&U()},[r,U]);const q=ne=>te=>{var ke;if((ke=ne.onMouseDown)==null||ke.call(ne,te),r||te.defaultPrevented||te.button!==0)return;te.preventDefault();const Ve=Lv(te,w);if(Ve!==!1){const{newValue:Ie,activeIndex:Be}=me({finger:Ve});Nv({sliderRef:G,activeIndex:Be,setActive:A}),F(Ie),N&&!Vv(Ie,O)&&N(te,Ie,Be)}R.current=0;const Fe=un(G.current);Fe.addEventListener("mousemove",be,{passive:!0}),Fe.addEventListener("mouseup",ie)},K=J0(V?$[0]:l,l,a),ae=J0($[$.length-1],l,a)-K,ue=(ne={})=>{const te=Mc(ne),ke={onMouseDown:q(te||{})},Ve=x({},te,ke);return x({},ne,{ref:ee},Ve)}
134,Z=ne=>te=>{var ke;(ke=ne.onMouseOver)==null||ke.call(ne,te);const Ve=Number(te.currentTarget.getAttribute("data-index"));_(Ve)},X=ne=>te=>{var ke;(ke=ne.onMouseLeave)==null||ke.call(ne,te),_(-1)};return{active:C,axis:we,axisProps:Roe,dragging:k,focusedThumbIndex:H,getHiddenInputProps:(ne={})=>{var te;const ke=Mc(ne),Ve={onChange:oe(ke||{}),onFocus:Y(ke||{}),onBlur:se(ke||{}),onKeyDown:ve(ke||{})},Fe=x({},ke,Ve);return x({tabIndex:y,"aria-labelledby":t,"aria-orientation":f,"aria-valuemax":p(a),"aria-valuemin":p(l),name:u,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(te=e.step)!=null?te:void 0,disabled:r},ne,Fe,{style:x({},UZ,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:ue,getThumbProps:(ne={})=>{const te=Mc(ne),ke={onMouseOver:Z(te||{}),onMouseLeave:X(te||{})};return x({},ne,te,ke)},marks:D,open:S,range:V,rootRef:ee,trackLeap:ae,trackOffset:K,values:$,getThumbStyle:ne=>({pointerEvents:C!==-1&&C!==ne?"none":void 0})}}function Doe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,s=gc();m.useEffect(()=>{if(!o)return;function y(v){v.defaultPrevented||(v.key==="Escape"||v.key==="Esc")&&(r==null||r(v,"escapeKeyDown"))}return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[o,r]);const a=Vt((y,v)=>{r==null||r(y,v)}),l=Vt(y=>{!r||y==null||s.start(y,()=>{a(null,"timeout")})});m.useEffect(()=>(o&&l(t),s.clear),[o,t,l,s]);const u=y=>{r==null||r(y,"clickaway")},c=s.clear,d=m.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),f=y=>v=>{const w=y.onBlur;w==null||w(v),d()},h=y=>v=>{const w=y.onFocus;w==null||w(v),c()},p=y=>v=>{const w=y.onMouseEnter;w==null||w(v),c()},g=y=>v=>{const w=y.onMouseLeave;w==null||w(v),d()};return m.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",d),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",c)}},[n,o,d,c]),{getRootProps:(y={})=>{const v=x({},Mc(e),Mc(y));return x({role:"presentation"},y,v,{onBlur:f(v),onFocus:h(v),onMouseEnter:p(v),onMouseLeave:g(v)})},onClickAway:u}}const $oe=["onChange","maxRows","minRows","style","value"];function jv(e){return parseInt(e,10)||0}const Foe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Loe(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const Gz=m.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:s,value:a}=t,l=de(t,$oe),{current:u}=m.useRef(a!=null),c=m.useRef(null),d=bt(n,c),f=m.useRef(null),h=m.useCallback(()=>{const b=c.current,v=vi(b).getComputedStyle(b);if(v.width==="0px")return{outerHeightStyle:0,overflowing:!1};const w=f.current;w.style.width=v.width,w.value=b.value||t.placeholder||"x",w.value.slice(-1)===`
135`&&(w.value+=" ");const C=v.boxSizing,A=jv(v.paddingBottom)+jv(v.paddingTop),S=jv(v.borderBottomWidth)+jv(v.borderTopWidth),_=w.scrollHeight;w.value="x";const k=w.scrollHeight;let M=_;i&&(M=Math.max(Number(i)*k,M)),o&&(M=Math.min(Number(o)*k,M)),M=Math.max(M,k);const R=M+(C==="border-box"?A+S:0),O=Math.abs(M-_)<=1;return{outerHeightStyle:R,overflowing:O}},[o,i,t.placeholder]),p=m.useCallback(()=>{const b=h();if(Loe(b))return;const y=c.current;y.style.height=`${b.outerHeightStyle}px`,y.style.overflow=b.overflowing?"hidden":""},[h]);Bt(()=>{const b=()=>{p()};let y;const v=zu(b),w=c.current,C=vi(w);C.addEventListener("resize",v);let A;return typeof ResizeObserver<"u"&&(A=new ResizeObserver(b),A.observe(w)),()=>{v.clear(),cancelAnimationFrame(y),C.removeEventListener("resize",v),A&&A.disconnect()}},[h,p]),Bt(()=>{p()});const g=b=>{u||p(),r&&r(b)};return T.jsxs(m.Fragment,{children:[T.jsx("textarea",x({value:a,onChange:g,ref:d,rows:i,style:s},l)),T.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:x({},Foe.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function a$(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function fT(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:s=!1}=e;return(a,{inputValue:l,getOptionLabel:u})=>{let c=s?l.trim():l;n&&(c=c.toLowerCase()),t&&(c=a$(c));const d=c?a.filter(f=>{let h=(i||u)(f);return n&&(h=h.toLowerCase()),t&&(h=a$(h)),o==="start"?h.indexOf(c)===0:h.indexOf(c)>-1}):a;return typeof r=="number"?d.slice(0,r):d}}function zv(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}const Noe=fT(),l$=5,Voe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))};function Boe(e){const{unstable_isActiveElementInListbox:t=Voe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:s=!1,clearOnBlur:a=!e.freeSolo,clearOnEscape:l=!1,componentName:u="useAutocomplete",defaultValue:c=e.multiple?[]:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:h,disabledItemsFocusable:p=!1,disableListWrap:g=!1,filterOptions:b=Noe,filterSelectedOptions:y=!1,freeSolo:v=!1,getOptionDisabled:w,getOptionKey:C,getOptionLabel:A=Se=>{var Ce;return(Ce=Se.label)!=null?Ce:Se},groupBy:S,handleHomeEndKeys:_=!e.freeSolo,id:k,includeInputInList:M=!1,inputValue:R,isOptionEqualToValue:O=(Se,Ce)=>Se===Ce,multiple:F=!1,onChange:N,onClose:V,onHighlightChange:$,onInputChange:D,onOpen:L,open:P,openOnFocus:B=!1,options:E,readOnly:z=!1,selectOnFocus:H=!e.freeSolo,value:j}=e,G=Jt(k);let Q=A;Q=Se=>{const Ce=A(Se);return typeof Ce!="string"?String(Ce):Ce};const ee=m.useRef(!1),Y=m.useRef(!0),se=m.useRef(null),fe=m.useRef(null),[ve,oe]=m.useState(null),[ye,we]=m.useState(-1),me=o?0:-1,be=m.useRef(me),[ie,pe]=fa({controlled:j,default:c,name:u}),[U,q]=fa({controlled:R,default:"",name:u,state:"inputValue"}
135),[K,ae]=m.useState(!1),ue=m.useCallback((Se,Ce)=>{if(!(F?ie.length<Ce.length:Ce!==null)&&!a)return;let Le;if(F)Le="";else if(Ce==null)Le="";else{const st=Q(Ce);Le=typeof st=="string"?st:""}U!==Le&&(q(Le),D&&D(Se,Le,"reset"))},[Q,U,F,D,q,a,ie]),[Z,X]=fa({controlled:P,default:!1,name:u,state:"open"}),[W,le]=m.useState(!0),_e=!F&&ie!=null&&U===Q(ie),ne=Z&&!z,te=ne?b(E.filter(Se=>!(y&&(F?ie:[ie]).some(Ce=>Ce!==null&&O(Se,Ce)))),{inputValue:_e&&W?"":U,getOptionLabel:Q}):[],ke=QP({filteredOptions:te,value:ie,inputValue:U});m.useEffect(()=>{const Se=ie!==ke.value;K&&!Se||v&&!Se||ue(null,ie)},[ie,ue,K,ke.value,v]);const Ve=Z&&te.length>0&&!z,Fe=Vt(Se=>{Se===-1?se.current.focus():ve.querySelector(`[data-tag-index="${Se}"]`).focus()});m.useEffect(()=>{F&&ye>ie.length-1&&(we(-1),Fe(-1))},[ie,F,ye,Fe]);function Ie(Se,Ce){if(!fe.current||Se<0||Se>=te.length)return-1;let je=Se;for(;;){const Le=fe.current.querySelector(`[data-option-index="${je}"]`),st=p?!1:!Le||Le.disabled||Le.getAttribute("aria-disabled")==="true";if(Le&&Le.hasAttribute("tabindex")&&!st)return je;if(Ce==="next"?je=(je+1)%te.length:je=(je-1+te.length)%te.length,je===Se)return-1}}const Be=Vt(({event:Se,index:Ce,reason:je="auto"})=>{if(be.current=Ce,Ce===-1?se.current.removeAttribute("aria-activedescendant"):se.current.setAttribute("aria-activedescendant",`${G}-option-${Ce}`),$&&$(Se,Ce===-1?null:te[Ce],je),!fe.current)return;const Le=fe.current.querySelector(`[role="option"].${n}-focused`);Le&&(Le.classList.remove(`${n}-focused`),Le.classList.remove(`${n}-focusVisible`));let st=fe.current;if(fe.current.getAttribute("role")!=="listbox"&&(st=fe.current.parentElement.querySelector('[role="listbox"]')),!st)return;if(Ce===-1){st.scrollTop=0;return}const et=fe.current.querySelector(`[data-option-index="${Ce}"]`);if(et&&(et.classList.add(`${n}-focused`),je==="keyboard"&&et.classList.add(`${n}-focusVisible`),st.scrollHeight>st.clientHeight&&je!=="mouse"&&je!=="touch")){const Ot=et,Vs=st.clientHeight+st.scrollTop,G2=Ot.offsetTop+Ot.offsetHeight;G2>Vs?st.scrollTop=G2-st.clientHeight:Ot.offsetTop-Ot.offsetHeight*(S?1.3:0)<st.scrollTop&&(st.scrollTop=Ot.offsetTop-Ot.offsetHeight*(S?1.3:0))}}),Ee=Vt(({event:Se,diff:Ce,direction:je="next",reason:Le="auto"})=>{if(!ne)return;const et=Ie((()=>{const Ot=te.length-1;if(Ce==="reset")return me;if(Ce==="start")return 0;if(Ce==="end")return Ot;const Vs=be.current+Ce;return Vs<0?Vs===-1&&M?-1:g&&be.current!==-1||Math.abs(Ce)>1?0:Ot:Vs>Ot?Vs===Ot+1&&M?-1:g||Math.abs(Ce)>1?Ot:0:Vs})(),je);if(Be({index:et,reason:Le,event:Se}),r&&Ce!=="reset")if(et===-1)se.current.value=U;else{const Ot=Q(te[et]);se.current.value=Ot,Ot.toLowerCase().indexOf(U.toLowerCase())===0&&U.length>0&&se.current.setSelectionRange(U.length,Ot.length)}}),Te=()=>{const Se=(Ce,je)=>{const Le=Ce?Q(Ce):"",st=je?Q(je):"";return Le===st};if(be.current!==-1&&ke.filteredOptions&&ke.filteredOptions.length!==te.length&&ke.inputValue===U&&(F?ie.length===ke.value.length&&ke.value.every((Ce,je)=>Q(ie[je])===Q(Ce)):Se(ke.value,ie))){const Ce=ke.filteredOptions[be.current];if(Ce)return zv(te,je=>Q(je)===Q(Ce))}return-1},We=m.useCallback(()=>{if(!ne)return;const Se=Te();if(Se!==-1){be.current=Se;return}const Ce=F?ie[0]:ie;if(te.length===0||Ce==null){Ee({diff:"reset"});return}if(fe.current){if(Ce!=null){const je=te[be.current];if(F&&je&&zv(ie,st=>O(je,st))!==-1)return;const Le=zv(te,st=>O(st,Ce));Le===-1?Ee({diff:"reset"}):Be({index:Le});return}if(be.current>=te.length-1){Be({index:te.length-1});return}Be({index:be.current})}},[te.length,F?!1:ie,y,Ee,Be,ne,U,F]),lt=Vt(Se=>{bg(fe,Se),Se&&We()});m.useEffect(()=>{We()},[We]);const xt=Se=>{Z||(X(!0),le(!0),L&&L(Se))},Wt=(Se,Ce)=>{Z&&(X(!1),V&&V(Se,Ce))},en=(Se,Ce,je,Le)=>{if(F){if(ie.length===Ce.length&&ie.every((st,et)=>st===Ce[et]))return}else if(ie===Ce)return;N&&N(Se,Ce,je,Le),pe(Ce)},Bn=m.useRef(!1),dn=(Se,Ce,je="selectOption",Le="options")=>{let st=je,et=Ce;if(F){et=Array.isArray(ie)?ie.slice():[];const Ot=zv(et,Vs=>O(Ce,Vs));Ot===-1?et.push(Ce):Le!=="freeSolo"&&(et.splice(Ot,1),st="removeOption")}ue(Se,et),en(Se,et,st,{option:Ce}),!f&&(!Se||!Se.ctrlKey&&!Se.metaKey)&&Wt(Se,st),(s===!0||s==="touch"&&Bn.current||s==="mouse"&&!Bn.current)&&se.current.blur()};function jt(Se,Ce){if(Se===-1)return-1;let je=Se;for(;;){if(Ce==="next"&&je===ie.length||Ce==="previous"&&je===-1)return-1;const Le=ve.querySelector(`[data-tag-index="${je}"]`);if(!Le||!Le.hasAttribute("tabindex")||Le.disabled||Le.getAttribute("aria-disabled")==="true")je+=Ce==="next"?1:-1;else return je}}const zt=(Se,Ce)=>{if(!F)return;U===""&&Wt(Se,"toggleInput");let je=ye;ye===-1?U===""&&Ce==="previous"&&(je=ie.length-1):(je+=Ce==="next"?1:-1,je<0&&(je=0),je===ie.length&&(je=-1)),je=jt(je,Ce),we(je),Fe(je)},is=Se=>{ee.current=!0,q(""),D&&D(Se,"","clear"),en(Se,F?[]:null,"clear")},ss=Se=>Ce=>{if(Se.onKeyDown&&Se.onKeyDown(Ce),!Ce.defaultMuiPrevented&&(ye!==-1&&["ArrowLeft","ArrowRight"].indexOf(Ce.ke
135y)===-1&&(we(-1),Fe(-1)),Ce.which!==229))switch(Ce.key){case"Home":ne&&_&&(Ce.preventDefault(),Ee({diff:"start",direction:"next",reason:"keyboard",event:Ce}));break;case"End":ne&&_&&(Ce.preventDefault(),Ee({diff:"end",direction:"previous",reason:"keyboard",event:Ce}));break;case"PageUp":Ce.preventDefault(),Ee({diff:-l$,direction:"previous",reason:"keyboard",event:Ce}),xt(Ce);break;case"PageDown":Ce.preventDefault(),Ee({diff:l$,direction:"next",reason:"keyboard",event:Ce}),xt(Ce);break;case"ArrowDown":Ce.preventDefault(),Ee({diff:1,direction:"next",reason:"keyboard",event:Ce}),xt(Ce);break;case"ArrowUp":Ce.preventDefault(),Ee({diff:-1,direction:"previous",reason:"keyboard",event:Ce}),xt(Ce);break;case"ArrowLeft":zt(Ce,"previous");break;case"ArrowRight":zt(Ce,"next");break;case"Enter":if(be.current!==-1&&ne){const je=te[be.current],Le=w?w(je):!1;if(Ce.preventDefault(),Le)return;dn(Ce,je,"selectOption"),r&&se.current.setSelectionRange(se.current.value.length,se.current.value.length)}else v&&U!==""&&_e===!1&&(F&&Ce.preventDefault(),dn(Ce,U,"createOption","freeSolo"));break;case"Escape":ne?(Ce.preventDefault(),Ce.stopPropagation(),Wt(Ce,"escape")):l&&(U!==""||F&&ie.length>0)&&(Ce.preventDefault(),Ce.stopPropagation(),is(Ce));break;case"Backspace":if(F&&!z&&U===""&&ie.length>0){const je=ye===-1?ie.length-1:ye,Le=ie.slice();Le.splice(je,1),en(Ce,Le,"removeOption",{option:ie[je]})}break;case"Delete":if(F&&!z&&U===""&&ie.length>0&&ye!==-1){const je=ye,Le=ie.slice();Le.splice(je,1),en(Ce,Le,"removeOption",{option:ie[je]})}break}},Ls=Se=>{ae(!0),B&&!ee.current&&xt(Se)},Ur=Se=>{if(t(fe)){se.current.focus();return}ae(!1),Y.current=!0,ee.current=!1,i&&be.current!==-1&&ne?dn(Se,te[be.current],"blur"):i&&v&&U!==""?dn(Se,U,"blur","freeSolo"):a&&ue(Se,ie),Wt(Se,"blur")},In=Se=>{const Ce=Se.target.value;U!==Ce&&(q(Ce),le(!1),D&&D(Se,Ce,"input")),Ce===""?!d&&!F&&en(Se,null,"clear"):xt(Se)},tn=Se=>{const Ce=Number(Se.currentTarget.getAttribute("data-option-index"));be.current!==Ce&&Be({event:Se,index:Ce,reason:"mouse"})},er=Se=>{Be({event:Se,index:Number(Se.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Bn.current=!0},vr=Se=>{const Ce=Number(Se.currentTarget.getAttribute("data-option-index"));dn(Se,te[Ce],"selectOption"),Bn.current=!1},Oo=Se=>Ce=>{const je=ie.slice();je.splice(Se,1),en(Ce,je,"removeOption",{option:ie[Se]})},Ns=Se=>{Z?Wt(Se,"toggleInput"):xt(Se)},yo=Se=>{Se.currentTarget.contains(Se.target)&&Se.target.getAttribute("id")!==G&&Se.preventDefault()},ki=Se=>{Se.currentTarget.contains(Se.target)&&(se.current.focus(),H&&Y.current&&se.current.selectionEnd-se.current.selectionStart===0&&se.current.select(),Y.current=!1)},Hr=Se=>{!h&&(U===""||!Z)&&Ns(Se)};let Ar=v&&U.length>0;Ar=Ar||(F?ie.length>0:ie!==null);let as=te;return S&&(as=te.reduce((Se,Ce,je)=>{const Le=S(Ce);return Se.length>0&&Se[Se.length-1].group===Le?Se[Se.length-1].options.push(Ce):Se.push({key:je,index:je,group:Le,options:[Ce]}),Se},[])),h&&K&&Ur(),{getRootProps:(Se={})=>x({"aria-owns":Ve?`${G}-listbox`:null},Se,{onKeyDown:ss(Se),onMouseDown:yo,onClick:ki}),getInputLabelProps:()=>({id:`${G}-label`,htmlFor:G}),getInputProps:()=>({id:G,value:U,onBlur:Ur,onFocus:Ls,onChange:In,onMouseDown:Hr,"aria-activedescendant":ne?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Ve?`${G}-listbox`:void 0,"aria-expanded":Ve,autoComplete:"off",ref:se,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:h}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:is}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Ns}),getTagProps:({index:Se})=>x({key:Se,"data-tag-index":Se,tabIndex:-1},!z&&{onDelete:Oo(Se)}),getListboxProps:()=>({role:"listbox",id:`${G}-listbox`,"aria-labelledby":`${G}-label`,ref:lt,onMouseDown:Se=>{Se.preventDefault()}}),getOptionProps:({index:Se,option:Ce})=>{var je;const Le=(F?ie:[ie]).some(et=>et!=null&&O(Ce,et)),st=w?w(Ce):!1;return{key:(je=C==null?void 0:C(Ce))!=null?je:Q(Ce),tabIndex:-1,role:"option",id:`${G}-option-${Se}`,onMouseMove:tn,onClick:vr,onTouchStart:er,"data-option-index":Se,"aria-disabled":st,"aria-selected":Le}},id:G,inputValue:U,value:ie,dirty:Ar,expanded:ne&&ve,popupOpen:ne,focu
135sed:K||ye!==-1,anchorEl:ve,setAnchorEl:oe,focusedTag:ye,groupedOptions:as}}var hT={};Object.defineProperty(hT,"__esModule",{value:!0});var qz=hT.default=void 0,joe=Uoe(m),zoe=Ez;function Kz(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Kz=function(r){return r?n:t})(e)}function Uoe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Kz(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function Hoe(e){return Object.keys(e).length===0}function Woe(e=null){const t=joe.useContext(zoe.ThemeContext);return!t||Hoe(t)?e:t}qz=hT.default=Woe;const Goe=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],qoe=he(Ioe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Koe=m.forwardRef(function(t,n){var r;const o=qz(),i=Je({props:t,name:"MuiPopper"}),{anchorEl:s,component:a,components:l,componentsProps:u,container:c,disablePortal:d,keepMounted:f,modifiers:h,open:p,placement:g,popperOptions:b,popperRef:y,transition:v,slots:w,slotProps:C}=i,A=de(i,Goe),S=(r=w==null?void 0:w.root)!=null?r:l==null?void 0:l.Root,_=x({anchorEl:s,container:c,disablePortal:d,keepMounted:f,modifiers:h,open:p,placement:g,popperOptions:b,popperRef:y,transition:v},A);return T.jsx(qoe,x({as:a,direction:o==null?void 0:o.direction,slots:{root:S},slotProps:C??u},_,{ref:n}))}),yd=Koe;function Qoe(e){return Ke("MuiListSubheader",e)}Qe("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Yoe=["className","color","component","disableGutters","disableSticky","inset"],Xoe=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,s={root:["root",n!=="default"&&`color${ge(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return Re(s,Qoe,t)},Joe=he("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ge(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>x({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),Qz=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:s="li",disableGutters:a=!1,disableSticky:l=!1,inset:u=!1}=r,c=de(r,Yoe),d=x({},r,{color:i,component:s,disableGutters:a,disableSticky:l,inset:u}),f=Xoe(d);return T.jsx(Joe,x({as:s,className:xe(f.root,o),ref:n,ownerState:d},c))});Qz.muiSkipListHighlight=!0;const Zoe=Qz,eie=Ze(T.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function tie(e){return Ke("MuiChip",e)}const nie=Qe("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Ut=nie,rie=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],oie=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:s,clickable:a,variant:l}=e,u={root:["root",l,n&&"disabled",`size${ge(r)}`,`color${ge(o)}`,a&&"clickable",a&&`clickableColor${ge(o)}`,s&&"deletable",s&&`deletableColor${ge(o)}`,`${l}${ge(o)}`],label:["label",`label${ge(r)}`],avatar:["avatar",`avatar${ge(r)}`,`avatarColor${ge(o)}`],icon:["icon",`icon${ge(r)}`,`iconColor${ge(i)}`],deleteIcon:["deleteIcon",`deleteIcon${ge(r)}`,`deleteIconColor${ge(o)}`,`deleteIcon${ge(l)}Color${ge(o)}`]};return Re(u,tie,t)},iie=he("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:s,size:a,variant:l}=n;return[{[`& .${Ut.avatar}`]:t.avatar},{[`& .${Ut.avatar}`]:t[`avatar${ge(a)}`]},{[`& .${Ut.avatar}`]:t[`avatarColor${ge(r)}`]},{[`& .${Ut.icon}`]:t.icon},{[`& .${Ut.icon}`]:t[`icon${ge(a)}`]},{[`& .${Ut.icon}`]:t[`iconColor${ge(o)}`]},{[`& .${Ut.deleteIcon}`]:t.deleteIcon},{[`& .${Ut.deleteIcon}`]:t[`deleteIcon${ge(a)}`]},{[`& .${Ut.deleteIcon}`]:t[`deleteIconColor${ge(r)}`]},{[`& .${Ut.deleteIcon}`]:t[`deleteIcon${ge(l)}Color${ge(r)}`]},t.root,t[`size${ge(a)}`],t[`color${ge(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${ge(r)})`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${ge(r)}`],t[l],t[`${l}${ge(r)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return x({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Ut.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Ut.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Ut.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Ut.avatarColorSecondary}
135`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Ut.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Ut.icon}`]:x({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&x({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${Ut.deleteIcon}`]:x({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:pt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:pt(e.palette.text.primary,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:pt(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Ut.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:pt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Ut.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>x({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:pt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Ut.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:pt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Ut.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>x({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Ut.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Ut.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Ut.avatar}`]:{marginLeft:4},[`& .${Ut.avatarSmall}`]:{marginLeft:2},[`& .${Ut.icon}`]:{marginLeft:4},[`& .${Ut.iconSmall}`]:{marginLeft:2},[`& .${Ut.deleteIcon}`]:{marginRight:5},[`& .${Ut.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:pt(e.palette[t.color].main,.7)}`,[`&.${Ut.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:pt(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Ut.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:pt(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Ut.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:pt(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),sie=he("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ge(r)}`]]}})(({ownerState:e})=>x({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function u$(e){return e.key==="Backspace"||e.key==="Delete"}const aie=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:s,color:a="default",component:l,deleteIcon:u,disabled:c=!1,icon:d,label:f,onClick:h,onDelete:p,onKeyDown:g,onKeyUp:b,size:y="medium",variant:v="filled",tabIndex:w,skipFocusWhenDisabled:C=!1}=r,A=de(r,rie),S=m.useRef(null),_=bt(S,n),k=B=>{B.stopPropagation(),p&&p(B)},M=B=>{B.currentTarget===B.target&&u$(B)&&B.preventDefault(),g&&g(B)},R=B=>{B.currentTarget===B.target&&(p&&u$(B)?p(B):B.key==="Escape"&&S.current&&S.current.blur()),b&&b(B)},O=s!==!1&&h?!0:s,F=O||p?_a:l||"div",N=x({},r,{component:F,disabled:c,size:y,color:a,iconColor:m.isValidElement(d)&&d.props.color||a,onDelete:!!p,clickable:O,variant:v}
135),V=oie(N),$=F===_a?x({component:l||"div",focusVisibleClassName:V.focusVisible},p&&{disableRipple:!0}):{};let D=null;p&&(D=u&&m.isValidElement(u)?m.cloneElement(u,{className:xe(u.props.className,V.deleteIcon),onClick:k}):T.jsx(eie,{className:xe(V.deleteIcon),onClick:k}));let L=null;o&&m.isValidElement(o)&&(L=m.cloneElement(o,{className:xe(V.avatar,o.props.className)}));let P=null;return d&&m.isValidElement(d)&&(P=m.cloneElement(d,{className:xe(V.icon,d.props.className)})),T.jsxs(iie,x({as:F,className:xe(V.root,i),disabled:O&&c?!0:void 0,onClick:h,onKeyDown:M,onKeyUp:R,ref:_,tabIndex:C&&c?-1:w,ownerState:N},$,A,{children:[L||P,T.jsx(sie,{className:xe(V.label),ownerState:N,children:f}),D]}))}),Ps=aie;function Hu({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const lie=m.createContext(void 0),$C=lie;function Ma(){return m.useContext($C)}function Yz(e){return T.jsx(ZJ,x({},e,{defaultTheme:RC,themeId:Kc}))}function c$(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Z0(e,t=!1){return e&&(c$(e.value)&&e.value!==""||t&&c$(e.defaultValue)&&e.defaultValue!=="")}function uie(e){return e.startAdornment}function cie(e){return Ke("MuiInputBase",e)}const die=Qe("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),oi=die,fie=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],FC=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ge(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},LC=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},hie=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:a,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:f,startAdornment:h,type:p}=e,g={root:["root",`color${ge(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",f&&f!=="medium"&&`size${ge(f)}`,c&&"multiline",h&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",p==="search"&&"inputTypeSearch",c&&"inputMultiline",f==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",h&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return Re(g,cie,t)},NC=he("div",{name:"MuiInputBase",slot:"Root",overridesResolver:FC})(({theme:e,ownerState:t})=>x({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${oi.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&x({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),VC=he("input",{name:"MuiInputBase",slot:"Input",overridesResolver:LC})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=x({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return x({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${oi.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${oi.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),pie=T.jsx(Yz,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),mie=m.forwardRef(function(t,n){var r;const o=Je({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:s,autoFocus:a,className:l,components:u={},componentsProps:c={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:h,endAdornment:p,fullWidth:g=!1,id:b,inputComponent:y="input",inputProps:v={},inputRef:w,maxRows:C,minRows:A,multiline:S=!1,name:_,onBlur:k,onChange:M,onClick:R,onFocus:O,onKeyDown:F,onKeyUp:N,placeholder:V,readOnly:$,render
135Suffix:D,rows:L,slotProps:P={},slots:B={},startAdornment:E,type:z="text",value:H}=o,j=de(o,fie),G=v.value!=null?v.value:H,{current:Q}=m.useRef(G!=null),ee=m.useRef(),Y=m.useCallback(ne=>{},[]),se=bt(ee,w,v.ref,Y),[fe,ve]=m.useState(!1),oe=Ma(),ye=Hu({props:o,muiFormControl:oe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=oe?oe.focused:fe,m.useEffect(()=>{!oe&&f&&fe&&(ve(!1),k&&k())},[oe,f,fe,k]);const we=oe&&oe.onFilled,me=oe&&oe.onEmpty,be=m.useCallback(ne=>{Z0(ne)?we&&we():me&&me()},[we,me]);Bt(()=>{Q&&be({value:G})},[G,be,Q]);const ie=ne=>{if(ye.disabled){ne.stopPropagation();return}O&&O(ne),v.onFocus&&v.onFocus(ne),oe&&oe.onFocus?oe.onFocus(ne):ve(!0)},pe=ne=>{k&&k(ne),v.onBlur&&v.onBlur(ne),oe&&oe.onBlur?oe.onBlur(ne):ve(!1)},U=(ne,...te)=>{if(!Q){const ke=ne.target||ee.current;if(ke==null)throw new Error(gl(1));be({value:ke.value})}v.onChange&&v.onChange(ne,...te),M&&M(ne,...te)};m.useEffect(()=>{be(ee.current)},[]);const q=ne=>{ee.current&&ne.currentTarget===ne.target&&ee.current.focus(),R&&R(ne)};let K=y,ae=v;S&&K==="input"&&(L?ae=x({type:void 0,minRows:L,maxRows:L},ae):ae=x({type:void 0,maxRows:C,minRows:A},ae),K=Gz);const ue=ne=>{be(ne.animationName==="mui-auto-fill-cancel"?ee.current:{value:"x"})};m.useEffect(()=>{oe&&oe.setAdornedStart(!!E)},[oe,E]);const Z=x({},o,{color:ye.color||"primary",disabled:ye.disabled,endAdornment:p,error:ye.error,focused:ye.focused,formControl:oe,fullWidth:g,hiddenLabel:ye.hiddenLabel,multiline:S,size:ye.size,startAdornment:E,type:z}),X=hie(Z),W=B.root||u.Root||NC,le=P.root||c.root||{},_e=B.input||u.Input||VC;return ae=x({},ae,(r=P.input)!=null?r:c.input),T.jsxs(m.Fragment,{children:[!h&&pie,T.jsxs(W,x({},le,!ks(W)&&{ownerState:x({},Z,le.ownerState)},{ref:n,onClick:q},j,{className:xe(X.root,le.className,l,$&&"MuiInputBase-readOnly"),children:[E,T.jsx($C.Provider,{value:null,children:T.jsx(_e,x({ownerState:Z,"aria-invalid":ye.error,"aria-describedby":i,autoComplete:s,autoFocus:a,defaultValue:d,disabled:ye.disabled,id:b,onAnimationStart:ue,name:_,placeholder:V,readOnly:$,required:ye.required,rows:L,value:G,onKeyDown:F,onKeyUp:N,type:z},ae,!ks(_e)&&{as:K,ownerState:x({},Z,ae.ownerState)},{ref:se,className:xe(X.input,ae.className,$&&"MuiInputBase-readOnly"),onBlur:pe,onChange:U,onFocus:ie}))}),p,D?D(x({},ye,{startAdornment:E})):null]}))]})}),vd=mie;function gie(e){return Ke("MuiInput",e)}const tu=x({},oi,Qe("MuiInput",["root","underline","input"]));function yie(e){return Ke("MuiOutlinedInput",e)}const vie=x({},oi,Qe("MuiOutlinedInput",["root","notchedOutline","input"])),Hs=vie;function bie(e){return Ke("MuiFilledInput",e)}const wie=x({},oi,Qe("MuiFilledInput",["root","underline","input"])),ii=wie,Xz=Ze(T.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Cie(e){return Ke("MuiAutocomplete",e)}const Et=Qe("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","
135input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var d$,f$;const xie=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Sie=["ref"],_ie=qh(),Eie=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:s,hasPopupIcon:a,inputFocused:l,popupOpen:u,size:c}=e,d={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",s&&"hasClearIcon",a&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${ge(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Re(d,Cie,t)},Iie=he("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:s,size:a}=n;return[{[`& .${Et.tag}`]:t.tag},{[`& .${Et.tag}`]:t[`tagSize${ge(a)}`]},{[`& .${Et.inputRoot}`]:t.inputRoot},{[`& .${Et.input}`]:t.input},{[`& .${Et.input}`]:s&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Et.focused} .${Et.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Et.clearIndicator}`]:{visibility:"visible"}},[`& .${Et.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Et.inputRoot}`]:{flexWrap:"wrap",[`.${Et.hasPopupIcon}&, .${Et.hasClearIcon}&`]:{paddingRight:30},[`.${Et.hasPopupIcon}.${Et.hasClearIcon}&`]:{paddingRight:56},[`& .${Et.input}`]:{width:0,minWidth:30}},[`& .${tu.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${tu.root}.${oi.sizeSmall}`]:{[`& .${tu.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Hs.root}`]:{padding:9,[`.${Et.hasPopupIcon}&, .${Et.hasClearIcon}&`]:{paddingRight:39},[`.${Et.hasPopupIcon}.${Et.hasClearIcon}&`]:{paddingRight:65},[`& .${Et.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Et.endAdornment}`]:{right:9}},[`& .${Hs.root}.${oi.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Et.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${ii.root}`]:{paddingTop:19,paddingLeft:8,[`.${Et.hasPopupIcon}&, .${Et.hasClearIcon}&`]:{paddingRight:39},[`.${Et.hasPopupIcon}.${Et.hasClearIcon}&`]:{paddingRight:65},[`& .${ii.input}`]:{padding:"7px 4px"},[`& .${Et.endAdornment}`]:{right:9}},[`& .${ii.root}.${oi.sizeSmall}`]:{paddingBottom:1,[`& .${ii.input}`]:{padding:"2.5px 4px"}},[`& .${oi.hiddenLabel}`]:{paddingTop:8},[`& .${ii.root}.${oi.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Et.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${ii.root}.${oi.hiddenLabel}.${oi.sizeSmall}`]:{[`& .${Et.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Et.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0}
vendor: 4,381 bytes, line 135
135,variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Et.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Et.input}`]:{opacity:1}}}]}),Aie=he("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),kie=he(Zt,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Pie=he(Zt,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>x({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Tie=he(yd,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Et.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})),Rie=he(fo,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>x({},e.typography.body1,{overflow:"auto"})),Oie=he("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Mie=he("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Die=he("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Et.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Et.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Et.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:pt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Et.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Et.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),$ie=he(Zoe,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),Fie=he("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Et.option}`]:{paddingLeft:24}}),Lie=m.forwardRef(function(t,n){var r,o,i,s;const a=_ie({props:t,name:"MuiAutocomplete"}),{autoComplete:l=!1,autoHighlight:u=!1,autoSelect:c=!1,blurOnSelect:d=!1,ChipProps:f,className:h,clearIcon:p=d$||(d$=T.jsx(Tz,{fontSize:"small"})),clearOnBlur:g=!a.freeSolo,clearOnEscape:b=!1,clearText:y="Clear",closeText:v="Close",componentsProps:w={},defaultValue:C=a.multiple?[]:null,disableClearable:A=!1,disableCloseOnSelect:S=!1,disabled:_=!1,disabledItemsFocusable:k=!1,disableListWrap:M=!1,disablePortal:R=!1,filterSelectedOptions:O=!1,forcePopupIcon:F="auto",freeSolo:N=!1,fullWidth:V=!1,getLimitTagsText:$=Le=>`+${Le}`,getOptionLabel:D,groupBy:L,handleHomeEndKeys:P=!a.freeSolo,includeInputInList:B=!1,limitTags:E=-1,ListboxComponent:z="ul",ListboxProps:H,loading:j=!1,loadingText:G="Loading…",multiple:Q=!1,noOptionsText:ee="No options",openOnFocus:Y=!1,openText:se="Open",Pa
135perComponent:fe=fo,PopperComponent:ve=yd,popupIcon:oe=f$||(f$=T.jsx(Xz,{})),readOnly:ye=!1,renderGroup:we,renderInput:me,renderOption:be,renderTags:ie,selectOnFocus:pe=!a.freeSolo,size:U="medium",slotProps:q={}}=a,K=de(a,xie),{getRootProps:ae,getInputProps:ue,getInputLabelProps:Z,getPopupIndicatorProps:X,getClearProps:W,getTagProps:le,getListboxProps:_e,getOptionProps:ne,value:te,dirty:ke,expanded:Ve,id:Fe,popupOpen:Ie,focused:Be,focusedTag:Ee,anchorEl:Te,setAnchorEl:We,inputValue:lt,groupedOptions:xt}=Boe(x({},a,{componentName:"Autocomplete"})),Wt=!A&&!_&&ke&&!ye,en=(!N||F===!0)&&F!==!1,{onMouseDown:Bn}=ue(),{ref:dn}=H??{},jt=_e(),{ref:zt}=jt,is=de(jt,Sie),ss=bt(zt,dn),Ur=D||(Le=>{var st;return(st=Le.label)!=null?st:Le}),In=x({},a,{disablePortal:R,expanded:Ve,focused:Be,fullWidth:V,getOptionLabel:Ur,hasClearIcon:Wt,hasPopupIcon:en,inputFocused:Ee===-1,popupOpen:Ie,size:U}),tn=Eie(In);let er;if(Q&&te.length>0){const Le=st=>x({className:tn.tag,disabled:_},le(st));ie?er=ie(te,Le,In):er=te.map((st,et)=>T.jsx(Ps,x({label:Ur(st),size:U},Le({index:et}),f)))}if(E>-1&&Array.isArray(er)){const Le=er.length-E;!Be&&Le>0&&(er=er.splice(0,E),er.push(T.jsx("span",{className:tn.tag,children:$(Le)},er.length)))}const Oo=we||(Le=>T.jsxs("li",{children:[T.jsx($ie,{className:tn.groupLabel,ownerState:In,component:"div",children:Le.group}),T.jsx(Fie,{className:tn.groupUl,ownerState:In,children:Le.children})]},Le.key)),yo=be||((Le,st)=>m.createElement("li",x({},Le,{key:Le.key}),Ur(st))),ki=(Le,st)=>{const et=ne({option:Le,index:st});return yo(x({},et,{className:tn.option}),Le,{selected:et["aria-selected"],index:st,inputValue:lt},In)},Hr=(r=q.clearIndicator)!=null?r:w.clearIndicator,Ar=(o=q.paper)!=null?o:w.paper,as=(i=q.popper)!=null?i:w.popper,Se=(s=q.popupIndicator)!=null?s:w.popupIndicator,Ce=Le=>T.jsx(Tie,x({as:ve,disablePortal:R,style:{width:Te?Te.clientWidth:null},ownerState:In,role:"presentation",anchorEl:Te,open:Ie},as,{className:xe(tn.popper,as==null?void 0:as.className),children:T.jsx(Rie,x({ownerState:In,as:fe},Ar,{className:xe(tn.paper,Ar==null?void 0:Ar.className),children:Le}))}));let je=null;return!j&&xt.length>0?je=Ce(T.jsx(Die,x({as:z,className:tn.listbox,ownerState:In},is,H,{ref:ss,children:xt.map((Le,st)=>L?Oo({key:Le.key,group:Le.group,children:Le.options.map((et,Ot)=>ki(et,Le.index+Ot))}):ki(Le,st))}))):j&&xt.length===0?je=Ce(T.jsx(Oie,{className:tn.loading,ownerState:In,children:G})):xt.length===0&&!N&&!j&&(je=Ce(T.jsx(Mie,{className:tn.noOptions,ownerState:In,role:"presentation",onMouseDown:Le=>{Le.preventDefault()},children:ee}))),T.jsxs(m.Fragment,{children:[T.jsx(Iie,x({ref:n,className:xe(tn.root,h),ownerState:In},ae(K),{children:me({id:Fe,disabled:_,fullWidth:!0,size:U==="small"?"small":void 0,InputLabelProps:Z(),InputProps:x({ref:We,className:tn.inputRoot,startAdornment:er,onClick:Le=>{Le.target===Le.currentTarget&&Bn(Le)}},(Wt||en)&&{endAdornment:T.jsxs(Aie,{className:tn.endAdornment,ownerState:In,children:[Wt?T.jsx(kie,x({},W(),{"aria-label":y,title:y,ownerState:In},Hr,{className:xe(tn.clearIndicator,Hr==null?void 0:Hr.className),children:p})):null,en?T.jsx(Pie,x({},X(),{disabled:_,"aria-label":Ie?v:se,title:Ie?v:se,ownerState:In},Se,{className:xe(tn.popupIndicator,Se==null?void 0:Se.className),children:oe})):null]})}),inputProps:x({className:tn.input,disabled:_,readOnly:ye},ue())})})),Te?je:null]})}),vy=Lie,Nie=Ze(T.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Vie(e){return Ke("MuiAvatar",e)}const MUe=Qe("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]),Bie=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],jie=qh(),zie=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Re({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},Vie,t)},Uie=he("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:x({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:x({backgroundColor:e.palette.grey[400]},e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})))}]})),Hie=he("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Wie=he(Nie,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function Gie({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=m.useState(!1);return m.useEffect(()=>{if(!n&&!r)return;i(!1);let s=!0;const a=new Image;return a.onload=()=>{s&&i("loaded")},a.onerror=()=>{s&&i("error")},a.crossOrigin=e,a.referrerPolicy=t,a.src=n,r&&(a.srcset=r),()=>{s=!1}},[e,t,n,r]),o}const qie=m.forwardRef(function(t,n){const r=jie({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:s,component:a="div",slots:l={},slotProps:u={},imgProps:c,sizes:d,src:f,srcSet:h,variant:p="circular"}=r,g=de(r,Bie);let b=null;const y=Gie(x({},c,{src:f,srcSet:h})),v=f||h,w=v&&y!=="error",C=x({},r,{colorDefault:!w,component:a,variant:p}),A=zie(C),[S,_]=TI("img",{className:A.img,elementType:Hie,externalForwardedProps:{slots:l,slotProps:{img:x({},c,u.img)}},additionalProps:{alt:o,src:f,srcSet:h,sizes:d},ownerState:C});return w?b=T.jsx(S,x({},_)):i||i===0?b=i:v&&o?b=o[0]:b=T.jsx(Wie,{ownerState:C,className:A.fallback}),T.jsx(Uie,x({as:a,ownerState:C,className:xe(A.root,s),ref:n},g,{children:b}))}),by=qie,Kie=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Qie={entering:{opacity:1},entered:{opacity:1}},Yie=m.forwardRef(function(t,n){const r=Zn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:l,in:u,onEnter:c,onEntered:d,onEntering:f,onExit:h,onExited:p,onExiting:g,style:b,timeout:y=o,TransitionComponent:v=eT}=t,w=de(t,Kie),C=m.useRef(null),A=bt(C,a.ref,n),S=V=>$=>{if(V){const D=C.current;$===void 0?V(D):V(D,$)}},_=S(f),k=S((V,$)=>{rT(V);const D=hh({style:b,timeout:y,easing:l},{mode:"enter"});V.style.webkitTransition=r.transitions.create("opacity",D),V.style.transition=r.transitions.create("opacity",D),c&&c(V,$)}),M=S(d),R=S(g),O=S(V=>{const $=hh({style:b,timeout:y,easing:l},{mode:"exit"});V.style.webkitTransition=r.transitions.create("opacity",$),V.style.transition=r.transitions.create("opacity",$),h&&h(V)}),F=S(p),N=V=>{i&&i(C.current,V)};return T.jsx(v,x({appear:s,in:u,nodeRef:C,onEnter:k,onEntered:M,onEntering:_,onExit:O,onExited:F,onExiting:R,addEndListener:N,timeout:y},w,{children:(V,$)=>m.cloneElement(a,x({style:x({opacity:0,visibility:V==="exited"&&!u?"hidden":void 0},Qie[V],b,a.props.style),ref:A},$))}))}),Jz=Yie;function Xie(e){return Ke("MuiBackdrop",e)}Qe("MuiBackdrop",["root","invisible"]);const Jie=["children","className","component","components","componentsProps","invisible","open","slotProps","
135slots","TransitionComponent","transitionDuration"],Zie=e=>{const{classes:t,invisible:n}=e;return Re({root:["root",n&&"invisible"]},Xie,t)},ese=he("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>x({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),tse=m.forwardRef(function(t,n){var r,o,i;const s=Je({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:u="div",components:c={},componentsProps:d={},invisible:f=!1,open:h,slotProps:p={},slots:g={},TransitionComponent:b=Jz,transitionDuration:y}=s,v=de(s,Jie),w=x({},s,{component:u,invisible:f}),C=Zie(w),A=(r=p.root)!=null?r:d.root;return T.jsx(b,x({in:h,timeout:y},v,{children:T.jsx(ese,x({"aria-hidden":!0},A,{as:(o=(i=g.root)!=null?i:c.Root)!=null?o:u,className:xe(C.root,l,A==null?void 0:A.className),ownerState:x({},w,A==null?void 0:A.ownerState),classes:C,ref:n,children:a}))}))}),Zz=tse;function nse(e){return Ke("MuiBadge",e)}const rse=Qe("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),Ll=rse,ose=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],GS=10,qS=4,ise=qh(),sse=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=e,a={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${ge(n.vertical)}${ge(n.horizontal)}`,`anchorOrigin${ge(n.vertical)}${ge(n.horizontal)}${ge(o)}`,`overlap${ge(o)}`,t!=="default"&&`color${ge(t)}`]};return Re(a,nse,s)},ase=he("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),lse=he("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;
135return[t.badge,t[n.variant],t[`anchorOrigin${ge(n.anchorOrigin.vertical)}${ge(n.anchorOrigin.horizontal)}${ge(n.overlap)}`],n.color!=="default"&&t[`color${ge(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:GS*2,lineHeight:1,padding:"0 6px",height:GS*2,borderRadius:GS,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,o;return((r=e.vars)!=null?r:e).palette[n].main&&((o=e.vars)!=null?o:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:qS,height:qS*2,minWidth:qS*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Ll.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Ll.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Ll.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Ll.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Ll.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Ll.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Ll.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Ll.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),use=m.forwardRef(function(t,n){var r,o,i,s,a,l;const u=ise({props:t,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:d,component:f,components:h={},componentsProps:p={},children:g,overlap:b="rectangular",color:y="default",invisible:v=!1,max:w=99,badgeContent:C,slots:A,slotProps:S,showZero:_=!1,variant:k="standard"}=u,M=de(u,ose),{badgeContent:R,invisible:O,max:F,displayValue:N}=Wne({max:w,invisible:v,badgeContent:C,showZero:_}),V=QP({anchorOrigin:c,color:y,overlap:b,variant:k,badgeContent:C}),$=O||R==null&&k!=="dot",{color:D=y,overlap:L=b,anchorOrigin:P=c,variant:B=k}=$?V:u,E=B!=="dot"?N:void 0,z=x({},u,{badgeContent:R,invisible:$,max:F,displayValue:E,showZero:_,anchorOrigin:P,color:D,overlap:L,variant:B}),H=sse(z),j=(r=(o=A==null?void 0:A.root)!=null?o:h.Root)!=null?r:ase,G=(i=(s=A==null?void 0:A.badge)!=null?s:h.Badge)!=null?i:lse,Q=(a=S==null?void 0:S.root)!=null?a:p.root,ee=(l=S==null?void 0:S.badge)!=null?l:p.badge,Y=Wn({elementType:j,externalSlotProps:Q,externalForwardedProps:M,additionalProps:{ref:n,as:f},ownerState:z,className:xe(Q==null?void 0:Q.className,H.root,d)}),se=Wn({elementType:G,externalSlotProps:ee,ownerState:z,className:xe(H.badge,ee==null?void 0:ee.className)});return T.jsxs(j,x({},Y,{children:[g,T.jsx(G,x({},se,{children:E}))]}))}),eU=use,cse=Qe("MuiBox",["root"]),dse=cse,fse=ZP(),hse=iZ({themeId:Kc,defaultTheme:fse,defaultClassName:dse.root,generateClassName:zP.generate}),Me=hse;function pse(e){return Ke("MuiButton",e)}const mse=Qe("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Uv=mse,gse=m.createContext({}),tU=gse,yse=m.createContext(void 0),vse=yse,bse=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],wse=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:s}=e,a={root:["root",i,`${i}${ge(t)}`,`size${ge(o)}`,`${i}Size${ge(o)}`,`color${ge(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${ge(o)}`],endIcon:["icon","endIcon",`iconSize${ge(o)}`]}
vendor: 4,288 bytes, line 135
135,l=Re(a,pse,s);return x({},s,l)},nU=e=>x({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Cse=he(_a,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ge(n.color)}`],t[`size${ge(n.size)}`],t[`${n.variant}Size${ge(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return x({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":x({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:pt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:pt(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:pt(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":x({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Uv.focusVisible}`]:x({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Uv.disabled}`]:x({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${pt(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"}
135,[`&.${Uv.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Uv.disabled}`]:{boxShadow:"none"}}),xse=he("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${ge(n.size)}`]]}})(({ownerState:e})=>x({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},nU(e))),Sse=he("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${ge(n.size)}`]]}})(({ownerState:e})=>x({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},nU(e))),_se=m.forwardRef(function(t,n){const r=m.useContext(tU),o=m.useContext(vse),i=kC(r,t),s=Je({props:i,name:"MuiButton"}),{children:a,color:l="primary",component:u="button",className:c,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:g,fullWidth:b=!1,size:y="medium",startIcon:v,type:w,variant:C="text"}=s,A=de(s,bse),S=x({},s,{color:l,component:u,disabled:d,disableElevation:f,disableFocusRipple:h,fullWidth:b,size:y,type:w,variant:C}),_=wse(S),k=v&&T.jsx(xse,{className:_.startIcon,ownerState:S,children:v}),M=p&&T.jsx(Sse,{className:_.endIcon,ownerState:S,children:p}),R=o||"";return T.jsxs(Cse,x({ownerState:S,className:xe(r.className,_.root,c,R),component:u,disabled:d,focusRipple:!h,focusVisibleClassName:xe(_.focusVisible,g),ref:n,type:w},A,{classes:_,children:[k,a,M]}))}),gt=_se;function Ese(e){return Ke("MuiCard",e)}Qe("MuiCard",["root"]);const Ise=["className","raised"],Ase=e=>{const{classes:t}=e;return Re({root:["root"]},Ese,t)},kse=he(fo,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),Pse=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiCard"}),{className:o,raised:i=!1}=r,s=de(r,Ise),a=x({},r,{raised:i}),l=Ase(a);return T.jsx(kse,x({className:xe(l.root,o),elevation:i?8:void 0,ref:n,ownerState:a},s))}),bd=Pse;function Tse(e){return Ke("MuiCardContent",e)}Qe("MuiCardContent",["root"]);const Rse=["className","component"],Ose=e=>{const{classes:t}=e;return Re({root:["root"]},Tse,t)},Mse=he("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),Dse=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiCardContent"}),{className:o,component:i="div"}=r,s=de(r,Rse),a=x({},r,{component:i}),l=Ose(a);return T.jsx(Mse,x({as:i,className:xe(l.root,o),ownerState:a,ref:n},s))}),$se=Dse;function Fse(e){return Ke("PrivateSwitchBase",e)}Qe("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Lse=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Nse=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${ge(o)}`],input:["input"]};return Re(i,Fse,t)},Vse=he(_a)(({ownerState:e})=>x({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),Bse=he("input",{shouldForwardProp:yr})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),jse=m.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:s,defaultChecked:a,disabled:l,disableFocusRipple:u=!1,edge:c=!1,icon:d,id:f,inputProps:h,inputRef:p,name:g,onBlur:b,onChange:y,onFocus:v,readOnly:w,required:C=!1,tabIndex:A,type:S,value:_}=t,k=de(t,Lse),[M,R]=fa({controlled:o,default:!!a,name:"SwitchBase",state:"checked"}),O=Ma(),F=B=>{v&&v(B),O&&O.onFocus&&O.onFocus(B)},N=B=>{b&&b(B),O&&O.onBlur&&O.onBlur(B)},V=B=>{if(B.nativeEvent.defaultPrevented)return;const E=B.target.checked;R(E),y&&y(B,E)};let $=l;O&&typeof $>"u"&&($=O.disabled);const D=S==="checkbox"||S==="radio",L=x({},t,{checked:M,disabled:$,disableFocusRipple:u,edge:c}),P=Nse(L);return T.jsxs(Vse,x({component:"span",className:xe(P.root,s),centerRipple:!0,focusRipple:!u,disabled:$,tabIndex:null,role:void 0,onFocus:
135F,onBlur:N,ownerState:L,ref:n},k,{children:[T.jsx(Bse,x({autoFocus:r,checked:o,defaultChecked:a,className:P.input,disabled:$,id:D?f:void 0,name:g,onChange:V,readOnly:w,ref:p,required:C,ownerState:L,tabIndex:A,type:S},S==="checkbox"&&_===void 0?{}:{value:_},h)),M?i:d]}))}),pT=jse,zse=Ze(T.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Use=Ze(T.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Hse=Ze(T.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Wse(e){return Ke("MuiCheckbox",e)}const Gse=Qe("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),KS=Gse,qse=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Kse=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${ge(r)}`,`size${ge(o)}`]},s=Re(i,Wse,t);return x({},t,s)},Qse=he(pT,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${ge(n.size)}`],n.color!=="default"&&t[`color${ge(n.color)}`]]}})(({theme:e,ownerState:t})=>x({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:pt(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${KS.checked}, &.${KS.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${KS.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),Yse=T.jsx(Use,{}),Xse=T.jsx(zse,{}),Jse=T.jsx(Hse,{}),Zse=m.forwardRef(function(t,n){var r,o;const i=Je({props:t,name:"MuiCheckbox"}),{checkedIcon:s=Yse,color:a="primary",icon:l=Xse,indeterminate:u=!1,indeterminateIcon:c=Jse,inputProps:d,size:f="medium",className:h}=i,p=de(i,qse),g=u?c:l,b=u?c:s,y=x({},i,{color:a,indeterminate:u,size:f}),v=Kse(y);return T.jsx(Qse,x({type:"checkbox",inputProps:x({"data-indeterminate":u},d),icon:m.cloneElement(g,{fontSize:(r=g.props.fontSize)!=null?r:f}),checkedIcon:m.cloneElement(b,{fontSize:(o=b.props.fontSize)!=null?o:f}),ownerState:y,ref:n,className:xe(v.root,h)},p,{classes:v}))}),Kh=Zse;function eae(e){return Ke("MuiCircularProgress",e)}Qe("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const tae=["className","color","disableShrink","size","style","thickness","value","variant"];let BC=e=>e,h$,p$,m$,g$;const Nl=44,nae=El(h$||(h$=BC`
136  0% {
137    transform: rotate(0deg);
138  }
139
140  100% {
141    transform: rotate(360deg);
142  }
143`)),rae=El(p$||(p$=BC`
144  0% {
145    stroke-dasharray: 1px, 200px;
146    stroke-dashoffset: 0;
147  }
148
149  50% {
150    stroke-dasharray: 100px, 200px;
151    stroke-dashoffset: -15px;
152  }
153
154  100% {
155    stroke-dasharray: 100px, 200px;
156    stroke-dashoffset: -125px;
157  }
158`)),oae=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${ge(r)}`],svg:["svg"],circle:["circle",`circle${ge(n)}`,o&&"circleDisableShrink"]};return Re(i,eae,t)},iae=he("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ge(n.color)}`]]}})(({ownerState:e,theme:t})=>x({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&Qc(m$||(m$=BC`
159      animation: ${0} 1.4s linear infinite;
160    `),nae)),sae=he("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}
160),aae=he("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ge(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>x({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Qc(g$||(g$=BC`
161      animation: ${0} 1.4s ease-in-out infinite;
162    `),rae)),lae=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:s=!1,size:a=40,style:l,thickness:u=3.6,value:c=0,variant:d="indeterminate"}=r,f=de(r,tae),h=x({},r,{color:i,disableShrink:s,size:a,thickness:u,value:c,variant:d}),p=oae(h),g={},b={},y={};if(d==="determinate"){const v=2*Math.PI*((Nl-u)/2);g.strokeDasharray=v.toFixed(3),y["aria-valuenow"]=Math.round(c),g.strokeDashoffset=`${((100-c)/100*v).toFixed(3)}px`,b.transform="rotate(-90deg)"}return T.jsx(iae,x({className:xe(p.root,o),style:x({width:a,height:a},b,l),ownerState:h,ref:n,role:"progressbar"},y,f,{children:T.jsx(sae,{className:p.svg,ownerState:h,viewBox:`${Nl/2} ${Nl/2} ${Nl} ${Nl}`,children:T.jsx(aae,{className:p.circle,style:g,ownerState:h,cx:Nl,cy:Nl,r:(Nl-u)/2,fill:"none",strokeWidth:u})})}))}),Qn=lae,uae=oee({createStyledComponent:he("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ge(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>Je({props:e,name:"MuiContainer"})}),pi=uae,cae=(e,t)=>x({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),dae=e=>x({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),fae=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,a])=>{var l;r[e.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let o=x({html:cae(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:x({margin:0},dae(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const i=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return i&&(o=[o,i]),o};function hae(e){const t=Je({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return T.jsxs(m.Fragment,{children:[T.jsx(Yz,{styles:o=>fae(o,r)}),n]})}function pae(e){return Ke("MuiModal",e)}Qe("MuiModal",["root","hidden","backdrop"]);const mae=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],gae=e=>{const{open:t,exited:n,classes:r}=e;return Re({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},pae,r)},yae=he("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>x({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),vae=he(Zz,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),bae=m.forwardRef(function(t,n){var r,o,i,s,a,l;const u=Je({name:"MuiModal",props:t}),{BackdropComponent:c=vae,BackdropProps:d,className:f,closeAfterTransition:h=!1,children:p,container:g,component:b,components:y={},componentsProps:v={},disableAutoFocus:w=!1,disableEnforceFocus:C=!1,disableEscapeKeyDown:A=!1,disablePortal:S=!1,disableRestoreFocus:_=!1,disableScrollLock:k=!1,hideBackdrop:M=!1,keepMounted:R=!1,onBackdropClick:O,open:F,slotProps:N,slots:V}=u,$=de(u,mae),D=x({},u,{closeAfterTransition:h,disableAutoFocus:w,disableEnforceFocus:C,disableEscapeKeyDown:A,disablePortal:S,disableRestoreFocus:_,disableScrollLock:k,hideBackdrop:M,keepMounted:R}),{getRootProps:L,getBackdropProps:P,getTransitionProps:B,portalRef:E,isTopModal:z,exited:H,hasTransition:j}=dre(x({},D,{rootRef:n})),G=x({},D,{exited:H}),Q=gae(G),ee={};if(p.props.tabIndex===void 0&&(ee.tabIndex="-1"),j){const{onEnter:we,onExited:me}=B();ee.onEnter=we,ee.onExited=me}const Y=(r=(o=V==null?void 0:V.root)!=null?o:y.Root)!=null?r:yae,se=(i=(s=V==null?void 0:V.backdrop)!=null?s:y.Backdrop)!=null?i:c,fe=(a=N==null?void 0:N.root)!=null?a:v.root,ve=(l=N==null?void 0:N.backdrop)!=null?l:v.backdrop,oe=Wn({elementType:Y,externalSlotProps:fe,externalForwardedProps:$,getSlotProps:L,additionalProps:{ref:n,as:b},ownerState:G,className:xe(f,fe==null?void 0:fe.className,Q==null?void 0:Q.root,!G.open&&G.exited&&(Q==null?void 0:Q.hidden))}),ye=Wn({elementType:se,externalSlotProps:ve,additionalProps:d,getSlotProps:we=>P(x({},we,{onClick:me=>{O&&O(me),we!=null&&we.onClick&&we.onClick(me)}})),className:xe(ve==null?void 0:ve.className,d==null?void 0:d.className,Q==null?void 0:Q.backdrop),ownerState:G});return!R&&!F&&(!j||H)?null:T.jsx(Dz,{ref:E,container:g,disablePortal:S,children:T.jsxs(Y,x({},oe,{children:[!M&&c?T.jsx(se,x({},ye)):null,T.jsx(Mz,{disableEnforceFocus:C,disableAutoFocus:w,disableRestoreFocus:_,isEnabled:z,open:F,children:m.cloneElement(p,ee)})]}))})}),mT=bae;function wae(e){return Ke("MuiDialog",e)}const Cae=Qe("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),QS=Cae,xae=m.createContext({}),rU=xae,Sae=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","Pa
162perProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],_ae=he(Zz,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Eae=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,s={root:["root"],container:["container",`scroll${ge(n)}`],paper:["paper",`paperScroll${ge(n)}`,`paperWidth${ge(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Re(s,wae,t)},Iae=he(mT,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Aae=he("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ge(n.scroll)}`]]}})(({ownerState:e})=>x({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),kae=he(fo,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ge(n.scroll)}`],t[`paperWidth${ge(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>x({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${QS.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${QS.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${QS.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Pae=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDialog"}),o=Zn(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:l,BackdropProps:u,children:c,className:d,disableEscapeKeyDown:f=!1,fullScreen:h=!1,fullWidth:p=!1,maxWidth:g="sm",onBackdropClick:b,onClose:y,open:v,PaperComponent:w=fo,PaperProps:C={},scroll:A="paper",TransitionComponent:S=Jz,transitionDuration:_=i,TransitionProps:k}=r,M=de(r,Sae),R=x({},r,{disableEscapeKeyDown:f,fullScreen:h,fullWidth:p,maxWidth:g,scroll:A}),O=Eae(R),F=m.useRef(),N=L=>{F.current=L.target===L.currentTarget},V=L=>{F.current&&(F.current=null,b&&b(L),y&&y(L,"backdropClick"))},$=Jt(a),D=m.useMemo(()=>({titleId:$}),[$]);return T.jsx(Iae,x({className:xe(O.root,d),closeAfterTransition:!0,components:{Backdrop:_ae},componentsProps:{backdrop:x({transitionDuration:_,as:l},u)},disableEscapeKeyDown:f,onClose:y,open:v,ref:n,onClick:V,ownerState:R},M,{children:T.jsx(S,x({appear:!0,in:v,timeout:_,role:"presentation"},k,{children:T.jsx(Aae,{className:xe(O.container),onMouseDown:N,ownerState:R,children:T.jsx(kae,x({as:w,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":$},C,{className:xe(O.paper,C.className),ownerState:R,children:T.jsx(rU.Provider,{value:D,children:c})}))})}))}))}),Qh=Pae;function Tae(e){return Ke("MuiDialogActions",e)}Qe("MuiDialogActions",["root","spacing"]);const Rae=["className","disableSpacing"],Oae=e=>{const{classes:t,disableSpacing:n}=e;return Re({root:["root",!n&&"spacing"]},Tae,t)},Mae=he("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>x({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),Dae=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1}=r,s=de(r,Rae),a=x({},r,{disableSpacing:i}),l=Oae(a);return T.jsx(Mae,x({className:xe(l.root,o),ownerState:a,ref:n},s))}),jC=Dae;function $ae(e){return Ke("MuiDialogContent",e)}Qe("MuiDialogContent",["root","dividers"]);function Fae(e){return Ke("MuiDialogTitle",e)}const Lae=Qe("MuiDialogTitle",["root"]),Nae=Lae,Vae=["className","dividers"],Bae=e=>{const{classes:t,dividers:n}=e;return Re({root:["root",n&&"dividers"]},$ae,t)},jae=he("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>x({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${Nae.root} + &`]:{paddingTop:0}})),zae=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1}=r,s=de(r,Vae),a=x({},r,{dividers:i}),l=Bae(a);return T.jsx(jae,x({className:xe(l.root,o),ownerState:a,ref:n},s))}),Yh=zae;function Uae(e){return Ke("MuiDialogContentText",e)}Qe("MuiDialogContentText",["root"]);const Hae=["children","className"],Wae=e=>{const{classes:t}=e,r=Re({root:["root"]},Uae,t);return x({},t,r)},Gae=he(Ae,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),qae=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDialogContentText"}),{className:o}=r,i=de(r,Hae),s=Wae(i);return T.jsx(Gae,x({component:"p",variant:"body1",color:"text.secondary",ref:n,ownerState:i,className:xe(s.root,o)},r,{classes:s}))}),oU=qae,Kae=["className","id"],Qae=e=>{const{classes:t}=e;return Re({root:["root"]},Fae,t)},Yae=he(Ae,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),Xae=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDialogTitle"}),{className:o,id:i}=r,s=de(r,Kae),a=r,l=Qae(a),{titleId:u=i}=m.useContext(rU);return T.jsx(Yae,x({component:"h2",className:xe(l.root,o),ownerState:a,ref:n,variant:"h6",id:i??u},s))}),zC=Xae;function Jae(e){return Ke("MuiDivider",e)}const Zae=Qe("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),y$=Zae,ele=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],tle=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:s,textAlign:a,variant:l}=e;return Re({root:["root",t&&"absolute",l,i&&"light",s==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",a==="right"&&s!=="vertical"&&"textAlignRight",a==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},Jae,r)},nle=he("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,
vendor: 7,639 bytes, line 162
162n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>x({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:pt(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>x({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>x({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>x({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>x({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),rle=he("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>x({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),iU=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:s,component:a=i?"div":"hr",flexItem:l=!1,light:u=!1,orientation:c="horizontal",role:d=a!=="hr"?"separator":void 0,textAlign:f="center",variant:h="fullWidth"}=r,p=de(r,ele),g=x({},r,{absolute:o,component:a,flexItem:l,light:u,orientation:c,role:d,textAlign:f,variant:h}),b=tle(g);return T.jsx(nle,x({as:a,className:xe(b.root,s),role:d,ref:n,ownerState:g},p,{children:i?T.jsx(rle,{className:b.wrapper,ownerState:g,children:i}):null}))});iU.muiSkipListHighlight=!0;const Sg=iU,ole=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function ile(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=vi(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const u=i.getComputedStyle(t);s=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const u=s.split("(")[1].split(")")[0].split(",");a=parseInt(u[4],10),l=parseInt(u[5],10)}return e==="left"?o?`translateX(${o.right+a-r.left}px)`:`translateX(${i.innerWidth+a-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function sle(e){return typeof e=="function"?e():e}function Hv(e,t,n){const r=sle(n),o=ile(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const ale=m.forwardRef(function(t,n){const r=Zn(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:u,direction:c="down",easing:d=o,in:f,onEnter:h,onEntered:p,onEntering:g,onExit:b,onExited:y,onExiting:v,style:w,timeout:C=i,TransitionComponent:A=eT}=t,S=de(t,ole),_=m.useRef(null),k=bt(l.ref,_,n),M=P=>B=>{P&&(B===void 0?P(_.current):P(_.current,B))},R=M((P,B)=>{Hv(c,P,u),rT(P),h&&h(P,B)}),O=M((P,B)=>{const E=hh({timeout:C,style:w,easing:d},{mode:"enter"});P.style.webkitTransition=r.transitions.create("-webkit-transform",x({},E)),P.style.transition=r.transitions.create("transform",x({},E)),P.style.webkitTransform="none",P.style.transform="none",g&&g(P,B)}),F=M(p),N=M(v),V=M(P=>{const B=hh({timeout:C,style:w,easing:d},{mode:"exit"});P.style.webkitTransition=r.transitions.create("-webkit-transform",B),P.style.transition=r.transitions.create("transform",B),Hv(c,P,u),b&&b(P)}),$=M(P=>{P.style.webkitTransition="",P.style.transition="",y&&y(P)}),D=P=>{s&&s(_.current,P)},L=m.useCallback(()=>{_.current&&Hv(c,_.current,u)},[c,u]);return m.useEffect(()=>{if(f||c==="down"||c==="right")return;const P=zu(()=>{_.current&&Hv(c,_.current,u)}),B=vi(_.current);return B.addEventListener("resize",P),()=>{P.clear(),B.removeEventListener("resize",P)}},[c,f,u]),m.useEffect(()=>{f||L()},[f,L]),T.jsx(A,x({nodeRef:_,onEnter:R,onEntered:F,onEntering:O,onExit:V,onExited:$,onExiting:N,addEndListener:D,appear:a,in:f,timeout:C},S,{children:(P,B)=>m.cloneElement(l,x({ref:k,style:x({visibility:P==="exited"&&!f?"hidden":void 0},w,l.props.style)},B))}))}),lle=ale;function ule(e){return Ke("MuiDrawer",e)}Qe("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const cle=["BackdropProps"],dle=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],sU=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},fle=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ge(n)}`,r!=="temporary"&&`paperAnchorDocked${ge(n)}`]};return Re(o,ule,t)},hle=he(mT,{name:"MuiDrawer",slot:"Root",overridesResolver:sU})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),v$=he("div",{shouldForwardProp:yr,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:sU})({flex:"0 0 auto"}),ple=he(fo,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ge(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ge(n.anchor)}`]]}})(({theme:e,ownerState:t})=>x({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`}
162)),aU={left:"right",right:"left",top:"down",bottom:"up"};function mle(e){return["left","right"].indexOf(e)!==-1}function gle({direction:e},t){return e==="rtl"&&mle(t)?aU[t]:t}const yle=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDrawer"}),o=Zn(),i=gd(),s={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:u,className:c,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:h}={},onClose:p,open:g=!1,PaperProps:b={},SlideProps:y,TransitionComponent:v=lle,transitionDuration:w=s,variant:C="temporary"}=r,A=de(r.ModalProps,cle),S=de(r,dle),_=m.useRef(!1);m.useEffect(()=>{_.current=!0},[]);const k=gle({direction:i?"rtl":"ltr"},a),R=x({},r,{anchor:a,elevation:d,open:g,variant:C},S),O=fle(R),F=T.jsx(ple,x({elevation:C==="temporary"?d:0,square:!0},b,{className:xe(O.paper,b.className),ownerState:R,children:u}));if(C==="permanent")return T.jsx(v$,x({className:xe(O.root,O.docked,c),ownerState:R,ref:n},S,{children:F}));const N=T.jsx(v,x({in:g,direction:aU[k],timeout:w,appear:_.current},y,{children:F}));return C==="persistent"?T.jsx(v$,x({className:xe(O.root,O.docked,c),ownerState:R,ref:n},S,{children:N})):T.jsx(hle,x({BackdropProps:x({},l,h,{transitionDuration:w}),className:xe(O.root,O.modal,c),open:g,ownerState:R,onClose:p,hideBackdrop:f,ref:n},S,A,{children:N}))}),ew=yle,vle=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],ble=e=>{const{classes:t,disableUnderline:n}=e,o=Re({root:["root",!n&&"underline"],input:["input"]},bie,t);return x({},t,o)},wle=he(NC,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...FC(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return x({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${ii.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${ii.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ii.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ii.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ii.disabled}, .${ii.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ii.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&x({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),Cle=he(VC,{name:"MuiFilledInput",slot:"Input",overridesResolver:LC})(({theme:e,ownerState:t})=>x({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),lU=m.forwardRef(function(t,n){var r,o,i,s;const a=Je({props:t,name:"MuiFilledInput"}),{components:l={},componentsProps:u,fullWidth:c=!1,inputComponent:d="input",multiline:f=!1,slotProps:h,slots:p={},type:g="text"}=a,b=de(a,vle),y=x({},a,{fullWidth:c,inputComponent:d,multiline:f,type:g}),v=ble(a),w={root:{ownerState:y}
162,input:{ownerState:y}},C=h??u?Ao(w,h??u):w,A=(r=(o=p.root)!=null?o:l.Root)!=null?r:wle,S=(i=(s=p.input)!=null?s:l.Input)!=null?i:Cle;return T.jsx(vd,x({slots:{root:A,input:S},componentsProps:C,fullWidth:c,inputComponent:d,multiline:f,ref:n,type:g},b,{classes:v}))});lU.muiName="Input";const uU=lU;function xle(e){return Ke("MuiFormControl",e)}Qe("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Sle=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],_le=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${ge(n)}`,r&&"fullWidth"]};return Re(o,xle,t)},Ele=he("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>x({},t.root,t[`margin${ge(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>x({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Ile=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFormControl"}),{children:o,className:i,color:s="primary",component:a="div",disabled:l=!1,error:u=!1,focused:c,fullWidth:d=!1,hiddenLabel:f=!1,margin:h="none",required:p=!1,size:g="medium",variant:b="outlined"}=r,y=de(r,Sle),v=x({},r,{color:s,component:a,disabled:l,error:u,fullWidth:d,hiddenLabel:f,margin:h,required:p,size:g,variant:b}),w=_le(v),[C,A]=m.useState(()=>{let N=!1;return o&&m.Children.forEach(o,V=>{if(!Om(V,["Input","Select"]))return;const $=Om(V,["Select"])?V.props.input:V;$&&uie($.props)&&(N=!0)}),N}),[S,_]=m.useState(()=>{let N=!1;return o&&m.Children.forEach(o,V=>{Om(V,["Input","Select"])&&(Z0(V.props,!0)||Z0(V.props.inputProps,!0))&&(N=!0)}),N}),[k,M]=m.useState(!1);l&&k&&M(!1);const R=c!==void 0&&!l?c:k;let O;const F=m.useMemo(()=>({adornedStart:C,setAdornedStart:A,color:s,disabled:l,error:u,filled:S,focused:R,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{M(!1)},onEmpty:()=>{_(!1)},onFilled:()=>{_(!0)},onFocus:()=>{M(!0)},registerEffect:O,required:p,variant:b}),[C,s,l,u,S,R,d,f,O,p,g,b]);return T.jsx($C.Provider,{value:F,children:T.jsx(Ele,x({as:a,ownerState:v,className:xe(w.root,i),ref:n},y,{children:o}))})}),Al=Ile,Ale=fee({createStyledComponent:he("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Je({props:e,name:"MuiStack"})}),vc=Ale;function kle(e){return Ke("MuiFormControlLabel",e)}const Ple=Qe("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),em=Ple,Tle=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Rle=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,s={root:["root",n&&"disabled",`labelPlacement${ge(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return Re(s,kle,t)},Ole=he("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${em.label}`]:t.label},t.root,t[`labelPlacement${ge(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>x({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${em.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${em.label}`]:{[`&.${em.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Mle=he("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${em.error}`]:{color:(e.vars||e).palette.error.main}})),Dle=m.forwardRef(function(t,n){var r,o;
162const i=Je({props:t,name:"MuiFormControlLabel"}),{className:s,componentsProps:a={},control:l,disabled:u,disableTypography:c,label:d,labelPlacement:f="end",required:h,slotProps:p={}}=i,g=de(i,Tle),b=Ma(),y=(r=u??l.props.disabled)!=null?r:b==null?void 0:b.disabled,v=h??l.props.required,w={disabled:y,required:v};["checked","name","onChange","value","inputRef"].forEach(M=>{typeof l.props[M]>"u"&&typeof i[M]<"u"&&(w[M]=i[M])});const C=Hu({props:i,muiFormControl:b,states:["error"]}),A=x({},i,{disabled:y,labelPlacement:f,required:v,error:C.error}),S=Rle(A),_=(o=p.typography)!=null?o:a.typography;let k=d;return k!=null&&k.type!==Ae&&!c&&(k=T.jsx(Ae,x({component:"span"},_,{className:xe(S.label,_==null?void 0:_.className),children:k}))),T.jsxs(Ole,x({className:xe(S.root,s),ownerState:A,ref:n},g,{children:[m.cloneElement(l,w),v?T.jsxs(vc,{display:"block",children:[k,T.jsxs(Mle,{ownerState:A,"aria-hidden":!0,className:S.asterisk,children:[" ","*"]})]}):k]}))}),ed=Dle;function $le(e){return Ke("MuiFormGroup",e)}Qe("MuiFormGroup",["root","row","error"]);const Fle=["className","row"],Lle=e=>{const{classes:t,row:n,error:r}=e;return Re({root:["root",n&&"row",r&&"error"]},$le,t)},Nle=he("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})(({ownerState:e})=>x({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),Vle=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1}=r,s=de(r,Fle),a=Ma(),l=Hu({props:r,muiFormControl:a,states:["error"]}),u=x({},r,{row:i,error:l.error}),c=Lle(u);return T.jsx(Nle,x({className:xe(c.root,o),ownerState:u,ref:n},s))}),gT=Vle;function Ble(e){return Ke("MuiFormHelperText",e)}const jle=Qe("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),b$=jle;var w$;const zle=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Ule=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:s,focused:a,required:l}=e,u={root:["root",o&&"disabled",i&&"error",r&&`size${ge(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Re(u,Ble,t)},Hle=he("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ge(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>x({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${b$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${b$.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),Wle=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:s="p"}=r,a=de(r,zle),l=Ma(),u=Hu({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),c=x({},r,{component:s,contained:u.variant==="filled"||u.variant==="outlined",variant:u.variant,size:u.size,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),d=Ule(c);return T.jsx(Hle,x({as:s,ownerState:c,className:xe(d.root,i),ref:n},a,{children:o===" "?w$||(w$=T.jsx("span",{className:"notranslate",children:"​"})):o}))}),wd=Wle;function Gle(e){return Ke("MuiFormLabel",e)}const Fm=Qe("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),qle=["children","className","color","component","disabled","error","filled","focused","required"],Kle=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:s,required:a}=e,l={root:["root",`color${ge(n)}`,o&&"disabled",i&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",i&&"error"]};return Re(l,Gle,t)},Qle=he("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>x({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>x({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Fm.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Fm.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Fm.error}`]:{color:(e.vars||e).palette.error.main}})),Yle=he("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Fm.error}`]:{color:(e.vars||e).palette.error.main}})),Xle=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFormLabel"}),{children:o,className:i,component:s="label"}=r,a=de(r,qle),l=Ma(),u=Hu({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),c=x({},r,{color:u.color||"primary",component:s,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),d=Kle(c);return T.jsxs(Qle,x({as:s,ownerState:c,className:xe(d.root,i),ref:n},a,{children:[o,u.required&&T.jsxs(Yle,{ownerState:c,"aria-hidden":!0,
162className:d.asterisk,children:[" ","*"]})]}))}),wy=Xle,Jle=m.createContext(),C$=Jle;function Zle(e){return Ke("MuiGrid",e)}const eue=[0,1,2,3,4,5,6,7,8,9,10],tue=["column-reverse","column","row-reverse","row"],nue=["nowrap","wrap-reverse","wrap"],Mp=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],_g=Qe("MuiGrid",["root","container","item","zeroMinWidth",...eue.map(e=>`spacing-xs-${e}`),...tue.map(e=>`direction-xs-${e}`),...nue.map(e=>`wrap-xs-${e}`),...Mp.map(e=>`grid-xs-${e}`),...Mp.map(e=>`grid-sm-${e}`),...Mp.map(e=>`grid-md-${e}`),...Mp.map(e=>`grid-lg-${e}`),...Mp.map(e=>`grid-xl-${e}`)]),rue=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Lf(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function oue({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(n===!0)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=Oc({values:t.columns,breakpoints:e.breakpoints.values}),a=typeof s=="object"?s[o]:s;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let u={};if(t.container&&t.item&&t.columnSpacing!==0){const c=e.spacing(t.columnSpacing);if(c!=="0px"){const d=`calc(${l} + ${Lf(c)})`;u={flexBasis:d,maxWidth:d}}}i=x({flexBasis:l,flexGrow:0,maxWidth:l},u)}return e.breakpoints.values[o]===0?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r},{})}function iue({theme:e,ownerState:t}){const n=Oc({values:t.direction,breakpoints:e.breakpoints.values});return Xo({theme:e},n,r=>{const o={flexDirection:r};return r.indexOf("column")===0&&(o[`& > .${_g.item}`]={maxWidth:"none"}),o})}function cU({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(o=>{n===""&&t[o]!==0&&(n=o)});const r=Object.keys(e).sort((o,i)=>e[o]-e[i]);return r.slice(0,r.indexOf(n))}function sue({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&r!==0){const i=Oc({values:r,breakpoints:e.breakpoints.values});let s;typeof i=="object"&&(s=cU({breakpoints:e.breakpoints.values,values:i})),o=Xo({theme:e},i,(a,l)=>{var u;const c=e.spacing(a);return c!=="0px"?{marginTop:`-${Lf(c)}`,[`& > .${_g.item}`]:{paddingTop:Lf(c)}}:(u=s)!=null&&u.includes(l)?{}:{marginTop:0,[`& > .${_g.item}`]:{paddingTop:0}}})}return o}function aue({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&r!==0){const i=Oc({values:r,breakpoints:e.breakpoints.values});let s;typeof i=="object"&&(s=cU({breakpoints:e.breakpoints.values,values:i})),o=Xo({theme:e},i,(a,l)=>{var u;const c=e.spacing(a);return c!=="0px"?{width:`calc(100% + ${Lf(c)})`,marginLeft:`-${Lf(c)}`,[`& > .${_g.item}`]:{paddingLeft:Lf(c)}}:(u=s)!=null&&u.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${_g.item}`]:{paddingLeft:0}}})}return o}function lue(e,t,n={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach(o=>{const i=e[o];Number(i)>0&&r.push(n[`spacing-${o}-${String(i)}`])}),r}const uue=he("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:u}=n;let c=[];r&&(c=lue(s,u,t));const d=[];return u.forEach(f=>{const h=n[f];h&&d.push(t[`grid-${f}-${String(h)}`])}),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...c,o!=="row"&&t[`direction-xs-${String(o)}`],a!=="wrap"&&t[`wrap-xs-${String(a)}`],...d]}})(({ownerState:e})=>x({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},e.wrap!=="wrap"&&{flexWrap:e.wrap}),iue,sue,aue,oue);function cue(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const n=[];return t.forEach(r=>{const o=e[r];if(Number(o)>0){const i=`spacing-${r}-${String(o)}`;n.push(i)}}),n}const due=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:s,zeroMinWidth:a,breakpoints:l}=e;let u=[];n&&(u=cue(i,l));const c=[];l.forEach(f=>{const h=e[f];h&&c.push(`grid-${f}-${String(h)}`)});const d={root:["root",n&&"container",o&&"item",a&&"zeroMinWidth",...u,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...c]};return Re(d,Zle,t)},fue=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiGrid"}),{breakpoints:o}=Zn(),i=hy(r),{className:s,columns:a,columnSpacing:l,component:u="div",container:c=!1,direction:d="row",item:f=!1,rowSpacing:h,spacing:p=0,wrap:g="wrap",zeroMinWidth:b=!1}=i,y=de(i,rue),v=h||p,w=l||p,C=m.useContext(C$),A=c?a||12:C,S={},_=x({},y);o.keys.forEach(R=>{y[R]!=null&&(S[R]=y[R],delete _[R])});const k=x({},i,{columns:A,container:c,direction:d,item:f,rowSpacing:v,columnSpacing:w,wrap:g,zeroMinWidth:b,spacing:p},S,{breakpoints:o.keys}
162),M=due(k);return T.jsx(C$.Provider,{value:A,children:T.jsx(uue,x({ownerState:k,className:xe(M.root,s),as:u,ref:n},_))})}),Ye=fue,hue=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function $I(e){return`scale(${e}, ${e**2})`}const pue={entering:{opacity:1,transform:$I(1)},entered:{opacity:1,transform:"none"}},YS=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),dU=m.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:a,onEnter:l,onEntered:u,onEntering:c,onExit:d,onExited:f,onExiting:h,style:p,timeout:g="auto",TransitionComponent:b=eT}=t,y=de(t,hue),v=gc(),w=m.useRef(),C=Zn(),A=m.useRef(null),S=bt(A,i.ref,n),_=$=>D=>{if($){const L=A.current;D===void 0?$(L):$(L,D)}},k=_(c),M=_(($,D)=>{rT($);const{duration:L,delay:P,easing:B}=hh({style:p,timeout:g,easing:s},{mode:"enter"});let E;g==="auto"?(E=C.transitions.getAutoHeightDuration($.clientHeight),w.current=E):E=L,$.style.transition=[C.transitions.create("opacity",{duration:E,delay:P}),C.transitions.create("transform",{duration:YS?E:E*.666,delay:P,easing:B})].join(","),l&&l($,D)}),R=_(u),O=_(h),F=_($=>{const{duration:D,delay:L,easing:P}=hh({style:p,timeout:g,easing:s},{mode:"exit"});let B;g==="auto"?(B=C.transitions.getAutoHeightDuration($.clientHeight),w.current=B):B=D,$.style.transition=[C.transitions.create("opacity",{duration:B,delay:L}),C.transitions.create("transform",{duration:YS?B:B*.666,delay:YS?L:L||B*.333,easing:P})].join(","),$.style.opacity=0,$.style.transform=$I(.75),d&&d($)}),N=_(f),V=$=>{g==="auto"&&v.start(w.current||0,$),r&&r(A.current,$)};return T.jsx(b,x({appear:o,in:a,nodeRef:A,onEnter:M,onEntered:R,onEntering:k,onExit:F,onExited:N,onExiting:O,addEndListener:V,timeout:g==="auto"?null:g},y,{children:($,D)=>m.cloneElement(i,x({style:x({opacity:0,transform:$I(.75),visibility:$==="exited"&&!a?"hidden":void 0},pue[$],p,i.props.style),ref:S},D))}))});dU.muiSupportAuto=!0;const vh=dU,mue=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],gue=e=>{const{classes:t,disableUnderline:n}=e,o=Re({root:["root",!n&&"underline"],input:["input"]},gie,t);return x({},t,o)},yue=he(NC,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...FC(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),x({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${tu.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${tu.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${tu.disabled}, .${tu.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${tu.disabled}:before`]:{borderBottomStyle:"dotted"}})}),vue=he(VC,{name:"MuiInput",slot:"Input",overridesResolver:LC})({}),fU=m.forwardRef(function(t,n){var r,o,i,s;const a=Je({props:t,name:"MuiInput"}),{disableUnderline:l,components:u={},componentsProps:c,fullWidth:d=!1,inputComponent:f="input",multiline:h=!1,slotProps:p,slots:g={},type:b="text"}=a,y=de(a,mue),v=gue(a),C={root:{ownerState:{disableUnderline:l}}},A=p??c?Ao(p??c,C):C,S=(r=(o=g.root)!=null?o:u.Root)!=null?r:yue,_=(i=(s=g.input)!=null?s:u.Input)!=null?i:vue;return T.jsx(vd,x({slots:{root:S,input:_},slotProps:A,fullWidth:d,inputComponent:f,multiline:h,ref:n,type:b},y,{classes:v}))});fU.muiName="Input";const hU=fU;function bue(e){return Ke("MuiInputAdornment",e)}const wue=Qe("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),x$=wue;var S$;const Cue=["children","className","component","disablePointerEvents","disableTypography","position","variant"],xue=(e,t)=>
162{const{ownerState:n}=e;return[t.root,t[`position${ge(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},Sue=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:s}=e,a={root:["root",n&&"disablePointerEvents",o&&`position${ge(o)}`,s,r&&"hiddenLabel",i&&`size${ge(i)}`]};return Re(a,bue,t)},_ue=he("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:xue})(({theme:e,ownerState:t})=>x({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},t.variant==="filled"&&{[`&.${x$.positionStart}&:not(.${x$.hiddenLabel})`]:{marginTop:16}},t.position==="start"&&{marginRight:8},t.position==="end"&&{marginLeft:8},t.disablePointerEvents===!0&&{pointerEvents:"none"})),Eue=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:s="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:u,variant:c}=r,d=de(r,Cue),f=Ma()||{};let h=c;c&&f.variant,f&&!h&&(h=f.variant);const p=x({},r,{hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:a,position:u,variant:h}),g=Sue(p);return T.jsx($C.Provider,{value:null,children:T.jsx(_ue,x({as:s,ownerState:p,className:xe(g.root,i),ref:n},d,{children:typeof o=="string"&&!l?T.jsx(Ae,{color:"text.secondary",children:o}):T.jsxs(m.Fragment,{children:[u==="start"?S$||(S$=T.jsx("span",{className:"notranslate",children:"​"})):null,o]})}))})}),Ou=Eue;function Iue(e){return Ke("MuiInputLabel",e)}Qe("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Aue=["disableAnimation","margin","shrink","variant","className"],kue=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:s,required:a}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${ge(r)}`,s],asterisk:[a&&"asterisk"]},u=Re(l,Iue,t);return x({},t,u)},Pue=he(wy,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Fm.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focu
162sed,t[n.variant]]}})(({theme:e,ownerState:t})=>x({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&x({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&x({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&x({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),Tue=m.forwardRef(function(t,n){const r=Je({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,shrink:i,className:s}=r,a=de(r,Aue),l=Ma();let u=i;typeof u>"u"&&l&&(u=l.filled||l.focused||l.adornedStart);const c=Hu({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=x({},r,{disableAnimation:o,formControl:l,shrink:u,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),f=kue(d);return T.jsx(Pue,x({"data-shrink":u,ownerState:d,ref:n,className:xe(f.root,s)},a,{classes:f}))}),yT=Tue;function Rue(e){return Ke("MuiLink",e)}const Oue=Qe("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Mue=Oue,pU={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Due=e=>pU[e]||e,$ue=({theme:e,ownerState:t})=>{const n=Due(t.color),r=dh(e,`palette.${n}`,!1)||t.color,o=dh(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:pt(r,.4)},Fue=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Lue=e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,i={root:["root",`underline${ge(o)}`,n==="button"&&"button",r&&"focusVisible"]};return Re(i,Rue,t)},Nue=he(Ae,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${ge(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>x({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&x({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:$ue({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Mue.focusVisible}`]:{outline:"auto"}})),Vue=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiLink"}),{className:o,color:i="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:u,underline:c="always",variant:d="inherit",sx:f}=r,h=de(r,Fue),{isFocusVisibleRef:p,onBlur:g,onFocus:b,ref:y}=py(),[v,w]=m.useState(!1),C=bt(n,y),A=M=>{g(M),p.current===!1&&w(!1),a&&a(M)},S=M=>{b(M),p.current===!0&&w(!0),l&&l(M)},_=x({},r,{color:i,component:s,focusVisible:v,underline:c,variant:d}),k=Lue(_);return T.jsx(Nue,x({color:i,className:xe(k.root,o),classes:u,component:s,onBlur:A,onFocus:S,ref:C,ownerState:_,variant:d,sx:[...Object.keys(pU).includes(i)?[]:[{color:i}],...Array.isArray(f)?f:[f]]},h))}),Mu=Vue,Bue=m.createContext({}),Ki=Bue;function jue(e){return Ke("MuiList",e)}Qe("MuiList",["root","padding","dense","subheader"]);const zue=["children","className","component","dense","disablePadding","subheader"],Uue=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Re({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},jue,t)},Hue=he("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>x({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Wue=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:u}=r,c=de(r,zue),d=m.useMemo(()=>({dense:a}),[a]),f=x({},r,{component:s,dense:a,disablePadding:l}),h=Uue(f);return T.jsx(Ki.Provider,{value:d,children:T.jsxs(Hue,x({as:s,className:xe(h.root,i),ref:n,ownerState:f},c,{children:[u,o]}))})}),UC=Wue;function Gue(e){return Ke("MuiListItem",e)}const que=Qe("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Qd=que;function Kue(e){return Ke("MuiListItemButton",e)}const Que=Qe("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Yd=Que,Yue=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Xue=(e,t)=>
162{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Jue=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:s,selected:a}=e,u=Re({root:["root",r&&"dense",!i&&"gutters",s&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Kue,n);return x({},n,u)},Zue=he(_a,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Xue})(({theme:e,ownerState:t})=>x({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Yd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:pt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Yd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Yd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:pt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Yd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Yd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),ece=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:s="div",children:a,dense:l=!1,disableGutters:u=!1,divider:c=!1,focusVisibleClassName:d,selected:f=!1,className:h}=r,p=de(r,Yue),g=m.useContext(Ki),b=m.useMemo(()=>({dense:l||g.dense||!1,alignItems:o,disableGutters:u}),[o,g.dense,l,u]),y=m.useRef(null);Bt(()=>{i&&y.current&&y.current.focus()},[i]);const v=x({},r,{alignItems:o,dense:b.dense,disableGutters:u,divider:c,selected:f}),w=Jue(v),C=bt(y,n);return T.jsx(Ki.Provider,{value:b,children:T.jsx(Zue,x({ref:C,href:p.href||p.to,component:(p.href||p.to)&&s==="div"?"button":s,focusVisibleClassName:xe(w.focusVisible,d),ownerState:v,className:xe(w.root,h)},p,{classes:w,children:a}))})}),tce=ece;function nce(e){return Ke("MuiListItemSecondaryAction",e)}Qe("MuiListItemSecondaryAction",["root","disableGutters"]);const rce=["className"],oce=e=>{const{disableGutters:t,classes:n}=e;return Re({root:["root",t&&"disableGutters"]},nce,n)},ice=he("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>x({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),mU=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItemSecondaryAction"}),{className:o}=r,i=de(r,rce),s=m.useContext(Ki),a=x({},r,{disableGutters:s.disableGutters}),l=oce(a);return T.jsx(ice,x({className:xe(l.root,o),ownerState:a,ref:n},i))});mU.muiName="ListItemSecondaryAction";const sce=mU,ace=["className"],lce=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","
162slots"],uce=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},cce=e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:u,selected:c}=e;return Re({root:["root",o&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",i&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",u&&"secondaryAction",c&&"selected"],container:["container"]},Gue,r)},dce=he("div",{name:"MuiListItem",slot:"Root",overridesResolver:uce})(({theme:e,ownerState:t})=>x({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&x({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Yd.root}`]:{paddingRight:48}},{[`&.${Qd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:pt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Qd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Qd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:pt(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),fce=he("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),hce=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItem"}),{alignItems:o="center",autoFocus:i=!1,button:s=!1,children:a,className:l,component:u,components:c={},componentsProps:d={},ContainerComponent:f="li",ContainerProps:{className:h}={},dense:p=!1,disabled:g=!1,disableGutters:b=!1,disablePadding:y=!1,divider:v=!1,focusVisibleClassName:w,secondaryAction:C,selected:A=!1,slotProps:S={},slots:_={}}=r,k=de(r.ContainerProps,ace),M=de(r,lce),R=m.useContext(Ki),O=m.useMemo(()=>({dense:p||R.dense||!1,alignItems:o,disableGutters:b}),[o,R.dense,p,b]),F=m.useRef(null);Bt(()=>{i&&F.current&&F.current.focus()},[i]);const N=m.Children.toArray(a),V=N.length&&Om(N[N.length-1],["ListItemSecondaryAction"]),$=x({},r,{alignItems:o,autoFocus:i,button:s,dense:O.dense,disabled:g,disableGutters:b,disablePadding:y,divider:v,hasSecondaryAction:V,selected:A}),D=cce($),L=bt(F,n),P=_.root||c.Root||dce,B=S.root||d.root||{},E=x({className:xe(D.root,B.className,l),disabled:g},M);let z=u||"li";return s&&(E.component=u||"div",E.focusVisibleClassName=xe(Qd.focusVisible,w),z=_a),V?(z=!E.component&&!u?"div":z,f==="li"&&(z==="li"?z="div":E.component==="li"&&(E.component="div")),T.jsx(Ki.Provider,{value:O,children:T.jsxs(fce,x({as:f,className:xe(D.container,h),ref:L,ownerState:$},k,{children:[T.jsx(P,x({},B,!ks(P)&&{as:z,ownerState:x({},$,B.ownerState)},E,{children:N})),N.pop()]}))})):T.jsx(Ki.Provider,{value:O,children:T.jsxs(P,x({},B,{as:z,ref:L},!ks(P)&&{ownerState:x({},$,B.ownerState)},E,{children:[N,C&&T.jsx(sce,{children:C})]}))})}),gU=hce;function pce(e){return Ke("MuiListItemAvatar",e)}
162Qe("MuiListItemAvatar",["root","alignItemsFlexStart"]);const mce=["className"],gce=e=>{const{alignItems:t,classes:n}=e;return Re({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},pce,n)},yce=he("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>x({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),vce=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItemAvatar"}),{className:o}=r,i=de(r,mce),s=m.useContext(Ki),a=x({},r,{alignItems:s.alignItems}),l=gce(a);return T.jsx(yce,x({className:xe(l.root,o),ownerState:a,ref:n},i))}),yU=vce;function bce(e){return Ke("MuiListItemIcon",e)}const wce=Qe("MuiListItemIcon",["root","alignItemsFlexStart"]),_$=wce,Cce=["className"],xce=e=>{const{alignItems:t,classes:n}=e;return Re({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},bce,n)},Sce=he("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>x({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),_ce=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItemIcon"}),{className:o}=r,i=de(r,Cce),s=m.useContext(Ki),a=x({},r,{alignItems:s.alignItems}),l=xce(a);return T.jsx(Sce,x({className:xe(l.root,o),ownerState:a,ref:n},i))}),pa=_ce;function Ece(e){return Ke("MuiListItemText",e)}const Ice=Qe("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),tw=Ice,Ace=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],kce=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Re({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Ece,t)},Pce=he("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${tw.primary}`]:t.primary},{[`& .${tw.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>x({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),Tce=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:d}=r,f=de(r,Ace),{dense:h}=m.useContext(Ki);let p=l??o,g=c;const b=x({},r,{disableTypography:s,inset:a,primary:!!p,secondary:!!g,dense:h}),y=kce(b);return p!=null&&p.type!==Ae&&!s&&(p=T.jsx(Ae,x({variant:h?"body2":"body1",className:y.primary,component:u!=null&&u.variant?void 0:"span",display:"block"},u,{children:p}))),g!=null&&g.type!==Ae&&!s&&(g=T.jsx(Ae,x({variant:"body2",className:y.secondary,color:"text.secondary",display:"block"},d,{children:g}))),T.jsxs(Pce,x({className:xe(y.root,i),ownerState:b,ref:n},f,{children:[p,g]}))}),mi=Tce,Rce=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function XS(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function E$(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function vU(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function Dp(e,t,n,r,o,i){let s=!1,a=o(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!vU(a,i)||l)a=o(e,a,n);else return a.focus(),!0}return!1}const Oce=m.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu"}=t,f=de(t,Rce),h=m.useRef(null),p=m.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Bt(()=>{o&&h.current.focus()},[o]),m.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,{direction:C})=>{const A=!h.current.style.width;if(w.clientHeight<h.current.clientHeight&&A){const S=`${fz(un(w))}px`;
162h.current.style[C==="rtl"?"paddingLeft":"paddingRight"]=S,h.current.style.width=`calc(100% + ${S})`}return h.current}}),[]);const g=w=>{const C=h.current,A=w.key,S=un(C).activeElement;if(A==="ArrowDown")w.preventDefault(),Dp(C,S,u,l,XS);else if(A==="ArrowUp")w.preventDefault(),Dp(C,S,u,l,E$);else if(A==="Home")w.preventDefault(),Dp(C,null,u,l,XS);else if(A==="End")w.preventDefault(),Dp(C,null,u,l,E$);else if(A.length===1){const _=p.current,k=A.toLowerCase(),M=performance.now();_.keys.length>0&&(M-_.lastTime>500?(_.keys=[],_.repeating=!0,_.previousKeyMatched=!0):_.repeating&&k!==_.keys[0]&&(_.repeating=!1)),_.lastTime=M,_.keys.push(k);const R=S&&!_.repeating&&vU(S,_);_.previousKeyMatched&&(R||Dp(C,S,!1,l,XS,_))?w.preventDefault():_.previousKeyMatched=!1}c&&c(w)},b=bt(h,n);let y=-1;m.Children.forEach(s,(w,C)=>{if(!m.isValidElement(w)){y===C&&(y+=1,y>=s.length&&(y=-1));return}w.props.disabled||(d==="selectedMenu"&&w.props.selected||y===-1)&&(y=C),y===C&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(y+=1,y>=s.length&&(y=-1))});const v=m.Children.map(s,(w,C)=>{if(C===y){const A={};return i&&(A.autoFocus=!0),w.props.tabIndex===void 0&&d==="selectedMenu"&&(A.tabIndex=0),m.cloneElement(w,A)}return w});return T.jsx(UC,x({role:"menu",ref:b,className:a,onKeyDown:g,tabIndex:o?0:-1},f,{children:v}))}),vT=Oce;function Mce(e){return Ke("MuiPopover",e)}Qe("MuiPopover",["root","paper"]);const Dce=["onEntering"],$ce=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Fce=["slotProps"];function I$(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function A$(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function k$(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function JS(e){return typeof e=="function"?e():e}const Lce=e=>{const{classes:t}=e;return Re({root:["root"],paper:["paper"]},Mce,t)},Nce=he(mT,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bU=he(fo,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Vce=m.forwardRef(function(t,n){var r,o,i;const s=Je({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:f,className:h,container:p,elevation:g=8,marginThreshold:b=16,open:y,PaperProps:v={},slots:w,slotProps:C,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:S=vh,transitionDuration:_="auto",TransitionProps:{onEntering:k}={},disableScrollLock:M=!1}=s,R=de(s.TransitionProps,Dce),O=de(s,$ce),F=(r=C==null?void 0:C.paper)!=null?r:v,N=m.useRef(),V=bt(N,F.ref),$=x({},s,{anchorOrigin:u,anchorReference:d,elevation:g,marginThreshold:b,externalPaperSlotProps:F,transformOrigin:A,TransitionComponent:S,transitionDuration:_,TransitionProps:R}),D=Lce($),L=m.useCallback(()=>{if(d==="anchorPosition")return c;const we=JS(l),be=(we&&we.nodeType===1?we:un(N.current).body).getBoundingClientRect();return{top:be.top+I$(be,u.vertical),left:be.left+A$(be,u.horizontal)}},[l,u.horizontal,u.vertical,c,d]),P=m.useCallback(we=>({vertical:I$(we,A.vertical),horizontal:A$(we,A.horizontal)}),[A.horizontal,A.vertical]),B=m.useCallback(we=>{const me={width:we.offsetWidth,height:we.offsetHeight},be=P(me);if(d==="none")return{top:null,left:null,transformOrigin:k$(be)};const ie=L();let pe=ie.top-be.vertical,U=ie.left-be.horizontal;const q=pe+me.height,K=U+me.width,ae=vi(JS(l)),ue=ae.innerHeight-b,Z=ae.innerWidth-b;if(b!==null&&pe<b){const X=pe-b;pe-=X,be.vertical+=X}else if(b!==null&&q>ue){const X=q-ue;pe-=X,be.vertical+=X}if(b!==null&&U<b){const X=U-b;U-=X,be.horizontal+=X}else if(K>Z){const X=K-Z;U-=X,be.horizontal+=X}return{top:`${Math.round(pe)}px`,left:`${Math.round(U)}px`,transformOrigin:k$(be)}},[l,d,L,P,b]),[E,z]=m.useState(y),H=m.useCallback(()=>{const we=N.current;if(!we)return;const me=B(we);me.top!==null&&(we.style.top=me.top),me.left!==null&&(we.style.left=me.left),we.style.transformOrigin=me.transformOrigin,z(!0)},[B]);m.useEffect(()=>(M&&window.addEventListener("scroll",H),()=>window.removeEventListener("scroll",H)),[l,M,H]);const j=(we,me)=>{k&&k(we,me),H()},G=()=>{z(!1)};m.useEffect(()=>{y&&H()}),m.useImperativeHandle(a,()=>y?{updatePosition:()=>{H()}}:null,[y,H]),m.useEffect(()=>{if(!y)return;const we=zu(()=>{H()}),me=vi(l);return me.addEventListener("resize",we),()=>{we.clear(),me.removeEventListener("resize",we)}},[l,y,H]);let Q=_;_==="auto"&&!S.muiSupportAuto&&(Q=void 0);const ee=p||(l?un(JS(l)).body:void 0),Y=(o=w==null?void 0:w.root)!=null?o:Nce,se=(i=w==null?void 0:w.paper)!=null?i:bU,fe=Wn({elementType:se,externalSlotProps:x({},F,{style:E?F.style:x({},F.style,{opacity:0}
162)}),additionalProps:{elevation:g,ref:V},ownerState:$,className:xe(D.paper,F==null?void 0:F.className)}),ve=Wn({elementType:Y,externalSlotProps:(C==null?void 0:C.root)||{},externalForwardedProps:O,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:ee,open:y},ownerState:$,className:xe(D.root,h)}),{slotProps:oe}=ve,ye=de(ve,Fce);return T.jsx(Y,x({},ye,!ks(Y)&&{slotProps:oe,disableScrollLock:M},{children:T.jsx(S,x({appear:!0,in:y,onEntering:j,onExited:G,timeout:Q},R,{children:T.jsx(se,x({},fe,{children:f}))}))}))}),Bce=Vce;function jce(e){return Ke("MuiMenu",e)}Qe("MuiMenu",["root","paper","list"]);const zce=["onEntering"],Uce=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Hce={vertical:"top",horizontal:"right"},Wce={vertical:"top",horizontal:"left"},Gce=e=>{const{classes:t}=e;return Re({root:["root"],paper:["paper"],list:["list"]},jce,t)},qce=he(Bce,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Kce=he(bU,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Qce=he(vT,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Yce=m.forwardRef(function(t,n){var r,o;const i=Je({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:d,open:f,PaperProps:h={},PopoverClasses:p,transitionDuration:g="auto",TransitionProps:{onEntering:b}={},variant:y="selectedMenu",slots:v={},slotProps:w={}}=i,C=de(i.TransitionProps,zce),A=de(i,Uce),S=gd(),_=x({},i,{autoFocus:s,disableAutoFocusItem:u,MenuListProps:c,onEntering:b,PaperProps:h,transitionDuration:g,TransitionProps:C,variant:y}),k=Gce(_),M=s&&!u&&f,R=m.useRef(null),O=(P,B)=>{R.current&&R.current.adjustStyleForScrollbar(P,{direction:S?"rtl":"ltr"}),b&&b(P,B)},F=P=>{P.key==="Tab"&&(P.preventDefault(),d&&d(P,"tabKeyDown"))};let N=-1;m.Children.map(a,(P,B)=>{m.isValidElement(P)&&(P.props.disabled||(y==="selectedMenu"&&P.props.selected||N===-1)&&(N=B))});const V=(r=v.paper)!=null?r:Kce,$=(o=w.paper)!=null?o:h,D=Wn({elementType:v.root,externalSlotProps:w.root,ownerState:_,className:[k.root,l]}),L=Wn({elementType:V,externalSlotProps:$,ownerState:_,className:k.paper});return T.jsx(qce,x({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?Hce:Wce,slots:{paper:V,root:v.root},slotProps:{root:D,paper:L},open:f,ref:n,transitionDuration:g,TransitionProps:x({onEntering:O},C),ownerState:_},A,{classes:p,children:T.jsx(Qce,x({onKeyDown:F,actions:R,autoFocus:s&&(N===-1||u),autoFocusItem:M,variant:y},c,{className:xe(k.list,c.className),children:a}))}))}),Xce=Yce;function Jce(e){return Ke("MuiMenuItem",e)}const Zce=Qe("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),$p=Zce,ede=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],tde=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},nde=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=e,l=Re({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Jce,s);return x({},s,l)},rde=he(_a,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:tde})(({theme:e,ownerState:t})=>x({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${$p.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:pt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${$p.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${$p.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:pt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${$p.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${$p.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${y$.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${y$.inset}`]:{marginLeft:52},[`& .${tw.root}`]:{marginTop:0,marginBottom:0},[`& .${tw.inset}`]:{paddingLeft:36},[`& .${_$.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&x({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${_$.root} svg`]:{fontSize:"1.25rem"}}))),ode=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:f}=r,h=de(r,ede),p=m.useContext(Ki),g=m.useMemo(()=>({dense:s||p.dense||!1,disableGutters:l}),[p.dense,s,l]),b=m.useRef(null);Bt(()=>{o&&b.current&&b.current.focus()},[o]);const y=x({},r,{dense:g.dense,divider:a,disableGutters:l}),v=nde(r),w=bt(b,n);let C;return r.disabled||(C=d!==void 0?d:-1),T.jsx(Ki.Provider,{value:g,children:T.jsx(rde,x({ref:w,role:c,tabIndex:C,component:i,focusVisibleClassName:xe(v.focu
162sVisible,u),className:xe(v.root,f)},h,{ownerState:y,classes:v}))})}),io=ode;function ide(e){return Ke("MuiNativeSelect",e)}const sde=Qe("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),bT=sde,ade=["className","disabled","error","IconComponent","inputRef","variant"],lde=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${ge(n)}`,i&&"iconOpen",r&&"disabled"]};return Re(a,ide,t)},wU=({ownerState:e,theme:t})=>x({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":x({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${bT.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),ude=he("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:yr,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${bT.multiple}`]:t.multiple}]}})(wU),CU=({ownerState:e,theme:t})=>x({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${bT.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),cde=he("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ge(n.variant)}`],n.open&&t.iconOpen]}})(CU),dde=m.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:s,inputRef:a,variant:l="standard"}=t,u=de(t,ade),c=x({},t,{disabled:o,variant:l,error:i}),d=lde(c);return T.jsxs(m.Fragment,{children:[T.jsx(ude,x({ownerState:c,className:xe(d.select,r),disabled:o,ref:a||n},u)),t.multiple?null:T.jsx(cde,{as:s,ownerState:c,className:d.icon})]})}),fde=dde;var P$;const hde=["children","classes","className","label","notched"],pde=he("fieldset",{shouldForwardProp:yr})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),mde=he("legend",{shouldForwardProp:yr})(({ownerState:e,theme:t})=>x({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&x({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function gde(e){const{className:t,label:n,notched:r}=e,o=de(e,hde),i=n!=null&&n!=="",s=x({},e,{notched:r,withLabel:i});return T.jsx(pde,x({"aria-hidden":!0,className:t,ownerState:s},o,{children:T.jsx(mde,{ownerState:s,children:i?T.jsx("span",{children:n}):P$||(P$=T.jsx("span",{className:"notranslate",children:"​"}))})}))}const yde=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],vde=e=>{const{classes:t}=e,r=Re({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},yie,t);return x({},t,r)},bde=he(NC,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:FC})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return x({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Hs.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Hs.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroun
162dChannel} / 0.23)`:n}},[`&.${Hs.focused} .${Hs.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Hs.error} .${Hs.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Hs.disabled} .${Hs.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&x({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),wde=he(gde,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Cde=he(VC,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:LC})(({theme:e,ownerState:t})=>x({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),xU=m.forwardRef(function(t,n){var r,o,i,s,a;const l=Je({props:t,name:"MuiOutlinedInput"}),{components:u={},fullWidth:c=!1,inputComponent:d="input",label:f,multiline:h=!1,notched:p,slots:g={},type:b="text"}=l,y=de(l,yde),v=vde(l),w=Ma(),C=Hu({props:l,muiFormControl:w,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=x({},l,{color:C.color||"primary",disabled:C.disabled,error:C.error,focused:C.focused,formControl:w,fullWidth:c,hiddenLabel:C.hiddenLabel,multiline:h,size:C.size,type:b}),S=(r=(o=g.root)!=null?o:u.Root)!=null?r:bde,_=(i=(s=g.input)!=null?s:u.Input)!=null?i:Cde;return T.jsx(vd,x({slots:{root:S,input:_},renderSuffix:k=>T.jsx(wde,{ownerState:A,className:v.notchedOutline,label:f!=null&&f!==""&&C.required?a||(a=T.jsxs(m.Fragment,{children:[f," ","*"]})):f,notched:typeof p<"u"?p:!!(k.startAdornment||k.filled||k.focused)}),fullWidth:c,inputComponent:d,multiline:h,ref:n,type:b},y,{classes:x({},v,{notchedOutline:null})}))});xU.muiName="Input";const SU=xU,xde=Ze(T.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),Sde=Ze(T.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),_de=Ze(T.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),Ede=Ze(T.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),Ide=he("span",{shouldForwardProp:yr})({position:"relative",display:"flex"}),Ade=he(_de)({transform:"scale(1)"}),kde=he(Ede)(({theme:e,ownerState:t})=>x({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},t.checked&&{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}));function _U(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o=x({},e,{checked:t});return T.jsxs(Ide,{className:n.root,ownerState:o,children:[T.jsx(Ade,{fontSize:r,className:n.background,ownerState:o}),T.jsx(kde,{fontSize:r,className:n.dot,ownerState:o})]})}const Pde=m.createContext(void 0),EU=Pde;function Tde(){return m.useContext(EU)}function Rde(e){return Ke("MuiRadio",e)}const T$=Qe("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),Ode=["checked","checkedIcon","color","icon","name","onChange","size","className"],Mde=e=>{const{classes:t,color:n,size:r}=e,o={root:["root",`color${ge(n)}`,r!=="medium"&&`size${ge(r)}`]};return x({},t,Re(o,Rde,t))},Dde=he(pT,{shouldForwardProp:e=>yr(e)||e==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size!=="medium"&&t[`size${ge(n.size)}`],t[`color${ge(n.color)}`]]}})(({theme:e,ownerState:t})=>x({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainCh
162annel} / ${e.vars.palette.action.hoverOpacity})`:pt(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${T$.checked}`]:{color:(e.vars||e).palette[t.color].main}},{[`&.${T$.disabled}`]:{color:(e.vars||e).palette.action.disabled}}));function $de(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}const R$=T.jsx(_U,{checked:!0}),O$=T.jsx(_U,{}),Fde=m.forwardRef(function(t,n){var r,o;const i=Je({props:t,name:"MuiRadio"}),{checked:s,checkedIcon:a=R$,color:l="primary",icon:u=O$,name:c,onChange:d,size:f="medium",className:h}=i,p=de(i,Ode),g=x({},i,{color:l,size:f}),b=Mde(g),y=Tde();let v=s;const w=K0(d,y&&y.onChange);let C=c;return y&&(typeof v>"u"&&(v=$de(y.value,i.value)),typeof C>"u"&&(C=y.name)),T.jsx(Dde,x({type:"radio",icon:m.cloneElement(u,{fontSize:(r=O$.props.fontSize)!=null?r:f}),checkedIcon:m.cloneElement(a,{fontSize:(o=R$.props.fontSize)!=null?o:f}),ownerState:g,classes:b,name:C,checked:v,onChange:w,ref:n,className:xe(b.root,h)},p))}),M$=Fde,Lde=["actions","children","defaultValue","name","onChange","value"],Nde=m.forwardRef(function(t,n){const{actions:r,children:o,defaultValue:i,name:s,onChange:a,value:l}=t,u=de(t,Lde),c=m.useRef(null),[d,f]=fa({controlled:l,default:i,name:"RadioGroup"});m.useImperativeHandle(r,()=>({focus:()=>{let b=c.current.querySelector("input:not(:disabled):checked");b||(b=c.current.querySelector("input:not(:disabled)")),b&&b.focus()}}),[]);const h=bt(n,c),p=Jt(s),g=m.useMemo(()=>({name:p,onChange(b){f(b.target.value),a&&a(b,b.target.value)},value:d}),[p,a,f,d]);return T.jsx(EU.Provider,{value:g,children:T.jsx(gT,x({role:"radiogroup",ref:h},u,{children:o}))})}),Vde=Nde;function Bde(e){return Ke("MuiSelect",e)}const Fp=Qe("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var D$;const jde=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],zde=he("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Fp.select}`]:t.select},{[`&.${Fp.select}`]:t[n.variant]},{[`&.${Fp.error}`]:t.error},{[`&.${Fp.multiple}`]:t.multiple}]}})(wU,{[`&.${Fp.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Ude=he("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ge(n.variant)}`],n.open&&t.iconOpen]}})(CU),Hde=he("input",{shouldForwardProp:e=>OC(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function $$(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Wde(e){return e==null||typeof e=="string"&&!e.trim()}const Gde=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${ge(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Re(a,Bde,t)},qde=m.forwardRef(function(t,n){var r;const{"aria-describedby":o,"aria-label":i,autoFocus:s,autoWidth:a,children:l,className:u,defaultOpen:c,defaultValue:d,disabled:f,displayEmpty:h,error:p=!1,IconComponent:g,inputRef:b,labelId:y,MenuProps:v={},multiple:w,name:C,onBlur:A,onChange:S,onClose:_,onFocus:k,onOpen:M,open:R,readOnly:O,renderValue:F,SelectDisplayProps:N={},tabIndex:V,value:$,variant:D="standard"}=t,L=de(t,jde),[P,B]=fa({controlled:$,default:d,name:"Select"}),[E,z]=fa({controlled:R,default:c,name:"Select"}),H=m.useRef(null),j=m.useRef(null),[G,Q]=m.useState(null),{current:ee}=m.useRef(R!=null),[Y,se]=m.useState(),fe=bt(n,b),ve=m.useCallback(Ie=>{j.current=Ie,Ie&&Q(Ie)},[]),oe=G==null?void 0:G.parentNode;m.useImperativeHandle(fe,()=>({focus:()=>{j.current.focus()},node:H.current,value:P}),[P]),m.useEffect(()=>{c&&E&&G&&!ee&&(se(a?null:oe.clientWidth),j.current.focus())},[G,a]),m.useEffect(()=>{s&&j.current.focus()},[s]),m.useEffect(()=>{if(!y)return;const Ie=un(j.current).getElementById(y);if(Ie){const Be=()=>{getSelection().isCollapsed&&j.current.focus()};return Ie.addEventListener("click",Be),()=>{Ie.removeEventListener("click",Be)}}},[y]);const ye=(Ie,Be)=>{Ie?M&&M(Be):_&&_(Be),ee||(se(a?null:oe.clientWidth),z(Ie))},we=Ie=>{Ie.button===0&&(Ie.preventDefault(),j.current.focus(),ye(!0,Ie))},me=Ie=>{ye(!1,Ie)},be=m.Children.toArray(l),ie=Ie=>
162{const Be=be.find(Ee=>Ee.props.value===Ie.target.value);Be!==void 0&&(B(Be.props.value),S&&S(Ie,Be))},pe=Ie=>Be=>{let Ee;if(Be.currentTarget.hasAttribute("tabindex")){if(w){Ee=Array.isArray(P)?P.slice():[];const Te=P.indexOf(Ie.props.value);Te===-1?Ee.push(Ie.props.value):Ee.splice(Te,1)}else Ee=Ie.props.value;if(Ie.props.onClick&&Ie.props.onClick(Be),P!==Ee&&(B(Ee),S)){const Te=Be.nativeEvent||Be,We=new Te.constructor(Te.type,Te);Object.defineProperty(We,"target",{writable:!0,value:{value:Ee,name:C}}),S(We,Ie)}w||ye(!1,Be)}},U=Ie=>{O||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ie.key)!==-1&&(Ie.preventDefault(),ye(!0,Ie))},q=G!==null&&E,K=Ie=>{!q&&A&&(Object.defineProperty(Ie,"target",{writable:!0,value:{value:P,name:C}}),A(Ie))};delete L["aria-invalid"];let ae,ue;const Z=[];let X=!1;(Z0({value:P})||h)&&(F?ae=F(P):X=!0);const W=be.map(Ie=>{if(!m.isValidElement(Ie))return null;let Be;if(w){if(!Array.isArray(P))throw new Error(gl(2));Be=P.some(Ee=>$$(Ee,Ie.props.value)),Be&&X&&Z.push(Ie.props.children)}else Be=$$(P,Ie.props.value),Be&&X&&(ue=Ie.props.children);return m.cloneElement(Ie,{"aria-selected":Be?"true":"false",onClick:pe(Ie),onKeyUp:Ee=>{Ee.key===" "&&Ee.preventDefault(),Ie.props.onKeyUp&&Ie.props.onKeyUp(Ee)},role:"option",selected:Be,value:void 0,"data-value":Ie.props.value})});X&&(w?Z.length===0?ae=null:ae=Z.reduce((Ie,Be,Ee)=>(Ie.push(Be),Ee<Z.length-1&&Ie.push(", "),Ie),[]):ae=ue);let le=Y;!a&&ee&&G&&(le=oe.clientWidth);let _e;typeof V<"u"?_e=V:_e=f?null:0;const ne=N.id||(C?`mui-component-select-${C}`:void 0),te=x({},t,{variant:D,value:P,open:q,error:p}),ke=Gde(te),Ve=x({},v.PaperProps,(r=v.slotProps)==null?void 0:r.paper),Fe=Jt();return T.jsxs(m.Fragment,{children:[T.jsx(zde,x({ref:ve,tabIndex:_e,role:"combobox","aria-controls":Fe,"aria-disabled":f?"true":void 0,"aria-expanded":q?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[y,ne].filter(Boolean).join(" ")||void 0,"aria-describedby":o,onKeyDown:U,onMouseDown:f||O?null:we,onBlur:K,onFocus:k},N,{ownerState:te,className:xe(N.className,ke.select,u),id:ne,children:Wde(ae)?D$||(D$=T.jsx("span",{className:"notranslate",children:"​"})):ae})),T.jsx(Hde,x({"aria-invalid":p,value:Array.isArray(P)?P.join(","):P,name:C,ref:H,"aria-hidden":!0,onChange:ie,tabIndex:-1,disabled:f,className:ke.nativeInput,autoFocus:s,ownerState:te},L)),T.jsx(Ude,{as:g,className:ke.icon,ownerState:te}),T.jsx(Xce,x({id:`menu-${C||""}`,anchorEl:oe,open:q,onClose:me,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},v,{MenuListProps:x({"aria-labelledby":y,role:"listbox","aria-multiselectable":w?"true":void 0,disableListWrap:!0,id:Fe},v.MenuListProps),slotProps:x({},v.slotProps,{paper:x({},Ve,{style:x({minWidth:le},Ve!=null?Ve.style:null)})}),children:W}))]})}),Kde=qde,Qde=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Yde=["root"],Xde=e=>{const{classes:t}=e;return t},wT={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>yr(e)&&e!=="variant",slot:"Root"},Jde=he(hU,wT)(""),Zde=he(SU,wT)(""),efe=he(uU,wT)(""),IU=m.forwardRef(function(t,n){const r=Je({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:c=Xz,id:d,input:f,inputProps:h,label:p,labelId:g,MenuProps:b,multiple:y=!1,native:v=!1,onClose:w,onOpen:C,open:A,renderValue:S,SelectDisplayProps:_,variant:k="outlined"}=r,M=de(r,Qde),R=v?fde:Kde,O=Ma(),F=Hu({props:r,muiFormControl:O,states:["variant","error"]}),N=F.variant||k,V=x({},r,{variant:N,classes:s}),$=Xde(V),D=de($,Yde),L=f||{standard:T.jsx(Jde,{ownerState:V}),outlined:T.jsx(Zde,{label:p,ownerState:V}),filled:T.jsx(efe,{ownerState:V})}[N],P=bt(n,L.ref);return T.jsx(m.Fragment,{children:m.cloneElement(L,x({inputComponent:R,inputProps:x({children:i,error:F.error,IconComponent:c,variant:N,type:void 0,multiple:y},v?{id:d}
162:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:g,MenuProps:b,onClose:w,onOpen:C,open:A,renderValue:S,SelectDisplayProps:x({id:d},_)},h,{classes:h?Ao(D,h.classes):D},f?f.props.inputProps:{})},(y&&v||u)&&N==="outlined"?{notched:!0}:{},{ref:P,className:xe(L.props.className,a,$.root)},!f&&{variant:N},M))})});IU.muiName="Select";const Cy=IU;function tfe(e){return Ke("MuiSkeleton",e)}Qe("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const nfe=["animation","className","component","height","style","variant","width"];let nw=e=>e,F$,L$,N$,V$;const rfe=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:s}=e;return Re({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!s&&"heightAuto"]},tfe,t)},ofe=El(F$||(F$=nw`
163  0% {
164    opacity: 1;
165  }
166
167  50% {
168    opacity: 0.4;
169  }
170
171  100% {
172    opacity: 1;
173  }
174`)),ife=El(L$||(L$=nw`
175  0% {
176    transform: translateX(-100%);
177  }
178
179  50% {
180    /* +0.5s of delay between each loop */
181    transform: translateX(100%);
182  }
183
184  100% {
185    transform: translateX(100%);
186  }
187`)),sfe=he("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{const n=Xee(e.shape.borderRadius)||"px",r=Jee(e.shape.borderRadius);return x({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:gs(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em"},t.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},t.variant==="circular"&&{borderRadius:"50%"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>e.animation==="pulse"&&Qc(N$||(N$=nw`
188      animation: ${0} 2s ease-in-out 0.5s infinite;
189    `),ofe),({ownerState:e,theme:t})=>e.animation==="wave"&&Qc(V$||(V$=nw`
190      position: relative;
191      overflow: hidden;
192
193      /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
194      -webkit-mask-image: -webkit-radial-gradient(white, black);
195
196      &::after {
197        animation: ${0} 2s linear 0.5s infinite;
198        background: linear-gradient(
199          90deg,
200          transparent,
201          ${0},
202          transparent
203        );
204        content: '';
205        position: absolute;
206        transform: translateX(-100%); /* Avoid flash during server-side hydration */
207        bottom: 0;
208        left: 0;
209        right: 0;
210        top: 0;
211      }
212    `),ife,(t.vars||t).palette.action.hover)),afe=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:s="span",height:a,style:l,variant:u="text",width:c}=r,d=de(r,nfe),f=x({},r,{animation:o,component:s,variant:u,hasChildren:!!d.children}),h=rfe(f);return T.jsx(sfe,x({as:s,ref:n,className:xe(h.root,i),ownerState:f},d,{style:x({width:c,height:a},l)}))}),lfe=afe,ufe=e=>!e||!ks(e);function cfe(e){return Ke("MuiSlider",e)}const dfe=Qe("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Ui=dfe,ffe=e=>{const{open:t}=e;return{offset:xe(t&&Ui.valueLabelOpen),circle:Ui.valueLabelCircle,label:Ui.valueLabelLabel}};function hfe(e){const{children:t,className:n,value:r}=e,o=ffe(e);return t?m.cloneElement(t,{className:xe(t.props.className)},T.jsxs(m.Fragment,{children:[t.props.children,T.jsx("span",{className:xe(o.offset,n),"aria-hidden":!0,
212children:T.jsx("span",{className:o.circle,children:T.jsx("span",{className:o.label,children:r})})})]})):null}const pfe=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],mfe=qh();function B$(e){return e}const gfe=he("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${ge(n.color)}`],n.size!=="medium"&&t[`size${ge(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Ui.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Ui.dragging}`]:{[`& .${Ui.thumb}, & .${Ui.track}`]:{transition:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),yfe=he("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),vfe=he("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:x({},e.vars?{backgroundColor:e.vars.palette.Slider[`${n}Track`],borderColor:e.vars.palette.Slider[`${n}Track`]}:x({backgroundColor:Jc(e.palette[n].main,.62),borderColor:Jc(e.palette[n].main,.62)},e.applyStyles("dark",{backgroundColor:Xc(e.palette[n].main,.5)}),e.applyStyles("dark",{borderColor:Xc(e.palette[n].main,.5)})))}))]}}),bfe=he("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${ge(n.color)}`],n.size!=="medium"&&t[`thumbSize${ge(n.size)}`]]}})(({theme:e})=>{var t;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,he
vendor: 7,924 bytes, line 212
212ight:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Ui.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${Ui.focusVisible}`]:x({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${pt(e.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${Ui.active}`]:x({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[n].mainChannel} / 0.16)}`}:{boxShadow:`0px 0px 0px 14px ${pt(e.palette[n].main,.16)}`})}})),{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}}]}}),wfe=he(hfe,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>x({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Ui.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${Ui.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),Cfe=he("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>OC(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]})),xfe=he("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>OC(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>x({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]})),Sfe=e=>{const{disabled:t,dragging:n,marked:r,orientation:o,track:i,classes:s,color:a,size:l}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",a&&`color${ge(a)}`,l&&`size${ge(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${ge(l)}`,a&&`thumbColor${ge(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Re(u,cfe,s)},_fe=({children:e})=>e,Efe=m.forwardRef(function(t,n){var r,o,i,s,a,l,u,c,d,f,h,p,g,b,y,v,w,C,A,S,_,k,M,R;const O=mfe({props:t,name:"MuiSlider"}),F=gd(),{"aria-label":N,"aria-valuetext":V,"aria-labelledby":$,component:D="span",components:L={},componentsProps:P={},color:B="primary",classes:E,className:z,disableSwap:H=!1,disabled:j=!1,getAriaLabel:G,getAriaValueText:Q,marks:ee=!1,max:Y=100,min:se=0,orientation:fe="horizontal",shiftStep:ve=10,size:oe="medium",step:ye=1,scale:we=B$,slotProps:me,slots:be,track:ie="normal",valueLabelDisplay:pe="off",valueLabelFormat:U=B$}=O,q=de(O,pfe),K=x({},O,{isRtl:F,max:Y,min:se,classes:E,disabled:j,disableSwap:H,orientation:fe,marks:ee,color:B,size:oe,step:ye,shiftStep:ve,scale:we,track:ie,valueLabelDisplay:pe,valueLabelFormat:U}),{axisProps:ae,getRootProps:ue,getHiddenInputProps:Z,getThumbProps:X,open:W,active:le,axis:_e,focusedThumbIndex:ne,range:te,dragging:ke,marks:Ve,values:Fe,trackOffset:Ie,trackLeap:Be,getThumbStyle:Ee}=Moe(x({},K,{rootRef:n}));K.marked=Ve.length>0&&Ve.some(Se=>Se.label),K.dragging=ke,K.focusedThumbIndex=ne;const Te=Sfe(K),We=(r=(o=be==null?void 0:be.root)!=null?o:L.Root)!=null?r:gfe,lt=(i=(s=be==null?void 0:be.rail)!=null?s:L.Rail)!=null?i:yfe,xt=(a=(l=be==null?void 0:be.track)!=null?l:L.Track)!=null?a:vfe,Wt=(u=(c=be==null?void 0:be.thumb)!=null?c:L.Thumb)!=null?u:bfe,en=(d=(f=be==null?void 0:be.valueLabel)!=null?f:L.ValueLabel)!=null?d:wfe,Bn=(h=(p=be==null?void 0:be.mark)!=null?p:L.Mark)!=null?h:Cfe,dn=(g=(b=be==null?void 0:be.markLabel)!=null?b:L.MarkLabel)!=null?g:xfe,jt=(y=(v=be==null?void 0:be.input)!=null?v:L.Input)!=null?y:"input",zt=(w=me==null?void 0:me.root)!=null?w:P.root,is=(C=me==null?void 0:me.rail)!=null?C:P.rail,ss=(A=me==null?void 0:me.track)!=null?A:P.track,Ls=(S=me==null?void 0:me.thumb)!=null?S:P.thumb,Ur=(_=me==null?void 0:me.valueLabel)!=null?_:P.valueLabel,In=(k=me==null?void 0:me.mark)!=null?k:P.mark,tn=(M=me==null?void 0:me.markLabel)!=null?M:P.markLabel,er=(R=me==null?void 0:me.input)!=null?R:P.input,vr=Wn({elementType:We,getSlotProps:ue,externalSlotProps:zt,externalForwardedProps:q,additionalProps:x({},ufe(We)&&{as:D}),ownerState:x({},K,zt==null?void 0:zt.ownerState),className:[Te.root,z]}),Oo=Wn({elementType:lt,externalSlotProps:is,ownerState:K,className:Te.rail}),Ns=Wn({elementType:xt,externalSlotProps:ss,additionalProps:{style:x({},ae[_e].offset(Ie),ae[_e].leap(Be))},ownerState:x({},K,ss==null?void 0:ss.ownerState),className:Te.track}),yo=Wn({elementType:Wt,getSlotProps:X,externalSlotProps:Ls,ownerState:x({},K,Ls==null?void 0:Ls.ownerState),className:Te.thumb}),ki=Wn({elementType:en,externalSlotProps:Ur,ownerState:x({},K,Ur==null?void 0:Ur.ownerState),className:Te.valueLabel}),Hr=Wn({elementType:Bn,externalSlotProps:In,ownerState:K,className:Te.mark}),Ar=Wn({elementType:dn,externalSlotProps:tn,ownerState:K,className:Te.markLabel}),as=Wn({elementType:jt,getSlotProps:Z,externalSlotProps:er,ownerState:K});return T.jsxs(We,x({},vr,{children:[T.jsx(lt,x({},Oo)),T.jsx(xt,x({},Ns)),Ve.filter(Se=>Se.value>=se&&Se.value<=Y).map((Se,Ce)=>{const je=J0(Se.value,se,Y),Le=ae[_e].offset(je);let st;return ie===!1?st=Fe.indexOf(Se.value)!==-1:st=ie==="normal"&&(te?Se.value>=Fe[0]&&Se.value<=Fe[Fe.length-1]:Se.value<=Fe[0])||ie==="inverted"&&(te?Se.value<=Fe[0]||Se.value>=Fe[Fe.length-1]:Se.value>=Fe[0]),T.jsxs(m.Fragment,{children:[T.jsx(Bn,x({"data-index":Ce},Hr,!ks(Bn)&&{markActive:st},{style:x({},Le,Hr.style),className:xe(Hr.className,st&&Te.markActive)})),Se.label!=null?T.jsx(dn,x({"aria-hidden":!0,"data-index":Ce},Ar,!ks(dn)&&{markLabelActive:st},{style:x({},Le,Ar.style),className:xe(Te.markLabel,Ar.className,st&&Te.markLabelActive),children:Se.label})):null]},Ce)}),Fe.map((Se,Ce)=>{const je=J0(Se,se,Y),Le=ae[_e].offset(je),st=pe==="off"?_fe:en;return T.jsx(st,x({},!ks(st)&&{valueLabelFormat:U,valueLabelDisplay:pe,value:typeof U=="function"?U(we(Se),Ce):U,index:Ce,open:W===Ce||le===Ce||pe
212==="on",disabled:j},ki,{children:T.jsx(Wt,x({"data-index":Ce},yo,{className:xe(Te.thumb,yo.className,le===Ce&&Te.active,ne===Ce&&Te.focusVisible),style:x({},Le,Ee(Ce),yo.style),children:T.jsx(jt,x({"data-index":Ce,"aria-label":G?G(Ce):N,"aria-valuenow":we(Se),"aria-labelledby":$,"aria-valuetext":Q?Q(we(Se),Ce):V,value:Fe[Ce]},as))}))}),Ce)})]}))}),AU=Efe;function Ife(e){return Ke("MuiSnackbarContent",e)}Qe("MuiSnackbarContent",["root","message","action"]);const Afe=["action","className","message","role"],kfe=e=>{const{classes:t}=e;return Re({root:["root"],action:["action"],message:["message"]},Ife,t)},Pfe=he(fo,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=gee(e.palette.background.default,t);return x({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),Tfe=he("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),Rfe=he("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Ofe=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:s,role:a="alert"}=r,l=de(r,Afe),u=r,c=kfe(u);return T.jsxs(Pfe,x({role:a,square:!0,elevation:6,className:xe(c.root,i),ownerState:u,ref:n},l,{children:[T.jsx(Tfe,{className:c.message,ownerState:u,children:s}),o?T.jsx(Rfe,{className:c.action,ownerState:u,children:o}):null]}))}),Mfe=Ofe;function Dfe(e){return Ke("MuiSnackbar",e)}Qe("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const $fe=["onEnter","onExited"],Ffe=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],Lfe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ge(n.vertical)}${ge(n.horizontal)}`]};return Re(r,Dfe,t)},j$=he("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ge(n.anchorOrigin.vertical)}${ge(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return x({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:x({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),Nfe=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiSnackbar"}),o=Zn(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:c,className:d,ClickAwayListenerProps:f,ContentProps:h,disableWindowBlurListener:p=!1,message:g,open:b,TransitionComponent:y=vh,transitionDuration:v=i,TransitionProps:{onEnter:w,onExited:C}={}}=r,A=de(r.TransitionProps,$fe),S=de(r,Ffe),_=x({},r,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:u,disableWindowBlurListener:p,TransitionComponent:y,transitionDuration:v}),k=Lfe(_),{getRootProps:M,onClickAway:R}=Doe(x({},_)),[O,F]=m.useState(!0),N=Wn({elementType:j$,getSlotProps:M,externalForwardedProps:S,ownerState:_,additionalProps:{ref:n},className:[k.root,d]}),V=D=>{F(!0),C&&C(D)},$=(D,L)=>{F(!1),w&&w(D,L)};return!b&&O?null:T.jsx(oT,x({onClickAway:R},f,{children:T.jsx(j$,x({},N,{children:T.jsx(y,x({appear:!0,in:b,timeout:v,direction:a==="top"?"down":"up",onEnter:$,onExited:V},A,{children:c||T.jsx(Mfe,x({message:g,action:s},h))}))}))}))}),Vfe=Nfe;function Bfe(e){return Ke("MuiTooltip",e)}const jfe=Qe("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),fu=jfe,zfe=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","
212slotProps","slots","title","TransitionComponent","TransitionProps"];function Ufe(e){return Math.round(e*1e5)/1e5}const Hfe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${ge(i.split("-")[0])}`],arrow:["arrow"]};return Re(s,Bfe,t)},Wfe=he(yd,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>x({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${fu.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${fu.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${fu.arrow}`]:x({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${fu.arrow}`]:x({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Gfe=he("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${ge(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>x({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:pt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Ufe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${fu.popper}[data-popper-placement*="left"] &`]:x({transformOrigin:"right center"},t.isRtl?x({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):x({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${fu.popper}[data-popper-placement*="right"] &`]:x({transformOrigin:"left center"},t.isRtl?x({marginRight:"14px"},t.touch&&{marginRight:"24px"}):x({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${fu.popper}[data-popper-placement*="top"] &`]:x({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${fu.popper}[data-popper-placement*="bottom"] &`]:x({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),qfe=he("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:pt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Wv=!1;const z$=new KP;let Lp={x:0,y:0};function Gv(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Kfe=m.forwardRef(function(t,n){var r,o,i,s,a,l,u,c,d,f,h,p,g,b,y,v,w,C,A;const S=Je({props:t,name:"MuiTooltip"}),{arrow:_=!1,children:k,components:M={},componentsProps:R={},describeChild:O=!1,disableFocusListener:F=!1,disableHoverListener:N=!1,disableInteractive:V=!1,disableTouchListener:$=!1,enterDelay:D=100,enterNextDelay:L=0,enterTouchDelay:P=700,followCursor:B=!1,id:E,leaveDelay:z=0,leaveTouchDelay:H=1500,onClose:j,onOpen:G,open:Q,placement:ee="bottom",PopperComponent:Y,PopperProps:se={},slotProps:fe={},slots:ve={},title:oe,TransitionComponent:ye=vh,TransitionProps:we}=S,me=de(S,zfe),be=m.isValidElement(k)?k:T.jsx("span",{children:k}),ie=Zn(),pe=gd(),[U,q]=m.useState(),[K,ae]=m.useState(null),ue=m.useRef(!1),Z=V||B,X=gc(),W=gc(),le=gc(),_e=gc(),[ne,te]=fa({controlled:Q,default:!1,name:"Tooltip",state:"open"});let ke=ne;const Ve=Jt(E),Fe=m.useRef(),Ie=Vt(()=>{Fe.current!==void 0&&(document.body.style.WebkitUserSelect=Fe.current,Fe.current=void 0),_e.clear()});m.useEffect(()=>Ie,[Ie]);const Be=et=>{z$.clear(),Wv=!0,te(!0),G&&!ke&&G(et)},Ee=Vt(et=>{z$.start(800+z,()=>{Wv=!1}),te(!1),j&&ke&&j(et),X.start(ie.transitions.duration.shortest,()=>{ue.current=!1})}),Te=et=>{ue.current&&et.type!=="touchstart"||(U&&U.removeAttribute("title"),W.clear(),le.clear(),D||Wv&&L?W.start(Wv?L:D,()=>{Be(et)}):Be(et))},We=et=>{W.clear(),le.start(z,()=>{Ee(et)})},{isFocusVisibleRef:lt,onBlur:xt,onFocus:Wt,ref:en}=py(),[,Bn]=m.useState(!1),dn=et=>{xt(et),lt.current===!1&&(Bn(!1),We(et))},jt=et=>{U||q(et.currentTarget),Wt(et),lt.current===!0&&(Bn(!0),Te(et))},zt=et=>{ue.current=!0;const Ot=be.props;Ot.onTouchStart&&Ot.onTouchStart(et)},is=et=>{zt(et),le.clear(),X.clear(),Ie(),Fe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",_e.start(P,()=>{document.body.style.WebkitUserSelect=Fe.current,Te(et)})},ss=et=>{be.props.onTouchEnd&&be.props.onTouchEnd(et),Ie(),le.start(H,()=>{Ee(et)})};m.useEffect(()=>{if(!ke)return;function et(Ot){(Ot.key==="Escape"||Ot.key==="Esc")&&Ee(Ot)}return document.addEventListener("keydown",et),()=>{document.removeEventListener("keydown",et)}},[Ee,ke]);const Ls=bt(be.ref,en,q,n);!oe&&oe!==0&&(ke=!1);const Ur=m.useRef(),In=et=>{const Ot=be.props;Ot.onMouseMove&&Ot.onMouseMove(et),Lp={x:et.clientX,y:et.clientY}
vendor: 8,955 bytes, line 212
212,Ur.current&&Ur.current.update()},tn={},er=typeof oe=="string";O?(tn.title=!ke&&er&&!N?oe:null,tn["aria-describedby"]=ke?Ve:null):(tn["aria-label"]=er?oe:null,tn["aria-labelledby"]=ke&&!er?Ve:null);const vr=x({},tn,me,be.props,{className:xe(me.className,be.props.className),onTouchStart:zt,ref:Ls},B?{onMouseMove:In}:{}),Oo={};$||(vr.onTouchStart=is,vr.onTouchEnd=ss),N||(vr.onMouseOver=Gv(Te,vr.onMouseOver),vr.onMouseLeave=Gv(We,vr.onMouseLeave),Z||(Oo.onMouseOver=Te,Oo.onMouseLeave=We)),F||(vr.onFocus=Gv(jt,vr.onFocus),vr.onBlur=Gv(dn,vr.onBlur),Z||(Oo.onFocus=jt,Oo.onBlur=dn));const Ns=m.useMemo(()=>{var et;let Ot=[{name:"arrow",enabled:!!K,options:{element:K,padding:4}}];return(et=se.popperOptions)!=null&&et.modifiers&&(Ot=Ot.concat(se.popperOptions.modifiers)),x({},se.popperOptions,{modifiers:Ot})},[K,se]),yo=x({},S,{isRtl:pe,arrow:_,disableInteractive:Z,placement:ee,PopperComponentProp:Y,touch:ue.current}),ki=Hfe(yo),Hr=(r=(o=ve.popper)!=null?o:M.Popper)!=null?r:Wfe,Ar=(i=(s=(a=ve.transition)!=null?a:M.Transition)!=null?s:ye)!=null?i:vh,as=(l=(u=ve.tooltip)!=null?u:M.Tooltip)!=null?l:Gfe,Se=(c=(d=ve.arrow)!=null?d:M.Arrow)!=null?c:qfe,Ce=wf(Hr,x({},se,(f=fe.popper)!=null?f:R.popper,{className:xe(ki.popper,se==null?void 0:se.className,(h=(p=fe.popper)!=null?p:R.popper)==null?void 0:h.className)}),yo),je=wf(Ar,x({},we,(g=fe.transition)!=null?g:R.transition),yo),Le=wf(as,x({},(b=fe.tooltip)!=null?b:R.tooltip,{className:xe(ki.tooltip,(y=(v=fe.tooltip)!=null?v:R.tooltip)==null?void 0:y.className)}),yo),st=wf(Se,x({},(w=fe.arrow)!=null?w:R.arrow,{className:xe(ki.arrow,(C=(A=fe.arrow)!=null?A:R.arrow)==null?void 0:C.className)}),yo);return T.jsxs(m.Fragment,{children:[m.cloneElement(be,vr),T.jsx(Hr,x({as:Y??yd,placement:ee,anchorEl:B?{getBoundingClientRect:()=>({top:Lp.y,left:Lp.x,right:Lp.x,bottom:Lp.y,width:0,height:0})}:U,popperRef:Ur,open:U?ke:!1,id:Ve,transition:!0},Oo,Ce,{popperOptions:Ns,children:({TransitionProps:et})=>T.jsx(Ar,x({timeout:ie.transitions.duration.shorter},et,je,{children:T.jsxs(as,x({},Le,{children:[oe,_?T.jsx(Se,x({},st,{ref:ae})):null]}))}))}))]})}),CT=Kfe;function Qfe(e){return Ke("MuiSwitch",e)}const eo=Qe("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Yfe=["className","color","edge","size","sx"],Xfe=qh(),Jfe=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:s}=e,a={root:["root",n&&`edge${ge(n)}`,`size${ge(r)}`],switchBase:["switchBase",`color${ge(o)}`,i&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=Re(a,Qfe,t);return x({},t,l)},Zfe=he("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${ge(n.edge)}`],t[`size${ge(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${eo.thumb}`]:{width:16,height:16},[`& .${eo.switchBase}`]:{padding:4,[`&.${eo.checked}`]:{transform:"translateX(16px)"}}}}]}),ehe=he(pT,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${eo.input}`]:t.input},n.color!=="default"&&t[`color${ge(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${eo.checked}`]:{transform:"translateX(20px)"},[`&.${eo.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${eo.checked} + .${eo.track}`]:{opacity:.5},[`&.${eo.disabled} + .${eo.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${eo.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:pt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${eo.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:pt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${eo.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Jc(e.palette[t].main,.62):Xc(e.palette[t].main,.55)}`}},[`&.${eo.checked} + .${eo.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),the=he("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),nhe=he("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),rhe=m.forwardRef(function(t,n){const r=Xfe({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:s=!1,size:a="medium",sx:l}=r,u=de(r,Yfe),c=x({},r,{color:i,edge:s,size:a}),d=Jfe(c),f=T.jsx(nhe,{className:d.thumb,ownerState:c});return T.jsxs(Zfe,{className:xe(d.root,o),sx:l,ownerState:c,children:[T.jsx(ehe,x({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:c},u,{classes:x({},d,{root:d.switchBase})})),T.jsx(the,{className:d.track,ownerState:c})]})}),kU=rhe;function ohe(e){return Ke("MuiTab",e)}const ihe=Qe("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Zu=ihe,she=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ahe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:s,selected:a,disabled:l}=e,u={root:["root",i&&s&&"labelIcon",`textColor${ge(n)}`,r&&"fullWidth",o&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Re(u,ohe,t)},lhe=he(_a,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${ge(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>x({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Zu.iconWrapper}`]:x({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Zu.selected}`]:{opacity:1},[`&.${Zu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Zu.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Zu.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Zu.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Zu.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),uhe=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:u="top",indicator:c,label:d,onChange:f,onClick:h,onFocus:p,selected:g,selectionFollowsFocus:b,textColor:y="inherit",value:v,wrapped:w=!1}=r,C=de(r,she),A=x({},r,{disabled:i,disableFocusRipple:s,selected:g,icon:!!l,iconPosition:u,label:!!d,fullWidth:a,textColor:y,wrapped:w}),S=ahe(A),_=l&&d&&m.isValidElement(l)?m.cloneElement(l,{className:xe(S.iconWrapper,l.props.className)}):l,k=R=>{!g&&f&&f(R,v),h&&h(R)},M=R=>{b&&!g&&f&&f(R,v),p&&p(R)};
212return T.jsxs(lhe,x({focusRipple:!s,className:xe(S.root,o),ref:n,role:"tab","aria-selected":g,disabled:i,onClick:k,onFocus:M,ownerState:A,tabIndex:g?0:-1},C,{children:[u==="top"||u==="start"?T.jsxs(m.Fragment,{children:[_,d]}):T.jsxs(m.Fragment,{children:[d,_]}),c]}))}),U$=uhe,che=m.createContext(),dhe=che,fhe=m.createContext(),hhe=fhe;function phe(e){return Ke("MuiTableCell",e)}const mhe=Qe("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),ghe=mhe,yhe=["align","className","component","padding","scope","size","sortDirection","variant"],vhe=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:s}=e,a={root:["root",n,s&&"stickyHeader",r!=="inherit"&&`align${ge(r)}`,o!=="normal"&&`padding${ge(o)}`,`size${ge(i)}`]};return Re(a,phe,t)},bhe=he("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${ge(n.size)}`],n.padding!=="normal"&&t[`padding${ge(n.padding)}`],n.align!=="inherit"&&t[`align${ge(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>x({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
213    ${e.palette.mode==="light"?Jc(pt(e.palette.divider,1),.88):Xc(pt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${ghe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),whe=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:s,padding:a,scope:l,size:u,sortDirection:c,variant:d}=r,f=de(r,yhe),h=m.useContext(dhe),p=m.useContext(hhe),g=p&&p.variant==="head";let b;s?b=s:b=g?"th":"td";let y=l;b==="td"?y=void 0:!y&&g&&(y="col");const v=d||p&&p.variant,w=x({},r,{align:o,component:b,padding:a||(h&&h.padding?h.padding:"normal"),size:u||(h&&h.size?h.size:"medium"),sortDirection:c,stickyHeader:v==="head"&&h&&h.stickyHeader,variant:v}),C=vhe(w);let A=null;return c&&(A=c==="asc"?"ascending":"descending"),T.jsx(bhe,x({as:b,ref:n,className:xe(C.root,i),"aria-sort":A,scope:y,ownerState:w},f))}),FI=whe;function Che(e){return Ke("MuiToolbar",e)}Qe("MuiToolbar",["root","gutters","regular","dense"]);const xhe=["className","component","disableGutters","variant"],She=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Re({root:["root",!n&&"gutters",r]},Che,t)},_he=he("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>x({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),Ehe=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:s=!1,variant:a="regular"}=r,l=de(r,xhe),u=x({},r,{component:i,disableGutters:s,variant:a}),c=She(u);return T.jsx(_he,x({as:i,className:xe(c.root,o),ref:n,ownerState:u},l))}),rw=Ehe,PU=Ze(T.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),TU=Ze(T.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),Ihe=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],Ahe=m.forwardRef(function(t,n){var r,o,i,s,a,l,u,c;const{backIconButtonProps:d,count:f,disabled:h=!1,getItemAriaLabel:p,nextIconButtonProps:g,onPageChange:b,page:y,rowsPerPage:v,showFirstButton:w,showLastButton:C,slots:A={},slotProps:S={}}=t,_=de(t,Ihe),k=gd(),M=fe=>{b(fe,0)},R=fe=>{b(fe,y-1)},O=fe=>{b(fe,y+1)},F=fe=>{b(fe,Math.max(0,Math.ceil(f/v)-1))},N=(r=A.firstButton)!=null?r:Zt,V=(o=A.lastButton)!=null?o:Zt,$=(i=A.nextButton)!=null?i:Zt,D=(s=A.previousButton)!=null?s:Zt,L=(a=A.firstButtonIcon)!=null?a:xde,P=(l=A.lastButtonIcon)!=null?l:Sde,B=(u=A.nextButtonIcon)!=null?u:TU,E=(c=A.previousButtonIcon)!=null?c:PU,z=k?V:N,H=k?$:D,j=k?D:$,G=k?N:V,Q=k?S.lastButton:S.firstButton,ee=k?S.nextButton:S.previousButton,Y=k?S.previousButton:S.nextButton,se=k?S.firstButton:S.lastButton;return T.jsxs("div",x({ref:n},_,{children:[w&&T.jsx(z,x({onClick:M,disabled:h||y===0,"aria-label":p("first",y),title:p("first",y)},Q,{children:k?T.jsx(P,x({},S.lastButtonIcon)):T.jsx(L,x({},S.firstButtonIcon))})),T.jsx(H,x({onClick:R,disabled:h||y===0,color:"inherit","aria-label":p("previous",y),title:p("previous",y)},ee??d,{children:k?T.jsx(B,x({},S.nextButtonIcon)):T.jsx(E,x({},S.previousButtonIcon))})),T.jsx(j,x({onClick:O,disabled:h||(f!==-1?y>=Math.ceil(f/v)-1:!1),color:"inherit","aria-label":p("next",y),title:p("next",y)},Y??g,{children:k?T.jsx(E,x({},S.previousButtonIcon)):T.jsx(B,x({},S.nextButtonIcon))})),C&&T.jsx(G,x({onClick:F,disabled:h||y>=Math.ceil(f/v)-1,"aria-label":p("last",y),title:p("last",y)},se,{children:k?T.jsx(L,x({},S.firstButtonIcon)):T.jsx(P,x({},S.lastButtonIcon))}))]}))}),khe=Ahe;function Phe(e){return Ke("MuiTablePagination",e)}const The=Qe("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),$c=The;var H$;const Rhe=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","
213showFirstButton","showLastButton","slotProps","slots"],Ohe=he(FI,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})),Mhe=he(rw,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>x({[`& .${$c.actions}`]:t.actions},t.toolbar)})(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${$c.actions}`]:{flexShrink:0,marginLeft:20}})),Dhe=he("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),$he=he("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(({theme:e})=>x({},e.typography.body2,{flexShrink:0})),Fhe=he(Cy,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>x({[`& .${$c.selectIcon}`]:t.selectIcon,[`& .${$c.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${$c.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),Lhe=he(io,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),Nhe=he("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(({theme:e})=>x({},e.typography.body2,{flexShrink:0}));function Vhe({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function Bhe(e){return`Go to ${e} page`}const jhe=e=>{const{classes:t}=e;return Re({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},Phe,t)},zhe=m.forwardRef(function(t,n){var r;const o=Je({props:t,name:"MuiTablePagination"}),{ActionsComponent:i=khe,backIconButtonProps:s,className:a,colSpan:l,component:u=FI,count:c,disabled:d=!1,getItemAriaLabel:f=Bhe,labelDisplayedRows:h=Vhe,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:g,onPageChange:b,onRowsPerPageChange:y,page:v,rowsPerPage:w,rowsPerPageOptions:C=[10,25,50,100],SelectProps:A={},showFirstButton:S=!1,showLastButton:_=!1,slotProps:k={},slots:M={}}=o,R=de(o,Rhe),O=o,F=jhe(O),N=(r=k==null?void 0:k.select)!=null?r:A,V=N.native?"option":Lhe;let $;(u===FI||u==="td")&&($=l||1e3);const D=Jt(N.id),L=Jt(N.labelId),P=()=>c===-1?(v+1)*w:w===-1?c:Math.min(c,(v+1)*w);return T.jsx(Ohe,x({colSpan:$,ref:n,as:u,ownerState:O,className:xe(F.root,a)},R,{children:T.jsxs(Mhe,{className:F.toolbar,children:[T.jsx(Dhe,{className:F.spacer}),C.length>1&&T.jsx($he,{className:F.selectLabel,id:L,children:p}),C.length>1&&T.jsx(Fhe,x({variant:"standard"},!N.variant&&{input:H$||(H$=T.jsx(vd,{}))},{value:w,onChange:y,id:D,labelId:L},N,{classes:x({},N.classes,{root:xe(F.input,F.selectRoot,(N.classes||{}).root),select:xe(F.select,(N.classes||{}).select),icon:xe(F.selectIcon,(N.classes||{}).icon)}),disabled:d,children:C.map(B=>m.createElement(V,x({},!ks(V)&&{ownerState:O},{className:F.menuItem,key:B.label?B.label:B,value:B.value?B.value:B}),B.label?B.label:B))})),T.jsx(Nhe,{className:F.displayedRows,children:h({from:c===0?0:v*w+1,to:P(),count:c===-1?-1:c,page:v})}),T.jsx(i,{className:F.actions,backIconButtonProps:s,count:c,nextIconButtonProps:g,onPageChange:b,page:v,rowsPerPage:w,showFirstButton:S,showLastButton:_,slotProps:k.actions,slots:M.actions,getItemAriaLabel:f,disabled:d})]})}))}),Uhe=zhe;function Hhe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Whe(e,t,n,r={},o=()=>{}){const{ease:i=Hhe,duration:s=300}=r;let a=null;const l=t[e];let u=!1;const c=()=>{u=!0},d=f=>{if(u){o(new Error("Animation cancelled"));return}a===null&&(a=f);const h=Math.min(1,(f-a)/s);if(t[e]=i(h)*(n-l)+l,h>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(d)};return l===n?(o(new Error("Element already at target position")),c):(requestAnimationFrame(d),c)}const Ghe=["onChange"],qhe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Khe(e){const{onChange:t}=e,n=de(e,Ghe),r=m.useRef(),o=m.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return Bt(()=>{const s=zu(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),a=vi(o.current);
213return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[t]),m.useEffect(()=>{i(),t(r.current)},[t]),T.jsx("div",x({style:qhe,ref:o},n))}function Qhe(e){return Ke("MuiTabScrollButton",e)}const Yhe=Qe("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Xhe=Yhe,Jhe=["className","slots","slotProps","direction","orientation","disabled"],Zhe=e=>{const{classes:t,orientation:n,disabled:r}=e;return Re({root:["root",n,r&&"disabled"]},Qhe,t)},epe=he(_a,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>x({width:40,flexShrink:0,opacity:.8,[`&.${Xhe.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),tpe=m.forwardRef(function(t,n){var r,o;const i=Je({props:t,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:l={},direction:u}=i,c=de(i,Jhe),d=gd(),f=x({isRtl:d},i),h=Zhe(f),p=(r=a.StartScrollButtonIcon)!=null?r:PU,g=(o=a.EndScrollButtonIcon)!=null?o:TU,b=Wn({elementType:p,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f}),y=Wn({elementType:g,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f});return T.jsx(epe,x({component:"div",className:xe(h.root,s),ref:n,role:null,ownerState:f,tabIndex:null},c,{children:u==="left"?T.jsx(p,x({},b)):T.jsx(g,x({},y))}))}),npe=tpe;function rpe(e){return Ke("MuiTabs",e)}const ope=Qe("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","
213indicator"]),ZS=ope,ipe=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],W$=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,G$=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,qv=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},spe=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:s,scrollButtonsHideMobile:a,classes:l}=e;return Re({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},rpe,l)},ape=he("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ZS.scrollButtons}`]:t.scrollButtons},{[`& .${ZS.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>x({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${ZS.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),lpe=he("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>x({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),upe=he("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>x({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),cpe=he("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>x({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),dpe=he(Khe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),q$={},fpe=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTabs"}),o=Zn(),i=gd(),{"aria-label":s,"aria-labelledby":a,action:l,centered:u=!1,children:c,className:d,component:f="div",allowScrollButtonsMobile:h=!1,indicatorColor:p="primary",onChange:g,orientation:b="horizontal",ScrollButtonComponent:y=npe,scrollButtons:v="auto",selectionFollowsFocus:w,slots:C={},slotProps:A={},TabIndicatorProps:S={},TabScrollButtonProps:_={},textColor:k="primary",value:M,variant:R="standard",visibleScrollbar:O=!1}=r,F=de(r,ipe),N=R==="scrollable",V=b==="vertical",$=V?"scrollTop":"scrollLeft",D=V?"top":"left",L=V?"bottom":"right",P=V?"clientHeight":"clientWidth",B=V?"height":"width",E=x({},r,{component:f,allowScrollButtonsMobile:h,indicatorColor:p,orientation:b,vertical:V,scrollButtons:v,textColor:k,variant:R,visibleScrollbar:O,fixed:!N,hideScrollbar:N&&!O,scrollableX:N&&!V,scrollableY:N&&V,centered:u&&!N,scrollButtonsHideMobile:!h}),z=spe(E),H=Wn({elementType:C.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:E}),j=Wn({elementType:C.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:E}),[G,Q]=m.useState(!1),[ee,Y]=m.useState(q$),[se,fe]=m.useState(!1),[ve,oe]=m.useState(!1),[ye,we]=m.useState(!1),[me,be]=m.useState({overflow:"hidden",scrollbarWidth:0}),ie=new Map,pe=m.useRef(null),U=m.useRef(null),q=()=>{const Ee=pe.current;let Te;if(Ee){const lt=Ee.getBoundingClientRect();Te={clientWidth:Ee.clientWidth,scrollLeft:Ee.scrollLeft,scrollTop:Ee.scrollTop,scrollLeftNormalized:jZ(Ee,i?"rtl":"ltr"),scrollWidth:Ee.scrollWidth,top:lt.top,bottom:lt.bottom,left:lt.left,right:lt.right}}let We;if(Ee&&M!==!1){const lt=U.current.children;if(lt.length>0){const xt=lt[ie.get(M)];We=xt?xt.getBoundingClientRect():null}}return{tabsMeta:Te,tabMeta:We}},K=Vt(()=>{const{tabsMeta:Ee,tabMeta:Te}=q();let We=0,lt;if(V)lt="top",Te&&Ee&&(We=Te.top-Ee.top+Ee.scrollTop);else if(lt=i?"right":"left",Te&&Ee){const Wt=i?Ee.scrollLeftNormalized+Ee.clientWidth-Ee.scrollWidth:Ee.scrollLeft;We=(i?-1:1)*(Te[lt]-Ee[lt]+Wt)}const xt={[lt]:We,[B]:Te?Te[B]:0};if(isNaN(ee[lt])||isNaN(ee[B]))Y(xt);else{const Wt=Math.abs(ee[lt]-xt[lt]),en=Math.abs(ee[B]-xt[B]);(Wt>=1||en>=1)&&Y(xt)}}),ae=(Ee,{animation:Te=!0}={})=>{Te?Whe($,pe.current,Ee,{duration:o.transitions.duration.standard}):pe.current[$]=Ee},ue=Ee=>{let Te=pe.current[$];V?Te+=Ee:(Te+=Ee*(i?-1:1),Te*=i&&hz()==="reverse"?-1:1),ae(Te)},Z=()=>{const Ee=pe.current[P];let Te=0;const We=Array.from(U.current.children);for(let lt=0;lt<We.length;lt+=1){const xt=We[lt];if(Te+xt[P]>Ee){lt===0&&(Te=Ee);break}Te+=xt[P]}return Te},X=()=>{ue(-1*Z())},W=()=>{ue(Z())},le=m.useCallback(Ee=>{be({overflow:null,scrollbarWidth:Ee})},[]),_e=()=>{const Ee={};Ee.scrollbarSizeListener=N?T.jsx(dpe,{onChange:le,className:xe(z.scrollableX,z.hideScrollbar)}):null;const We=N&&(v==="auto"&&(se||ve)||v===!0);return Ee.scrollButtonStart=We?T.jsx(y,x({slots:{StartScrollButtonIcon:C.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:H},orientation:b,direction:i?"right":"left",onClick:X,disabled:!se},_,{className:xe(z.scrollButtons,_.className)})):null,Ee.scrollButtonEnd=We?T.jsx(y,x({slots:{EndScrollButtonIcon:C.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:j},orientation:b,direction:i?"left":"right",onClick:W,disabled:!ve},_,{className:xe(z.scrollButtons,_.className)})):null,Ee},ne=Vt(Ee=>{const{tabsMeta:Te,tabMeta:We}=q();if(!(!We||!Te)){if(We[D]<Te[D]){const lt=Te[$]+(We[D]-Te[D]);ae(lt,{animation:Ee})}else if(We[L]>Te[L]){const lt=Te[$]+(We[L]-Te[L]);ae(lt,{animation:Ee})}}}),te=Vt(()=>{N&&v!==!1&&we(!ye)});m.useEffect(()=>{const Ee=zu(()=>{pe.current&&K()});let Te;const We=Wt=>{Wt.forEach(en=>
213{en.removedNodes.forEach(Bn=>{var dn;(dn=Te)==null||dn.unobserve(Bn)}),en.addedNodes.forEach(Bn=>{var dn;(dn=Te)==null||dn.observe(Bn)})}),Ee(),te()},lt=vi(pe.current);lt.addEventListener("resize",Ee);let xt;return typeof ResizeObserver<"u"&&(Te=new ResizeObserver(Ee),Array.from(U.current.children).forEach(Wt=>{Te.observe(Wt)})),typeof MutationObserver<"u"&&(xt=new MutationObserver(We),xt.observe(U.current,{childList:!0})),()=>{var Wt,en;Ee.clear(),lt.removeEventListener("resize",Ee),(Wt=xt)==null||Wt.disconnect(),(en=Te)==null||en.disconnect()}},[K,te]),m.useEffect(()=>{const Ee=Array.from(U.current.children),Te=Ee.length;if(typeof IntersectionObserver<"u"&&Te>0&&N&&v!==!1){const We=Ee[0],lt=Ee[Te-1],xt={root:pe.current,threshold:.99},Wt=jt=>{fe(!jt[0].isIntersecting)},en=new IntersectionObserver(Wt,xt);en.observe(We);const Bn=jt=>{oe(!jt[0].isIntersecting)},dn=new IntersectionObserver(Bn,xt);return dn.observe(lt),()=>{en.disconnect(),dn.disconnect()}}},[N,v,ye,c==null?void 0:c.length]),m.useEffect(()=>{Q(!0)},[]),m.useEffect(()=>{K()}),m.useEffect(()=>{ne(q$!==ee)},[ne,ee]),m.useImperativeHandle(l,()=>({updateIndicator:K,updateScrollButtons:te}),[K,te]);const ke=T.jsx(cpe,x({},S,{className:xe(z.indicator,S.className),ownerState:E,style:x({},ee,S.style)}));let Ve=0;const Fe=m.Children.map(c,Ee=>{if(!m.isValidElement(Ee))return null;const Te=Ee.props.value===void 0?Ve:Ee.props.value;ie.set(Te,Ve);const We=Te===M;return Ve+=1,m.cloneElement(Ee,x({fullWidth:R==="fullWidth",indicator:We&&!G&&ke,selected:We,selectionFollowsFocus:w,onChange:g,textColor:k,value:Te},Ve===1&&M===!1&&!Ee.props.tabIndex?{tabIndex:0}:{}))}),Ie=Ee=>{const Te=U.current,We=un(Te).activeElement;if(We.getAttribute("role")!=="tab")return;let xt=b==="horizontal"?"ArrowLeft":"ArrowUp",Wt=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&i&&(xt="ArrowRight",Wt="ArrowLeft"),Ee.key){case xt:Ee.preventDefault(),qv(Te,We,G$);break;case Wt:Ee.preventDefault(),qv(Te,We,W$);break;case"Home":Ee.preventDefault(),qv(Te,null,W$);break;case"End":Ee.preventDefault(),qv(Te,null,G$);break}},Be=_e();return T.jsxs(ape,x({className:xe(z.root,d),ownerState:E,ref:n,as:f},F,{children:[Be.scrollButtonStart,Be.scrollbarSizeListener,T.jsxs(lpe,{className:z.scroller,ownerState:E,style:{overflow:me.overflow,[V?`margin${i?"Left":"Right"}`:"marginBottom"]:O?void 0:-me.scrollbarWidth},ref:pe,children:[T.jsx(upe,{"aria-label":s,"aria-labelledby":a,"aria-orientation":b==="vertical"?"vertical":null,className:z.flexContainer,ownerState:E,onKeyDown:Ie,ref:U,role:"tablist",children:Fe}),G&&ke]}),Be.scrollButtonEnd]}))}),hpe=fpe;function ppe(e){return Ke("MuiTextField",e)}Qe("MuiTextField",["root"]);const mpe=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],gpe={standard:hU,filled:uU,outlined:SU},ype=e=>{const{classes:t}=e;return Re({root:["root"]},ppe,t)},vpe=he(Al,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bpe=m.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:s,className:a,color:l="primary",defaultValue:u,disabled:c=!1,error:d=!1,FormHelperTextProps:f,fullWidth:h=!1,helperText:p,id:g,InputLabelProps:b,inputProps:y,InputProps:v,inputRef:w,label:C,maxRows:A,minRows:S,multiline:_=!1,name:k,onBlur:M,onChange:R,onFocus:O,placeholder:F,required:N=!1,rows:V,select:$=!1,SelectProps:D,type:L,value:P,variant:B="outlined"}=r,E=de(r,mpe),z=x({},r,{autoFocus:i,color:l,disabled:c,error:d,fullWidth:h,multiline:_,required:N,select:$,variant:B}),H=ype(z),j={};B==="outlined"&&(b&&typeof b.shrink<"u"&&(j.notched=b.shrink),j.label=C),$&&((!D||!D.native)&&(j.id=void 0),j["aria-describedby"]=void 0);const G=Jt(g),Q=p&&G?`${G}-helper-text`:void 0,ee=C&&G?`${G}-label`:void 0,Y=gpe[B],se=T.jsx(Y,x({"aria-describedby":Q,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:h,multiline:_,name:k,rows:V,maxRows:A,minRows:S,type:L,value:P,id:G,inputRef:w,onBlur:M,onChange:R,onFocus:O,placeholder:F,inputProps:y},j,v));return T.jsxs(vpe,x({className:xe(H.root,a),disabled:c,error:d,fullWidth:h,ref:n,required:N,color:l,variant:B,ownerState:z},E,{children:[C!=null&&C!==""&&T.jsx(yT,x({htmlFor:G,id:ee},b,{children:C})),$?T.jsx(Cy,x({"aria-describedby":Q,id:G,labelId:ee,value:P,input:se},D,{children:s})):se,p&&T.jsx(wd,x({id:Q},f,{children:p}))]}))}),es=bpe;function wpe(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,o,i,s=[],a="",l=e.split("/");for(l[0]||l.shift();o=l.shift();)n=o[0],n==="*"?(s.push(n),a+=o[1]==="?"?"(?:/(.*))?":"/(.*)"):n===":"?(r=o.indexOf("?",1),i=o.indexOf(".",1),s.push(o.substring(1,~r?r:~i?i:o.length)),a+=~r&&!~i?"(?:/([^/]+?))?":"/([^/]+?)",~i&&(a+=(~r?"?":"")+"\\"+o.substring(i))):a+="/"+o;return{keys:s,pattern:new RegExp("^"+a+(t?"(?=$|/)":"/?$"),"i")}}var RU={exports:{}},OU={};/**
214 * @license React
215 * use-sync-external-store-shim.production.min.js
216 *
217 * Copyright (c) Facebook, Inc. and its affiliates.
218 *
219 * This source code is licensed under the MIT license found in the
220 * LICENSE file in the root directory of this source tree.
221 */var bh=m;function Cpe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xpe=typeof Object.is=="function"?Object.is:Cpe,Spe=bh.useState,_pe=bh.useEffect,Epe=bh.useLayoutEffect,Ipe=bh.useDebugValue;function Ape(e,t){var n=t(),r=Spe({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Epe(function(){o.value=n,o.getSnapshot=t,e_(o)&&i({inst:o})},[e,n,t]),_pe(function(){return e_(o)&&i({inst:o}),e(function(){e_(o)&&i({inst:o})})},[e]),Ipe(n),n}function e_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xpe(e,n)}catch{return!0}}function kpe(e,t){return t()}var Ppe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?kpe:Ape;OU.useSyncExternalStore=bh.useSyncExternalStore!==void 0?bh.useSyncExternalStore:Ppe;RU.exports=OU;var xT=RU.exports;const Tpe=C0.useInsertionEffect,Rpe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",MU=Rpe?m.useLayoutEffect:m.useEffect,Ope=Tpe||MU,HC=e=>{const t=m.useRef([e,(...n)=>t[0](...n)]).current;return Ope(()=>{t[0]=e}),t[1]},Mpe="popstate",ST="pushState",_T="replaceState",Dpe="hashchange",K$=[Mpe,
221ST,_T,Dpe],$pe=e=>{for(const t of K$)addEventListener(t,e);return()=>{for(const t of K$)removeEventListener(t,e)}},DU=(e,t)=>xT.useSyncExternalStore($pe,e,t),Fpe=()=>location.search,Lpe=({ssrSearch:e=""}={})=>DU(Fpe,()=>e),Q$=()=>location.pathname,Npe=({ssrPath:e}={})=>DU(Q$,e?()=>e:Q$),Vpe=(e,{replace:t=!1,state:n=null}={})=>history[t?_T:ST](n,"",e),Bpe=(e={})=>[Npe(e),Vpe],Y$=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Y$]>"u"){for(const e of[ST,_T]){const t=history[e];history[e]=function(){const n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,Y$,{value:!0})}const jpe=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",$U=(e="")=>e==="/"?"":e,zpe=(e,t)=>e[0]==="~"?e.slice(1):$U(t)+e,Upe=(e="",t)=>jpe(LI($U(e)),LI(t)),Hpe=e=>e[0]==="?"?e.slice(1):e,LI=e=>{try{return decodeURI(e)}catch{return e}},Wpe=e=>LI(Hpe(e)),FU={hook:Bpe,searchHook:Lpe,parser:wpe,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e},LU=m.createContext(FU),kl=()=>m.useContext(LU),NU={},VU=m.createContext(NU),Gpe=()=>m.useContext(VU),xy=e=>{const[t,n]=e.hook(e);return[Upe(e.base,t),HC((r,o)=>n(zpe(r,e.base),o))]},Da=()=>xy(kl()),qpe=()=>{const e=kl();return Wpe(e.searchHook(e))},ET=(e,t,n,r)=>{const{pattern:o,keys:i}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",r),s=o.exec(n)||[],[a,...l]=s;return a!==void 0?[!0,(()=>{const u=i!==!1?Object.fromEntries(i.map((d,f)=>[d,l[f]])):s.groups;let c={...l};return u&&Object.assign(c,u),c})(),...r?[a]:[]]:[!1,null]},Eg=e=>ET(kl().parser,e,Da()[0]),BU=({children:e,...t})=>{var c,d;const n=kl(),r=t.hook?FU:n;let o=r;const[i,s]=((c=t.ssrPath)==null?void 0:c.split("?"))??[];s&&(t.ssrSearch=s,t.ssrPath=i),t.hrefs=t.hrefs??((d=t.hook)==null?void 0:d.hrefs);let a=m.useRef({}),l=a.current,u=l;for(let f in r){const h=f==="base"?r[f]+(t[f]||""):t[f]||r[f];l===u&&h!==u[f]&&(a.current=u={...u}),u[f]=h,h!==r[f]&&(o=u)}return m.createElement(LU.Provider,{value:o,children:e})},X$=({children:e,component:t},n)=>t?m.createElement(t,{params:n}):typeof e=="function"?e(n):e,Kpe=e=>{let t=m.useRef(NU);const n=t.current;return t.current=Object.keys(e).length!==Object.keys(n).length||Object.entries(e).some(([r,o])=>o!==n[r])?e:n};function DUe(){const[e,t]=Da(),n=qpe(),r=m.useMemo(()=>new URLSearchParams(n),[n]);let o=r;const i=HC((s,a)=>{o=new URLSearchParams(typeof s=="function"?s(o):s),t(e+"?"+o,a)});return[r,i]}const Pt=({path:e,nest:t,match:n,...r})=>{const o=kl(),[i]=xy(o),[s,a,l]=n??ET(o.parser,e,i,t),u=Kpe({...Gpe(),...a});if(!s)return null;const c=l?m.createElement(BU,{base:l},X$(r,u)):X$(r,u);return m.createElement(VU.Provider,{value:u,children:c})},jU=m.forwardRef((e,t)=>{const n=kl(),[r,o]=xy(n),{to:i="",href:s=i,onClick:a,asChild:l,children:u,className:c,replace:d,state:f,...h}=e,p=HC(b=>{b.ctrlKey||b.metaKey||b.altKey||b.shiftKey||b.button!==0||(a==null||a(b),b.defaultPrevented||(b.preventDefault(),o(s,e)))}),g=n.hrefs(s[0]==="~"?s.slice(1):n.base+s,n);return l&&m.isValidElement(u)?m.cloneElement(u,{onClick:p,href:g}):m.createElement("a",{...h,onClick:p,href:g,className:c!=null&&c.call?c(r===s):c,children:u,ref:t})}),zU=e=>Array.isArray(e)?e.flatMap(t=>zU(t&&t.type===m.Fragment?t.props.children:t)):[e],NI=({children:e,location:t})=>{const n=kl(),[r]=xy(n);for(const o of zU(e)){let i=0;if(m.isValidElement(o)&&(i=ET(n.parser,o.props.path,t||r,o.props.nest))[0])return m.cloneElement(o,{match:i})}return null},UU=e=>{const{to:t,href:n=t}=e,r=kl(),[,o]=xy(r),i=HC(()=>o(t||n,e)),{ssrContext:s}=r;return MU(()=>{i()},[]),s&&(s.redirectTo=t),null};var HU={exports:{}},WU={};/**
222 * @license React
223 * use-sync-external-store-shim/with-selector.production.min.js
224 *
225 * Copyright (c) Facebook, Inc. and its affiliates.
226 *
227 * This source code is licensed under the MIT license found in the
228 * LICENSE file in the root directory of this source tree.
229 */var WC=m,Qpe=xT;function Ype(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xpe=typeof Object.is=="function"?Object.is:Ype,Jpe=Qpe.useSyncExternalStore,Zpe=WC.useRef,eme=WC.useEffect,tme=WC.useMemo,nme=WC.useDebugValue;WU.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Zpe(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=tme(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var p=s.value;if(o(p,h))return d=p}return d=h}if(p=d,Xpe(c,h))return p;var g=r(h);return o!==void 0&&o(p,g)?p:(c=h,d=g)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=Jpe(e,i[0],i[1]);return eme(function(){s.hasValue=!0,s.value=a},[a]),nme(a),a};HU.exports=WU;var rme=HU.exports;function ome(e){e()}let GU=ome;const ime=e=>GU=e,sme=()=>GU,J$=Symbol.for("react-redux-context"),Z$=typeof globalThis<"u"?globalThis:{};function ame(){var e;if(!m.createContext)return{};const t=(e=Z$[J$])!=null?e:Z$[J$]=new Map;let n=t.get(m.createContext);return n||(n=m.createContext(null),t.set(m.createContext,n)),n}const vl=ame();function IT(e=vl){return function(){return m.useContext(e)}}const qU=IT(),KU=()=>{throw new Error("uSES not initialized!")};let QU=KU;const lme=e=>{QU=e},ume=(e,t)=>
229e===t;function cme(e=vl){const t=e===vl?qU:IT(e);return function(r,o={}){const{equalityFn:i=ume,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:d,noopCheck:f}=t();m.useRef(!0);const h=m.useCallback({[r.name](g){return r(g)}}[r.name],[r,d,s]),p=QU(u.addNestedSub,l.getState,c||l.getState,h,i);return m.useDebugValue(p),p}}const td=cme(),dme=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function fme(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,d,f;function h(v,w){return l=v,u=w,c=e(l,u),d=t(r,u),f=n(c,d,u),a=!0,f}function p(){return c=e(l,u),t.dependsOnOwnProps&&(d=t(r,u)),f=n(c,d,u),f}function g(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(d=t(r,u)),f=n(c,d,u),f}function b(){const v=e(l,u),w=!s(v,c);return c=v,w&&(f=n(c,d,u)),f}function y(v,w){const C=!i(w,u),A=!o(v,l,w,u);return l=v,u=w,C&&A?p():C?g():A?b():f}return function(w,C){return a?y(w,C):h(w,C)}}function hme(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=de(t,dme);const s=n(e,i),a=r(e,i),l=o(e,i);return fme(s,a,l,e,i)}function pme(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function VI(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function eF(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function YU(e,t){return function(r,{displayName:o}){const i=function(a,l){return i.dependsOnOwnProps?i.mapToProps(a,l):i.mapToProps(a,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(a,l){i.mapToProps=e,i.dependsOnOwnProps=eF(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=eF(u),u=i(a,l)),u},i}}function AT(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function mme(e){return e&&typeof e=="object"?VI(t=>pme(e,t)):e?typeof e=="function"?YU(e):AT(e,"mapDispatchToProps"):VI(t=>({dispatch:t}))}function gme(e){return e?typeof e=="function"?YU(e):AT(e,"mapStateToProps"):VI(()=>({}))}function yme(e,t,n){return x({},n,e,t)}function vme(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){const d=e(l,u,c);return i?o(d,s)||(s=d):(i=!0,s=d),s}}}function bme(e){return e?typeof e=="function"?vme(e):AT(e,"mergeProps"):()=>yme}function wme(){const e=sme();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!o||t===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}const tF={notify(){},get:()=>[]};function XU(e,t){let n,r=tF,o=0,i=!1;function s(g){c();const b=r.subscribe(g);let y=!1;return()=>{y||(y=!0,b(),d())}}function a(){r.notify()}function l(){p.onStateChange&&p.onStateChange()}function u(){return i}function c(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=wme())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=tF)}function f(){i||(i=!0,c())}function h(){i&&(i=!1,d())}const p={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:u,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>r};return p}const Cme=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ow=Cme?m.useLayoutEffect:m.useEffect;function nF(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function t_(e,t){if(nF(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!nF(e[n[o]],t[n[o]]))return!1;return!0}const xme=["reactReduxForwardedRef"];let JU=KU;const Sme=e=>{JU=e},_me=[null,null];function Eme(e,t,n){ow(()=>e(...t),n)}function Ime(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Ame(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let d=!1,f=null;const h=()=>
229{if(d||!a.current)return;const g=t.getState();let b,y;try{b=r(g,o.current)}catch(v){y=v,f=v}y||(f=null),b===i.current?s.current||u():(i.current=b,l.current=b,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function kme(e,t){return e===t}function $Ue(e,t,n,{pure:r,areStatesEqual:o=kme,areOwnPropsEqual:i=t_,areStatePropsEqual:s=t_,areMergedPropsEqual:a=t_,forwardRef:l=!1,context:u=vl}={}){const c=u,d=gme(e),f=mme(t),h=bme(n),p=!!e;return b=>{const y=b.displayName||b.name||"Component",v=`Connect(${y})`,w={shouldHandleStateChanges:p,displayName:v,wrappedComponentName:y,WrappedComponent:b,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function C(_){const[k,M,R]=m.useMemo(()=>{const{reactReduxForwardedRef:ye}=_,we=de(_,xme);return[_.context,ye,we]},[_]),O=m.useMemo(()=>k&&k.Consumer&&_I.isContextConsumer(m.createElement(k.Consumer,null))?k:c,[k,c]),F=m.useContext(O),N=!!_.store&&!!_.store.getState&&!!_.store.dispatch,V=!!F&&!!F.store,$=N?_.store:F.store,D=V?F.getServerState:$.getState,L=m.useMemo(()=>hme($.dispatch,w),[$]),[P,B]=m.useMemo(()=>{if(!p)return _me;const ye=XU($,N?void 0:F.subscription),we=ye.notifyNestedSubs.bind(ye);return[ye,we]},[$,N,F]),E=m.useMemo(()=>N?F:x({},F,{subscription:P}),[N,F,P]),z=m.useRef(),H=m.useRef(R),j=m.useRef(),G=m.useRef(!1);m.useRef(!1);const Q=m.useRef(!1),ee=m.useRef();ow(()=>(Q.current=!0,()=>{Q.current=!1}),[]);const Y=m.useMemo(()=>()=>j.current&&R===H.current?j.current:L($.getState(),R),[$,R]),se=m.useMemo(()=>we=>P?Ame(p,$,P,L,H,z,G,Q,j,B,we):()=>{},[P]);Eme(Ime,[H,z,G,R,j,B]);let fe;try{fe=JU(se,Y,D?()=>L(D(),R):Y)}catch(ye){throw ee.current&&(ye.message+=`
230The error may be correlated with this previous error:
231${ee.current.stack}
232
233`),ye}ow(()=>{ee.current=void 0,j.current=void 0,z.current=fe});const ve=m.useMemo(()=>m.createElement(b,x({},fe,{ref:M})),[M,b,fe]);return m.useMemo(()=>p?m.createElement(O.Provider,{value:E},ve):ve,[O,ve,E])}const S=m.memo(C);if(S.WrappedComponent=b,S.displayName=C.displayName=v,l){const k=m.forwardRef(function(R,O){return m.createElement(S,x({},R,{reactReduxForwardedRef:O}))});return k.displayName=v,k.WrappedComponent=b,oM(k,b)}return oM(S,b)}}function Pme({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){const s=m.useMemo(()=>{const u=XU(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=m.useMemo(()=>e.getState(),[e]);ow(()=>{const{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);const l=t||vl;return m.createElement(l.Provider,{value:s},n)}function ZU(e=vl){const t=e===vl?qU:IT(e);return function(){const{store:r}=t();return r}}const Tme=ZU();function Rme(e=vl){const t=e===vl?Tme:ZU(e);return function(){return t().dispatch}}const Ome=Rme();lme(rme.useSyncExternalStoreWithSelector);Sme(xT.useSyncExternalStore);ime(md.unstable_batchedUpdates);function Ss(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(o){return"'"+o+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Du(e){return!!e&&!!e[kn]}function bl(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===jme}(e)||Array.isArray(e)||!!e[uF]||!!(!((t=e.constructor)===null||t===void 0)&&t[uF])||kT(e)||PT(e))}function nd(e,t,n){n===void 0&&(n=!1),Xh(e)===0?(n?Object.keys:Vf)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Xh(e){var t=e[kn];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:kT(e)?2:PT(e)?3:0}function Nf(e,t){return Xh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Mme(e,t){return Xh(e)===2?e.get(t):e[t]}function e6(e,t,n){var r=Xh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function t6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function kT(e){return Vme&&e instanceof Map}function PT(e){return Bme&&e instanceof Set}function sc(e){return e.o||e.t}function TT(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=r6(e);delete t[kn];for(var n=Vf(t),r=0;r<n.length;r++){var o=n[r],i=t[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function RT(e,t){return t===void 0&&(t=!1),OT(e)||Du(e)||!bl(e)||(Xh(e)>1&&(e.set=e.add=e.clear=e.delete=Dme),Object.freeze(e),t&&nd(e,function(n,r){return RT(r,!0)},!0)),e}function Dme(){Ss(2)}function OT(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ma(e){var t=UI[e];return t||Ss(18,e),t}function $me(e,t){UI[e]||(UI[e]=t)}function BI(){return Ig}function n_(e,t){t&&(ma("Patches"),e.u=[],e.s=[],e.v=t)}function iw(e){jI(e),e.p.forEach(Fme),e.p=null}function jI(e){e===Ig&&(Ig=e.l)}function rF(e){return Ig={p:[],l:Ig,h:e,m:!0,_:0}}function Fme(e){var t=e[kn];t.i===0||t.i===1?t.j():t.g=!0}function r_(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||ma("ES5").S(t,e,r),r?(n[kn].P&&(iw(t),Ss(4)),bl(e)&&(e=sw(t,e),t.l||aw(t,e)),t.u&&ma("Patches").M(n[kn].t,e,t.u,t.s)):e=sw(t,n,[]),iw(t),t.u&&t.v(t.u,t.s),e!==n6?e:void 0}function sw(e,t,n){if(OT(t))return t;var r=t[kn];if(!r)return nd(t,function(a,l){return oF(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return aw(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=TT(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),nd(i,function(a,l){return oF(e,r,o,a,l,n,s)}),aw(e,o,!1),n&&e.u&&ma("Patches").N(r,n,e.u,e.s)}return r.o}function oF(e,t,n,r,o,i,s){if(Du(o)){var a=sw(e,o,i&&t&&t.i!==3&&!Nf(t.R,r)?i.concat(r):void 0);if(e6(n,r,a),!Du(a))return;e.m=!1}else s&&n.add(o);if(bl(o)&&!OT(o)){if(!e.h.D&&e._<1)return;sw(e,o),t&&t.A.l||aw(e,o)}}function aw(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&RT(t,n)}function o_(e,t){var n=e[kn];return(n?sc(n):e)[t]}function iF(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function nu(e){e.P||(e.P=!0,e.l&&nu(e.l))}function i_(e){e.o||(e.o=TT(e.t))}function zI(e,t,n){var r=kT(t)?ma("MapSet").F(t,n):PT(t)?ma("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:BI(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ag;s&&(l=[a],u=tm);var c=Proxy.revocable(l,u),d=c.revoke,f=c.proxy;return a.k=f,a.j=d,f}(t,n):ma("ES5").J(t,n);return(n?n.A:BI()).p.push(r),r}function Lme(e){return Du(e)||Ss(22,e),function t(n){if(!bl(n))return n;var r,o=n[kn],i=Xh(n);if(o){if(!o.P&&(o.i<4||!ma("ES5").K(o)))return o.t;o.I=!0,r=sF(n,i),o.I=!1}else r=sF(n,i);return nd(r,function(s,a){o&&Mme(o.t,s)===a||e6(r,s,t(a))}),i===3?new Set(r):r}(e)}function sF(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return TT(e)}function Nme(){function e(i,s){var a=o[i];return a?a.enumerable=s:o[i]=a={configurable:!0,enumerable:s,get:function(){var l=this[kn];return Ag.get(l,i)},set:function(l){var u=this[kn];Ag.set(u,i,l)}},a}function t(i){for(var s=i.length-1;s>=0;s--){var a=i[s][kn];if(!a.P)switch(a.i){case 5:r(a)&&nu(a);break;case 4:n(a)&&nu(a)}}}function n(i){for(var s=i.t,a=i.k,l=Vf(a),u=l.length-1;u>=0;u--){var c=l[u];if(c!==kn){var d=s[c];if(d===void 0&&!Nf(s,c))return!0;var f=a[c],h=f&&f[kn];if(h?h.t!==d:!t6(f,d))return!0}}var p=!!s[kn];return l.length!==Vf(s).length+(p?0:1)}function r(i){var s=i.k;if(s.length!==i.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l<s.length;l++)if(!s.hasOwnProperty(l))return!0;return!1}var o={};$me("ES5",{J:function(i,s){var a=Array.isArray(i),l=function(c,d){if(c){for(var f=Array(d.length),h=0;h<d.length;h++)Object.defineProperty(f,""+h,e(h,!0));return f}var p=r6(d);delete p[kn];for(var g=Vf(p),b=0;b<g.length;b++){var y=g[b];p[y]=e(y,c||!!p[y].enumerable)}return Object.create(Object.getPrototypeOf(d),p)}(a,i),u={i:a?5:4,A:s?s.A:BI(),P:!1,I:!1,R:{},l:s,t:i,k:l,o:null,g:!1,C:!1};return Object.defineProperty(l,kn,{value:u,writable:!0}),l},S:function(i,s,a){a?Du(s)&&s[kn].A===i&&t(i.p):(i.u&&function l(u){if(u&&typeof u=="object"){var c=u[kn];if(c){var d=c.t,f=c.k,h=c.R,p=c.i;
233if(p===4)nd(f,function(w){w!==kn&&(d[w]!==void 0||Nf(d,w)?h[w]||l(f[w]):(h[w]=!0,nu(c)))}),nd(d,function(w){f[w]!==void 0||Nf(f,w)||(h[w]=!1,nu(c))});else if(p===5){if(r(c)&&(nu(c),h.length=!0),f.length<d.length)for(var g=f.length;g<d.length;g++)h[g]=!1;else for(var b=d.length;b<f.length;b++)h[b]=!0;for(var y=Math.min(f.length,d.length),v=0;v<y;v++)f.hasOwnProperty(v)||(h[v]=!0),h[v]===void 0&&l(f[v])}}}}(i.p[0]),t(i.p))},K:function(i){return i.i===4?n(i):r(i)}})}var aF,Ig,MT=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Vme=typeof Map<"u",Bme=typeof Set<"u",lF=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",n6=MT?Symbol.for("immer-nothing"):((aF={})["immer-nothing"]=!0,aF),uF=MT?Symbol.for("immer-draftable"):"__$immer_draftable",kn=MT?Symbol.for("immer-state"):"__$immer_state",jme=""+Object.prototype.constructor,Vf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,r6=Object.getOwnPropertyDescriptors||function(e){var t={};return Vf(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},UI={},Ag={get:function(e,t){if(t===kn)return e;var n=sc(e);if(!Nf(n,t))return function(o,i,s){var a,l=iF(i,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!bl(r)?r:r===o_(e.t,t)?(i_(e),e.o[t]=zI(e.A.h,r,e)):r},has:function(e,t){return t in sc(e)},ownKeys:function(e){return Reflect.ownKeys(sc(e))},set:function(e,t,n){var r=iF(sc(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=o_(sc(e),t),i=o==null?void 0:o[kn];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(t6(n,o)&&(n!==void 0||Nf(e.t,t)))return!0;i_(e),nu(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return o_(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,i_(e),nu(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=sc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ss(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ss(12)}},tm={};nd(Ag,function(e,t){tm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),tm.deleteProperty=function(e,t){return tm.set.call(this,e,t,void 0)},tm.set=function(e,t,n){return Ag.set.call(this,e[0],t,n,e[0])};var zme=function(){function e(n){var r=this;this.O=lF,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(g){var b=this;g===void 0&&(g=a);for(var y=arguments.length,v=Array(y>1?y-1:0),w=1;w<y;w++)v[w-1]=arguments[w];return l.produce(g,function(C){var A;return(A=i).call.apply(A,[b,C].concat(v))})}}var u;if(typeof i!="function"&&Ss(6),s!==void 0&&typeof s!="function"&&Ss(7),bl(o)){var c=rF(r),d=zI(r,o,void 0),f=!0;try{u=i(d),f=!1}finally{f?iw(c):jI(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(g){return n_(c,s),r_(g,c)},function(g){throw iw(c),g}):(n_(c,s),r_(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===n6&&(u=void 0),r.D&&RT(u,!0),s){var h=[],p=[];ma("Patches").M(o,u,h,p),s(h,p)}return u}Ss(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];return r.produceWithPatches(u,function(h){return o.apply(void 0,[h].concat(d))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){bl(n)||Ss(8),Du(n)&&(n=Lme(n));var r=rF(this),o=zI(this,n,void 0);return o[kn].C=!0,jI(r),o},t.finishDraft=function(n,r){var o=n&&n[kn],i=o.A;return n_(i,r),r_(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!lF&&Ss(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=ma("Patches").$;return Du(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),wi=new zme,o6=wi.produce;wi.produceWithPatches.bind(wi);wi.setAutoFreeze.bind(wi);wi.setUseProxies.bind(wi);wi.applyPatches.bind(wi);wi.createDraft.bind(wi);wi.finishDraft.bind(wi);function Ume(e,t,n){return t=fh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function dF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
233t%2?cF(Object(n),!0).forEach(function(r){Ume(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tr(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var fF=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),s_=function(){return Math.random().toString(36).substring(7).split("").join(".")},lw={INIT:"@@redux/INIT"+s_(),REPLACE:"@@redux/REPLACE"+s_(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+s_()}};function Hme(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function i6(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Tr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Tr(1));return n(i6)(e,t)}if(typeof e!="function")throw new Error(Tr(2));var o=e,i=t,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function c(){if(l)throw new Error(Tr(3));return i}function d(g){if(typeof g!="function")throw new Error(Tr(4));if(l)throw new Error(Tr(5));var b=!0;return u(),a.push(g),function(){if(b){if(l)throw new Error(Tr(6));b=!1,u();var v=a.indexOf(g);a.splice(v,1),s=null}}}function f(g){if(!Hme(g))throw new Error(Tr(7));if(typeof g.type>"u")throw new Error(Tr(8));if(l)throw new Error(Tr(9));try{l=!0,i=o(i,g)}finally{l=!1}for(var b=s=a,y=0;y<b.length;y++){var v=b[y];v()}return g}function h(g){if(typeof g!="function")throw new Error(Tr(10));o=g,f({type:lw.REPLACE})}function p(){var g,b=d;return g={subscribe:function(v){if(typeof v!="object"||v===null)throw new Error(Tr(11));function w(){v.next&&v.next(c())}w();var C=b(w);return{unsubscribe:C}}},g[fF]=function(){return this},g}return f({type:lw.INIT}),r={dispatch:f,subscribe:d,getState:c,replaceReducer:h},r[fF]=p,r}function Wme(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:lw.INIT});if(typeof r>"u")throw new Error(Tr(12));if(typeof n(void 0,{type:lw.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Tr(13))})}function Gme(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];typeof e[o]=="function"&&(n[o]=e[o])}var i=Object.keys(n),s;try{Wme(n)}catch(a){s=a}return function(l,u){if(l===void 0&&(l={}),s)throw s;for(var c=!1,d={},f=0;f<i.length;f++){var h=i[f],p=n[h],g=l[h],b=p(g,u);if(typeof b>"u")throw u&&u.type,new Error(Tr(14));d[h]=b,c=c||b!==g}return c=c||i.length!==Object.keys(l).length,c?d:l}}function hF(e,t){return function(){return t(e.apply(this,arguments))}}function FUe(e,t){if(typeof e=="function")return hF(e,t);if(typeof e!="object"||e===null)throw new Error(Tr(16));var n={};for(var r in e){var o=e[r];typeof o=="function"&&(n[r]=hF(o,t))}return n}function uw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function qme(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),i=function(){throw new Error(Tr(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=uw.apply(void 0,a)(o.dispatch),dF(dF({},o),{},{dispatch:i})}}}var cw="NOT_FOUND";function Kme(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:cw},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function Qme(e,t){var n=[];function r(a){var l=n.findIndex(function(c){return t(a,c.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return cw}function o(a,l){r(a)===cw&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var Yme=function(t,n){return t===n};function Xme(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function GC(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,o=r===void 0?Yme:r,i=n.maxSize,s=i===void 0?1:i,a=n.resultEqualityCheck,l=Xme(o),u=s===1?Kme(l):Qme(s,l);function c(){var d=u.get(arguments);if(d===cw){if(d=e.apply(null,arguments),a){var f=u.getEntries(),h=f.find(function(p){return a(p.value,d)});h&&(d=h.value)}u.put(arguments,d)}return d}return c.clearCache=function(){return u.clear()},c}function Jme(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(r){return typeof r=="function"})){var n=t.map(function(r){return typeof r=="function"?"function "+(r.name||"unnamed")+"()":typeof r}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function Zme(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];var u=0,c,d={memoizeOptions:void 0},f=a.pop();if(typeof f=="object"&&(d=f,f=a.pop()),typeof f!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof f+"]");var h=d,p=h.memoizeOptions,g=p===void 0?n:p,b=Array.isArray(g)?g:[g],y=Jme(a),v=e.apply(void 0,[function(){return u++,f.apply(null,arguments)}].concat(b)),w=e(function(){for(var A=[],S=y.length,_=0;_<S;_++)A.push(y[_].apply(null,arguments));return c=v.apply(null,A),c});
233return Object.assign(w,{resultFunc:f,memoizedResultFunc:v,dependencies:y,lastResult:function(){return c},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),w};return o}var ege=Zme(GC);function s6(e){var t=function(r){var o=r.dispatch,i=r.getState;return function(s){return function(a){return typeof a=="function"?a(o,i,e):s(a)}}};return t}var a6=s6();a6.withExtraArgument=s6;const pF=a6;var l6=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),tge=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},wh=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},nge=Object.defineProperty,rge=Object.defineProperties,oge=Object.getOwnPropertyDescriptors,mF=Object.getOwnPropertySymbols,ige=Object.prototype.hasOwnProperty,sge=Object.prototype.propertyIsEnumerable,gF=function(e,t,n){return t in e?nge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Iu=function(e,t){for(var n in t||(t={}))ige.call(t,n)&&gF(e,n,t[n]);if(mF)for(var r=0,o=mF(t);r<o.length;r++){var n=o[r];sge.call(t,n)&&gF(e,n,t[n])}return e},a_=function(e,t){return rge(e,oge(t))},age=function(e,t,n){return new Promise(function(r,o){var i=function(l){try{a(n.next(l))}catch(u){o(u)}},s=function(l){try{a(n.throw(l))}catch(u){o(u)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(i,s)};a((n=n.apply(e,t)).next())})},lge=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?uw:uw.apply(null,arguments)};function uge(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function Au(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var i=t.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return Iu(Iu({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}var cge=function(e){l6(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,wh([void 0],n[0].concat(this)))):new(t.bind.apply(t,wh([void 0],n.concat(this))))},t}(Array),dge=function(e){l6(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t}
233,enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,wh([void 0],n[0].concat(this)))):new(t.bind.apply(t,wh([void 0],n.concat(this))))},t}(Array);function HI(e){return bl(e)?o6(e,function(){}):e}function fge(e){return typeof e=="boolean"}function hge(){return function(t){return pge(t)}}function pge(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck,e.actionCreatorCheck;var r=new cge;return n&&(fge(n)?r.push(pF):r.push(pF.withExtraArgument(n.extraArgument))),r}var mge=!0;function gge(e){var t=hge(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,d=n.enhancers,f=d===void 0?void 0:d,h;if(typeof o=="function")h=o;else if(uge(o))h=Gme(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var p=s;typeof p=="function"&&(p=p(t));var g=qme.apply(void 0,p),b=uw;l&&(b=lge(Iu({trace:!mge},typeof l=="object"&&l)));var y=new dge(g),v=y;Array.isArray(f)?v=wh([g],f):typeof f=="function"&&(v=f(y));var w=b.apply(void 0,v);return i6(h,c,w)}function u6(e){var t={},n=[],r,o={addCase:function(i,s){var a=typeof i=="string"?i:i.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,o},addMatcher:function(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase:function(i){return r=i,o}};return e(o),[t,n,r]}function yge(e){return typeof e=="function"}function vge(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?u6(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(yge(e))l=function(){return HI(e())};else{var u=HI(e);l=function(){return u}}function c(d,f){d===void 0&&(d=l());var h=wh([i[f.type]],s.filter(function(p){var g=p.matcher;return g(f)}).map(function(p){var g=p.reducer;return g}));return h.filter(function(p){return!!p}).length===0&&(h=[a]),h.reduce(function(p,g){if(g)if(Du(p)){var b=p,y=g(b,f);return y===void 0?p:y}else{if(bl(p))return o6(p,function(v){return g(v,f)});var y=g(p,f);if(y===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}return p},d)}return c.getInitialState=l,c}function bge(e,t){return e+"/"+t}function wge(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:HI(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var d=r[c],f=bge(t,c),h,p;"reducer"in d?(h=d.reducer,p=d.prepare):h=d,i[c]=h,s[f]=h,a[c]=p?Au(f,p):Au(f)});function l(){var c=typeof e.extraReducers=="function"?u6(e.extraReducers):[e.extraReducers],d=c[0],f=d===void 0?{}:d,h=c[1],p=h===void 0?[]:h,g=c[2],b=g===void 0?void 0:g,y=Iu(Iu({},f),s);return vge(n,function(v){for(var w in y)v.addCase(w,y[w]);for(var C=0,A=p;C<A.length;C++){var S=A[C];v.addMatcher(S.matcher,S.reducer)}b&&v.addDefaultCase(b)})}var u;return{name:t,reducer:function(c,d){return u||(u=l()),u(c,d)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var Cge="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xge=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Cge[Math.random()*64|0];return t},Sge=["name","message","stack","code"],l_=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),yF=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),_ge=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Sge;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},qC=function(){function e(t,n,r){var o=Au(t+"/fulfilled",function(u,c,d,f){return{payload:u,meta:a_(Iu({},f||{}),{arg:d,requestId:c,requestStatus:"fulfilled"})}}),i=Au(t+"/pending",function(u,c,d){return{payload:void 0,meta:a_(Iu({},d||{}),{arg:c,requestId:u,requestStatus:"pending"})}}),s=Au(t+"/rejected",function(u,c,d,f,h){return{payload:f,error:(r&&r.serializeError||_ge)(u||"Rejected"),meta:a_(Iu({},h||{}),{arg:d,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(u==null?void 0:u.name)==="AbortError",condition:(u==null?void 0:u.name)==="ConditionError"})}}),a=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function l(u){return function(c,d,f){var h=r!=null&&r.idGenerator?r.idGenerator(u):xge(),p=new a,g;function b(v){g=v,p.abort()}var y=function(){return age(this,null,function(){var v,w,C,A,S,_,k;return tge(this,function(M){switch(M.label){case 0:return M.trys.push([0,4,,5]),A=(v=r==null?void 0:r.condition)==null?void 0:v.call(r,u,{getState:d,extra:f}),Ige(A)?[4,A]:[3,2];case 1:A=M.sent(),M.label=2;case 2:if(A===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=new Promise(function(R,O){return p.signal.addEventListener("abort",function(){return O({name:"AbortError",message:g||"Aborted"})})}),c(i(h,u,(w=r==null?void 0:r.getPendingMeta)==null?void 0:w.call(r,{requestId:h,arg:u},{getState:d,extra:f}
233))),[4,Promise.race([S,Promise.resolve(n(u,{dispatch:c,getState:d,extra:f,requestId:h,signal:p.signal,abort:b,rejectWithValue:function(R,O){return new l_(R,O)},fulfillWithValue:function(R,O){return new yF(R,O)}})).then(function(R){if(R instanceof l_)throw R;return R instanceof yF?o(R.payload,h,u,R.meta):o(R,h,u)})])];case 3:return C=M.sent(),[3,5];case 4:return _=M.sent(),C=_ instanceof l_?s(null,h,u,_.payload,_.meta):s(_,h,u),[3,5];case 5:return k=r&&!r.dispatchConditionRejection&&s.match(C)&&C.meta.condition,k||c(C),[2,C]}})})}();return Object.assign(y,{abort:b,requestId:h,arg:u,unwrap:function(){return y.then(Ege)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ege(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ige(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var DT="listenerMiddleware";Au(DT+"/add");Au(DT+"/removeAll");Au(DT+"/remove");var vF;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis);Nme();var bF={};/**
234 * @license
235 * Copyright 2017 Google LLC
236 *
237 * Licensed under the Apache License, Version 2.0 (the "License");
238 * you may not use this file except in compliance with the License.
239 * You may obtain a copy of the License at
240 *
241 *   http://www.apache.org/licenses/LICENSE-2.0
242 *
243 * Unless required by applicable law or agreed to in writing, software
244 * distributed under the License is distributed on an "AS IS" BASIS,
245 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
246 * See the License for the specific language governing permissions and
247 * limitations under the License.
248 */const c6=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=o&63|128):(o&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(o=65536+((o&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=o&63|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=o&63|128)}return t},Age=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const o=e[n++];if(o<128)t[r++]=String.fromCharCode(o);else if(o>191&&o<224){const i=e[n++];t[r++]=String.fromCharCode((o&31)<<6|i&63)}else if(o>239&&o<365){const i=e[n++],s=e[n++],a=e[n++],l=((o&7)<<18|(i&63)<<12|(s&63)<<6|a&63)-65536;t[r++]=String.fromCharCode(55296+(l>>10)),t[r++]=String.fromCharCode(56320+(l&1023))}else{const i=e[n++],s=e[n++];t[r++]=String.fromCharCode((o&15)<<12|(i&63)<<6|s&63)}}return t.join("")},d6={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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let o=0;o<e.length;o+=3){const i=e[o],s=o+1<e.length,a=s?e[o+1]:0,l=o+2<e.length,u=l?e[o+2]:0,c=i>>2,d=(i&3)<<4|a>>4;let f=(a&15)<<2|u>>6,h=u&63;l||(h=64,s||(f=64)),r.push(n[c],n[d],n[f],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(c6(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):Age(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let o=0;o<e.length;){const i=n[e.charAt(o++)],a=o<e.length?n[e.charAt(o)]:0;++o;const u=o<e.length?n[e.charAt(o)]:64;++o;const d=o<e.length?n[e.charAt(o)]:64;if(++o,i==null||a==null||u==null||d==null)throw new kge;const f=i<<2|a>>4;if(r.push(f),u!==64){const h=a<<4&240|u>>2;if(r.push(h),d!==64){const p=u<<6&192|d;r.push(p)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
248class kge extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Pge=function(e){const t=c6(e);return d6.encodeByteArray(t,!0)},dw=function(e){return Pge(e).replace(/\./g,"")},f6=function(e){try{return d6.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/**
249 * @license
250 * Copyright 2022 Google LLC
251 *
252 * Licensed under the Apache License, Version 2.0 (the "License");
253 * you may not use this file except in compliance with the License.
254 * You may obtain a copy of the License at
255 *
256 *   http://www.apache.org/licenses/LICENSE-2.0
257 *
258 * Unless required by applicable law or agreed to in writing, software
259 * distributed under the License is distributed on an "AS IS" BASIS,
260 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
261 * See the License for the specific language governing permissions and
262 * limitations under the License.
263 */function Tge(){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.")}/**
264 * @license
265 * Copyright 2022 Google LLC
266 *
267 * Licensed under the Apache License, Version 2.0 (the "License");
268 * you may not use this file except in compliance with the License.
269 * You may obtain a copy of the License at
270 *
271 *   http://www.apache.org/licenses/LICENSE-2.0
272 *
273 * Unless required by applicable law or agreed to in writing, software
274 * distributed under the License is distributed on an "AS IS" BASIS,
275 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
276 * See the License for the specific language governing permissions and
277 * limitations under the License.
278 */const Rge=()=>Tge().__FIREBASE_DEFAULTS__,Oge=()=>{if(typeof process>"u"||typeof bF>"u")return;const e=bF.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},Mge=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&f6(e[1]);return t&&JSON.parse(t)},KC=()=>{try{return Rge()||Oge()||Mge()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},h6=e=>{var t,n;return(n=(t=KC())===null||t===void 0?void 0:t.emulatorHosts)===null||n===void 0?void 0:n[e]},p6=e=>{const t=h6(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const r=parseInt(t.substring(n+1),10);return t[0]==="["?[t.substring(1,n-1),r]:[t.substring(0,n),r]},m6=()=>{var e;return(e=KC())===null||e===void 0?void 0:e.config},g6=e=>{var t;return(t=KC())===null||t===void 0?void 0:t[`_${e}`]};/**
279 * @license
280 * Copyright 2017 Google LLC
281 *
282 * Licensed under the Apache License, Version 2.0 (the "License");
283 * you may not use this file except in compliance with the License.
284 * You may obtain a copy of the License at
285 *
286 *   http://www.apache.org/licenses/LICENSE-2.0
287 *
288 * Unless required by applicable law or agreed to in writing, software
289 * distributed under the License is distributed on an "AS IS" BASIS,
290 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
291 * See the License for the specific language governing permissions and
292 * limitations under the License.
293 */class Dge{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,r))}}}/**
294 * @license
295 * Copyright 2021 Google LLC
296 *
297 * Licensed under the Apache License, Version 2.0 (the "License");
298 * you may not use this file except in compliance with the License.
299 * You may obtain a copy of the License at
300 *
301 *   http://www.apache.org/licenses/LICENSE-2.0
302 *
303 * Unless required by applicable law or agreed to in writing, software
304 * distributed under the License is distributed on an "AS IS" BASIS,
305 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
306 * See the License for the specific language governing permissions and
307 * limitations under the License.
308 */function y6(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=t||"demo-project",o=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const s=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:o,exp:o+3600,auth_time:o,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[dw(JSON.stringify(n)),dw(JSON.stringify(s)),""].join(".")}/**
309 * @license
310 * Copyright 2017 Google LLC
311 *
312 * Licensed under the Apache License, Version 2.0 (the "License");
313 * you may not use this file except in compliance with the License.
314 * You may obtain a copy of the License at
315 *
316 *   http://www.apache.org/licenses/LICENSE-2.0
317 *
318 * Unless required by applicable law or agreed to in writing, software
319 * distributed under the License is distributed on an "AS IS" BASIS,
320 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
321 * See the License for the specific language governing permissions and
322 * limitations under the License.
323 */function ur(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function $ge(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ur())}function Fge(){var e;const t=(e=KC())===null||e===void 0?void 0:e.forceEnvironment;if(t==="node")return!0;if(t==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function Lge(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function Nge(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Vge(){const e=ur();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function Bge(){return!Fge()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function v6(){try{return typeof indexedDB=="object"}catch{return!1}}function jge(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(r);o.onsuccess=()=>{o.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},o.onupgradeneeded=()=>{n=!1},o.onerror=()=>{var i;t(((i=o.error)===null||i===void 0?void 0:i.message)||"")}}catch(n){t(n)}})}/**
324 * @license
325 * Copyright 2017 Google LLC
326 *
327 * Licensed under the Apache License, Version 2.0 (the "License");
328 * you may not use this file except in compliance with the License.
329 * You may obtain a copy of the License at
330 *
331 *   http://www.apache.org/licenses/LICENSE-2.0
332 *
333 * Unless required by applicable law or agreed to in writing, software
334 * distributed under the License is distributed on an "AS IS" BASIS,
335 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
336 * See the License for the specific language governing permissions and
337 * limitations under the License.
338 */const zge="FirebaseError";class $a extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=zge,Object.setPrototypeOf(this,$a.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Sy.prototype.create)}}class Sy{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},o=`${this.service}/${t}`,i=this.errors[t],s=i?Uge(i,r):"Error",a=`${this.serviceName}: ${s} (${o}).`;return new $a(o,a,r)}}function Uge(e,t){return e.replace(Hge,(n,r)=>{const o=t[r];return o!=null?String(o):`<${r}?>`})}const Hge=/\{\$([^}]+)}/g;function Wge(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function kg(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const o of n){if(!r.includes(o))return!1;const i=e[o],s=t[o];if(wF(i)&&wF(s)){if(!kg(i,s))return!1}else if(i!==s)return!1}for(const o of r)if(!n.includes(o))return!1;return!0}function wF(e){return e!==null&&typeof e=="object"}/**
339 * @license
340 * Copyright 2017 Google LLC
341 *
342 * Licensed under the Apache License, Version 2.0 (the "License");
343 * you may not use this file except in compliance with the License.
344 * You may obtain a copy of the License at
345 *
346 *   http://www.apache.org/licenses/LICENSE-2.0
347 *
348 * Unless required by applicable law or agreed to in writing, software
349 * distributed under the License is distributed on an "AS IS" BASIS,
350 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
351 * See the License for the specific language governing permissions and
352 * limitations under the License.
353 */function _y(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(o=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(o))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function nm(e){const t={};return e.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[o,i]=r.split("=");
353t[decodeURIComponent(o)]=decodeURIComponent(i)}}),t}function rm(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function Gge(e,t){const n=new qge(e,t);return n.subscribe.bind(n)}class qge{constructor(t,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{t(this)}).catch(r=>{this.error(r)})}next(t){this.forEachObserver(n=>{n.next(t)})}error(t){this.forEachObserver(n=>{n.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,n,r){let o;if(t===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");Kge(t,["next","error","complete"])?o=t:o={next:t,error:n,complete:r},o.next===void 0&&(o.next=u_),o.error===void 0&&(o.error=u_),o.complete===void 0&&(o.complete=u_);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?o.error(this.finalError):o.complete()}catch{}}),this.observers.push(o),i}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,t)}sendOne(t,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{n(this.observers[t])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function Kge(e,t){if(typeof e!="object"||e===null)return!1;for(const n of t)if(n in e&&typeof e[n]=="function")return!0;return!1}function u_(){}/**
354 * @license
355 * Copyright 2021 Google LLC
356 *
357 * Licensed under the Apache License, Version 2.0 (the "License");
358 * you may not use this file except in compliance with the License.
359 * You may obtain a copy of the License at
360 *
361 *   http://www.apache.org/licenses/LICENSE-2.0
362 *
363 * Unless required by applicable law or agreed to in writing, software
364 * distributed under the License is distributed on an "AS IS" BASIS,
365 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
366 * See the License for the specific language governing permissions and
367 * limitations under the License.
368 */function _n(e){return e&&e._delegate?e._delegate:e}class $u{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/**
369 * @license
370 * Copyright 2019 Google LLC
371 *
372 * Licensed under the Apache License, Version 2.0 (the "License");
373 * you may not use this file except in compliance with the License.
374 * You may obtain a copy of the License at
375 *
376 *   http://www.apache.org/licenses/LICENSE-2.0
377 *
378 * Unless required by applicable law or agreed to in writing, software
379 * distributed under the License is distributed on an "AS IS" BASIS,
380 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
381 * See the License for the specific language governing permissions and
382 * limitations under the License.
383 */const ac="[DEFAULT]";/**
384 * @license
385 * Copyright 2019 Google LLC
386 *
387 * Licensed under the Apache License, Version 2.0 (the "License");
388 * you may not use this file except in compliance with the License.
389 * You may obtain a copy of the License at
390 *
391 *   http://www.apache.org/licenses/LICENSE-2.0
392 *
393 * Unless required by applicable law or agreed to in writing, software
394 * distributed under the License is distributed on an "AS IS" BASIS,
395 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
396 * See the License for the specific language governing permissions and
397 * limitations under the License.
398 */class Qge{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new Dge;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const o=this.getOrInitializeService({instanceIdentifier:n});o&&r.resolve(o)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){var n;const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),o=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(i){if(o)return null;throw i}else{if(o)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Xge(t))try{this.getOrInitializeService({instanceIdentifier:ac})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(n);try{const i=this.getOrInitializeService({instanceIdentifier:o});r.resolve(i)}catch{}}}}clearInstance(t=ac){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=ac){return this.instances.has(t)}getOptions(t=ac){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const o=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[i,s]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(i);r===a&&s.resolve(o)}return o}onInit(t,n){var r;const o=this.normalizeInstanceIdentifier(n),i=(r=this.onInitCallbacks.get(o))!==null&&r!==void 0?r:new Set;i.add(t),this.onInitCallbacks.set(o,i);const s=this.instances.get(o);return s&&t(s,o),()=>{i.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const o of r)try{o(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Yge(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=ac){return this.component?this.component.multipleInstances?t:ac:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Yge(e){return e===ac?void 0:e}function Xge(e){return e.instantiationMode==="EAGER"}/**
399 * @license
400 * Copyright 2019 Google LLC
401 *
402 * Licensed under the Apache License, Version 2.0 (the "License");
403 * you may not use this file except in compliance with the License.
404 * You may obtain a copy of the License at
405 *
406 *   http://www.apache.org/licenses/LICENSE-2.0
407 *
408 * Unless required by applicable law or agreed to in writing, software
409 * distributed under the License is distributed on an "AS IS" BASIS,
410 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
411 * See the License for the specific language governing permissions and
412 * limitations under the License.
413 */class Jge{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new Qge(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}/**
414 * @license
415 * Copyright 2017 Google LLC
416 *
417 * Licensed under the Apache License, Version 2.0 (the "License");
418 * you may not use this file except in compliance with the License.
419 * You may obtain a copy of the License at
420 *
421 *   http://www.apache.org/licenses/LICENSE-2.0
422 *
423 * Unless required by applicable law or agreed to in writing, software
424 * distributed under the License is distributed on an "AS IS" BASIS,
425 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
426 * See the License for the specific language governing permissions and
427 * limitations under the License.
428 */var Mt;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Mt||(Mt={}));const Zge={debug:Mt.DEBUG,verbose:Mt.VERBOSE,info:Mt.INFO,warn:Mt.WARN,error:Mt.ERROR,silent:Mt.SILENT},eye=Mt.INFO,tye={[Mt.DEBUG]:"log",[Mt.VERBOSE]:"log",[Mt.INFO]:"info",[Mt.WARN]:"warn",[Mt.ERROR]:"error"},nye=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),o=tye[t];if(o)console[o](`[${r}]  ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class $T{constructor(t){this.name=t,this._logLevel=eye,this._logHandler=nye,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Mt))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Zge[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Mt.DEBUG,...t),this._logHandler(this,Mt.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Mt.VERBOSE,...t),this._logHandler(this,Mt.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Mt.INFO,...t),this._logHandler(this,Mt.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Mt.WARN,...t),this._logHandler(this,Mt.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Mt.ERROR,...t),this._logHandler(this,Mt.ERROR,...t)}}const rye=(e,t)=>t.some(n=>e instanceof n);let CF,xF;function oye(){return CF||(CF=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function iye(){return xF||(xF=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const b6=new WeakMap,WI=new WeakMap,w6=new WeakMap,c_=new WeakMap,FT=new WeakMap;function sye(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{n(ku(e.result)),o()},s=()=>{r(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",s)});return t.then(n=>{n instanceof IDBCursor&&b6.set(n,e)}).catch(()=>{}),FT.set(t,e),t}function aye(e){if(WI.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{n(),o()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});WI.set(e,t)}let GI={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return WI.get(e);if(t==="objectStoreNames")return e.objectStoreNames||w6.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ku(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function lye(e){GI=e(GI)}function uye(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(d_(this),t,...n);return w6.set(r,t.sort?t.sort():[t]),ku(r)}:iye().includes(e)?function(...t){return e.apply(d_(this),t),ku(b6.get(this))}:function(...t){return ku(e.apply(d_(this),t))}}function cye(e){return typeof e=="function"?uye(e):(e instanceof IDBTransaction&&aye(e),rye(e,oye()
428)?new Proxy(e,GI):e)}function ku(e){if(e instanceof IDBRequest)return sye(e);if(c_.has(e))return c_.get(e);const t=cye(e);return t!==e&&(c_.set(e,t),FT.set(t,e)),t}const d_=e=>FT.get(e);function dye(e,t,{blocked:n,upgrade:r,blocking:o,terminated:i}={}){const s=indexedDB.open(e,t),a=ku(s);return r&&s.addEventListener("upgradeneeded",l=>{r(ku(s.result),l.oldVersion,l.newVersion,ku(s.transaction),l)}),n&&s.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const fye=["get","getKey","getAll","getAllKeys","count"],hye=["put","add","delete","clear"],f_=new Map;function SF(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(f_.get(t))return f_.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=hye.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||fye.includes(n)))return;const i=async function(s,...a){const l=this.transaction(s,o?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(a.shift())),(await Promise.all([u[n](...a),o&&l.done]))[0]};return f_.set(t,i),i}lye(e=>({...e,get:(t,n,r)=>SF(t,n)||e.get(t,n,r),has:(t,n)=>!!SF(t,n)||e.has(t,n)}));/**
429 * @license
430 * Copyright 2019 Google LLC
431 *
432 * Licensed under the Apache License, Version 2.0 (the "License");
433 * you may not use this file except in compliance with the License.
434 * You may obtain a copy of the License at
435 *
436 *   http://www.apache.org/licenses/LICENSE-2.0
437 *
438 * Unless required by applicable law or agreed to in writing, software
439 * distributed under the License is distributed on an "AS IS" BASIS,
440 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
441 * See the License for the specific language governing permissions and
442 * limitations under the License.
443 */class pye{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(mye(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function mye(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const qI="@firebase/app",_F="0.10.0";/**
444 * @license
445 * Copyright 2019 Google LLC
446 *
447 * Licensed under the Apache License, Version 2.0 (the "License");
448 * you may not use this file except in compliance with the License.
449 * You may obtain a copy of the License at
450 *
451 *   http://www.apache.org/licenses/LICENSE-2.0
452 *
453 * Unless required by applicable law or agreed to in writing, software
454 * distributed under the License is distributed on an "AS IS" BASIS,
455 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
456 * See the License for the specific language governing permissions and
457 * limitations under the License.
458 */const rd=new $T("@firebase/app"),gye="@firebase/app-compat",yye="@firebase/analytics-compat",vye="@firebase/analytics",bye="@firebase/app-check-compat",wye="@firebase/app-check",Cye="@firebase/auth",xye="@firebase/auth-compat",Sye="@firebase/database",_ye="@firebase/database-compat",Eye="@firebase/functions",Iye="@firebase/functions-compat",Aye="@firebase/installations",kye="@firebase/installations-compat",Pye="@firebase/messaging",Tye="@firebase/messaging-compat",Rye="@firebase/performance",Oye="@firebase/performance-compat",Mye="@firebase/remote-config",Dye="@firebase/remote-config-compat",$ye="@firebase/storage",Fye="@firebase/storage-compat",Lye="@firebase/firestore",Nye="@firebase/firestore-compat",Vye="firebase",Bye="10.10.0";/**
459 * @license
460 * Copyright 2019 Google LLC
461 *
462 * Licensed under the Apache License, Version 2.0 (the "License");
463 * you may not use this file except in compliance with the License.
464 * You may obtain a copy of the License at
465 *
466 *   http://www.apache.org/licenses/LICENSE-2.0
467 *
468 * Unless required by applicable law or agreed to in writing, software
469 * distributed under the License is distributed on an "AS IS" BASIS,
470 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
471 * See the License for the specific language governing permissions and
472 * limitations under the License.
473 */const KI="[DEFAULT]",jye={[qI]:"fire-core",[gye]:"fire-core-compat",[vye]:"fire-analytics",[yye]:"fire-analytics-compat",[wye]:"fire-app-check",[bye]:"fire-app-check-compat",[Cye]:"fire-auth",[xye]:"fire-auth-compat",[Sye]:"fire-rtdb",[_ye]:"fire-rtdb-compat",[Eye]:"fire-fn",[Iye]:"fire-fn-compat",[Aye]:"fire-iid",[kye]:"fire-iid-compat",[Pye]:"fire-fcm",[Tye]:"fire-fcm-compat",[Rye]:"fire-perf",[Oye]:"fire-perf-compat",[Mye]:"fire-rc",[Dye]:"fire-rc-compat",[$ye]:"fire-g
473cs",[Fye]:"fire-gcs-compat",[Lye]:"fire-fst",[Nye]:"fire-fst-compat","fire-js":"fire-js",[Vye]:"fire-js-all"};/**
474 * @license
475 * Copyright 2019 Google LLC
476 *
477 * Licensed under the Apache License, Version 2.0 (the "License");
478 * you may not use this file except in compliance with the License.
479 * You may obtain a copy of the License at
480 *
481 *   http://www.apache.org/licenses/LICENSE-2.0
482 *
483 * Unless required by applicable law or agreed to in writing, software
484 * distributed under the License is distributed on an "AS IS" BASIS,
485 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
486 * See the License for the specific language governing permissions and
487 * limitations under the License.
488 */const fw=new Map,zye=new Map,QI=new Map;function EF(e,t){try{e.container.addComponent(t)}catch(n){rd.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function od(e){const t=e.name;if(QI.has(t))return rd.debug(`There were multiple attempts to register component ${t}.`),!1;QI.set(t,e);for(const n of fw.values())EF(n,e);for(const n of zye.values())EF(n,e);return!0}function QC(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function na(e){return e.settings!==void 0}/**
489 * @license
490 * Copyright 2019 Google LLC
491 *
492 * Licensed under the Apache License, Version 2.0 (the "License");
493 * you may not use this file except in compliance with the License.
494 * You may obtain a copy of the License at
495 *
496 *   http://www.apache.org/licenses/LICENSE-2.0
497 *
498 * Unless required by applicable law or agreed to in writing, software
499 * distributed under the License is distributed on an "AS IS" BASIS,
500 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
501 * See the License for the specific language governing permissions and
502 * limitations under the License.
503 */const Uye={"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
503d-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."},Pu=new Sy("app","Firebase",Uye);/**
504 * @license
505 * Copyright 2019 Google LLC
506 *
507 * Licensed under the Apache License, Version 2.0 (the "License");
508 * you may not use this file except in compliance with the License.
509 * You may obtain a copy of the License at
510 *
511 *   http://www.apache.org/licenses/LICENSE-2.0
512 *
513 * Unless required by applicable law or agreed to in writing, software
514 * distributed under the License is distributed on an "AS IS" BASIS,
515 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
516 * See the License for the specific language governing permissions and
517 * limitations under the License.
518 */class Hye{constructor(t,n,r){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new $u("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}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(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw Pu.create("app-deleted",{appName:this._name})}}/**
519 * @license
520 * Copyright 2019 Google LLC
521 *
522 * Licensed under the Apache License, Version 2.0 (the "License");
523 * you may not use this file except in compliance with the License.
524 * You may obtain a copy of the License at
525 *
526 *   http://www.apache.org/licenses/LICENSE-2.0
527 *
528 * Unless required by applicable law or agreed to in writing, software
529 * distributed under the License is distributed on an "AS IS" BASIS,
530 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
531 * See the License for the specific language governing permissions and
532 * limitations under the License.
533 */const Cd=Bye;function C6(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:KI,automaticDataCollectionEnabled:!1},t),o=r.name;if(typeof o!="string"||!o)throw Pu.create("bad-app-name",{appName:String(o)});if(n||(n=m6()),!n)throw Pu.create("no-options");const i=fw.get(o);if(i){if(kg(n,i.options)&&kg(r,i.config))return i;throw Pu.create("duplicate-app",{appName:o})}const s=new Jge(o);for(const l of QI.values())s.addComponent(l);const a=new Hye(n,r,s);return fw.set(o,a),a}function LT(e=KI){const t=fw.get(e);if(!t&&e===KI&&m6())return C6();if(!t)throw Pu.create("no-app",{appName:e});return t}function ga(e,t,n){var r;let o=(r=jye[e])!==null&&r!==void 0?r:e;n&&(o+=`-${n}`);const i=o.match(/\s|\//),s=t.match(/\s|\//);if(i||s){const a=[`Unable to register library "${o}" with version "${t}":`];i&&a.push(`library name "${o}" contains illegal characters (whitespace or "/")`),i&&s&&a.push("and"),s&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),rd.warn(a.join(" "));return}od(new $u(`${o}-version`,()=>({library:o,version:t}),"VERSION"))}/**
534 * @license
535 * Copyright 2021 Google LLC
536 *
537 * Licensed under the Apache License, Version 2.0 (the "License");
538 * you may not use this file except in compliance with the License.
539 * You may obtain a copy of the License at
540 *
541 *   http://www.apache.org/licenses/LICENSE-2.0
542 *
543 * Unless required by applicable law or agreed to in writing, softw
543are
544 * distributed under the License is distributed on an "AS IS" BASIS,
545 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
546 * See the License for the specific language governing permissions and
547 * limitations under the License.
548 */const Wye="firebase-heartbeat-database",Gye=1,Pg="firebase-heartbeat-store";let h_=null;function x6(){return h_||(h_=dye(Wye,Gye,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(Pg)}catch(n){console.warn(n)}}}}).catch(e=>{throw Pu.create("idb-open",{originalErrorMessage:e.message})})),h_}async function qye(e){try{const n=(await x6()).transaction(Pg),r=await n.objectStore(Pg).get(S6(e));return await n.done,r}catch(t){if(t instanceof $a)rd.warn(t.message);else{const n=Pu.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});rd.warn(n.message)}}}async function IF(e,t){try{const r=(await x6()).transaction(Pg,"readwrite");await r.objectStore(Pg).put(t,S6(e)),await r.done}catch(n){if(n instanceof $a)rd.warn(n.message);else{const r=Pu.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});rd.warn(r.message)}}}function S6(e){return`${e.name}!${e.options.appId}`}/**
549 * @license
550 * Copyright 2021 Google LLC
551 *
552 * Licensed under the Apache License, Version 2.0 (the "License");
553 * you may not use this file except in compliance with the License.
554 * You may obtain a copy of the License at
555 *
556 *   http://www.apache.org/licenses/LICENSE-2.0
557 *
558 * Unless required by applicable law or agreed to in writing, software
559 * distributed under the License is distributed on an "AS IS" BASIS,
560 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
561 * See the License for the specific language governing permissions and
562 * limitations under the License.
563 */const Kye=1024,Qye=30*24*60*60*1e3;class Yye{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new Jye(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var t,n;const o=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),i=AF();if(!(((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===i||this._heartbeatsCache.heartbeats.some(s=>s.date===i)))return this._heartbeatsCache.heartbeats.push({date:i,agent:o}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{const a=new Date(s.date).valueOf();return Date.now()-a<=Qye}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var t;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=AF(),{heartbeatsToSend:r,unsentEntries:o}=Xye(this._heartbeatsCache.heartbeats),i=dw(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,o.length>0?(this._heartbeatsCache.heartbeats=o,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function AF(){return new Date().toISOString().substring(0,10)}function Xye(e,t=Kye){const n=[];let r=e.slice();for(const o of e){const i=n.find(s=>s.agent===o.agent);if(i){if(i.dates.push(o.date),kF(n)>t){i.dates.pop();break}}else if(n.push({agent:o.agent,dates:[o.date]}),kF(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class Jye{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return v6()?jge().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await qye(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){var n;if(await this._canUseIndexedDBPromise){const o=await this.read();return IF(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:o.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){var n;if(await this._canUseIndexedDBPromise){const o=await this.read();return IF(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:o.lastSentHeartbeatDate,heartbeats:[...o.heartbeats,...t.heartbeats]})}else return}}function kF(e){return dw(JSON.stringify({version:2,heartbeats:e})).length}/**
564 * @license
565 * Copyright 2019 Google LLC
566 *
567 * Licensed under the Apache License, Version 2.0 (the "License");
568 * you may not use this file except in compliance with the License.
569 * You may obtain a copy of the License at
570 *
571 *   http://www.apache.org/licenses/LICENSE-2.0
572 *
573 * Unless required by applicable law or agreed to in writing, software
574 * distributed under the License is distributed on an "AS IS" BASIS,
575 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
576 * See the License for the specific language governing permissions and
577 * limitations under the License.
578 */function Zye(e){od(new $u("platform-logger",t=>new pye(t),"PRIVATE")),od(new $u("heartbeat",t=>new Yye(t),"PRIVATE")),ga(qI,_F,e),ga(qI,_F,"esm2017"),ga("fire-js","")}Zye("");function NT(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Jh(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?i(c.value):o(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}function Zh(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function PF(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function TF(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function _6(){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 eve=_6,E6=new Sy("auth","Firebase",_6());/**
579 * @license
580 * Copyright 2020 Google LLC
581 *
582 * Licensed under the Apache License, Version 2.0 (the "License");
583 * you may not use this file except in compliance with the License.
584 * You may obtain a copy of the License at
585 *
586 *   http://www.apache.org/licenses/LICENSE-2.0
587 *
588 * Unless required by applicable law or agreed to in writing, software
589 * distributed under the License is distributed on an "AS IS" BASIS,
590 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
591 * See the License for the specific language governing permissions and
592 * limitations under the License.
593 */const hw=new $T("@firebase/auth");function tve(e,...t){hw.logLevel<=Mt.WARN&&hw.warn(`Auth (${Cd}): ${e}`,...t)}function jb(e,...t){hw.logLevel<=Mt.ERROR&&hw.error(`Auth (${Cd}): ${e}`,...t)}/**
594 * @license
595 * Copyright 2020 Google LLC
596 *
597 * Licensed under the Apache License, Version 2.0 (the "License");
598 * you may not use this file except in compliance with the License.
599 * You may obtain a copy of the License at
600 *
601 *   http://www.apache.org/licenses/LICENSE-2.0
602 *
603 * Unless required by applicable law or agreed to in writing, softw
603are
604 * distributed under the License is distributed on an "AS IS" BASIS,
605 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
606 * See the License for the specific language governing permissions and
607 * limitations under the License.
608 */function Os(e,...t){throw VT(e,...t)}function ya(e,...t){return VT(e,...t)}function I6(e,t,n){const r=Object.assign(Object.assign({},eve()),{[t]:n});return new Sy("auth","Firebase",r).create(t,{appName:e.name})}function al(e){return I6(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function VT(e,...t){if(typeof e!="string"){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return E6.create(e,...t)}function dt(e,t,...n){if(!e)throw VT(t,...n)}function el(e){const t="INTERNAL ASSERTION FAILED: "+e;throw jb(t),new Error(t)}function wl(e,t){e||el(t)}/**
609 * @license
610 * Copyright 2020 Google LLC
611 *
612 * Licensed under the Apache License, Version 2.0 (the "License");
613 * you may not use this file except in compliance with the License.
614 * You may obtain a copy of the License at
615 *
616 *   http://www.apache.org/licenses/LICENSE-2.0
617 *
618 * Unless required by applicable law or agreed to in writing, software
619 * distributed under the License is distributed on an "AS IS" BASIS,
620 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
621 * See the License for the specific language governing permissions and
622 * limitations under the License.
623 */function YI(){var e;return typeof self<"u"&&((e=self.location)===null||e===void 0?void 0:e.href)||""}function nve(){return RF()==="http:"||RF()==="https:"}function RF(){var e;return typeof self<"u"&&((e=self.location)===null||e===void 0?void 0:e.protocol)||null}/**
624 * @license
625 * Copyright 2020 Google LLC
626 *
627 * Licensed under the Apache License, Version 2.0 (the "License");
628 * you may not use this file except in compliance with the License.
629 * You may obtain a copy of the License at
630 *
631 *   http://www.apache.org/licenses/LICENSE-2.0
632 *
633 * Unless required by applicable law or agreed to in writing, software
634 * distributed under the License is distributed on an "AS IS" BASIS,
635 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
636 * See the License for the specific language governing permissions and
637 * limitations under the License.
638 */function rve(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(nve()||Lge()||"connection"in navigator)?navigator.onLine:!0}function ove(){if(typeof navigator>"u")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}/**
639 * @license
640 * Copyright 2020 Google LLC
641 *
642 * Licensed under the Apache License, Version 2.0 (the "License");
643 * you may not use this file except in compliance with the License.
644 * You may obtain a copy of the License at
645 *
646 *   http://www.apache.org/licenses/LICENSE-2.0
647 *
648 * Unless required by applicable law or agreed to in writing, software
649 * distributed under the License is distributed on an "AS IS" BASIS,
650 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
651 * See the License for the specific language governing permissions and
652 * limitations under the License.
653 */class Ey{constructor(t,n){this.shortDelay=t,this.longDelay=n,wl(n>t,"Short delay should be less than long delay!"),this.isMobile=$ge()||Nge()}get(){return rve()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
654 * @license
655 * Copyright 2020 Google LLC
656 *
657 * Licensed under the Apache License, Version 2.0 (the "License");
658 * you may not use this file except in compliance with the License.
659 * You may obtain a copy of the License at
660 *
661 *   http://www.apache.org/licenses/LICENSE-2.0
662 *
663 * Unless required by applicable law or agreed to in writing, software
664 * distributed under the License is distributed on an "AS IS" BASIS,
665 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
666 * See the License for the specific language governing permissions and
667 * limitations under the License.
668 */function BT(e,t){wl(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}/**
669 * @license
670 * Copyright 2020 Google LLC
671 *
672 * Licensed under the Apache License, Version 2.0 (the "License");
673 * you may not use this file except in compliance with the License.
674 * You may obtain a copy of the License at
675 *
676 *   http://www.apache.org/licenses/LICENSE-2.0
677 *
678 * Unless required by applicable law or agreed to in writing, software
679 * distributed under the License is distributed on an "AS IS" BASIS,
680 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
681 * See the License for the specific language governing permissions and
682 * limitations under the License.
683 */class A6{static initialize(t,n,r){this.fetchImpl=t,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}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;el("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;el("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;el("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
684 * @license
685 * Copyright 2020 Google LLC
686 *
687 * Licensed under the Apache License, Version 2.0 (the "License");
688 * you may not use this file except in compliance with the License.
689 * You may obtain a copy of the License at
690 *
691 *   http://www.apache.org/licenses/LICENSE-2.0
692 *
693 * Unless required by applicable law or agreed to in writing, software
694 * distributed under the License is distributed on an "AS IS" BASIS,
695 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
696 * See the License for the specific language governing permissions and
697 * limitations under the License.
698 */const ive={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-rec
698aptcha-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"};/**
699 * @license
700 * Copyright 2020 Google LLC
701 *
702 * Licensed under the Apache License, Version 2.0 (the "License");
703 * you may not use this file except in compliance with the License.
704 * You may obtain a copy of the License at
705 *
706 *   http://www.apache.org/licenses/LICENSE-2.0
707 *
708 * Unless required by applicable law or agreed to in writing, software
709 * distributed under the License is distributed on an "AS IS" BASIS,
710 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
711 * See the License for the specific language governing permissions and
712 * limitations under the License.
713 */const sve=new Ey(3e4,6e4);function Pl(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function Tl(e,t,n,r,o={}){return k6(e,o,async()=>{let i={},s={};r&&(t==="GET"?s=r:i={body:JSON.stringify(r)});const a=_y(Object.assign({key:e.config.apiKey},s)).slice(1),l=await e._getAdditionalHeaders();return l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode),A6.fetch()(P6(e,e.config.apiHost,n,a),Object.assign({method:t,headers:l,referrerPolicy:"no-referrer"},i))})}async function k6(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},ive),t);try{const o=new lve(e),i=await Promise.race([n(),o.promise]);o.clearNetworkTimeout();const s=await i.json();if("needConfirmation"in s)throw Kv(e,"account-exists-with-different-credential",s);if(i.ok&&!("errorMessage"in s))return s;{const a=i.ok?s.errorMessage:s.error.message,[l,u]=a.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw Kv(e,"credential-already-in-use",s);if(l==="EMAIL_EXISTS")throw Kv(e,"email-already-in-use",s);if(l==="USER_DISABLED")throw Kv(e,"user-disabled",s);const c=r[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw I6(e,c,u);Os(e,c)}}catch(o){if(o instanceof $a)throw o;Os(e,"network-request-failed",{message:String(o)})}}async function Iy(e,t,n,r,o={}){const i=await Tl(e,t,n,r,o);return"mfaPendingCredential"in i&&Os(e,"multi-factor-auth-required",{_serverResponse:i}),i}function P6(e,t,n,r){const o=`${t}${n}?${r}`;return e.config.emulator?BT(e.config,o):`${e.config.apiScheme}://${o}`}function ave(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class lve{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(ya(this.auth,"network-request-failed")),sve.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Kv(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const o=ya(e,t,r);return o.customData._tokenResponse=n,o}function OF(e){return e!==void 0&&e.enterprise!==void 0}class uve{constructor(t){if(this.siteKey="",this.recaptchaEnforcementState=[],t.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=t.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=t.recaptchaEnforcementState}getProviderEnforcementState(t){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(const n of this.recaptchaEnforcementState)if(n.provider&&n.provider===t)return ave(n.enforcementState);return null}isProviderEnabled(t){return this.getProviderEnforcementState(t)==="ENFORCE"||this.getProviderEnforcementState(t)==="AUDIT"}}async function cve(e,t){return Tl(e,"GET","/v2/recaptchaConfig",Pl(e,t))}/**
714 * @license
715 * Copyright 2020 Google LLC
716 *
717 * Licensed under the Apache License, Version 2.0 (the "License");
718 * you may not use this file except in compliance with the License.
719 * You may obtain a copy of the License at
720 *
721 *   http://www.apache.org/licenses/LICENSE-2.0
722 *
723 * Unless required by applicable law or agreed to in writing, softw
723are
724 * distributed under the License is distributed on an "AS IS" BASIS,
725 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
726 * See the License for the specific language governing permissions and
727 * limitations under the License.
728 */async function dve(e,t){return Tl(e,"POST","/v1/accounts:delete",t)}async function T6(e,t){return Tl(e,"POST","/v1/accounts:lookup",t)}/**
729 * @license
730 * Copyright 2020 Google LLC
731 *
732 * Licensed under the Apache License, Version 2.0 (the "License");
733 * you may not use this file except in compliance with the License.
734 * You may obtain a copy of the License at
735 *
736 *   http://www.apache.org/licenses/LICENSE-2.0
737 *
738 * Unless required by applicable law or agreed to in writing, software
739 * distributed under the License is distributed on an "AS IS" BASIS,
740 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
741 * See the License for the specific language governing permissions and
742 * limitations under the License.
743 */function Lm(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function fve(e,t=!1){const n=_n(e),r=await n.getIdToken(t),o=jT(r);dt(o&&o.exp&&o.auth_time&&o.iat,n.auth,"internal-error");const i=typeof o.firebase=="object"?o.firebase:void 0,s=i==null?void 0:i.sign_in_provider;return{claims:o,token:r,authTime:Lm(p_(o.auth_time)),issuedAtTime:Lm(p_(o.iat)),expirationTime:Lm(p_(o.exp)),signInProvider:s||null,signInSecondFactor:(i==null?void 0:i.sign_in_second_factor)||null}}function p_(e){return Number(e)*1e3}function jT(e){const[t,n,r]=e.split(".");if(t===void 0||n===void 0||r===void 0)return jb("JWT malformed, contained fewer than 3 sections"),null;try{const o=f6(n);return o?JSON.parse(o):(jb("Failed to decode base64 JWT payload"),null)}catch(o){return jb("Caught error parsing JWT payload as JSON",o==null?void 0:o.toString()),null}}function MF(e){const t=jT(e);return dt(t,"internal-error"),dt(typeof t.exp<"u","internal-error"),dt(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}/**
744 * @license
745 * Copyright 2020 Google LLC
746 *
747 * Licensed under the Apache License, Version 2.0 (the "License");
748 * you may not use this file except in compliance with the License.
749 * You may obtain a copy of the License at
750 *
751 *   http://www.apache.org/licenses/LICENSE-2.0
752 *
753 * Unless required by applicable law or agreed to in writing, software
754 * distributed under the License is distributed on an "AS IS" BASIS,
755 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
756 * See the License for the specific language governing permissions and
757 * limitations under the License.
758 */async function Tg(e,t,n=!1){if(n)return t;try{return await t}catch(r){throw r instanceof $a&&hve(r)&&e.auth.currentUser===e&&await e.auth.signOut(),r}}function hve({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}/**
759 * @license
760 * Copyright 2020 Google LLC
761 *
762 * Licensed under the Apache License, Version 2.0 (the "License");
763 * you may not use this file except in compliance with the License.
764 * You may obtain a copy of the License at
765 *
766 *   http://www.apache.org/licenses/LICENSE-2.0
767 *
768 * Unless required by applicable law or agreed to in writing, software
769 * distributed under the License is distributed on an "AS IS" BASIS,
770 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
771 * See the License for the specific language governing permissions and
772 * limitations under the License.
773 */class pve{constructor(t){this.user=t,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(t){var n;if(t){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const o=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,o)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){(t==null?void 0:t.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
774 * @license
775 * Copyright 2020 Google LLC
776 *
777 * Licensed under the Apache License, Version 2.0 (the "License");
778 * you may not use this file except in compliance with the License.
779 * You may obtain a copy of the License at
780 *
781 *   http://www.apache.org/licenses/LICENSE-2.0
782 *
783 * Unless required by applicable law or agreed to in writing, software
784 * distributed under the License is distributed on an "AS IS" BASIS,
785 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
786 * See the License for the specific language governing permissions and
787 * limitations under the License.
788 */class XI{constructor(t,n){this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Lm(this.lastLoginAt),this.creationTime=Lm(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
789 * @license
790 * Copyright 2019 Google LLC
791 *
792 * Licensed under the Apache License, Version 2.0 (the "License");
793 * you may not use this file except in compliance with the License.
794 * You may obtain a copy of the License at
795 *
796 *   http://www.apache.org/licenses/LICENSE-2.0
797 *
798 * Unless required by applicable law or agreed to in writing, software
799 * distributed under the License is distributed on an "AS IS" BASIS,
800 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
801 * See the License for the specific language governing permissions and
802 * limitations under the License.
803 */async function pw(e){var t;const n=e.auth,r=await e.getIdToken(),o=await Tg(e,T6(n,{idToken:r}));dt(o==null?void 0:o.users.length,n,"internal-error");const i=o.users[0];e._notifyReloadListener(i);const s=!((t=i.providerUserInfo)===null||t===void 0)&&t.length?R6(i.providerUserInfo):[],a=gve(e.providerData,s),l=e.isAnonymous,u=!(e.email&&i.passwordHash)&&!(a!=null&&a.length),c=l?u:!1,d={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:a,metadata:new XI(i.createdAt,i.lastLoginAt),isAnonymous:c};Object.assign(e,d)}async function mve(e){const t=_n(e);await pw(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function gve(e,t){return[...e.filter(r=>!t.some(o=>o.providerId===r.providerId)),...t]}function R6(e){return e.map(t=>{var{providerId:n}=t,r=NT(t,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/**
804 * @license
805 * Copyright 2020 Google LLC
806 *
807 * Licensed under the Apache License, Version 2.0 (the "License");
808 * you may not use this file except in compliance with the License.
809 * You may obtain a copy of the License at
810 *
811 *   http://www.apache.org/licenses/LICENSE-2.0
812 *
813 * Unless required by applicable law or agreed to in writing, software
814 * distributed under the License is distributed on an "AS IS" BASIS,
815 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
816 * See the License for the specific language governing permissions and
817 * limitations under the License.
818 */async function yve(e,t){const n=await k6(e,{},async()=>{const r=_y({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:o,apiKey:i}=e.config,s=P6(e,o,"/v1/token",`key=${i}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",A6.fetch()(s,{method:"POST",headers:a,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function vve(e,t){return Tl(e,"POST","/v2/accounts:revokeToken",Pl(e,t))}/**
819 * @license
820 * Copyright 2020 Google LLC
821 *
822 * Licensed under the Apache License, Version 2.0 (the "License");
823 * you may not use this file except in compliance with the License.
824 * You may obtain a copy of the License at
825 *
826 *   http://www.apache.org/licenses/LICENSE-2.0
827 *
828 * Unless required by applicable law or agreed to in writing, software
829 * distributed under the License is distributed on an "AS IS" BASIS,
830 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
831 * See the License for the specific language governing permissions and
832 * limitations under the License.
833 */class Bf{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){dt(t.idToken,"internal-error"),dt(typeof t.idToken<"u","internal-error"),dt(typeof t.refreshToken<"u","internal-error");
833const n="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):MF(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){dt(t.length!==0,"internal-error");const n=MF(t);this.updateTokensAndExpiration(t,null,n)}async getToken(t,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(dt(this.refreshToken,t,"user-token-expired"),this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(t,n){const{accessToken:r,refreshToken:o,expiresIn:i}=await yve(t,n);this.updateTokensAndExpiration(r,o,Number(i))}updateTokensAndExpiration(t,n,r){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(t,n){const{refreshToken:r,accessToken:o,expirationTime:i}=n,s=new Bf;return r&&(dt(typeof r=="string","internal-error",{appName:t}),s.refreshToken=r),o&&(dt(typeof o=="string","internal-error",{appName:t}),s.accessToken=o),i&&(dt(typeof i=="number","internal-error",{appName:t}),s.expirationTime=i),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Bf,this.toJSON())}_performRefresh(){return el("not implemented")}}/**
834 * @license
835 * Copyright 2020 Google LLC
836 *
837 * Licensed under the Apache License, Version 2.0 (the "License");
838 * you may not use this file except in compliance with the License.
839 * You may obtain a copy of the License at
840 *
841 *   http://www.apache.org/licenses/LICENSE-2.0
842 *
843 * Unless required by applicable law or agreed to in writing, software
844 * distributed under the License is distributed on an "AS IS" BASIS,
845 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
846 * See the License for the specific language governing permissions and
847 * limitations under the License.
848 */function Vl(e,t){dt(typeof e=="string"||typeof e>"u","internal-error",{appName:t})}class tl{constructor(t){var{uid:n,auth:r,stsTokenManager:o}=t,i=NT(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new pve(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=o,this.accessToken=o.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new XI(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(t){const n=await Tg(this,this.stsTokenManager.getToken(this.auth,t));return dt(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(t){return fve(this,t)}reload(){return mve(this)}_assign(t){this!==t&&(dt(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>Object.assign({},n)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new tl(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(t){dt(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,n=!1){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&await pw(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(na(this.auth.app))return Promise.reject(al(this.auth));const t=await this.getIdToken();return await Tg(this,dve(this.auth,{idToken:t})),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,isA
848nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),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(t,n){var r,o,i,s,a,l,u,c;const d=(r=n.displayName)!==null&&r!==void 0?r:void 0,f=(o=n.email)!==null&&o!==void 0?o:void 0,h=(i=n.phoneNumber)!==null&&i!==void 0?i:void 0,p=(s=n.photoURL)!==null&&s!==void 0?s:void 0,g=(a=n.tenantId)!==null&&a!==void 0?a:void 0,b=(l=n._redirectEventId)!==null&&l!==void 0?l:void 0,y=(u=n.createdAt)!==null&&u!==void 0?u:void 0,v=(c=n.lastLoginAt)!==null&&c!==void 0?c:void 0,{uid:w,emailVerified:C,isAnonymous:A,providerData:S,stsTokenManager:_}=n;dt(w&&_,t,"internal-error");const k=Bf.fromJSON(this.name,_);dt(typeof w=="string",t,"internal-error"),Vl(d,t.name),Vl(f,t.name),dt(typeof C=="boolean",t,"internal-error"),dt(typeof A=="boolean",t,"internal-error"),Vl(h,t.name),Vl(p,t.name),Vl(g,t.name),Vl(b,t.name),Vl(y,t.name),Vl(v,t.name);const M=new tl({uid:w,auth:t,email:f,emailVerified:C,displayName:d,isAnonymous:A,photoURL:p,phoneNumber:h,tenantId:g,stsTokenManager:k,createdAt:y,lastLoginAt:v});return S&&Array.isArray(S)&&(M.providerData=S.map(R=>Object.assign({},R))),b&&(M._redirectEventId=b),M}static async _fromIdTokenResponse(t,n,r=!1){const o=new Bf;o.updateFromServerResponse(n);const i=new tl({uid:n.localId,auth:t,stsTokenManager:o,isAnonymous:r});return await pw(i),i}static async _fromGetAccountInfoResponse(t,n,r){const o=n.users[0];dt(o.localId!==void 0,"internal-error");const i=o.providerUserInfo!==void 0?R6(o.providerUserInfo):[],s=!(o.email&&o.passwordHash)&&!(i!=null&&i.length),a=new Bf;a.updateFromIdToken(r);const l=new tl({uid:o.localId,auth:t,stsTokenManager:a,isAnonymous:s}),u={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:i,metadata:new XI(o.createdAt,o.lastLoginAt),isAnonymous:!(o.email&&o.passwordHash)&&!(i!=null&&i.length)};return Object.assign(l,u),l}}/**
849 * @license
850 * Copyright 2020 Google LLC
851 *
852 * Licensed under the Apache License, Version 2.0 (the "License");
853 * you may not use this file except in compliance with the License.
854 * You may obtain a copy of the License at
855 *
856 *   http://www.apache.org/licenses/LICENSE-2.0
857 *
858 * Unless required by applicable law or agreed to in writing, software
859 * distributed under the License is distributed on an "AS IS" BASIS,
860 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
861 * See the License for the specific language governing permissions and
862 * limitations under the License.
863 */const DF=new Map;function nl(e){wl(e instanceof Function,"Expected a class definition");let t=DF.get(e);return t?(wl(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,DF.set(e,t),t)}/**
864 * @license
865 * Copyright 2019 Google LLC
866 *
867 * Licensed under the Apache License, Version 2.0 (the "License");
868 * you may not use this file except in compliance with the License.
869 * You may obtain a copy of the License at
870 *
871 *   http://www.apache.org/licenses/LICENSE-2.0
872 *
873 * Unless required by applicable law or agreed to in writing, software
874 * distributed under the License is distributed on an "AS IS" BASIS,
875 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
876 * See the License for the specific language governing permissions and
877 * limitations under the License.
878 */class O6{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,n){this.storage[t]=n}async _get(t){const n=this.storage[t];return n===void 0?null:n}async _remove(t){delete this.storage[t]}_addListener(t,n){}_removeListener(t,n){}}O6.type="NONE";const $F=O6;/**
879 * @license
880 * Copyright 2019 Google LLC
881 *
882 * Licensed under the Apache License, Version 2.0 (the "License");
883 * you may not use this file except in compliance with the License.
884 * You may obtain a copy of the License at
885 *
886 *   http://www.apache.org/licenses/LICENSE-2.0
887 *
888 * Unless required by applicable law or agreed to in writing, software
889 * distributed under the License is distributed on an "AS IS" BASIS,
890 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
891 * See the License for the specific language governing permissions and
892 * limitations under the License.
893 */function zb(e,t,n){return`firebase:${e}:${t}:${n}`}class jf{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:o,name:i}=this.auth;this.fullUserKey=zb(this.userKey,o.apiKey,i),this.fullPersistenceKey=zb("persistence",o.apiKey,i),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);return t?tl._fromJSON(this.auth,t):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,n,r="authUser"){if(!n.length)return new jf(nl($F),t,r);const o=(await Promise.all(n.map(async u=>{if(await u._isAvailable())return u}))).filter(u=>u);let i=o[0]||nl($F);const s=zb(r,t.config.apiKey,t.name);let a=null;for(const u of n)try{const c=await u._get(s);if(c){const d=tl._fromJSON(t,c);u!==i&&(a=d),i=u;break}}catch{}const l=o.filter(u=>u._shouldAllowMigration);return!i._shouldAllowMigration||!l.length?new jf(i,t,r):(i=l[0],a&&await i._set(s,a.toJSON()),await Promise.all(n.map(async u=>{if(u!==i)try{await u._remove(s)}catch{}})),new jf(i,t,r))}}/**
894 * @license
895 * Copyright 2020 Google LLC
896 *
897 * Licensed under the Apache License, Version 2.0 (the "License");
898 * you may not use this file except in compliance with the License.
899 * You may obtain a copy of the License at
900 *
901 *   http://www.apache.org/licenses/LICENSE-2.0
902 *
903 * Unless required by applicable law or agreed to in writing, software
904 * distributed under the License is distributed on an "AS IS" BASIS,
905 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
906 * See the License for the specific language governing permissions and
907 * limitations under the License.
908 */function FF(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if($6(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(M6(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(L6(t))return"Blackberry";if(N6(t))return"Webos";if(zT(t))return"Safari";if((t.includes("chrome/")||D6(t))&&!t.includes("edge/"))return"Chrome";if(F6(t))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function M6(e=ur()){return/firefox\//i.test(e)}function zT(e=ur()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function D6(e=ur()){return/crios\//i.test(e)}function $6(e=ur()){return/iemobile/i.test(e)}function F6(e=ur()){return/android/i.test(e)}function L6(e=ur()){return/blackberry/i.test(e)}function N6(e=ur()){return/webos/i.test(e)}function YC(e=ur()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function bve(e=ur()){var t;return YC(e)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function wve(){return Vge()&&document.documentMode===10}function V6(e=ur()){return YC(e)||F6(e)||N6(e)||L6(e)||/windows phone/i.test(e)||$6(e)}function Cve(){try{return!!(window&&window!==window.top)}catch{return!1}}/**
909 * @license
910 * Copyright 2020 Google LLC
911 *
912 * Licensed under the Apache License, Version 2.0 (the "License");
913 * you may not use this file except in compliance with the License.
914 * You may obtain a copy of the License at
915 *
916 *   http://www.apache.org/licenses/LICENSE-2.0
917 *
918 * Unless required by applicable law or agreed to in writing, software
919 * distributed under the License is distributed on an "AS IS" BASIS,
920 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
921 * See the License for the specific language governing permissions and
922 * limitations under the License.
923 */function B6(e,t=[]){let n;switch(e){case"Browser":n=FF(ur());break;case"Worker":n=`${FF(ur())}-${e}`;break;default:n=e}const r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${Cd}/${r}`}/**
924 * @license
925 * Copyright 2022 Google LLC
926 *
927 * Licensed under the Apache License, Version 2.0 (the "License");
928 * you may not use this file except in compliance with the License.
929 * You may obtain a copy of the License at
930 *
931 *   http://www.apache.org/licenses/LICENSE-2.0
932 *
933 * Unless required by applicable law or agreed to in writing, software
934 * distributed under the License is distributed on an "AS IS" BASIS,
935 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
936 * See the License for the specific language governing permissions and
937 * limitations under the License.
938 */class xve{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const r=i=>new Promise((s,a)=>{try{const l=t(i);s(l)}catch(l){a(l)}});r.onAbort=n,this.queue.push(r);const o=this.queue.length-1;return()=>{this.queue[o]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const n=[];try{for(const r of this.queue)await r(t),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const o of n)try{o()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/**
939 * @license
940 * Copyright 2023 Google LLC
941 *
942 * Licensed under the Apache License, Version 2.0 (the "License");
943 * you may not use this file except in compliance with the License.
944 * You may obtain a copy of the License at
945 *
946 *   http://www.apache.org/licenses/LICENSE-2.0
947 *
948 * Unless required by applicable law or agreed to in writing, software
949 * distributed under the License is distributed on an "AS IS" BASIS,
950 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
951 * See the License for the specific language governing permissions and
952 * limitations under the License.
953 */async function Sve(e,t={}){return Tl(e,"GET","/v2/passwordPolicy",Pl(e,t))}/**
954 * @license
955 * Copyright 2023 Google LLC
956 *
957 * Licensed under the Apache License, Version 2.0 (the "License");
958 * you may not use this file except in compliance with the License.
959 * You may obtain a copy of the License at
960 *
961 *   http://www.apache.org/licenses/LICENSE-2.0
962 *
963 * Unless required by applicable law or agreed to in writing, software
964 * distributed under the License is distributed on an "AS IS" BASIS,
965 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
966 * See the License for the specific language governing permissions and
967 * limitations under the License.
968 */const _ve=6;class Eve{constructor(t){var n,r,o,i;const s=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=s.minPasswordLength)!==null&&n!==void 0?n:_ve,s.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=s.maxPasswordLength),s.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=s.containsLowercaseCharacter),s.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=s.containsUppercaseCharacter),s.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=s.containsNumericCharacter),s.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=s.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(o=(r=t.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&o!==void 0?o:"",this.forceUpgradeOnSignin=(i=t.forceUpgradeOnSignin)!==null&&i!==void 0?i:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var n,r,o,i,s,a;const l={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,l),this.validatePasswordCharacterOptions(t,l),l.isValid&&
968(l.isValid=(n=l.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),l.isValid&&(l.isValid=(r=l.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),l.isValid&&(l.isValid=(o=l.containsLowercaseLetter)!==null&&o!==void 0?o:!0),l.isValid&&(l.isValid=(i=l.containsUppercaseLetter)!==null&&i!==void 0?i:!0),l.isValid&&(l.isValid=(s=l.containsNumericCharacter)!==null&&s!==void 0?s:!0),l.isValid&&(l.isValid=(a=l.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),l}validatePasswordLengthOptions(t,n){const r=this.customStrengthOptions.minPasswordLength,o=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=t.length>=r),o&&(n.meetsMaxPasswordLength=t.length<=o)}validatePasswordCharacterOptions(t,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let o=0;o<t.length;o++)r=t.charAt(o),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(t,n,r,o,i){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=o)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=i))}}/**
969 * @license
970 * Copyright 2020 Google LLC
971 *
972 * Licensed under the Apache License, Version 2.0 (the "License");
973 * you may not use this file except in compliance with the License.
974 * You may obtain a copy of the License at
975 *
976 *   http://www.apache.org/licenses/LICENSE-2.0
977 *
978 * Unless required by applicable law or agreed to in writing, software
979 * distributed under the License is distributed on an "AS IS" BASIS,
980 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
981 * See the License for the specific language governing permissions and
982 * limitations under the License.
983 */class Ive{constructor(t,n,r,o){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=o,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new LF(this),this.idTokenSubscription=new LF(this),this.beforeStateQueue=new xve(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=E6,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=t.name,this.clientVersion=o.sdkClientVersion}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=nl(n)),this._initializationPromise=this.queue(async()=>{var r,o;if(!this._deleted&&(this.persistenceManager=await jf.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((o=this.currentUser)===null||o===void 0?void 0:o.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUserFromIdToken(t){try{const n=await T6(this,{idToken:t}),r=await tl._fromGetAccountInfoResponse(this,n,t);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(t){var n;if(na(this.app)){const s=this.app.settings.authIdToken;return s?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(s).then(a,a))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let o=r,i=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const s=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,a=o==null?void 0:o._redirectEventId,l=await this.tryRedirectSignIn(t);(!s||s===a)&&(l!=null&&l.user)&&(o=l.user,i=!0)}if(!o)return this.directlySetCurrentUser(null);
983if(!o._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(o)}catch(s){o=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(s))}return o?this.reloadAndSetCurrentUserOrClear(o):this.directlySetCurrentUser(null)}return dt(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===o._redirectEventId?this.directlySetCurrentUser(o):this.reloadAndSetCurrentUserOrClear(o)}async tryRedirectSignIn(t){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(t){try{await pw(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=ove()}async _delete(){this._deleted=!0}async updateCurrentUser(t){if(na(this.app))return Promise.reject(al(this));const n=t?_n(t):null;return n&&dt(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(t,n=!1){if(!this._deleted)return t&&dt(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return na(this.app)?Promise.reject(al(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(t){return na(this.app)?Promise.reject(al(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(nl(t))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(t){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const t=await Sve(this),n=new Eve(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new Sy("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}async revokeAccessToken(t){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await vve(this,r)}}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}async _setRedirectUser(t,n){const r=await this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const n=t&&nl(t)||this._popupRedirectResolver;dt(n,this,"argument-error"),this.redirectPersistenceManager=await jf.create(this,[nl(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===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 t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,o){if(this._deleted)return()=>{};const i=typeof n=="function"?n:n.next.bind(n);let s=!1;const a=this._isInitialized?Promise.resolve():this._initializationPromise;if(dt(a,this,"internal-error"),a.then(()=>{s||i(this.currentUser)}),typeof n=="function"){const l=t.addObserver(n,r,o);return()=>{s=!0,l()}}else{const l=t.addObserver(n);return()=>{s=!0,l()}}}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return dt(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=B6(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=await((t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader());r&&(n["X-Firebase-Client"]=r);const o=await this._getAppCheckToken();return o&&(n["X-Firebase-AppCheck"]=o),n}async _getAppCheckToken(){var t;const n=await((t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken());return n!=null&&n.error&&tve(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token}}function Wu(e){return _n(e)}class LF{constructor(t){this.auth=t,this.observer=null,this.addObserver=Gge(n=>this.observer=n)}get next(){return dt(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
984 * @license
985 * Copyright 2020 Google LLC
986 *
987 * Licensed under the Apache License, Version 2.0 (the "License");
988 * you may not use this file except in compliance with the License.
989 * You may obtain a copy of the License at
990 *
991 *   http://www.apache.org/licenses/LICENSE-2.0
992 *
993 * Unless required by applicable law or agreed to in writing, software
994 * distributed under the License is distributed on an "AS IS" BASIS,
995 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
996 * See the License for the specific language governing permissions and
997 * limitations under the License.
998 */let XC={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Ave(e){XC=e}function j6(e){return XC.loadJS(e)}function kve(){return XC.recaptchaEnterpriseScript}function Pve(){return XC.gapiScript}function Tve(e){return`__${e}${Math.floor(Math.random()*1e6)}`}const Rve="recaptcha-enterprise",Ove="NO_RECAPTCHA";class Mve{constructor(t){this.type=Rve,this.auth=Wu(t)}async verify(t="verify",n=!1){async function r(i){if(!n){if(i.tenantId==null&&i._agentRecaptchaConfig!=null)return i._agentRecaptchaConfig.siteKey;if(i.tenantId!=null&&i._tenantRecaptchaConfigs[i.tenantId]!==void 0)return i._tenantRecaptchaConfigs[i.tenantId].siteKey}return new Promise(async(s,a)=>{cve(i,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(l=>{if(l.recaptchaKey===void 0)a(new Error("recaptcha Enterprise site key undefined"));else{const u=new uve(l);return i.tenantId==null?i._agentRecaptchaConfig=u:i._tenantRecaptchaConfigs[i.tenantId]=u,s(u.siteKey)}}).catch(l=>{a(l)})})}function o(i,s,a){const l=window.grecaptcha;OF(l)?l.enterprise.ready(()=>{l.enterprise.execute(i,{action:t}).then(u=>{s(u)}).catch(()=>{s(Ove)})}):a(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((i,s)=>{r(this.auth).then(a=>{if(!n&&OF(window.grecaptcha))o(a,i,s);else{if(typeof window>"u"){s(new Error("RecaptchaVerifier is only supported in browser"));return}let l=kve();l.length!==0&&(l+=a),j6(l).then(()=>{o(a,i,s)}).catch(u=>{s(u)})}}).catch(a=>{s(a)})})}}async function NF(e,t,n,r=!1){const o=new Mve(e);let i;try{i=await o.verify(n)}catch{i=await o.verify(n,!0)}const s=Object.assign({},t);return r?Object.assign(s,{captchaResp:i}):Object.assign(s,{captchaResponse:i}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}async function mw(e,t,n,r){var o;if(!((o=e._getRecaptchaConfig())===null||o===void 0)&&o.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const i=await NF(e,t,n,n==="getOobCode");return r(e,i)}else return r(e,t).catch(async i=>{if(i.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const s=await NF(e,t,n,n==="getOobCode");return r(e,s)}else return Promise.reject(i)})}/**
999 * @license
1000 * Copyright 2020 Google LLC
1001 *
1002 * Licensed under the Apache License, Version 2.0 (the "License");
1003 * you may not use this file except in compliance with the License.
1004 * You may obtain a copy of the License at
1005 *
1006 *   http://www.apache.org/licenses/LICENSE-2.0
1007 *
1008 * Unless required by applicable law or agreed to in writing, software
1009 * distributed under the License is distributed on an "AS IS" BASIS,
1010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1011 * See the License for the specific language governing permissions and
1012 * limitations under the License.
1013 */function Dve(e,t){const n=QC(e,"auth");if(n.isInitialized()){const o=n.getImmediate(),i=n.getOptions();if(kg(i,t??{}))return o;Os(o,"already-initialized")}return n.initialize({options:t})}function $ve(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(nl);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t==null?void 0:t.popupRedirectResolver)}function z6(e,t,n){const r=Wu(e);dt(r._canInitEmulator,r,"emulator-config-failed"),dt(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const o=!!(n!=null&&n.disableWarnings),i=U6(t),{host:s,port:a}=Fve(t),l=a===null?"":`:${a}`;r.config.emulator={url:`${i}//${s}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:a,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:o})}),o||Lve()}function U6(e){const t=e.indexOf(":");
1013return t<0?"":e.substr(0,t+1)}function Fve(e){const t=U6(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",o=/^(\[[^\]]+\])(:|$)/.exec(r);if(o){const i=o[1];return{host:i,port:VF(r.substr(i.length+1))}}else{const[i,s]=r.split(":");return{host:i,port:VF(s)}}}function VF(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function Lve(){function e(){const t=document.createElement("p"),n=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}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",e):e())}/**
1014 * @license
1015 * Copyright 2020 Google LLC
1016 *
1017 * Licensed under the Apache License, Version 2.0 (the "License");
1018 * you may not use this file except in compliance with the License.
1019 * You may obtain a copy of the License at
1020 *
1021 *   http://www.apache.org/licenses/LICENSE-2.0
1022 *
1023 * Unless required by applicable law or agreed to in writing, software
1024 * distributed under the License is distributed on an "AS IS" BASIS,
1025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1026 * See the License for the specific language governing permissions and
1027 * limitations under the License.
1028 */class UT{constructor(t,n){this.providerId=t,this.signInMethod=n}toJSON(){return el("not implemented")}_getIdTokenResponse(t){return el("not implemented")}_linkToIdToken(t,n){return el("not implemented")}_getReauthenticationResolver(t){return el("not implemented")}}async function Nve(e,t){return Tl(e,"POST","/v1/accounts:signUp",t)}/**
1029 * @license
1030 * Copyright 2020 Google LLC
1031 *
1032 * Licensed under the Apache License, Version 2.0 (the "License");
1033 * you may not use this file except in compliance with the License.
1034 * You may obtain a copy of the License at
1035 *
1036 *   http://www.apache.org/licenses/LICENSE-2.0
1037 *
1038 * Unless required by applicable law or agreed to in writing, software
1039 * distributed under the License is distributed on an "AS IS" BASIS,
1040 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1041 * See the License for the specific language governing permissions and
1042 * limitations under the License.
1043 */async function Vve(e,t){return Iy(e,"POST","/v1/accounts:signInWithPassword",Pl(e,t))}async function Bve(e,t){return Tl(e,"POST","/v1/accounts:sendOobCode",Pl(e,t))}async function jve(e,t){return Bve(e,t)}/**
1044 * @license
1045 * Copyright 2020 Google LLC
1046 *
1047 * Licensed under the Apache License, Version 2.0 (the "License");
1048 * you may not use this file except in compliance with the License.
1049 * You may obtain a copy of the License at
1050 *
1051 *   http://www.apache.org/licenses/LICENSE-2.0
1052 *
1053 * Unless required by applicable law or agreed to in writing, software
1054 * distributed under the License is distributed on an "AS IS" BASIS,
1055 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1056 * See the License for the specific language governing permissions and
1057 * limitations under the License.
1058 */async function zve(e,t){return Iy(e,"POST","/v1/accounts:signInWithEmailLink",Pl(e,t))}async function Uve(e,t){return Iy(e,"POST","/v1/accounts:signInWithEmailLink",Pl(e,t))}/**
1059 * @license
1060 * Copyright 2020 Google LLC
1061 *
1062 * Licensed under the Apache License, Version 2.0 (the "License");
1063 * you may not use this file except in compliance with the License.
1064 * You may obtain a copy of the License at
1065 *
1066 *   http://www.apache.org/licenses/LICENSE-2.0
1067 *
1068 * Unless required by applicable law or agreed to in writing, software
1069 * distributed under the License is distributed on an "AS IS" BASIS,
1070 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1071 * See the License for the specific language governing permissions and
1072 * limitations under the License.
1073 */class Rg extends UT{constructor(t,n,r,o=null){super("password",r),this._email=t,this._password=n,this._tenantId=o}static _fromEmailAndPassword(t,n){return new Rg(t,n,"password")}static _fromEmailAndCode(t,n,r=null){return new Rg(t,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(t){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return mw(t,n,"signInWithPassword",Vve);case"emailLink":return zve(t,{email:this._email,oobCode:this._password});default:Os(t,"internal-error")}}async _linkToIdToken(t,n){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return mw(t,r,"signUpPassword",Nve);case"emailLink":return Uve(t,{idToken:n,email:this._email,oobCode:this._password});default:Os(t,"internal-error")}}_getReauthenticationResolver(t){return this._getIdTokenResponse(t)}}/**
1074 * @license
1075 * Copyright 2020 Google LLC
1076 *
1077 * Licensed under the Apache License, Version 2.0 (the "License");
1078 * you may not use this file except in compliance with the License.
1079 * You may obtain a copy of the License at
1080 *
1081 *   http://www.apache.org/licenses/LICENSE-2.0
1082 *
1083 * Unless required by applicable law or agreed to in writing, software
1084 * distributed under the License is distributed on an "AS IS" BASIS,
1085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1086 * See the License for the specific language governing permissions and
1087 * limitations under the License.
1088 */async function zf(e,t){return Iy(e,"POST","/v1/accounts:signInWithIdp",Pl(e,t))}/**
1089 * @license
1090 * Copyright 2020 Google LLC
1091 *
1092 * Licensed under the Apache License, Version 2.0 (the "License");
1093 * you may not use this file except in compliance with the License.
1094 * You may obtain a copy of the License at
1095 *
1096 *   http://www.apache.org/licenses/LICENSE-2.0
1097 *
1098 * Unless required by applicable law or agreed to in writing, software
1099 * distributed under the License is distributed on an "AS IS" BASIS,
1100 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1101 * See the License for the specific language governing permissions and
1102 * limitations under the License.
1103 */const Hve="http://localhost";class id extends UT{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const n=new id(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(n.idToken=t.idToken),t.accessToken&&(n.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(n.nonce=t.nonce),t.pendingToken&&(n.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(n.accessToken=t.oauthToken,n.secret=t.oauthTokenSecret):Os("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
1103once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t,{providerId:r,signInMethod:o}=n,i=NT(n,["providerId","signInMethod"]);if(!r||!o)return null;const s=new id(r,o);return s.idToken=i.idToken||void 0,s.accessToken=i.accessToken||void 0,s.secret=i.secret,s.nonce=i.nonce,s.pendingToken=i.pendingToken||null,s}_getIdTokenResponse(t){const n=this.buildRequest();return zf(t,n)}_linkToIdToken(t,n){const r=this.buildRequest();return r.idToken=n,zf(t,r)}_getReauthenticationResolver(t){const n=this.buildRequest();return n.autoCreate=!1,zf(t,n)}buildRequest(){const t={requestUri:Hve,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),t.postBody=_y(n)}return t}}/**
1104 * @license
1105 * Copyright 2020 Google LLC
1106 *
1107 * Licensed under the Apache License, Version 2.0 (the "License");
1108 * you may not use this file except in compliance with the License.
1109 * You may obtain a copy of the License at
1110 *
1111 *   http://www.apache.org/licenses/LICENSE-2.0
1112 *
1113 * Unless required by applicable law or agreed to in writing, software
1114 * distributed under the License is distributed on an "AS IS" BASIS,
1115 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1116 * See the License for the specific language governing permissions and
1117 * limitations under the License.
1118 */function Wve(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function Gve(e){const t=nm(rm(e)).link,n=t?nm(rm(t)).deep_link_id:null,r=nm(rm(e)).deep_link_id;return(r?nm(rm(r)).link:null)||r||n||t||e}class HT{constructor(t){var n,r,o,i,s,a;const l=nm(rm(t)),u=(n=l.apiKey)!==null&&n!==void 0?n:null,c=(r=l.oobCode)!==null&&r!==void 0?r:null,d=Wve((o=l.mode)!==null&&o!==void 0?o:null);dt(u&&c&&d,"argument-error"),this.apiKey=u,this.operation=d,this.code=c,this.continueUrl=(i=l.continueUrl)!==null&&i!==void 0?i:null,this.languageCode=(s=l.languageCode)!==null&&s!==void 0?s:null,this.tenantId=(a=l.tenantId)!==null&&a!==void 0?a:null}static parseLink(t){const n=Gve(t);try{return new HT(n)}catch{return null}}}/**
1119 * @license
1120 * Copyright 2020 Google LLC
1121 *
1122 * Licensed under the Apache License, Version 2.0 (the "License");
1123 * you may not use this file except in compliance with the License.
1124 * You may obtain a copy of the License at
1125 *
1126 *   http://www.apache.org/licenses/LICENSE-2.0
1127 *
1128 * Unless required by applicable law or agreed to in writing, software
1129 * distributed under the License is distributed on an "AS IS" BASIS,
1130 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1131 * See the License for the specific language governing permissions and
1132 * limitations under the License.
1133 */class ep{constructor(){this.providerId=ep.PROVIDER_ID}static credential(t,n){return Rg._fromEmailAndPassword(t,n)}static credentialWithLink(t,n){const r=HT.parseLink(n);return dt(r,"argument-error"),Rg._fromEmailAndCode(t,r.code,r.tenantId)}}ep.PROVIDER_ID="password";ep.EMAIL_PASSWORD_SIGN_IN_METHOD="password";ep.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
1134 * @license
1135 * Copyright 2020 Google LLC
1136 *
1137 * Licensed under the Apache License, Version 2.0 (the "License");
1138 * you may not use this file except in compliance with the License.
1139 * You may obtain a copy of the License at
1140 *
1141 *   http://www.apache.org/licenses/LICENSE-2.0
1142 *
1143 * Unless required by applicable law or agreed to in writing, software
1144 * distributed under the License is distributed on an "AS IS" BASIS,
1145 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1146 * See the License for the specific language governing permissions and
1147 * limitations under the License.
1148 */class H6{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}}/**
1149 * @license
1150 * Copyright 2019 Google LLC
1151 *
1152 * Licensed under the Apache License, Version 2.0 (the "License");
1153 * you may not use this file except in compliance with the License.
1154 * You may obtain a copy of the License at
1155 *
1156 *   http://www.apache.org/licenses/LICENSE-2.0
1157 *
1158 * Unless required by applicable law or agreed to in writing, software
1159 * distributed under the License is distributed on an "AS IS" BASIS,
1160 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1161 * See the License for the specific language governing permissions and
1162 * limitations under the License.
1163 */class Ay extends H6{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}/**
1164 * @license
1165 * Copyright 2020 Google LLC
1166 *
1167 * Licensed under the Apache License, Version 2.0 (the "License");
1168 * you may not use this file except in compliance with the License.
1169 * You may obtain a copy of the License at
1170 *
1171 *   http://www.apache.org/licenses/LICENSE-2.0
1172 *
1173 * Unless required by applicable law or agreed to in writing, software
1174 * distributed under the License is distributed on an "AS IS" BASIS,
1175 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1176 * See the License for the specific language governing permissions and
1177 * limitations under the License.
1178 */class ru extends Ay{constructor(){super("facebook.com")}static credential(t){return id._fromParams({providerId:ru.PROVIDER_ID,signInMethod:ru.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return ru.credentialFromTaggedObject(t)}static credentialFromError(t){return ru.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return ru.credential(t.oauthAccessToken)}catch{return null}}}ru.FACEBOOK_SIGN_IN_METHOD="facebook.com";ru.PROVIDER_ID="facebook.com";/**
1179 * @license
1180 * Copyright 2020 Google LLC
1181 *
1182 * Licensed under the Apache License, Version 2.0 (the "License");
1183 * you may not use this file except in compliance with the License.
1184 * You may obtain a copy of the License at
1185 *
1186 *   http://www.apache.org/licenses/LICENSE-2.0
1187 *
1188 * Unless required by applicable law or agreed to in writing, software
1189 * distributed under the License is distributed on an "AS IS" BASIS,
1190 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1191 * See the License for the specific language governing permissions and
1192 * limitations under the License.
1193 */class ou extends Ay{constructor(){super("google.com"),this.addScope("profile")}static credential(t,n){return id._fromParams({providerId:ou.PROVIDER_ID,signInMethod:ou.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:n})}static credentialFromResult(t){return ou.credentialFromTaggedObject(t)}static credentialFromError(t){return ou.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return ou.credential(n,r)}catch{return null}}}ou.GOOGLE_SIGN_IN_METHOD="google.com";ou.PROVIDER_ID="google.com";/**
1194 * @license
1195 * Copyright 2020 Google LLC
1196 *
1197 * Licensed under the Apache License, Version 2.0 (the "License");
1198 * you may not use this file except in compliance with the License.
1199 * You may obtain a copy of the License at
1200 *
1201 *   http://www.apache.org/licenses/LICENSE-2.0
1202 *
1203 * Unless required by applicable law or agreed to in writing, software
1204 * distributed under the License is distributed on an "AS IS" BASIS,
1205 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1206 * See the License for the specific language governing permissions and
1207 * limitations under the License.
1208 */class iu extends Ay{constructor(){super("github.com")}static credential(t){return id._fromParams({providerId:iu.PROVIDER_ID,signInMethod:iu.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return iu.credentialFromTaggedObject(t)}static credentialFromError(t){return iu.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return iu.credential(t.oauthAccessToken)}catch{return null}}}iu.GITHUB_SIGN_IN_METHOD="github.com";iu.PROVIDER_ID="github.com";/**
1209 * @license
1210 * Copyright 2020 Google LLC
1211 *
1212 * Licensed under the Apache License, Version 2.0 (the "License");
1213 * you may not use this file except in compliance with the License.
1214 * You may obtain a copy of the License at
1215 *
1216 *   http://www.apache.org/licenses/LICENSE-2.0
1217 *
1218 * Unless required by applicable law or agreed to in writing, software
1219 * distributed under the License is distributed on an "AS IS" BASIS,
1220 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1221 * See the License for the specific language governing permissions and
1222 * limitations under the License.
1223 */class su extends Ay{constructor(){super("twitter.com")}static credential(t,n){return id._fromParams({providerId:su.PROVIDER_ID,signInMethod:su.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:n})}static credentialFromResult(t){return su.credentialFromTaggedObject(t)}static credentialFromError(t){return su.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return su.credential(n,r)}catch{return null}}}su.TWITTER_SIGN_IN_METHOD="twitter.com";su.PROVIDER_ID="twitter.com";/**
1224 * @license
1225 * Copyright 2020 Google LLC
1226 *
1227 * Licensed under the Apache License, Version 2.0 (the "License");
1228 * you may not use this file except in compliance with the License.
1229 * You may obtain a copy of the License at
1230 *
1231 *   http://www.apache.org/licenses/LICENSE-2.0
1232 *
1233 * Unless required by applicable law or agreed to in writing, software
1234 * distributed under the License is distributed on an "AS IS" BASIS,
1235 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1236 * See the License for the specific language governing permissions and
1237 * limitations under the License.
1238 */async function qve(e,t){return Iy(e,"POST","/v1/accounts:signUp",Pl(e,t))}/**
1239 * @license
1240 * Copyright 2020 Google LLC
1241 *
1242 * Licensed under the Apache License, Version 2.0 (the "License");
1243 * you may not use this file except in compliance with the License.
1244 * You may obtain a copy of the License at
1245 *
1246 *   http://www.apache.org/licenses/LICENSE-2.0
1247 *
1248 * Unless required by applicable law or agreed to in writing, software
1249 * distributed under the License is distributed on an "AS IS" BASIS,
1250 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1251 * See the License for the specific language governing permissions and
1252 * limitations under the License.
1253 */class sd{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static async _fromIdTokenResponse(t,n,r,o=!1){const i=await tl._fromIdTokenResponse(t,r,o),s=BF(r);return new sd({user:i,providerId:s,_tokenResponse:r,operationType:n})}static async _forOperation(t,n,r){await t._updateTokensIfNecessary(r,!0);const o=BF(r);return new sd({user:t,providerId:o,_tokenResponse:r,operationType:n})}}function BF(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
1254 * @license
1255 * Copyright 2020 Google LLC
1256 *
1257 * Licensed under the Apache License, Version 2.0 (the "License");
1258 * you may not use this file except in compliance with the License.
1259 * You may obtain a copy of the License at
1260 *
1261 *   http://www.apache.org/licenses/LICENSE-2.0
1262 *
1263 * Unless required by applicable law or agreed to in writing, software
1264 * distributed under the License is distributed on an "AS IS" BASIS,
1265 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1266 * See the License for the specific language governing permissions and
1267 * limitations under the License.
1268 */class gw extends $a{constructor(t,n,r,o){var i;super(n.code,n.message),this.operationType=r,this.user=o,Object.setPrototypeOf(this,gw.prototype),this.customData={appName:t.name,tenantId:(i=t.tenantId)!==null&&i!==void 0?i:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(t,n,r,o){return new gw(t,n,r,o)}}function W6(e,t,n,r){return(t==="reauthenticate"?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(i=>{throw i.code==="auth/multi-factor-auth-required"?gw._fromErrorAndOperation(e,i,t,r):i})}async function Kve(e,t,n=!1){const r=await Tg(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return sd._forOperation(e,"link",r)}/**
1269 * @license
1270 * Copyright 2019 Google LLC
1271 *
1272 * Licensed under the Apache License, Version 2.0 (the "License");
1273 * you may not use this file except in compliance with the License.
1274 * You may obtain a copy of the License at
1275 *
1276 *   http://www.apache.org/licenses/LICENSE-2.0
1277 *
1278 * Unless required by applicable law or agreed to in writing, software
1279 * distributed under the License is distributed on an "AS IS" BASIS,
1280 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1281 * See the License for the specific language governing permissions and
1282 * limitations under the License.
1283 */async function Qve(e,t,n=!1){const{auth:r}=e;if(na(r.app))return Promise.reject(al(r));const o="reauthenticate";try{const i=await Tg(e,W6(r,o,t,e),n);dt(i.idToken,r,"internal-error");const s=jT(i.idToken);dt(s,r,"internal-error");const{sub:a}=s;return dt(e.uid===a,r,"user-mismatch"),sd._forOperation(e,o,i)}catch(i){throw(i==null?void 0:i.code)==="auth/user-not-found"&&Os(r,"user-mismatch"),i}}/**
1284 * @license
1285 * Copyright 2020 Google LLC
1286 *
1287 * Licensed under the Apache License, Version 2.0 (the "License");
1288 * you may not use this file except in compliance with the License.
1289 * You may obtain a copy of the License at
1290 *
1291 *   http://www.apache.org/licenses/LICENSE-2.0
1292 *
1293 * Unless required by applicable law or agreed to in writing, software
1294 * distributed under the License is distributed on an "AS IS" BASIS,
1295 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1296 * See the License for the specific language governing permissions and
1297 * limitations under the License.
1298 */async function G6(e,t,n=!1){if(na(e.app))return Promise.reject(al(e));const r="signIn",o=await W6(e,r,t),i=await sd._fromIdTokenResponse(e,r,o);return n||await e._updateCurrentUser(i.user),i}async function Yve(e,t){return G6(Wu(e),t)}/**
1299 * @license
1300 * Copyright 2020 Google LLC
1301 *
1302 * Licensed under the Apache License, Version 2.0 (the "License");
1303 * you may not use this file except in compliance with the License.
1304 * You may obtain a copy of the License at
1305 *
1306 *   http://www.apache.org/licenses/LICENSE-2.0
1307 *
1308 * Unless required by applicable law or agreed to in writing, software
1309 * distributed under the License is distributed on an "AS IS" BASIS,
1310 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1311 * See the License for the specific language governing permissions and
1312 * limitations under the License.
1313 */function Xve(e,t,n){var r;dt(((r=n.url)===null||r===void 0?void 0:r.length)>0,e,"invalid-continue-uri"),dt(typeof n.dynamicLinkDomain>"u"||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(dt(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(dt(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}/**
1314 * @license
1315 * Copyright 2020 Google LLC
1316 *
1317 * Licensed under the Apache License, Version 2.0 (the "License");
1318 * you may not use this file except in compliance with the License.
1319 * You may obtain a copy of the License at
1320 *
1321 *   http://www.apache.org/licenses/LICENSE-2.0
1322 *
1323 * Unless required by applicable law or agreed to in writing, software
1324 * distributed under the License is distributed on an "AS IS" BASIS,
1325 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1326 * See the License for the specific language governing permissions and
1327 * limitations under the License.
1328 */async function q6(e){const t=Wu(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function Jve(e,t,n){const r=Wu(e),o={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};n&&Xve(r,o,n),await mw(r,o,"getOobCode",jve)}async function Zve(e,t,n){if(na(e.app))return Promise.reject(al(e));const r=Wu(e),s=await mw(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",qve).catch(l=>{throw l.code==="auth/password-does-not-meet-requirements"&&q6(e),l}),a=await sd._fromIdTokenResponse(r,"signIn",s);return await r._updateCurrentUser(a.user),a}function ebe(e,t,n){return na(e.app)?Promise.reject(al(e)):Yve(_n(e),ep.credential(t,n)).catch(async r=>{throw r.code==="auth/password-does-not-meet-requirements"&&q6(e),r})}/**
1329 * @license
1330 * Copyright 2020 Google LLC
1331 *
1332 * Licensed under the Apache License, Version 2.0 (the "License");
1333 * you may not use this file except in compliance with the License.
1334 * You may obtain a copy of the License at
1335 *
1336 *   http://www.apache.org/licenses/LICENSE-2.0
1337 *
1338 * Unless required by applicable law or agreed to in writing, software
1339 * distributed under the License is distributed on an "AS IS" BASIS,
1340 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1341 * See the License for the specific language governing permissions and
1342 * limitations under the License.
1343 */function WT(e,t){return _n(e).setPersistence(t)}function tbe(e,t,n,r){return _n(e).onIdTokenChanged(t,n,r)}function nbe(e,t,n){return _n(e).beforeAuthStateChanged(t,n)}function rbe(e,t,n,r){return _n(e).onAuthStateChanged(t,n,r)}function obe(e){return _n(e).signOut()}const yw="__sak";/**
1344 * @license
1345 * Copyright 2019 Google LLC
1346 *
1347 * Licensed under the Apache License, Version 2.0 (the "License");
1348 * you may not use this file except in compliance with the License.
1349 * You may obtain a copy of the License at
1350 *
1351 *   http://www.apache.org/licenses/LICENSE-2.0
1352 *
1353 * Unless required by applicable law or agreed to in writing, software
1354 * distributed under the License is distributed on an "AS IS" BASIS,
1355 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1356 * See the License for the specific language governing permissions and
1357 * limitations under the License.
1358 */class K6{constructor(t,n){this.storageRetriever=t,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(yw,"1"),this.storage.removeItem(yw),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,n){return this.storage.setItem(t,JSON.stringify(n)),Promise.resolve()}_get(t){const n=this.storage.getItem(t);return Promise.resolve(n?JSON.parse(n):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
1359 * @license
1360 * Copyright 2020 Google LLC
1361 *
1362 * Licensed under the Apache License, Version 2.0 (the "License");
1363 * you may not use this file except in compliance with the License.
1364 * You may obtain a copy of the License at
1365 *
1366 *   http://www.apache.org/licenses/LICENSE-2.0
1367 *
1368 * Unless required by applicable law or agreed to in writing, software
1369 * distributed under the License is distributed on an "AS IS" BASIS,
1370 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1371 * See the License for the specific language governing permissions and
1372 * limitations under the License.
1373 */function ibe(){const e=ur();return zT(e)||YC(e)}const sbe=1e3,abe=10;class Q6 extends K6{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=ibe()&&Cve(),this.fallbackToPolling=V6(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),o=this.localCache[n];r!==o&&t(n,o,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((s,a,l)=>{this.notifyListeners(s,l)});return}const r=t.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const s=this.storage.getItem(r);if(t.newValue!==s)t.newValue!==null?this.storage.setItem(r,t.newValue):this.storage.removeItem(r);else if(this.localCache[r]===t.newValue&&!n)return}const o=()=>{const s=this.storage.getItem(r);!n&&this.localCache[r]===s||this.notifyListeners(r,s)},i=this.storage.getItem(r);wve()&&i!==t.newValue&&t.newValue!==t.oldValue?setTimeout(o,abe):o()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const o of Array.from(r))o(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},sbe)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(t,n){await super._set(t,n),this.localCache[t]=JSON.stringify(n)}async _get(t){const n=await super._get(t);return this.localCache[t]=JSON.stringify(n),n}async _remove(t){await super._remove(t),delete this.localCache[t]}}Q6.type="LOCAL";const JC=Q6;/**
1374 * @license
1375 * Copyright 2020 Google LLC
1376 *
1377 * Licensed under the Apache License, Version 2.0 (the "License");
1378 * you may not use this file except in compliance with the License.
1379 * You may obtain a copy of the License at
1380 *
1381 *   http://www.apache.org/licenses/LICENSE-2.0
1382 *
1383 * Unless required by applicable law or agreed to in writing, software
1384 * distributed under the License is distributed on an "AS IS" BASIS,
1385 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1386 * See the License for the specific language governing permissions and
1387 * limitations under the License.
1388 */class Y6 extends K6{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,n){}_removeListener(t,n){}}Y6.type="SESSION";const X6=Y6;/**
1389 * @license
1390 * Copyright 2019 Google LLC
1391 *
1392 * Licensed under the Apache License, Version 2.0 (the "License");
1393 * you may not use this file except in compliance with the License.
1394 * You may obtain a copy of the License at
1395 *
1396 *   http://www.apache.org/licenses/LICENSE-2.0
1397 *
1398 * Unless required by applicable law or agreed to in writing, software
1399 * distributed under the License is distributed on an "AS IS" BASIS,
1400 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1401 * See the License for the specific language governing permissions and
1402 * limitations under the License.
1403 */function lbe(e){return Promise.all(e.map(async t=>{try{return{fulfilled:!0,value:await t}}catch(n){return{fulfilled:!1,reason:n}}}))}/**
1404 * @license
1405 * Copyright 2019 Google LLC
1406 *
1407 * Licensed under the Apache License, Version 2.0 (the "License");
1408 * you may not use this file except in compliance with the License.
1409 * You may obtain a copy of the License at
1410 *
1411 *   http://www.apache.org/licenses/LICENSE-2.0
1412 *
1413 * Unless required by applicable law or agreed to in writing, software
1414 * distributed under the License is distributed on an "AS IS" BASIS,
1415 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1416 * See the License for the specific language governing permissions and
1417 * limitations under the License.
1418 */class ZC{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(o=>o.isListeningto(t));if(n)return n;const r=new ZC(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}async handleEvent(t){const n=t,{eventId:r,eventType:o,data:i}=n.data,s=this.handlersMap[o];if(!(s!=null&&s.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:o});const a=Array.from(s).map(async u=>u(n.origin,i)),l=await lbe(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:o,response:l})}_subscribe(t,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(n)}_unsubscribe(t,n){this.handlersMap[t]&&n&&this.handlersMap[t].delete(n),(!n||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}ZC.receivers=[];/**
1419 * @license
1420 * Copyright 2020 Google LLC
1421 *
1422 * Licensed under the Apache License, Version 2.0 (the "License");
1423 * you may not use this file except in compliance with the License.
1424 * You may obtain a copy of the License at
1425 *
1426 *   http://www.apache.org/licenses/LICENSE-2.0
1427 *
1428 * Unless required by applicable law or agreed to in writing, software
1429 * distributed under the License is distributed on an "AS IS" BASIS,
1430 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1431 * See the License for the specific language governing permissions and
1432 * limitations under the License.
1433 */function GT(e="",t=10){let n="";for(let r=0;r<t;r++)n+=Math.floor(Math.random()*10);return e+n}/**
1434 * @license
1435 * Copyright 2019 Google LLC
1436 *
1437 * Licensed under the Apache License, Version 2.0 (the "License");
1438 * you may not use this file except in compliance with the License.
1439 * You may obtain a copy of the License at
1440 *
1441 *   http://www.apache.org/licenses/LICENSE-2.0
1442 *
1443 * Unless required by applicable law or agreed to in writing, softw
1443are
1444 * distributed under the License is distributed on an "AS IS" BASIS,
1445 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1446 * See the License for the specific language governing permissions and
1447 * limitations under the License.
1448 */class ube{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}async _send(t,n,r=50){const o=typeof MessageChannel<"u"?new MessageChannel:null;if(!o)throw new Error("connection_unavailable");let i,s;return new Promise((a,l)=>{const u=GT("",20);o.port1.start();const c=setTimeout(()=>{l(new Error("unsupported_event"))},r);s={messageChannel:o,onMessage(d){const f=d;if(f.data.eventId===u)switch(f.data.status){case"ack":clearTimeout(c),i=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(i),a(f.data.response);break;default:clearTimeout(c),clearTimeout(i),l(new Error("invalid_response"));break}}},this.handlers.add(s),o.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:t,eventId:u,data:n},[o.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})}}/**
1449 * @license
1450 * Copyright 2020 Google LLC
1451 *
1452 * Licensed under the Apache License, Version 2.0 (the "License");
1453 * you may not use this file except in compliance with the License.
1454 * You may obtain a copy of the License at
1455 *
1456 *   http://www.apache.org/licenses/LICENSE-2.0
1457 *
1458 * Unless required by applicable law or agreed to in writing, software
1459 * distributed under the License is distributed on an "AS IS" BASIS,
1460 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1461 * See the License for the specific language governing permissions and
1462 * limitations under the License.
1463 */function va(){return window}function cbe(e){va().location.href=e}/**
1464 * @license
1465 * Copyright 2020 Google LLC.
1466 *
1467 * Licensed under the Apache License, Version 2.0 (the "License");
1468 * you may not use this file except in compliance with the License.
1469 * You may obtain a copy of the License at
1470 *
1471 *   http://www.apache.org/licenses/LICENSE-2.0
1472 *
1473 * Unless required by applicable law or agreed to in writing, software
1474 * distributed under the License is distributed on an "AS IS" BASIS,
1475 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1476 * See the License for the specific language governing permissions and
1477 * limitations under the License.
1478 */function J6(){return typeof va().WorkerGlobalScope<"u"&&typeof va().importScripts=="function"}async function dbe(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function fbe(){var e;return((e=navigator==null?void 0:navigator.serviceWorker)===null||e===void 0?void 0:e.controller)||null}function hbe(){return J6()?self:null}/**
1479 * @license
1480 * Copyright 2019 Google LLC
1481 *
1482 * Licensed under the Apache License, Version 2.0 (the "License");
1483 * you may not use this file except in compliance with the License.
1484 * You may obtain a copy of the License at
1485 *
1486 *   http://www.apache.org/licenses/LICENSE-2.0
1487 *
1488 * Unless required by applicable law or agreed to in writing, software
1489 * distributed under the License is distributed on an "AS IS" BASIS,
1490 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1491 * See the License for the specific language governing permissions and
1492 * limitations under the License.
1493 */const Z6="firebaseLocalStorageDb",pbe=1,vw="firebaseLocalStorage",e3="fbase_key";class ky{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function ex(e,t){return e.transaction([vw],t?"readwrite":"readonly").objectStore(vw)}function mbe(){const e=indexedDB.deleteDatabase(Z6);return new ky(e).toPromise()}function JI(){const e=indexedDB.open(Z6,pbe);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(vw,{keyPath:e3})}catch(o){n(o)}}),e.addEventListener("success",async()=>{const r=e.result;
1493r.objectStoreNames.contains(vw)?t(r):(r.close(),await mbe(),t(await JI()))})})}async function jF(e,t,n){const r=ex(e,!0).put({[e3]:t,value:n});return new ky(r).toPromise()}async function gbe(e,t){const n=ex(e,!1).get(t),r=await new ky(n).toPromise();return r===void 0?null:r.value}function zF(e,t){const n=ex(e,!0).delete(t);return new ky(n).toPromise()}const ybe=800,vbe=3;class t3{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 JI(),this.db)}async _withRetries(t){let n=0;for(;;)try{const r=await this._openDb();return await t(r)}catch(r){if(n++>vbe)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return J6()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=ZC._getInstance(hbe()),this.receiver._subscribe("keyChanged",async(t,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
1493)),this.receiver._subscribe("ping",async(t,n)=>["keyChanged"])}async initializeSender(){var t,n;if(this.activeServiceWorker=await dbe(),!this.activeServiceWorker)return;this.sender=new ube(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&!((t=r[0])===null||t===void 0)&&t.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(t){if(!(!this.sender||!this.activeServiceWorker||fbe()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const t=await JI();return await jF(t,yw,"1"),await zF(t,yw),!0}catch{}return!1}async _withPendingWrite(t){this.pendingWrites++;try{await t()}finally{this.pendingWrites--}}async _set(t,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>jF(r,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)))}async _get(t){const n=await this._withRetries(r=>gbe(r,t));return this.localCache[t]=n,n}async _remove(t){return this._withPendingWrite(async()=>(await this._withRetries(n=>zF(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)))}async _poll(){const t=await this._withRetries(o=>{const i=ex(o,!1).getAll();return new ky(i).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(t.length!==0)for(const{fbase_key:o,value:i}of t)r.add(o),JSON.stringify(this.localCache[o])!==JSON.stringify(i)&&(this.notifyListeners(o,i),n.push(o));for(const o of Object.keys(this.localCache))this.localCache[o]&&!r.has(o)&&(this.notifyListeners(o,null),n.push(o));return n}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const o of Array.from(r))o(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),ybe)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}t3.type="LOCAL";const bbe=t3;new Ey(3e4,6e4);/**
1494 * @license
1495 * Copyright 2021 Google LLC
1496 *
1497 * Licensed under the Apache License, Version 2.0 (the "License");
1498 * you may not use this file except in compliance with the License.
1499 * You may obtain a copy of the License at
1500 *
1501 *   http://www.apache.org/licenses/LICENSE-2.0
1502 *
1503 * Unless required by applicable law or agreed to in writing, software
1504 * distributed under the License is distributed on an "AS IS" BASIS,
1505 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1506 * See the License for the specific language governing permissions and
1507 * limitations under the License.
1508 */function wbe(e,t){return t?nl(t):(dt(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}/**
1509 * @license
1510 * Copyright 2019 Google LLC
1511 *
1512 * Licensed under the Apache License, Version 2.0 (the "License");
1513 * you may not use this file except in compliance with the License.
1514 * You may obtain a copy of the License at
1515 *
1516 *   http://www.apache.org/licenses/LICENSE-2.0
1517 *
1518 * Unless required by applicable law or agreed to in writing, software
1519 * distributed under the License is distributed on an "AS IS" BASIS,
1520 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1521 * See the License for the specific language governing permissions and
1522 * limitations under the License.
1523 */class qT extends UT{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return zf(t,this._buildIdpRequest())}_linkToIdToken(t,n){return zf(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return zf(t,this._buildIdpRequest())}_buildIdpRequest(t){const n={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 t&&(n.idToken=t),n}}function Cbe(e){return G6(e.auth,new qT(e),e.bypassAuthState)}function xbe(e){const{auth:t,user:n}=e;return dt(n,t,"internal-error"),Qve(n,new qT(e),e.bypassAuthState)}async function Sbe(e){const{auth:t,user:n}=e;return dt(n,t,"internal-error"),Kve(n,new qT(e),e.bypassAuthState)}/**
1524 * @license
1525 * Copyright 2020 Google LLC
1526 *
1527 * Licensed under the Apache License, Version 2.0 (the "License");
1528 * you may not use this file except in compliance with the License.
1529 * You may obtain a copy of the License at
1530 *
1531 *   http://www.apache.org/licenses/LICENSE-2.0
1532 *
1533 * Unless required by applicable law or agreed to in writing, software
1534 * distributed under the License is distributed on an "AS IS" BASIS,
1535 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1536 * See the License for the specific language governing permissions and
1537 * limitations under the License.
1538 */class n3{constructor(t,n,r,o,i=!1){this.auth=t,this.resolver=r,this.user=o,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(t,n)=>{this.pendingPromise={resolve:t,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(t){const{urlResponse:n,sessionId:r,postBody:o,tenantId:i,error:s,type:a}=t;if(s){this.reject(s);return}const l={auth:this.auth,requestUri:n,sessionId:r,tenantId:i||void 0,postBody:o||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(l))}catch(u){this.reject(u)}}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return Cbe;case"linkViaPopup":case"linkViaRedirect":return Sbe;case"reauthViaPopup":case"reauthViaRedirect":return xbe;default:Os(this.auth,"internal-error")}}resolve(t){wl(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){wl(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
1539 * @license
1540 * Copyright 2020 Google LLC
1541 *
1542 * Licensed under the Apache License, Version 2.0 (the "License");
1543 * you may not use this file except in compliance with the License.
1544 * You may obtain a copy of the License at
1545 *
1546 *   http://www.apache.org/licenses/LICENSE-2.0
1547 *
1548 * Unless required by applicable law or agreed to in writing, software
1549 * distributed under the License is distributed on an "AS IS" BASIS,
1550 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1551 * See the License for the specific language governing permissions and
1552 * limitations under the License.
1553 */const _be=new Ey(2e3,1e4);class Cf extends n3{constructor(t,n,r,o,i){super(t,n,o,i),this.provider=r,this.authWindow=null,this.pollId=null,Cf.currentPopupAction&&Cf.currentPopupAction.cancel(),Cf.currentPopupAction=this}async executeNotNull(){const t=await this.execute();return dt(t,this.auth,"internal-error"),t}async onExecution(){wl(this.filter.length===1,"Popup operations only handle one event");const t=GT();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(ya(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var t;return((t=this.authWindow)===null||t===void 0?void 0:t.associatedEvent)||null}cancel(){this.reject(ya(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Cf.currentPopupAction=null}pollUserCancellation(){const t=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(ya(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,_be.get())};t()}}Cf.currentPopupAction=null;/**
1554 * @license
1555 * Copyright 2020 Google LLC
1556 *
1557 * Licensed under the Apache License, Version 2.0 (the "License");
1558 * you may not use this file except in compliance with the License.
1559 * You may obtain a copy of the License at
1560 *
1561 *   http://www.apache.org/licenses/LICENSE-2.0
1562 *
1563 * Unless required by applicable law or agreed to in writing, softw
1563are
1564 * distributed under the License is distributed on an "AS IS" BASIS,
1565 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1566 * See the License for the specific language governing permissions and
1567 * limitations under the License.
1568 */const Ebe="pendingRedirect",Ub=new Map;class Ibe extends n3{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let t=Ub.get(this.auth._key());if(!t){try{const r=await Abe(this.resolver,this.auth)?await super.execute():null;t=()=>Promise.resolve(r)}catch(n){t=()=>Promise.reject(n)}Ub.set(this.auth._key(),t)}return this.bypassAuthState||Ub.set(this.auth._key(),()=>Promise.resolve(null)),t()}async onAuthEvent(t){if(t.type==="signInViaRedirect")return super.onAuthEvent(t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const n=await this.auth._redirectUserForId(t.eventId);if(n)return this.user=n,super.onAuthEvent(t);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function Abe(e,t){const n=Tbe(t),r=Pbe(e);if(!await r._isAvailable())return!1;const o=await r._get(n)==="true";return await r._remove(n),o}function kbe(e,t){Ub.set(e._key(),t)}function Pbe(e){return nl(e._redirectPersistence)}function Tbe(e){return zb(Ebe,e.config.apiKey,e.name)}async function Rbe(e,t,n=!1){if(na(e.app))return Promise.reject(al(e));const r=Wu(e),o=wbe(r,t),s=await new Ibe(r,o,n).execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}/**
1569 * @license
1570 * Copyright 2020 Google LLC
1571 *
1572 * Licensed under the Apache License, Version 2.0 (the "License");
1573 * you may not use this file except in compliance with the License.
1574 * You may obtain a copy of the License at
1575 *
1576 *   http://www.apache.org/licenses/LICENSE-2.0
1577 *
1578 * Unless required by applicable law or agreed to in writing, software
1579 * distributed under the License is distributed on an "AS IS" BASIS,
1580 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1581 * See the License for the specific language governing permissions and
1582 * limitations under the License.
1583 */const Obe=10*60*1e3;class Mbe{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(t,r)&&(n=!0,this.sendToConsumer(t,r),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!Dbe(t)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=t,n=!0)),n}sendToConsumer(t,n){var r;if(t.error&&!r3(t)){const o=((r=t.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(ya(this.auth,o))}else n.onAuthEvent(t)}isEventForConsumer(t,n){const r=n.eventId===null||!!t.eventId&&t.eventId===n.eventId;return n.filter.includes(t.type)&&r}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=Obe&&this.cachedEventUids.clear(),this.cachedEventUids.has(UF(t))}saveEventToCache(t){this.cachedEventUids.add(UF(t)),this.lastProcessedEventTime=Date.now()}}function UF(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(t=>t).join("-")}function r3({type:e,error:t}){return e==="unknown"&&(t==null?void 0:t.code)==="auth/no-auth-event"}function Dbe(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return r3(e);default:return!1}}/**
1584 * @license
1585 * Copyright 2020 Google LLC
1586 *
1587 * Licensed under the Apache License, Version 2.0 (the "License");
1588 * you may not use this file except in compliance with the License.
1589 * You may obtain a copy of the License at
1590 *
1591 *   http://www.apache.org/licenses/LICENSE-2.0
1592 *
1593 * Unless required by applicable law or agreed to in writing, softw
1593are
1594 * distributed under the License is distributed on an "AS IS" BASIS,
1595 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1596 * See the License for the specific language governing permissions and
1597 * limitations under the License.
1598 */async function $be(e,t={}){return Tl(e,"GET","/v1/projects",t)}/**
1599 * @license
1600 * Copyright 2020 Google LLC
1601 *
1602 * Licensed under the Apache License, Version 2.0 (the "License");
1603 * you may not use this file except in compliance with the License.
1604 * You may obtain a copy of the License at
1605 *
1606 *   http://www.apache.org/licenses/LICENSE-2.0
1607 *
1608 * Unless required by applicable law or agreed to in writing, software
1609 * distributed under the License is distributed on an "AS IS" BASIS,
1610 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1611 * See the License for the specific language governing permissions and
1612 * limitations under the License.
1613 */const Fbe=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Lbe=/^https?/;async function Nbe(e){if(e.config.emulator)return;const{authorizedDomains:t}=await $be(e);for(const n of t)try{if(Vbe(n))return}catch{}Os(e,"unauthorized-domain")}function Vbe(e){const t=YI(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const s=new URL(e);return s.hostname===""&&r===""?n==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):n==="chrome-extension:"&&s.hostname===r}if(!Lbe.test(n))return!1;if(Fbe.test(e))return r===e;const o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(r)}/**
1614 * @license
1615 * Copyright 2020 Google LLC.
1616 *
1617 * Licensed under the Apache License, Version 2.0 (the "License");
1618 * you may not use this file except in compliance with the License.
1619 * You may obtain a copy of the License at
1620 *
1621 *   http://www.apache.org/licenses/LICENSE-2.0
1622 *
1623 * Unless required by applicable law or agreed to in writing, software
1624 * distributed under the License is distributed on an "AS IS" BASIS,
1625 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1626 * See the License for the specific language governing permissions and
1627 * limitations under the License.
1628 */const Bbe=new Ey(3e4,6e4);function HF(){const e=va().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}}function jbe(e){return new Promise((t,n)=>{var r,o,i;function s(){HF(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{HF(),n(ya(e,"network-request-failed"))},timeout:Bbe.get()})}if(!((o=(r=va().gapi)===null||r===void 0?void 0:r.iframes)===null||o===void 0)&&o.Iframe)t(gapi.iframes.getContext());else if(!((i=va().gapi)===null||i===void 0)&&i.load)s();else{const a=Tve("iframefcb");return va()[a]=()=>{gapi.load?s():n(ya(e,"network-request-failed"))},j6(`${Pve()}?onload=${a}`).catch(l=>n(l))}}).catch(t=>{throw Hb=null,t})}let Hb=null;function zbe(e){return Hb=Hb||jbe(e),Hb}/**
1629 * @license
1630 * Copyright 2020 Google LLC.
1631 *
1632 * Licensed under the Apache License, Version 2.0 (the "License");
1633 * you may not use this file except in compliance with the License.
1634 * You may obtain a copy of the License at
1635 *
1636 *   http://www.apache.org/licenses/LICENSE-2.0
1637 *
1638 * Unless required by applicable law or agreed to in writing, software
1639 * distributed under the License is distributed on an "AS IS" BASIS,
1640 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1641 * See the License for the specific language governing permissions and
1642 * limitations under the License.
1643 */const Ube=new Ey(5e3,15e3),Hbe="__/auth/iframe",Wbe="emulator/auth/iframe",Gbe={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},qbe=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Kbe(e){const t=e.config;dt(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?BT(t,Wbe):`https://${e.config.authDomain}/${Hbe}
1643`,r={apiKey:t.apiKey,appName:e.name,v:Cd},o=qbe.get(e.config.apiHost);o&&(r.eid=o);const i=e._getFrameworks();return i.length&&(r.fw=i.join(",")),`${n}?${_y(r).slice(1)}`}async function Qbe(e){const t=await zbe(e),n=va().gapi;return dt(n,e,"internal-error"),t.open({where:document.body,url:Kbe(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Gbe,dontclear:!0},r=>new Promise(async(o,i)=>{await r.restyle({setHideOnLeave:!1});const s=ya(e,"network-request-failed"),a=va().setTimeout(()=>{i(s)},Ube.get());function l(){va().clearTimeout(a),o(r)}r.ping(l).then(l,()=>{i(s)})}))}/**
1644 * @license
1645 * Copyright 2020 Google LLC.
1646 *
1647 * Licensed under the Apache License, Version 2.0 (the "License");
1648 * you may not use this file except in compliance with the License.
1649 * You may obtain a copy of the License at
1650 *
1651 *   http://www.apache.org/licenses/LICENSE-2.0
1652 *
1653 * Unless required by applicable law or agreed to in writing, software
1654 * distributed under the License is distributed on an "AS IS" BASIS,
1655 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1656 * See the License for the specific language governing permissions and
1657 * limitations under the License.
1658 */const Ybe={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Xbe=500,Jbe=600,Zbe="_blank",e0e="http://localhost";class WF{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function t0e(e,t,n,r=Xbe,o=Jbe){const i=Math.max((window.screen.availHeight-o)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},Ybe),{width:r.toString(),height:o.toString(),top:i,left:s}),u=ur().toLowerCase();n&&(a=D6(u)?Zbe:n),M6(u)&&(t=t||e0e,l.scrollbars="yes");const c=Object.entries(l).reduce((f,[h,p])=>`${f}${h}=${p},`,"");if(bve(u)&&a!=="_self")return n0e(t||"",a),new WF(null);const d=window.open(t||"",a,c);dt(d,e,"popup-blocked");try{d.focus()}catch{}return new WF(d)}function n0e(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/**
1659 * @license
1660 * Copyright 2021 Google LLC
1661 *
1662 * Licensed under the Apache License, Version 2.0 (the "License");
1663 * you may not use this file except in compliance with the License.
1664 * You may obtain a copy of the License at
1665 *
1666 *   http://www.apache.org/licenses/LICENSE-2.0
1667 *
1668 * Unless required by applicable law or agreed to in writing, software
1669 * distributed under the License is distributed on an "AS IS" BASIS,
1670 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1671 * See the License for the specific language governing permissions and
1672 * limitations under the License.
1673 */const r0e="__/auth/handler",o0e="emulator/auth/handler",i0e=encodeURIComponent("fac");async function GF(e,t,n,r,o,i){dt(e.config.authDomain,e,"auth-domain-config-required"),dt(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:Cd,eventId:o};if(t instanceof H6){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",Wge(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[c,d]of Object.entries(i||{}))s[c]=d}if(t instanceof Ay){const c=t.getScopes().filter(d=>d!=="");c.length>0&&(s.scopes=c.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const c of Object.keys(a))a[c]===void 0&&delete a[c];const l=await e._getAppCheckToken(),u=l?`#${i0e}=${encodeURIComponent(l)}`:"";return`${s0e(e)}?${_y(a).slice(1)}${u}`}function s0e({config:e}){return e.emulator?BT(e,o0e):`https://${e.authDomain}/${r0e}`}/**
1674 * @license
1675 * Copyright 2020 Google LLC
1676 *
1677 * Licensed under the Apache License, Version 2.0 (the "License");
1678 * you may not use this file except in compliance with the License.
1679 * You may obtain a copy of the License at
1680 *
1681 *   http://www.apache.org/licenses/LICENSE-2.0
1682 *
1683 * Unless required by applicable law or agreed to in writing, software
1684 * distributed under the License is distributed on an "AS IS" BASIS,
1685 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1686 * See the License for the specific language governing permissions and
1687 * limitations under the License.
1688 */const m_="webStorageSupport";class a0e{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=X6,this._completeRedirectFn=Rbe,this._overrideRedirectResult=kbe}async _openPopup(t,n,r,o){var i;wl((i=this.eventManagers[t._key()])===null||i===void 0?void 0:i.manager,"_initialize() not called before _openPopup()");const s=await GF(t,n,r,YI(),o);return t0e(t,s,GT())}async _openRedirect(t,n,r,o){await this._originValidation(t);const i=await GF(t,n,r,YI(),o);return cbe(i),new Promise(()=>{})}_initialize(t){const n=t._key();if(this.eventManagers[n]){const{manager:o,promise:i}=this.eventManagers[n];return o?Promise.resolve(o):(wl(i,"If manager is not set, promise should be"),i)}const r=this.initAndGetManager(t);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(t){const n=await Qbe(t),r=new Mbe(t);return n.register("authEvent",o=>
1688(dt(o==null?void 0:o.authEvent,t,"invalid-auth-event"),{status:r.onEvent(o.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,r}_isIframeWebStorageSupported(t,n){this.iframes[t._key()].send(m_,{type:m_},o=>{var i;const s=(i=o==null?void 0:o[0])===null||i===void 0?void 0:i[m_];s!==void 0&&n(!!s),Os(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=Nbe(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return V6()||zT()||YC()}}const l0e=a0e;var qF="@firebase/auth",KF="1.7.0";/**
1689 * @license
1690 * Copyright 2020 Google LLC
1691 *
1692 * Licensed under the Apache License, Version 2.0 (the "License");
1693 * you may not use this file except in compliance with the License.
1694 * You may obtain a copy of the License at
1695 *
1696 *   http://www.apache.org/licenses/LICENSE-2.0
1697 *
1698 * Unless required by applicable law or agreed to in writing, software
1699 * distributed under the License is distributed on an "AS IS" BASIS,
1700 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1701 * See the License for the specific language governing permissions and
1702 * limitations under the License.
1703 */class u0e{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(r=>{t((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){dt(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
1704 * @license
1705 * Copyright 2020 Google LLC
1706 *
1707 * Licensed under the Apache License, Version 2.0 (the "License");
1708 * you may not use this file except in compliance with the License.
1709 * You may obtain a copy of the License at
1710 *
1711 *   http://www.apache.org/licenses/LICENSE-2.0
1712 *
1713 * Unless required by applicable law or agreed to in writing, software
1714 * distributed under the License is distributed on an "AS IS" BASIS,
1715 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1716 * See the License for the specific language governing permissions and
1717 * limitations under the License.
1718 */function c0e(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function d0e(e){od(new $u("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),o=t.getProvider("heartbeat"),i=t.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=r.options;dt(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:s,authDomain:a,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:B6(e)},u=new Ive(r,o,i,l);return $ve(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),od(new $u("auth-internal",t=>{const n=Wu(t.getProvider("auth").getImmediate());return(r=>new u0e(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),ga(qF,KF,c0e(e)),ga(qF,KF,"esm2017")}/**
1719 * @license
1720 * Copyright 2021 Google LLC
1721 *
1722 * Licensed under the Apache License, Version 2.0 (the "License");
1723 * you may not use this file except in compliance with the License.
1724 * You may obtain a copy of the License at
1725 *
1726 *   http://www.apache.org/licenses/LICENSE-2.0
1727 *
1728 * Unless required by applicable law or agreed to in writing, softw
1728are
1729 * distributed under the License is distributed on an "AS IS" BASIS,
1730 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1731 * See the License for the specific language governing permissions and
1732 * limitations under the License.
1733 */const f0e=5*60,h0e=g6("authIdTokenMaxAge")||f0e;let QF=null;const p0e=e=>async t=>{const n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>h0e)return;const o=n==null?void 0:n.token;QF!==o&&(QF=o,await fetch(e,{method:o?"POST":"DELETE",headers:o?{Authorization:`Bearer ${o}`}:{}}))};function o3(e=LT()){const t=QC(e,"auth");if(t.isInitialized())return t.getImmediate();const n=Dve(e,{popupRedirectResolver:l0e,persistence:[bbe,JC,X6]}),r=g6("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const i=new URL(r,location.origin);if(location.origin===i.origin){const s=p0e(i.toString());nbe(n,s,()=>s(n.currentUser)),tbe(n,a=>s(a))}}const o=h6("auth");return o&&z6(n,`http://${o}`),n}function m0e(){var e,t;return(t=(e=document.getElementsByTagName("head"))===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:document}Ave({loadJS(e){return new Promise((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=o=>{const i=ya("internal-error");i.customData=o,n(i)},r.type="text/javascript",r.charset="UTF-8",m0e().appendChild(r)})},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="});d0e("Browser");var g0e="firebase",y0e="10.10.0";/**
1734 * @license
1735 * Copyright 2020 Google LLC
1736 *
1737 * Licensed under the Apache License, Version 2.0 (the "License");
1738 * you may not use this file except in compliance with the License.
1739 * You may obtain a copy of the License at
1740 *
1741 *   http://www.apache.org/licenses/LICENSE-2.0
1742 *
1743 * Unless required by applicable law or agreed to in writing, software
1744 * distributed under the License is distributed on an "AS IS" BASIS,
1745 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1746 * See the License for the specific language governing permissions and
1747 * limitations under the License.
1748 */ga(g0e,y0e,"app");var v0e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},He,KT=KT||{},mt=v0e||self;function tx(e){var t=typeof e;return t=t!="object"?t:e?Array.isArray(e)?"array":t:"null",t=="array"||t=="object"&&typeof e.length=="number"}function Py(e){var t=typeof e;return t=="object"&&e!=null||t=="function"}function b0e(e){return Object.prototype.hasOwnProperty.call(e,g_)&&e[g_]||(e[g_]=++w0e)}var g_="closure_uid_"+(1e9*Math.random()>>>0),w0e=0;function C0e(e,t,n){return e.call.apply(e.bind,arguments)}function x0e(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var o=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(o,r),e.apply(t,o)}}return function(){return e.apply(t,arguments)}}function ao(e,t,n){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?ao=C0e:ao=x0e,ao.apply(null,arguments)}function Qv(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),e.apply(this,r)}}function Ir(e,t){function n(){}n.prototype=t.prototype,e.$=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.ac=function(r,o,i){for(var s=Array(arguments.length-2),a=2;a<arguments.length;a++)s[a-2]=arguments[a];return t.prototype[o].apply(r,s)}}function Gu(){this.s=this.s,this.o=this.o}var S0e=0;Gu.prototype.s=!1;Gu.prototype.sa=function(){!this.s&&(this.s=!0,this.N(),S0e!=0)&&b0e(this)};Gu.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};const i3=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if(typeof e=="string")return typeof t!="string"||t.length!=1?-1:e.indexOf(t,0);for(let n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1};function QT(e){const t=e.length;if(0<t){const n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}return[]}function YF(e,t){for(let n=1;n<arguments.length;n++){const r=arguments[n];if(tx(r)){const o=e.length||0,i=r.length||0;e.length=o+i;for(let s=0;s<i;s++)e[o+s]=r[s]}else e.push(r)}}function lo(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}lo.prototype.h=function(){this.defaultPrevented=!0};var _0e=function(){if(!mt.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{const n=()=>{};mt.addEventListener("test",n,t),mt.removeEventListener("test",n,t)}catch{}return e}();function Og(e){return/^[\s\xa0]*$/.test(e)}function nx(){var e=mt.navigator;return e&&(e=e.userAgent)?e:""}function Zs(e){return nx().indexOf(e)!=-1}function YT(e){return YT[" "](e),e}YT[" "]=function(){};function E0e(e,t){var n=ywe;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}
1748var I0e=Zs("Opera"),Ch=Zs("Trident")||Zs("MSIE"),s3=Zs("Edge"),ZI=s3||Ch,a3=Zs("Gecko")&&!(nx().toLowerCase().indexOf("webkit")!=-1&&!Zs("Edge"))&&!(Zs("Trident")||Zs("MSIE"))&&!Zs("Edge"),A0e=nx().toLowerCase().indexOf("webkit")!=-1&&!Zs("Edge");function l3(){var e=mt.document;return e?e.documentMode:void 0}var eA;e:{var y_="",v_=function(){var e=nx();if(a3)return/rv:([^\);]+)(\)|;)/.exec(e);if(s3)return/Edge\/([\d\.]+)/.exec(e);if(Ch)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e);if(A0e)return/WebKit\/(\S+)/.exec(e);if(I0e)return/(?:Version)[ \/]?(\S+)/.exec(e)}();if(v_&&(y_=v_?v_[1]:""),Ch){var b_=l3();if(b_!=null&&b_>parseFloat(y_)){eA=String(b_);break e}}eA=y_}var tA;if(mt.document&&Ch){var XF=l3();tA=XF||parseInt(eA,10)||void 0}else tA=void 0;var k0e=tA;function Mg(e,t){if(lo.call(this,e?e.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,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(a3){e:{try{YT(t.nodeName);var o=!0;break e}catch{}o=!1}o||(t=null)}}else n=="mouseover"?t=e.fromElement:n=="mouseout"&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=r.clientX!==void 0?r.clientX:r.pageX,this.clientY=r.clientY!==void 0?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=e.clientX!==void 0?e.clientX:e.pageX,this.clientY=e.clientY!==void 0?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType=typeof e.pointerType=="string"?e.pointerType:P0e[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&Mg.$.h.call(this)}}Ir(Mg,lo);var P0e={2:"touch",3:"pen",4:"mouse"};Mg.prototype.h=function(){Mg.$.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var Ty="closure_listenable_"+(1e6*Math.random()|0),T0e=0;function R0e(e,t,n,r,o){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.la=o,this.key=++T0e,this.fa=this.ia=!1}function rx(e){e.fa=!0,e.listener=null,e.proxy=null,e.src=null,e.la=null}function XT(e,t,n){for(const r in e)t.call(n,e[r],r,e)}function O0e(e,t){for(const n in e)t.call(void 0,e[n],n,e)}function u3(e){const t={};for(const n in e)t[n]=e[n];return t}const JF="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function c3(e,t){let n,r;for(let o=1;o<arguments.length;o++){r=arguments[o];for(n in r)e[n]=r[n];for(let i=0;i<JF.length;i++)n=JF[i],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function ox(e){this.src=e,this.g={},this.h=0}ox.prototype.add=function(e,t,n,r,o){var i=e.toString();e=this.g[i],e||(e=this.g[i]=[],this.h++);var s=rA(e,t,r,o);return-1<s?(t=e[s],n||(t.ia=!1)):(t=new R0e(t,this.src,i,!!r,o),t.ia=n,e.push(t)),t};function nA(e,t){var n=t.type;if(n in e.g){var r=e.g[n],o=i3(r,t),i;(i=0<=o)&&Array.prototype.splice.call(r,o,1),i&&(rx(t),e.g[n].length==0&&(delete e.g[n],e.h--))}}function rA(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o];if(!i.fa&&i.listener==t&&i.capture==!!n&&i.la==r)return o}return-1}var JT="closure_lm_"+(1e6*Math.random()|0),w_={};function d3(e,t,n,r,o){if(r&&r.once)return h3(e,t,n,r,o);if(Array.isArray(t)){for(var i=0;i<t.length;i++)d3(e,t[i],n,r,o);return null}return n=tR(n),e&&e[Ty]?e.O(t,n,Py(r)?!!r.capture:!!r,o):f3(e,t,n,!1,r,o)}function f3(e,t,n,r,o,i){if(!t)throw Error("Invalid event type");var s=Py(o)?!!o.capture:!!o,a=eR(e);if(a||(e[JT]=a=new ox(e)),n=a.add(t,n,r,s,i),n.proxy)return n;if(r=M0e(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)_0e||(o=s),o===void 0&&(o=!1),e.addEventListener(t.toString(),r,o);else if(e.attachEvent)e.attachEvent(m3(t.toString()),r);else if(e.addListener&&e.removeListener)e.addListener(r);else throw Error("addEventListener and attachEvent are unavailable.");return n}function M0e(){function e(n){return t.call(e.src,e.listener,n)}const t=D0e;return e}function h3(e,t,n,r,o){if(Array.isArray(t)){for(var i=0;i<t.length;i++)h3(e,t[i],n,r,o);return null}return n=tR(n),e&&e[Ty]?e.P(t,n,Py(r)?!!r.capture:!!r,o):f3(e,t,n,!0,r,o)}function p3(e,t,n,r,o){if(Array.isArray(t))for(var i=0;i<t.length;i++)p3(e,t[i],n,r,o);else r=Py(r)?!!r.capture:!!r,n=tR(n),e&&e[Ty]?(e=e.i,t=String(t).toString(),t in e.g&&(i=e.g[t],n=rA(i,n,r,o),-1<n&&(rx(i[n]),Array.prototype.splice.call(i,n,1),i.length==0&&(delete e.g[t],e.h--))
1748)):e&&(e=eR(e))&&(t=e.g[t.toString()],e=-1,t&&(e=rA(t,n,r,o)),(n=-1<e?t[e]:null)&&ZT(n))}function ZT(e){if(typeof e!="number"&&e&&!e.fa){var t=e.src;if(t&&t[Ty])nA(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(m3(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=eR(t))?(nA(n,e),n.h==0&&(n.src=null,t[JT]=null)):rx(e)}}}function m3(e){return e in w_?w_[e]:w_[e]="on"+e}function D0e(e,t){if(e.fa)e=!0;else{t=new Mg(t,this);var n=e.listener,r=e.la||e.src;e.ia&&ZT(e),e=n.call(r,t)}return e}function eR(e){return e=e[JT],e instanceof ox?e:null}var C_="__closure_events_fn_"+(1e9*Math.random()>>>0);function tR(e){return typeof e=="function"?e:(e[C_]||(e[C_]=function(t){return e.handleEvent(t)}),e[C_])}function Sr(){Gu.call(this),this.i=new ox(this),this.S=this,this.J=null}Ir(Sr,Gu);Sr.prototype[Ty]=!0;Sr.prototype.removeEventListener=function(e,t,n,r){p3(this,e,t,n,r)};function Nr(e,t){var n,r=e.J;if(r)for(n=[];r;r=r.J)n.push(r);if(e=e.S,r=t.type||t,typeof t=="string")t=new lo(t,e);else if(t instanceof lo)t.target=t.target||e;else{var o=t;t=new lo(r,e),c3(t,o)}if(o=!0,n)for(var i=n.length-1;0<=i;i--){var s=t.g=n[i];o=Yv(s,r,!0,t)&&o}if(s=t.g=e,o=Yv(s,r,!0,t)&&o,o=Yv(s,r,!1,t)&&o,n)for(i=0;i<n.length;i++)s=t.g=n[i],o=Yv(s,r,!1,t)&&o}Sr.prototype.N=function(){if(Sr.$.N.call(this),this.i){var e=this.i,t;for(t in e.g){for(var n=e.g[t],r=0;r<n.length;r++)rx(n[r]);delete e.g[t],e.h--}}this.J=null};Sr.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)};Sr.prototype.P=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};function Yv(e,t,n,r){if(t=e.i.g[String(t)],!t)return!0;t=t.concat();for(var o=!0,i=0;i<t.length;++i){var s=t[i];if(s&&!s.fa&&s.capture==n){var a=s.listener,l=s.la||s.src;s.ia&&nA(e.i,s),o=a.call(l,r)!==!1&&o}}return o&&!r.defaultPrevented}var nR=mt.JSON.stringify;class $0e{constructor(t,n){this.i=t,this.j=n,this.h=0,this.g=null}get(){let t;return 0<this.h?(this.h--,t=this.g,this.g=t.next,t.next=null):t=this.i(),t}}function F0e(){var e=rR;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}class L0e{constructor(){this.h=this.g=null}add(t,n){const r=g3.get();r.set(t,n),this.h?this.h.next=r:this.g=r,this.h=r}}var g3=new $0e(()=>new N0e,e=>e.reset());class N0e{constructor(){this.next=this.g=this.h=null}set(t,n){this.h=t,this.g=n,this.next=null}reset(){this.next=this.g=this.h=null}}function V0e(e){var t=1;e=e.split(":");const n=[];for(;0<t&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(":")),n}function B0e(e){mt.setTimeout(()=>{throw e},0)}let Dg,$g=!1,rR=new L0e,y3=()=>{const e=mt.Promise.resolve(void 0);Dg=()=>{e.then(j0e)}};var j0e=()=>{for(var e;e=F0e();){try{e.h.call(e.g)}catch(n){B0e(n)}var t=g3;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}$g=!1};function ix(e,t){Sr.call(this),this.h=e||1,this.g=t||mt,this.j=ao(this.qb,this),this.l=Date.now()}Ir(ix,Sr);He=ix.prototype;He.ga=!1;He.T=null;He.qb=function(){if(this.ga){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-e):(this.T&&(this.g.clearTimeout(this.T),this.T=null),Nr(this,"tick"),this.ga&&(oR(this),this.start()))}};He.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())};function oR(e){e.ga=!1,e.T&&(e.g.clearTimeout(e.T),e.T=null)}He.N=function(){ix.$.N.call(this),oR(this),delete this.g};function iR(e,t,n){if(typeof e=="function")n&&(e=ao(e,n));else if(e&&typeof e.handleEvent=="function")e=ao(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<Number(t)?-1:mt.setTimeout(e,t||0)}function v3(e){e.g=iR(()=>{e.g=null,e.i&&(e.i=!1,v3(e))},e.j);const t=e.h;e.h=null,e.m.apply(null,t)}class z0e extends Gu{constructor(t,n){super(),this.m=t,this.j=n,this.h=null,this.i=!1,this.g=null}l(t){this.h=arguments,this.g?this.i=!0:v3(this)}N(){super.N(),this.g&&(mt.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Fg(e){Gu.call(this),this.h=e,this.g={}}Ir(Fg,Gu);var ZF=[];function b3(e,t,n,r){Array.isArray(n)||(n&&(ZF[0]=n.toString()),n=ZF);for(var o=0;o<n.length;o++){var i=d3(t,n[o],r||e.handleEvent,!1,e.h||e);if(!i)break;e.g[i.key]=i}}function w3(e){XT(e.g,function(t,n){this.g.hasOwnProperty(n)&&ZT(t)},e),e.g={}}Fg.prototype.N=function(){Fg.$.N.call(this),w3(this)};Fg.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};function sx(){this.g=!0}sx.prototype.Ea=function(){this.g=!1};function U0e(e,t,n,r,o,i){e.info(function(){if(e.g)if(i)for(var s="",a=i.split("&"),l=0;l<a.length;l++){var u=a[l].split("=");if(1<u.length){var c=u[0];u=u[1];var d=c.split("_");s=2<=d.length&&d[1]=="type"?s+(c+"="+u+"&"):s+(c+"=redacted&")}}else s=null;else s=i;return"XMLHTTP REQ ("+r+") [attempt "+o+"]: "+t+`
1749`+n+`
1750`+s})}function H0e(e,t,n,r,o,i,s){e.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+o+"]: "+t+`
1751`+n+`
1752`+i+" "+s})}function xf(e,t,n,r){e.info(function(){return"XMLHTTP TEXT ("+t+"): "+G0e(e,n)+(r?" "+r:"")})}function W0e(e,t){e.info(function(){return"TIMEOUT: "+t})}sx.prototype.info=function(){};function G0e(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n){for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var o=r[1];if(Array.isArray(o)&&!(1>o.length)){var i=o[0];if(i!="noop"&&i!="stop"&&i!="close")for(var s=1;s<o.length;s++)o[s]=""}}}}return nR(n)}catch{return t}}var xd={},eL=null;function ax(){return eL=eL||new Sr}xd.Ta="serverreachability";function C3(e){lo.call(this,xd.Ta,e)}Ir(C3,lo);function Lg(e){const t=ax();Nr(t,new C3(t))}xd.STAT_EVENT="statevent";function x3(e,t){lo.call(this,xd.STAT_EVENT,e),this.stat=t}Ir(x3,lo);function _o(e){const t=ax();Nr(t,new x3(t,e))}xd.Ua="timingevent";function S3(e,t){lo.call(this,xd.Ua,e),this.size=t}Ir(S3,lo);function Ry(e,t){if(typeof e!="function")throw Error("Fn must not be null and must be a function");return mt.setTimeout(function(){e()},t)}var lx={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9}
1752,_3={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function sR(){}sR.prototype.h=null;function tL(e){return e.h||(e.h=e.i())}function E3(){}var Oy={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function aR(){lo.call(this,"d")}Ir(aR,lo);function lR(){lo.call(this,"c")}Ir(lR,lo);var oA;function ux(){}Ir(ux,sR);ux.prototype.g=function(){return new XMLHttpRequest};ux.prototype.i=function(){return{}};oA=new ux;function My(e,t,n,r){this.l=e,this.j=t,this.m=n,this.W=r||1,this.U=new Fg(this),this.P=q0e,e=ZI?125:void 0,this.V=new ix(e),this.I=null,this.i=!1,this.u=this.B=this.A=this.L=this.G=this.Y=this.C=null,this.F=[],this.g=null,this.o=0,this.s=this.v=null,this.ca=-1,this.J=!1,this.O=0,this.M=null,this.ba=this.K=this.aa=this.S=!1,this.h=new I3}function I3(){this.i=null,this.g="",this.h=!1}var q0e=45e3,A3={},iA={};He=My.prototype;He.setTimeout=function(e){this.P=e};function sA(e,t,n){e.L=1,e.A=dx(Cl(t)),e.u=n,e.S=!0,k3(e,null)}function k3(e,t){e.G=Date.now(),Dy(e),e.B=Cl(e.A);var n=e.B,r=e.W;Array.isArray(r)||(r=[String(r)]),F3(n.i,"t",r),e.o=0,n=e.l.J,e.h=new I3,e.g=rH(e.l,n?t:null,!e.u),0<e.O&&(e.M=new z0e(ao(e.Pa,e,e.g),e.O)),b3(e.U,e.g,"readystatechange",e.nb),t=e.I?u3(e.I):{},e.u?(e.v||(e.v="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ha(e.B,e.v,e.u,t)):(e.v="GET",e.g.ha(e.B,e.v,null,t)),Lg(),U0e(e.j,e.v,e.B,e.m,e.W,e.u)}He.nb=function(e){e=e.target;const t=this.M;t&&ra(e)==3?t.l():this.Pa(e)};He.Pa=function(e){try{if(e==this.g)e:{const c=ra(this.g);var t=this.g.Ia();const d=this.g.da();if(!(3>c)&&(c!=3||ZI||this.g&&(this.h.h||this.g.ja()||iL(this.g)))){this.J||c!=4||t==7||(t==8||0>=d?Lg(3):Lg(2)),cx(this);var n=this.g.da();this.ca=n;t:if(P3(this)){var r=iL(this.g);e="";var o=r.length,i=ra(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){bc(this),Nm(this);var s="";break t}this.h.i=new mt.TextDecoder}for(t=0;t<o;t++)this.h.h=!0,e+=this.h.i.decode(r[t],{stream:i&&t==o-1});r.length=0,this.h.g+=e,this.o=0,s=this.h.g}else s=this.g.ja();if(this.i=n==200,H0e(this.j,this.v,this.B,this.m,this.W,c,n),this.i){if(this.aa&&
1752!this.K){t:{if(this.g){var a,l=this.g;if((a=l.g?l.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!Og(a)){var u=a;break t}}u=null}if(n=u)xf(this.j,this.m,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,aA(this,n);else{this.i=!1,this.s=3,_o(12),bc(this),Nm(this);break e}}this.S?(T3(this,c,s),ZI&&this.i&&c==3&&(b3(this.U,this.V,"tick",this.mb),this.V.start())):(xf(this.j,this.m,s,null),aA(this,s)),c==4&&bc(this),this.i&&!this.J&&(c==4?Z3(this.l,this):(this.i=!1,Dy(this)))}else pwe(this.g),n==400&&0<s.indexOf("Unknown SID")?(this.s=3,_o(12)):(this.s=0,_o(13)),bc(this),Nm(this)}}}catch{}finally{}};function P3(e){return e.g?e.v=="GET"&&e.L!=2&&e.l.Ha:!1}function T3(e,t,n){let r=!0,o;for(;!e.J&&e.o<n.length;)if(o=K0e(e,n),o==iA){t==4&&(e.s=4,_o(14),r=!1),xf(e.j,e.m,null,"[Incomplete Response]");break}else if(o==A3){e.s=4,_o(15),xf(e.j,e.m,n,"[Invalid Chunk]"),r=!1;break}else xf(e.j,e.m,o,null),aA(e,o);P3(e)&&e.o!=0&&(e.h.g=e.h.g.slice(e.o),e.o=0),t!=4||n.length!=0||e.h.h||(e.s=1,_o(16),r=!1),e.i=e.i&&r,r?0<n.length&&!e.ba&&(e.ba=!0,t=e.l,t.g==e&&t.ca&&!t.M&&(t.l.info("Great, no buffering proxy detected. Bytes received: "+n.length),pR(t),t.M=!0,_o(11))):(xf(e.j,e.m,n,"[Invalid Chunked Response]"),bc(e),Nm(e))}He.mb=function(){if(this.g){var e=ra(this.g),t=this.g.ja();this.o<t.length&&(cx(this),T3(this,e,t),this.i&&e!=4&&Dy(this))}};function K0e(e,t){var n=e.o,r=t.indexOf(`
1753`,n);return r==-1?iA:(n=Number(t.substring(n,r)),isNaN(n)?A3:(r+=1,r+n>t.length?iA:(t=t.slice(r,r+n),e.o=r+n,t)))}He.cancel=function(){this.J=!0,bc(this)};function Dy(e){e.Y=Date.now()+e.P,R3(e,e.P)}function R3(e,t){if(e.C!=null)throw Error("WatchDog timer not null");e.C=Ry(ao(e.lb,e),t)}function cx(e){e.C&&(mt.clearTimeout(e.C),e.C=null)}He.lb=function(){this.C=null;const e=Date.now();0<=e-this.Y?(W0e(this.j,this.B),this.L!=2&&(Lg(),_o(17)),bc(this),this.s=2,Nm(this)):R3(this,this.Y-e)};function Nm(e){e.l.H==0||e.J||Z3(e.l,e)}function bc(e){cx(e);var t=e.M;t&&typeof t.sa=="function"&&t.sa(),e.M=null,oR(e.V),w3(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.sa())}function aA(e,t){try{var n=e.l;if(n.H!=0&&(n.g==e||lA(n.i,e))){if(!e.K&&lA(n.i,e)&&n.H==3){try{var r=n.Ja.g.parse(t)}catch{r=null}if(Array.isArray(r)&&r.length==3){var o=r;if(o[0]==0){e:if(!n.u){if(n.g)if(n.g.G+3e3<e.G)Cw(n),mx(n);else break e;hR(n),_o(18)}}else n.Fa=o[1],0<n.Fa-n.V&&37500>o[2]&&n.G&&n.A==0&&!n.v&&(n.v=Ry(ao(n.ib,n),6e3));if(1>=V3(n.i)&&n.oa){try{n.oa()}catch{}n.oa=void 0}}else wc(n,11)}else if((e.K||n.g==e)&&Cw(n),!Og(t))for(o=n.Ja.g.parse(t),t=0;t<o.length;t++){let u=o[t];if(n.V=u[0],u=u[1],n.H==2)if(u[0]=="c"){n.K=u[1],n.pa=u[2];const c=u[3];c!=null&&(n.ra=c,n.l.info("VER="+n.ra));const d=u[4];d!=null&&(n.Ga=d,n.l.info("SVER="+n.Ga));const f=u[5];f!=null&&typeof f=="number"&&0<f&&(r=1.5*f,n.L=r,n.l.info("backChannelRequestTimeoutMs_="+r)),r=n;const h=e.g;if(h){const p=h.g?h.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(p){var i=r.i;i.g||p.indexOf("spdy")==-1&&p.indexOf("quic")==-1&&p.indexOf("h2")==-1||(i.j=i.l,i.g=new Set,i.h&&(uR(i,i.h),i.h=null))}if(r.F){const g=h.g?h.g.getResponseHeader("X-HTTP-Session-Id"):null;g&&(r.Da=g,Cn(r.I,r.F,g))}}n.H=3,n.h&&n.h.Ba(),n.ca&&(n.S=Date.now()-e.G,n.l.info("Handshake RTT: "+n.S+"ms")),r=n;var s=e;if(r.wa=nH(r,r.J?r.pa:null,r.Y),s.K){B3(r.i,s);var a=s,l=r.L;l&&a.setTimeout(l),a.C&&(cx(a),Dy(a)),r.g=s}else X3(r);0<n.j.length&&gx(n)}else u[0]!="stop"&&u[0]!="close"||wc(n,7);else n.H==3&&(u[0]=="stop"||u[0]=="close"?u[0]=="stop"?wc(n,7):fR(n):u[0]!="noop"&&n.h&&n.h.Aa(u),n.A=0)}}Lg(4)}catch{}}function Q0e(e){if(e.Z&&typeof e.Z=="function")return e.Z();if(typeof Map<"u"&&e instanceof Map||typeof Set<"u"&&e instanceof Set)return Array.from(e.values());if(typeof e=="string")return e.split("");if(tx(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}t=[],n=0;for(r in e)t[n++]=e[r];return t}function Y0e(e){if(e.ta&&typeof e.ta=="function")return e.ta();if(!e.Z||typeof e.Z!="function"){if(typeof Map<"u"&&e instanceof Map)return Array.from(e.keys());if(!(typeof Set<"u"&&e instanceof Set)){if(tx(e)||typeof e=="string"){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}t=[],n=0;for(const r in e)t[n++]=r;return t}}}function O3(e,t){if(e.forEach&&typeof e.forEach=="function")e.forEach(t,void 0);else if(tx(e)||typeof e=="string")Array.prototype.forEach.call(e,t,void 0);else for(var n=Y0e(e),r=Q0e(e),o=r.length,i=0;i<o;i++)t.call(void 0,r[i],n&&n[i],e)}var M3=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function X0e(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),o=null;if(0<=r){var i=e[n].substring(0,r);o=e[n].substring(r+1)}else i=e[n];
vendor: 5,356 bytes, line 1753
1753t(i,o?decodeURIComponent(o.replace(/\+/g," ")):"")}}}function Fc(e){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof Fc){this.h=e.h,bw(this,e.j),this.s=e.s,this.g=e.g,ww(this,e.m),this.l=e.l;var t=e.i,n=new Ng;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),nL(this,n),this.o=e.o}else e&&(t=String(e).match(M3))?(this.h=!1,bw(this,t[1]||"",!0),this.s=om(t[2]||""),this.g=om(t[3]||"",!0),ww(this,t[4]),this.l=om(t[5]||"",!0),nL(this,t[6]||"",!0),this.o=om(t[7]||"")):(this.h=!1,this.i=new Ng(null,this.h))}Fc.prototype.toString=function(){var e=[],t=this.j;t&&e.push(im(t,rL,!0),":");var n=this.g;return(n||t=="file")&&(e.push("//"),(t=this.s)&&e.push(im(t,rL,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n=this.m,n!=null&&e.push(":",String(n))),(n=this.l)&&(this.g&&n.charAt(0)!="/"&&e.push("/"),e.push(im(n,n.charAt(0)=="/"?ewe:Z0e,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",im(n,nwe)),e.join("")};function Cl(e){return new Fc(e)}function bw(e,t,n){e.j=n?om(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function ww(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function nL(e,t,n){t instanceof Ng?(e.i=t,rwe(e.i,e.h)):(n||(t=im(t,twe)),e.i=new Ng(t,e.h))}function Cn(e,t,n){e.i.set(t,n)}function dx(e){return Cn(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function om(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function im(e,t,n){return typeof e=="string"?(e=encodeURI(e).replace(t,J0e),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function J0e(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var rL=/[#\/\?@]/g,Z0e=/[#\?:]/g,ewe=/[#\?]/g,twe=/[#\?@]/g,nwe=/#/g;function Ng(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function qu(e){e.g||(e.g=new Map,e.h=0,e.i&&X0e(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}He=Ng.prototype;He.add=function(e,t){qu(this),this.i=null,e=tp(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this};function D3(e,t){qu(e),t=tp(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function $3(e,t){return qu(e),t=tp(e,t),e.g.has(t)}He.forEach=function(e,t){qu(this),this.g.forEach(function(n,r){n.forEach(function(o){e.call(t,o,r,this)},this)},this)};He.ta=function(){qu(this);const e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[];for(let r=0;r<t.length;r++){const o=e[r];for(let i=0;i<o.length;i++)n.push(t[r])}return n};He.Z=function(e){qu(this);let t=[];if(typeof e=="string")$3(this,e)&&(t=t.concat(this.g.get(tp(this,e))));else{e=Array.from(this.g.values());for(let n=0;n<e.length;n++)t=t.concat(e[n])}return t};He.set=function(e,t){return qu(this),this.i=null,e=tp(this,e),$3(this,e)&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this};He.get=function(e,t){return e?(e=this.Z(e),0<e.length?String(e[0]):t):t};function F3(e,t,n){D3(e,t),0<n.length&&(e.i=null,e.g.set(tp(e,t),QT(n)),e.h+=n.length)}He.toString=function(){if(this.i)return this.i;if(!this.g)return"";const e=[],t=Array.from(this.g.keys());for(var n=0;n<t.length;n++){var r=t[n];const i=encodeURIComponent(String(r)),s=this.Z(r);for(r=0;r<s.length;r++){var o=i;s[r]!==""&&(o+="="+encodeURIComponent(String(s[r]))),e.push(o)}}return this.i=e.join("&")};function tp(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function rwe(e,t){t&&!e.j&&(qu(e),e.i=null,e.g.forEach(function(n,r){var o=r.toLowerCase();r!=o&&(D3(this,r),F3(this,o,n))},e)),e.j=t}var owe=class{constructor(e,t){this.g=e,this.map=t}};function L3(e){this.l=e||iwe,mt.PerformanceNavigationTiming?(e=mt.performance.getEntriesByType("navigation"),e=0<e.length&&(e[0].nextHopProtocol=="hq"||e[0].nextHopProtocol=="h2")):e=!!(mt.g&&mt.g.Ka&&mt.g.Ka()&&mt.g.Ka().dc),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var iwe=10;function N3(e){return e.h?!0:e.g?e.g.size>=e.j:!1}function V3(e){return e.h?1:e.g?e.g.size:0}function lA(e,t){return e.h?e.h==t:e.g?e.g.has(t):!1}function uR(e,t){e.g?e.g.add(t):e.h=t}function B3(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}L3.prototype.cancel=function(){if(this.i=j3(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const e of this.g.values())e.cancel();this.g.clear()}};function j3(e){if(e.h!=null)return e.i.concat(e.h.F);if(e.g!=null&&e.g.size!==0){let t=e.i;for(const n of e.g.values())t=t.concat(n.F);return t}return QT(e.i)}var swe=class{stringify(e){return mt.JSON.stringify(e,void 0)}parse(e){return mt.JSON.parse(e,void 0)}};function awe(){this.g=new swe}function lwe(e,t,n){const r=n||"";try{O3(e,function(o,i){let s=o;Py(o)&&(s=nR(o)),t.push(r+i+"="+encodeURIComponent(s))})}catch(o){throw t.push(r+"type="+encodeURIComponent("_badmap")),o}}function uwe(e,t){const n=new sx;if(mt.Image){const r=new Image;r.onload=Qv(Xv,n,r,"TestLoadImage: loaded",!0,t),r.onerror=Qv(Xv,n,r,"TestLoadImage: error",!1,t),r.onabort=Qv(Xv,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=Qv(Xv,n,r,"TestLoadImage: timeout",!1,t),mt.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=e}else t(!1)}function Xv(e,t,n,r,o){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,o(r)}catch{}}
1753function fx(e){this.l=e.ec||null,this.j=e.ob||!1}Ir(fx,sR);fx.prototype.g=function(){return new hx(this.l,this.j)};fx.prototype.i=function(e){return function(){return e}}({});function hx(e,t){Sr.call(this),this.F=e,this.u=t,this.m=void 0,this.readyState=cR,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}Ir(hx,Sr);var cR=0;He=hx.prototype;He.open=function(e,t){if(this.readyState!=cR)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,Vg(this)};He.send=function(e){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.F||mt).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))};He.abort=function(){this.response=this.responseText="",this.v=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,$y(this)),this.readyState=cR};He.$a=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,Vg(this)),this.g&&(this.readyState=3,Vg(this),this.g)))if(this.responseType==="arraybuffer")e.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof mt.ReadableStream<"u"&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;z3(this)}else e.text().then(this.Za.bind(this),this.ka.bind(this))};function z3(e){e.j.read().then(e.Xa.bind(e)).catch(e.ka.bind(e))}He.Xa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?$y(this):Vg(this),this.readyState==3&&z3(this)}};He.Za=function(e){this.g&&(this.response=this.responseText=e,$y(this))};He.Ya=function(e){this.g&&(this.response=e,$y(this))};He.ka=function(){this.g&&$y(this)};function $y(e){e.readyState=4,e.l=null,e.j=null,e.A=null,Vg(e)}He.setRequestHeader=function(e,t){this.v.append(e,t)};He.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""};He.getAllResponseHeaders=function(){if(!this.h)return"";const e=[],t=this.h.entries();for(var n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join(`\r
1754`)};function Vg(e){e.onreadystatechange&&e.onreadystatechange.call(e)}Object.defineProperty(hx.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(e){this.m=e?"include":"same-origin"}});var cwe=mt.JSON.parse;function Gn(e){Sr.call(this),this.headers=new Map,this.u=e||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=U3,this.L=this.M=!1}Ir(Gn,Sr);var U3="",dwe=/^https?$/i,fwe=["POST","PUT"];He=Gn.prototype;He.Oa=function(e){this.M=e};He.ha=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+e);t=t?t.toUpperCase():"GET",this.I=e,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():oA.g(),this.C=this.u?tL(this.u):tL(oA),this.g.onreadystatechange=ao(this.La,this);try{this.G=!0,this.g.open(t,String(e),!0),this.G=!1}catch(i){oL(this,i);return}if(e=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var o in r)n.set(o,r[o]);else if(typeof r.keys=="function"&&typeof r.get=="function")for(const i of r.keys())n.set(i,r.get(i));else throw Error("Unknown input type for opt_headers: "+String(r));r=Array.from(n.keys()).find(i=>i.toLowerCase()=="content-type"),o=mt.FormData&&e instanceof mt.FormData,!(0<=i3(fwe,t))||r||o||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[i,s]of n)this.g.setRequestHeader(i,s);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{G3(this),0<this.B&&((this.L=hwe(this.g))?(this.g.timeout=this.B,this.g.ontimeout=ao(this.ua,this)):this.A=iR(this.ua,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(i){oL(this,i)}};function hwe(e){return Ch&&typeof e.timeout=="number"&&e.ontimeout!==void 0}He.ua=function(){typeof KT<"u"&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Nr(this,"timeout"),this.abort(8))};function oL(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,H3(e),px(e)}function H3(e){e.F||(e.F=!0,Nr(e,"complete"),Nr(e,"error"))}He.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,Nr(this,"complete"),Nr(this,"abort"),px(this))};He.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),px(this,!0)),Gn.$.N.call(this)};He.La=function(){this.s||(this.G||this.v||this.l?W3(this):this.kb())};He.kb=function(){W3(this)};function W3(e){if(e.h&&typeof KT<"u"&&(!e.C[1]||ra(e)!=4||e.da()!=2)){if(e.v&&ra(e)==4)iR(e.La,0,e);else if(Nr(e,"readystatechange"),ra(e)==4){e.h=!1;try{const s=e.da();e:switch(s){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}var n;if(!(n=t)){var r;if(r=s===0){var o=String(e.I).match(M3)[1]||null;!o&&mt.self&&mt.self.location&&(o=mt.self.location.protocol.slice(0,-1)),r=!dwe.test(o?o.toLowerCase():"")}n=r}if(n)Nr(e,"complete"),Nr(e,"success");else{e.m=6;try{var i=2<ra(e)?e.g.statusText:""}catch{i=""}e.j=i+" ["+e.da()+"]",H3(e)}}finally{px(e)}}}}function px(e,t){if(e.g){G3(e);const n=e.g,r=e.C[0]?()=>{}:null;e.g=null,e.C=null,t||Nr(e,"ready");try{n.onreadystatechange=r}catch{}}}
vendor: 4,358 bytes, lines 1754-1756
1754function G3(e){e.g&&e.L&&(e.g.ontimeout=null),e.A&&(mt.clearTimeout(e.A),e.A=null)}He.isActive=function(){return!!this.g};function ra(e){return e.g?e.g.readyState:0}He.da=function(){try{return 2<ra(this)?this.g.status:-1}catch{return-1}};He.ja=function(){try{return this.g?this.g.responseText:""}catch{return""}};He.Wa=function(e){if(this.g){var t=this.g.responseText;return e&&t.indexOf(e)==0&&(t=t.substring(e.length)),cwe(t)}};function iL(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.K){case U3:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch{return null}}function pwe(e){const t={};e=(e.g&&2<=ra(e)&&e.g.getAllResponseHeaders()||"").split(`\r
1755`);for(let r=0;r<e.length;r++){if(Og(e[r]))continue;var n=V0e(e[r]);const o=n[0];if(n=n[1],typeof n!="string")continue;n=n.trim();const i=t[o]||[];t[o]=i,i.push(n)}O0e(t,function(r){return r.join(", ")})}He.Ia=function(){return this.m};He.Sa=function(){return typeof this.j=="string"?this.j:String(this.j)};function q3(e){let t="";return XT(e,function(n,r){t+=r,t+=":",t+=n,t+=`\r
1756`}),t}function dR(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=q3(n),typeof e=="string"?n!=null&&encodeURIComponent(String(n)):Cn(e,t,n))}function Np(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function K3(e){this.Ga=0,this.j=[],this.l=new sx,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=Np("failFast",!1,e),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=Np("baseRetryDelayMs",5e3,e),this.hb=Np("retryDelaySeedMs",1e4,e),this.eb=Np("forwardChannelMaxRetries",2,e),this.xa=Np("forwardChannelRequestTimeoutMs",2e4,e),this.va=e&&e.xmlHttpFactory||void 0,this.Ha=e&&e.useFetchStreams||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.i=new L3(e&&e.concurrentRequestLimit),this.Ja=new awe,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=e&&e.bc||!1,e&&e.Ea&&this.l.Ea(),e&&e.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&e&&e.detectBufferingProxy||!1,this.qa=void 0,e&&e.longPollingTimeout&&0<e.longPollingTimeout&&(this.qa=e.longPollingTimeout),this.oa=void 0,this.S=0,this.M=!1,this.ma=this.B=null}He=K3.prototype;He.ra=8;He.H=1;function fR(e){if(Q3(e),e.H==3){var t=e.W++,n=Cl(e.I);if(Cn(n,"SID",e.K),Cn(n,"RID",t),Cn(n,"TYPE","terminate"),Fy(e,n),t=new My(e,e.l,t),t.L=2,t.A=dx(Cl(n)),n=!1,mt.navigator&&mt.navigator.sendBeacon)try{n=mt.navigator.sendBeacon(t.A.toString(),"")}catch{}!n&&mt.Image&&(new Image().src=t.A,n=!0),n||(t.g=rH(t.l,null),t.g.ha(t.A)),t.G=Date.now(),Dy(t)}tH(e)}function mx(e){e.g&&(pR(e),e.g.cancel(),e.g=null)}function Q3(e){mx(e),e.u&&(mt.clearTimeout(e.u),e.u=null),Cw(e),e.i.cancel(),e.m&&(typeof e.m=="number"&&mt.clearTimeout(e.m),e.m=null)}function gx(e){if(!N3(e.i)&&!e.m){e.m=!0;var t=e.Na;Dg||y3(),$g||(Dg(),$g=!0),rR.add(t,e),e.C=0}}function mwe(e,t){return V3(e.i)>=e.i.j-(e.m?1:0)?!1:e.m?(e.j=t.F.concat(e.j),!0):e.H==1||e.H==2||e.C>=(e.cb?0:e.eb)?!1:(e.m=Ry(ao(e.Na,e,t),eH(e,e.C)),e.C++,!0)}He.Na=function(e){if(this.m)if(this.m=null,this.H==1){if(!e){this.W=Math.floor(1e5*Math.random()),e=this.W++;const o=new My(this,this.l,e);let i=this.s;if(this.U&&(i?(i=u3(i),c3(i,this.U)):i=this.U),this.o!==null||this.O||(o.I=i,i=null),this.P)e:{for(var t=0,n=0;n<this.j.length;n++){t:{var r=this.j[n];if("__data__"in r.map&&(r=r.map.__data__,typeof r=="string")){r=r.length;break t}r=void 0}if(r===void 0)break;if(t+=r,4096<t){t=n;break e}if(t===4096||n===this.j.length-1){t=n+1;break e}}t=1e3}else t=1e3;t=Y3(this,o,t),n=Cl(this.I),Cn(n,"RID",e),Cn(n,"CVER",22),this.F&&Cn(n,"X-HTTP-Session-Id",this.F),Fy(this,n),i&&(this.O?t="headers="+encodeURIComponent(String(q3(i)))+"&"+t:this.o&&dR(n,this.o,i)),uR(this.i,o),this.bb&&Cn(n,"TYPE","init"),this.P?(Cn(n,"$req",t),Cn(n,"SID","null"),o.aa=!0,sA(o,n,null)):sA(o,n,t),this.H=2}}else this.H==3&&(e?sL(this,e):this.j.length==0||N3(this.i)||sL(this))};function sL(e,t){var n;t?n=t.m:n=e.W++;const r=Cl(e.I);Cn(r,"SID",e.K),Cn(r,"RID",n),Cn(r,"AID",e.V),Fy(e,r),e.o&&e.s&&dR(r,e.o,e.s),n=new My(e,e.l,n,e.C+1),e.o===null&&(n.I=e.s),t&&(e.j=t.F.concat(e.j)),t=Y3(e,n,1e3),n.setTimeout(
1756Math.round(.5*e.xa)+Math.round(.5*e.xa*Math.random())),uR(e.i,n),sA(n,r,t)}function Fy(e,t){e.na&&XT(e.na,function(n,r){Cn(t,r,n)}),e.h&&O3({},function(n,r){Cn(t,r,n)})}function Y3(e,t,n){n=Math.min(e.j.length,n);var r=e.h?ao(e.h.Va,e.h,e):null;e:{var o=e.j;let i=-1;for(;;){const s=["count="+n];i==-1?0<n?(i=o[0].g,s.push("ofs="+i)):i=0:s.push("ofs="+i);let a=!0;for(let l=0;l<n;l++){let u=o[l].g;const c=o[l].map;if(u-=i,0>u)i=Math.max(0,o[l].g-100),a=!1;else try{lwe(c,s,"req"+u+"_")}catch{r&&r(c)}}if(a){r=s.join("&");break e}}}return e=e.j.splice(0,n),t.F=e,r}function X3(e){if(!e.g&&!e.u){e.ba=1;var t=e.Ma;Dg||y3(),$g||(Dg(),$g=!0),rR.add(t,e),e.A=0}}function hR(e){return e.g||e.u||3<=e.A?!1:(e.ba++,e.u=Ry(ao(e.Ma,e),eH(e,e.A)),e.A++,!0)}He.Ma=function(){if(this.u=null,J3(this),this.ca&&!(this.M||this.g==null||0>=this.S)){var e=2*this.S;this.l.info("BP detection timer enabled: "+e),this.B=Ry(ao(this.jb,this),e)}};He.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,_o(10),mx(this),J3(this))};function pR(e){e.B!=null&&(mt.clearTimeout(e.B),e.B=null)}function J3(e){e.g=new My(e,e.l,"rpc",e.ba),e.o===null&&(e.g.I=e.s),e.g.O=0;var t=Cl(e.wa);Cn(t,"RID","rpc"),Cn(t,"SID",e.K),Cn(t,"AID",e.V),Cn(t,"CI",e.G?"0":"1"),!e.G&&e.qa&&Cn(t,"TO",e.qa),Cn(t,"TYPE","xmlhttp"),Fy(e,t),e.o&&e.s&&dR(t,e.o,e.s),e.L&&e.g.setTimeout(e.L);var n=e.g;e=e.pa,n.L=1,n.A=dx(Cl(t)),n.u=null,n.S=!0,k3(n,e)}He.ib=function(){this.v!=null&&(this.v=null,mx(this),hR(this),_o(19))};function Cw(e){e.v!=null&&(mt.clearTimeout(e.v),e.v=null)}function Z3(e,t){var n=null;if(e.g==t){Cw(e),pR(e),e.g=null;var r=2}else if(lA(e.i,t))n=t.F,B3(e.i,t),r=1;else return;if(e.H!=0){if(t.i)if(r==1){n=t.u?t.u.length:0,t=Date.now()-t.G;var o=e.C;r=ax(),Nr(r,new S3(r,n)),gx(e)}else X3(e);else if(o=t.s,o==3||o==0&&0<t.ca||!(r==1&&mwe(e,t)||r==2&&hR(e)))switch(n&&0<n.length&&(t=e.i,t.i=t.i.concat(n)),o){case 1:wc(e,5);break;case 4:wc(e,10);break;case 3:wc(e,6);break;default:wc(e,2)}}}function eH(e,t){let n=e.ab+Math.floor(Math.random()*e.hb);return e.isActive()||(n*=2),n*t}function wc(e,t){if(e.l.info("Error code "+t),t==2){var n=null;e.h&&(n=null);var r=ao(e.pb,e);n||(n=new Fc("//www.google.com/images/cleardot.gif"),mt.location&&mt.location.protocol=="http"||bw(n,"https"),dx(n)),uwe(n.toString(),r)}else _o(2);e.H=0,e.h&&e.h.za(t),tH(e),Q3(e)}He.pb=function(e){e?(this.l.info("Successfully pinged google.com"),_o(2)):(this.l.info("Failed to ping google.com"),_o(1))};function tH(e){if(e.H=0,e.ma=[],e.h){const t=j3(e.i);(t.length!=0||e.j.length!=0)&&(YF(e.ma,t),YF(e.ma,e.j),e.i.i.length=0,QT(e.j),e.j.length=0),e.h.ya()}}function nH(e,t,n){var r=n instanceof Fc?Cl(n):new Fc(n);if(r.g!="")t&&(r.g=t+"."+r.g),ww(r,r.m);else{var o=mt.location;r=o.protocol,t=t?t+"."+o.hostname:o.hostname,o=+o.port;var i=new Fc(null);r&&bw(i,r),t&&(i.g=t),o&&ww(i,o),n&&(i.l=n),r=i}return n=e.F,t=e.Da,n&&t&&Cn(r,n,t),Cn(r,"VER",e.ra),Fy(e,r),r}function rH(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return t=e.Ha&&!e.va?new Gn(new fx({ob:n})):new Gn(e.va),t.Oa(e.J),t}He.isActive=function(){return!!this.h&&this.h.isActive(this)};function oH(){}He=oH.prototype;He.Ba=function(){};He.Aa=function(){};He.za=function(){};He.ya=function(){};He.isActive=function(){return!0};He.Va=function(){};function xw(){if(Ch&&!(10<=Number(k0e)))throw Error("Environmental error: no available transport.")}xw.prototype.g=function(e,t){return new Ci(e,t)};function Ci(e,t){Sr.call(this),this.g=new K3(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.Ca&&(e?e["X-WebChannel-Client-Profile"]=t.Ca:e={"X-WebChannel-Client-Profile":t.Ca}),this.g.U=e,(e=t&&t.cc)&&!Og(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!Og(t)&&(this.g.F=t,e=this.h,e!==null&&t in e&&(e=this.h,t in e&&delete e[t])),this.j=new np(this)}Ir(Ci,Sr);Ci.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var e=this.g,t=this.l,n=this.h||void 0;_o(0),e.Y=t,e.na=n||{},e.G=e.aa,e.I=nH(e,null,e.Y),gx(e)};Ci.prototype.close=function(){fR(this.g)};Ci.prototype.u=function(e){var t=this.g;if(typeof e=="string"){var n={};n.__data__=e,e=n}else this.v&&(n={},n.__data__=nR(e),e=n);t.j.push(new owe(t.fb++,e)),t.H==3&&gx(t)};Ci.prototype.N=function(){this.g.h=null,delete this.j,fR(this.g),delete this.g,Ci.$.N.call(this)};function iH(e){aR.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(const n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=t!==null&&e in t?t[e]:void 0),this.data=t}else this.data=e}Ir(iH,aR);function sH(){lR.call(this),this.status=1}Ir(sH,lR);function np(e){this.g=e}Ir(np,oH);np.prototype.Ba=function(){Nr(this.g,"a")};np.prototype.Aa=function(e){Nr(this.g,new iH(e))};np.prototype.za=function(e){Nr(this.g,new sH)};np.prototype.ya=function(){Nr(this.g,"b")};function gwe(){this.blockSize=-1}function Ms(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}Ir(Ms,gwe);Ms.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0};function x_(e,t,n){n||(n=0);var r=Array(16);if(typeof t=="string")for(var o=0;16>o;++o)r[o]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(o=0;16>o;++o)r[o]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],o=e.g[2];var i=e.g[3],s=t+(i^n&(o^i))+r[0]+3614090360&4294967295;t=n+(s<<7&4294967295|s>>>
175625),s=i+(o^t&(n^o))+r[1]+3905402710&4294967295,i=t+(s<<12&4294967295|s>>>20),s=o+(n^i&(t^n))+r[2]+606105819&4294967295,o=i+(s<<17&4294967295|s>>>15),s=n+(t^o&(i^t))+r[3]+3250441966&4294967295,n=o+(s<<22&4294967295|s>>>10),s=t+(i^n&(o^i))+r[4]+4118548399&4294967295,t=n+(s<<7&4294967295|s>>>25),s=i+(o^t&(n^o))+r[5]+1200080426&4294967295,i=t+(s<<12&4294967295|s>>>20),s=o+(n^i&(t^n))+r[6]+2821735955&4294967295,o=i+(s<<17&4294967295|s>>>15),s=n+(t^o&(i^t))+r[7]+4249261313&4294967295,n=o+(s<<22&4294967295|s>>>10),s=t+(i^n&(o^i))+r[8]+1770035416&4294967295,t=n+(s<<7&4294967295|s>>>25),s=i+(o^t&(n^o))+r[9]+2336552879&4294967295,i=t+(s<<12&4294967295|s>>>20),s=o+(n^i&(t^n))+r[10]+4294925233&4294967295,o=i+(s<<17&4294967295|s>>>15),s=n+(t^o&(i^t))+r[11]+2304563134&4294967295,n=o+(s<<22&4294967295|s>>>10),s=t+(i^n&(o^i))+r[12]+1804603682&4294967295,t=n+(s<<7&4294967295|s>>>25),s=i+(o^t&(n^o))+r[13]+4254626195&4294967295,i=t+(s<<12&4294967295|s>>>20),s=o+(n^i&(t^n))+r[14]+2792965006&4294967295,o=i+(s<<17&4294967295|s>>>15),s=n+(t^o&(i^t))+r[15]+1236535329&4294967295,n=o+(s<<22&4294967295|s>>>10),s=t+(o^i&(n^o))+r[1]+4129170786&4294967295,t=n+(s<<5&4294967295|s>>>27),s=i+(n^o&(t^n))+r[6]+3225465664&4294967295,i=t+(s<<9&4294967295|s>>>23),s=o+(t^n&(i^t))+r[11]+643717713&4294967295,o=i+(s<<14&4294967295|s>>>18),s=n+(i^t&(o^i))+r[0]+3921069994&4294967295,n=o+(s<<20&4294967295|s>>>12),s=t+(o^i&(n^o))+r[5]+3593408605&4294967295,t=n+(s<<5&4294967295|s>>>27),s=i+(n^o&(t^n))+r[10]+38016083&4294967295,i=t+(s<<9&4294967295|s>>>23),s=o+(t^n&(i^t))+r[15]+3634488961&4294967295,o=i+(s<<14&4294967295|s>>>18),s=n+(i^t&(o^i))+r[4]+3889429448&4294967295,n=o+(s<<20&4294967295|s>>>12),s=t+(o^i&(n^o))+r[9]+568446438&4294967295,t=n+(s<<5&4294967295|s>>>27),s=i+(n^o&(t^n))+r[14]+3275163606&4294967295,i=t+(s<<9&4294967295|s>>>23),s=o+(t^n&(i^t))+r[3]+4107603335&4294967295,o=i+(s<<14&4294967295|s>>>18),s=n+(i^t&(o^i))+r[8]+1163531501&4294967295,n=o+(s<<20&4294967295|s>>>12),s=t+(o^i&(n^o))+r[13]+2850285829&4294967295,t=n+(s<<5&4294967295|s>>>27),s=i+(n^o&(t^n))+r[2]+4243563512&4294967295,i=t+(s<<9&4294967295|s>>>23),s=o+(t^n&(i^t))+r[7]+1735328473&4294967295,o=i+(s<<14&4294967295|s>>>18),s=n+(i^t&(o^i))+r[12]+2368359562&4294967295,n=o+(s<<20&4294967295|s>>>12),s=t+(n^o^i)+r[5]+4294588738&4294967295,t=n+(s<<4&4294967295|s>>>28),s=i+(t^n^o)+r[8]+2272392833&4294967295,i=t+(s<<11&4294967295|s>>>21),s=o+(i^t^n)+r[11]+1839030562&4294967295,o=i+(s<<16&4294967295|s>>>16),s=n+(o^i^t)+r[14]+4259657740&4294967295,n=o+(s<<23&4294967295|s>>>9),s=t+(n^o^i)+r[1]+2763975236&4294967295,t=n+(s<<4&4294967295|s>>>28),s=i+(t^n^o)+r[4]+1272893353&4294967295,i=t+(s<<11&4294967295|s>>>21),s=o+(i^t^n)+r[7]+4139469664&4294967295,o=i+(s<<16&4294967295|s>>>16),s=n+(o^i^t)+r[10]+3200236656&4294967295,n=o+(s<<23&4294967295|s>>>9),s=t+(n^o^i)+r[13]+681279174&4294967295,t=n+(s<<4&4294967295|s>>>28),s=i+(t^n^o)+r[0]+3936430074&4294967295,i=t+(s<<11&4294967295|s>>>21),s=o+(i^t^n)+r[3]+3572445317&4294967295,o=i+(s<<16&4294967295|s>>>16),s=n+(o^i^t)+r[6]+76029189&4294967295,n=o+(s<<23&4294967295|s>>>9),s=t+(n^o^i)+r[9]+3654602809&4294967295,t=n+(s<<4&4294967295|s>>>28),s=i+(t^n^o)+r[12]+3873151461&4294967295,i=t+(s<<11&4294967295|s>>>21),s=o+(i^t^n)+r[15]+530742520&4294967295,o=i+(s<<16&4294967295|s>>>16),s=n+(o^i^t)+r[2]+3299628645&4294967295,n=o+(s<<23&4294967295|s>>>9),s=t+(o^(n|~i))+r[0]+4096336452&4294967295,t=n+(s<<6&4294967295|s>>>26),s=i+(n^(t|~o))+r[7]+1126891415&4294967295,i=t+(s<<10&4294967295|s>>>22),s=o+(t^(i|~n))+r[14]+2878612391&4294967295,o=i+(s<<15&4294967295|s>>>17),s=n+(i^(o|~t))+r[5]+4237533241&4294967295,n=o+(s<<21&4294967295|s>>>11),s=t+(o^(n|~i))+r[12]+1700485571&4294967295,t=n+(s<<6&4294967295|s>>>26),s=i+(n^(t|~o))+r[3]+2399980690&4294967295,i=t+(s<<10&4294967295|s>>>22),s=o+(t^(i|~n))+r[10]+4293915773&4294967295,o=i+(s<<15&4294967295|s>>>17),s=n+(i^(o|~t))+r[1]+2240044497&4294967295,n=o+(s<<21&4294967295|s>>>11),s=t+(o^(n|~i))+r[8]+1873313359&4294967295,t=n+(s<<6&4294967295|s>>>26),s=i+(n^(t|~o))+r[15]+4264355552&4294967295,i=t+(s<<10&4294967295|s>>>22),s=o+(t^(i|~n))+r[6]+2734768916&4294967295,o=i+(s<<15&4294967295|s>>>17),s=n+(i^(o|~t))+r[13]+1309151649&4294967295,n=o+(s<<21&4294967295|s>>>11),s=t+(o^(n|~i))+r[4]+4149444226&4294967295,t=n+(s<<6&4294967295|s>>>
vendor: 5,770 bytes, line 1756
175626),s=i+(n^(t|~o))+r[11]+3174756917&4294967295,i=t+(s<<10&4294967295|s>>>22),s=o+(t^(i|~n))+r[2]+718787259&4294967295,o=i+(s<<15&4294967295|s>>>17),s=n+(i^(o|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(o+(s<<21&4294967295|s>>>11))&4294967295,e.g[2]=e.g[2]+o&4294967295,e.g[3]=e.g[3]+i&4294967295}Ms.prototype.j=function(e,t){t===void 0&&(t=e.length);for(var n=t-this.blockSize,r=this.m,o=this.h,i=0;i<t;){if(o==0)for(;i<=n;)x_(this,e,i),i+=this.blockSize;if(typeof e=="string"){for(;i<t;)if(r[o++]=e.charCodeAt(i++),o==this.blockSize){x_(this,r),o=0;break}}else for(;i<t;)if(r[o++]=e[i++],o==this.blockSize){x_(this,r),o=0;break}}this.h=o,this.i+=t};Ms.prototype.l=function(){var e=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;var n=8*this.i;for(t=e.length-8;t<e.length;++t)e[t]=n&255,n/=256;for(this.j(e),e=Array(16),t=n=0;4>t;++t)for(var r=0;32>r;r+=8)e[n++]=this.g[t]>>>r&255;return e};function on(e,t){this.h=t;for(var n=[],r=!0,o=e.length-1;0<=o;o--){var i=e[o]|0;r&&i==t||(n[o]=i,r=!1)}this.g=n}var ywe={};function mR(e){return-128<=e&&128>e?E0e(e,function(t){return new on([t|0],0>t?-1:0)}):new on([e|0],0>e?-1:0)}function oa(e){if(isNaN(e)||!isFinite(e))return Uf;if(0>e)return Dr(oa(-e));for(var t=[],n=1,r=0;e>=n;r++)t[r]=e/n|0,n*=uA;return new on(t,0)}function aH(e,t){if(e.length==0)throw Error("number format error: empty string");if(t=t||10,2>t||36<t)throw Error("radix out of range: "+t);if(e.charAt(0)=="-")return Dr(aH(e.substring(1),t));if(0<=e.indexOf("-"))throw Error('number format error: interior "-" character');for(var n=oa(Math.pow(t,8)),r=Uf,o=0;o<e.length;o+=8){var i=Math.min(8,e.length-o),s=parseInt(e.substring(o,o+i),t);8>i?(i=oa(Math.pow(t,i)),r=r.R(i).add(oa(s))):(r=r.R(n),r=r.add(oa(s)))}return r}var uA=4294967296,Uf=mR(0),cA=mR(1),aL=mR(16777216);He=on.prototype;He.ea=function(){if(Bi(this))return-Dr(this).ea();for(var e=0,t=1,n=0;n<this.g.length;n++){var r=this.D(n);e+=(0<=r?r:uA+r)*t,t*=uA}return e};He.toString=function(e){if(e=e||10,2>e||36<e)throw Error("radix out of range: "+e);if(rl(this))return"0";if(Bi(this))return"-"+Dr(this).toString(e);for(var t=oa(Math.pow(e,6)),n=this,r="";;){var o=_w(n,t).g;n=Sw(n,o.R(t));var i=((0<n.g.length?n.g[0]:n.h)>>>0).toString(e);if(n=o,rl(n))return i+r;for(;6>i.length;)i="0"+i;r=i+r}};He.D=function(e){return 0>e?0:e<this.g.length?this.g[e]:this.h};function rl(e){if(e.h!=0)return!1;for(var t=0;t<e.g.length;t++)if(e.g[t]!=0)return!1;return!0}function Bi(e){return e.h==-1}He.X=function(e){return e=Sw(this,e),Bi(e)?-1:rl(e)?0:1};function Dr(e){for(var t=e.g.length,n=[],r=0;r<t;r++)n[r]=~e.g[r];return new on(n,~e.h).add(cA)}He.abs=function(){return Bi(this)?Dr(this):this};He.add=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0,o=0;o<=t;o++){var i=r+(this.D(o)&65535)+(e.D(o)&65535),s=(i>>>16)+(this.D(o)>>>16)+(e.D(o)>>>16);r=s>>>16,i&=65535,s&=65535,n[o]=s<<16|i}return new on(n,n[n.length-1]&-2147483648?-1:0)};function Sw(e,t){return e.add(Dr(t))}He.R=function(e){if(rl(this)||rl(e))return Uf;if(Bi(this))return Bi(e)?Dr(this).R(Dr(e)):Dr(Dr(this).R(e));if(Bi(e))return Dr(this.R(Dr(e)));if(0>this.X(aL)&&0>e.X(aL))return oa(this.ea()*e.ea());for(var t=this.g.length+e.g.length,n=[],r=0;r<2*t;r++)n[r]=0;for(r=0;r<this.g.length;r++)for(var o=0;o<e.g.length;o++){var i=this.D(r)>>>16,s=this.D(r)&65535,a=e.D(o)>>>16,l=e.D(o)&65535;n[2*r+2*o]+=s*l,Jv(n,2*r+2*o),n[2*r+2*o+1]+=i*l,Jv(n,2*r+2*o+1),n[2*r+2*o+1]+=s*a,Jv(n,2*r+2*o+1),n[2*r+2*o+2]+=i*a,Jv(n,2*r+2*o+2)}for(r=0;r<t;r++)n[r]=n[2*r+1]<<16|n[2*r];for(r=t;r<2*t;r++)n[r]=0;return new on(n,0)};function Jv(e,t){for(;(e[t]&65535)!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function Vp(e,t){this.g=e,this.h=t}function _w(e,t){if(rl(t))throw Error("division by zero");if(rl(e))return new Vp(Uf,Uf);if(Bi(e))return t=_w(Dr(e),t),new Vp(Dr(t.g),Dr(t.h));if(Bi(t))return t=_w(e,Dr(t)),new Vp(Dr(t.g),t.h);if(30<e.g.length){if(Bi(e)||Bi(t))throw Error("slowDivide_ only works with positive integers.");for(var n=cA,r=t;0>=r.X(e);)n=lL(n),r=lL(r);var o=Vd(n,1),i=Vd(r,1);for(r=Vd(r,2),n=Vd(n,2);!rl(r);){var s=i.add(r);0>=s.X(e)&&(o=o.add(n),i=s),r=Vd(r,1),n=Vd(n,1)}return t=Sw(e,o.R(t)),new Vp(o,t)}for(o=Uf;0<=e.X(t);){for(n=Math.max(1,Math.floor(e.ea()/t.ea())),r=Math.ceil(Math.log(n)/Math.LN2),r=48>=r?1:Math.pow(2,r-48),i=oa(n),s=i.R(t);Bi(s)||0<s.X(e);)n-=r,i=oa(n),s=i.R(t);rl(i)&&(i=cA),o=o.add(i),e=Sw(e,s)}return new Vp(o,e)}He.gb=function(e){return _w(this,e).h};He.and=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)&e.D(r);return new on(n,this.h&e.h)};He.or=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)|e.D(r);return new on(n,this.h|e.h)};He.xor=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)^e.D(r);return new on(n,this.h^e.h)};function lL(e){for(var t=e.g.length+1,n=[],r=0;r<t;r++)n[r]=e.D(r)<<1|e.D(r-1)>>>31;return new on(n,e.h)}function Vd(e,t){var n=t>>5;t%=32;for(var r=e.g.length-n,o=[],i=0;i<r;i++)o[i]=0<t?e.D(i+n)>>>t|e.D(i+n+1)<<32-t:e.D(i+n);return new on(o,e.h)}xw.prototype.createWebChannel=xw.prototype.g;Ci.prototype.send=Ci.prototype.u;Ci.prototype.open=Ci.prototype.m;Ci.prototype.close=Ci.prototype.close;lx.NO_ERROR=0;lx.TIMEOUT=8;lx.HTTP_ERROR=6;_3.COMPLETE="complete";E3.EventType=Oy;Oy.OPEN="a";Oy.CLOSE="b";Oy.ERROR="c";Oy.MESSAGE="d";Sr.prototype.listen=Sr.prototype.O;Gn.prototype.listenOnce=Gn.prototype.P;Gn.prototype.getLastError=Gn.prototype.Sa;Gn.prototype.getLastErrorCode=Gn.prototype.Ia;Gn.prototype.getStatus=Gn.prototype.da;Gn.prototype.getResponseJson=Gn.prototype.Wa;Gn.prototype.getResponseText=Gn.prototype.ja;Gn.prototype.send=Gn.prototype.ha;
1756Gn.prototype.setWithCredentials=Gn.prototype.Oa;Ms.prototype.digest=Ms.prototype.l;Ms.prototype.reset=Ms.prototype.reset;Ms.prototype.update=Ms.prototype.j;on.prototype.add=on.prototype.add;on.prototype.multiply=on.prototype.R;on.prototype.modulo=on.prototype.gb;on.prototype.compare=on.prototype.X;on.prototype.toNumber=on.prototype.ea;on.prototype.toString=on.prototype.toString;on.prototype.getBits=on.prototype.D;on.fromNumber=oa;on.fromString=aH;var vwe=function(){return new xw},bwe=function(){return ax()},S_=lx,wwe=_3,Cwe=xd,uL={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},Zv=E3,xwe=Gn,Swe=Ms,Hf=on;const cL="@firebase/firestore";/**
1757 * @license
1758 * Copyright 2017 Google LLC
1759 *
1760 * Licensed under the Apache License, Version 2.0 (the "License");
1761 * you may not use this file except in compliance with the License.
1762 * You may obtain a copy of the License at
1763 *
1764 *   http://www.apache.org/licenses/LICENSE-2.0
1765 *
1766 * Unless required by applicable law or agreed to in writing, software
1767 * distributed under the License is distributed on an "AS IS" BASIS,
1768 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1769 * See the License for the specific language governing permissions and
1770 * limitations under the License.
1771 */class to{constructor(t){this.uid=t}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}}to.UNAUTHENTICATED=new to(null),to.GOOGLE_CREDENTIALS=new to("google-credentials-uid"),to.FIRST_PARTY=new to("first-party-uid"),to.MOCK_USER=new to("mock-user");/**
1772 * @license
1773 * Copyright 2017 Google LLC
1774 *
1775 * Licensed under the Apache License, Version 2.0 (the "License");
1776 * you may not use this file except in compliance with the License.
1777 * You may obtain a copy of the License at
1778 *
1779 *   http://www.apache.org/licenses/LICENSE-2.0
1780 *
1781 * Unless required by applicable law or agreed to in writing, software
1782 * distributed under the License is distributed on an "AS IS" BASIS,
1783 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1784 * See the License for the specific language governing permissions and
1785 * limitations under the License.
1786 */let rp="10.10.0";/**
1787 * @license
1788 * Copyright 2017 Google LLC
1789 *
1790 * Licensed under the Apache License, Version 2.0 (the "License");
1791 * you may not use this file except in compliance with the License.
1792 * You may obtain a copy of the License at
1793 *
1794 *   http://www.apache.org/licenses/LICENSE-2.0
1795 *
1796 * Unless required by applicable law or agreed to in writing, software
1797 * distributed under the License is distributed on an "AS IS" BASIS,
1798 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1799 * See the License for the specific language governing permissions and
1800 * limitations under the License.
1801 */const ad=new $T("@firebase/firestore");function Bp(){return ad.logLevel}function ze(e,...t){if(ad.logLevel<=Mt.DEBUG){const n=t.map(gR);ad.debug(`Firestore (${rp}): ${e}`,...n)}}function Ia(e,...t){if(ad.logLevel<=Mt.ERROR){const n=t.map(gR);ad.error(`Firestore (${rp}): ${e}`,...n)}}function xh(e,...t){if(ad.logLevel<=Mt.WARN){const n=t.map(gR);ad.warn(`Firestore (${rp}): ${e}`,...n)}}function gR(e){if(typeof e=="string")return e;try{/**
1802* @license
1803* Copyright 2020 Google LLC
1804*
1805* Licensed under the Apache License, Version 2.0 (the "License");
1806* you may not use this file except in compliance with the License.
1807* You may obtain a copy of the License at
1808*
1809*   http://www.apache.org/licenses/LICENSE-2.0
1810*
1811* Unless required by applicable law or agreed to in writing, software
1812* distributed under the License is distributed on an "AS IS" BASIS,
1813* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1814* See the License for the specific language governing permissions and
1815* limitations under the License.
1816*/return function(n){return JSON.stringify(n)}(e)}catch{return e}}/**
1817 * @license
1818 * Copyright 2017 Google LLC
1819 *
1820 * Licensed under the Apache License, Version 2.0 (the "License");
1821 * you may not use this file except in compliance with the License.
1822 * You may obtain a copy of the License at
1823 *
1824 *   http://www.apache.org/licenses/LICENSE-2.0
1825 *
1826 * Unless required by applicable law or agreed to in writing, software
1827 * distributed under the License is distributed on an "AS IS" BASIS,
1828 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1829 * See the License for the specific language governing permissions and
1830 * limitations under the License.
1831 */function ht(e="Unexpected state"){const t=`FIRESTORE (${rp}) INTERNAL ASSERTION FAILED: `+e;throw Ia(t),new Error(t)}function gn(e,t){e||ht()}function wt(e,t){return e}/**
1832 * @license
1833 * Copyright 2017 Google LLC
1834 *
1835 * Licensed under the Apache License, Version 2.0 (the "License");
1836 * you may not use this file except in compliance with the License.
1837 * You may obtain a copy of the License at
1838 *
1839 *   http://www.apache.org/licenses/LICENSE-2.0
1840 *
1841 * Unless required by applicable law or agreed to in writing, software
1842 * distributed under the License is distributed on an "AS IS" BASIS,
1843 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1844 * See the License for the specific language governing permissions and
1845 * limitations under the License.
1846 */const Pe={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 Ge extends $a{constructor(t,n){super(t,n),this.code=t,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
1847 * @license
1848 * Copyright 2017 Google LLC
1849 *
1850 * Licensed under the Apache License, Version 2.0 (the "License");
1851 * you may not use this file except in compliance with the License.
1852 * You may obtain a copy of the License at
1853 *
1854 *   http://www.apache.org/licenses/LICENSE-2.0
1855 *
1856 * Unless required by applicable law or agreed to in writing, software
1857 * distributed under the License is distributed on an "AS IS" BASIS,
1858 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1859 * See the License for the specific language governing permissions and
1860 * limitations under the License.
1861 */class ba{constructor(){this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}}/**
1862 * @license
1863 * Copyright 2017 Google LLC
1864 *
1865 * Licensed under the Apache License, Version 2.0 (the "License");
1866 * you may not use this file except in compliance with the License.
1867 * You may obtain a copy of the License at
1868 *
1869 *   http://www.apache.org/licenses/LICENSE-2.0
1870 *
1871 * Unless required by applicable law or agreed to in writing, software
1872 * distributed under the License is distributed on an "AS IS" BASIS,
1873 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1874 * See the License for the specific language governing permissions and
1875 * limitations under the License.
1876 */class lH{constructor(t,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${t}`)}}class _we{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,n){t.enqueueRetryable(()=>n(to.UNAUTHENTICATED))}shutdown(){}}class Ewe{constructor(t){this.token=t,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(t,n){this.changeListener=n,t.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class Iwe{constructor(t){this.t=t,this.currentUser=to.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,n){let r=this.i;const o=l=>this.i!==r?(r=this.i,n(l)):Promise.resolve();let i=new ba;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new ba,t.enqueueRetryable(()=>o(this.currentUser))};const s=()=>{const l=i;t.enqueueRetryable(async()=>{await l.promise,await o(this.currentUser)})},a=l=>{ze("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(l=>a(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?a(l):(ze("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new ba)}},0),s()}getToken(){const t=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==t?(ze("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(gn(typeof r.accessToken=="string"),new lH(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const t=this.auth&&this.auth.getUid();return gn(t===null||typeof t=="string"),new to(t)}}class Awe{constructor(t,n,r){this.l=t,this.h=n,this.P=r,this.type="FirstParty",this.user=to.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const t=this.T();return t&&this.I.set("Authorization",t),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class kwe{constructor(t,n,r){this.l=t,this.h=n,this.P=r}getToken(){return Promise.resolve(new Awe(this.l,this.h,this.P))}start(t,n){t.enqueueRetryable(()=>n(to.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Pwe{constructor(t){this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Twe{constructor(t){this.A=t,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(t,n){const r=i=>{i.error!=null&&ze("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${i.error.message}`);const s=i.token!==this.R;return this.R=i.token,ze("FirebaseAppCheckTokenProvider",`Received ${s?"new":"existing"} token.`),s?n(i.token):Promise.resolve()};this.o=i=>{t.enqueueRetryable(()=>r(i))};const o=i=>
1876{ze("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=i,this.appCheck.addTokenListener(this.o)};this.A.onInit(i=>o(i)),setTimeout(()=>{if(!this.appCheck){const i=this.A.getImmediate({optional:!0});i?o(i):ze("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then(n=>n?(gn(typeof n.token=="string"),this.R=n.token,new Pwe(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/**
1877 * @license
1878 * Copyright 2020 Google LLC
1879 *
1880 * Licensed under the Apache License, Version 2.0 (the "License");
1881 * you may not use this file except in compliance with the License.
1882 * You may obtain a copy of the License at
1883 *
1884 *   http://www.apache.org/licenses/LICENSE-2.0
1885 *
1886 * Unless required by applicable law or agreed to in writing, software
1887 * distributed under the License is distributed on an "AS IS" BASIS,
1888 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1889 * See the License for the specific language governing permissions and
1890 * limitations under the License.
1891 */function Rwe(e){const t=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&typeof t.getRandomValues=="function")t.getRandomValues(n);else for(let r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}/**
1892 * @license
1893 * Copyright 2017 Google LLC
1894 *
1895 * Licensed under the Apache License, Version 2.0 (the "License");
1896 * you may not use this file except in compliance with the License.
1897 * You may obtain a copy of the License at
1898 *
1899 *   http://www.apache.org/licenses/LICENSE-2.0
1900 *
1901 * Unless required by applicable law or agreed to in writing, software
1902 * distributed under the License is distributed on an "AS IS" BASIS,
1903 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1904 * See the License for the specific language governing permissions and
1905 * limitations under the License.
1906 */class uH{static newId(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/t.length)*t.length;let r="";for(;r.length<20;){const o=Rwe(40);for(let i=0;i<o.length;++i)r.length<20&&o[i]<n&&(r+=t.charAt(o[i]%t.length))}return r}}function Qt(e,t){return e<t?-1:e>t?1:0}function Sh(e,t,n){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}/**
1907 * @license
1908 * Copyright 2017 Google LLC
1909 *
1910 * Licensed under the Apache License, Version 2.0 (the "License");
1911 * you may not use this file except in compliance with the License.
1912 * You may obtain a copy of the License at
1913 *
1914 *   http://www.apache.org/licenses/LICENSE-2.0
1915 *
1916 * Unless required by applicable law or agreed to in writing, software
1917 * distributed under the License is distributed on an "AS IS" BASIS,
1918 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1919 * See the License for the specific language governing permissions and
1920 * limitations under the License.
1921 */class Dn{constructor(t,n){if(this.seconds=t,this.nanoseconds=n,n<0)throw new Ge(Pe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new Ge(Pe.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new Ge(Pe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Ge(Pe.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}static now(){return Dn.fromMillis(Date.now())}static fromDate(t){return Dn.fromMillis(t.getTime())}static fromMillis(t){const n=Math.floor(t/1e3),r=Math.floor(1e6*(t-1e3*n));return new Dn(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(t){return this.seconds===t.seconds?Qt(this.nanoseconds,t.nanoseconds):Qt(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}
vendor: 1,733 bytes, lines 1921-1951
1921}/**
1922 * @license
1923 * Copyright 2017 Google LLC
1924 *
1925 * Licensed under the Apache License, Version 2.0 (the "License");
1926 * you may not use this file except in compliance with the License.
1927 * You may obtain a copy of the License at
1928 *
1929 *   http://www.apache.org/licenses/LICENSE-2.0
1930 *
1931 * Unless required by applicable law or agreed to in writing, software
1932 * distributed under the License is distributed on an "AS IS" BASIS,
1933 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1934 * See the License for the specific language governing permissions and
1935 * limitations under the License.
1936 */class vt{constructor(t){this.timestamp=t}static fromTimestamp(t){return new vt(t)}static min(){return new vt(new Dn(0,0))}static max(){return new vt(new Dn(253402300799,999999999))}compareTo(t){return this.timestamp._compareTo(t.timestamp)}isEqual(t){return this.timestamp.isEqual(t.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/**
1937 * @license
1938 * Copyright 2017 Google LLC
1939 *
1940 * Licensed under the Apache License, Version 2.0 (the "License");
1941 * you may not use this file except in compliance with the License.
1942 * You may obtain a copy of the License at
1943 *
1944 *   http://www.apache.org/licenses/LICENSE-2.0
1945 *
1946 * Unless required by applicable law or agreed to in writing, software
1947 * distributed under the License is distributed on an "AS IS" BASIS,
1948 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1949 * See the License for the specific language governing permissions and
1950 * limitations under the License.
1951 */class Bg{constructor(t,n,r){n===void 0?n=0:n>
1951t.length&&ht(),r===void 0?r=t.length-n:r>t.length-n&&ht(),this.segments=t,this.offset=n,this.len=r}get length(){return this.len}isEqual(t){return Bg.comparator(this,t)===0}child(t){const n=this.segments.slice(this.offset,this.limit());return t instanceof Bg?t.forEach(r=>{n.push(r)}):n.push(t),this.construct(n)}limit(){return this.offset+this.length}popFirst(t){return t=t===void 0?1:t,this.construct(this.segments,this.offset+t,this.length-t)}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(t){return this.segments[this.offset+t]}isEmpty(){return this.length===0}isPrefixOf(t){if(t.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==t.get(n))return!1;return!0}isImmediateParentOf(t){if(this.length+1!==t.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==t.get(n))return!1;return!0}forEach(t){for(let n=this.offset,r=this.limit();n<r;n++)t(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(t,n){const r=Math.min(t.length,n.length);for(let o=0;o<r;o++){const i=t.get(o),s=n.get(o);if(i<s)return-1;if(i>s)return 1}return t.length<n.length?-1:t.length>n.length?1:0}}class xn extends Bg{construct(t,n,r){return new xn(t,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...t){const n=[];for(const r of t){if(r.indexOf("//")>=0)throw new Ge(Pe.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(o=>o.length>0))}return new xn(n)}static emptyPath(){return new xn([])}}const Owe=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class $r extends Bg{construct(t,n,r){return new $r(t,n,r)}static isValidIdentifier(t){return Owe.test(t)}canonicalString(){return this.toArray().map(t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),$r.isValidIdentifier(t)||(t="`"+t+"`"),t)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new $r(["__name__"])}static fromServerFormat(t){const n=[];let r="",o=0;const i=()=>{if(r.length===0)throw new Ge(Pe.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let s=!1;for(;o<t.length;){const a=t[o];if(a==="\\"){if(o+1===t.length)throw new Ge(Pe.INVALID_ARGUMENT,"Path has trailing escape character: "+t);const l=t[o+1];if(l!=="\\"&&l!=="."&&l!=="`")throw new Ge(Pe.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);r+=l,o+=2}else a==="`"?(s=!s,o++):a!=="."||s?(r+=a,o++):(i(),o++)}if(i(),s)throw new Ge(Pe.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new $r(n)}static emptyPath(){return new $r([])}}/**
1952 * @license
1953 * Copyright 2017 Google LLC
1954 *
1955 * Licensed under the Apache License, Version 2.0 (the "License");
1956 * you may not use this file except in compliance with the License.
1957 * You may obtain a copy of the License at
1958 *
1959 *   http://www.apache.org/licenses/LICENSE-2.0
1960 *
1961 * Unless required by applicable law or agreed to in writing, software
1962 * distributed under the License is distributed on an "AS IS" BASIS,
1963 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1964 * See the License for the specific language governing permissions and
1965 * limitations under the License.
1966 */class ct{constructor(t){this.path=t}static fromPath(t){return new ct(xn.fromString(t))}static fromName(t){return new ct(xn.fromString(t).popFirst(5))}static empty(){return new ct(xn.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(t){return t!==null&&xn.comparator(this.path,t.path)===0}toString(){return this.path.toString()}static comparator(t,n){return xn.comparator(t.path,n.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new ct(new xn(t.slice()))}}function Mwe(e,t){const n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,o=vt.fromTimestamp(r===1e9?new Dn(n+1,0):new Dn(n,r));return new Fu(o,ct.empty(),t)}function Dwe(e){return new Fu(e.readTime,e.key,-1)}class Fu{constructor(t,n,r){this.readTime=t,this.documentKey=n,this.largestBatchId=r}static min(){return new Fu(vt.min(),ct.empty(),-1)}static max(){return new Fu(vt.max(),ct.empty(),-1)}}function $we(e,t){let n=e.readTime.compareTo(t.readTime);return n!==0?n:(n=ct.comparator(e.documentKey,t.documentKey),n!==0?n:Qt(e.largestBatchId,t.largestBatchId))}/**
1967 * @license
1968 * Copyright 2020 Google LLC
1969 *
1970 * Licensed under the Apache License, Version 2.0 (the "License");
1971 * you may not use this file except in compliance with the License.
1972 * You may obtain a copy of the License at
1973 *
1974 *   http://www.apache.org/licenses/LICENSE-2.0
1975 *
1976 * Unless required by applicable law or agreed to in writing, software
1977 * distributed under the License is distributed on an "AS IS" BASIS,
1978 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1979 * See the License for the specific language governing permissions and
1980 * limitations under the License.
1981 */const Fwe="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Lwe{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(t){this.onCommittedListeners.push(t)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(t=>t())}}/**
1982 * @license
1983 * Copyright 2017 Google LLC
1984 *
1985 * Licensed under the Apache License, Version 2.0 (the "License");
1986 * you may not use this file except in compliance with the License.
1987 * You may obtain a copy of the License at
1988 *
1989 *   http://www.apache.org/licenses/LICENSE-2.0
1990 *
1991 * Unless required by applicable law or agreed to in writing, software
1992 * distributed under the License is distributed on an "AS IS" BASIS,
1993 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1994 * See the License for the specific language governing permissions and
1995 * limitations under the License.
1996 */async function Ly(e){if(e.code!==Pe.FAILED_PRECONDITION||e.message!==Fwe)throw e;ze("LocalStore","Unexpectedly lost primary lease")}/**
1997 * @license
1998 * Copyright 2017 Google LLC
1999 *
2000 * Licensed under the Apache License, Version 2.0 (the "License");
2001 * you may not use this file except in compliance with the License.
2002 * You may obtain a copy of the License at
2003 *
2004 *   http://www.apache.org/licenses/LICENSE-2.0
2005 *
2006 * Unless required by applicable law or agreed to in writing, software
2007 * distributed under the License is distributed on an "AS IS" BASIS,
2008 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2009 * See the License for the specific language governing permissions and
2010 * limitations under the License.
2011 */class Oe{constructor(t){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(t){return this.next(void 0,t)}next(t,n){return this.callbackAttached&&ht(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new Oe((r,o)=>{this.nextCallback=i=>{this.wrapSuccess(t,i).next(r,o)},this.catchCallback=i=>{this.wrapFailure(n,i).next(r,o)}})}toPromise(){return new Promise((t,n)=>{this.next(t,n)})}wrapUserFunction(t){try{const n=t();return n instanceof Oe?n:Oe.resolve(n)}catch(n){return Oe.reject(n)}}wrapSuccess(t,n){return t?this.wrapUserFunction(()=>t(n)):Oe.resolve(n)}wrapFailure(t,n){return t?this.wrapUserFunction(()=>t(n)):Oe.reject(n)}static resolve(t){return new Oe((n,r)=>{n(t)})}static reject(t){return new Oe((n,r)=>{r(t)})}static waitFor(t){return new Oe((n,r)=>{let o=0,i=0,s=!1;t.forEach(a=>{++o,a.next(()=>{++i,s&&i===o&&n()},l=>r(l))}),s=!0,i===o&&n()})}static or(t){let n=Oe.resolve(!1);for(const r of t)n=n.next(o=>o?Oe.resolve(o):r());return n}static forEach(t,n){const r=[];return t.forEach((o,i)=>{r.push(n.call(this,o,i))}),this.waitFor(r)}static mapArray(t,n){return new Oe((r,o)=>{const i=t.length,s=new Array(i);let a=0;for(let l=0;l<i;l++){const u=l;n(t[u]).next(c=>{s[u]=c,++a,a===i&&r(s)},c=>o(c))}})}static doWhile(t,n){return new Oe((r,o)=>{const i=()=>{t()===!0?n().next(()=>{i()},o):r()};i()})}}/**
2012 * @license
2013 * Copyright 2017 Google LLC
2014 *
2015 * Licensed under the Apache License, Version 2.0 (the "License");
2016 * you may not use this file except in compliance with the License.
2017 * You may obtain a copy of the License at
2018 *
2019 *   http://www.apache.org/licenses/LICENSE-2.0
2020 *
2021 * Unless required by applicable law or agreed to in writing, softw
2021are
2022 * distributed under the License is distributed on an "AS IS" BASIS,
2023 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2024 * See the License for the specific language governing permissions and
2025 * limitations under the License.
2026 */class yR{constructor(t,n){this.action=t,this.transaction=n,this.aborted=!1,this.V=new ba,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{n.error?this.V.reject(new Vm(t,n.error)):this.V.resolve()},this.transaction.onerror=r=>{const o=vR(r.target.error);this.V.reject(new Vm(t,o))}}static open(t,n,r,o){try{return new yR(n,t.transaction(o,r))}catch(i){throw new Vm(n,i)}}get m(){return this.V.promise}abort(t){t&&this.V.reject(t),this.aborted||(ze("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){const t=this.transaction;this.aborted||typeof t.commit!="function"||t.commit()}store(t){const n=this.transaction.objectStore(t);return new Vwe(n)}}class Cc{constructor(t,n,r){this.name=t,this.version=n,this.p=r,Cc.S(ur())===12.2&&Ia("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(t){return ze("SimpleDb","Removing database:",t),uc(window.indexedDB.deleteDatabase(t)).toPromise()}static D(){if(!v6())return!1;if(Cc.C())return!0;const t=ur(),n=Cc.S(t),r=0<n&&n<10,o=Cc.v(t),i=0<o&&o<4.5;return!(t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||i)}static C(){var t;return typeof process<"u"&&((t=process.__PRIVATE_env)===null||t===void 0?void 0:t.F)==="YES"}static M(t,n){return t.store(n)}static S(t){const n=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),r=n?n[1].split("_").slice(0,2).join("."):"-1";return Number(r)}static v(t){const n=t.match(/Android ([\d.]+)/i),r=n?n[1].split(".").slice(0,2).join("."):"-1";return Number(r)}async O(t){return this.db||(ze("SimpleDb","Opening database:",this.name),this.db=await new Promise((n,r)=>{const o=indexedDB.open(this.name,this.version);o.onsuccess=i=>{const s=i.target.result;n(s)},o.onblocked=()=>{r(new Vm(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},o.onerror=i=>{const s=i.target.error;s.name==="VersionError"?r(new Ge(Pe.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):s.name==="InvalidStateError"?r(new Ge(Pe.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+s)):r(new Vm(t,s))},o.onupgradeneeded=i=>{ze("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',i.oldVersion);const s=i.target.result;this.p.N(s,o.transaction,i.oldVersion,this.version).next(()=>{ze("SimpleDb","Database upgrade to version "+this.version+" complete")})}})),this.L&&(this.db.onversionchange=n=>this.L(n)),this.db}B(t){this.L=t,this.db&&(this.db.onversionchange=n=>t(n))}async runTransaction(t,n,r,o){const i=n==="readonly";let s=0;for(;;){++s;try{this.db=await this.O(t);const a=yR.open(this.db,t,i?"readonly":"readwrite",r),l=o(a).next(u=>(a.g(),u)).catch(u=>(a.abort(u),Oe.reject(u))).toPromise();return l.catch(()=>{}),await a.m,l}catch(a){const l=a,u=l.name!=="FirebaseError"&&s<3;if(ze("SimpleDb","Transaction failed with error:",l.message,"Retrying:",u),this.close(),!u)return Promise.reject(l)}}}close(){this.db&&this.db.close(),this.db=void 0}}class Nwe{constructor(t){this.k=t,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(t){this.k=t}done(){this.q=!0}U(t){this.K=t}delete(){return uc(this.k.delete())}}class Vm extends Ge{constructor(t,n){super(Pe.UNAVAILABLE,`IndexedDB transaction '${t}' failed: ${n}`),this.name="IndexedDbTransactionError"}}function Ny(e){return e.name==="IndexedDbTransactionError"}class Vwe{constructor(t){this.store=t}put(t,n){let r;return n!==void 0?(ze("SimpleDb","PUT",this.store.name,t,n),r=this.store.put(n,t)):(ze("SimpleDb","PUT",this.store.name,"<auto-key>",t),r=this.store.put(t)),uc(r)}add(t){return ze("SimpleDb","ADD",this.store.name,t,t),uc(this.store.add(t))}get(t){return uc(this.store.get(t)).next(n=>(n===void 0&&(n=null),ze("SimpleDb","GET",this.store.name,t,n),n))}delete(t){return ze("SimpleDb","DELETE",this.store.name,t),uc(this.store.delete(t))}count(){return ze("SimpleDb","COUNT",this.store.name),uc(this.store.count())}W(t,n){const r=this.options(t,n),o=r.index?this.store.index(r.index):this.store;if(typeof o.getAll=="function"){const i=o.getAll(r.range);return new Oe((s,a)=>{i.onerror=l=>{a(l.target.error)},i.onsuccess=l=>{s(l.target.result)}})}{const i=this.cursor(r),s=[];return this.G(i,(a,l)=>{s.push(l)}).next(()=>s)}}j(t,n){const r=this.store.getAll(t,n===null?void 0:n);return new Oe((o,i)=>{r.onerror=s=>{i(s.target.error)},r.onsuccess=s=>{o(s.target.result)}})}H(t,n){ze("SimpleDb","DELETE ALL",this.store.name);const r=this.options(t,n);r.J=!1;const o=this.cursor(r);return this.G(o,(i,s,a)=>a.delete())}Y(t,n){let r;n?r=t:(r={},n=t);const o=this.cursor(r);return this.G(o,n)}Z(t){const n=this.cursor({});return new Oe((r,o)=>{n.onerror=i=>{const s=vR(i.target.error);o(s)},n.onsuccess=i=>{const s=i.target.result;s?t(s.primaryKey,s.value).next(a=>{a?s.continue():r()}):r()}})}G(t,n){const r=[];return new Oe((o,i)=>{t.onerror=s=>{i(s.target.error)},t.onsuccess=s=>{const a=s.target.result;if(!a)return void o();const l=new Nwe(a),u=n(a.primaryKey,a.value,l);if(u instanceof Oe){const c=u.catch(d=>(l.done(),Oe.reject(d)));r.push(c)}l.isDone?o():l.$===null?a.continue():a.continue(l.$)}}).next(()=>Oe.waitFor(r))}options(t,n){let r;return t!==void 0&&(typeof t=="string"?r=t:n=t),{index:r,range:n}}cursor(t){let n="next";if(t.reverse&&(n="prev"),t.index){const r=this.store.index(t.index);return t.J?r.openKeyCursor(t.range,n):r.openCursor(t.range,n)}return this.store.openCursor(t.range,n)}}function uc(e){return new Oe((t,n)=>{e.onsuccess=r=>{const o=r.target.result;t(o)},e.onerror=r=>{const o=vR(r.target.error);n(o)}})}let dL=!1;function vR(e){const t=Cc.S(ur());if(t>=12.2&&t<13){const n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){const r=new Ge("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${n}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return dL||(dL=!0,setTimeout(()=>{throw r},0)),r}}return e}/**
2027 * @license
2028 * Copyright 2018 Google LLC
2029 *
2030 * Licensed under the Apache License, Version 2.0 (the "License");
2031 * you may not use this file except in compliance with the License.
2032 * You may obtain a copy of the License at
2033 *
2034 *   http://www.apache.org/licenses/LICENSE-2.0
2035 *
2036 * Unless required by applicable law or agreed to in writing, software
2037 * distributed under the License is distributed on an "AS IS" BASIS,
2038 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2039 * See the License for the specific language governing permissions and
2040 * limitations under the License.
2041 */class bR{constructor(t,n){this.previousValue=t,n&&(n.sequenceNumberHandler=r=>this.se(r),this.oe=r=>n.writeSequenceNumber(r))}se(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue}next(){const t=++this.previousValue;return this.oe&&this.oe(t),t}}bR._e=-1;function yx(e){return e==null}function Ew(e){return e===0&&1/e==-1/0}function Bwe(e){return typeof e=="number"&&Number.isInteger(e)&&!Ew(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}/**
2042 * @license
2043 * Copyright 2017 Google LLC
2044 *
2045 * Licensed under the Apache License, Version 2.0 (the "License");
2046 * you may not use this file except in compliance with the License.
2047 * You may obtain a copy of the License at
2048 *
2049 *   http://www.apache.org/licenses/LICENSE-2.0
2050 *
2051 * Unless required by applicable law or agreed to in writing, software
2052 * distributed under the License is distributed on an "AS IS" BASIS,
2053 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2054 * See the License for the specific language governing permissions and
2055 * limitations under the License.
2056 */function fL(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Sd(e,t){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function cH(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}/**
2057 * @license
2058 * Copyright 2017 Google LLC
2059 *
2060 * Licensed under the Apache License, Version 2.0 (the "License");
2061 * you may not use this file except in compliance with the License.
2062 * You may obtain a copy of the License at
2063 *
2064 *   http://www.apache.org/licenses/LICENSE-2.0
2065 *
2066 * Unless required by applicable law or agreed to in writing, software
2067 * distributed under the License is distributed on an "AS IS" BASIS,
2068 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2069 * See the License for the specific language governing permissions and
2070 * limitations under the License.
2071 */class Ln{constructor(t,n){this.comparator=t,this.root=n||Or.EMPTY}insert(t,n){return new Ln(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,Or.BLACK,null,null))}remove(t){return new Ln(this.comparator,this.root.remove(t,this.comparator).copy(null,null,Or.BLACK,null,null))}get(t){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(t,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(t){let n=0,r=this.root;for(;!r.isEmpty();){const o=this.comparator(t,r.key);if(o===0)return n+r.left.size;o<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(t){return this.root.inorderTraversal(t)}forEach(t){this.inorderTraversal((n,r)=>(t(n,r),!1))}toString(){const t=[];return this.inorderTraversal((n,r)=>(t.push(`${n}:${r}`),!1)),`{${t.join(", ")}}`}reverseTraversal(t){return this.root.reverseTraversal(t)}getIterator(){return new eb(this.root,null,this.comparator,!1)}getIteratorFrom(t){return new eb(this.root,t,this.comparator,!1)}getReverseIterator(){return new eb(this.root,null,this.comparator,!0)}getReverseIteratorFrom(t){return new eb(this.root,t,this.comparator,!0)}}class eb{constructor(t,n,r,o){this.isReverse=o,this.nodeStack=[];let i=1;for(;!t.isEmpty();)if(i=n?r(t.key,n):1,n&&o&&(i*=-1),i<0)t=this.isReverse?t.left:t.right;else{if(i===0){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}getNext(){let t=this.nodeStack.pop();const n={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}}}class Or{constructor(t,n,r,o,i){this.key=t,this.value=n,this.color=r??Or.RED,this.left=o??Or.EMPTY,this.right=i??Or.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,n,r,o,i){return new Or(t??this.key,n??this.value,r??this.color,o??this.left,i??this.right)}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}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(t,n,r){let o=this;const i=r(t,o.key);return o=i<0?o.copy(null,null,null,o.left.insert(t,n,r),null):i===0?o.copy(null,n,null,null,null):o.copy(null,null,null,null,o.right.insert(t,n,r)),o.fixUp()}removeMin(){if(this.left.isEmpty())return Or.EMPTY;let t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()}remove(t,n){let r,o=this;if(n(t,o.key)<0)o.left.isEmpty()||o.left.isRed()||o.left.left.isRed()||(o=o.moveRedLeft()),o=o.copy(null,null,null,o.left.remove(t,n),null);else{if(o.left.isRed()&&(o=o.rotateRight()),o.right.isEmpty()||o.right.isRed()||o.r
2071ight.left.isRed()||(o=o.moveRedRight()),n(t,o.key)===0){if(o.right.isEmpty())return Or.EMPTY;r=o.right.min(),o=o.copy(r.key,r.value,null,null,o.right.removeMin())}o=o.copy(null,null,null,null,o.right.remove(t,n))}return o.fixUp()}isRed(){return this.color}fixUp(){let t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t}moveRedLeft(){let t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t}moveRedRight(){let t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t}rotateLeft(){const t=this.copy(null,null,Or.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){const t=this.copy(null,null,Or.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){const t=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,n)}checkMaxDepth(){const t=this.check();return Math.pow(2,t)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw ht();const t=this.left.check();if(t!==this.right.check())throw ht();return t+(this.isRed()?0:1)}}Or.EMPTY=null,Or.RED=!0,Or.BLACK=!1;Or.EMPTY=new class{constructor(){this.size=0}get key(){throw ht()}get value(){throw ht()}get color(){throw ht()}get left(){throw ht()}get right(){throw ht()}copy(t,n,r,o,i){return this}insert(t,n,r){return new Or(t,n)}remove(t,n){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/**
2072 * @license
2073 * Copyright 2017 Google LLC
2074 *
2075 * Licensed under the Apache License, Version 2.0 (the "License");
2076 * you may not use this file except in compliance with the License.
2077 * You may obtain a copy of the License at
2078 *
2079 *   http://www.apache.org/licenses/LICENSE-2.0
2080 *
2081 * Unless required by applicable law or agreed to in writing, software
2082 * distributed under the License is distributed on an "AS IS" BASIS,
2083 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2084 * See the License for the specific language governing permissions and
2085 * limitations under the License.
2086 */class Vr{constructor(t){this.comparator=t,this.data=new Ln(this.comparator)}has(t){return this.data.get(t)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(t){return this.data.indexOf(t)}forEach(t){this.data.inorderTraversal((n,r)=>(t(n),!1))}forEachInRange(t,n){const r=this.data.getIteratorFrom(t[0]);for(;r.hasNext();){const o=r.getNext();if(this.comparator(o.key,t[1])>=0)return;n(o.key)}}forEachWhile(t,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!t(r.getNext().key))return}firstAfterOrEqual(t){const n=this.data.getIteratorFrom(t);return n.hasNext()?n.getNext().key:null}getIterator(){return new hL(this.data.getIterator())}getIteratorFrom(t){return new hL(this.data.getIteratorFrom(t))}add(t){return this.copy(this.data.remove(t).insert(t,!0))}delete(t){return this.has(t)?this.copy(this.data.remove(t)):this}isEmpty(){return this.data.isEmpty()}unionWith(t){let n=this;return n.size<t.size&&(n=t,t=this),t.forEach(r=>{n=n.add(r)}),n}isEqual(t){if(!(t instanceof Vr)||this.size!==t.size)return!1;const n=this.data.getIterator(),r=t.data.getIterator();for(;n.hasNext();){const o=n.getNext().key,i=r.getNext().key;if(this.comparator(o,i)!==0)return!1}return!0}toArray(){const t=[];return this.forEach(n=>{t.push(n)}),t}toString(){const t=[];return this.forEach(n=>t.push(n)),"SortedSet("+t.toString()+")"}copy(t){const n=new Vr(this.comparator);return n.data=t,n}}class hL{constructor(t){this.iter=t}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/**
2087 * @license
2088 * Copyright 2020 Google LLC
2089 *
2090 * Licensed under the Apache License, Version 2.0 (the "License");
2091 * you may not use this file except in compliance with the License.
2092 * You may obtain a copy of the License at
2093 *
2094 *   http://www.apache.org/licenses/LICENSE-2.0
2095 *
2096 * Unless required by applicable law or agreed to in writing, software
2097 * distributed under the License is distributed on an "AS IS" BASIS,
2098 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2099 * See the License for the specific language governing permissions and
2100 * limitations under the License.
2101 */class li{constructor(t){this.fields=t,t.sort($r.comparator)}static empty(){return new li([])}unionWith(t){let n=new Vr($r.comparator);for(const r of this.fields)n=n.add(r);for(const r of t)n=n.add(r);return new li(n.toArray())}covers(t){for(const n of this.fields)if(n.isPrefixOf(t))return!0;return!1}isEqual(t){return Sh(this.fields,t.fields,(n,r)=>n.isEqual(r))}}/**
2102 * @license
2103 * Copyright 2023 Google LLC
2104 *
2105 * Licensed under the Apache License, Version 2.0 (the "License");
2106 * you may not use this file except in compliance with the License.
2107 * You may obtain a copy of the License at
2108 *
2109 *   http://www.apache.org/licenses/LICENSE-2.0
2110 *
2111 * Unless required by applicable law or agreed to in writing, software
2112 * distributed under the License is distributed on an "AS IS" BASIS,
2113 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2114 * See the License for the specific language governing permissions and
2115 * limitations under the License.
2116 */class dH extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
2117 * @license
2118 * Copyright 2020 Google LLC
2119 *
2120 * Licensed under the Apache License, Version 2.0 (the "License");
2121 * you may not use this file except in compliance with the License.
2122 * You may obtain a copy of the License at
2123 *
2124 *   http://www.apache.org/licenses/LICENSE-2.0
2125 *
2126 * Unless required by applicable law or agreed to in writing, software
2127 * distributed under the License is distributed on an "AS IS" BASIS,
2128 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2129 * See the License for the specific language governing permissions and
2130 * limitations under the License.
2131 */class ho{constructor(t){this.binaryString=t}static fromBase64String(t){const n=function(o){try{return atob(o)}catch(i){throw typeof DOMException<"u"&&i instanceof DOMException?new dH("Invalid base64 string: "+i):i}}(t);return new ho(n)}static fromUint8Array(t){const n=function(o){let i="";for(let s=0;s<o.length;++s)i+=String.fromCharCode(o[s]);return i}(t);return new ho(n)}[Symbol.iterator](){let t=0;return{next:()=>t<this.binaryString.length?{value:this.binaryString.charCodeAt(t++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(n){return btoa(n)}(this.binaryString)}toUint8Array(){return function(n){const r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(t){return Qt(this.binaryString,t.binaryString)}isEqual(t){return this.binaryString===t.binaryString}}ho.EMPTY_BYTE_STRING=new ho("");const jwe=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Lu(e){if(gn(!!e),typeof e=="string"){let t=0;const n=jwe.exec(e);if(gn(!!n),n[1]){let o=n[1];o=(o+"000000000").substr(0,9),t=Number(o)}const r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:ir(e.seconds),nanos:ir(e.nanos)}}function ir(e){return typeof e=="number"?e:typeof e=="string"?Number(e):0}function ld(e){return typeof e=="string"?ho.fromBase64String(e):ho.fromUint8Array(e)}/**
2132 * @license
2133 * Copyright 2020 Google LLC
2134 *
2135 * Licensed under the Apache License, Version 2.0 (the "License");
2136 * you may not use this file except in compliance with the License.
2137 * You may obtain a copy of the License at
2138 *
2139 *   http://www.apache.org/licenses/LICENSE-2.0
2140 *
2141 * Unless required by applicable law or agreed to in writing, software
2142 * distributed under the License is distributed on an "AS IS" BASIS,
2143 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2144 * See the License for the specific language governing permissions and
2145 * limitations under the License.
2146 */function wR(e){var t,n;return((n=(((t=e==null?void 0:e.mapValue)===null||t===void 0?void 0:t.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="server_timestamp"}function CR(e){const t=e.mapValue.fields.__previous_value__;return wR(t)?CR(t):t}function jg(e){const t=Lu(e.mapValue.fields.__local_write_time__.timestampValue);return new Dn(t.seconds,t.nanos)}/**
2147 * @license
2148 * Copyright 2017 Google LLC
2149 *
2150 * Licensed under the Apache License, Version 2.0 (the "License");
2151 * you may not use this file except in compliance with the License.
2152 * You may obtain a copy of the License at
2153 *
2154 *   http://www.apache.org/licenses/LICENSE-2.0
2155 *
2156 * Unless required by applicable law or agreed to in writing, software
2157 * distributed under the License is distributed on an "AS IS" BASIS,
2158 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2159 * See the License for the specific language governing permissions and
2160 * limitations under the License.
2161 */class zwe{constructor(t,n,r,o,i,s,a,l,u){this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=o,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=a,this.longPollingOptions=l,this.useFetchStreams=u}}class zg{constructor(t,n){this.projectId=t,this.database=n||"(default)"}static empty(){return new zg("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(t){return t instanceof zg&&t.projectId===this.projectId&&t.database===this.database}}/**
2162 * @license
2163 * Copyright 2020 Google LLC
2164 *
2165 * Licensed under the Apache License, Version 2.0 (the "License");
2166 * you may not use this file except in compliance with the License.
2167 * You may obtain a copy of the License at
2168 *
2169 *   http://www.apache.org/licenses/LICENSE-2.0
2170 *
2171 * Unless required by applicable law or agreed to in writing, software
2172 * distributed under the License is distributed on an "AS IS" BASIS,
2173 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2174 * See the License for the specific language governing permissions and
2175 * limitations under the License.
2176 */const tb={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function ud(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?wR(e)?4:Uwe(e)?9007199254740991:10:ht()}function Aa(e,t){if(e===t)return!0;const n=ud(e);if(n!==ud(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return jg(e).isEqual(jg(t));case 3:return function(o,i){if(typeof o.timestampValue=="string"&&typeof i.timestampValue=="string"&&o.timestampValue.length===i.timestampValue.length)return o.timestampValue===i.timestampValue;const s=Lu(o.timestampValue),a=Lu(i.timestampValue);return s.seconds===a.seconds&&s.nanos===a.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(o,i){return ld(o.bytesValue).isEqual(ld(i.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(o,i){return ir(o.geoPointValue.latitude)===ir(i.geoPointValue.latitude)&&ir(o.geoPointValue.longitude)===ir(i.geoPointValue.longitude)}(e,t);case 2:return function(o,i){if("integerValue"in o&&"integerValue"in i)return ir(o.integerValue)===ir(i.integerValue);if("doubleValue"in o&&"doubleValue"in i){const s=ir(o.doubleValue),a=ir(i.doubleValue);return s===a?Ew(s)===Ew(a):isNaN(s)&&isNaN(a)}return!1}(e,t);case 9:return Sh(e.arrayValue.values||[],t.arrayValue.values||[],Aa);case 10:return function(o,i){const s=o.mapValue.fields||{},a=i.mapValue.fields||{};if(fL(s)!==fL(a))return!1;for(const l in s)if(s.hasOwnProperty(l)&&(a[l]===void 0||!Aa(s[l],a[l])))return!1;return!0}(e,t);default:return ht()}}function Ug(e,t){return(e.values||[]).find(n=>Aa(n,t))!==void 0}function _h(e,t){if(e===t)return 0;const n=ud(e),r=ud(t);if(n!==r)return Qt(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Qt(e.booleanValue,t.booleanValue);case 2:return function(i,s){const a=ir(i.integerValue||i.doubleValue),l=ir(s.integerValue||s.doubleValue);return a<l?-1:a>l?1:a===l?0:isNaN(a)?isNaN(l)?0:-1:1}(e,t);case 3:return pL(e.timestampValue,t.timestampValue);case 4:return pL(jg(e),jg(t));case 5:return Qt(e.stringValue,t.stringValue);case 6:return function(i,s){const a=ld(i),l=ld(s);return a.compareTo(l)}(e.bytesValue,t.bytesValue);case 7:return function(i,s){const a=i.split("/"),l=s.split("/");for(let u=0;u<a.length&&u<l.length;u++){const c=Qt(a[u],l[u]);if(c!==0)return c}return Qt(a.length,l.length)}(e.referenceValue,t.referenceValue);case 8:return function(i,s){const a=Qt(ir(i.latitude),ir(s.latitude));return a!==0?a:Qt(ir(i.longitude),ir(s.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(i,s){const a=i.values||[],l=s.values||[];for(let u=0;u<a.length&&u<l.length;++u){const c=_h(a[u],l[u]);if(c)return c}return Qt(a.length,l.length)}(e.arrayValue,t.arrayValue);case 10:return function(i,s){if(i===tb.mapValue&&s===tb.mapValue)return 0;if(i===tb.mapValue)return 1;if(s===tb.mapValue)return-1;const a=i.fields||{},l=Object.keys(a),u=s.fields||{},c=Object.keys(u);l.sort(),c.sort();for(let d=0;d<l.length&&d<c.length;++d){const f=Qt(l[d],c[d]);if(f!==0)return f;const h=_h(a[l[d]],u[c[d]]);if(h!==0)return h}return Qt(l.length,c.length)}(e.mapValue,t.mapValue);default:throw ht()}}function pL(e,t){if(typeof e=="string"&&typeof t=="string"&&e.length===t.length)return Qt(e,t);const n=Lu(e),r=Lu(t),o=Qt(n.seconds,r.seconds);return o!==0?o:Qt(n.nanos,r.nanos)}function Eh(e){return dA(e)}function dA(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(n){const r=Lu(n);return`time(${r.seconds},${r.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?function(n){return ld(n).toBase64()}(e.bytesValue):"referenceValue"in e?function(n){return ct.fromName(n).toString()}(e.referenceValue):"geoPointValue"in e?function(n){return`geo(${n.latitude},${n.longitude})`}(e.geoPointValue):"arrayValue"in e?function(n){let r="[",o=!0;for(const i of n.values||[])o?o=!1:r+=",",r+=dA(i);return r+"]"}(e.arrayValue):"mapValue"in e?function(n){const r=Object.keys(n.fields||{}).sort();let o="{",i=!0;for(const s of r)i?i=!1:o+=",",o+=`${s}:${dA(n.fields[s])}`;return o+"}"}(e.mapValue):ht()}function mL(e,t){return{referenceValue:`projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`}}function fA(e){return!!e&&"integerValue"in e}function xR(e){return!!e&&"arrayValue"in e}function gL(e){return!!e&&"nullValue"in e}function yL(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function Wb(e){return!!e&&"mapValue"in e}function Bm(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&typeof e.timestampValue=="object")return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){const t={mapValue:{fields:{}}};return Sd(e.mapValue.fields,(n,r)=>t.mapValue.fields[n]=Bm(r)),t}if(e.arrayValue){const t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=Bm(e.arrayValue.values[n]);return t}return Object.assign({},e)}function Uwe(e){return(((e.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/**
2177 * @license
2178 * Copyright 2017 Google LLC
2179 *
2180 * Licensed under the Apache License, Version 2.0 (the "License");
2181 * you may not use this file except in compliance with the License.
2182 * You may obtain a copy of the License at
2183 *
2184 *   http://www.apache.org/licenses/LICENSE-2.0
2185 *
2186 * Unless required by applicable law or agreed to in writing, software
2187 * distributed under the License is distributed on an "AS IS" BASIS,
2188 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2189 * See the License for the specific language governing permissions and
2190 * limitations under the License.
2191 */class Bo{constructor(t){this.value=t}static empty(){return new Bo({mapValue:{}})}field(t){if(t.isEmpty())return this.value;{let n=this.value;for(let r=0;r<t.length-1;++r)if(n=(n.mapValue.fields||{})[t.get(r)],!Wb(n))return null;return n=(n.mapValue.fields||{})[t.lastSegment()],n||null}}set(t,n){this.getFieldsMap(t.popLast())[t.lastSegment()]=Bm(n)}setAll(t){let n=$r.emptyPath(),r={},o=[];t.forEach((s,a)=>{if(!n.isImmediateParentOf(a)){const l=this.getFieldsMap(n);this.applyChanges(l,r,o),r={},o=[],n=a.popLast()}s?r[a.lastSegment()]=Bm(s):o.push(a.lastSegment())});const i=this.getFieldsMap(n);this.applyChanges(i,r,o)}delete(t){const n=this.field(t.popLast());Wb(n)&&n.mapValue.fields&&delete n.mapValue.fields[t.lastSegment()]}isEqual(t){return Aa(this.value,t.value)}getFieldsMap(t){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;r<t.length;++r){let o=n.mapValue.fields[t.get(r)];Wb(o)&&o.mapValue.fields||(o={mapValue:{fields:{}}},n.mapValue.fields[t.get(r)]=o),n=o}return n.mapValue.fields}applyChanges(t,n,r){Sd(n,(o,i)=>t[o]=i);for(const o of r)delete t[o]}clone(){return new Bo(Bm(this.value))}}function fH(e){const t=[];return Sd(e.fields,(n,r)=>{const o=new $r([n]);if(Wb(r)){const i=fH(r.mapValue).fields;if(i.length===0)t.push(o);else for(const s of i)t.push(o.child(s))}else t.push(o)}),new li(t)}/**
2192 * @license
2193 * Copyright 2017 Google LLC
2194 *
2195 * Licensed under the Apache License, Version 2.0 (the "License");
2196 * you may not use this file except in compliance with the License.
2197 * You may obtain a copy of the License at
2198 *
2199 *   http://www.apache.org/licenses/LICENSE-2.0
2200 *
2201 * Unless required by applicable law or agreed to in writing, software
2202 * distributed under the License is distributed on an "AS IS" BASIS,
2203 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2204 * See the License for the specific language governing permissions and
2205 * limitations under the License.
2206 */class ro{constructor(t,n,r,o,i,s,a){this.key=t,this.documentType=n,this.version=r,this.readTime=o,this.createTime=i,this.data=s,this.documentState=a}static newInvalidDocument(t){return new ro(t,0,vt.min(),vt.min(),vt.min(),Bo.empty(),0)}static newFoundDocument(t,n,r,o){return new ro(t,1,n,vt.min(),r,o,0)}static newNoDocument(t,n){return new ro(t,2,n,vt.min(),vt.min(),Bo.empty(),0)}static newUnknownDocument(t,n){return new ro(t,3,n,vt.min(),vt.min(),Bo.empty(),2)}convertToFoundDocument(t,n){return!this.createTime.isEqual(vt.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=t),this.version=t,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(t){return this.version=t,this.documentType=2,this.data=Bo.empty(),this.documentState=0,this}convertToUnknownDocument(t){return this.version=t,this.documentType=3,this.data=Bo.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=vt.min(),this}setReadTime(t){return this.readTime=t,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(t){return t instanceof ro&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}mutableCopy(){return new ro(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}})`}}
2206/**
2207 * @license
2208 * Copyright 2022 Google LLC
2209 *
2210 * Licensed under the Apache License, Version 2.0 (the "License");
2211 * you may not use this file except in compliance with the License.
2212 * You may obtain a copy of the License at
2213 *
2214 *   http://www.apache.org/licenses/LICENSE-2.0
2215 *
2216 * Unless required by applicable law or agreed to in writing, software
2217 * distributed under the License is distributed on an "AS IS" BASIS,
2218 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2219 * See the License for the specific language governing permissions and
2220 * limitations under the License.
2221 */class Iw{constructor(t,n){this.position=t,this.inclusive=n}}function vL(e,t,n){let r=0;for(let o=0;o<e.position.length;o++){const i=t[o],s=e.position[o];if(i.field.isKeyField()?r=ct.comparator(ct.fromName(s.referenceValue),n.key):r=_h(s,n.data.field(i.field)),i.dir==="desc"&&(r*=-1),r!==0)break}return r}function bL(e,t){if(e===null)return t===null;if(t===null||e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!Aa(e.position[n],t.position[n]))return!1;return!0}/**
2222 * @license
2223 * Copyright 2022 Google LLC
2224 *
2225 * Licensed under the Apache License, Version 2.0 (the "License");
2226 * you may not use this file except in compliance with the License.
2227 * You may obtain a copy of the License at
2228 *
2229 *   http://www.apache.org/licenses/LICENSE-2.0
2230 *
2231 * Unless required by applicable law or agreed to in writing, software
2232 * distributed under the License is distributed on an "AS IS" BASIS,
2233 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2234 * See the License for the specific language governing permissions and
2235 * limitations under the License.
2236 */class Hg{constructor(t,n="asc"){this.field=t,this.dir=n}}function Hwe(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}/**
2237 * @license
2238 * Copyright 2022 Google LLC
2239 *
2240 * Licensed under the Apache License, Version 2.0 (the "License");
2241 * you may not use this file except in compliance with the License.
2242 * You may obtain a copy of the License at
2243 *
2244 *   http://www.apache.org/licenses/LICENSE-2.0
2245 *
2246 * Unless required by applicable law or agreed to in writing, software
2247 * distributed under the License is distributed on an "AS IS" BASIS,
2248 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2249 * See the License for the specific language governing permissions and
2250 * limitations under the License.
2251 */class hH{}class lr extends hH{constructor(t,n,r){super(),this.field=t,this.op=n,this.value=r}static create(t,n,r){return t.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(t,n,r):new Gwe(t,n,r):n==="array-contains"?new Qwe(t,r):n==="in"?new Ywe(t,r):n==="not-in"?new Xwe(t,r):n==="array-contains-any"?new Jwe(t,r):new lr(t,n,r)}static createKeyFieldInFilter(t,n,r){return n==="in"?new qwe(t,r):new Kwe(t,r)}matches(t){const n=t.data.field(this.field);return this.op==="!="?n!==null&&this.matchesComparison(_h(n,this.value)):n!==null&&ud(this.value)===ud(n)&&this.matchesComparison(_h(n,this.value))}matchesComparison(t){switch(this.op){case"<":return t<0;case"<=":return t<=0;case"==":return t===0;case"!=":return t!==0;case">":return t>0;case">=":return t>=0;default:return ht()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Ds extends hH{constructor(t,n){super(),this.filters=t,this.op=n,this.ue=null}static create(t,n){return new Ds(t,n)}matches(t){return pH(this)?this.filters.find(n=>!n.matches(t))===void 0:this.filters.find(n=>n.matches(t))!==void 0}getFlattenedFilters(){return this.ue!==null||(this.ue=this.filters.reduce((t,n)=>t.concat(n.getFlattenedFilters()),[])),this.ue}getFilters(){return Object.assign([],this.filters)}}function pH(e){return e.op==="and"}function mH(e){return Wwe(e)&&pH(e)}function Wwe(e){for(const t of e.filters)if(t instanceof Ds)return!1;return!0}function hA(e){if(e instanceof lr)return e.field.canonicalString()+e.op.toString()+Eh(e.value);if(mH(e))return e.filters.map(t=>hA(t)).join(",");{const t=e.filters.map(n=>hA(n)).join(",");
2251return`${e.op}(${t})`}}function gH(e,t){return e instanceof lr?function(r,o){return o instanceof lr&&r.op===o.op&&r.field.isEqual(o.field)&&Aa(r.value,o.value)}(e,t):e instanceof Ds?function(r,o){return o instanceof Ds&&r.op===o.op&&r.filters.length===o.filters.length?r.filters.reduce((i,s,a)=>i&&gH(s,o.filters[a]),!0):!1}(e,t):void ht()}function yH(e){return e instanceof lr?function(n){return`${n.field.canonicalString()} ${n.op} ${Eh(n.value)}`}(e):e instanceof Ds?function(n){return n.op.toString()+" {"+n.getFilters().map(yH).join(" ,")+"}"}(e):"Filter"}class Gwe extends lr{constructor(t,n,r){super(t,n,r),this.key=ct.fromName(r.referenceValue)}matches(t){const n=ct.comparator(t.key,this.key);return this.matchesComparison(n)}}class qwe extends lr{constructor(t,n){super(t,"in",n),this.keys=vH("in",n)}matches(t){return this.keys.some(n=>n.isEqual(t.key))}}class Kwe extends lr{constructor(t,n){super(t,"not-in",n),this.keys=vH("not-in",n)}matches(t){return!this.keys.some(n=>n.isEqual(t.key))}}function vH(e,t){var n;return(((n=t.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>ct.fromName(r.referenceValue))}class Qwe extends lr{constructor(t,n){super(t,"array-contains",n)}matches(t){const n=t.data.field(this.field);return xR(n)&&Ug(n.arrayValue,this.value)}}class Ywe extends lr{constructor(t,n){super(t,"in",n)}matches(t){const n=t.data.field(this.field);return n!==null&&Ug(this.value.arrayValue,n)}}class Xwe extends lr{constructor(t,n){super(t,"not-in",n)}matches(t){if(Ug(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=t.data.field(this.field);return n!==null&&!Ug(this.value.arrayValue,n)}}class Jwe extends lr{constructor(t,n){super(t,"array-contains-any",n)}matches(t){const n=t.data.field(this.field);return!(!xR(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>Ug(this.value.arrayValue,r))}}/**
2252 * @license
2253 * Copyright 2019 Google LLC
2254 *
2255 * Licensed under the Apache License, Version 2.0 (the "License");
2256 * you may not use this file except in compliance with the License.
2257 * You may obtain a copy of the License at
2258 *
2259 *   http://www.apache.org/licenses/LICENSE-2.0
2260 *
2261 * Unless required by applicable law or agreed to in writing, software
2262 * distributed under the License is distributed on an "AS IS" BASIS,
2263 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2264 * See the License for the specific language governing permissions and
2265 * limitations under the License.
2266 */class Zwe{constructor(t,n=null,r=[],o=[],i=null,s=null,a=null){this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=o,this.limit=i,this.startAt=s,this.endAt=a,this.ce=null}}function wL(e,t=null,n=[],r=[],o=null,i=null,s=null){return new Zwe(e,t,n,r,o,i,s)}function SR(e){const t=wt(e);if(t.ce===null){let n=t.path.canonicalString();t.collectionGroup!==null&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map(r=>hA(r)).join(","),n+="|ob:",n+=t.orderBy.map(r=>function(i){return i.field.canonicalString()+i.dir}(r)).join(","),yx(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map(r=>Eh(r)).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map(r=>Eh(r)).join(",")),t.ce=n}return t.ce}function _R(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let n=0;n<e.orderBy.length;n++)if(!Hwe(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(let n=0;n<e.filters.length;n++)if(!gH(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!bL(e.startAt,t.startAt)&&bL(e.endAt,t.endAt)}function pA(e){return ct.isDocumentKey(e.path)&&e.collectionGroup===null&&e.filters.length===0}/**
2267 * @license
2268 * Copyright 2017 Google LLC
2269 *
2270 * Licensed under the Apache License, Version 2.0 (the "License");
2271 * you may not use this file except in compliance with the License.
2272 * You may obtain a copy of the License at
2273 *
2274 *   http://www.apache.org/licenses/LICENSE-2.0
2275 *
2276 * Unless required by applicable law or agreed to in writing, softw
2276are
2277 * distributed under the License is distributed on an "AS IS" BASIS,
2278 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2279 * See the License for the specific language governing permissions and
2280 * limitations under the License.
2281 */class op{constructor(t,n=null,r=[],o=[],i=null,s="F",a=null,l=null){this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=o,this.limit=i,this.limitType=s,this.startAt=a,this.endAt=l,this.le=null,this.he=null,this.Pe=null,this.startAt,this.endAt}}function e1e(e,t,n,r,o,i,s,a){return new op(e,t,n,r,o,i,s,a)}function vx(e){return new op(e)}function CL(e){return e.filters.length===0&&e.limit===null&&e.startAt==null&&e.endAt==null&&(e.explicitOrderBy.length===0||e.explicitOrderBy.length===1&&e.explicitOrderBy[0].field.isKeyField())}function bH(e){return e.collectionGroup!==null}function jm(e){const t=wt(e);if(t.le===null){t.le=[];const n=new Set;for(const i of t.explicitOrderBy)t.le.push(i),n.add(i.field.canonicalString());const r=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";(function(s){let a=new Vr($r.comparator);return s.filters.forEach(l=>{l.getFlattenedFilters().forEach(u=>{u.isInequality()&&(a=a.add(u.field))})}),a})(t).forEach(i=>{n.has(i.canonicalString())||i.isKeyField()||t.le.push(new Hg(i,r))}),n.has($r.keyField().canonicalString())||t.le.push(new Hg($r.keyField(),r))}return t.le}function wa(e){const t=wt(e);return t.he||(t.he=t1e(t,jm(e))),t.he}function t1e(e,t){if(e.limitType==="F")return wL(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map(o=>{const i=o.dir==="desc"?"asc":"desc";return new Hg(o.field,i)});const n=e.endAt?new Iw(e.endAt.position,e.endAt.inclusive):null,r=e.startAt?new Iw(e.startAt.position,e.startAt.inclusive):null;return wL(e.path,e.collectionGroup,t,e.filters,e.limit,n,r)}}function mA(e,t){const n=e.filters.concat([t]);return new op(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function gA(e,t,n){return new op(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function bx(e,t){return _R(wa(e),wa(t))&&e.limitType===t.limitType}function wH(e){return`${SR(wa(e))}|lt:${e.limitType}`}function Xd(e){return`Query(target=${function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map(o=>yH(o)).join(", ")}]`),yx(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(o=>function(s){return`${s.field.canonicalString()} (${s.dir})`}(o)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(o=>Eh(o)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(o=>Eh(o)).join(",")),`Target(${r})`}(wa(e))}; limitType=${e.limitType})`}function wx(e,t){return t.isFoundDocument()&&function(r,o){const i=o.key.path;return r.collectionGroup!==null?o.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(i):ct.isDocumentKey(r.path)?r.path.isEqual(i):r.path.isImmediateParentOf(i)}(e,t)&&function(r,o){for(const i of jm(r))if(!i.field.isKeyField()&&o.data.field(i.field)===null)return!1;return!0}(e,t)&&function(r,o){for(const i of r.filters)if(!i.matches(o))return!1;return!0}(e,t)&&function(r,o){return!(r.startAt&&!function(s,a,l){const u=vL(s,a,l);return s.inclusive?u<=0:u<0}(r.startAt,jm(r),o)||r.endAt&&!function(s,a,l){const u=vL(s,a,l);return s.inclusive?u>=0:u>0}(r.endAt,jm(r),o))}(e,t)}function n1e(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function CH(e){return(t,n)=>{let r=!1;for(const o of jm(e)){const i=r1e(o,t,n);if(i!==0)return i;r=r||o.field.isKeyField()}return 0}}function r1e(e,t,n){const r=e.field.isKeyField()?ct.comparator(t.key,n.key):function(i,s,a){const l=s.data.field(i),u=a.data.field(i);return l!==null&&u!==null?_h(l,u):ht()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return ht()}}/**
2282 * @license
2283 * Copyright 2017 Google LLC
2284 *
2285 * Licensed under the Apache License, Version 2.0 (the "License");
2286 * you may not use this file except in compliance with the License.
2287 * You may obtain a copy of the License at
2288 *
2289 *   http://www.apache.org/licenses/LICENSE-2.0
2290 *
2291 * Unless required by applicable law or agreed to in writing, software
2292 * distributed under the License is distributed on an "AS IS" BASIS,
2293 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2294 * See the License for the specific language governing permissions and
2295 * limitations under the License.
2296 */class ip{constructor(t,n){this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}get(t){const n=this.mapKeyFn(t),r=this.inner[n];if(r!==void 0){for(const[o,i]of r)if(this.equalsFn(o,t))return i}}has(t){return this.get(t)!==void 0}set(t,n){const r=this.mapKeyFn(t),o=this.inner[r];if(o===void 0)return this.inner[r]=[[t,n]],void this.innerSize++;for(let i=0;i<o.length;i++)if(this.equalsFn(o[i][0],t))return void(o[i]=[t,n]);o.push([t,n]),this.innerSize++}delete(t){const n=this.mapKeyFn(t),r=this.inner[n];if(r===void 0)return!1;for(let o=0;o<r.length;o++)if(this.equalsFn(r[o][0],t))return r.length===1?delete this.inner[n]:r.splice(o,1),this.innerSize--,!0;return!1}forEach(t){Sd(this.inner,(n,r)=>{for(const[o,i]of r)t(o,i)})}isEmpty(){return cH(this.inner)}size(){return this.innerSize}}/**
2297 * @license
2298 * Copyright 2017 Google LLC
2299 *
2300 * Licensed under the Apache License, Version 2.0 (the "License");
2301 * you may not use this file except in compliance with the License.
2302 * You may obtain a copy of the License at
2303 *
2304 *   http://www.apache.org/licenses/LICENSE-2.0
2305 *
2306 * Unless required by applicable law or agreed to in writing, software
2307 * distributed under the License is distributed on an "AS IS" BASIS,
2308 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2309 * See the License for the specific language governing permissions and
2310 * limitations under the License.
2311 */const o1e=new Ln(ct.comparator);function xl(){return o1e}const xH=new Ln(ct.comparator);function sm(...e){let t=xH;for(const n of e)t=t.insert(n.key,n);return t}function SH(e){let t=xH;return e.forEach((n,r)=>t=t.insert(n,r.overlayedDocument)),t}function xc(){return zm()}function _H(){return zm()}function zm(){return new ip(e=>e.toString(),(e,t)=>e.isEqual(t))}const i1e=new Ln(ct.comparator),s1e=new Vr(ct.comparator);function Tt(...e){let t=s1e;for(const n of e)t=t.add(n);return t}const a1e=new Vr(Qt);function l1e(){return a1e}/**
2312 * @license
2313 * Copyright 2020 Google LLC
2314 *
2315 * Licensed under the Apache License, Version 2.0 (the "License");
2316 * you may not use this file except in compliance with the License.
2317 * You may obtain a copy of the License at
2318 *
2319 *   http://www.apache.org/licenses/LICENSE-2.0
2320 *
2321 * Unless required by applicable law or agreed to in writing, software
2322 * distributed under the License is distributed on an "AS IS" BASIS,
2323 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2324 * See the License for the specific language governing permissions and
2325 * limitations under the License.
2326 */function EH(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Ew(t)?"-0":t}}function IH(e){return{integerValue:""+e}}function u1e(e,t){return Bwe(t)?IH(t):EH(e,t)}/**
2327 * @license
2328 * Copyright 2018 Google LLC
2329 *
2330 * Licensed under the Apache License, Version 2.0 (the "License");
2331 * you may not use this file except in compliance with the License.
2332 * You may obtain a copy of the License at
2333 *
2334 *   http://www.apache.org/licenses/LICENSE-2.0
2335 *
2336 * Unless required by applicable law or agreed to in writing, software
2337 * distributed under the License is distributed on an "AS IS" BASIS,
2338 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2339 * See the License for the specific language governing permissions and
2340 * limitations under the License.
2341 */class Cx{constructor(){this._=void 0}}function c1e(e,t,n){return e instanceof Wg?function(o,i){const s={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:o.seconds,nanos:o.nanoseconds}}}};return i&&wR(i)&&(i=CR(i)),i&&(s.fields.__previous_value__=i),{mapValue:s}}(n,t):e instanceof Ih?kH(e,t):e instanceof Gg?PH(e,t):function(o,i){const s=AH(o,i),a=xL(s)+xL(o.Ie);return fA(s)&&fA(o.Ie)?IH(a):EH(o.serializer,a)}(e,t)}function d1e(e,t,n){return e instanceof Ih?kH(e,t):e instanceof Gg?PH(e,t):n}function AH(e,t){return e instanceof Aw?function(r){return fA(r)||function(i){return!!i&&"doubleValue"in i}(r)}(t)?t:{integerValue:0}:null}class Wg extends Cx{}class Ih extends Cx{constructor(t){super(),this.elements=t}}function kH(e,t){const n=TH(t);for(const r of e.elements)n.some(o=>Aa(o,r))||n.push(r);return{arrayValue:{values:n}}}class Gg extends Cx{constructor(t){super(),this.elements=t}}function PH(e,t){let n=TH(t);for(const r of e.elements)n=n.filter(o=>!Aa(o,r));return{arrayValue:{values:n}}}
2341class Aw extends Cx{constructor(t,n){super(),this.serializer=t,this.Ie=n}}function xL(e){return ir(e.integerValue||e.doubleValue)}function TH(e){return xR(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}/**
2342 * @license
2343 * Copyright 2017 Google LLC
2344 *
2345 * Licensed under the Apache License, Version 2.0 (the "License");
2346 * you may not use this file except in compliance with the License.
2347 * You may obtain a copy of the License at
2348 *
2349 *   http://www.apache.org/licenses/LICENSE-2.0
2350 *
2351 * Unless required by applicable law or agreed to in writing, software
2352 * distributed under the License is distributed on an "AS IS" BASIS,
2353 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2354 * See the License for the specific language governing permissions and
2355 * limitations under the License.
2356 */class RH{constructor(t,n){this.field=t,this.transform=n}}function f1e(e,t){return e.field.isEqual(t.field)&&function(r,o){return r instanceof Ih&&o instanceof Ih||r instanceof Gg&&o instanceof Gg?Sh(r.elements,o.elements,Aa):r instanceof Aw&&o instanceof Aw?Aa(r.Ie,o.Ie):r instanceof Wg&&o instanceof Wg}(e.transform,t.transform)}class h1e{constructor(t,n){this.version=t,this.transformResults=n}}class ko{constructor(t,n){this.updateTime=t,this.exists=n}static none(){return new ko}static exists(t){return new ko(void 0,t)}static updateTime(t){return new ko(t)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)}}function Gb(e,t){return e.updateTime!==void 0?t.isFoundDocument()&&t.version.isEqual(e.updateTime):e.exists===void 0||e.exists===t.isFoundDocument()}class xx{}function OH(e,t){if(!e.hasLocalMutations||t&&t.fields.length===0)return null;if(t===null)return e.isNoDocument()?new Sx(e.key,ko.none()):new Vy(e.key,e.data,ko.none());{const n=e.data,r=Bo.empty();let o=new Vr($r.comparator);for(let i of t.fields)if(!o.has(i)){let s=n.field(i);s===null&&i.length>1&&(i=i.popLast(),s=n.field(i)),s===null?r.delete(i):r.set(i,s),o=o.add(i)}return new Ku(e.key,r,new li(o.toArray()),ko.none())}}function p1e(e,t,n){e instanceof Vy?function(o,i,s){const a=o.value.clone(),l=_L(o.fieldTransforms,i,s.transformResults);a.setAll(l),i.convertToFoundDocument(s.version,a).setHasCommittedMutations()}(e,t,n):e instanceof Ku?function(o,i,s){if(!Gb(o.precondition,i))return void i.convertToUnknownDocument(s.version);const a=_L(o.fieldTransforms,i,s.transformResults),l=i.data;l.setAll(MH(o)),l.setAll(a),i.convertToFoundDocument(s.version,l).setHasCommittedMutations()}(e,t,n):function(o,i,s){i.convertToNoDocument(s.version).setHasCommittedMutations()}(0,t,n)}function Um(e,t,n,r){return e instanceof Vy?function(i,s,a,l){if(!Gb(i.precondition,s))return a;const u=i.value.clone(),c=EL(i.fieldTransforms,l,s);return u.setAll(c),s.convertToFoundDocument(s.version,u).setHasLocalMutations(),null}(e,t,n,r):e instanceof Ku?function(i,s,a,l){if(!Gb(i.precondition,s))return a;const u=EL(i.fieldTransforms,l,s),c=s.data;return c.setAll(MH(i)),c.setAll(u),s.convertToFoundDocument(s.version,c).setHasLocalMutations(),a===null?null:a.unionWith(i.fieldMask.fields).unionWith(i.fieldTransforms.map(d=>d.field))}(e,t,n,r):function(i,s,a){return Gb(i.precondition,s)?(s.convertToNoDocument(s.version).setHasLocalMutations(),null):a}(e,t,n)}function m1e(e,t){let n=null;for(const r of e.fieldTransforms){const o=t.data.field(r.field),i=AH(r.transform,o||null);i!=null&&(n===null&&(n=Bo.empty()),n.set(r.field,i))}return n||null}function SL(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(r,o){return r===void 0&&o===void 0||!(!r||!o)&&Sh(r,o,(i,s)=>f1e(i,s))}(e.fieldTransforms,t.fieldTransforms)&&(e.type===0?e.value.isEqual(t.value):e.type!==1||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class Vy extends xx{constructor(t,n,r,o=[]){super(),this.key=t,this.value=n,this.precondition=r,this.fieldTransforms=o,this.type=0}getFieldMask(){return null}}class Ku extends xx{constructor(t,n,r,o,i=[]){super(),this.key=t,this.data=n,this.fieldMask=r,this.prec
2356ondition=o,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function MH(e){const t=new Map;return e.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=e.data.field(n);t.set(n,r)}}),t}function _L(e,t,n){const r=new Map;gn(e.length===n.length);for(let o=0;o<n.length;o++){const i=e[o],s=i.transform,a=t.data.field(i.field);r.set(i.field,d1e(s,a,n[o]))}return r}function EL(e,t,n){const r=new Map;for(const o of e){const i=o.transform,s=n.data.field(o.field);r.set(o.field,c1e(i,s,t))}return r}class Sx extends xx{constructor(t,n){super(),this.key=t,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class g1e extends xx{constructor(t,n){super(),this.key=t,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/**
2357 * @license
2358 * Copyright 2017 Google LLC
2359 *
2360 * Licensed under the Apache License, Version 2.0 (the "License");
2361 * you may not use this file except in compliance with the License.
2362 * You may obtain a copy of the License at
2363 *
2364 *   http://www.apache.org/licenses/LICENSE-2.0
2365 *
2366 * Unless required by applicable law or agreed to in writing, software
2367 * distributed under the License is distributed on an "AS IS" BASIS,
2368 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2369 * See the License for the specific language governing permissions and
2370 * limitations under the License.
2371 */class y1e{constructor(t,n,r,o){this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=o}applyToRemoteDocument(t,n){const r=n.mutationResults;for(let o=0;o<this.mutations.length;o++){const i=this.mutations[o];i.key.isEqual(t.key)&&p1e(i,t,r[o])}}applyToLocalView(t,n){for(const r of this.baseMutations)r.key.isEqual(t.key)&&(n=Um(r,t,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(t.key)&&(n=Um(r,t,n,this.localWriteTime));return n}applyToLocalDocumentSet(t,n){const r=_H();return this.mutations.forEach(o=>{const i=t.get(o.key),s=i.overlayedDocument;let a=this.applyToLocalView(s,i.mutatedFields);a=n.has(o.key)?null:a;const l=OH(s,a);l!==null&&r.set(o.key,l),s.isValidDocument()||s.convertToNoDocument(vt.min())}),r}keys(){return this.mutations.reduce((t,n)=>t.add(n.key),Tt())}isEqual(t){return this.batchId===t.batchId&&Sh(this.mutations,t.mutations,(n,r)=>SL(n,r))&&Sh(this.baseMutations,t.baseMutations,(n,r)=>SL(n,r))}}class ER{constructor(t,n,r,o){this.batch=t,this.commitVersion=n,this.mutationResults=r,this.docVersions=o}static from(t,n,r){gn(t.mutations.length===r.length);let o=function(){return i1e}();const i=t.mutations;for(let s=0;s<i.length;s++)o=o.insert(i[s].key,r[s].version);return new ER(t,n,r,o)}}/**
2372 * @license
2373 * Copyright 2022 Google LLC
2374 *
2375 * Licensed under the Apache License, Version 2.0 (the "License");
2376 * you may not use this file except in compliance with the License.
2377 * You may obtain a copy of the License at
2378 *
2379 *   http://www.apache.org/licenses/LICENSE-2.0
2380 *
2381 * Unless required by applicable law or agreed to in writing, software
2382 * distributed under the License is distributed on an "AS IS" BASIS,
2383 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2384 * See the License for the specific language governing permissions and
2385 * limitations under the License.
2386 */class v1e{constructor(t,n){this.largestBatchId=t,this.mutation=n}getKey(){return this.mutation.key}isEqual(t){return t!==null&&this.mutation===t.mutation}toString(){return`Overlay{
2387      largestBatchId: ${this.largestBatchId},
2388      mutation: ${this.mutation.toString()}
2389    }`}}/**
2390 * @license
2391 * Copyright 2017 Google LLC
2392 *
2393 * Licensed under the Apache License, Version 2.0 (the "License");
2394 * you may not use this file except in compliance with the License.
2395 * You may obtain a copy of the License at
2396 *
2397 *   http://www.apache.org/licenses/LICENSE-2.0
2398 *
2399 * Unless required by applicable law or agreed to in writing, software
2400 * distributed under the License is distributed on an "AS IS" BASIS,
2401 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2402 * See the License for the specific language governing permissions and
2403 * limitations under the License.
2404 */class b1e{constructor(t,n){this.count=t,this.unchangedNames=n}}/**
2405 * @license
2406 * Copyright 2017 Google LLC
2407 *
2408 * Licensed under the Apache License, Version 2.0 (the "License");
2409 * you may not use this file except in compliance with the License.
2410 * You may obtain a copy of the License at
2411 *
2412 *   http://www.apache.org/licenses/LICENSE-2.0
2413 *
2414 * Unless required by applicable law or agreed to in writing, software
2415 * distributed under the License is distributed on an "AS IS" BASIS,
2416 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2417 * See the License for the specific language governing permissions and
2418 * limitations under the License.
2419 */var tr,Dt;function w1e(e){switch(e){default:return ht();case Pe.CANCELLED:case Pe.UNKNOWN:case Pe.DEADLINE_EXCEEDED:case Pe.RESOURCE_EXHAUSTED:case Pe.INTERNAL:case Pe.UNAVAILABLE:case Pe.UNAUTHENTICATED:return!1;case Pe.INVALID_ARGUMENT:case Pe.NOT_FOUND:case Pe.ALREADY_EXISTS:case Pe.PERMISSION_DENIED:case Pe.FAILED_PRECONDITION:case Pe.ABORTED:case Pe.OUT_OF_RANGE:case Pe.UNIMPLEMENTED:case Pe.DATA_LOSS:return!0}}function DH(e){if(e===void 0)return Ia("GRPC error has no .code"),Pe.UNKNOWN;switch(e){case tr.OK:return Pe.OK;case tr.CANCELLED:return Pe.CANCELLED;case tr.UNKNOWN:return Pe.UNKNOWN;case tr.DEADLINE_EXCEEDED:return Pe.DEADLINE_EXCEEDED;case tr.RESOURCE_EXHAUSTED:return Pe.RESOURCE_EXHAUSTED;case tr.INTERNAL:return Pe.INTERNAL;case tr.UNAVAILABLE:return Pe.UNAVAILABLE;case tr.UNAUTHENTICATED:return Pe.UNAUTHENTICATED;case tr.INVALID_ARGUMENT:return Pe.INVALID_ARGUMENT;case tr.NOT_FOUND:return Pe.NOT_FOUND;case tr.ALREADY_EXISTS:return Pe.ALREADY_EXISTS;case tr.PERMISSION_DENIED:return Pe.PERMISSION_DENIED;case tr.FAILED_PRECONDITION:return Pe.FAILED_PRECONDITION;case tr.ABORTED:return Pe.ABORTED;case tr.OUT_OF_RANGE:return Pe.OUT_OF_RANGE;case tr.UNIMPLEMENTED:return Pe.UNIMPLEMENTED;case tr.DATA_LOSS:return Pe.DATA_LOSS;default:return ht()}}(Dt=tr||(tr={}))[Dt.OK=0]="OK",Dt[Dt.CANCELLED=1]="CANCELLED",Dt[Dt.UNKNOWN=2]="UNKNOWN",Dt[Dt.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Dt[Dt.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Dt[Dt.NOT_FOUND=5]="NOT_FOUND",Dt[Dt.ALREADY_EXISTS=6]="ALREADY_EXISTS",Dt[Dt.PERMISSION_DENIED=7]="PERMISSION_DENIED",Dt[Dt.UNAUTHENTICATED=16]="UNAUTHENTICATED",Dt[Dt.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Dt[Dt.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Dt[Dt.ABORTED=10]="ABORTED",Dt[Dt.OUT_OF_RANGE=11]="OUT_OF_RANGE",Dt[Dt.UNIMPLEMENTED=12]="UNIMPLEMENTED",Dt[Dt.INTERNAL=13]="INTERNAL",Dt[Dt.UNAVAILABLE=14]="UNAVAILABLE",Dt[Dt.DATA_LOSS=15]="DATA_LOSS";/**
2420 * @license
2421 * Copyright 2023 Google LLC
2422 *
2423 * Licensed under the Apache License, Version 2.0 (the "License");
2424 * you may not use this file except in compliance with the License.
2425 * You may obtain a copy of the License at
2426 *
2427 *   http://www.apache.org/licenses/LICENSE-2.0
2428 *
2429 * Unless required by applicable law or agreed to in writing, software
2430 * distributed under the License is distributed on an "AS IS" BASIS,
2431 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2432 * See the License for the specific language governing permissions and
2433 * limitations under the License.
2434 */function C1e(){return new TextEncoder}/**
2435 * @license
2436 * Copyright 2022 Google LLC
2437 *
2438 * Licensed under the Apache License, Version 2.0 (the "License");
2439 * you may not use this file except in compliance with the License.
2440 * You may obtain a copy of the License at
2441 *
2442 *   http://www.apache.org/licenses/LICENSE-2.0
2443 *
2444 * Unless required by applicable law or agreed to in writing, software
2445 * distributed under the License is distributed on an "AS IS" BASIS,
2446 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2447 * See the License for the specific language governing permissions and
2448 * limitations under the License.
2449 */const x1e=new Hf([4294967295,4294967295],0);function IL(e){const t=C1e().encode(e),n=new Swe;return n.update(t),new Uint8Array(n.digest())}function AL(e){const t=new DataView(e.buffer),n=t.getUint32(0,!0),r=t.getUint32(4,!0),o=t.getUint32(8,!0),i=t.getUint32(12,!0);return[new Hf([n,r],0),new Hf([o,i],0)]}class IR{constructor(t,n,r){if(this.bitmap=t,this.padding=n,this.hashCount=r,n<0||n>=8)throw new am(`Invalid padding: ${n}`);if(r<0)throw new am(`Invalid hash count: ${r}`);if(t.length>0&&this.hashCount===0)throw new am(`Invalid hash count: ${r}`);if(t.length===0&&n!==0)throw new am(`Invalid padding when bitmap length is 0: ${n}`);this.Te=8*t.length-n,this.Ee=Hf.fromNumber(this.Te)}de(t,n,r){let o=t.add(n.multiply(Hf.fromNumber(r)));return o.compare(x1e)===1&&(o=new Hf([o.getBits(0),o.getBits(1)],0)),o.modulo(this.Ee).toNumber()}Ae(t){return(this.bitmap[Math.floor(t/8)]&1<<t%8)!=0}mightContain(t){if(this.Te===0)return!1;const n=IL(t),[r,o]=AL(n);for(let i=0;i<this.hashCount;i++){const s=this.de(r,o,i);if(!this.Ae(s))return!1}return!0}static create(t,n,r){const o=t%8==0?0:8-t%8,i=new Uint8Array(Math.ceil(t/8)),s=new IR(i,o,n);return r.forEach(a=>s.insert(a)),s}insert(t){if(this.Te===0)return;const n=IL(t),[r,o]=AL(n);for(let i=0;i<this.hashCount;i++){const s=this.de(r,o,i);this.Re(s)}}Re(t){const n=Math.floor(t/8),r=t%8;this.bitmap[n]|=1<<r}}
2449class am extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
2450 * @license
2451 * Copyright 2017 Google LLC
2452 *
2453 * Licensed under the Apache License, Version 2.0 (the "License");
2454 * you may not use this file except in compliance with the License.
2455 * You may obtain a copy of the License at
2456 *
2457 *   http://www.apache.org/licenses/LICENSE-2.0
2458 *
2459 * Unless required by applicable law or agreed to in writing, software
2460 * distributed under the License is distributed on an "AS IS" BASIS,
2461 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2462 * See the License for the specific language governing permissions and
2463 * limitations under the License.
2464 */class _x{constructor(t,n,r,o,i){this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=o,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(t,n,r){const o=new Map;return o.set(t,By.createSynthesizedTargetChangeForCurrentChange(t,n,r)),new _x(vt.min(),o,new Ln(Qt),xl(),Tt())}}class By{constructor(t,n,r,o,i){this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=o,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(t,n,r){return new By(r,n,Tt(),Tt(),Tt())}}/**
2465 * @license
2466 * Copyright 2017 Google LLC
2467 *
2468 * Licensed under the Apache License, Version 2.0 (the "License");
2469 * you may not use this file except in compliance with the License.
2470 * You may obtain a copy of the License at
2471 *
2472 *   http://www.apache.org/licenses/LICENSE-2.0
2473 *
2474 * Unless required by applicable law or agreed to in writing, software
2475 * distributed under the License is distributed on an "AS IS" BASIS,
2476 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2477 * See the License for the specific language governing permissions and
2478 * limitations under the License.
2479 */class qb{constructor(t,n,r,o){this.Ve=t,this.removedTargetIds=n,this.key=r,this.me=o}}class $H{constructor(t,n){this.targetId=t,this.fe=n}}class FH{constructor(t,n,r=ho.EMPTY_BYTE_STRING,o=null){this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=o}}class kL{constructor(){this.ge=0,this.pe=TL(),this.ye=ho.EMPTY_BYTE_STRING,this.we=!1,this.Se=!0}get current(){return this.we}get resumeToken(){return this.ye}get be(){return this.ge!==0}get De(){return this.Se}Ce(t){t.approximateByteSize()>0&&(this.Se=!0,this.ye=t)}ve(){let t=Tt(),n=Tt(),r=Tt();return this.pe.forEach((o,i)=>{switch(i){case 0:t=t.add(o);break;case 2:n=n.add(o);break;case 1:r=r.add(o);break;default:ht()}}),new By(this.ye,this.we,t,n,r)}Fe(){this.Se=!1,this.pe=TL()}Me(t,n){this.Se=!0,this.pe=this.pe.insert(t,n)}xe(t){this.Se=!0,this.pe=this.pe.remove(t)}Oe(){this.ge+=1}Ne(){this.ge-=1,gn(this.ge>=0)}Le(){this.Se=!0,this.we=!0}}class S1e{constructor(t){this.Be=t,this.ke=new Map,this.qe=xl(),this.Qe=PL(),this.Ke=new Ln(Qt)}$e(t){for(const n of t.Ve)t.me&&t.me.isFoundDocument()?this.Ue(n,t.me):this.We(n,t.key,t.me);for(const n of t.removedTargetIds)this.We(n,t.key,t.me)}Ge(t){this.forEachTarget(t,n=>{const r=this.ze(n);switch(t.state){case 0:this.je(n)&&r.Ce(t.resumeToken);break;case 1:r.Ne(),r.be||r.Fe(),r.Ce(t.resumeToken);break;case 2:r.Ne(),r.be||this.removeTarget(n);break;case 3:this.je(n)&&(r.Le(),r.Ce(t.resumeToken));break;case 4:this.je(n)&&(this.He(n),r.Ce(t.resumeToken));break;default:ht()}})}forEachTarget(t,n){t.targetIds.length>0?t.targetIds.forEach(n):this.ke.forEach((r,o)=>{this.je(o)&&n(o)})}Je(t){const n=t.targetId,r=t.fe.count,o=this.Ye(n);if(o){const i=o.target;if(pA(i))if(r===0){const s=new ct(i.path);this.We(n,s,ro.newNoDocument(s,vt.min()))}else gn(r===1);else{const s=this.Ze(n);if(s!==r){const a=this.Xe(t),l=a?this.et(a,t,s):1;if(l!==0){this.He(n);const u=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ke=this.Ke.insert(n,u)}}}}}Xe(t){const n=t.fe.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:o=0},hashCount:i=0}=n;let s,a;try{s=ld(r).toUint8Array()}catch(l){if(l instanceof dH)return xh("Decoding the base64 bloom filter in existence filter failed ("+l.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw l}try{a=new IR(s,o,i)}catch(l){return xh(l instanceof am?"BloomFilter error: ":"Applying bloom filter failed: ",l),null}return a.Te===0?null:a}et(t,n,r){return n.fe.count===r-this.rt(t,n.targetId)?0:2}rt(t,n){const r=this.Be.getRemoteKeysForTarget(n);let o=0;return r.forEach(i=>
2479{const s=this.Be.nt(),a=`projects/${s.projectId}/databases/${s.database}/documents/${i.path.canonicalString()}`;t.mightContain(a)||(this.We(n,i,null),o++)}),o}it(t){const n=new Map;this.ke.forEach((i,s)=>{const a=this.Ye(s);if(a){if(i.current&&pA(a.target)){const l=new ct(a.target.path);this.qe.get(l)!==null||this.st(s,l)||this.We(s,l,ro.newNoDocument(l,t))}i.De&&(n.set(s,i.ve()),i.Fe())}});let r=Tt();this.Qe.forEach((i,s)=>{let a=!0;s.forEachWhile(l=>{const u=this.Ye(l);return!u||u.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(i))}),this.qe.forEach((i,s)=>s.setReadTime(t));const o=new _x(t,n,this.Ke,this.qe,r);return this.qe=xl(),this.Qe=PL(),this.Ke=new Ln(Qt),o}Ue(t,n){if(!this.je(t))return;const r=this.st(t,n.key)?2:0;this.ze(t).Me(n.key,r),this.qe=this.qe.insert(n.key,n),this.Qe=this.Qe.insert(n.key,this.ot(n.key).add(t))}We(t,n,r){if(!this.je(t))return;const o=this.ze(t);this.st(t,n)?o.Me(n,1):o.xe(n),this.Qe=this.Qe.insert(n,this.ot(n).delete(t)),r&&(this.qe=this.qe.insert(n,r))}removeTarget(t){this.ke.delete(t)}Ze(t){const n=this.ze(t).ve();return this.Be.getRemoteKeysForTarget(t).size+n.addedDocuments.size-n.removedDocuments.size}Oe(t){this.ze(t).Oe()}ze(t){let n=this.ke.get(t);return n||(n=new kL,this.ke.set(t,n)),n}ot(t){let n=this.Qe.get(t);return n||(n=new Vr(Qt),this.Qe=this.Qe.insert(t,n)),n}je(t){const n=this.Ye(t)!==null;return n||ze("WatchChangeAggregator","Detected inactive target",t),n}Ye(t){const n=this.ke.get(t);return n&&n.be?null:this.Be._t(t)}He(t){this.ke.set(t,new kL),this.Be.getRemoteKeysForTarget(t).forEach(n=>{this.We(t,n,null)})}st(t,n){return this.Be.getRemoteKeysForTarget(t).has(n)}}function PL(){return new Ln(ct.comparator)}function TL(){return new Ln(ct.comparator)}const _1e={asc:"ASCENDING",desc:"DESCENDING"},E1e={"<":"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"},I1e={and:"AND",or:"OR"};class A1e{constructor(t,n){this.databaseId=t,this.useProto3Json=n}}function yA(e,t){return e.useProto3Json||yx(t)?t:{value:t}}function kw(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function LH(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function k1e(e,t){return kw(e,t.toTimestamp())}function Ca(e){return gn(!!e),vt.fromTimestamp(function(n){const r=Lu(n);return new Dn(r.seconds,r.nanos)}(e))}function AR(e,t){return vA(e,t).canonicalString()}function vA(e,t){const n=function(o){return new xn(["projects",o.projectId,"databases",o.database])}(e).child("documents");return t===void 0?n:n.child(t)}function NH(e){const t=xn.fromString(e);return gn(UH(t)),t}function bA(e,t){return AR(e.databaseId,t.path)}function __(e,t){const n=NH(t);if(n.get(1)!==e.databaseId.projectId)throw new Ge(Pe.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new Ge(Pe.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new ct(BH(n))}function VH(e,t){return AR(e.databaseId,t)}function P1e(e){const t=NH(e);return t.length===4?xn.emptyPath():BH(t)}function wA(e){return new xn(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function BH(e){return gn(e.length>4&&e.get(4)==="documents"),e.popFirst(5)}function RL(e,t,n){return{name:bA(e,t),fields:n.value.mapValue.fields}}function T1e(e,t){let n;if("targetChange"in t){t.targetChange;const r=function(u){return u==="NO_CHANGE"?0:u==="ADD"?1:u==="REMOVE"?2:u==="CURRENT"?3:u==="RESET"?4:ht()}(t.targetChange.targetChangeType||"NO_CHANGE"),o=t.targetChange.targetIds||[],i=function(u,c){return u.useProto3Json?(gn(c===void 0||typeof c=="string"),ho.fromBase64String(c||"")):(gn(c===void 0||c instanceof Uint8Array),ho.fromUint8Array(c||new Uint8Array))}(e,t.targetChange.resumeToken),s=t.targetChange.cause,a=s&&function(u){const c=u.code===void 0?Pe.UNKNOWN:DH(u.code);return new Ge(c,u.message||"")}(s);n=new FH(r,o,i,a||null)}else if("documentChange"in t){t.documentChange;const r=t.documentChange;r.document,r.document.name,r.document.updateTime;const o=__(e,r.document.name),i=Ca(r.document.updateTime),s=r.document.createTime?
2479Ca(r.document.createTime):vt.min(),a=new Bo({mapValue:{fields:r.document.fields}}),l=ro.newFoundDocument(o,i,s,a),u=r.targetIds||[],c=r.removedTargetIds||[];n=new qb(u,c,l.key,l)}else if("documentDelete"in t){t.documentDelete;const r=t.documentDelete;r.document;const o=__(e,r.document),i=r.readTime?Ca(r.readTime):vt.min(),s=ro.newNoDocument(o,i),a=r.removedTargetIds||[];n=new qb([],a,s.key,s)}else if("documentRemove"in t){t.documentRemove;const r=t.documentRemove;r.document;const o=__(e,r.document),i=r.removedTargetIds||[];n=new qb([],i,o,null)}else{if(!("filter"in t))return ht();{t.filter;const r=t.filter;r.targetId;const{count:o=0,unchangedNames:i}=r,s=new b1e(o,i),a=r.targetId;n=new $H(a,s)}}return n}function R1e(e,t){let n;if(t instanceof Vy)n={update:RL(e,t.key,t.value)};else if(t instanceof Sx)n={delete:bA(e,t.key)};else if(t instanceof Ku)n={update:RL(e,t.key,t.data),updateMask:B1e(t.fieldMask)};else{if(!(t instanceof g1e))return ht();n={verify:bA(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map(r=>function(i,s){const a=s.transform;if(a instanceof Wg)return{fieldPath:s.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Ih)return{fieldPath:s.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof Gg)return{fieldPath:s.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof Aw)return{fieldPath:s.field.canonicalString(),increment:a.Ie};throw ht()}(0,r))),t.precondition.isNone||(n.currentDocument=function(o,i){return i.updateTime!==void 0?{updateTime:k1e(o,i.updateTime)}:i.exists!==void 0?{exists:i.exists}:ht()}(e,t.precondition)),n}function O1e(e,t){return e&&e.length>0?(gn(t!==void 0),e.map(n=>function(o,i){let s=o.updateTime?Ca(o.updateTime):Ca(i);return s.isEqual(vt.min())&&(s=Ca(i)),new h1e(s,o.transformResults||[])}(n,t))):[]}function M1e(e,t){return{documents:[VH(e,t.path)]}}function D1e(e,t){const n={structuredQuery:{}},r=t.path;let o;t.collectionGroup!==null?(o=r,n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(o=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=VH(e,o);const i=function(u){if(u.length!==0)return zH(Ds.create(u,"and"))}(t.filters);i&&(n.structuredQuery.where=i);const s=function(u){if(u.length!==0)return u.map(c=>function(f){return{field:Jd(f.field),direction:L1e(f.dir)}}(c))}(t.orderBy);s&&(n.structuredQuery.orderBy=s);const a=yA(e,t.limit);return a!==null&&(n.structuredQuery.limit=a),t.startAt&&(n.structuredQuery.startAt=function(u){return{before:u.inclusive,values:u.position}}(t.startAt)),t.endAt&&(n.structuredQuery.endAt=function(u){return{before:!u.inclusive,values:u.position}}(t.endAt)),{ut:n,parent:o}}function $1e(e){let t=P1e(e.parent);const n=e.structuredQuery,r=n.from?n.from.length:0;let o=null;if(r>0){gn(r===1);const c=n.from[0];c.allDescendants?o=c.collectionId:t=t.child(c.collectionId)}let i=[];n.where&&(i=function(d){const f=jH(d);return f instanceof Ds&&mH(f)?f.getFilters():[f]}(n.where));let s=[];n.orderBy&&(s=function(d){return d.map(f=>function(p){return new Hg(Zd(p.field),function(b){switch(b){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(p.direction))}(f))}(n.orderBy));let a=null;n.limit&&(a=function(d){let f;return f=typeof d=="object"?d.value:d,yx(f)?null:f}(n.limit));let l=null;n.startAt&&(l=function(d){const f=!!d.before,h=d.values||[];return new Iw(h,f)}(n.startAt));let u=null;return n.endAt&&(u=function(d){const f=!d.before,h=d.values||[];return new Iw(h,f)}(n.endAt)),e1e(t,o,s,i,a,"F",l,u)}function F1e(e,t){const n=function(o){switch(o){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return ht()}}(t.purpose);return n==null?null:{"goog-listen-tags":n}}function jH(e){return e.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=Zd(n.unaryFilter.field);return lr.create(r,"==",{doubleValue:NaN});case"IS_NULL":const o=Zd(n.unaryFilter.field);return lr.create(o,"==",{nullValue:"NULL_VALUE"});
2479case"IS_NOT_NAN":const i=Zd(n.unaryFilter.field);return lr.create(i,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const s=Zd(n.unaryFilter.field);return lr.create(s,"!=",{nullValue:"NULL_VALUE"});default:return ht()}}(e):e.fieldFilter!==void 0?function(n){return lr.create(Zd(n.fieldFilter.field),function(o){switch(o){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 ht()}}(n.fieldFilter.op),n.fieldFilter.value)}(e):e.compositeFilter!==void 0?function(n){return Ds.create(n.compositeFilter.filters.map(r=>jH(r)),function(o){switch(o){case"AND":return"and";case"OR":return"or";default:return ht()}}(n.compositeFilter.op))}(e):ht()}function L1e(e){return _1e[e]}function N1e(e){return E1e[e]}function V1e(e){return I1e[e]}function Jd(e){return{fieldPath:e.canonicalString()}}function Zd(e){return $r.fromServerFormat(e.fieldPath)}function zH(e){return e instanceof lr?function(n){if(n.op==="=="){if(yL(n.value))return{unaryFilter:{field:Jd(n.field),op:"IS_NAN"}};if(gL(n.value))return{unaryFilter:{field:Jd(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(yL(n.value))return{unaryFilter:{field:Jd(n.field),op:"IS_NOT_NAN"}};if(gL(n.value))return{unaryFilter:{field:Jd(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Jd(n.field),op:N1e(n.op),value:n.value}}}(e):e instanceof Ds?function(n){const r=n.getFilters().map(o=>zH(o));return r.length===1?r[0]:{compositeFilter:{op:V1e(n.op),filters:r}}}(e):ht()}function B1e(e){const t=[];return e.fields.forEach(n=>t.push(n.canonicalString())),{fieldPaths:t}}function UH(e){return e.length>=4&&e.get(0)==="projects"&&e.get(2)==="databases"}/**
2480 * @license
2481 * Copyright 2017 Google LLC
2482 *
2483 * Licensed under the Apache License, Version 2.0 (the "License");
2484 * you may not use this file except in compliance with the License.
2485 * You may obtain a copy of the License at
2486 *
2487 *   http://www.apache.org/licenses/LICENSE-2.0
2488 *
2489 * Unless required by applicable law or agreed to in writing, software
2490 * distributed under the License is distributed on an "AS IS" BASIS,
2491 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2492 * See the License for the specific language governing permissions and
2493 * limitations under the License.
2494 */class hu{constructor(t,n,r,o,i=vt.min(),s=vt.min(),a=ho.EMPTY_BYTE_STRING,l=null){this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=o,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=l}withSequenceNumber(t){return new hu(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(t,n){return new hu(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t,null)}withExpectedCount(t){return new hu(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}withLastLimboFreeSnapshotVersion(t){return new hu(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}}/**
2495 * @license
2496 * Copyright 2017 Google LLC
2497 *
2498 * Licensed under the Apache License, Version 2.0 (the "License");
2499 * you may not use this file except in compliance with the License.
2500 * You may obtain a copy of the License at
2501 *
2502 *   http://www.apache.org/licenses/LICENSE-2.0
2503 *
2504 * Unless required by applicable law or agreed to in writing, software
2505 * distributed under the License is distributed on an "AS IS" BASIS,
2506 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2507 * See the License for the specific language governing permissions and
2508 * limitations under the License.
2509 */class j1e{constructor(t){this.ct=t}}function z1e(e){const t=$1e({parent:e.parent,structuredQuery:e.structuredQuery});return e.limitType==="LAST"?gA(t,t.limit,"L"):t}/**
2510 * @license
2511 * Copyright 2019 Google LLC
2512 *
2513 * Licensed under the Apache License, Version 2.0 (the "License");
2514 * you may not use this file except in compliance with the License.
2515 * You may obtain a copy of the License at
2516 *
2517 *   http://www.apache.org/licenses/LICENSE-2.0
2518 *
2519 * Unless required by applicable law or agreed to in writing, software
2520 * distributed under the License is distributed on an "AS IS" BASIS,
2521 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2522 * See the License for the specific language governing permissions and
2523 * limitations under the License.
2524 */class U1e{constructor(){this._n=new H1e}addToCollectionParentIndex(t,n){return this._n.add(n),Oe.resolve()}getCollectionParents(t,n){return Oe.resolve(this._n.getEntries(n))}addFieldIndex(t,n){return Oe.resolve()}deleteFieldIndex(t,n){return Oe.resolve()}deleteAllFieldIndexes(t){return Oe.resolve()}createTargetIndexes(t,n){return Oe.resolve()}getDocumentsMatchingTarget(t,n){return Oe.resolve(null)}getIndexType(t,n){return Oe.resolve(0)}getFieldIndexes(t,n){return Oe.resolve([])}getNextCollectionGroupToUpdate(t){return Oe.resolve(null)}getMinOffset(t,n){return Oe.resolve(Fu.min())}getMinOffsetFromCollectionGroup(t,n){return Oe.resolve(Fu.min())}updateCollectionGroup(t,n,r){return Oe.resolve()}updateIndexEntries(t,n){return Oe.resolve()}}class H1e{constructor(){this.index={}}add(t){const n=t.lastSegment(),r=t.popLast(),o=this.index[n]||new Vr(xn.comparator),i=!o.has(r);return this.index[n]=o.add(r),i}has(t){const n=t.lastSegment(),r=t.popLast(),o=this.index[n];return o&&o.has(r)}getEntries(t){return(this.index[t]||new Vr(xn.comparator)).toArray()}}/**
2525 * @license
2526 * Copyright 2017 Google LLC
2527 *
2528 * Licensed under the Apache License, Version 2.0 (the "License");
2529 * you may not use this file except in compliance with the License.
2530 * You may obtain a copy of the License at
2531 *
2532 *   http://www.apache.org/licenses/LICENSE-2.0
2533 *
2534 * Unless required by applicable law or agreed to in writing, software
2535 * distributed under the License is distributed on an "AS IS" BASIS,
2536 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2537 * See the License for the specific language governing permissions and
2538 * limitations under the License.
2539 */class Ah{constructor(t){this.On=t}next(){return this.On+=2,this.On}static Nn(){return new Ah(0)}static Ln(){return new Ah(-1)}}/**
2540 * @license
2541 * Copyright 2017 Google LLC
2542 *
2543 * Licensed under the Apache License, Version 2.0 (the "License");
2544 * you may not use this file except in compliance with the License.
2545 * You may obtain a copy of the License at
2546 *
2547 *   http://www.apache.org/licenses/LICENSE-2.0
2548 *
2549 * Unless required by applicable law or agreed to in writing, software
2550 * distributed under the License is distributed on an "AS IS" BASIS,
2551 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2552 * See the License for the specific language governing permissions and
2553 * limitations under the License.
2554 */class W1e{constructor(){this.changes=new ip(t=>t.toString(),(t,n)=>t.isEqual(n)),this.changesApplied=!1}addEntry(t){this.assertNotApplied(),this.changes.set(t.key,t)}removeEntry(t,n){this.assertNotApplied(),this.changes.set(t,ro.newInvalidDocument(t).setReadTime(n))}getEntry(t,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?Oe.resolve(r):this.getFromCache(t,n)}getEntries(t,n){return this.getAllFromCache(t,n)}apply(t){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(t)}assertNotApplied(){}}/**
2555 * @license
2556 * Copyright 2017 Google LLC
2557 *
2558 * Licensed under the Apache License, Version 2.0 (the "License");
2559 * you may not use this file except in compliance with the License.
2560 * You may obtain a copy of the License at
2561 *
2562 *   http://www.apache.org/licenses/LICENSE-2.0
2563 *
2564 * Unless required by applicable law or agreed to in writing, software
2565 * distributed under the License is distributed on an "AS IS" BASIS,
2566 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2567 * See the License for the specific language governing permissions and
2568 * limitations under the License.
2569 *//**
2570 * @license
2571 * Copyright 2022 Google LLC
2572 *
2573 * Licensed under the Apache License, Version 2.0 (the "License");
2574 * you may not use this file except in compliance with the License.
2575 * You may obtain a copy of the License at
2576 *
2577 *   http://www.apache.org/licenses/LICENSE-2.0
2578 *
2579 * Unless required by applicable law or agreed to in writing, software
2580 * distributed under the License is distributed on an "AS IS" BASIS,
2581 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2582 * See the License for the specific language governing permissions and
2583 * limitations under the License.
2584 */class G1e{constructor(t,n){this.overlayedDocument=t,this.mutatedFields=n}}/**
2585 * @license
2586 * Copyright 2017 Google LLC
2587 *
2588 * Licensed under the Apache License, Version 2.0 (the "License");
2589 * you may not use this file except in compliance with the License.
2590 * You may obtain a copy of the License at
2591 *
2592 *   http://www.apache.org/licenses/LICENSE-2.0
2593 *
2594 * Unless required by applicable law or agreed to in writing, software
2595 * distributed under the License is distributed on an "AS IS" BASIS,
2596 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2597 * See the License for the specific language governing permissions and
2598 * limitations under the License.
2599 */class q1e{constructor(t,n,r,o){this.remoteDocumentCache=t,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=o}getDocument(t,n){let r=null;return this.documentOverlayCache.getOverlay(t,n).next(o=>(r=o,this.remoteDocumentCache.getEntry(t,n))).next(o=>(r!==null&&Um(r.mutation,o,li.empty(),Dn.now()),o))}getDocuments(t,n){return this.remoteDocumentCache.getEntries(t,n).next(r=>this.getLocalViewOfDocuments(t,r,Tt()).next(()=>r))}getLocalViewOfDocuments(t,n,r=Tt()){const o=xc();return this.populateOverlays(t,o,n).next(()=>this.computeViews(t,n,o,r).next(i=>{let s=sm();return i.forEach((a,l)=>{s=s.insert(a,l.overlayedDocument)}),s}))}getOverlayedDocuments(t,n){const r=xc();return this.populateOverlays(t,r,n).next(()=>this.computeViews(t,n,r,Tt()))}populateOverlays(t,n,r){const o=[];return r.forEach(i=>{n.has(i)||o.push(i)}),this.documentOverlayCache.getOverlays(t,o).next(i=>{i.forEach((s,a)=>{n.set(s,a)})})}computeViews(t,n,r,o){let i=xl();const s=zm(),a=function(){return zm()}();return n.forEach((l,u)=>{const c=r.get(u.key);o.has(u.key)&&(c===void 0||c.mutation instanceof Ku)?i=i.insert(u.key,u):c!==void 0?(s.set(u.key,c.mutation.getFieldMask()),Um(c.mutation,u,c.mutation.getFieldMask(),Dn.now())):s.set(u.key,li.empty())}),this.recalculateAndSaveOverlays(t,i).next(l=>(l.forEach((u,c)=>s.set(u,c)),n.forEach((u,c)=>{var d;return a.set(u,new G1e(c,(d=s.get(u))!==null&&d!==void 0?d:null))}),a))}recalculateAndSaveOverlays(t,n){const r=zm();let o=new Ln((s,a)=>s-a),i=Tt();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t,n).next(s=>{for(const a of s)a.keys().forEach(l=>{const u=n.get(l);if(u===null)return;let c=r.get(l)||li.empty();c=a.applyToLocalView(u,c),r.set(l,c);const d=(o.get(a.batchId)||Tt()).add(l);o=o.insert(a.batchId,d)})}).next(()=>{const s=[],a=o.getReverseIterator();for(;a.hasNext();){const l=a.getNext(),u=l.key,c=l.value,d=_H();c.forEach(f=>{if(!i.has(f)){const h=OH(n.get(f),r.get(f));h!==null&&d.set(f,h),i=i.add(f)}}),s.push(this.documentOverlayCache.saveOverlays(t,u,d))}return Oe.waitFor(s)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(t,n){return this.remoteDocumentCache.getEntries(t,n).next(r=>this.recalculateAndSaveOverlays(t,r))}getDocumentsMatchingQuery(t,n,r,o){return function(s){return ct.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(t,n.path):bH(n)?this.getDocumentsMatchingCollectionGroupQuery(t,n,r,o):this.getDocumentsMatchingCollectionQuery(t,n,r,o)}getNextDocuments(t,n,r,o){return this.remoteDocumentCache.getAllFromCollectionGroup(t,n,r,o).next(i=>{const s=o-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(t,n,r.largestBatchId,o-i.size):Oe.resolve(xc());let a=-1,l=i;return s.next(u=>Oe.forEach(u,(c,d)=>(a<d.largestBatchId&&(a=d.largestBatchId),i.get(c)?Oe.resolve():this.remoteDocumentCache.getEntry(t,c).next(f=>{l=l.insert(c,f)}))).next(()=>this.populateOverlays(t,u,i)).next(()=>this.computeViews(t,l,u,Tt())).next(c=>({batchId:a,changes:SH(c)})))})}getDocumentsMatchingDocumentQuery(t,n){return this.getDocument(t,new ct(n)).next(r=>{let o=sm();
2599return r.isFoundDocument()&&(o=o.insert(r.key,r)),o})}getDocumentsMatchingCollectionGroupQuery(t,n,r,o){const i=n.collectionGroup;let s=sm();return this.indexManager.getCollectionParents(t,i).next(a=>Oe.forEach(a,l=>{const u=function(d,f){return new op(f,null,d.explicitOrderBy.slice(),d.filters.slice(),d.limit,d.limitType,d.startAt,d.endAt)}(n,l.child(i));return this.getDocumentsMatchingCollectionQuery(t,u,r,o).next(c=>{c.forEach((d,f)=>{s=s.insert(d,f)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(t,n,r,o){let i;return this.documentOverlayCache.getOverlaysForCollection(t,n.path,r.largestBatchId).next(s=>(i=s,this.remoteDocumentCache.getDocumentsMatchingQuery(t,n,r,i,o))).next(s=>{i.forEach((l,u)=>{const c=u.getKey();s.get(c)===null&&(s=s.insert(c,ro.newInvalidDocument(c)))});let a=sm();return s.forEach((l,u)=>{const c=i.get(l);c!==void 0&&Um(c.mutation,u,li.empty(),Dn.now()),wx(n,u)&&(a=a.insert(l,u))}),a})}}/**
2600 * @license
2601 * Copyright 2020 Google LLC
2602 *
2603 * Licensed under the Apache License, Version 2.0 (the "License");
2604 * you may not use this file except in compliance with the License.
2605 * You may obtain a copy of the License at
2606 *
2607 *   http://www.apache.org/licenses/LICENSE-2.0
2608 *
2609 * Unless required by applicable law or agreed to in writing, software
2610 * distributed under the License is distributed on an "AS IS" BASIS,
2611 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2612 * See the License for the specific language governing permissions and
2613 * limitations under the License.
2614 */class K1e{constructor(t){this.serializer=t,this.cr=new Map,this.lr=new Map}getBundleMetadata(t,n){return Oe.resolve(this.cr.get(n))}saveBundleMetadata(t,n){return this.cr.set(n.id,function(o){return{id:o.id,version:o.version,createTime:Ca(o.createTime)}}(n)),Oe.resolve()}getNamedQuery(t,n){return Oe.resolve(this.lr.get(n))}saveNamedQuery(t,n){return this.lr.set(n.name,function(o){return{name:o.name,query:z1e(o.bundledQuery),readTime:Ca(o.readTime)}}(n)),Oe.resolve()}}/**
2615 * @license
2616 * Copyright 2022 Google LLC
2617 *
2618 * Licensed under the Apache License, Version 2.0 (the "License");
2619 * you may not use this file except in compliance with the License.
2620 * You may obtain a copy of the License at
2621 *
2622 *   http://www.apache.org/licenses/LICENSE-2.0
2623 *
2624 * Unless required by applicable law or agreed to in writing, software
2625 * distributed under the License is distributed on an "AS IS" BASIS,
2626 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2627 * See the License for the specific language governing permissions and
2628 * limitations under the License.
2629 */class Q1e{constructor(){this.overlays=new Ln(ct.comparator),this.hr=new Map}getOverlay(t,n){return Oe.resolve(this.overlays.get(n))}getOverlays(t,n){const r=xc();return Oe.forEach(n,o=>this.getOverlay(t,o).next(i=>{i!==null&&r.set(o,i)})).next(()=>r)}saveOverlays(t,n,r){return r.forEach((o,i)=>{this.ht(t,n,i)}),Oe.resolve()}removeOverlaysForBatchId(t,n,r){const o=this.hr.get(r);return o!==void 0&&(o.forEach(i=>this.overlays=this.overlays.remove(i)),this.hr.delete(r)),Oe.resolve()}getOverlaysForCollection(t,n,r){const o=xc(),i=n.length+1,s=new ct(n.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){const l=a.getNext().value,u=l.getKey();if(!n.isPrefixOf(u.path))break;u.path.length===i&&l.largestBatchId>r&&o.set(l.getKey(),l)}return Oe.resolve(o)}getOverlaysForCollectionGroup(t,n,r,o){let i=new Ln((u,c)=>u-c);const s=this.overlays.getIterator();for(;s.hasNext();){const u=s.getNext().value;if(u.getKey().getCollectionGroup()===n&&u.largestBatchId>r){let c=i.get(u.largestBatchId);c===null&&(c=xc(),i=i.insert(u.largestBatchId,c)),c.set(u.getKey(),u)}}const a=xc(),l=i.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((u,c)=>a.set(u,c)),!(a.size()>=o)););return Oe.resolve(a)}ht(t,n,r){const o=this.overlays.get(r.key);if(o!==null){const s=this.hr.get(o.largestBatchId).delete(r.key);this.hr.set(o.largestBatchId,s)}this.overlays=this.overlays.insert(r.key,new v1e(n,r));let i=this.hr.get(n);i===void 0&&(i=Tt(),this.hr.set(n,i)),this.hr.set(n,i.add(r.key))}}/**
2630 * @license
2631 * Copyright 2017 Google LLC
2632 *
2633 * Licensed under the Apache License, Version 2.0 (the "License");
2634 * you may not use this file except in compliance with the License.
2635 * You may obtain a copy of the License at
2636 *
2637 *   http://www.apache.org/licenses/LICENSE-2.0
2638 *
2639 * Unless required by applicable law or agreed to in writing, software
2640 * distributed under the License is distributed on an "AS IS" BASIS,
2641 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2642 * See the License for the specific language governing permissions and
2643 * limitations under the License.
2644 */class kR{constructor(){this.Pr=new Vr(wr.Ir),this.Tr=new Vr(wr.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(t,n){const r=new wr(t,n);this.Pr=this.Pr.add(r),this.Tr=this.Tr.add(r)}dr(t,n){t.forEach(r=>this.addReference(r,n))}removeReference(t,n){this.Ar(new wr(t,n))}Rr(t,n){t.forEach(r=>this.removeReference(r,n))}Vr(t){const n=new ct(new xn([])),r=new wr(n,t),o=new wr(n,t+1),i=[];return this.Tr.forEachInRange([r,o],s=>{this.Ar(s),i.push(s.key)}),i}mr(){this.Pr.forEach(t=>this.Ar(t))}Ar(t){this.Pr=this.Pr.delete(t),this.Tr=this.Tr.delete(t)}gr(t){const n=new ct(new xn([])),r=new wr(n,t),o=new wr(n,t+1);let i=Tt();return this.Tr.forEachInRange([r,o],s=>{i=i.add(s.key)}),i}containsKey(t){const n=new wr(t,0),r=this.Pr.firstAfterOrEqual(n);return r!==null&&t.isEqual(r.key)}}class wr{constructor(t,n){this.key=t,this.pr=n}static Ir(t,n){return ct.comparator(t.key,n.key)||Qt(t.pr,n.pr)}static Er(t,n){return Qt(t.pr,n.pr)||ct.comparator(t.key,n.key)}}/**
2645 * @license
2646 * Copyright 2017 Google LLC
2647 *
2648 * Licensed under the Apache License, Version 2.0 (the "License");
2649 * you may not use this file except in compliance with the License.
2650 * You may obtain a copy of the License at
2651 *
2652 *   http://www.apache.org/licenses/LICENSE-2.0
2653 *
2654 * Unless required by applicable law or agreed to in writing, software
2655 * distributed under the License is distributed on an "AS IS" BASIS,
2656 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2657 * See the License for the specific language governing permissions and
2658 * limitations under the License.
2659 */class Y1e{constructor(t,n){this.indexManager=t,this.referenceDelegate=n,this.mutationQueue=[],this.yr=1,this.wr=new Vr(wr.Ir)}checkEmpty(t){return Oe.resolve(this.mutationQueue.length===0)}addMutationBatch(t,n,r,o){const i=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const s=new y1e(i,n,r,o);this.mutationQueue.push(s);for(const a of o)this.wr=this.wr.add(new wr(a.key,i)),this.indexManager.addToCollectionParentIndex(t,a.key.path.popLast());return Oe.resolve(s)}lookupMutationBatch(t,n){return Oe.resolve(this.Sr(n))}getNextMutationBatchAfterBatchId(t,n){const r=n+1,o=this.br(r),i=o<0?0:o;return Oe.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}getHighestUnacknowledgedBatchId(){return Oe.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(t){return Oe.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(t,n){const r=new wr(n,0),o=new wr(n,Number.POSITIVE_INFINITY),i=[];return this.wr.forEachInRange([r,o],s=>{const a=this.Sr(s.pr);i.push(a)}),Oe.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(t,n){let r=new Vr(Qt);return n.forEach(o=>{const i=new wr(o,0),s=new wr(o,Number.POSITIVE_INFINITY);this.wr.forEachInRange([i,s],a=>{r=r.add(a.pr)})}),Oe.resolve(this.Dr(r))}getAllMutationBatchesAffectingQuery(t,n){const r=n.path,o=r.length+1;let i=r;ct.isDocumentKey(i)||(i=i.child(""));const s=new wr(new ct(i),0);let a=new Vr(Qt);return this.wr.forEachWhile(l=>{const u=l.key.path;return!!r.isPrefixOf(u)&&(u.length===o&&(a=a.add(l.pr)),!0)},s),Oe.resolve(this.Dr(a))}Dr(t){const n=[];return t.forEach(r=>{const o=this.Sr(r);o!==null&&n.push(o)}),n}removeMutationBatch(t,n){gn(this.Cr(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.wr;return Oe.forEach(n.mutations,o=>{const i=new wr(o.key,n.batchId);return r=r.delete(i),this.referenceDelegate.markPotentiallyOrphaned(t,o.key)}).next(()=>{this.wr=r})}Mn(t){}containsKey(t,n){const r=new wr(n,0),o=this.wr.firstAfterOrEqual(r);return Oe.resolve(n.isEqual(o&&o.key))}
2659performConsistencyCheck(t){return this.mutationQueue.length,Oe.resolve()}Cr(t,n){return this.br(t)}br(t){return this.mutationQueue.length===0?0:t-this.mutationQueue[0].batchId}Sr(t){const n=this.br(t);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/**
2660 * @license
2661 * Copyright 2017 Google LLC
2662 *
2663 * Licensed under the Apache License, Version 2.0 (the "License");
2664 * you may not use this file except in compliance with the License.
2665 * You may obtain a copy of the License at
2666 *
2667 *   http://www.apache.org/licenses/LICENSE-2.0
2668 *
2669 * Unless required by applicable law or agreed to in writing, software
2670 * distributed under the License is distributed on an "AS IS" BASIS,
2671 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2672 * See the License for the specific language governing permissions and
2673 * limitations under the License.
2674 */class X1e{constructor(t){this.vr=t,this.docs=function(){return new Ln(ct.comparator)}(),this.size=0}setIndexManager(t){this.indexManager=t}addEntry(t,n){const r=n.key,o=this.docs.get(r),i=o?o.size:0,s=this.vr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(t,r.path.popLast())}removeEntry(t){const n=this.docs.get(t);n&&(this.docs=this.docs.remove(t),this.size-=n.size)}getEntry(t,n){const r=this.docs.get(n);return Oe.resolve(r?r.document.mutableCopy():ro.newInvalidDocument(n))}getEntries(t,n){let r=xl();return n.forEach(o=>{const i=this.docs.get(o);r=r.insert(o,i?i.document.mutableCopy():ro.newInvalidDocument(o))}),Oe.resolve(r)}getDocumentsMatchingQuery(t,n,r,o){let i=xl();const s=n.path,a=new ct(s.child("")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){const{key:u,value:{document:c}}=l.getNext();if(!s.isPrefixOf(u.path))break;u.path.length>s.length+1||$we(Dwe(c),r)<=0||(o.has(c.key)||wx(n,c))&&(i=i.insert(c.key,c.mutableCopy()))}return Oe.resolve(i)}getAllFromCollectionGroup(t,n,r,o){ht()}Fr(t,n){return Oe.forEach(this.docs,r=>n(r))}newChangeBuffer(t){return new J1e(this)}getSize(t){return Oe.resolve(this.size)}}class J1e extends W1e{constructor(t){super(),this.ar=t}applyChanges(t){const n=[];
2674return this.changes.forEach((r,o)=>{o.isValidDocument()?n.push(this.ar.addEntry(t,o)):this.ar.removeEntry(r)}),Oe.waitFor(n)}getFromCache(t,n){return this.ar.getEntry(t,n)}getAllFromCache(t,n){return this.ar.getEntries(t,n)}}/**
2675 * @license
2676 * Copyright 2017 Google LLC
2677 *
2678 * Licensed under the Apache License, Version 2.0 (the "License");
2679 * you may not use this file except in compliance with the License.
2680 * You may obtain a copy of the License at
2681 *
2682 *   http://www.apache.org/licenses/LICENSE-2.0
2683 *
2684 * Unless required by applicable law or agreed to in writing, software
2685 * distributed under the License is distributed on an "AS IS" BASIS,
2686 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2687 * See the License for the specific language governing permissions and
2688 * limitations under the License.
2689 */class Z1e{constructor(t){this.persistence=t,this.Mr=new ip(n=>SR(n),_R),this.lastRemoteSnapshotVersion=vt.min(),this.highestTargetId=0,this.Or=0,this.Nr=new kR,this.targetCount=0,this.Lr=Ah.Nn()}forEachTarget(t,n){return this.Mr.forEach((r,o)=>n(o)),Oe.resolve()}getLastRemoteSnapshotVersion(t){return Oe.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(t){return Oe.resolve(this.Or)}allocateTargetId(t){return this.highestTargetId=this.Lr.next(),Oe.resolve(this.highestTargetId)}setTargetsMetadata(t,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Or&&(this.Or=n),Oe.resolve()}qn(t){this.Mr.set(t.target,t);const n=t.targetId;n>this.highestTargetId&&(this.Lr=new Ah(n),this.highestTargetId=n),t.sequenceNumber>this.Or&&(this.Or=t.sequenceNumber)}addTargetData(t,n){return this.qn(n),this.targetCount+=1,Oe.resolve()}updateTargetData(t,n){return this.qn(n),Oe.resolve()}removeTargetData(t,n){return this.Mr.delete(n.target),this.Nr.Vr(n.targetId),this.targetCount-=1,Oe.resolve()}removeTargets(t,n,r){let o=0;const i=[];return this.Mr.forEach((s,a)=>{a.sequenceNumber<=n&&r.get(a.targetId)===null&&(this.Mr.delete(s),i.push(this.removeMatchingKeysForTargetId(t,a.targetId)),o++)}),Oe.waitFor(i).next(()=>o)}getTargetCount(t){return Oe.resolve(this.targetCount)}getTargetData(t,n){const r=this.Mr.get(n)||null;return Oe.resolve(r)}addMatchingKeys(t,n,r){return this.Nr.dr(n,r),Oe.resolve()}removeMatchingKeys(t,n,r){this.Nr.Rr(n,r);const o=this.persistence.referenceDelegate,i=[];return o&&n.forEach(s=>{i.push(o.markPotentiallyOrphaned(t,s))}),Oe.waitFor(i)}removeMatchingKeysForTargetId(t,n){return this.Nr.Vr(n),Oe.resolve()}getMatchingKeysForTargetId(t,n){const r=this.Nr.gr(n);return Oe.resolve(r)}containsKey(t,n){return Oe.resolve(this.Nr.containsKey(n))}}/**
2690 * @license
2691 * Copyright 2017 Google LLC
2692 *
2693 * Licensed under the Apache License, Version 2.0 (the "License");
2694 * you may not use this file except in compliance with the License.
2695 * You may obtain a copy of the License at
2696 *
2697 *   http://www.apache.org/licenses/LICENSE-2.0
2698 *
2699 * Unless required by applicable law or agreed to in writing, software
2700 * distributed under the License is distributed on an "AS IS" BASIS,
2701 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2702 * See the License for the specific language governing permissions and
2703 * limitations under the License.
2704 */class eCe{constructor(t,n){this.Br={},this.overlays={},this.kr=new bR(0),this.qr=!1,this.qr=!0,this.referenceDelegate=t(this),this.Qr=new Z1e(this),this.indexManager=new U1e,this.remoteDocumentCache=function(o){return new X1e(o)}(r=>this.referenceDelegate.Kr(r)),this.serializer=new j1e(n),this.$r=new K1e(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(t){return this.indexManager}getDocumentOverlayCache(t){let n=this.overlays[t.toKey()];return n||(n=new Q1e,this.overlays[t.toKey()]=n),n}getMutationQueue(t,n){let r=this.Br[t.toKey()];return r||(r=new Y1e(n,this.referenceDelegate),this.Br[t.toKey()]=r),r}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(t,n,r){ze("MemoryPersistence","Starting transaction:",t);const o=new tCe(this.kr.next());return this.referenceDelegate.Ur(),r(o).next(i=>this.referenceDelegate.Wr(o).next(()=>i)).toPromise().then(i=>(o.raiseOnCommittedEvent(),i))}Gr(t,n){return Oe.or(Object.values(this.Br).map(r=>()=>r.containsKey(t,n)))}}class tCe extends Lwe{constructor(t){super(),this.currentSequenceNumber=t}}class PR{constructor(t){this.persistence=t,this.zr=new kR,this.jr=null}static Hr(t){return new PR(t)}get Jr(){if(this.jr)return this.jr;throw ht()}addReference(t,n,r){return this.zr.addReference(r,n),this.Jr.delete(r.toString()),Oe.resolve()}removeReference(t,n,r){return this.zr.removeReference(r,n),this.Jr.add(r.toString()),Oe.resolve()}markPotentiallyOrphaned(t,n){return this.Jr.add(n.toString()),Oe.resolve()}
2704removeTarget(t,n){this.zr.Vr(n.targetId).forEach(o=>this.Jr.add(o.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(t,n.targetId).next(o=>{o.forEach(i=>this.Jr.add(i.toString()))}).next(()=>r.removeTargetData(t,n))}Ur(){this.jr=new Set}Wr(t){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Oe.forEach(this.Jr,r=>{const o=ct.fromPath(r);return this.Yr(t,o).next(i=>{i||n.removeEntry(o,vt.min())})}).next(()=>(this.jr=null,n.apply(t)))}updateLimboDocument(t,n){return this.Yr(t,n).next(r=>{r?this.Jr.delete(n.toString()):this.Jr.add(n.toString())})}Kr(t){return 0}Yr(t,n){return Oe.or([()=>Oe.resolve(this.zr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(t,n),()=>this.persistence.Gr(t,n)])}}/**
2705 * @license
2706 * Copyright 2017 Google LLC
2707 *
2708 * Licensed under the Apache License, Version 2.0 (the "License");
2709 * you may not use this file except in compliance with the License.
2710 * You may obtain a copy of the License at
2711 *
2712 *   http://www.apache.org/licenses/LICENSE-2.0
2713 *
2714 * Unless required by applicable law or agreed to in writing, software
2715 * distributed under the License is distributed on an "AS IS" BASIS,
2716 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2717 * See the License for the specific language governing permissions and
2718 * limitations under the License.
2719 */class TR{constructor(t,n,r,o){this.targetId=t,this.fromCache=n,this.qi=r,this.Qi=o}static Ki(t,n){let r=Tt(),o=Tt();for(const i of n.docChanges)switch(i.type){case 0:r=r.add(i.doc.key);break;case 1:o=o.add(i.doc.key)}return new TR(t,n.fromCache,r,o)}}/**
2720 * @license
2721 * Copyright 2023 Google LLC
2722 *
2723 * Licensed under the Apache License, Version 2.0 (the "License");
2724 * you may not use this file except in compliance with the License.
2725 * You may obtain a copy of the License at
2726 *
2727 *   http://www.apache.org/licenses/LICENSE-2.0
2728 *
2729 * Unless required by applicable law or agreed to in writing, software
2730 * distributed under the License is distributed on an "AS IS" BASIS,
2731 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2732 * See the License for the specific language governing permissions and
2733 * limitations under the License.
2734 */class nCe{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(t){this._documentReadCount+=t}}/**
2735 * @license
2736 * Copyright 2019 Google LLC
2737 *
2738 * Licensed under the Apache License, Version 2.0 (the "License");
2739 * you may not use this file except in compliance with the License.
2740 * You may obtain a copy of the License at
2741 *
2742 *   http://www.apache.org/licenses/LICENSE-2.0
2743 *
2744 * Unless required by applicable law or agreed to in writing, software
2745 * distributed under the License is distributed on an "AS IS" BASIS,
2746 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2747 * See the License for the specific language governing permissions and
2748 * limitations under the License.
2749 */class rCe{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function(){return Bge()?8:Cc.v(ur())>0?6:4}()}initialize(t,n){this.zi=t,this.indexManager=n,this.$i=!0}getDocumentsMatchingQuery(t,n,r,o){const i={result:null};return this.ji(t,n).next(s=>{i.result=s}).next(()=>{if(!i.result)return this.Hi(t,n,o,r).next(s=>{i.result=s})}).next(()=>{if(i.result)return;const s=new nCe;return this.Ji(t,n,s).next(a=>{if(i.result=a,this.Ui)return this.Yi(t,n,s,a.size)})}).next(()=>i.result)}Yi(t,n,r,o){return r.documentReadCount<this.Wi?(Bp()<=Mt.DEBUG&&ze("QueryEngine","SDK will not create cache indexes for query:",Xd(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Wi,"documents"),Oe.resolve()):(Bp()<=Mt.DEBUG&&ze("QueryEngine","Query:",Xd(n),"scans",r.documentReadCount,"local documents and returns",o,"documents as results."),r.documentReadCount>this.Gi*o?(Bp()<=Mt.DEBUG&&ze("QueryEngine","The SDK decides to create cache indexes for query:",Xd(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(t,wa(n))):Oe.resolve())}ji(t,n){if(CL(n))return Oe.resolve(null);let r=wa(n);return this.indexManager.getIndexType(t,r).next(o=>o===0?null:(n.limit!==null&&o===1&&(n=gA(n,null,"F"),r=wa(n)),this.indexManager.getDocumentsMatchingTarget(t,r).next(i=>
2749{const s=Tt(...i);return this.zi.getDocuments(t,s).next(a=>this.indexManager.getMinOffset(t,r).next(l=>{const u=this.Zi(n,a);return this.Xi(n,u,s,l.readTime)?this.ji(t,gA(n,null,"F")):this.es(t,u,n,l)}))})))}Hi(t,n,r,o){return CL(n)||o.isEqual(vt.min())?Oe.resolve(null):this.zi.getDocuments(t,r).next(i=>{const s=this.Zi(n,i);return this.Xi(n,s,r,o)?Oe.resolve(null):(Bp()<=Mt.DEBUG&&ze("QueryEngine","Re-using previous result from %s to execute query: %s",o.toString(),Xd(n)),this.es(t,s,n,Mwe(o,-1)).next(a=>a))})}Zi(t,n){let r=new Vr(CH(t));return n.forEach((o,i)=>{wx(t,i)&&(r=r.add(i))}),r}Xi(t,n,r,o){if(t.limit===null)return!1;if(r.size!==n.size)return!0;const i=t.limitType==="F"?n.last():n.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(o)>0)}Ji(t,n,r){return Bp()<=Mt.DEBUG&&ze("QueryEngine","Using full collection scan to execute query:",Xd(n)),this.zi.getDocumentsMatchingQuery(t,n,Fu.min(),r)}es(t,n,r,o){return this.zi.getDocumentsMatchingQuery(t,r,o).next(i=>(n.forEach(s=>{i=i.insert(s.key,s)}),i))}}/**
2750 * @license
2751 * Copyright 2020 Google LLC
2752 *
2753 * Licensed under the Apache License, Version 2.0 (the "License");
2754 * you may not use this file except in compliance with the License.
2755 * You may obtain a copy of the License at
2756 *
2757 *   http://www.apache.org/licenses/LICENSE-2.0
2758 *
2759 * Unless required by applicable law or agreed to in writing, software
2760 * distributed under the License is distributed on an "AS IS" BASIS,
2761 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2762 * See the License for the specific language governing permissions and
2763 * limitations under the License.
2764 */class oCe{constructor(t,n,r,o){this.persistence=t,this.ts=n,this.serializer=o,this.ns=new Ln(Qt),this.rs=new ip(i=>SR(i),_R),this.ss=new Map,this.os=t.getRemoteDocumentCache(),this.Qr=t.getTargetCache(),this.$r=t.getBundleCache(),this._s(r)}_s(t){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(t),this.indexManager=this.persistence.getIndexManager(t),this.mutationQueue=this.persistence.getMutationQueue(t,this.indexManager),this.localDocuments=new q1e(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(t){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>t.collect(n,this.ns))}}function iCe(e,t,n,r){return new oCe(e,t,n,r)}async function HH(e,t){const n=wt(e);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let o;
2764return n.mutationQueue.getAllMutationBatches(r).next(i=>(o=i,n._s(t),n.mutationQueue.getAllMutationBatches(r))).next(i=>{const s=[],a=[];let l=Tt();for(const u of o){s.push(u.batchId);for(const c of u.mutations)l=l.add(c.key)}for(const u of i){a.push(u.batchId);for(const c of u.mutations)l=l.add(c.key)}return n.localDocuments.getDocuments(r,l).next(u=>({us:u,removedBatchIds:s,addedBatchIds:a}))})})}function sCe(e,t){const n=wt(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const o=t.batch.keys(),i=n.os.newChangeBuffer({trackRemovals:!0});return function(a,l,u,c){const d=u.batch,f=d.keys();let h=Oe.resolve();return f.forEach(p=>{h=h.next(()=>c.getEntry(l,p)).next(g=>{const b=u.docVersions.get(p);gn(b!==null),g.version.compareTo(b)<0&&(d.applyToRemoteDocument(g,u),g.isValidDocument()&&(g.setReadTime(u.commitVersion),c.addEntry(g)))})}),h.next(()=>a.mutationQueue.removeMutationBatch(l,d))}(n,r,t,i).next(()=>i.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,o,t.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(a){let l=Tt();for(let u=0;u<a.mutationResults.length;++u)a.mutationResults[u].transformResults.length>0&&(l=l.add(a.batch.mutations[u].key));return l}(t))).next(()=>n.localDocuments.getDocuments(r,o))})}function WH(e){const t=wt(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",n=>t.Qr.getLastRemoteSnapshotVersion(n))}function aCe(e,t){const n=wt(e),r=t.snapshotVersion;let o=n.ns;return n.persistence.runTransaction("Apply remote event","readwrite-primary",i=>{const s=n.os.newChangeBuffer({trackRemovals:!0});o=n.ns;const a=[];
2764t.targetChanges.forEach((c,d)=>{const f=o.get(d);if(!f)return;a.push(n.Qr.removeMatchingKeys(i,c.removedDocuments,d).next(()=>n.Qr.addMatchingKeys(i,c.addedDocuments,d)));let h=f.withSequenceNumber(i.currentSequenceNumber);t.targetMismatches.get(d)!==null?h=h.withResumeToken(ho.EMPTY_BYTE_STRING,vt.min()).withLastLimboFreeSnapshotVersion(vt.min()):c.resumeToken.approximateByteSize()>0&&(h=h.withResumeToken(c.resumeToken,r)),o=o.insert(d,h),function(g,b,y){return g.resumeToken.approximateByteSize()===0||b.snapshotVersion.toMicroseconds()-g.snapshotVersion.toMicroseconds()>=3e8?!0:y.addedDocuments.size+y.modifiedDocuments.size+y.removedDocuments.size>0}(f,h,c)&&a.push(n.Qr.updateTargetData(i,h))});let l=xl(),u=Tt();if(t.documentUpdates.forEach(c=>{t.resolvedLimboDocuments.has(c)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(i,c))}),a.push(lCe(i,s,t.documentUpdates).next(c=>{l=c.cs,u=c.ls})),!r.isEqual(vt.min())){const c=n.Qr.getLastRemoteSnapshotVersion(i).next(d=>n.Qr.setTargetsMetadata(i,i.currentSequenceNumber,r));a.push(c)}return Oe.waitFor(a).next(()=>s.apply(i)).next(()=>n.localDocuments.getLocalViewOfDocuments(i,l,u)).next(()=>l)}).then(i=>(n.ns=o,i))}function lCe(e,t,n){let r=Tt(),o=Tt();return n.forEach(i=>r=r.add(i)),t.getEntries(e,r).next(i=>{let s=xl();return n.forEach((a,l)=>{const u=i.get(a);l.isFoundDocument()!==u.isFoundDocument()&&(o=o.add(a)),l.isNoDocument()&&l.version.isEqual(vt.min())?(t.removeEntry(a,l.readTime),s=s.insert(a,l)):!u.isValidDocument()||l.version.compareTo(u.version)>0||l.version.compareTo(u.version)===0&&u.hasPendingWrites?(t.addEntry(l),s=s.insert(a,l)):ze("LocalStore","Ignoring outdated watch update for ",a,". Current version:",u.version," Watch version:",l.version)}),{cs:s,ls:o}})}function uCe(e,t){const n=wt(e);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(t===void 0&&(t=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,t)))}function cCe(e,t){const n=wt(e);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let o;return n.Qr.getTargetData(r,t).next(i=>i?(o=i,Oe.resolve(o)):n.Qr.allocateTargetId(r).next(s=>(o=new hu(t,s,"TargetPurposeListen",r.currentSequenceNumber),n.Qr.addTargetData(r,o).next(()=>o))))}).then(r=>{const o=n.ns.get(r.targetId);return(o===null||r.snapshotVersion.compareTo(o.snapshotVersion)>0)&&(n.ns=n.ns.insert(r.targetId,r),n.rs.set(t,r.targetId)),r})}async function CA(e,t,n){const r=wt(e),o=r.ns.get(t),i=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",i,s=>r.persistence.referenceDelegate.removeTarget(s,o))}catch(s){if(!Ny(s))throw s;ze("LocalStore",`Failed to update sequence numbers for target ${t}: ${s}`)}r.ns=r.ns.remove(t),r.rs.delete(o.target)}function OL(e,t,n){const r=wt(e);let o=vt.min(),i=Tt();return r.persistence.runTransaction("Execute query","readwrite",s=>function(l,u,c){const d=wt(l),f=d.rs.get(c);return f!==void 0?Oe.resolve(d.ns.get(f)):d.Qr.getTargetData(u,c)}(r,s,wa(t)).next(a=>{if(a)return o=a.lastLimboFreeSnapshotVersion,r.Qr.getMatchingKeysForTargetId(s,a.targetId).next(l=>{i=l})}).next(()=>r.ts.getDocumentsMatchingQuery(s,t,n?o:vt.min(),n?i:Tt())).next(a=>(dCe(r,n1e(t),a),{documents:a,hs:i})))}function dCe(e,t,n){let r=e.ss.get(t)||vt.min();n.forEach((o,i)=>{i.readTime.compareTo(r)>0&&(r=i.readTime)}),e.ss.set(t,r)}class ML{constructor(){this.activeTargetIds=l1e()}As(t){this.activeTargetIds=this.activeTargetIds.add(t)}Rs(t){this.activeTargetIds=this.activeTargetIds.delete(t)}ds(){const t={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(t)}}class fCe{constructor(){this.no=new ML,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(t){}updateMutationState(t,n,r){}addLocalQueryTarget(t){return this.no.As(t),this.ro[t]||"not-current"}updateQueryState(t,n,r){this.ro[t]=n}removeLocalQueryTarget(t){this.no.Rs(t)}isLocalQueryTarget(t){return this.no.activeTargetIds.has(t)}clearQueryState(t){delete this.ro[t]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(t){return this.no.activeTargetIds.has(t)}start(){return this.no=new ML,Promise.resolve()}handleUserChange(t,n,r){}setOnlineState(t){}shutdown(){}writeSequenceNumber(t){}notifyBundleLoaded(t){}}/**
2765 * @license
2766 * Copyright 2019 Google LLC
2767 *
2768 * Licensed under the Apache License, Version 2.0 (the "License");
2769 * you may not use this file except in compliance with the License.
2770 * You may obtain a copy of the License at
2771 *
2772 *   http://www.apache.org/licenses/LICENSE-2.0
2773 *
2774 * Unless required by applicable law or agreed to in writing, software
2775 * distributed under the License is distributed on an "AS IS" BASIS,
2776 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2777 * See the License for the specific language governing permissions and
2778 * limitations under the License.
2779 */class hCe{io(t){}shutdown(){}}/**
2780 * @license
2781 * Copyright 2019 Google LLC
2782 *
2783 * Licensed under the Apache License, Version 2.0 (the "License");
2784 * you may not use this file except in compliance with the License.
2785 * You may obtain a copy of the License at
2786 *
2787 *   http://www.apache.org/licenses/LICENSE-2.0
2788 *
2789 * Unless required by applicable law or agreed to in writing, software
2790 * distributed under the License is distributed on an "AS IS" BASIS,
2791 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2792 * See the License for the specific language governing permissions and
2793 * limitations under the License.
2794 */class DL{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(t){this.uo.push(t)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){ze("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const t of this.uo)t(0)}ao(){ze("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const t of this.uo)t(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/**
2795 * @license
2796 * Copyright 2023 Google LLC
2797 *
2798 * Licensed under the Apache License, Version 2.0 (the "License");
2799 * you may not use this file except in compliance with the License.
2800 * You may obtain a copy of the License at
2801 *
2802 *   http://www.apache.org/licenses/LICENSE-2.0
2803 *
2804 * Unless required by applicable law or agreed to in writing, software
2805 * distributed under the License is distributed on an "AS IS" BASIS,
2806 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2807 * See the License for the specific language governing permissions and
2808 * limitations under the License.
2809 */let nb=null;function E_(){return nb===null?nb=function(){return 268435456+Math.round(2147483648*Math.random())}():nb++,"0x"+nb.toString(16)}/**
2810 * @license
2811 * Copyright 2020 Google LLC
2812 *
2813 * Licensed under the Apache License, Version 2.0 (the "License");
2814 * you may not use this file except in compliance with the License.
2815 * You may obtain a copy of the License at
2816 *
2817 *   http://www.apache.org/licenses/LICENSE-2.0
2818 *
2819 * Unless required by applicable law or agreed to in writing, software
2820 * distributed under the License is distributed on an "AS IS" BASIS,
2821 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2822 * See the License for the specific language governing permissions and
2823 * limitations under the License.
2824 */const pCe={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/**
2825 * @license
2826 * Copyright 2017 Google LLC
2827 *
2828 * Licensed under the Apache License, Version 2.0 (the "License");
2829 * you may not use this file except in compliance with the License.
2830 * You may obtain a copy of the License at
2831 *
2832 *   http://www.apache.org/licenses/LICENSE-2.0
2833 *
2834 * Unless required by applicable law or agreed to in writing, software
2835 * distributed under the License is distributed on an "AS IS" BASIS,
2836 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2837 * See the License for the specific language governing permissions and
2838 * limitations under the License.
2839 */class mCe{constructor(t){this.lo=t.lo,this.ho=t.ho}Po(t){this.Io=t}To(t){this.Eo=t}onMessage(t){this.Ao=t}close(){this.ho()}send(t){this.lo(t)}Ro(){this.Io()}Vo(t){this.Eo(t)}mo(t){this.Ao(t)}}/**
2840 * @license
2841 * Copyright 2017 Google LLC
2842 *
2843 * Licensed under the Apache License, Version 2.0 (the "License");
2844 * you may not use this file except in compliance with the License.
2845 * You may obtain a copy of the License at
2846 *
2847 *   http://www.apache.org/licenses/LICENSE-2.0
2848 *
2849 * Unless required by applicable law or agreed to in writing, software
2850 * distributed under the License is distributed on an "AS IS" BASIS,
2851 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2852 * See the License for the specific language governing permissions and
2853 * limitations under the License.
2854 */const qr="WebChannelConnection";class gCe extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",o=encodeURIComponent(this.databaseId.projectId),i=encodeURIComponent(this.databaseId.database);this.fo=r+"://"+n.host,this.po=`projects/${o}/databases/${i}`,this.yo=this.databaseId.database==="(default)"?`project_id=${o}`:`project_id=${o}&database_id=${i}`}get wo(){return!1}So(n,r,o,i,s){const a=E_(),l=this.bo(n,r.toUriEncodedString());ze("RestConnection",`Sending RPC '${n}' ${a}:`,l,o);const u={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(u,i,s),this.Co(n,l,u,o).then(c=>(ze("RestConnection",`Received RPC '${n}' ${a}: `,c),c),c=>{throw xh("RestConnection",`RPC '${n}' ${a} failed with error: `,c,"url: ",l,"request:",o),c})}vo(n,r,o,i,s,a){return this.So(n,r,o,i,s)}Do(n,r,o){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+rp}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((i,s)=>n[s]=i),o&&o.headers.forEach((i,s)=>n[s]=i)}bo(n,r){const o=pCe[n];return`${this.fo}/v1/${r}:${o}`}terminate(){}}{constructor(t){super(t),this.forceLongPolling=t.forceLongPolling,this.autoDetectLongPolling=t.autoDetectLongPolling,this.useFetchStreams=t.useFetchStreams,this.longPollingOptions=t.longPollingOptions}Co(t,n,r,o){const i=E_();return new Promise((s,a)=>{const l=new xwe;l.setWithCredentials(!0),l.listenOnce(wwe.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case S_.NO_ERROR:const c=l.getResponseJson();ze(qr,`XHR for RPC '${t}' ${i} received:`,JSON.stringify(c)),s(c);break;case S_.TIMEOUT:ze(qr,`RPC '${t}' ${i} timed out`),a(new Ge(Pe.DEADLINE_EXCEEDED,"Request time out"));break;case S_.HTTP_ERROR:const d=l.getStatus();if(ze(qr,`RPC '${t}' ${i} failed with status:`,d,"response text:",l.getResponseText()),d>0){let f=l.getResponseJson();Array.isArray(f)&&(f=f[0]);const h=f==null?void 0:f.error;if(h&&h.status&&h.message){const p=function(b){const y=b.toLowerCase().replace(/_/g,"-");return Object.values(Pe).indexOf(y)>=0?y:Pe.UNKNOWN}(h.status);a(new Ge(p,h.message))}else a(new Ge(Pe.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new Ge(Pe.UNAVAILABLE,"Connection failed."));break;default:ht()}}finally{ze(qr,`RPC '${t}' ${i} completed.`)}});const u=JSON.stringify(o);ze(qr,`RPC '${t}' ${i} sending request:`,o),l.send(n,"POST",u,r,15)})}Fo(t,n,r){const o=E_(),i=[this.fo,"/","google.firestore.v1.Firestore","/",t,"/channel"],s=vwe(),a=bwe(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},u=this.longPollingOptions.timeoutSeconds;u!==void 0&&(l.longPollingTimeout=Math.round(1e3*u)),this.useFetchStreams&&(l.useFetchStreams=!0),this.Do(l.initMessageHeaders,n,r),l.encodeInitMessageHeaders=!0;const c=i.join("");ze(qr,`Creating RPC '${t}' stream ${o}: ${c}`,l);const d=s.createWebChannel(c,l);let f=!1,h=!1;const p=new mCe({lo:b=>{h?ze(qr,`Not sending because RPC '${t}' stream ${o} is closed:`,b):(f||(ze(qr,`Opening RPC '${t}' stream ${o} transport.`),d.open(),f=!0),ze(qr,`RPC '${t}' stream ${o} sending:`,b),d.send(b))},ho:()=>d.close()}),g=(b,y,v)=>{b.listen(y,w=>{try{v(w)}catch(C){setTimeout(()=>{throw C},0)}})};return g(d,Zv.EventType.OPEN,()=>{h||ze(qr,`RPC '${t}' stream ${o} transport opened.`)}),g(d,Zv.EventType.CLOSE,()=>{h||(h=!0,ze(qr,`RPC '${t}' stream ${o} transport closed`),p.Vo())}
2854),g(d,Zv.EventType.ERROR,b=>{h||(h=!0,xh(qr,`RPC '${t}' stream ${o} transport errored:`,b),p.Vo(new Ge(Pe.UNAVAILABLE,"The operation could not be completed")))}),g(d,Zv.EventType.MESSAGE,b=>{var y;if(!h){const v=b.data[0];gn(!!v);const w=v,C=w.error||((y=w[0])===null||y===void 0?void 0:y.error);if(C){ze(qr,`RPC '${t}' stream ${o} received error:`,C);const A=C.status;let S=function(M){const R=tr[M];if(R!==void 0)return DH(R)}(A),_=C.message;S===void 0&&(S=Pe.INTERNAL,_="Unknown error status: "+A+" with message "+C.message),h=!0,p.Vo(new Ge(S,_)),d.close()}else ze(qr,`RPC '${t}' stream ${o} received:`,v),p.mo(v)}}),g(a,Cwe.STAT_EVENT,b=>{b.stat===uL.PROXY?ze(qr,`RPC '${t}' stream ${o} detected buffering proxy`):b.stat===uL.NOPROXY&&ze(qr,`RPC '${t}' stream ${o} detected no buffering proxy`)}),setTimeout(()=>{p.Ro()},0),p}}function I_(){return typeof document<"u"?document:null}/**
2855 * @license
2856 * Copyright 2020 Google LLC
2857 *
2858 * Licensed under the Apache License, Version 2.0 (the "License");
2859 * you may not use this file except in compliance with the License.
2860 * You may obtain a copy of the License at
2861 *
2862 *   http://www.apache.org/licenses/LICENSE-2.0
2863 *
2864 * Unless required by applicable law or agreed to in writing, software
2865 * distributed under the License is distributed on an "AS IS" BASIS,
2866 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2867 * See the License for the specific language governing permissions and
2868 * limitations under the License.
2869 */function Ex(e){return new A1e(e,!0)}/**
2870 * @license
2871 * Copyright 2017 Google LLC
2872 *
2873 * Licensed under the Apache License, Version 2.0 (the "License");
2874 * you may not use this file except in compliance with the License.
2875 * You may obtain a copy of the License at
2876 *
2877 *   http://www.apache.org/licenses/LICENSE-2.0
2878 *
2879 * Unless required by applicable law or agreed to in writing, software
2880 * distributed under the License is distributed on an "AS IS" BASIS,
2881 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2882 * See the License for the specific language governing permissions and
2883 * limitations under the License.
2884 */class GH{constructor(t,n,r=1e3,o=1.5,i=6e4){this.oi=t,this.timerId=n,this.Mo=r,this.xo=o,this.Oo=i,this.No=0,this.Lo=null,this.Bo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(t){this.cancel();const n=Math.floor(this.No+this.Qo()),r=Math.max(0,Date.now()-this.Bo),o=Math.max(0,n-r);o>0&&ze("ExponentialBackoff",`Backing off for ${o} ms (base delay: ${this.No} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.Lo=this.oi.enqueueAfterDelay(this.timerId,o,()=>(this.Bo=Date.now(),t())),this.No*=this.xo,this.No<this.Mo&&(this.No=this.Mo),this.No>this.Oo&&(this.No=this.Oo)}Ko(){this.Lo!==null&&(this.Lo.skipDelay(),this.Lo=null)}cancel(){this.Lo!==null&&(this.Lo.cancel(),this.Lo=null)}Qo(){return(Math.random()-.5)*this.No}}/**
2885 * @license
2886 * Copyright 2017 Google LLC
2887 *
2888 * Licensed under the Apache License, Version 2.0 (the "License");
2889 * you may not use this file except in compliance with the License.
2890 * You may obtain a copy of the License at
2891 *
2892 *   http://www.apache.org/licenses/LICENSE-2.0
2893 *
2894 * Unless required by applicable law or agreed to in writing, software
2895 * distributed under the License is distributed on an "AS IS" BASIS,
2896 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2897 * See the License for the specific language governing permissions and
2898 * limitations under the License.
2899 */class qH{constructor(t,n,r,o,i,s,a,l){this.oi=t,this.$o=r,this.Uo=o,this.connection=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=l,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new GH(t,n)}Ho(){return this.state===1||this.state===5||this.Jo()}Jo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.Yo()}async stop(){this.Ho()&&await this.close(0)}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&this.Go===null&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,()=>this.e_()))}t_(t){this.n_(),this.stream.send(t)}async e_(){if(this.Jo())return this.close(0)}
2899n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}async close(t,n){this.n_(),this.r_(),this.jo.cancel(),this.Wo++,t!==4?this.jo.reset():n&&n.code===Pe.RESOURCE_EXHAUSTED?(Ia(n.toString()),Ia("Using maximum backoff delay to prevent overloading the backend."),this.jo.ko()):n&&n.code===Pe.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.i_(),this.stream.close(),this.stream=null),this.state=t,await this.listener.To(n)}i_(){}auth(){this.state=1;const t=this.s_(this.Wo),n=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,o])=>{this.Wo===n&&this.o_(r,o)},r=>{t(()=>{const o=new Ge(Pe.UNKNOWN,"Fetching auth token failed: "+r.message);return this.__(o)})})}o_(t,n){const r=this.s_(this.Wo);this.stream=this.a_(t,n),this.stream.Po(()=>{r(()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,()=>(this.Jo()&&(this.state=3),Promise.resolve())),this.listener.Po()))}),this.stream.To(o=>{r(()=>this.__(o))}),this.stream.onMessage(o=>{r(()=>this.onMessage(o))})}Yo(){this.state=5,this.jo.qo(async()=>{this.state=0,this.start()})}__(t){return ze("PersistentStream",`close with error: ${t}`),this.stream=null,this.close(4,t)}s_(t){return n=>{this.oi.enqueueAndForget(()=>this.Wo===t?n():(ze("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class yCe extends qH{constructor(t,n,r,o,i,s){super(t,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,o,s),this.serializer=i}a_(t,n){return this.connection.Fo("Listen",t,n)}onMessage(t){this.jo.reset();const n=T1e(this.serializer,t),r=function(i){if(!("targetChange"in i))return vt.min();const s=i.targetChange;return s.targetIds&&s.targetIds.length?vt.min():s.readTime?Ca(s.readTime):vt.min()}(t);return this.listener.u_(n,r)}c_(t){const n={};n.database=wA(this.serializer),n.addTarget=function(i,s){let a;const l=s.target;if(a=pA(l)?{documents:M1e(i,l)}:{query:D1e(i,l).ut},a.targetId=s.targetId,s.resumeToken.approximateByteSize()>0){a.resumeToken=LH(i,s.resumeToken);const u=yA(i,s.expectedCount);u!==null&&(a.expectedCount=u)}else if(s.snapshotVersion.compareTo(vt.min())>0){a.readTime=kw(i,s.snapshotVersion.toTimestamp());const u=yA(i,s.expectedCount);u!==null&&(a.expectedCount=u)}return a}(this.serializer,t);const r=F1e(this.serializer,t);r&&(n.labels=r),this.t_(n)}l_(t){const n={};n.database=wA(this.serializer),n.removeTarget=t,this.t_(n)}}class vCe extends qH{constructor(t,n,r,o,i,s){super(t,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,o,s),this.serializer=i,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(t,n){return this.connection.Fo("Write",t,n)}onMessage(t){if(gn(!!t.streamToken),this.lastStreamToken=t.streamToken,this.h_){this.jo.reset();const n=O1e(t.writeResults,t.commitTime),r=Ca(t.commitTime);return this.listener.T_(r,n)}return gn(!t.writeResults||t.writeResults.length===0),this.h_=!0,this.listener.E_()}d_(){const t={};t.database=wA(this.serializer),this.t_(t)}I_(t){const n={streamToken:this.lastStreamToken,writes:t.map(r=>R1e(this.serializer,r))};this.t_(n)}}/**
2900 * @license
2901 * Copyright 2017 Google LLC
2902 *
2903 * Licensed under the Apache License, Version 2.0 (the "License");
2904 * you may not use this file except in compliance with the License.
2905 * You may obtain a copy of the License at
2906 *
2907 *   http://www.apache.org/licenses/LICENSE-2.0
2908 *
2909 * Unless required by applicable law or agreed to in writing, software
2910 * distributed under the License is distributed on an "AS IS" BASIS,
2911 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2912 * See the License for the specific language governing permissions and
2913 * limitations under the License.
2914 */class bCe extends class{}{constructor(t,n,r,o){super(),this.authCredentials=t,this.appCheckCredentials=n,this.connection=r,this.serializer=o,this.A_=!1}R_(){if(this.A_)throw new Ge(Pe.FAILED_PRECONDITION,"The client has already been terminated.")}So(t,n,r,o){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,s])=>this.connection.So(t,vA(n,r),o,i,s)).catch(i=>{throw i.name==="FirebaseError"?(i.code===Pe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),i):new Ge(Pe.UNKNOWN,i.toString())})}vo(t,n,r,o,i){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,a])=>this.connection.vo(t,vA(n,r),o,s,a,i)).catch(s=>{throw s.name==="FirebaseError"?(s.code===Pe.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Ge(Pe.UNKNOWN,s.toString())})}terminate(){this.A_=!0,this.connection.terminate()}}class wCe{constructor(t,n){this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){this.m_===0&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve())))}S_(t){this.state==="Online"?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${t.toString()}`),this.y_("Offline")))}set(t){this.b_(),this.m_=0,t==="Online"&&(this.g_=!1),this.y_(t)}y_(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))}w_(t){const n=`Could not reach Cloud Firestore backend. ${t}
2915This 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.g_?(Ia(n),this.g_=!1):ze("OnlineStateTracker",n)}b_(){this.f_!==null&&(this.f_.cancel(),this.f_=null)}}/**
2916 * @license
2917 * Copyright 2017 Google LLC
2918 *
2919 * Licensed under the Apache License, Version 2.0 (the "License");
2920 * you may not use this file except in compliance with the License.
2921 * You may obtain a copy of the License at
2922 *
2923 *   http://www.apache.org/licenses/LICENSE-2.0
2924 *
2925 * Unless required by applicable law or agreed to in writing, software
2926 * distributed under the License is distributed on an "AS IS" BASIS,
2927 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2928 * See the License for the specific language governing permissions and
2929 * limitations under the License.
2930 */class CCe{constructor(t,n,r,o,i){this.localStore=t,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=i,this.M_.io(s=>{r.enqueueAndForget(async()=>{_d(this)&&(ze("RemoteStore","Restarting streams for network reachability change."),await async function(l){const u=wt(l);u.v_.add(4),await jy(u),u.x_.set("Unknown"),u.v_.delete(4),await Ix(u)}(this))})}),this.x_=new wCe(r,o)}}async function Ix(e){if(_d(e))for(const t of e.F_)await t(!0)}async function jy(e){for(const t of e.F_)await t(!1)}function KH(e,t){const n=wt(e);n.C_.has(t.targetId)||(n.C_.set(t.targetId,t),DR(n)?MR(n):sp(n).Jo()&&OR(n,t))}function RR(e,t){const n=wt(e),r=sp(n);n.C_.delete(t),r.Jo()&&QH(n,t),n.C_.size===0&&(r.Jo()?r.Xo():_d(n)&&n.x_.set("Unknown"))}function OR(e,t){if(e.O_.Oe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(vt.min())>0){const n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}sp(e).c_(t)}function QH(e,t){e.O_.Oe(t),sp(e).l_(t)}function MR(e){e.O_=new S1e({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),_t:t=>e.C_.get(t)||null,nt:()=>e.datastore.serializer.databaseId}),sp(e).start(),e.x_.p_()}function DR(e){return _d(e)&&!sp(e).Ho()&&e.C_.size>0}function _d(e){return wt(e).v_.size===0}function YH(e){e.O_=void 0}async function xCe(e){e.C_.forEach((t,n)=>{OR(e,t)})}async function SCe(e,t){YH(e),DR(e)?(e.x_.S_(t),MR(e)):e.x_.set("Unknown")}async function _Ce(e,t,n){if(e.x_.set("Online"),t instanceof FH&&t.state===2&&t.cause)try{await async function(o,i){const s=i.cause;for(const a of i.targetIds)o.C_.has(a)&&(await o.remoteSyncer.rejectListen(a,s),o.C_.delete(a),o.O_.removeTarget(a))}(e,t)}catch(r){ze("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),r),await Pw(e,r)}else if(t instanceof qb?e.O_.$e(t):t instanceof $H?e.O_.Je(t):e.O_.Ge(t),!n.isEqual(vt.min()))try{const r=await WH(e.localStore);n.compareTo(r)>=0&&await function(i,s){const a=i.O_.it(s);
2930return a.targetChanges.forEach((l,u)=>{if(l.resumeToken.approximateByteSize()>0){const c=i.C_.get(u);c&&i.C_.set(u,c.withResumeToken(l.resumeToken,s))}}),a.targetMismatches.forEach((l,u)=>{const c=i.C_.get(l);if(!c)return;i.C_.set(l,c.withResumeToken(ho.EMPTY_BYTE_STRING,c.snapshotVersion)),QH(i,l);const d=new hu(c.target,l,u,c.sequenceNumber);OR(i,d)}),i.remoteSyncer.applyRemoteEvent(a)}(e,n)}catch(r){ze("RemoteStore","Failed to raise snapshot:",r),await Pw(e,r)}}async function Pw(e,t,n){if(!Ny(t))throw t;e.v_.add(1),await jy(e),e.x_.set("Offline"),n||(n=()=>WH(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{ze("RemoteStore","Retrying IndexedDB access"),await n(),e.v_.delete(1),await Ix(e)})}function XH(e,t){return t().catch(n=>Pw(e,n,t))}async function Ax(e){const t=wt(e),n=Nu(t);let r=t.D_.length>0?t.D_[t.D_.length-1].batchId:-1;for(;ECe(t);)try{const o=await uCe(t.localStore,r);if(o===null){t.D_.length===0&&n.Xo();break}r=o.batchId,ICe(t,o)}catch(o){await Pw(t,o)}JH(t)&&ZH(t)}function ECe(e){return _d(e)&&e.D_.length<10}function ICe(e,t){e.D_.push(t);const n=Nu(e);n.Jo()&&n.P_&&n.I_(t.mutations)}function JH(e){return _d(e)&&!Nu(e).Ho()&&e.D_.length>0}function ZH(e){Nu(e).start()}async function ACe(e){Nu(e).d_()}async function kCe(e){const t=Nu(e);for(const n of e.D_)t.I_(n.mutations)}async function PCe(e,t,n){const r=e.D_.shift(),o=ER.from(r,t,n);await XH(e,()=>e.remoteSyncer.applySuccessfulWrite(o)),await Ax(e)}async function TCe(e,t){t&&Nu(e).P_&&await async function(r,o){if(function(s){return w1e(s)&&s!==Pe.ABORTED}(o.code)){const i=r.D_.shift();Nu(r).Zo(),await XH(r,()=>r.remoteSyncer.rejectFailedWrite(i.batchId,o)),await Ax(r)}}(e,t),JH(e)&&ZH(e)}async function $L(e,t){const n=wt(e);n.asyncQueue.verifyOperationInProgress(),ze("RemoteStore","RemoteStore received new credentials");const r=_d(n);n.v_.add(3),await jy(n),r&&n.x_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(t),n.v_.delete(3),await Ix(n)}async function RCe(e,t){const n=wt(e);t?(n.v_.delete(2),await Ix(n)):t||(n.v_.add(2),await jy(n),n.x_.set("Unknown"))}function sp(e){return e.N_||(e.N_=function(n,r,o){const i=wt(n);return i.R_(),new yCe(r,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,o)}(e.datastore,e.asyncQueue,{Po:xCe.bind(null,e),To:SCe.bind(null,e),u_:_Ce.bind(null,e)}),e.F_.push(async t=>{t?(e.N_.Zo(),DR(e)?MR(e):e.x_.set("Unknown")):(await e.N_.stop(),YH(e))})),e.N_}function Nu(e){return e.L_||(e.L_=function(n,r,o){const i=wt(n);return i.R_(),new vCe(r,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,o)}(e.datastore,e.asyncQueue,{Po:ACe.bind(null,e),To:TCe.bind(null,e),E_:kCe.bind(null,e),T_:PCe.bind(null,e)}),e.F_.push(async t=>{t?(e.L_.Zo(),await Ax(e)):(await e.L_.stop(),e.D_.length>0&&(ze("RemoteStore",`Stopping write stream with ${e.D_.length} pending writes`),e.D_=[]))})),e.L_}/**
2931 * @license
2932 * Copyright 2017 Google LLC
2933 *
2934 * Licensed under the Apache License, Version 2.0 (the "License");
2935 * you may not use this file except in compliance with the License.
2936 * You may obtain a copy of the License at
2937 *
2938 *   http://www.apache.org/licenses/LICENSE-2.0
2939 *
2940 * Unless required by applicable law or agreed to in writing, software
2941 * distributed under the License is distributed on an "AS IS" BASIS,
2942 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2943 * See the License for the specific language governing permissions and
2944 * limitations under the License.
2945 */class $R{constructor(t,n,r,o,i){this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=o,this.removalCallback=i,this.deferred=new ba,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(s=>{})}get promise(){return this.deferred.promise}static createAndSchedule(t,n,r,o,i){const s=Date.now()+r,a=new $R(t,n,s,o,i);return a.start(r),a}start(t){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new Ge(Pe.CANCELLED,"Operation cancelled"+(t?": "+t:"")))
2945)}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(t=>this.deferred.resolve(t))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function FR(e,t){if(Ia("AsyncQueue",`${t}: ${e}`),Ny(e))return new Ge(Pe.UNAVAILABLE,`${t}: ${e}`);throw e}/**
2946 * @license
2947 * Copyright 2017 Google LLC
2948 *
2949 * Licensed under the Apache License, Version 2.0 (the "License");
2950 * you may not use this file except in compliance with the License.
2951 * You may obtain a copy of the License at
2952 *
2953 *   http://www.apache.org/licenses/LICENSE-2.0
2954 *
2955 * Unless required by applicable law or agreed to in writing, software
2956 * distributed under the License is distributed on an "AS IS" BASIS,
2957 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2958 * See the License for the specific language governing permissions and
2959 * limitations under the License.
2960 */class Wf{constructor(t){this.comparator=t?(n,r)=>t(n,r)||ct.comparator(n.key,r.key):(n,r)=>ct.comparator(n.key,r.key),this.keyedMap=sm(),this.sortedSet=new Ln(this.comparator)}static emptySet(t){return new Wf(t.comparator)}has(t){return this.keyedMap.get(t)!=null}get(t){return this.keyedMap.get(t)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(t){const n=this.keyedMap.get(t);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(t){this.sortedSet.inorderTraversal((n,r)=>(t(n),!1))}add(t){const n=this.delete(t.key);return n.copy(n.keyedMap.insert(t.key,t),n.sortedSet.insert(t,null))}delete(t){const n=this.get(t);return n?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(n)):this}isEqual(t){if(!(t instanceof Wf)||this.size!==t.size)return!1;const n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();for(;n.hasNext();){const o=n.getNext().key,i=r.getNext().key;if(!o.isEqual(i))return!1}return!0}toString(){const t=[];return this.forEach(n=>{t.push(n.toString())}),t.length===0?"DocumentSet ()":`DocumentSet (
2961  `+t.join(`  
2962`)+`
2963)`}copy(t,n){const r=new Wf;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}}/**
2964 * @license
2965 * Copyright 2017 Google LLC
2966 *
2967 * Licensed under the Apache License, Version 2.0 (the "License");
2968 * you may not use this file except in compliance with the License.
2969 * You may obtain a copy of the License at
2970 *
2971 *   http://www.apache.org/licenses/LICENSE-2.0
2972 *
2973 * Unless required by applicable law or agreed to in writing, software
2974 * distributed under the License is distributed on an "AS IS" BASIS,
2975 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2976 * See the License for the specific language governing permissions and
2977 * limitations under the License.
2978 */class FL{constructor(){this.B_=new Ln(ct.comparator)}track(t){const n=t.doc.key,r=this.B_.get(n);r?t.type!==0&&r.type===3?this.B_=this.B_.insert(n,t):t.type===3&&r.type!==1?this.B_=this.B_.insert(n,{type:r.type,doc:t.doc}):t.type===2&&r.type===2?this.B_=this.B_.insert(n,{type:2,doc:t.doc}):t.type===2&&r.type===0?this.B_=this.B_.insert(n,{type:0,doc:t.doc}):t.type===1&&r.type===0?this.B_=this.B_.remove(n):t.type===1&&r.type===2?this.B_=this.B_.insert(n,{type:1,doc:r.doc}):t.type===0&&r.type===1?this.B_=this.B_.insert(n,{type:2,doc:t.doc}):ht():this.B_=this.B_.insert(n,t)}k_(){const t=[];return this.B_.inorderTraversal((n,r)=>{t.push(r)}),t}}class kh{constructor(t,n,r,o,i,s,a,l,u){this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=o,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=l,this.hasCachedResults=u}static fromInitialDocuments(t,n,r,o,i){const s=[];return n.forEach(a=>{s.push({type:0,doc:a})}),new kh(t,n,Wf.emptySet(n),s,r,o,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(t){if(!(this.fromCache===t.fromCache&&this.hasCachedResults===t.hasCachedResults&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&bx(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;const n=this.docChanges,r=t.docChanges;if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(n[o].type!==r[o].type||!n[o].doc.isEqual(r[o].doc))return!1;return!0}}/**
2979 * @license
2980 * Copyright 2017 Google LLC
2981 *
2982 * Licensed under the Apache License, Version 2.0 (the "License");
2983 * you may not use this file except in compliance with the License.
2984 * You may obtain a copy of the License at
2985 *
2986 *   http://www.apache.org/licenses/LICENSE-2.0
2987 *
2988 * Unless required by applicable law or agreed to in writing, software
2989 * distributed under the License is distributed on an "AS IS" BASIS,
2990 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2991 * See the License for the specific language governing permissions and
2992 * limitations under the License.
2993 */class OCe{constructor(){this.q_=void 0,this.Q_=[]}K_(){return this.Q_.some(t=>t.U_())}}class MCe{constructor(){this.queries=new ip(t=>wH(t),bx),this.onlineState="Unknown",this.W_=new Set}}async function LR(e,t){const n=wt(e);let r=3;const o=t.query;let i=n.queries.get(o);i?!i.K_()&&t.U_()&&(r=2):(i=new OCe,r=t.U_()?0:1);try{switch(r){case 0:i.q_=await n.onListen(o,!0);break;case 1:i.q_=await n.onListen(o,!1);break;case 2:await n.onFirstRemoteStoreListen(o)}}catch(s){const a=FR(s,`Initialization of query '${Xd(t.query)}' failed`);return void t.onError(a)}n.queries.set(o,i),i.Q_.push(t),t.G_(n.onlineState),i.q_&&t.z_(i.q_)&&VR(n)}async function NR(e,t){const n=wt(e),r=t.query;let o=3;const i=n.queries.get(r);if(i){const s=i.Q_.indexOf(t);s>=0&&(i.Q_.splice(s,1),i.Q_.length===0?o=t.U_()?0:1:!i.K_()&&t.U_()&&(o=2))}switch(o){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function DCe(e,t){const n=wt(e);let r=!1;for(const o of t){const i=o.query,s=n.queries.get(i);if(s){for(const a of s.Q_)a.z_(o)&&(r=!0);s.q_=o}}r&&VR(n)}function $Ce(e,t,n){const r=wt(e),o=r.queries.get(t);if(o)for(const i of o.Q_)i.onError(n);r.queries.delete(t)}function VR(e){e.W_.forEach(t=>{t.next()})}var xA,LL;(LL=xA||(xA={})).j_="default",LL.Cache="cache";class BR{constructor(t,n,r){this.query=t,this.H_=n,this.J_=!1,this.Y_=null,this.onlineState="Unknown",this.options=r||{}}z_(t){if(!this.options.includeMetadataChanges){const r=[];for(const o of t.docChanges)o.type!==3&&r.push(o);t=new kh(t.query,t.docs,t.oldDocs,r,t.mutatedKeys,t.fromCache,t.syncStateChanged,!0,t.hasCachedResults)}let n=!1;return this.J_?this.Z_(t)&&(this.H_.next(t),n=!0):this.X_(t,this.onlineState)&&(this.ea(t),n=!0),this.Y_=t,n}onError(t){this.H_.error(t)}G_(t){this.onlineState=t;let n=!1;return this.Y_&&!this.J_&&this.X_(this.Y_,t)&&(this.ea(this.Y_),n=!0),n}X_(t,n){if(!t.fromCache||!this.U_())return!0;const r=n!=="Offline";return(!this.options.ta||!r)&&(!t.docs.isEmpty()||t.hasCachedResults||n==="Offline")}Z_(t){if(t.docChanges.length>0)return!0;const n=this.Y_&&this.Y_.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}ea(t){t=kh.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache,t.hasCachedResults),this.J_=!0,this.H_.next(t)}U_(){return this.options.source!==xA.Cache}}/**
2994 * @license
2995 * Copyright 2017 Google LLC
2996 *
2997 * Licensed under the Apache License, Version 2.0 (the "License");
2998 * you may not use this file except in compliance with the License.
2999 * You may obtain a copy of the License at
3000 *
3001 *   http://www.apache.org/licenses/LICENSE-2.0
3002 *
3003 * Unless required by applicable law or agreed to in writing, software
3004 * distributed under the License is distributed on an "AS IS" BASIS,
3005 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3006 * See the License for the specific language governing permissions and
3007 * limitations under the License.
3008 */class e9{constructor(t){this.key=t}}class t9{constructor(t){this.key=t}}class FCe{constructor(t,n){this.query=t,this.ua=n,this.ca=null,this.hasCachedResults=!1,this.current=!1,this.la=Tt(),this.mutatedKeys=Tt(),this.ha=CH(t),this.Pa=new Wf(this.ha)}get Ia(){return this.ua}Ta(t,n){const r=n?n.Ea:new FL,o=n?n.Pa:this.Pa;let i=n?n.mutatedKeys:this.mutatedKeys,s=o,a=!1;const l=this.query.limitType==="F"&&o.size===this.query.limit?o.last():null,u=this.query.limitType==="L"&&o.size===this.query.limit?o.first():null;if(t.inorderTraversal((c,d)=>{const f=o.get(c),h=wx(this.query,d)?d:null,p=!!f&&this.mutatedKeys.has(f.key),g=!!h&&(h.hasLocalMutations||this.mutatedKeys.has(h.key)&&h.hasCommittedMutations);let b=!1;f&&h?f.data.isEqual(h.data)?p!==g&&(r.track({type:3,doc:h}),b=!0):this.da(f,h)||(r.track({type:2,doc:h}),b=!0,(l&&this.ha(h,l)>0||u&&this.ha(h,u)<0)&&(a=!0)):!f&&h?(r.track({type:0,doc:h}),b=!0):f&&!h&&(r.track({type:1,doc:f}),b=!0,(l||u)&&(a=!0)),b&&(h?(s=s.add(h),i=g?i.add(c):i.delete(c)):(s=s.delete(c),i=i.delete(c)))}),this.query.limit!==null)for(;s.size>this.query.limit;
3008){const c=this.query.limitType==="F"?s.last():s.first();s=s.delete(c.key),i=i.delete(c.key),r.track({type:1,doc:c})}return{Pa:s,Ea:r,Xi:a,mutatedKeys:i}}da(t,n){return t.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(t,n,r,o){const i=this.Pa;this.Pa=t.Pa,this.mutatedKeys=t.mutatedKeys;const s=t.Ea.k_();s.sort((c,d)=>function(h,p){const g=b=>{switch(b){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return ht()}};return g(h)-g(p)}(c.type,d.type)||this.ha(c.doc,d.doc)),this.Aa(r),o=o!=null&&o;const a=n&&!o?this.Ra():[],l=this.la.size===0&&this.current&&!o?1:0,u=l!==this.ca;return this.ca=l,s.length!==0||u?{snapshot:new kh(this.query,t.Pa,i,s,t.mutatedKeys,l===0,u,!1,!!r&&r.resumeToken.approximateByteSize()>0),Va:a}:{Va:a}}G_(t){return this.current&&t==="Offline"?(this.current=!1,this.applyChanges({Pa:this.Pa,Ea:new FL,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{Va:[]}}ma(t){return!this.ua.has(t)&&!!this.Pa.has(t)&&!this.Pa.get(t).hasLocalMutations}Aa(t){t&&(t.addedDocuments.forEach(n=>this.ua=this.ua.add(n)),t.modifiedDocuments.forEach(n=>{}),t.removedDocuments.forEach(n=>this.ua=this.ua.delete(n)),this.current=t.current)}Ra(){if(!this.current)return[];const t=this.la;this.la=Tt(),this.Pa.forEach(r=>{this.ma(r.key)&&(this.la=this.la.add(r.key))});const n=[];return t.forEach(r=>{this.la.has(r)||n.push(new t9(r))}),this.la.forEach(r=>{t.has(r)||n.push(new e9(r))}),n}fa(t){this.ua=t.hs,this.la=Tt();const n=this.Ta(t.documents);return this.applyChanges(n,!0)}ga(){return kh.fromInitialDocuments(this.query,this.Pa,this.mutatedKeys,this.ca===0,this.hasCachedResults)}}class LCe{constructor(t,n,r){this.query=t,this.targetId=n,this.view=r}}class NCe{constructor(t){this.key=t,this.pa=!1}}class VCe{constructor(t,n,r,o,i,s){this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=o,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.ya={},this.wa=new ip(a=>wH(a),bx),this.Sa=new Map,this.ba=new Set,this.Da=new Ln(ct.comparator),this.Ca=new Map,this.va=new kR,this.Fa={},this.Ma=new Map,this.xa=Ah.Ln(),this.onlineState="Unknown",this.Oa=void 0}get isPrimaryClient(){return this.Oa===!0}}async function BCe(e,t,n=!0){const r=a9(e);let o;const i=r.wa.get(t);return i?(r.sharedClientState.addLocalQueryTarget(i.targetId),o=i.view.ga()):o=await n9(r,t,n,!0),o}async function jCe(e,t){const n=a9(e);await n9(n,t,!0,!1)}async function n9(e,t,n,r){const o=await cCe(e.localStore,wa(t)),i=o.targetId,s=n?e.sharedClientState.addLocalQueryTarget(i):"not-current";let a;return r&&(a=await zCe(e,t,i,s==="current",o.resumeToken)),e.isPrimaryClient&&n&&KH(e.remoteStore,o),a}async function zCe(e,t,n,r,o){e.Na=(d,f,h)=>async function(g,b,y,v){let w=b.view.Ta(y);w.Xi&&(w=await OL(g.localStore,b.query,!1).then(({documents:_})=>b.view.Ta(_,w)));const C=v&&v.targetChanges.get(b.targetId),A=v&&v.targetMismatches.get(b.targetId)!=null,S=b.view.applyChanges(w,g.isPrimaryClient,C,A);return VL(g,b.targetId,S.Va),S.snapshot}(e,d,f,h);const i=await OL(e.localStore,t,!0),s=new FCe(t,i.hs),a=s.Ta(i.documents),l=By.createSynthesizedTargetChangeForCurrentChange(n,r&&e.onlineState!=="Offline",o),u=s.applyChanges(a,e.isPrimaryClient,l);VL(e,n,u.Va);const c=new LCe(t,n,s);return e.wa.set(t,c),e.Sa.has(n)?e.Sa.get(n).push(t):e.Sa.set(n,[t]),u.snapshot}async function UCe(e,t,n){const r=wt(e),o=r.wa.get(t),i=r.Sa.get(o.targetId);if(i.length>1)return r.Sa.set(o.targetId,i.filter(s=>!bx(s,t))),void r.wa.delete(t);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(o.targetId),r.sharedCl
3008ientState.isActiveQueryTarget(o.targetId)||await CA(r.localStore,o.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(o.targetId),n&&RR(r.remoteStore,o.targetId),SA(r,o.targetId)}).catch(Ly)):(SA(r,o.targetId),await CA(r.localStore,o.targetId,!0))}async function HCe(e,t){const n=wt(e),r=n.wa.get(t),o=n.Sa.get(r.targetId);n.isPrimaryClient&&o.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),RR(n.remoteStore,r.targetId))}async function WCe(e,t,n){const r=JCe(e);try{const o=await function(s,a){const l=wt(s),u=Dn.now(),c=a.reduce((h,p)=>h.add(p.key),Tt());let d,f;return l.persistence.runTransaction("Locally write mutations","readwrite",h=>{let p=xl(),g=Tt();return l.os.getEntries(h,c).next(b=>{p=b,p.forEach((y,v)=>{v.isValidDocument()||(g=g.add(y))})}).next(()=>l.localDocuments.getOverlayedDocuments(h,p)).next(b=>{d=b;const y=[];for(const v of a){const w=m1e(v,d.get(v.key).overlayedDocument);w!=null&&y.push(new Ku(v.key,w,fH(w.value.mapValue),ko.exists(!0)))}return l.mutationQueue.addMutationBatch(h,u,y,a)}).next(b=>{f=b;const y=b.applyToLocalDocumentSet(d,g);return l.documentOverlayCache.saveOverlays(h,b.batchId,y)})}).then(()=>({batchId:f.batchId,changes:SH(d)}))}(r.localStore,t);r.sharedClientState.addPendingMutation(o.batchId),function(s,a,l){let u=s.Fa[s.currentUser.toKey()];u||(u=new Ln(Qt)),u=u.insert(a,l),s.Fa[s.currentUser.toKey()]=u}(r,o.batchId,n),await zy(r,o.changes),await Ax(r.remoteStore)}catch(o){const i=FR(o,"Failed to persist write");n.reject(i)}}async function r9(e,t){const n=wt(e);try{const r=await aCe(n.localStore,t);
3008t.targetChanges.forEach((o,i)=>{const s=n.Ca.get(i);s&&(gn(o.addedDocuments.size+o.modifiedDocuments.size+o.removedDocuments.size<=1),o.addedDocuments.size>0?s.pa=!0:o.modifiedDocuments.size>0?gn(s.pa):o.removedDocuments.size>0&&(gn(s.pa),s.pa=!1))}),await zy(n,r,t)}catch(r){await Ly(r)}}function NL(e,t,n){const r=wt(e);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const o=[];r.wa.forEach((i,s)=>{const a=s.view.G_(t);a.snapshot&&o.push(a.snapshot)}),function(s,a){const l=wt(s);l.onlineState=a;let u=!1;l.queries.forEach((c,d)=>{for(const f of d.Q_)f.G_(a)&&(u=!0)}),u&&VR(l)}(r.eventManager,t),o.length&&r.ya.u_(o),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}async function GCe(e,t,n){const r=wt(e);r.sharedClientState.updateQueryState(t,"rejected",n);const o=r.Ca.get(t),i=o&&o.key;if(i){let s=new Ln(ct.comparator);s=s.insert(i,ro.newNoDocument(i,vt.min()));const a=Tt().add(i),l=new _x(vt.min(),new Map,new Ln(Qt),s,a);await r9(r,l),r.Da=r.Da.remove(i),r.Ca.delete(t),jR(r)}else await CA(r.localStore,t,!1).then(()=>SA(r,t,n)).catch(Ly)}async function qCe(e,t){const n=wt(e),r=t.batch.batchId;try{const o=await sCe(n.localStore,t);i9(n,r,null),o9(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await zy(n,o)}catch(o){await Ly(o)}}async function KCe(e,t,n){const r=wt(e);try{const o=await function(s,a){const l=wt(s);return l.persistence.runTransaction("Reject batch","readwrite-primary",u=>{let c;return l.mutationQueue.lookupMutationBatch(u,a).next(d=>(gn(d!==null),c=d.keys(),l.mutationQueue.removeMutationBatch(u,d))).next(()=>l.mutationQueue.performConsistencyCheck(u)).next(()=>l.documentOverlayCache.removeOverlaysForBatchId(u,c,a)).next(()=>l.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(u,c)).next(()=>l.localDocuments.getDocuments(u,c))})}(r.localStore,t);i9(r,t,n),o9(r,t),r.sharedClientState.updateMutationState(t,"rejected",n),await zy(r,o)}catch(o){await Ly(o)}}function o9(e,t){(e.Ma.get(t)||[]).forEach(n=>{n.resolve()}),e.Ma.delete(t)}function i9(e,t,n){const r=wt(e);let o=r.Fa[r.currentUser.toKey()];if(o){const i=o.get(t);i&&(n?i.reject(n):i.resolve(),o=o.remove(t)),r.Fa[r.currentUser.toKey()]=o}}function SA(e,t,n=null){e.sharedClientState.removeLocalQueryTarget(t);for(const r of e.Sa.get(t))e.wa.delete(r),n&&e.ya.La(r,n);e.Sa.delete(t),e.isPrimaryClient&&e.va.Vr(t).forEach(r=>{e.va.containsKey(r)||s9(e,r)})}function s9(e,t){e.ba.delete(t.path.canonicalString());const n=e.Da.get(t);n!==null&&(RR(e.remoteStore,n),e.Da=e.Da.remove(t),e.Ca.delete(n),jR(e))}function VL(e,t,n){for(const r of n)r instanceof e9?(e.va.addReference(r.key,t),QCe(e,r)):r instanceof t9?(ze("SyncEngine","Document no longer in limbo: "+r.key),e.va.removeReference(r.key,t),e.va.containsKey(r.key)||s9(e,r.key)):ht()}function QCe(e,t){const n=t.key,r=n.path.canonicalString();e.Da.get(n)||e.ba.has(r)||(ze("SyncEngine","New document in limbo: "+n),e.ba.add(r),jR(e))}function jR(e){for(;e.ba.size>0&&e.Da.size<e.maxConcurrentLimboResolutions;){const t=e.ba.values().next().value;e.ba.delete(t);const n=new ct(xn.fromString(t)),r=e.xa.next();e.Ca.set(r,new NCe(n)),e.Da=e.Da.insert(n,r),KH(e.remoteStore,new hu(wa(vx(n.path)),r,"TargetPurposeLimboResolution",bR._e))}}async function zy(e,t,n){const r=wt(e),o=[],i=[],s=[];r.wa.isEmpty()||(r.wa.forEach((a,l)=>{s.push(r.Na(l,t,n).then(u=>
3008{if((u||n)&&r.isPrimaryClient&&r.sharedClientState.updateQueryState(l.targetId,u!=null&&u.fromCache?"not-current":"current"),u){o.push(u);const c=TR.Ki(l.targetId,u);i.push(c)}}))}),await Promise.all(s),r.ya.u_(o),await async function(l,u){const c=wt(l);try{await c.persistence.runTransaction("notifyLocalViewChanges","readwrite",d=>Oe.forEach(u,f=>Oe.forEach(f.qi,h=>c.persistence.referenceDelegate.addReference(d,f.targetId,h)).next(()=>Oe.forEach(f.Qi,h=>c.persistence.referenceDelegate.removeReference(d,f.targetId,h)))))}catch(d){if(!Ny(d))throw d;ze("LocalStore","Failed to update sequence numbers: "+d)}for(const d of u){const f=d.targetId;if(!d.fromCache){const h=c.ns.get(f),p=h.snapshotVersion,g=h.withLastLimboFreeSnapshotVersion(p);c.ns=c.ns.insert(f,g)}}}(r.localStore,i))}async function YCe(e,t){const n=wt(e);if(!n.currentUser.isEqual(t)){ze("SyncEngine","User change. New user:",t.toKey());const r=await HH(n.localStore,t);n.currentUser=t,function(i,s){i.Ma.forEach(a=>{a.forEach(l=>{l.reject(new Ge(Pe.CANCELLED,s))})}),i.Ma.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),await zy(n,r.us)}}function XCe(e,t){const n=wt(e),r=n.Ca.get(t);if(r&&r.pa)return Tt().add(r.key);{let o=Tt();const i=n.Sa.get(t);if(!i)return o;for(const s of i){const a=n.wa.get(s);o=o.unionWith(a.view.Ia)}return o}}function a9(e){const t=wt(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=r9.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=XCe.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=GCe.bind(null,t),t.ya.u_=DCe.bind(null,t.eventManager),t.ya.La=$Ce.bind(null,t.eventManager),t}function JCe(e){const t=wt(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=qCe.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=KCe.bind(null,t),t}class BL{constructor(){this.synchronizeTabs=!1}async initialize(t){this.serializer=Ex(t.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(t),this.persistence=this.createPersistence(t),await this.persistence.start(),this.localStore=this.createLocalStore(t),this.gcScheduler=this.createGarbageCollectionScheduler(t,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(t,this.localStore)}createGarbageCollectionScheduler(t,n){return null}createIndexBackfillerScheduler(t,n){return null}createLocalStore(t){return iCe(this.persistence,new rCe,t.initialUser,this.serializer)}createPersistence(t){return new eCe(PR.Hr,this.serializer)}createSharedClientState(t){return new fCe}async terminate(){var t,n;(t=this.gcScheduler)===null||t===void 0||t.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class ZCe{async initialize(t,n){this.localStore||(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>NL(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=YCe.bind(null,this.syncEngine),await RCe(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(t){return function(){return new MCe}()}createDatastore(t){const n=Ex(t.databaseInfo.databaseId),r=function(i){return new gCe(i)}(t.databaseInfo);return function(i,s,a,l){return new bCe(i,s,a,l)}(t.authCredentials,t.appCheckCredentials,r,n)}createRemoteStore(t){return function(r,o,i,s,a){return new CCe(r,o,i,s,a)}(this.localStore,this.datastore,t.asyncQueue,n=>NL(this.syncEngine,n,0),function(){return DL.D()?new DL:new hCe}())}createSyncEngine(t,n){return function(o,i,s,a,l,u,c){const d=new VCe(o,i,s,a,l,u);return c&&(d.Oa=!0),d}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,n)}async terminate(){var t;await async function(r){const o=wt(r);ze("RemoteStore","RemoteStore shutting down."),o.v_.add(5),await jy(o),o.M_.shutdown(),o.x_.set("Unknown")}(this.remoteStore),(t=this.datastore)===null||t===void 0||t.terminate()}}/**
3009 * @license
3010 * Copyright 2020 Google LLC
3011 *
3012 * Licensed under the Apache License, Version 2.0 (the "License");
3013 * you may not use this file except in compliance with the License.
3014 * You may obtain a copy of the License at
3015 *
3016 *   http://www.apache.org/licenses/LICENSE-2.0
3017 *
3018 * Unless required by applicable law or agreed to in writing, software
3019 * distributed under the License is distributed on an "AS IS" BASIS,
3020 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3021 * See the License for the specific language governing permissions and
3022 * limitations under the License.
3023 *//**
3024 * @license
3025 * Copyright 2017 Google LLC
3026 *
3027 * Licensed under the Apache License, Version 2.0 (the "License");
3028 * you may not use this file except in compliance with the License.
3029 * You may obtain a copy of the License at
3030 *
3031 *   http://www.apache.org/licenses/LICENSE-2.0
3032 *
3033 * Unless required by applicable law or agreed to in writing, software
3034 * distributed under the License is distributed on an "AS IS" BASIS,
3035 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3036 * See the License for the specific language governing permissions and
3037 * limitations under the License.
3038 */class zR{constructor(t){this.observer=t,this.muted=!1}next(t){this.observer.next&&this.qa(this.observer.next,t)}error(t){this.observer.error?this.qa(this.observer.error,t):Ia("Uncaught Error in snapshot listener:",t.toString())}Qa(){this.muted=!0}qa(t,n){this.muted||setTimeout(()=>{this.muted||t(n)},0)}}/**
3039 * @license
3040 * Copyright 2017 Google LLC
3041 *
3042 * Licensed under the Apache License, Version 2.0 (the "License");
3043 * you may not use this file except in compliance with the License.
3044 * You may obtain a copy of the License at
3045 *
3046 *   http://www.apache.org/licenses/LICENSE-2.0
3047 *
3048 * Unless required by applicable law or agreed to in writing, software
3049 * distributed under the License is distributed on an "AS IS" BASIS,
3050 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3051 * See the License for the specific language governing permissions and
3052 * limitations under the License.
3053 */class exe{constructor(t,n,r,o){this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=o,this.user=to.UNAUTHENTICATED,this.clientId=uH.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async i=>{ze("FirestoreClient","Received user=",i.uid),await this.authCredentialListener(i),this.user=i}),this.appCheckCredentials.start(r,i=>(ze("FirestoreClient","Received new app check token=",i),this.appCheckCredentialListener(i,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(t){this.authCredentialListener=t}setAppCheckTokenChangeListener(t){this.appCheckCredentialListener=t}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Ge(Pe.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const t=new ba;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),t.resolve()}catch(n){const r=FR(n,"Failed to shutdown persistence");t.reject(r)}}),t.promise}}async function A_(e,t){e.asyncQueue.verifyOperationInProgress(),ze("FirestoreClient","Initializing OfflineComponentProvider");const n=e.configuration;await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener(async o=>{r.isEqual(o)||(await HH(t.localStore,o),r=o)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=t}async function jL(e,t){e.asyncQueue.verifyOperationInProgress();
3053const n=await nxe(e);ze("FirestoreClient","Initializing OnlineComponentProvider"),await t.initialize(n,e.configuration),e.setCredentialChangeListener(r=>$L(t.remoteStore,r)),e.setAppCheckTokenChangeListener((r,o)=>$L(t.remoteStore,o)),e._onlineComponents=t}function txe(e){return e.name==="FirebaseError"?e.code===Pe.FAILED_PRECONDITION||e.code===Pe.UNIMPLEMENTED:!(typeof DOMException<"u"&&e instanceof DOMException)||e.code===22||e.code===20||e.code===11}async function nxe(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){ze("FirestoreClient","Using user provided OfflineComponentProvider");try{await A_(e,e._uninitializedComponentsProvider._offline)}catch(t){const n=t;if(!txe(n))throw n;xh("Error using user provided cache. Falling back to memory cache: "+n),await A_(e,new BL)}}else ze("FirestoreClient","Using default OfflineComponentProvider"),await A_(e,new BL);return e._offlineComponents}async function l9(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(ze("FirestoreClient","Using user provided OnlineComponentProvider"),await jL(e,e._uninitializedComponentsProvider._online)):(ze("FirestoreClient","Using default OnlineComponentProvider"),await jL(e,new ZCe))),e._onlineComponents}function rxe(e){return l9(e).then(t=>t.syncEngine)}async function Tw(e){const t=await l9(e),n=t.eventManager;return n.onListen=BCe.bind(null,t.syncEngine),n.onUnlisten=UCe.bind(null,t.syncEngine),n.onFirstRemoteStoreListen=jCe.bind(null,t.syncEngine),n.onLastRemoteStoreUnlisten=HCe.bind(null,t.syncEngine),n}function oxe(e,t,n={}){const r=new ba;return e.asyncQueue.enqueueAndForget(async()=>function(i,s,a,l,u){const c=new zR({next:f=>{s.enqueueAndForget(()=>NR(i,d));const h=f.docs.has(a);!h&&f.fromCache?u.reject(new Ge(Pe.UNAVAILABLE,"Failed to get document because the client is offline.")):h&&f.fromCache&&l&&l.source==="server"?u.reject(new Ge(Pe.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.)')):u.resolve(f)},error:f=>u.reject(f)}),d=new BR(vx(a.path),c,{includeMetadataChanges:!0,ta:!0});return LR(i,d)}(await Tw(e),e.asyncQueue,t,n,r)),r.promise}function ixe(e,t,n={}){const r=new ba;return e.asyncQueue.enqueueAndForget(async()=>function(i,s,a,l,u){const c=new zR({next:f=>{s.enqueueAndForget(()=>NR(i,d)),f.fromCache&&l.source==="server"?u.reject(new Ge(Pe.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.)')):u.resolve(f)},error:f=>u.reject(f)}),d=new BR(a,c,{includeMetadataChanges:!0,ta:!0});return LR(i,d)}(await Tw(e),e.asyncQueue,t,n,r)),r.promise}/**
3054 * @license
3055 * Copyright 2023 Google LLC
3056 *
3057 * Licensed under the Apache License, Version 2.0 (the "License");
3058 * you may not use this file except in compliance with the License.
3059 * You may obtain a copy of the License at
3060 *
3061 *   http://www.apache.org/licenses/LICENSE-2.0
3062 *
3063 * Unless required by applicable law or agreed to in writing, software
3064 * distributed under the License is distributed on an "AS IS" BASIS,
3065 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3066 * See the License for the specific language governing permissions and
3067 * limitations under the License.
3068 */function u9(e){const t={};return e.timeoutSeconds!==void 0&&(t.timeoutSeconds=e.timeoutSeconds),t}/**
3069 * @license
3070 * Copyright 2020 Google LLC
3071 *
3072 * Licensed under the Apache License, Version 2.0 (the "License");
3073 * you may not use this file except in compliance with the License.
3074 * You may obtain a copy of the License at
3075 *
3076 *   http://www.apache.org/licenses/LICENSE-2.0
3077 *
3078 * Unless required by applicable law or agreed to in writing, software
3079 * distributed under the License is distributed on an "AS IS" BASIS,
3080 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3081 * See the License for the specific language governing permissions and
3082 * limitations under the License.
3083 */const zL=new Map;/**
3084 * @license
3085 * Copyright 2017 Google LLC
3086 *
3087 * Licensed under the Apache License, Version 2.0 (the "License");
3088 * you may not use this file except in compliance with the License.
3089 * You may obtain a copy of the License at
3090 *
3091 *   http://www.apache.org/licenses/LICENSE-2.0
3092 *
3093 * Unless required by applicable law or agreed to in writing, software
3094 * distributed under the License is distributed on an "AS IS" BASIS,
3095 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3096 * See the License for the specific language governing permissions and
3097 * limitations under the License.
3098 */function c9(e,t,n){if(!n)throw new Ge(Pe.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function sxe(e,t,n,r){if(t===!0&&r===!0)throw new Ge(Pe.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)}function UL(e){if(!ct.isDocumentKey(e))throw new Ge(Pe.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function HL(e){if(ct.isDocumentKey(e))throw new Ge(Pe.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function kx(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return""+e;if(typeof e=="object"){if(e instanceof Array)return"an array";{const t=function(r){return r.constructor?r.constructor.name:null}(e);return t?`a custom ${t} object`:"an object"}}return typeof e=="function"?"a function":ht()}function Po(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new Ge(Pe.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=kx(e);throw new Ge(Pe.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}/**
3099 * @license
3100 * Copyright 2020 Google LLC
3101 *
3102 * Licensed under the Apache License, Version 2.0 (the "License");
3103 * you may not use this file except in compliance with the License.
3104 * You may obtain a copy of the License at
3105 *
3106 *   http://www.apache.org/licenses/LICENSE-2.0
3107 *
3108 * Unless required by applicable law or agreed to in writing, software
3109 * distributed under the License is distributed on an "AS IS" BASIS,
3110 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3111 * See the License for the specific language governing permissions and
3112 * limitations under the License.
3113 */class WL{constructor(t){var n,r;if(t.host===void 0){if(t.ssl!==void 0)throw new Ge(Pe.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=(n=t.ssl)===null||n===void 0||n;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,this.localCache=t.localCache,t.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(t.cacheSizeBytes!==-1&&t.cacheSizeBytes<1048576)throw new Ge(Pe.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}sxe("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:t.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=u9((r=t.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(i){if(i.timeoutSeconds!==void 0){if(isNaN(i.timeoutSeconds))throw new Ge(Pe.INVALID_ARGUMENT,`invalid long polling timeout: ${i.timeoutSeconds} (must not be NaN)`);if(i.timeoutSeconds<5)throw new Ge(Pe.INVALID_ARGUMENT,`invalid long polling timeout: ${i.timeoutSeconds} (minimum allowed value is 5)`);if(i.timeoutSeconds>30)throw new Ge(Pe.INVALID_ARGUMENT,`invalid long polling timeout: ${i.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!t.useFetchStreams}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&function(r,o){return r.timeoutSeconds===o.timeoutSeconds}(this.experimentalLongPollingOptions,t.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams}}class Px{constructor(t,n,r,o){this._authCredentials=t,this._appCheckCredentials=n,this._databaseId=r,this._app=o,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new WL({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Ge(Pe.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!==void 0}_setSettings(t){if(this._settingsFrozen)throw new Ge(Pe.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 WL(t),t.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new _we;switch(r.type){case"firstParty":return new kwe(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new Ge(Pe.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
3113d credential type")}}(t.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){const r=zL.get(n);r&&(ze("ComponentProvider","Removing Datastore"),zL.delete(n),r.terminate())}(this),Promise.resolve()}}function d9(e,t,n,r={}){var o;const i=(e=Po(e,Px))._getSettings(),s=`${t}:${n}`;if(i.host!=="firestore.googleapis.com"&&i.host!==s&&xh("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},i),{host:s,ssl:!1})),r.mockUserToken){let a,l;if(typeof r.mockUserToken=="string")a=r.mockUserToken,l=to.MOCK_USER;else{a=y6(r.mockUserToken,(o=e._app)===null||o===void 0?void 0:o.options.projectId);const u=r.mockUserToken.sub||r.mockUserToken.user_id;if(!u)throw new Ge(Pe.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");l=new to(u)}e._authCredentials=new Ewe(new lH(a,l))}}/**
3114 * @license
3115 * Copyright 2020 Google LLC
3116 *
3117 * Licensed under the Apache License, Version 2.0 (the "License");
3118 * you may not use this file except in compliance with the License.
3119 * You may obtain a copy of the License at
3120 *
3121 *   http://www.apache.org/licenses/LICENSE-2.0
3122 *
3123 * Unless required by applicable law or agreed to in writing, software
3124 * distributed under the License is distributed on an "AS IS" BASIS,
3125 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3126 * See the License for the specific language governing permissions and
3127 * limitations under the License.
3128 */class Qu{constructor(t,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=t}withConverter(t){return new Qu(this.firestore,t,this._query)}}class uo{constructor(t,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new ll(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new uo(this.firestore,t,this._key)}}class ll extends Qu{constructor(t,n,r){super(t,n,vx(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const t=this._path.popLast();return t.isEmpty()?null:new uo(this.firestore,null,new ct(t))}withConverter(t){return new ll(this.firestore,t,this._path)}}function us(e,t,...n){if(e=_n(e),c9("collection","path",t),e instanceof Px){const r=xn.fromString(t,...n);return HL(r),new ll(e,null,r)}{if(!(e instanceof uo||e instanceof ll))throw new Ge(Pe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(xn.fromString(t,...n));return HL(r),new ll(e.firestore,null,r)}}function jr(e,t,...n){if(e=_n(e),arguments.length===1&&(t=uH.newId()),c9("doc","path",t),e instanceof Px){const r=xn.fromString(t,...n);return UL(r),new uo(e,null,new ct(r))}{if(!(e instanceof uo||e instanceof ll))throw new Ge(Pe.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(xn.fromString(t,...n));return UL(r),new uo(e.firestore,e instanceof ll?e.converter:null,new ct(r))}}/**
3129 * @license
3130 * Copyright 2020 Google LLC
3131 *
3132 * Licensed under the Apache License, Version 2.0 (the "License");
3133 * you may not use this file except in compliance with the License.
3134 * You may obtain a copy of the License at
3135 *
3136 *   http://www.apache.org/licenses/LICENSE-2.0
3137 *
3138 * Unless required by applicable law or agreed to in writing, software
3139 * distributed under the License is distributed on an "AS IS" BASIS,
3140 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3141 * See the License for the specific language governing permissions and
3142 * limitations under the License.
3143 */class axe{constructor(){this.nu=Promise.resolve(),this.ru=[],this.iu=!1,this.su=[],this.ou=null,this._u=!1,this.au=!1,this.uu=[],this.jo=new GH(this,"async_queue_retry"),this.cu=()=>{const n=I_();n&&ze("AsyncQueue","Visibility state changed to "+n.visibilityState),this.jo.Ko()};const t=I_();t&&typeof t.addEventListener=="function"&&t.addEventListener("visibilitychange",this.cu)}get isShuttingDown(){return this.iu}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.lu(),this.hu(t)}enterRestrictedMode(t){if(!this.iu){this.iu=!0,this.au=t||!1;const n=I_();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.cu)}}enqueue(t){if(this.lu(),this.iu)return new Promise(()=>{});const n=new ba;return this.hu(()=>this.iu&&this.au?Promise.resolve():(t().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(t){this.enqueueAndForget(()=>
3143(this.ru.push(t),this.Pu()))}async Pu(){if(this.ru.length!==0){try{await this.ru[0](),this.ru.shift(),this.jo.reset()}catch(t){if(!Ny(t))throw t;ze("AsyncQueue","Operation failed with retryable error: "+t)}this.ru.length>0&&this.jo.qo(()=>this.Pu())}}hu(t){const n=this.nu.then(()=>(this._u=!0,t().catch(r=>{this.ou=r,this._u=!1;const o=function(s){let a=s.message||"";return s.stack&&(a=s.stack.includes(s.message)?s.stack:s.message+`
3144`+s.stack),a}(r);throw Ia("INTERNAL UNHANDLED ERROR: ",o),r}).then(r=>(this._u=!1,r))));return this.nu=n,n}enqueueAfterDelay(t,n,r){this.lu(),this.uu.indexOf(t)>-1&&(n=0);const o=$R.createAndSchedule(this,t,n,r,i=>this.Iu(i));return this.su.push(o),o}lu(){this.ou&&ht()}verifyOperationInProgress(){}async Tu(){let t;do t=this.nu,await t;while(t!==this.nu)}Eu(t){for(const n of this.su)if(n.timerId===t)return!0;return!1}du(t){return this.Tu().then(()=>{this.su.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.su)if(n.skipDelay(),t!=="all"&&n.timerId===t)break;return this.Tu()})}Au(t){this.uu.push(t)}Iu(t){const n=this.su.indexOf(t);this.su.splice(n,1)}}function GL(e){return function(n,r){if(typeof n!="object"||n===null)return!1;const o=n;for(const i of r)if(i in o&&typeof o[i]=="function")return!0;return!1}(e,["next","error","complete"])}class ka extends Px{constructor(t,n,r,o){super(t,n,r,o),this.type="firestore",this._queue=function(){return new axe}(),this._persistenceKey=(o==null?void 0:o.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||f9(this),this._firestoreClient.terminate()}}function lxe(e,t){const n=typeof e=="object"?e:LT(),r=typeof e=="string"?e:t||"(default)",o=QC(n,"firestore").getImmediate({identifier:r});if(!o._initialized){const i=p6("firestore");i&&d9(o,...i)}return o}function Uy(e){return e._firestoreClient||f9(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function f9(e){var t,n,r;const o=e._freezeSettings(),i=function(a,l,u,c){return new zwe(a,l,u,c.host,c.ssl,c.experimentalForceLongPolling,c.experimentalAutoDetectLongPolling,u9(c.experimentalLongPollingOptions),c.useFetchStreams)}(e._databaseId,((t=e._app)===null||t===void 0?void 0:t.options.appId)||"",e._persistenceKey,o);e._firestoreClient=new exe(e._authCredentials,e._appCheckCredentials,e._queue,i),!((n=o.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=o.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:o.localCache.kind,_offline:o.localCache._offlineComponentProvider,_online:o.localCache._onlineComponentProvider})}/**
3145 * @license
3146 * Copyright 2020 Google LLC
3147 *
3148 * Licensed under the Apache License, Version 2.0 (the "License");
3149 * you may not use this file except in compliance with the License.
3150 * You may obtain a copy of the License at
3151 *
3152 *   http://www.apache.org/licenses/LICENSE-2.0
3153 *
3154 * Unless required by applicable law or agreed to in writing, software
3155 * distributed under the License is distributed on an "AS IS" BASIS,
3156 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3157 * See the License for the specific language governing permissions and
3158 * limitations under the License.
3159 */class Ph{constructor(t){this._byteString=t}static fromBase64String(t){try{return new Ph(ho.fromBase64String(t))}catch(n){throw new Ge(Pe.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(t){return new Ph(ho.fromUint8Array(t))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(t){return this._byteString.isEqual(t._byteString)}}/**
3160 * @license
3161 * Copyright 2020 Google LLC
3162 *
3163 * Licensed under the Apache License, Version 2.0 (the "License");
3164 * you may not use this file except in compliance with the License.
3165 * You may obtain a copy of the License at
3166 *
3167 *   http://www.apache.org/licenses/LICENSE-2.0
3168 *
3169 * Unless required by applicable law or agreed to in writing, software
3170 * distributed under the License is distributed on an "AS IS" BASIS,
3171 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3172 * See the License for the specific language governing permissions and
3173 * limitations under the License.
3174 */class Hy{constructor(...t){for(let n=0;n<t.length;++n)if(t[n].length===0)throw new Ge(Pe.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new $r(t)}isEqual(t){return this._internalPath.isEqual(t._internalPath)}}/**
3175 * @license
3176 * Copyright 2020 Google LLC
3177 *
3178 * Licensed under the Apache License, Version 2.0 (the "License");
3179 * you may not use this file except in compliance with the License.
3180 * You may obtain a copy of the License at
3181 *
3182 *   http://www.apache.org/licenses/LICENSE-2.0
3183 *
3184 * Unless required by applicable law or agreed to in writing, software
3185 * distributed under the License is distributed on an "AS IS" BASIS,
3186 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3187 * See the License for the specific language governing permissions and
3188 * limitations under the License.
3189 */class Wy{constructor(t){this._methodName=t}}/**
3190 * @license
3191 * Copyright 2017 Google LLC
3192 *
3193 * Licensed under the Apache License, Version 2.0 (the "License");
3194 * you may not use this file except in compliance with the License.
3195 * You may obtain a copy of the License at
3196 *
3197 *   http://www.apache.org/licenses/LICENSE-2.0
3198 *
3199 * Unless required by applicable law or agreed to in writing, software
3200 * distributed under the License is distributed on an "AS IS" BASIS,
3201 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3202 * See the License for the specific language governing permissions and
3203 * limitations under the License.
3204 */class UR{constructor(t,n){if(!isFinite(t)||t<-90||t>90)throw new Ge(Pe.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new Ge(Pe.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(t){return Qt(this._lat,t._lat)||Qt(this._long,t._long)}}/**
3205 * @license
3206 * Copyright 2017 Google LLC
3207 *
3208 * Licensed under the Apache License, Version 2.0 (the "License");
3209 * you may not use this file except in compliance with the License.
3210 * You may obtain a copy of the License at
3211 *
3212 *   http://www.apache.org/licenses/LICENSE-2.0
3213 *
3214 * Unless required by applicable law or agreed to in writing, software
3215 * distributed under the License is distributed on an "AS IS" BASIS,
3216 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3217 * See the License for the specific language governing permissions and
3218 * limitations under the License.
3219 */const uxe=/^__.*__$/;class cxe{constructor(t,n,r){this.data=t,this.fieldMask=n,this.fieldTransforms=r}toMutation(t,n){return this.fieldMask!==null?new Ku(t,this.data,this.fieldMask,n,this.fieldTransforms):new Vy(t,this.data,n,this.fieldTransforms)}}class h9{constructor(t,n,r){this.data=t,this.fieldMask=n,this.fieldTransforms=r}toMutation(t,n){return new Ku(t,this.data,this.fieldMask,n,this.fieldTransforms)}}function p9(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw ht()}}class Tx{constructor(t,n,r,o,i,s){this.settings=t,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=o,i===void 0&&this.Ru(),this.fieldTransforms=i||[],this.fieldMask=s||[]}get path(){return this.settings.path}get Vu(){return this.settings.Vu}mu(t){return new Tx(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}fu(t){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(t),o=this.mu({path:r,gu:!1});return o.pu(t),o}yu(t){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(t),o=this.mu({path:r,gu:!1});return o.Ru(),o}wu(t){return this.mu({path:void 0,gu:!0})}Su(t){return Rw(t,this.settings.methodName,this.settings.bu||!1,this.path,this.settings.Du)}contains(t){return this.fieldMask.find(n=>t.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>t.isPrefixOf(n.field))!==void 0}Ru(){if(this.path)for(let t=0;t<this.path.length;t++)this.pu(this.path.get(t))}pu(t){if(t.length===0)throw this.Su("Document fields must not be empty");if(p9(this.Vu)&&uxe.test(t))throw this.Su('Document fields cannot begin and end with "__"')}}class dxe{constructor(t,n,r){this.databaseId=t,this.ignoreUndefinedProperties=n,this.serializer=r||Ex(t)}Cu(t,n,r,o=!1){return new Tx({Vu:t,methodName:n,Du:r,path:$r.emptyPath(),gu:!1,bu:o},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function Gy(e){const t=e._freezeSettings(),n=Ex(e._databaseId);return new dxe(e._databaseId,!!t.ignoreUndefinedProperties,n)}function HR(e,t,n,r,o,i={}){const s=e.Cu(i.merge||i.mergeFields?2:0,t,n,o);qR("Data must be an object, but it was:",s,r);const a=y9(r,s);let l,u;if(i.merge)l=new li(s.fieldMask),u=s.fieldTransforms;else if(i.mergeFields){const c=[];for(const d of i.mergeFields){const f=_A(t,d,n);if(!s.contains(f))throw new Ge(Pe.INVALID_ARGUMENT,`Field '${f}' is specified in your field mask but missing from your input data.`);b9(c,f)||c.push(f)}l=new li(c),u=s.fieldTransforms.filter(d=>l.covers(d.field))}else l=null,u=s.fieldTransforms;return new cxe(new Bo(a),l,u)}class Rx extends Wy{_toFieldTransform(t){if(t.Vu!==2)throw t.Vu===1?t.Su(`${this._methodName}() can only appear at the top level of your update data`):t.Su(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return t.fieldMask.push(t.path),null}isEqual(t){return t instanceof Rx}}function fxe(e,t,n){return new Tx({Vu:3,Du:t.settings.Du,methodName:e._methodName,gu:n},t.databaseId,t.serializer,t.ignoreUndefinedProperties)}class WR extends Wy{_toFieldTransform(t){return new RH(t.path,new Wg)}isEqual(t){return t instanceof WR}}class GR extends Wy{constructor(t,n){super(t),this.vu=n}_toFieldTransform(t){const n=fxe(this,t,!0),r=this.vu.map(i=>ap(i,n)),o=new Ih(r);return new RH(t.path,o)}isEqual(t){return t instanceof GR&&kg(this.vu,t.vu)}}function m9(e,t,n,r){const o=e.Cu(1,t,n);qR("Data must be an object, but it was:",o,r);const i=[],s=Bo.empty();Sd(r,(l,u)=>{const c=KR(t,l,n);u=_n(u);const d=o.yu(c);if(u instanceof Rx)i.push(c);else{const f=ap(u,d);f!=null&&(i.push(c),s.set(c,f))}});const a=new li(i);return new h9(s,a,o.fieldTransforms)}function g9(e,t,n,r,o,i){const s=e.Cu(1,t,n),a=[_A(t,r,n)],l=[o];if(i.length%2!=0)throw new Ge(Pe.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let f=0;f<i.length;f+=2)a.push(_A(t,i[f])),l.push(i[f+1]);const u=[],c=Bo.empty();for(let f=a.length-1;f>=0;--f)if(!b9(u,a[f])){const h=a[f];let p=l[f];p=_n(p);const g=s.yu(h);if(p instanceof Rx)u.push(h);else{const b=ap(p,g);b!=null&&(u.push(h),c.set(h,b))}}const d=new li(u);return new h9(c,d,s.fieldTransforms)}function hxe(e,t,n,r=!1){return ap(n,e.Cu(r?4:3,t))}function ap(e,t){if(v9(e=_n(e)))return qR("Unsupported field value:",t,e),y9(e,t);if(e instanceof Wy)return function(r,o){if(!p9(o.Vu))throw o.Su(`${r._methodName}
3219() can only be used with update() and set()`);if(!o.path)throw o.Su(`${r._methodName}() is not currently supported inside arrays`);const i=r._toFieldTransform(o);i&&o.fieldTransforms.push(i)}(e,t),null;if(e===void 0&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.gu&&t.Vu!==4)throw t.Su("Nested arrays are not supported");return function(r,o){const i=[];let s=0;for(const a of r){let l=ap(a,o.wu(s));l==null&&(l={nullValue:"NULL_VALUE"}),i.push(l),s++}return{arrayValue:{values:i}}}(e,t)}return function(r,o){if((r=_n(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return u1e(o.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const i=Dn.fromDate(r);return{timestampValue:kw(o.serializer,i)}}if(r instanceof Dn){const i=new Dn(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:kw(o.serializer,i)}}if(r instanceof UR)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof Ph)return{bytesValue:LH(o.serializer,r._byteString)};if(r instanceof uo){const i=o.databaseId,s=r.firestore._databaseId;if(!s.isEqual(i))throw o.Su(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${i.projectId}/${i.database}`);return{referenceValue:AR(r.firestore._databaseId||o.databaseId,r._key.path)}}throw o.Su(`Unsupported field value: ${kx(r)}`)}(e,t)}function y9(e,t){const n={};return cH(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):Sd(e,(r,o)=>{const i=ap(o,t.fu(r));i!=null&&(n[r]=i)}),{mapValue:{fields:n}}}function v9(e){return!(typeof e!="object"||e===null||e instanceof Array||e instanceof Date||e instanceof Dn||e instanceof UR||e instanceof Ph||e instanceof uo||e instanceof Wy)}function qR(e,t,n){if(!v9(n)||!function(o){return typeof o=="object"&&o!==null&&(Object.getPrototypeOf(o)===Object.prototype||Object.getPrototypeOf(o)===null)}(n)){const r=kx(n);throw r==="an object"?t.Su(e+" a custom object"):t.Su(e+" "+r)}}function _A(e,t,n){if((t=_n(t))instanceof Hy)return t._internalPath;if(typeof t=="string")return KR(e,t);throw Rw("Field path arguments must be of type string or ",e,!1,void 0,n)}const pxe=new RegExp("[~\\*/\\[\\]]");function KR(e,t,n){if(t.search(pxe)>=0)throw Rw(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new Hy(...t.split("."))._internalPath}catch{throw Rw(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function Rw(e,t,n,r,o){const i=r&&!r.isEmpty(),s=o!==void 0;let a=`Function ${t}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(i||s)&&(l+=" (found",i&&(l+=` in field ${r}`),s&&(l+=` in document ${o}`),l+=")"),new Ge(Pe.INVALID_ARGUMENT,a+e+l)}function b9(e,t){return e.some(n=>n.isEqual(t))}/**
3220 * @license
3221 * Copyright 2020 Google LLC
3222 *
3223 * Licensed under the Apache License, Version 2.0 (the "License");
3224 * you may not use this file except in compliance with the License.
3225 * You may obtain a copy of the License at
3226 *
3227 *   http://www.apache.org/licenses/LICENSE-2.0
3228 *
3229 * Unless required by applicable law or agreed to in writing, software
3230 * distributed under the License is distributed on an "AS IS" BASIS,
3231 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3232 * See the License for the specific language governing permissions and
3233 * limitations under the License.
3234 */class w9{constructor(t,n,r,o,i){this._firestore=t,this._userDataWriter=n,this._key=r,this._document=o,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new uo(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const t=new mxe(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}get(t){if(this._document){const n=this._document.data.field(Ox("DocumentSnapshot.get",t));if(n!==null)return this._userDataWriter.convertValue(n)}}}class mxe extends w9{data(){return super.data()}}function Ox(e,t){return typeof t=="string"?KR(e,t):t instanceof Hy?t._internalPath:t._delegate._internalPath}/**
3235 * @license
3236 * Copyright 2020 Google LLC
3237 *
3238 * Licensed under the Apache License, Version 2.0 (the "License");
3239 * you may not use this file except in compliance with the License.
3240 * You may obtain a copy of the License at
3241 *
3242 *   http://www.apache.org/licenses/LICENSE-2.0
3243 *
3244 * Unless required by applicable law or agreed to in writing, software
3245 * distributed under the License is distributed on an "AS IS" BASIS,
3246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3247 * See the License for the specific language governing permissions and
3248 * limitations under the License.
3249 */function C9(e){if(e.limitType==="L"&&e.explicitOrderBy.length===0)throw new Ge(Pe.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class QR{}class x9 extends QR{}function qy(e,t,...n){let r=[];t instanceof QR&&r.push(t),r=r.concat(n),function(i){const s=i.filter(l=>l instanceof YR).length,a=i.filter(l=>l instanceof Mx).length;if(s>1||s>0&&a>0)throw new Ge(Pe.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(...)))`.")}(r);for(const o of r)e=o._apply(e);return e}class Mx extends x9{constructor(t,n,r){super(),this._field=t,this._op=n,this._value=r,this.type="where"}static _create(t,n,r){return new Mx(t,n,r)}_apply(t){const n=this._parse(t);return _9(t._query,n),new Qu(t.firestore,t.converter,mA(t._query,n))}_parse(t){const n=Gy(t.firestore);return function(i,s,a,l,u,c,d){let f;if(u.isKeyField()){if(c==="array-contains"||c==="array-contains-any")throw new Ge(Pe.INVALID_ARGUMENT,`Invalid Query. You can't perform '${c}' queries on documentId().`);if(c==="in"||c==="not-in"){KL(d,c);const h=[];for(const p of d)h.push(qL(l,i,p));f={arrayValue:{values:h}}}else f=qL(l,i,d)}else c!=="in"&&c!=="not-in"&&c!=="array-contains-any"||KL(d,c),f=hxe(a,s,d,c==="in"||c==="not-in");return lr.create(u,c,f)}(t._query,"where",n,t.firestore._databaseId,this._field,this._op,this._value)}}function S9(e,t,n){const r=t,o=Ox("where",e);return Mx._create(o,r,n)}class YR extends QR{constructor(t,n){super(),this.type=t,this._queryConstraints=n}static _create(t,n){return new YR(t,n)}_parse(t){const n=this._queryConstraints.map(r=>r._parse(t)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:Ds.create(n,this._getOperator())}_apply(t){const n=this._parse(t);return n.getFilters().length===0?t:(function(o,i){let s=o;const a=i.getFlattenedFilters();for(const l of a)_9(s,l),s=mA(s,l)}(t._query,n),new Qu(t.firestore,t.converter,mA(t._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class XR extends x9{constructor(t,n){super(),this._field=t,this._direction=n,this.type="orderBy"}static _create(t,n){return new XR(t,n)}_apply(t){const n=function(o,i,s){if(o.startAt!==null)throw new Ge(Pe.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(o.endAt!==null)throw new Ge(Pe.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new Hg(i,s)}(t._query,this._field,this._direction);return new Qu(t.firestore,t.converter,function(o,i){const s=o.explicitOrderBy.concat([i]);return new op(o.path,o.collectionGroup,s,o.filters.slice(),o.limit,o.limitType,o.startAt,o.endAt)}(t._query,n))}}function gxe(e,t="asc"){const n=t,r=Ox("orderBy",e);return XR._create(r,n)}function qL(e,t,n){if(typeof(n=_n(n))=="string"){if(n==="")throw new Ge(Pe.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!bH(t)&&n.indexOf("/")!==-1)throw new Ge(Pe.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=t.path.child(xn.fromString(n));if(!ct.isDocumentKey(r))throw new Ge(Pe.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return mL(e,new ct(r))}if(n instanceof uo)return mL(e,n._key);throw new Ge(Pe.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${kx(n)}.`)}function KL(e,t){if(!Array.isArray(e)||e.length===0)throw new Ge(Pe.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function _9(e,t){const n=function(o,i){for(const s of o)for(const a of s.getFlattenedFilters())if(i.indexOf(a.op)>=0)return a.op;return null}(e.filters,function(o){switch(o){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[]}}(t.op));if(n!==null)throw n===t.op?new Ge(Pe.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new Ge(Pe.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`)}class yxe{convertValue(t,n="none"){switch(ud(t)){case 0:return null;case 1:return t.booleanValue;case 2:return ir(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,n);case 5:return t.stringValue;case 6:return this.convertBytes(ld(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,n);case 10:return this.convertObject(t.mapValue,n);default:throw ht()}}convertObject(t,n){return this.convertObjectMap(t.fields,n)}convertObjectMap(t,n="none"){const r={};return Sd(t,(o,i)=>{r[o]=this.convertValue(i,n)}),r}convertGeoPoint(t){return new UR(ir(t.latitude),ir(t.longitude))}convertArray(t,n){return(t.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(t,n){switch(n){case"previous":const r=CR(t);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(jg(t));default:return null}}convertTimestamp(t){const n=Lu(t);return new Dn(n.seconds,n.nanos)}convertDocumentKey(t,n){const r=xn.fromString(t);gn(UH(r));const o=new zg(r.get(1),r.get(3)),i=new ct(r.popFirst(5));return o.isEqual(n)||Ia(`Document ${i} contains a document reference within a different database (${o.projectId}/${o.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),i}}/**
3250 * @license
3251 * Copyright 2020 Google LLC
3252 *
3253 * Licensed under the Apache License, Version 2.0 (the "License");
3254 * you may not use this file except in compliance with the License.
3255 * You may obtain a copy of the License at
3256 *
3257 *   http://www.apache.org/licenses/LICENSE-2.0
3258 *
3259 * Unless required by applicable law or agreed to in writing, software
3260 * distributed under the License is distributed on an "AS IS" BASIS,
3261 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3262 * See the License for the specific language governing permissions and
3263 * limitations under the License.
3264 */function JR(e,t,n){let r;return r=e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t,r}/**
3265 * @license
3266 * Copyright 2020 Google LLC
3267 *
3268 * Licensed under the Apache License, Version 2.0 (the "License");
3269 * you may not use this file except in compliance with the License.
3270 * You may obtain a copy of the License at
3271 *
3272 *   http://www.apache.org/licenses/LICENSE-2.0
3273 *
3274 * Unless required by applicable law or agreed to in writing, software
3275 * distributed under the License is distributed on an "AS IS" BASIS,
3276 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3277 * See the License for the specific language governing permissions and
3278 * limitations under the License.
3279 */class lm{constructor(t,n){this.hasPendingWrites=t,this.fromCache=n}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}}class E9 extends w9{constructor(t,n,r,o,i,s){super(t,n,r,o,s),this._firestore=t,this._firestoreImpl=t,this.metadata=i}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){const n=new Kb(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,n={}){if(this._document){const r=this._document.data.field(Ox("DocumentSnapshot.get",t));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class Kb extends E9{data(t={}){return super.data(t)}}class I9{constructor(t,n,r,o){this._firestore=t,this._userDataWriter=n,this._snapshot=o,this.metadata=new lm(o.hasPendingWrites,o.fromCache),this.query=r}get docs(){const t=[];return this.forEach(n=>t.push(n)),t}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(t,n){this._snapshot.docs.forEach(r=>{t.call(n,new Kb(this._firestore,this._userDataWriter,r.key,r,new lm(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(t={}){const n=!!t.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new Ge(Pe.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(o,i){if(o._snapshot.oldDocs.isEmpty()){let s=0;return o._snapshot.docChanges.map(a=>{const l=new Kb(o._firestore,o._userDataWriter,a.doc.key,a.doc,new lm(o._snapshot.mutatedKeys.has(a.doc.key),o._snapshot.fromCache),o.query.converter);return a.doc,{type:"added",doc:l,oldIndex:-1,newIndex:s++}})}{let s=o._snapshot.oldDocs;return o._snapshot.docChanges.filter(a=>i||a.type!==3).map(a=>{const l=new Kb(o._firestore,o._userDataWriter,a.doc.key,a.doc,new lm(o._snapshot.mutatedKeys.has(a.doc.key),o._snapshot.fromCache),o.query.converter);let u=-1,c=-1;return a.type!==0&&(u=s.indexOf(a.doc.key),s=s.delete(a.doc.key)),a.type!==1&&(s=s.add(a.doc),c=s.indexOf(a.doc.key)),{type:vxe(a.type),doc:l,oldIndex:u,newIndex:c}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function vxe(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return ht()}}/**
3280 * @license
3281 * Copyright 2020 Google LLC
3282 *
3283 * Licensed under the Apache License, Version 2.0 (the "License");
3284 * you may not use this file except in compliance with the License.
3285 * You may obtain a copy of the License at
3286 *
3287 *   http://www.apache.org/licenses/LICENSE-2.0
3288 *
3289 * Unless required by applicable law or agreed to in writing, softw
3289are
3290 * distributed under the License is distributed on an "AS IS" BASIS,
3291 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3292 * See the License for the specific language governing permissions and
3293 * limitations under the License.
3294 */function bxe(e){e=Po(e,uo);const t=Po(e.firestore,ka);return oxe(Uy(t),e._key).then(n=>k9(t,e,n))}class ZR extends yxe{constructor(t){super(),this.firestore=t}convertBytes(t){return new Ph(t)}convertReference(t){const n=this.convertDocumentKey(t,this.firestore._databaseId);return new uo(this.firestore,null,n)}}function wxe(e){e=Po(e,Qu);const t=Po(e.firestore,ka),n=Uy(t),r=new ZR(t);return C9(e._query),ixe(n,e._query).then(o=>new I9(t,r,e,o))}function eO(e,t,n){e=Po(e,uo);const r=Po(e.firestore,ka),o=JR(e.converter,t,n);return Ky(r,[HR(Gy(r),"setDoc",e._key,o,e.converter!==null,n).toMutation(e._key,ko.none())])}function tO(e,t,n,...r){e=Po(e,uo);const o=Po(e.firestore,ka),i=Gy(o);let s;return s=typeof(t=_n(t))=="string"||t instanceof Hy?g9(i,"updateDoc",e._key,t,n,r):m9(i,"updateDoc",e._key,t),Ky(o,[s.toMutation(e._key,ko.exists(!0))])}function QL(e){return Ky(Po(e.firestore,ka),[new Sx(e._key,ko.none())])}function Cxe(e,t){const n=Po(e.firestore,ka),r=jr(e),o=JR(e.converter,t);return Ky(n,[HR(Gy(e.firestore),"addDoc",r._key,o,e.converter!==null,{}).toMutation(r._key,ko.exists(!1))]).then(()=>r)}function A9(e,...t){var n,r,o;e=_n(e);let i={includeMetadataChanges:!1,source:"default"},s=0;typeof t[s]!="object"||GL(t[s])||(i=t[s],s++);const a={includeMetadataChanges:i.includeMetadataChanges,source:i.source};if(GL(t[s])){const d=t[s];t[s]=(n=d.next)===null||n===void 0?void 0:n.bind(d),t[s+1]=(r=d.error)===null||r===void 0?void 0:r.bind(d),t[s+2]=(o=d.complete)===null||o===void 0?void 0:o.bind(d)}let l,u,c;if(e instanceof uo)u=Po(e.firestore,ka),c=vx(e._key.path),l={next:d=>{t[s]&&t[s](k9(u,e,d))},error:t[s+1],complete:t[s+2]};else{const d=Po(e,Qu);u=Po(d.firestore,ka),c=d._query;const f=new ZR(u);l={next:h=>{t[s]&&t[s](new I9(u,f,d,h))},error:t[s+1],complete:t[s+2]},C9(e._query)}return function(f,h,p,g){const b=new zR(g),y=new BR(h,b,p);return f.asyncQueue.enqueueAndForget(async()=>LR(await Tw(f),y)),()=>{b.Qa(),f.asyncQueue.enqueueAndForget(async()=>NR(await Tw(f),y))}}(Uy(u),c,a,l)}function Ky(e,t){return function(r,o){const i=new ba;return r.asyncQueue.enqueueAndForget(async()=>WCe(await rxe(r),o,i)),i.promise}(Uy(e),t)}function k9(e,t,n){const r=n.docs.get(t._key),o=new ZR(e);return new E9(e,o,t._key,r,new lm(n.hasPendingWrites,n.fromCache),t.converter)}/**
3295 * @license
3296 * Copyright 2020 Google LLC
3297 *
3298 * Licensed under the Apache License, Version 2.0 (the "License");
3299 * you may not use this file except in compliance with the License.
3300 * You may obtain a copy of the License at
3301 *
3302 *   http://www.apache.org/licenses/LICENSE-2.0
3303 *
3304 * Unless required by applicable law or agreed to in writing, software
3305 * distributed under the License is distributed on an "AS IS" BASIS,
3306 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3307 * See the License for the specific language governing permissions and
3308 * limitations under the License.
3309 */class xxe{constructor(t,n){this._firestore=t,this._commitHandler=n,this._mutations=[],this._committed=!1,this._dataReader=Gy(t)}set(t,n,r){this._verifyNotCommitted();const o=k_(t,this._firestore),i=JR(o.converter,n,r),s=HR(this._dataReader,"WriteBatch.set",o._key,i,o.converter!==null,r);return this._mutations.push(s.toMutation(o._key,ko.none())),this}update(t,n,r,...o){this._verifyNotCommitted();const i=k_(t,this._firestore);let s;return s=typeof(n=_n(n))=="string"||n instanceof Hy?g9(this._dataReader,"WriteBatch.update",i._key,n,r,o):m9(this._dataReader,"WriteBatch.update",i._key,n),this._mutations.push(s.toMutation(i._key,ko.exists(!0))),this}delete(t){this._verifyNotCommitted();const n=k_(t,this._firestore);return this._mutations=this._mutations.concat(new Sx(n._key,ko.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new Ge(Pe.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function k_(e,t){if((e=_n(e)).firestore!==t)throw new Ge(Pe.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}function BUe(){return new WR("serverTimestamp")}function Sxe(...e){return new GR("arrayUnion",e)}/**
3310 * @license
3311 * Copyright 2020 Google LLC
3312 *
3313 * Licensed under the Apache License, Version 2.0 (the "License");
3314 * you may not use this file except in compliance with the License.
3315 * You may obtain a copy of the License at
3316 *
3317 *   http://www.apache.org/licenses/LICENSE-2.0
3318 *
3319 * Unless required by applicable law or agreed to in writing, software
3320 * distributed under the License is distributed on an "AS IS" BASIS,
3321 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3322 * See the License for the specific language governing permissions and
3323 * limitations under the License.
3324 */function _xe(e){return Uy(e=Po(e,ka)),new xxe(e,t=>Ky(e,t))}(function(t,n=!0){(function(o){rp=o})(Cd),od(new $u("firestore",(r,{instanceIdentifier:o,options:i})=>{const s=r.getProvider("app").getImmediate(),a=new ka(new Iwe(r.getProvider("auth-internal")),new Twe(r.getProvider("app-check-internal")),function(u,c){if(!Object.prototype.hasOwnProperty.apply(u.options,["projectId"]))throw new Ge(Pe.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new zg(u.options.projectId,c)}(s,o),s);return i=Object.assign({useFetchStreams:n},i),a._setSettings(i),a},"PUBLIC").setMultipleInstances(!0)),ga(cL,"4.5.1",t),ga(cL,"4.5.1","esm2017")})();/**
3325 * @license
3326 * Copyright 2017 Google LLC
3327 *
3328 * Licensed under the Apache License, Version 2.0 (the "License");
3329 * you may not use this file except in compliance with the License.
3330 * You may obtain a copy of the License at
3331 *
3332 *   http://www.apache.org/licenses/LICENSE-2.0
3333 *
3334 * Unless required by applicable law or agreed to in writing, software
3335 * distributed under the License is distributed on an "AS IS" BASIS,
3336 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3337 * See the License for the specific language governing permissions and
3338 * limitations under the License.
3339 */const P9="firebasestorage.googleapis.com",T9="storageBucket",Exe=2*60*1e3,Ixe=10*60*1e3;/**
3340 * @license
3341 * Copyright 2017 Google LLC
3342 *
3343 * Licensed under the Apache License, Version 2.0 (the "License");
3344 * you may not use this file except in compliance with the License.
3345 * You may obtain a copy of the License at
3346 *
3347 *   http://www.apache.org/licenses/LICENSE-2.0
3348 *
3349 * Unless required by applicable law or agreed to in writing, software
3350 * distributed under the License is distributed on an "AS IS" BASIS,
3351 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3352 * See the License for the specific language governing permissions and
3353 * limitations under the License.
3354 */class dr extends $a{constructor(t,n,r=0){super(P_(t),`Firebase Storage: ${n} (${P_(t)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,dr.prototype)}get status(){return this.status_}set status(t){this.status_=t}_codeEquals(t){return P_(t)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(t){this.customData.serverResponse=t,this.customData.serverResponse?this.message=`${this._baseMessage}
3355${this.customData.serverResponse}`:this.message=this._baseMessage}}var cr;(function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(cr||(cr={}));function P_(e){return"storage/"+e}function nO(){const e="An unknown error occurred, please check the error payload for server response.";return new dr(cr.UNKNOWN,e)}function Axe(e){return new dr(cr.QUOTA_EXCEEDED,"Quota for bucket '"+e+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function kxe(){const e="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new dr(cr.UNAUTHENTICATED,e)}function Pxe(){return new dr(cr.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function Txe(e){return new dr(cr.UNAUTHORIZED,"User does not have permission to access '"+e+"'.")}function Rxe(){return new dr(cr.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function Oxe(){return new dr(cr.CANCELED,"User canceled the upload/download.")}function Mxe(e){return new dr(cr.INVALID_URL,"Invalid URL '"+e+"'.")}function Dxe(e){return new dr(cr.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+e+"'.")}function $xe(){return new dr(cr.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+T9+"' property when initializing the app?")}function Fxe(){return new dr(cr.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function Lxe(e){return new dr(cr.UNSUPPORTED_ENVIRONMENT,`${e} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function EA(e){return new dr(cr.INVALID_ARGUMENT,e)}function R9(){return new dr(cr.APP_DELETED,"The Firebase app was deleted.")}function Nxe(e){return new dr(cr.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function Hm(e,t){return new dr(cr.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function jp(e){throw new dr(cr.INTERNAL_ERROR,"Internal error: "+e)}/**
3356 * @license
3357 * Copyright 2017 Google LLC
3358 *
3359 * Licensed under the Apache License, Version 2.0 (the "License");
3360 * you may not use this file except in compliance with the License.
3361 * You may obtain a copy of the License at
3362 *
3363 *   http://www.apache.org/licenses/LICENSE-2.0
3364 *
3365 * Unless required by applicable law or agreed to in writing, software
3366 * distributed under the License is distributed on an "AS IS" BASIS,
3367 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3368 * See the License for the specific language governing permissions and
3369 * limitations under the License.
3370 */class ui{constructor(t,n){this.bucket=t,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(t,n){let r;try{r=ui.makeFromUrl(t,n)}catch{return new ui(t,"")}if(r.path==="")return r;throw Dxe(t)}static makeFromUrl(t,n){let r=null;const o="([A-Za-z0-9.\\-_]+)";function i(C){C.path.charAt(C.path.length-1)==="/"&&(C.path_=C.path_.slice(0,-1))}const s="(/(.*))?$",a=new RegExp("^gs://"+o+s,"i"),l={bucket:1,path:3};function u(C){C.path_=decodeURIComponent(C.path)}const c="v[A-Za-z0-9_]+",d=n.replace(/[.]/g,"\\."),f="(/([^?#]*).*)?$",h=new RegExp(`^https?://${d}/${c}/b/${o}/o${f}`,"i"),p={bucket:1,path:3},g=n===P9?"(?:storage.googleapis.com|storage.cloud.google.com)":n,b="([^?#]*)",y=new RegExp(`^https?://${g}/${o}/${b}`,"i"),w=[{regex:a,indices:l,postModify:i},{regex:h,indices:p,postModify:u},{regex:y,indices:{bucket:1,path:2},postModify:u}];for(let C=0;C<w.length;C++){const A=w[C],S=A.regex.exec(t);if(S){const _=S[A.indices.bucket];let k=S[A.indices.path];k||(k=""),r=new ui(_,k),A.postModify(r);break}}if(r==null)throw Mxe(t);return r}}class Vxe{constructor(t){this.promise_=Promise.reject(t)}getPromise(){return this.promise_}cancel(t=!1){}}/**
3371 * @license
3372 * Copyright 2017 Google LLC
3373 *
3374 * Licensed under the Apache License, Version 2.0 (the "License");
3375 * you may not use this file except in compliance with the License.
3376 * You may obtain a copy of the License at
3377 *
3378 *   http://www.apache.org/licenses/LICENSE-2.0
3379 *
3380 * Unless required by applicable law or agreed to in writing, software
3381 * distributed under the License is distributed on an "AS IS" BASIS,
3382 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3383 * See the License for the specific language governing permissions and
3384 * limitations under the License.
3385 */function Bxe(e,t,n){let r=1,o=null,i=null,s=!1,a=0;function l(){return a===2}let u=!1;function c(...b){u||(u=!0,t.apply(null,b))}function d(b){o=setTimeout(()=>{o=null,e(h,l())},b)}function f(){i&&clearTimeout(i)}function h(b,...y){if(u){f();return}if(b){f(),c.call(null,b,...y);return}if(l()||s){f(),c.call(null,b,...y);return}r<64&&(r*=2);let w;a===1?(a=2,w=0):w=(r+Math.random())*1e3,d(w)}let p=!1;function g(b){p||(p=!0,f(),!u&&(o!==null?(b||(a=2),clearTimeout(o),d(0)):b||(a=1)))}return d(0),i=setTimeout(()=>{s=!0,g(!0)},n),g}function jxe(e){e(!1)}/**
3386 * @license
3387 * Copyright 2017 Google LLC
3388 *
3389 * Licensed under the Apache License, Version 2.0 (the "License");
3390 * you may not use this file except in compliance with the License.
3391 * You may obtain a copy of the License at
3392 *
3393 *   http://www.apache.org/licenses/LICENSE-2.0
3394 *
3395 * Unless required by applicable law or agreed to in writing, software
3396 * distributed under the License is distributed on an "AS IS" BASIS,
3397 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3398 * See the License for the specific language governing permissions and
3399 * limitations under the License.
3400 */function zxe(e){return e!==void 0}function Uxe(e){return typeof e=="object"&&!Array.isArray(e)}function O9(e){return typeof e=="string"||e instanceof String}function YL(e){return rO()&&e instanceof Blob}function rO(){return typeof Blob<"u"}function XL(e,t,n,r){if(r<t)throw EA(`Invalid value for '${e}'. Expected ${t} or greater.`);if(r>n)throw EA(`Invalid value for '${e}'. Expected ${n} or less.`)}/**
3401 * @license
3402 * Copyright 2017 Google LLC
3403 *
3404 * Licensed under the Apache License, Version 2.0 (the "License");
3405 * you may not use this file except in compliance with the License.
3406 * You may obtain a copy of the License at
3407 *
3408 *   http://www.apache.org/licenses/LICENSE-2.0
3409 *
3410 * Unless required by applicable law or agreed to in writing, software
3411 * distributed under the License is distributed on an "AS IS" BASIS,
3412 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3413 * See the License for the specific language governing permissions and
3414 * limitations under the License.
3415 */function Hxe(e,t,n){let r=t;return n==null&&(r=`https://${t}`),`${n}://${r}/v0${e}`}function Wxe(e){const t=encodeURIComponent;let n="?";for(const r in e)if(e.hasOwnProperty(r)){const o=t(r)+"="+t(e[r]);n=n+o+"&"}return n=n.slice(0,-1),n}/**
3416 * @license
3417 * Copyright 2017 Google LLC
3418 *
3419 * Licensed under the Apache License, Version 2.0 (the "License");
3420 * you may not use this file except in compliance with the License.
3421 * You may obtain a copy of the License at
3422 *
3423 *   http://www.apache.org/licenses/LICENSE-2.0
3424 *
3425 * Unless required by applicable law or agreed to in writing, software
3426 * distributed under the License is distributed on an "AS IS" BASIS,
3427 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3428 * See the License for the specific language governing permissions and
3429 * limitations under the License.
3430 */var Lc;(function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"})(Lc||(Lc={}));/**
3431 * @license
3432 * Copyright 2022 Google LLC
3433 *
3434 * Licensed under the Apache License, Version 2.0 (the "License");
3435 * you may not use this file except in compliance with the License.
3436 * You may obtain a copy of the License at
3437 *
3438 *   http://www.apache.org/licenses/LICENSE-2.0
3439 *
3440 * Unless required by applicable law or agreed to in writing, software
3441 * distributed under the License is distributed on an "AS IS" BASIS,
3442 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3443 * See the License for the specific language governing permissions and
3444 * limitations under the License.
3445 */function Gxe(e,t){const n=e>=500&&e<600,o=[408,429].indexOf(e)!==-1,i=t.indexOf(e)!==-1;return n||o||i}/**
3446 * @license
3447 * Copyright 2017 Google LLC
3448 *
3449 * Licensed under the Apache License, Version 2.0 (the "License");
3450 * you may not use this file except in compliance with the License.
3451 * You may obtain a copy of the License at
3452 *
3453 *   http://www.apache.org/licenses/LICENSE-2.0
3454 *
3455 * Unless required by applicable law or agreed to in writing, software
3456 * distributed under the License is distributed on an "AS IS" BASIS,
3457 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3458 * See the License for the specific language governing permissions and
3459 * limitations under the License.
3460 */class qxe{constructor(t,n,r,o,i,s,a,l,u,c,d,f=!0){this.url_=t,this.method_=n,this.headers_=r,this.body_=o,this.successCodes_=i,this.additionalRetryCodes_=s,this.callback_=a,this.errorCallback_=l,this.timeout_=u,this.progressCallback_=c,this.connectionFactory_=d,this.retry=f,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((h,p)=>{this.resolve_=h,this.reject_=p,this.start_()})}start_(){const t=(r,o)=>{if(o){r(!1,new rb(!1,null,!0));return}const i=this.connectionFactory_();this.pendingConnection_=i;const s=a=>{const l=a.loaded,u=a.lengthComputable?a.total:-1;this.progressCallback_!==null&&this.progressCallback_(l,u)};this.progressCallback_!==null&&i.addUploadProgressListener(s),i.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&i.removeUploadProgressListener(s),this.pendingConnection_=null;const a=i.getErrorCode()===Lc.NO_ERROR,l=i.getStatus();if(!a||Gxe(l,this.additionalRetryCodes_)&&this.retry){const c=i.getErrorCode()===Lc.ABORT;r(!1,new rb(!1,null,c));return}const u=this.successCodes_.indexOf(l)!==-1;r(!0,new rb(u,i))})},n=(r,o)=>{const i=this.resolve_,s=this.reject_,a=o.connection;if(o.wasSuccessCode)try{const l=this.callback_(a,a.getResponse());zxe(l)?i(l):i()}catch(l){s(l)}else if(a!==null){const l=nO();l.serverResponse=a.getErrorText(),this.errorCallback_?s(this.errorCallback_(a,l)):s(l)}else if(o.canceled){const l=this.appDelete_?R9():Oxe();s(l)}else{const l=Rxe();s(l)}};this.canceled_?n(!1,new rb(!1,null,!0)):this.backoffId_=Bxe(t,n,this.timeout_)}getPromise(){return this.promise_}cancel(t){this.canceled_=!0,this.appDelete_=t||!1,this.backoffId_!==null&&jxe(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class rb{constructor(t,n,r){this.wasSuccessCode=t,this.connection=n,this.canceled=!!r}}function Kxe(e,t){t!==null&&t.length>0&&(e.Authorization="Firebase "+t)}function Qxe(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(t??"AppManager")}function Yxe(e,t){t&&(e["X-Firebase-GMPID"]=t)}function Xxe(e,t){t!==null&&(e["X-Firebase-AppCheck"]=t)}
3460function Jxe(e,t,n,r,o,i,s=!0){const a=Wxe(e.urlParams),l=e.url+a,u=Object.assign({},e.headers);return Yxe(u,t),Kxe(u,n),Qxe(u,i),Xxe(u,r),new qxe(l,e.method,u,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,o,s)}/**
3461 * @license
3462 * Copyright 2017 Google LLC
3463 *
3464 * Licensed under the Apache License, Version 2.0 (the "License");
3465 * you may not use this file except in compliance with the License.
3466 * You may obtain a copy of the License at
3467 *
3468 *   http://www.apache.org/licenses/LICENSE-2.0
3469 *
3470 * Unless required by applicable law or agreed to in writing, software
3471 * distributed under the License is distributed on an "AS IS" BASIS,
3472 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3473 * See the License for the specific language governing permissions and
3474 * limitations under the License.
3475 */function Zxe(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function eSe(...e){const t=Zxe();if(t!==void 0){const n=new t;for(let r=0;r<e.length;r++)n.append(e[r]);return n.getBlob()}else{if(rO())return new Blob(e);throw new dr(cr.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}}function tSe(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}/**
3476 * @license
3477 * Copyright 2021 Google LLC
3478 *
3479 * Licensed under the Apache License, Version 2.0 (the "License");
3480 * you may not use this file except in compliance with the License.
3481 * You may obtain a copy of the License at
3482 *
3483 *   http://www.apache.org/licenses/LICENSE-2.0
3484 *
3485 * Unless required by applicable law or agreed to in writing, software
3486 * distributed under the License is distributed on an "AS IS" BASIS,
3487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3488 * See the License for the specific language governing permissions and
3489 * limitations under the License.
3490 */function nSe(e){if(typeof atob>"u")throw Lxe("base-64");return atob(e)}/**
3491 * @license
3492 * Copyright 2017 Google LLC
3493 *
3494 * Licensed under the Apache License, Version 2.0 (the "License");
3495 * you may not use this file except in compliance with the License.
3496 * You may obtain a copy of the License at
3497 *
3498 *   http://www.apache.org/licenses/LICENSE-2.0
3499 *
3500 * Unless required by applicable law or agreed to in writing, software
3501 * distributed under the License is distributed on an "AS IS" BASIS,
3502 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3503 * See the License for the specific language governing permissions and
3504 * limitations under the License.
3505 */const ia={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class T_{constructor(t,n){this.data=t,this.contentType=n||null}}function rSe(e,t){switch(e){case ia.RAW:return new T_(M9(t));case ia.BASE64:case ia.BASE64URL:return new T_(D9(e,t));case ia.DATA_URL:return new T_(iSe(t),sSe(t))}throw nO()}function M9(e){const t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|r&63);else if((r&64512)===55296)if(!(n<e.length-1&&(e.charCodeAt(n+1)&64512)===56320))t.push(239,191,189);else{const i=r,s=e.charCodeAt(++n);r=65536|(i&1023)<<10|s&1023,t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}else(r&64512)===56320?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(t)}function oSe(e){let t;try{t=decodeURIComponent(e)}catch{throw Hm(ia.DATA_URL,"Malformed data URL.")}return M9(t)}function D9(e,t){switch(e){case ia.BASE64:{const o=t.indexOf("-")!==-1,i=t.indexOf("_")!==-1;if(o||i)throw Hm(e,"Invalid character '"+(o?"-":"_")+"' found: is it base64url encoded?");break}case ia.BASE64URL:{const o=t.indexOf("+")!==-1,i=t.indexOf("/")!==-1;if(o||i)throw Hm(e,"Invalid character '"+(o?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=nSe(t)}catch(o){throw o.message.includes("polyfill")?o:Hm(e,"Invalid character found")}const r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}class $9{constructor(t){this.base64=!1,this.contentType=null;const n=t.match(/^data:([^,]+)?,/);if(n===null)throw Hm(ia.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const r=n[1]||null;r!=null&&(this.base64=aSe(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=t.substring(t.indexOf(",")+1)}}function iSe(e){const t=new $9(e);return t.base64?D9(ia.BASE64,t.rest):oSe(t.rest)}function sSe(e){return new $9(e).contentType}function aSe(e,t){return e.length>=t.length?e.substring(e.length-t.length)===t:!1}/**
3506 * @license
3507 * Copyright 2017 Google LLC
3508 *
3509 * Licensed under the Apache License, Version 2.0 (the "License");
3510 * you may not use this file except in compliance with the License.
3511 * You may obtain a copy of the License at
3512 *
3513 *   http://www.apache.org/licenses/LICENSE-2.0
3514 *
3515 * Unless required by applicable law or agreed to in writing, software
3516 * distributed under the License is distributed on an "AS IS" BASIS,
3517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3518 * See the License for the specific language governing permissions and
3519 * limitations under the License.
3520 */class au{constructor(t,n){let r=0,o="";YL(t)?(this.data_=t,r=t.size,o=t.type):t instanceof ArrayBuffer?(n?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),r=this.data_.length):t instanceof Uint8Array&&(n?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),r=t.length),this.size_=r,this.type_=o}size(){return this.size_}type(){return this.type_}slice(t,n){if(YL(this.data_)){const r=this.data_,o=tSe(r,t,n);return o===null?null:new au(o)}else{const r=new Uint8Array(this.data_.buffer,t,n-t);return new au(r,!0)}}static getBlob(...t){if(rO()){const n=t.map(r=>r instanceof au?r.data_:r);return new au(eSe.apply(null,n))}else{const n=t.map(s=>O9(s)?rSe(ia.RAW,s).data:s.data_);let r=0;n.forEach(s=>{r+=s.byteLength});const o=new Uint8Array(r);let i=0;return n.forEach(s=>{for(let a=0;a<s.length;a++)o[i++]=s[a]}),new au(o,!0)}}uploadData(){return this.data_}}/**
3521 * @license
3522 * Copyright 2017 Google LLC
3523 *
3524 * Licensed under the Apache License, Version 2.0 (the "License");
3525 * you may not use this file except in compliance with the License.
3526 * You may obtain a copy of the License at
3527 *
3528 *   http://www.apache.org/licenses/LICENSE-2.0
3529 *
3530 * Unless required by applicable law or agreed to in writing, software
3531 * distributed under the License is distributed on an "AS IS" BASIS,
3532 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3533 * See the License for the specific language governing permissions and
3534 * limitations under the License.
3535 */function lSe(e){let t;try{t=JSON.parse(e)}catch{return null}return Uxe(t)?t:null}/**
3536 * @license
3537 * Copyright 2017 Google LLC
3538 *
3539 * Licensed under the Apache License, Version 2.0 (the "License");
3540 * you may not use this file except in compliance with the License.
3541 * You may obtain a copy of the License at
3542 *
3543 *   http://www.apache.org/licenses/LICENSE-2.0
3544 *
3545 * Unless required by applicable law or agreed to in writing, software
3546 * distributed under the License is distributed on an "AS IS" BASIS,
3547 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3548 * See the License for the specific language governing permissions and
3549 * limitations under the License.
3550 */function uSe(e){if(e.length===0)return null;const t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function cSe(e,t){const n=t.split("/").filter(r=>r.length>0).join("/");return e.length===0?n:e+"/"+n}function F9(e){const t=e.lastIndexOf("/",e.length-2);return t===-1?e:e.slice(t+1)}/**
3551 * @license
3552 * Copyright 2017 Google LLC
3553 *
3554 * Licensed under the Apache License, Version 2.0 (the "License");
3555 * you may not use this file except in compliance with the License.
3556 * You may obtain a copy of the License at
3557 *
3558 *   http://www.apache.org/licenses/LICENSE-2.0
3559 *
3560 * Unless required by applicable law or agreed to in writing, software
3561 * distributed under the License is distributed on an "AS IS" BASIS,
3562 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3563 * See the License for the specific language governing permissions and
3564 * limitations under the License.
3565 */function dSe(e,t){return t}class vo{constructor(t,n,r,o){this.server=t,this.local=n||t,this.writable=!!r,this.xform=o||dSe}}let ob=null;function fSe(e){return!O9(e)||e.length<2?e:F9(e)}function hSe(){if(ob)return ob;const e=[];e.push(new vo("bucket")),e.push(new vo("generation")),e.push(new vo("metageneration")),e.push(new vo("name","fullPath",!0));function t(i,s){return fSe(s)}const n=new vo("name");n.xform=t,e.push(n);function r(i,s){return s!==void 0?Number(s):s}const o=new vo("size");return o.xform=r,e.push(o),e.push(new vo("timeCreated")),e.push(new vo("updated")),e.push(new vo("md5Hash",null,!0)),e.push(new vo("cacheControl",null,!0)),e.push(new vo("contentDisposition",null,!0)),e.push(new vo("contentEncoding",null,!0)),e.push(new vo("contentLanguage",null,!0)),e.push(new vo("contentType",null,!0)),e.push(new vo("metadata","customMetadata",!0)),ob=e,ob}function pSe(e,t){function n(){const r=e.bucket,o=e.fullPath,i=new ui(r,o);return t._makeStorageReference(i)}Object.defineProperty(e,"ref",{get:n})}function mSe(e,t,n){const r={};r.type="file";const o=n.length;for(let i=0;i<o;i++){const s=n[i];r[s.local]=s.xform(r,t[s.server])}return pSe(r,e),r}function gSe(e,t,n){const r=lSe(t);return r===null?null:mSe(e,r,n)}function ySe(e,t){const n={},r=t.length;for(let o=0;o<r;o++){const i=t[o];i.writable&&(n[i.server]=e[i.local])}return JSON.stringify(n)}class vSe{constructor(t,n,r,o){this.url=t,this.method=n,this.handler=r,this.timeout=o,this.urlParam
3565s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/**
3566 * @license
3567 * Copyright 2017 Google LLC
3568 *
3569 * Licensed under the Apache License, Version 2.0 (the "License");
3570 * you may not use this file except in compliance with the License.
3571 * You may obtain a copy of the License at
3572 *
3573 *   http://www.apache.org/licenses/LICENSE-2.0
3574 *
3575 * Unless required by applicable law or agreed to in writing, software
3576 * distributed under the License is distributed on an "AS IS" BASIS,
3577 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3578 * See the License for the specific language governing permissions and
3579 * limitations under the License.
3580 */function bSe(e){if(!e)throw nO()}function wSe(e,t){function n(r,o){const i=gSe(e,o,t);return bSe(i!==null),i}return n}function CSe(e){function t(n,r){let o;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invalid")?o=Pxe():o=kxe():n.getStatus()===402?o=Axe(e.bucket):n.getStatus()===403?o=Txe(e.path):o=r,o.status=n.getStatus(),o.serverResponse=r.serverResponse,o}return t}function xSe(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}function SSe(e,t,n){const r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=xSe(null,t)),r}function _Se(e,t,n,r,o){const i=t.bucketOnlyServerUrl(),s={"X-Goog-Upload-Protocol":"multipart"};function a(){let w="";for(let C=0;C<2;C++)w=w+Math.random().toString().slice(2);return w}const l=a();s["Content-Type"]="multipart/related; boundary="+l;const u=SSe(t,r,o),c=ySe(u,n),d="--"+l+`\r
3581Content-Type: application/json; charset=utf-8\r
3582\r
3583`+c+`\r
3584--`+l+`\r
3585Content-Type: `+u.contentType+`\r
3586\r
3587`,f=`\r
3588--`+l+"--",h=au.getBlob(d,r,f);if(h===null)throw Fxe();const p={name:u.fullPath},g=Hxe(i,e.host,e._protocol),b="POST",y=e.maxUploadRetryTime,v=new vSe(g,b,wSe(e,n),y);return v.urlParams=p,v.headers=s,v.body=h.uploadData(),v.errorHandler=CSe(t),v}class ESe{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=Lc.NO_ERROR,this.sendPromise_=new Promise(t=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=Lc.ABORT,t()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=Lc.NETWORK_ERROR,t()}),this.xhr_.addEventListener("load",()=>{t()})})}send(t,n,r,o){if(this.sent_)throw jp("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,t,!0),o!==void 0)for(const i in o)o.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,o[i].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw jp("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw jp("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw jp("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw jp("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(t){return this.xhr_.getResponseHeader(t)}addUploadProgressListener(t){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",t)}removeUploadProgressListener(t){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",t)}}class ISe extends ESe{initXhr(){this.xhr_.responseType="text"}}function ASe(){return new ISe}/**
3589 * @license
3590 * Copyright 2019 Google LLC
3591 *
3592 * Licensed under the Apache License, Version 2.0 (the "License");
3593 * you may not use this file except in compliance with the License.
3594 * You may obtain a copy of the License at
3595 *
3596 *   http://www.apache.org/licenses/LICENSE-2.0
3597 *
3598 * Unless required by applicable law or agreed to in writing, software
3599 * distributed under the License is distributed on an "AS IS" BASIS,
3600 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3601 * See the License for the specific language governing permissions and
3602 * limitations under the License.
3603 */let Dx=class IA{constructor(t,n){this._service=t,n instanceof ui?this._location=n:this._location=ui.makeFromUrl(n,t.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(t,n){return new IA(t,n)}get root(){const t=new ui(this._location.bucket,"");return this._newRef(this._service,t)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return F9(this._location.path)}get storage(){return this._service}get parent(){const t=uSe(this._location.path);if(t===null)return null;const n=new ui(this._location.bucket,t);return new IA(this._service,n)}_throwIfRoot(t){if(this._location.path==="")throw Nxe(t)}};function kSe(e,t,n){e._throwIfRoot("uploadBytes");const r=_Se(e.storage,e._location,hSe(),new au(t,!0),n);return e.storage.makeRequestWithTokens(r,ASe).then(o=>({metadata:o,ref:e}))}function PSe(e,t){const n=cSe(e._location.path,t),r=new ui(e._location.bucket,n);return new Dx(e.storage,r)}/**
3604 * @license
3605 * Copyright 2017 Google LLC
3606 *
3607 * Licensed under the Apache License, Version 2.0 (the "License");
3608 * you may not use this file except in compliance with the License.
3609 * You may obtain a copy of the License at
3610 *
3611 *   http://www.apache.org/licenses/LICENSE-2.0
3612 *
3613 * Unless required by applicable law or agreed to in writing, software
3614 * distributed under the License is distributed on an "AS IS" BASIS,
3615 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3616 * See the License for the specific language governing permissions and
3617 * limitations under the License.
3618 */function TSe(e){return/^[A-Za-z]+:\/\//.test(e)}function RSe(e,t){return new Dx(e,t)}function L9(e,t){if(e instanceof oO){const n=e;if(n._bucket==null)throw $xe();const r=new Dx(n,n._bucket);return t!=null?L9(r,t):r}else return t!==void 0?PSe(e,t):e}function OSe(e,t){if(t&&TSe(t)){if(e instanceof oO)return RSe(e,t);throw EA("To use ref(service, url), the first argument must be a Storage instance.")}else return L9(e,t)}function JL(e,t){const n=t==null?void 0:t[T9];return n==null?null:ui.makeFromBucketSpec(n,e)}function MSe(e,t,n,r={}){e.host=`${t}:${n}`,e._protocol="http";const{mockUserToken:o}=r;o&&(e._overrideAuthToken=typeof o=="string"?o:y6(o,e.app.options.projectId))}class oO{constructor(t,n,r,o,i){this.app=t,this._authProvider=n,this._appCheckProvider=r,this._url=o,this._firebaseVersion=i,this._bucket=null,this._host=P9,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=Exe,this._maxUploadRetryTime=Ixe,this._requests=new Set,o!=null?this._bucket=ui.makeFromBucketSpec(o,this._host):this._bucket=JL(this._host,this.app.options)}get host(){return this._host}set host(t){this._host=t,this._url!=null?this._bucket=ui.makeFromBucketSpec(this._url,t):this._bucket=JL(t,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(t){XL("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(t){XL("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const t=this._authProvider.getImmediate({optional:!0});if(t){const n=await t.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){const t=this._appCheckProvider.getImmediate({optional:!0});return t?(await t.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(t=>t.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(t){return new Dx(this,t)}_makeRequest(t,n,r,o,i=!0){if(this._deleted)return new Vxe(R9());{const s=Jxe(t,this._appId,r,o,n,this._firebaseVersion,i);return this._requests.add(s),s.getPromise().then(()=>this._requests.delete(s),()=>this._requests.delete(s)),s}}async makeRequestWithTokens(t,n){const[r,o]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(t,n,r,o).getPromise()}}const ZL="@firebase/storage",eN="0.12.3";/**
3619 * @license
3620 * Copyright 2020 Google LLC
3621 *
3622 * Licensed under the Apache License, Version 2.0 (the "License");
3623 * you may not use this file except in compliance with the License.
3624 * You may obtain a copy of the License at
3625 *
3626 *   http://www.apache.org/licenses/LICENSE-2.0
3627 *
3628 * Unless required by applicable law or agreed to in writing, software
3629 * distributed under the License is distributed on an "AS IS" BASIS,
3630 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3631 * See the License for the specific language governing permissions and
3632 * limitations under the License.
3633 */const N9="storage";function DSe(e,t,n){return e=_n(e),kSe(e,t,n)}function $Se(e,t){return e=_n(e),OSe(e,t)}function FSe(e=LT(),t){e=_n(e);const r=QC(e,N9).getImmediate({identifier:t}),o=p6("storage");return o&&V9(r,...o),r}function V9(e,t,n,r={}){MSe(e,t,n,r)}function LSe(e,{instanceIdentifier:t}){const n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal"),o=e.getProvider("app-check-internal");return new oO(n,r,o,t,Cd)}function NSe(){od(new $u(N9,LSe,"PUBLIC").setMultipleInstances(!0)),ga(ZL,eN,""),ga(ZL,eN,"esm2017")}NSe();
3633class Ed extends Error{}class VSe extends Ed{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class BSe extends Ed{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class jSe extends Ed{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Sf extends Ed{}class B9 extends Ed{constructor(t){super(`Invalid unit ${t}`)}}class Lo extends Ed{}class Bl extends Ed{constructor(){super("Zone is an abstract class")}}const Ue="numeric",$s="short",gi="long",Ow={year:Ue,month:Ue,day:Ue},j9={year:Ue,month:$s,day:Ue},zSe={year:Ue,month:$s,day:Ue,weekday:$s},z9={year:Ue,month:gi,day:Ue},U9={year:Ue,month:gi,day:Ue,weekday:gi},H9={hour:Ue,minute:Ue},W9={hour:Ue,minute:Ue,second:Ue},G9={hour:Ue,minute:Ue,second:Ue,timeZoneName:$s},q9={hour:Ue,minute:Ue,second:Ue,timeZoneName:gi},K9={hour:Ue,minute:Ue,hourCycle:"h23"},Q9={hour:Ue,minute:Ue,second:Ue,hourCycle:"h23"},Y9={hour:Ue,minute:Ue,second:Ue,hourCycle:"h23",timeZoneName:$s},X9={hour:Ue,minute:Ue,second:Ue,hourCycle:"h23",timeZoneName:gi},J9={year:Ue,month:Ue,day:Ue,hour:Ue,minute:Ue},Z9={year:Ue,month:Ue,day:Ue,hour:Ue,minute:Ue,second:Ue},eW={year:Ue,month:$s,day:Ue,hour:Ue,minute:Ue},tW={year:Ue,month:$s,day:Ue,hour:Ue,minute:Ue,second:Ue},USe={year:Ue,month:$s,day:Ue,weekday:$s,hour:Ue,minute:Ue},nW={year:Ue,month:gi,day:Ue,hour:Ue,minute:Ue,timeZoneName:$s},rW={year:Ue,month:gi,day:Ue,hour:Ue,minute:Ue,second:Ue,timeZoneName:$s},oW={year:Ue,month:gi,day:Ue,weekday:gi,hour:Ue,minute:Ue,timeZoneName:gi},iW={year:Ue,month:gi,day:Ue,weekday:gi,hour:Ue,minute:Ue,second:Ue,timeZoneName:gi};class Qy{get type(){throw new Bl}get name(){throw new Bl}get ianaName(){return this.name}get isUniversal(){throw new Bl}offsetName(t,n){throw new Bl}formatOffset(t,n){throw new Bl}offset(t){throw new Bl}equals(t){throw new Bl}get isValid(){throw new Bl}}let R_=null;class $x extends Qy{static get instance(){return R_===null&&(R_=new $x),R_}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return pW(t,n,r)}formatOffset(t,n){return Wm(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let Qb={};function HSe(e){return Qb[e]||(Qb[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Qb[e]}const WSe={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function GSe(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,s,a,l,u,c]=r;return[s,o,i,a,l,u,c]}function qSe(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const{type:i,value:s}=n[o],a=WSe[i];i==="era"?r[a]=s:yt(a)||(r[a]=parseInt(s,10))}return r}let ib={};class Sl extends Qy{static create(t){return ib[t]||(ib[t]=new Sl(t)),ib[t]}static resetCache(){ib={},Qb={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Sl.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return pW(t,n,r,this.name)}formatOffset(t,n){return Wm(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=HSe(this.name);let[o,i,s,a,l,u,c]=r.formatToParts?qSe(r,n):GSe(r,n);a==="BC"&&(o=-Math.abs(o)+1);const f=Lx({year:o,month:i,day:s,hour:l===24?0:l,minute:u,second:c,millisecond:0});let h=+n;const p=h%1e3;return h-=p>=0?p:1e3+p,(f-h)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let tN={};function KSe(e,t={}){const n=JSON.stringify([e,t]);let r=tN[n];return r||(r=new Intl.ListFormat(e,t),tN[n]=r),r}let AA={};function kA(e,t={}){const n=JSON.stringify([e,t]);let r=AA[n];return r||(r=new Intl.DateTimeFormat(e,t),AA[n]=r),r}let PA={};function QSe(e,t={}){const n=JSON.stringify([e,t]);let r=PA[n];return r||(r=new Intl.NumberFormat(e,t),PA[n]=r),r}let TA={};function YSe(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=TA[o];
3633return i||(i=new Intl.RelativeTimeFormat(e,t),TA[o]=i),i}let um=null;function XSe(){return um||(um=new Intl.DateTimeFormat().resolvedOptions().locale,um)}let nN={};function JSe(e){let t=nN[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,nN[e]=t}return t}function ZSe(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=kA(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=kA(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:s}=r;return[o,i,s]}}function e_e(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function t_e(e){const t=[];for(let n=1;n<=12;n++){const r=tt.utc(2009,n,1);t.push(e(r))}return t}function n_e(e){const t=[];for(let n=1;n<=7;n++){const r=tt.utc(2016,11,13+n);t.push(e(r))}return t}function sb(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function r_e(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class o_e{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...s}=r;if(!n||Object.keys(s).length>0){const a={useGrouping:!1,...r};r.padTo>0&&(a.minimumIntegerDigits=r.padTo),this.inf=QSe(t,a)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):lO(t,3);return or(n,this.padTo)}}}class i_e{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const s=-1*(t.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;t.offset!==0&&Sl.create(a).valid?(o=a,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=kA(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class s_e{constructor(t,n,r){this.opts={style:"long",...r},!n&&fW()&&(this.rtf=YSe(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):I_e(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const a_e={firstDay:1,minimalDays:4,weekend:[6,7]};class ln{static fromOpts(t){return ln.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const s=t||qn.defaultLocale,a=s||(i?"en-US":XSe()),l=n||qn.defaultNumberingSystem,u=r||qn.defaultOutputCalendar,c=RA(o)||qn.defaultWeekSettings;return new ln(a,l,u,c,s)}static resetCache(){um=null,AA={},PA={},TA={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return ln.create(t,n,r,o)}constructor(t,n,r,o,i){const[s,a,l]=ZSe(t);this.locale=s,this.numberingSystem=n||a||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=e_e(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=r_e(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:l
3633n.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,RA(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return sb(this,t,yW,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=t_e(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return sb(this,t,wW,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=n_e(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return sb(this,void 0,()=>CW,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[tt.utc(2016,11,13,9),tt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return sb(this,t,xW,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[tt.utc(-40,1,1),tt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),s=i.find(a=>a.type.toLowerCase()===r);return s?s.value:null}numberFormatter(t={}){return new o_e(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new i_e(t,this.intl,n)}relFormatter(t={}){return new s_e(this.intl,this.isEnglish(),t)}listFormatter(t={}){return KSe(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:hW()?JSe(this.locale):a_e}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let O_=null;class Eo extends Qy{static get utcInstance(){return O_===null&&(O_=new Eo(0)),O_}static instance(t){return t===0?Eo.utcInstance:new Eo(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Eo(Nx(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Wm(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Wm(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Wm(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class l_e extends Qy{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function lu(e,t){if(yt(e)||e===null)return t;if(e instanceof Qy)return e;if(d_e(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?$x.instance:n==="utc"||n==="gmt"?Eo.utcInstance:Eo.parseSpecifier(n)||Sl.create(e)}else return Nc(e)?Eo.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new l_e(e)}let rN=()=>Date.now(),oN="system",iN=null,sN=null,aN=null,lN=60,uN,cN=null;class qn{static get now(){return rN}static set now(t){rN=t}static set defaultZone(t){oN=t}static get defaultZone(){return lu(oN,$x.instance)}static get defaultLocale(){return iN}static set defaultLocale(t){iN=t}static get defaultNumberingSystem(){return sN}static set defaultNumberingSystem(t){sN=t}
vendor: 9,824 bytes, line 3633
3633static get defaultOutputCalendar(){return aN}static set defaultOutputCalendar(t){aN=t}static get defaultWeekSettings(){return cN}static set defaultWeekSettings(t){cN=RA(t)}static get twoDigitCutoffYear(){return lN}static set twoDigitCutoffYear(t){lN=t%100}static get throwOnInvalid(){return uN}static set throwOnInvalid(t){uN=t}static resetCaches(){ln.resetCache(),Sl.resetCache()}}class _s{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const sW=[0,31,59,90,120,151,181,212,243,273,304,334],aW=[0,31,60,91,121,152,182,213,244,274,305,335];function Hi(e,t){return new _s("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function iO(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function lW(e,t,n){return n+(Yy(e)?aW:sW)[t-1]}function uW(e,t){const n=Yy(e)?aW:sW,r=n.findIndex(i=>i<t),o=t-n[r];return{month:r+1,day:o}}function sO(e,t){return(e-t+7)%7+1}function Mw(e,t=4,n=1){const{year:r,month:o,day:i}=e,s=lW(r,o,i),a=sO(iO(r,o,i),n);let l=Math.floor((s-a+14-t)/7),u;return l<1?(u=r-1,l=qg(u,t,n)):l>qg(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:a,...Vx(e)}}function dN(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,s=sO(iO(r,1,t),n),a=Gf(r);let l=o*7+i-s-7+t,u;l<1?(u=r-1,l+=Gf(u)):l>a?(u=r+1,l-=Gf(r)):u=r;const{month:c,day:d}=uW(u,l);return{year:u,month:c,day:d,...Vx(e)}}function M_(e){const{year:t,month:n,day:r}=e,o=lW(t,n,r);return{year:t,ordinal:o,...Vx(e)}}function fN(e){const{year:t,ordinal:n}=e,{month:r,day:o}=uW(t,n);return{year:t,month:r,day:o,...Vx(e)}}function hN(e,t){if(!yt(e.localWeekday)||!yt(e.localWeekNumber)||!yt(e.localWeekYear)){if(!yt(e.weekday)||!yt(e.weekNumber)||!yt(e.weekYear))throw new Sf("Cannot mix locale-based week fields with ISO-based week fields");return yt(e.localWeekday)||(e.weekday=e.localWeekday),yt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),yt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function u_e(e,t=4,n=1){const r=Fx(e.weekYear),o=Wi(e.weekNumber,1,qg(e.weekYear,t,n)),i=Wi(e.weekday,1,7);return r?o?i?!1:Hi("weekday",e.weekday):Hi("week",e.weekNumber):Hi("weekYear",e.weekYear)}function c_e(e){const t=Fx(e.year),n=Wi(e.ordinal,1,Gf(e.year));return t?n?!1:Hi("ordinal",e.ordinal):Hi("year",e.year)}function cW(e){const t=Fx(e.year),n=Wi(e.month,1,12),r=Wi(e.day,1,Dw(e.year,e.month));return t?n?r?!1:Hi("day",e.day):Hi("month",e.month):Hi("year",e.year)}function dW(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=Wi(t,0,23)||t===24&&n===0&&r===0&&o===0,s=Wi(n,0,59),a=Wi(r,0,59),l=Wi(o,0,999);return i?s?a?l?!1:Hi("millisecond",o):Hi("second",r):Hi("minute",n):Hi("hour",t)}function yt(e){return typeof e>"u"}function Nc(e){return typeof e=="number"}function Fx(e){return typeof e=="number"&&e%1===0}function d_e(e){return typeof e=="string"}function f_e(e){return Object.prototype.toString.call(e)==="[object Date]"}function fW(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function hW(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function h_e(e){return Array.isArray(e)?e:[e]}function pN(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function p_e(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Th(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function RA(e){if(e==null)return null;if(typeof e!="object")throw new Lo("Week settings must be an object");if(!Wi(e.firstDay,1,7)||!Wi(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Wi(t,1,7)))throw new Lo("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Wi(e,t,n){return Fx(e)&&e>=t&&e<=n}function m_e(e,t){return e-t*Math.floor(e/t)}function or(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Yl(e){if(!(yt(e)||e===null||e===""))return parseInt(e,10)}function ec(e){if(!(yt(e)||e===null||e===""))return parseFloat(e)}function aO(e){if(!(yt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function lO(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Yy(e){return e%4===0&&(e%100!==0||e%400===0)}function Gf(e){return Yy(e)?366:365}function Dw(e,t){const n=m_e(t-1,12)+1,r=e+(t-n)/12;return n===2?Yy(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Lx(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function mN(e,t,n){return-sO(iO(e,1,t),n)+t-1}function qg(e,t=4,n=1){const r=mN(e,t,n),o=mN(e+1,t,n);return(Gf(e)-r+o)/7}function OA(e){return e>99?e:e>qn.twoDigitCutoffYear?1900+e:2e3+e}function pW(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const s={timeZoneName:t,...i},a=new Intl.DateTimeFormat(n,s).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function Nx(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function mW(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Lo(`Invalid unit value ${e}`);return t}function $w(e,t){const n={};for(const r in e)if(Th(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=mW(o)}return n}function Wm(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${or(n,2)}:${or(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${or(n,2)}${or(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Vx(e){return p_e(e,["hour","minute","second","millisecond"])}const g_e=["January","February","March","April","May","June","July","August","September","October","November","December"],gW=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],y_e=["J","F","M","A","M","J","J","A","S","O","N","D"];function yW(e){switch(e){case"narrow":return[...y_e];case"short":return[...gW];case"long":return[...g_e];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const vW=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],bW=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],v_e=["M","T","W","T","F","S","S"];function wW(e){switch(e){case"narrow":return[...v_e];case"short":return[...bW];case"long":return[...vW];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const CW=["AM","PM"],b_e=["Before Christ","Anno Domini"],w_e=["BC","AD"],C_e=["B","A"];function xW(e){switch(e){case"narrow":return[...C_e];case"short":return[...w_e];case"long":return[...b_e];default:return null}}function x_e(e){return CW[e.hour<12?0:1]}function S_e(e,t){return wW(t)[e.weekday-1]}function __e(e,t){return yW(t)[e.month-1]}function E_e(e,t){return xW(t)[e.year<0?0:1]}function I_e(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const s=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,u=o[e],c=r?l?u[1]:u[2]||u[1]:l?o[e][0]:e;return s?`${a} ${c} ago`:`in ${a} ${c}`}function gN(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const A_e={D:Ow,DD:j9,DDD:z9,DDDD:U9,t:H9,tt:W9,ttt:G9,tttt:q9,T:K9,TT:Q9,TTT:Y9,TTTT:X9,f:J9,ff:eW,fff:nW,ffff:oW,F:Z9,FF:tW,FFF:rW,FFFF:iW};class oo{static create(t,n={}){return new oo(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let s=0;s<t.length;s++){const a=t.charAt(s);a==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||a===n?r+=a:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=a,n=a)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return A_e[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return or(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(h,p)=>this.loc.extract(t,h,p),s=h=>t.isOffsetFixed&&t.offset===0&&h.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,h.format):"",a=()=>r?x_e(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(h,p)=>
3633r?__e(t,h):i(p?{month:h}:{month:h,day:"numeric"},"month"),u=(h,p)=>r?S_e(t,h):i(p?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),c=h=>{const p=oo.macroTokenToFormatOpts(h);return p?this.formatWithSystemDefault(t,p):h},d=h=>r?E_e(t,h):i({era:h},"era"),f=h=>{switch(h){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(h)}};return gN(oo.parseFormat(n),f)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>u=>{const c=r(u);return c?this.num(l.get(c),u.length):u},i=oo.parseFormat(n),s=i.reduce((l,{literal:u,val:c})=>u?l:l.concat(c),[]),a=t.shiftTo(...s.map(r).filter(l=>l));return gN(i,o(a))}}const SW=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function lp(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function up(...e){return t=>e.reduce(([n,r,o],i)=>{const[s,a,l]=i(t,o);return[{...n,...s},a||r,l]},[{},null,1]).slice(0,2)}function cp(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function _W(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=Yl(t[n+o]);return[r,null,n+o]}}const EW=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,k_e=`(?:${EW.source}?(?:\\[(${SW.source})\\])?)?`,uO=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,IW=RegExp(`${uO.source}${k_e}`),cO=RegExp(`(?:T${IW.source})?`),P_e=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,T_e=/(\d{4})-?W(\d\d)(?:-?(\d))?/,R_e=/(\d{4})-?(\d{3})/,O_e=_W("weekYear","weekNumber","weekDay"),M_e=_W("year","ordinal"),D_e=/(\d{4})-(\d\d)-(\d\d)/,AW=RegExp(`${uO.source} ?(?:${EW.source}|(${SW.source}))?`),$_e=RegExp(`(?: ${AW.source})?`);function qf(e,t,n){const r=e[t];return yt(r)?n:Yl(r)}function F_e(e,t){return[{year:qf(e,t),month:qf(e,t+1,1),day:qf(e,t+2,1)},null,t+3]}function dp(e,t){return[{hours:qf(e,t,0),minutes:qf(e,t+1,0),seconds:qf(e,t+2,0),milliseconds:aO(e[t+3])},null,t+4]}function Xy(e,t){const n=!e[t]&&!e[t+1],r=Nx(e[t+1],e[t+2]),o=n?null:Eo.instance(r);return[{},o,t+3]}function Jy(e,t){const n=e[t]?Sl.create(e[t]):null;return[{},n,t+1]}const L_e=RegExp(`^T?${uO.source}$`),N_e=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function V_e(e){const[t,n,r,o,i,s,a,l,u]=e,c=t[0]==="-",d=l&&l[0]==="-",f=(h,p=!1)=>h!==void 0&&(p||h&&c)?-h:h;
vendor: 10,393 bytes, line 3633
3633return[{years:f(ec(n)),months:f(ec(r)),weeks:f(ec(o)),days:f(ec(i)),hours:f(ec(s)),minutes:f(ec(a)),seconds:f(ec(l),l==="-0"),milliseconds:f(aO(u),d)}]}const B_e={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 dO(e,t,n,r,o,i,s){const a={year:t.length===2?OA(Yl(t)):Yl(t),month:gW.indexOf(n)+1,day:Yl(r),hour:Yl(o),minute:Yl(i)};return s&&(a.second=Yl(s)),e&&(a.weekday=e.length>3?vW.indexOf(e)+1:bW.indexOf(e)+1),a}const j_e=/^(?:(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\d)(\d\d)))$/;function z_e(e){const[,t,n,r,o,i,s,a,l,u,c,d]=e,f=dO(t,o,r,n,i,s,a);let h;return l?h=B_e[l]:u?h=0:h=Nx(c,d),[f,new Eo(h)]}function U_e(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const H_e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,W_e=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,G_e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function yN(e){const[,t,n,r,o,i,s,a]=e;return[dO(t,o,r,n,i,s,a),Eo.utcInstance]}function q_e(e){const[,t,n,r,o,i,s,a]=e;return[dO(t,a,n,r,o,i,s),Eo.utcInstance]}const K_e=lp(P_e,cO),Q_e=lp(T_e,cO),Y_e=lp(R_e,cO),X_e=lp(IW),kW=up(F_e,dp,Xy,Jy),J_e=up(O_e,dp,Xy,Jy),Z_e=up(M_e,dp,Xy,Jy),eEe=up(dp,Xy,Jy);function tEe(e){return cp(e,[K_e,kW],[Q_e,J_e],[Y_e,Z_e],[X_e,eEe])}function nEe(e){return cp(U_e(e),[j_e,z_e])}function rEe(e){return cp(e,[H_e,yN],[W_e,yN],[G_e,q_e])}function oEe(e){return cp(e,[N_e,V_e])}const iEe=up(dp);function sEe(e){return cp(e,[L_e,iEe])}const aEe=lp(D_e,$_e),lEe=lp(AW),uEe=up(dp,Xy,Jy);function cEe(e){return cp(e,[aEe,kW],[lEe,uEe])}const vN="Invalid Duration",PW={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},dEe={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...PW},Pi=146097/400,Bd=146097/4800,fEe={years:{quarters:4,months:12,weeks:Pi/7,days:Pi,hours:Pi*24,minutes:Pi*24*60,seconds:Pi*24*60*60,milliseconds:Pi*24*60*60*1e3},quarters:{months:3,weeks:Pi/28,days:Pi/4,hours:Pi*24/4,minutes:Pi*24*60/4,seconds:Pi*24*60*60/4,milliseconds:Pi*24*60*60*1e3/4},months:{weeks:Bd/7,days:Bd,hours:Bd*24,minutes:Bd*24*60,seconds:Bd*24*60*60,milliseconds:Bd*24*60*60*1e3},...PW},Sc=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],hEe=Sc.slice(0).reverse();function jl(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Lt(r)}function TW(e,t){let n=t.milliseconds??0;for(const r of hEe.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function bN(e,t){const n=TW(e,t)<0?-1:1;Sc.reduceRight((r,o)=>{if(yt(t[o]))return r;if(r){const i=t[r]*n,s=e[o][r],a=Math.floor(i/s);t[o]+=a*n,t[r]-=a*s*n}return o},null),Sc.reduce((r,o)=>{if(yt(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function pEe(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class Lt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?fEe:dEe;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||ln.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return Lt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Lo(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Lt({values:$w(t,Lt.normalizeUnit),loc:ln.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Nc(t))return Lt.fromMillis(t);if(Lt.isDuration(t))return t;if(typeof t=="object")return Lt.fromObject(t);throw new Lo(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=oEe(t);return r?Lt.fromObject(r,n):Lt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=sEe(t);return r?Lt.fromObject(r,n):Lt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Lo("need to specify a reason the Duration is invalid");const r=t instanceof _s?t:new _s(t,n);if(qn.throwOnInvalid)throw new jSe(r);return new Lt({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new B9(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?oo.create(this.loc,r).formatDurationFromString(this,t):vN}toHuman(t={}){if(!this.isValid)return vN;const n=Sc.map(r=>{const o=this.values[r];return yt(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=lO(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},tt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?TW(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Lt.fromDurationLike(t),r={};for(const o of Sc)(Th(n.values,o)||Th(this.values,o))&&(r[o]=n.get(o)+this.get(o));return jl(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Lt.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=mW(t(this.values[r],r));return jl(this,{values:n},!0)}get(t){return this[Lt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...$w(t,Lt.normalizeUnit)};return jl(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const s={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return jl(this,s)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return bN(this.matrix,t),jl(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=pEe(this.normalize().shiftToAll().toObject());return jl(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(s=>Lt.normalizeUnit(s));const n={},r={},o=this.toObject();let i;for(const s of Sc)if(t.indexOf(s)>=0){i=s;let a=0;for(const u in r)a+=this.matrix[u][s]*r[u],r[u]=0;Nc(o[s])&&(a+=o[s]);const l=Math.trunc(a);n[s]=l,r[s]=(a*1e3-l*1e3)/1e3}else Nc(o[s])&&(r[s]=o[s]);for(const s in r)r[s]!==0&&(n[i]+=s===i?r[s]:r[s]/this.matrix[i][s]);return bN(this.matrix,n),jl(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return jl(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of Sc)if(!n(this.values[r],t.values[r]))return!1;return!0}}const jd="Invalid Interval";function mEe(e,t){return!e||!e.isValid?Un.invalid("missing or invalid start"):!t||!t.isValid?Un.invalid("missing or invalid end"):t<e?Un.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Un{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invali
3633d||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Lo("need to specify a reason the Interval is invalid");const r=t instanceof _s?t:new _s(t,n);if(qn.throwOnInvalid)throw new BSe(r);return new Un({invalid:r})}static fromDateTimes(t,n){const r=Up(t),o=Up(n),i=mEe(r,o);return i??new Un({start:r,end:o})}static after(t,n){const r=Lt.fromDurationLike(n),o=Up(t);return Un.fromDateTimes(o,o.plus(r))}static before(t,n){const r=Lt.fromDurationLike(n),o=Up(t);return Un.fromDateTimes(o.minus(r),o)}static fromISO(t,n){const[r,o]=(t||"").split("/",2);if(r&&o){let i,s;try{i=tt.fromISO(r,n),s=i.isValid}catch{s=!1}let a,l;try{a=tt.fromISO(o,n),l=a.isValid}catch{l=!1}if(s&&l)return Un.fromDateTimes(i,a);if(s){const u=Lt.fromISO(o,n);if(u.isValid)return Un.after(i,u)}else if(l){const u=Lt.fromISO(r,n);if(u.isValid)return Un.before(a,u)}}return Un.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(r,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Un.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Up).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),r=[];let{s:o}=this,i=0;for(;o<this.e;){const s=n[i]||this.e,a=+s>+this.e?this.e:s;r.push(Un.fromDateTimes(o,a)),o=a,i+=1}return r}splitBy(t){const n=Lt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const s=[];for(;r<this.e;){const a=this.start.plus(n.mapUnits(l=>l*o));i=+a>+this.e?this.e:a,s.push(Un.fromDateTimes(r,i)),r=i,o+=1}return s}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Un.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Un.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],s)=>i?i.overlaps(s)||i.abutsStart(s)?[o,i.union(s)]:[o.concat([i]),s]:[o,s],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),s=Array.prototype.concat(...i),a=s.sort((l,u)=>l.time-u.time);for(const l of a)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(Un.fromDateTimes(n,l.time)),n=null);return Un.merge(o)}difference(...t){return Un.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:jd}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Ow,n={}){return this.isValid?oo.create(this.s.loc.clone(n),t).formatInterval(this):jd}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:jd}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:jd}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:jd}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:jd}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Lt.invali
vendor: 10,033 bytes, line 3633
3633d(this.invalidReason)}mapEndpoints(t){return Un.fromDateTimes(t(this.s),t(this.e))}}let ab=class{static hasDST(t=qn.defaultZone){const n=tt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Sl.isValidZone(t)}static normalizeZone(t){return lu(t,qn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||ln.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||ln.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||ln.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||ln.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||ln.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||ln.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||ln.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return ln.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return ln.create(n,null,"gregory").eras(t)}static features(){return{relative:fW(),localeWeek:hW()}}};function wN(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Lt.fromMillis(r).as("days"))}function gEe(e,t,n){const r=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const c=wN(l,u);return(c-c%7)/7}],["days",wN]],o={},i=e;let s,a;for(const[l,u]of r)n.indexOf(l)>=0&&(s=l,o[l]=u(e,t),a=i.plus(o),a>t?(o[l]--,e=i.plus(o),e>t&&(a=e,o[l]--,e=i.plus(o))):e=a);return[e,o,a,s]}function yEe(e,t,n,r){let[o,i,s,a]=gEe(e,t,n);const l=t-o,u=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(s<t&&(s=o.plus({[a]:1})),s!==o&&(i[a]=(i[a]||0)+l/(s-o)));const c=Lt.fromObject(i,r);return u.length>0?Lt.fromMillis(l,r).shiftTo(...u).plus(c):c}const fO={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},CN={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},vEe=fO.hanidec.replace(/[\[|\]]/g,"").split("");function bEe(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(fO.hanidec)!==-1)t+=vEe.indexOf(e[n]);else for(const o in CN){const[i,s]=CN[o];r>=i&&r<=s&&(t+=r-i)}}return parseInt(t,10)}else return t}function cs({numberingSystem:e},t=""){return new RegExp(`${fO[e||"latn"]}${t}`)}const wEe="missing Intl.DateTimeFormat.formatToParts support";function Gt(e,t=n=>n){return{regex:e,deser:([n])=>t(bEe(n))}}const CEe=" ",RW=`[ ${CEe}]`,OW=new RegExp(RW,"g");function xEe(e){return e.replace(/\./g,"\\.?").replace(OW,RW)}function xN(e){return e.replace(/\./g,"").replace(OW," ").toLowerCase()}function ds(e,t){return e===null?null:{regex:RegExp(e.map(xEe).join("|")),deser:([n])=>e.findIndex(r=>xN(n)===xN(r))+t}}function SN(e,t){return{regex:e,deser:([,n,r])=>Nx(n,r),groups:t}}function lb(e){return{regex:e,deser:([t])=>t}}function SEe(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function _Ee(e,t){const n=cs(t),r=cs(t,"{2}"),o=cs(t,"{3}"),i=cs(t,"{4}"),s=cs(t,"{6}"),a=cs(t,"{1,2}"),l=cs(t,"{1,3}"),u=cs(t,"{1,6}"),c=cs(t,"{1,9}"),d=cs(t,"{2,4}"),f=cs(t,"{4,6}"),h=b=>({regex:RegExp(SEe(b.val)),deser:([y])=>y,literal:!0}),g=(b=>{if(e.literal)return h(b);switch(b.val){case"G":return ds(t.eras("short"),0);case"GG":return ds(t.eras("long"),0);case"y":return Gt(u);case"yy":return Gt(d,OA);case"yyyy":return Gt(i);case"yyyyy":return Gt(f);case"yyyyyy":return Gt(s);case"M":return Gt(a);case"MM":return Gt(r);case"MMM":return ds(t.months("short",!0),1);case"MMMM":return ds(t.months("long",!0),1);case"L":return Gt(a);case"LL":return Gt(r);case"LLL":return ds(t.months("short",!1),1);case"LLLL":return ds(t.months("long",!1),1);case"d":return Gt(a);case"dd":return Gt(r);case"o":return Gt(l);case"ooo":return Gt(o);case"HH":return Gt(r);case"H":return Gt(a);case"hh":return Gt(r);case"h":return Gt(a);case"mm":return Gt(r);case"m":return Gt(a);case"q":return Gt(a);case"qq":return Gt(r);case"s":return Gt(a);case"ss":return Gt(r);case"S":return Gt(l);case"SSS":return Gt(o);case"u":return lb(c);case"uu":return lb(a);case"uuu":return Gt(n);case"a":return ds(t.meridiems(),0);case"kkkk":return Gt(i);case"kk":return Gt(d,OA);case"W":return Gt(a);case"WW":return Gt(r);case"E":case"c":return Gt(n);case"EEE":return ds(t.weekdays("short",!1),1);case"EEEE":return ds(t.weekdays("long",!1),1);case"ccc":return ds(t.weekdays("short",!0),1);case"cccc":return ds(t.weekdays("long",!0),1);case"Z":case"ZZ":return SN(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return SN(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return lb(/[a-z_+-/]{1,256}?/i);case" ":return lb(/[^\S\n\r]/);default:return h(b)}})(e)||{invalidReason:wEe};return g.token=e,g}const EEe={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function IEe(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[r];let s=r;r==="hour"&&(t.hour12!=null?s=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?s="hour12":s="hour24":s=n.hour12?"hour12":"hour24");let a=EEe[s];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function AEe(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function kEe(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const s in n)if(Th(n,s)){const a=n[s],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function PEe(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return yt(e.z)||(n=Sl.create(e.z)),yt(e.Z)||(n||(n=new Eo(e.Z)),r=e.Z),yt(e.q)||(e.M=(e.q-1)*3+1),yt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),yt(e.u)||(e.S=aO(e.u)),[Object.keys(e).reduce((i,s)=>{const a=t(s);return a&&(i[a]=e[s]),i},{}),n,r]}let D_=null;function TEe(){return D_||(D_=tt.fromMillis(1555555555555)),D_}function REe(e,t){if(e.literal)return e;const n=oo.macroTokenToFormatOpts(e.val),r=$W(n,t);return r==null||r.includes(void 0)?e:r}function MW(e,t){return Array.prototype.concat(...e.map(n=>REe(n,t)))}function DW(e,t,n){const r=MW(oo.parseFormat(n),e),o=r.map(s=>_Ee(s,e)),i=o.find(s=>s.invalidReason);if(i)return{input:t,tokens:r,invalidReason:i.invalidReason};{const[s,a]=AEe(o),l=RegExp(s,"i"),[u,c]=kEe(t,l,a),[d,f,h]=c?PEe(c):[null,null,void 0];if(Th(c,"a")&&Th(c,"H"))throw new Sf("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:l,rawMatches:u,matches:c,result:d,zone:f,specificOffset:h}}}function OEe(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:s}=DW(e,t,n);return[r,o,i,s]}function $W(e,t){if(!e)return null;const r=oo.create(t,e).dtFormatter(TEe()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(s=>IEe(s,e,i))}const $_="Invalid DateTime",_N=864e13;function ub(e){return new _s("unsupported zone",`the zone "${e.name}" is not supported`)}function F_(e){return e.weekData===null&&(e.weekData=Mw(e.c)),e.weekData}function L_(e){return e.localWeekData===null&&(e.localWeekData=Mw(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function tc(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new tt({...n,...t,old:n})}function FW(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function cb(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Yb(e,t,n){return FW(Lx(e),t,n)}function EN(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,Dw(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},s=Lt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Lx(i);let[l,u]=FW(a,n,e.zone);return s!==0&&(l+=s,u=e.zone.offset(l)),{ts:l,o:u}}function zp(e,t,n,r,o,i){const{setZone:s,zone:a}=n;
3633if(e&&Object.keys(e).length!==0||t){const l=t||a,u=tt.fromObject(e,{...n,zone:l,specificOffset:i});return s?u:u.setZone(a)}else return tt.invalid(new _s("unparsable",`the input "${o}" can't be parsed as ${r}`))}function db(e,t,n=!0){return e.isValid?oo.create(ln.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function N_(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=or(e.c.year,n?6:4),t?(r+="-",r+=or(e.c.month),r+="-",r+=or(e.c.day)):(r+=or(e.c.month),r+=or(e.c.day)),r}function IN(e,t,n,r,o,i){let s=or(e.c.hour);return t?(s+=":",s+=or(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(s+=":")):s+=or(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(s+=or(e.c.second),(e.c.millisecond!==0||!r)&&(s+=".",s+=or(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?s+="Z":e.o<0?(s+="-",s+=or(Math.trunc(-e.o/60)),s+=":",s+=or(Math.trunc(-e.o%60))):(s+="+",s+=or(Math.trunc(e.o/60)),s+=":",s+=or(Math.trunc(e.o%60)))),i&&(s+="["+e.zone.ianaName+"]"),s}const LW={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},MEe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},DEe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},NW=["year","month","day","hour","minute","second","millisecond"],$Ee=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],FEe=["year","ordinal","hour","minute","second","millisecond"];function LEe(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new B9(e);return t}function AN(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return LEe(e)}}function kN(e,t){const n=lu(t.zone,qn.defaultZone),r=ln.fromObject(t),o=qn.now();let i,s;if(yt(e.year))i=o;else{for(const u of NW)yt(e[u])&&(e[u]=LW[u]);const a=cW(e)||dW(e);if(a)return tt.invalid(a);const l=n.offset(o);[i,s]=Yb(e,l,n)}return new tt({ts:i,zone:n,loc:r,o:s})}function PN(e,t,n){const r=yt(n.round)?!0:n.round,o=(s,a)=>(s=lO(s,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(s,a)),i=s=>n.calendary?t.hasSame(e,s)?0:t.startOf(s).diff(e.startOf(s),s).get(s):t.diff(e,s).get(s);if(n.unit)return o(i(n.unit),n.unit);for(const s of n.units){const a=i(s);if(Math.abs(a)>=1)return o(a,s)}return o(e>t?-0:0,n.units[n.units.length-1])}function TN(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}class tt{constructor(t){const n=t.zone||qn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new _s("invalid input"):null)||(n.isValid?null:ub(n));this.ts=yt(t.ts)?qn.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const a=n.offset(this.ts);o=cb(this.ts,a),r=Number.isNaN(o.year)?new _s("invalid input"):null,o=r?null:o,i=r?null:a}this._zone=n,this.loc=t.loc||ln.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new tt({})}static local(){const[t,n]=TN(arguments),[r,o,i,s,a,l,u]=n;return kN({year:r,month:o,day:i,hour:s,minute:a,second:l,millisecond:u},t)}static utc(){const[t,n]=TN(arguments),[r,o,i,s,a,l,u]=n;return t.zone=Eo.utcInstance,kN({year:r,month:o,day:i,hour:s,minute:a,second:l,millisecond:u},t)}static fromJSDate(t,n={}){const r=f_e(t)?t.valueOf():NaN;if(Number.isNaN(r))return tt.invalid("invalid input");const o=lu(n.zone,qn.defaultZone);return o.isValid?new tt({ts:r,zone:o,loc:ln.fromObject(n)}):tt.invalid(ub(o))}static fromMillis(t,n={}){if(Nc(t))return t<-_N||t>_N?tt.invalid("Timestamp out of range"):new tt({ts:t,zone:lu(n.zone,qn.defaultZone),loc:ln.fromObject(n)});throw new Lo(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Nc(t))return new tt({ts:t*1e3,zone:lu(n.zone,qn.defaultZone),loc:ln.fromObject(n)});throw new Lo("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=lu(n.zone,qn.defaultZone);if(!r.isValid)return tt.invalid(ub(r));const o=ln.fromObject(n),i=$w(t,AN),{minDaysInFirstWeek:s,startOfWeek:a}=hN(i,o),l=qn.now(),u=yt(n.specificOffset)?r.offset(l):n.specificOffset,c=!yt(i.ordinal),d=!yt(i.year),f=!yt(i.month)||!yt(i.day),h=d||f,p=i.weekYear||i.weekNumber;if((h||c)&&p)throw new Sf("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&c)throw new Sf("Can't mix ordinal dates with month/day");const g=p||i.weekday&&!h;let b,y,v=cb(l,u);g?(b=$Ee,y=MEe,v=Mw(v,s,a)):c?(b=FEe,y=DEe,v=M_(v)):(b=NW,y=LW);let w=!1;for(const R of b){const O=i[R];yt(O)?w?i[R]=y[R]:i[R]=v[R]:w=!0}const C=g?u_e(i,s,a):c?c_e(i):cW(i),A=C||dW(i);if(A)return tt.invalid(A);const S=g?dN(i,s,a):c?fN(i):i,[_,k]=Yb(S,u,r),M=new tt({ts:_,zone:r,o:k,loc:o});return i.weekday&&h&&t.weekday!==M.weekday?tt.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${M.toISO()}`):M}static fromISO(t,n={}){const[r,o]=tEe(t);return zp(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=nEe(t);return zp(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=rEe(t);return zp(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(yt(t)||yt(n))throw new Lo("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,s=ln.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[a,l,u,c]=OEe(s,t,n);return c?tt.invalid(c):zp(a,l,r,`format ${n}`,t,u)}static fromString(t,n,r={}){return tt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=cEe(t);return zp(r,o,n,"SQL",t)}
vendor: 5,045 bytes, line 3633
3633static invalid(t,n=null){if(!t)throw new Lo("need to specify a reason the DateTime is invalid");const r=t instanceof _s?t:new _s(t,n);if(qn.throwOnInvalid)throw new VSe(r);return new tt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=$W(t,ln.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return MW(oo.parseFormat(t),ln.fromObject(n)).map(o=>o.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?F_(this).weekYear:NaN}get weekNumber(){return this.isValid?F_(this).weekNumber:NaN}get weekday(){return this.isValid?F_(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?L_(this).weekday:NaN}get localWeekNumber(){return this.isValid?L_(this).weekNumber:NaN}get localWeekYear(){return this.isValid?L_(this).weekYear:NaN}get ordinal(){return this.isValid?M_(this.c).ordinal:NaN}get monthShort(){return this.isValid?ab.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ab.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ab.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ab.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=Lx(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),s=this.zone.offset(r-o*n),a=this.zone.offset(r-i*n);if(s===a)return[this];const l=r-s*n,u=r-a*n,c=cb(l,s),d=cb(u,a);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[tc(this,{ts:l}),tc(this,{ts:u})]:[this]}get isInLeapYear(){return Yy(this.year)}get daysInMonth(){return Dw(this.year,this.month)}get daysInYear(){return this.isValid?Gf(this.year):NaN}get weeksInWeekYear(){return this.isValid?qg(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?qg(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=oo.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Eo.instance(t),n)}toLocal(){return this.setZone(qn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=lu(t,qn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),s=this.toObject();[o]=Yb(s,i,t)}return tc(this,{ts:o,zone:t})}else return tt.invalid(ub(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return tc(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=$w(t,AN),{minDaysInFirstWeek:r,startOfWeek:o}=hN(n,this.loc),i=!yt(n.weekYear)||!yt(n.weekNumber)||!yt(n.weekday),s=!yt(n.ordinal),a=!yt(n.year),l=!yt(n.month)||!yt(n.day),u=a||l,c=n.weekYear||n.weekNumber;if((u||s)&&c)throw new Sf("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new Sf("Can't mix ordinal dates with month/day");let d;i?d=dN({...Mw(this.c,r,o),...n},r,o):yt(n.ordinal)?(d={...this.toObject(),...n},yt(n.day)&&(d.day=Math.min(Dw(d.year,d.month),d.day))):d=fN({...M_(this.c),...n});const[f,h]=Yb(d,this.o,this.zone);return tc(this,{ts:f,o:h})}plus(t){if(!this.isValid)return this;const n=Lt.fromDurationLike(t);return tc(this,EN(this,n))}minus(t){if(!this.isValid)return this;const n=Lt.fromDurationLike(t).negate();return tc(this,EN(this,n))}
3633startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=Lt.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:s}=this;s<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?oo.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):$_}toLocaleString(t=Ow,n={}){return this.isValid?oo.create(this.loc.clone(n),t).formatDateTime(this):$_}toLocaleParts(t={}){return this.isValid?oo.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const s=t==="extended";let a=N_(this,s);return a+="T",a+=IN(this,s,n,r,o,i),a}toISODate({format:t="extended"}={}){return this.isValid?N_(this,t==="extended"):null}toISOWeekDate(){return db(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:s="extended"}={}){return this.isValid?(o?"T":"")+IN(this,s==="extended",n,t,r,i):null}toRFC2822(){return db(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return db(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?N_(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(r&&(o+=" "),n?o+="z":t&&(o+="ZZ")),db(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():$_}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return Lt.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=h_e(n).map(Lt.normalizeUnit),s=t.valueOf()>this.valueOf(),a=s?this:t,l=s?t:this,u=yEe(a,l,i,o);return s?u.negate():u}diffNow(t="milliseconds",n={}){return this.diff(tt.now(),t,n)}until(t){return this.isValid?Un.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||tt.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),PN(n,this.plus(r),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?PN(t.base||tt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(tt.isDateTime))throw new Lo("min requires all arguments be DateTimes");return pN(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(tt.isDateTime))throw new Lo("max requires all arguments be DateTimes");return pN(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,s=ln.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return DW(s,t,n)}static fromStringExplain(t,n,r={}){return tt.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return Ow}static get DATE_MED(){return j9}static get DATE_MED_WITH_WEEKDAY(){return zSe}static get DATE_FULL(){return z9}static get DATE_HUGE(){return U9}static get TIME_SIMPLE(){return H9}static get TIME_WITH_SECONDS(){return W9}static get TIME_WITH_SHORT_OFFSET(){return G9}static get TIME_WITH_LONG_OFFSET(){return q9}static get TIME_24_SIMPLE(){return K9}static get TIME_24_WITH_SECONDS(){return Q9}static get TIME_24_WITH_SHORT_OFFSET(){return Y9}static get TIME_24_WITH_LONG_OFFSET(){return X9}static get DATETIME_SHORT(){return J9}static get DATETIME_SHORT_WITH_SECONDS(){return Z9}static get DATETIME_MED(){return eW}static get DATETIME_MED_WITH_SECONDS(){return tW}static get DATETIME_MED_WITH_WEEKDAY(){return USe}static get DATETIME_FULL(){return nW}static get DATETIME_FULL_WITH_SECONDS(){return rW}static get DATETIME_HUGE(){return oW}static get DATETIME_HUGE_WITH_SECONDS(){return iW}}function Up(e){if(tt.isDateTime(e))return e;if(e&&e.valueOf&&Nc(e.valueOf()))return tt.fromJSDate(e);if(e&&typeof e=="object")return tt.fromObject(e);throw new Lo(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const NEe={fromFirestore(e){var n,r,o,i,s;const t=e.data();return{id:e.id,...t,dates:{start:(n=t.dates)!=null&&n.start?(r=t.dates.start)==null?void 0:r.toDate():null,end:(o=t.dates)!=null&&o.end?(i=t.dates.end)==null?void 0:i.toDate():null},updatedAt:t.updatedAt?(s=t.updatedAt)==null?void 0:s.toDate():null}},toFirestore(e){return e}},VEe={fromFirestore(e){var n,r,o,i,s;const t=e.data();return{id:e.id,...t,dates:{start:(n=t.dates)!=null&&n.start?(r=t.dates.start)==null?void 0:r.toDate():null,end:(o=t.dates)!=null&&o.end?(i=t.dates.end)==null?void 0:i.toDate():null},updatedAt:t.updatedAt?(s=t.updatedAt)==null?void 0:s.toDate():null}},toFirestore(e){return e}},RN={fromFirestore(e){var n,r,o,i;const t=e.data();return{id:e.id,...t,category:t.category||null,dates:{start:(n=t.dates)!=null&&n.start?typeof t.dates.start=="string"?tt.fromISO(t.dates.start).set({second:0,millisecond:0}):tt.fromJSDate((r=t.dates.start)==null?void 0:r.toDate()).set({second:0,millisecond:0}):null,end:(o=t.dates)!=null&&o.end?typeof t.dates.end=="string"?tt.fromISO(t.dates.end).set({second:0,millisecond:0}):tt.fromJSDate((i=t.dates.end)==null?void 0:i.toDate()).set({second:0,millisecond:0}):null}}},toFirestore(e){return Object.keys(e).reduce((t,n)=>(t[n]=e[n]===void 0?null:e[n],t),{})}},BEe={fromFirestore(e){const t=e.data();return{id:e.id,...t}},toFirestore(e){return e}},jEe={fromFirestore(e){const t=e.data();return{id:e.id,...t}},toFirestore(e){return e}},zEe={fromFirestore(e){const t=e.data();return{id:e.id,...t}},toFirestore(e){return e}},UEe={fromFirestore(e){const t=e.data();return{id:e.id,...t}},toFirestore(e){return e}},zUe={fromFirestore(e){const t=e.data();return{id:e.id,...t}},toFirestore(e){return e}},HEe={fromFirestore(e){const t=e.data();return{group:null,enabled:!0,items:[],...t,id:e.id}},toFirestore(e){const{id:t,...n}=e;return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,o===void 0?null:o]))}},WEe={fromFirestore(e){return e.data()},toFirestore(e){return e}},GEe={fromFirestore(e){var o,i,s,a;const t=e.data(),n=t.startDate?typeof t.startDate=="string"?tt.fromISO(t.startDate):t.startDate instanceof Dn?tt.fromJSDate(t.startDate.toDate()):tt.fromJSDate((i=(o=t.startDate)==null?void 0:o.toDate)==null?void 0:i.call(o)):null,r=t.endDate?typeof t.endDate=="string"?tt.fromISO(t.endDate):t.endDate instanceof Dn?tt.fromJSDate(t.endDate.toDate()):tt.fromJSDate((a=(s=t.endDate)==null?void 0:s.toDate)==null?void 0:a.call(s)):null;return{...t,startDate:n,endDate:r}},toFirestore(e){const t=e.startDate?tt.isDateTime(e.startDate)?Dn.fromDate(e.startDate.toJSDate()):e.startDate:null,n=e.endDate?tt.isDateTime(e.endDate)?Dn.fromDate(e.endDate.toJSDate()):e.endDate:null;return{...e,startDate:t,endDate:n}}},qEe={fromFirestore(e){const t=e.data();return{id:e.id,...t}},toFirestore(e){return e}};var KEe={VITE_FIREBASE_OPEN_PLANNER_APP_ID:"1:14347719998:web:9762fd7af7fbafa42d486f",VITE_FIREBASE_OPEN_PLANNER_PROJECT_ID:"conferencecenterr",VITE_FIREBASE_OPEN_PLANNER_FUNCTION_URL:"https://europe-west1-conferencecenterr.cloudfunctions.net/api",VITE_FIREBASE_OPEN_PLANNER_API_URL:"https://api.openplanner.fr",VITE_OPEN_SPONSORS_URL:"https://storage.googleapis.com/open-sponsor.firebasestorage.app/scopes/Ogh97t2FZ7xzsGp6N3ro/projects/openplanner.json",VITE_FIREBASE_OPEN_PLANNER_API_KEY:"AIzaSyASYD9tEmxQicIOdWaoEjEBA2uT6E4Z2ow",VITE_FIREBASE_OPEN_PLANNER_MEASUREMENT_ID:"G-EX677QXB0D",VITE_FIREBASE_OPEN_PLANNER_DOMAIN:"conferencecenterr.web.com",VITE_CAP_API_ENDPOINT:"https://captcha.openplanner.fr/9f288c55f9/",VITE_FIREBASE_OPEN_PLANNER_STORAGE_BUCKET:"conferencecenterr.appspot.com",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const hO={apiKey:"AIzaSyASYD9tEmxQicIOdWaoEjEBA2uT6E4Z2ow",authDomain:"conferencecenterr.web.com",databaseURL:"https://conferencecenterr.firebaseio.com",projectId:"conferencecenterr",storageBucket:"conferencecenterr.appspot.com",appId:"1:14347719998:web:9762fd7af7fbafa42d486f",measurementId:"G-EX677QXB0D"},MA=`https://storage.googleapis.com/${hO.storageBucket}`,Fw=`https://${hO.storageBucket}.storage.googleapis.com/`,UUe=e=>e?e.startsWith(MA)||e.startsWith(Fw):!1,QEe=e=>e.startsWith(Fw)?e.slice(Fw.length):e.startsWith(`${MA}/`)?e.slice(MA.length+1):e,YEe=e=>`${Fw}${e}`;let pO=C6(hO);const ei=lxe(pO),VW=FSe();KEe.VITE_USE_EMULATOR==="true"&&(d9(ei,"127.0.0.1",8080),z6(o3(pO),"http://127.0.0.1:9099",{disableWarnings:!0}),V9(VW,"127.0.0.1",9199));const cn={events:us(ei,"events").withConverter(NEe),sponsors:e=>us(ei,"events",e,"sponsors").withConverter(jEe),sessions:e=>us(ei,"events",e,"sessions").withConverter(RN),sessionsTemplate:e=>us(ei,"events",e,"sessionsTemplate").withConverter(RN),speakers:e=>us(ei,"events",e,"speakers").withConverter(BEe),team:e=>us(ei,"events",e,"team").withConverter(zEe),tickets:e=>us(ei,"events",e,"tickets").withConverter(GEe),faq:e=>us(ei,"events",e,"faq").withConverter(UEe),buildingBlocks:e=>us(ei,"events",e,"blocks").withConverter(HEe),jobPosts:e=>us(ei,"events",e,"jobPosts").withConverter(WEe),adminsUsers:us(ei,"admins","users","admins").withConverter(qEe)},fp=()=>o3(pO),mO=function(e){var t=XEe(ZEe(eIe(JEe(e),8*e.length)));return t.toLowerCase()};function XEe(e){for(var t,n="0123456789ABCDEF",r="",o=0;o<e.length;o++)t=e.charCodeAt(o),r+=n.charAt(t>>>4&15)+n.charAt(15&t);return r}function JEe(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<n%32;return t}function ZEe(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>n%32&255);return t}function eIe(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;
3633for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=n,l=r,u=o,c=i;r=Xr(r=Xr(r=Xr(r=Xr(r=Yr(r=Yr(r=Yr(r=Yr(r=Qr(r=Qr(r=Qr(r=Qr(r=Kr(r=Kr(r=Kr(r=Kr(r,o=Kr(o,i=Kr(i,n=Kr(n,r,o,i,e[s+0],7,-680876936),r,o,e[s+1],12,-389564586),n,r,e[s+2],17,606105819),i,n,e[s+3],22,-1044525330),o=Kr(o,i=Kr(i,n=Kr(n,r,o,i,e[s+4],7,-176418897),r,o,e[s+5],12,1200080426),n,r,e[s+6],17,-1473231341),i,n,e[s+7],22,-45705983),o=Kr(o,i=Kr(i,n=Kr(n,r,o,i,e[s+8],7,1770035416),r,o,e[s+9],12,-1958414417),n,r,e[s+10],17,-42063),i,n,e[s+11],22,-1990404162),o=Kr(o,i=Kr(i,n=Kr(n,r,o,i,e[s+12],7,1804603682),r,o,e[s+13],12,-40341101),n,r,e[s+14],17,-1502002290),i,n,e[s+15],22,1236535329),o=Qr(o,i=Qr(i,n=Qr(n,r,o,i,e[s+1],5,-165796510),r,o,e[s+6],9,-1069501632),n,r,e[s+11],14,643717713),i,n,e[s+0],20,-373897302),o=Qr(o,i=Qr(i,n=Qr(n,r,o,i,e[s+5],5,-701558691),r,o,e[s+10],9,38016083),n,r,e[s+15],14,-660478335),i,n,e[s+4],20,-405537848),o=Qr(o,i=Qr(i,n=Qr(n,r,o,i,e[s+9],5,568446438),r,o,e[s+14],9,-1019803690),n,r,e[s+3],14,-187363961),i,n,e[s+8],20,1163531501),o=Qr(o,i=Qr(i,n=Qr(n,r,o,i,e[s+13],5,-1444681467),r,o,e[s+2],9,-51403784),n,r,e[s+7],14,1735328473),i,n,e[s+12],20,-1926607734),o=Yr(o,i=Yr(i,n=Yr(n,r,o,i,e[s+5],4,-378558),r,o,e[s+8],11,-2022574463),n,r,e[s+11],16,1839030562),i,n,e[s+14],23,-35309556),o=Yr(o,i=Yr(i,n=Yr(n,r,o,i,e[s+1],4,-1530992060),r,o,e[s+4],11,1272893353),n,r,e[s+7],16,-155497632),i,n,e[s+10],23,-1094730640),o=Yr(o,i=Yr(i,n=Yr(n,r,o,i,e[s+13],4,681279174),r,o,e[s+0],11,-358537222),n,r,e[s+3],16,-722521979),i,n,e[s+6],23,76029189),o=Yr(o,i=Yr(i,n=Yr(n,r,o,i,e[s+9],4,-640364487),r,o,e[s+12],11,-421815835),n,r,e[s+15],16,530742520),i,n,e[s+2],23,-995338651),o=Xr(o,i=Xr(i,n=Xr(n,r,o,i,e[s+0],6,-198630844),r,o,e[s+7],10,1126891415),n,r,e[s+14],15,-1416354905),i,n,e[s+5],21,-57434055),o=Xr(o,i=Xr(i,n=Xr(n,r,o,i,e[s+12],6,1700485571),r,o,e[s+3],10,-1894986606),n,r,e[s+10],15,-1051523),i,n,e[s+1],21,-2054922799),o=Xr(o,i=Xr(i,n=Xr(n,r,o,i,e[s+8],6,1873313359),r,o,e[s+15],10,-30611744),n,r,e[s+6],15,-1560198380),i,n,e[s+13],21,1309151649),o=Xr(o,i=Xr(i,n=Xr(n,r,o,i,e[s+4],6,-145523070),r,o,e[s+11],10,-1120210379),n,r,e[s+2],15,718787259),i,n,e[s+9],21,-343485551),n=pu(n,a),r=pu(r,l),o=pu(o,u),i=pu(i,c)}return Array(n,r,o,i)}function Bx(e,t,n,r,o,i){return pu(tIe(pu(pu(t,e),pu(r,i)),o),n)}function Kr(e,t,n,r,o,i,s){return Bx(t&n|~t&r,e,t,o,i,s)}function Qr(e,t,n,r,o,i,s){return Bx(t&r|n&~r,e,t,o,i,s)}function Yr(e,t,n,r,o,i,s){return Bx(t^n^r,e,t,o,i,s)}function Xr(e,t,n,r,o,i,s){return Bx(n^(t|~r),e,t,o,i,s)}function pu(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function tIe(e,t){return e<<t|e>>>32-t}const ON=localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")||""):null,nIe=ON?{isLoggedIn:!0,error:null,user:ON}:{isLoggedIn:!1,error:null,user:null},rIe=e=>t=>{const n=fp();return rbe(n,r=>{if(e(!!r),r){const o=r.email;t({type:"auth/login/fulfilled",payload:{uid:r.uid,displayName:o.split("@")[0],email:o,avatarURL:`https://www.gravatar.com/avatar/${mO(o)}`}})}})},Xb=qC("auth/register",async({email:e,password:t},n)=>{const r=fp();return WT(r,JC).then(()=>Zve(r,e,t)).then(o=>(localStorage.setItem("user",JSON.stringify({email:e})),{uid:o.user.uid,displayName:e.split("@")[0],email:e,avatarURL:`https://www.gravatar.com/avatar/${mO(e)}`})).catch(o=>n.rejectWithValue({error:o.code,message:o.message}))}),DA=qC("auth/login",async({email:e,password:t},n)=>{const r=fp();return WT(r,JC).then(()=>ebe(r,e,t)).then(o=>{const i=o.user;return localStorage.setItem("user",JSON.stringify({email:e})),{uid:i.uid,displayName:e.split("@")[0],email:e,avatarURL:`https://www.gravatar.com/avatar/${mO(e)}`}}).catch(o=>n.rejectWithValue({error:o.code,message:o.message}))}),oIe=qC("auth/reset",async({email:e},t)=>{const n=fp();return WT(n,JC).then(()=>Jve(n,e,{url:"https://openplanner.fr/"})).catch(r=>t.rejectWithValue({error:r.code,message:r.message}))}),gO=qC("auth/logout",async()=>(await obe(fp()),localStorage.removeItem("user"),Promise.resolve())),iIe=wge({name:"auth",initialState:nIe,reducers:{},extraReducers:e=>{e.addCase(Xb.pending,t=>{t.error=null}).addCase(Xb.fulfilled,(t,n)=>{t.isLoggedIn=!0,t.user=n.payload,t.error=null}).addCase(Xb.rejected,(t,n)=>{t.isLoggedIn=!1,t.user=null,t.error=n.payload}).addCase(DA.fulfilled,(t,n)=>{t.isLoggedIn=!0,t.user=n.payload,t.error=null}).addCase(DA.rejected,(t,n)=>{t.isLoggedIn=!1,t.user=null,t.error=n.payload}).addCase(gO.fulfilled,t=>{t.isLoggedIn=!1,t.user=null,t.error=null})}}),sIe=e=>e.auth.isLoggedIn,yO=e=>e.auth.user,BW=e=>e.auth.user.uid,aIe=e=>e.auth.error;function lIe(e){return Ke("MuiLoadingButton",e)}const uIe=Qe("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),za=uIe,cIe=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],dIe=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${ge(n)}`],endIcon:[t&&`endIconLoading${ge(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${ge(n)}`]},i=Re(o,lIe,r);return x({},r,i)},fIe=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",hIe=he(gt,{shouldForwardProp:e=>fIe(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${za.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${za.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>x({[`& .${za.startIconLoadingStart}, & .${za.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}
3633},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${za.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${za.startIconLoadingStart}, & .${za.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${za.startIconLoadingStart}, & .${za.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),pIe=he("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${ge(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>x({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),mIe=m.forwardRef(function(t,n){const r=m.useContext(tU),o=kC(r,t),i=Je({props:o,name:"MuiLoadingButton"}),{children:s,disabled:a=!1,id:l,loading:u=!1,loadingIndicator:c,loadingPosition:d="center",variant:f="text"}=i,h=de(i,cIe),p=Jt(l),g=c??T.jsx(Qn,{"aria-labelledby":p,color:"inherit",size:16}),b=x({},i,{disabled:a,loading:u,loadingIndicator:g,loadingPosition:d,variant:f}),y=dIe(b),v=u?T.jsx(pIe,{className:y.loadingIndicator,ownerState:b,children:g}):null;return T.jsxs(hIe,x({disabled:a||u,id:p,ref:n},h,{variant:f,classes:y,ownerState:b,children:[b.loadingPosition==="end"?s:v,b.loadingPosition==="end"?v:s]}))}),xi=mIe;function $A(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gIe(e){if(Array.isArray(e))return $A(e)}function yIe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vIe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function MN(e){return gIe(e)||yIe(e)||bIe(e)||vIe()}function bIe(e,t){if(e){if(typeof e=="string")return $A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $A(e,t)}}var wIe=m.createContext({onError:function(e){return e==null?void 0:e.message}}),Rl=function(){var e;return(e=m.useContext(wIe))===null||e===void 0?void 0:e.onError};function Fa(e){var t;return{value:typeof((t=e.transform)===null||t===void 0?void 0:t.input)=="function"?e.transform.input(e.value):e.value,onChange:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i,s,a;typeof((a=e.transform)===null||a===void 0?void 0:a.output)=="function"?e.onChange((i=e.transform).output.apply(i,MN(r))):(s=e).onChange.apply(s,MN(r))}}}function No(e,t){return typeof e=="object"&&e!==null&&Object.prototype.hasOwnProperty.call(e,t)}var Zy=e=>e.type==="checkbox",_c=e=>e instanceof Date,Co=e=>e==null;const jW=e=>typeof e=="object";var Yn=e=>!Co(e)&&!Array.isArray(e)&&jW(e)&&!_c(e),zW=e=>Yn(e)&&e.target?Zy(e.target)?e.target.checked:e.target.value:e,CIe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,UW=(e,t)=>e.has(CIe(t)),xIe=e=>{const t=e.constructor&&e.constructor.prototype;return Yn(t)&&t.hasOwnProperty("isPrototypeOf")},vO=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function fr(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(vO&&(e instanceof Blob||r))&&(n||Yn(e)))if(t=n?[]:{},!n&&!xIe(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=fr(e[o]));else return e;return t}var ev=e=>Array.isArray(e)?e.filter(Boolean):[],wn=e=>e===void 0,Ne=(e,t,n)=>{if(!t||!Yn(e))return n;const r=ev(t.split(/[,[\].]+?/)).reduce((o,i)=>Co(o)?o:o[i],e);return wn(r)||r===e?wn(e[t])?n:e[t]:r},Di=e=>typeof e=="boolean",bO=e=>/^\w*$/.test(e),HW=e=>
vendor: 4,551 bytes, line 3633
3633ev(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ht=(e,t,n)=>{let r=-1;const o=bO(t)?[t]:HW(t),i=o.length,s=i-1;for(;++r<i;){const a=o[r];let l=n;if(r!==s){const u=e[a];l=Yn(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}return e};const Lw={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ji={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ua={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},WW=ot.createContext(null),hp=()=>ot.useContext(WW),GW=e=>{const{children:t,...n}=e;return ot.createElement(WW.Provider,{value:n},t)};var qW=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==ji.all&&(t._proxyFormState[s]=!r||ji.all),n&&(n[s]=!0),e[s]}});return o},bo=e=>Yn(e)&&!Object.keys(e).length,KW=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return bo(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!r||ji.all))},Uo=e=>Array.isArray(e)?e:[e],QW=(e,t,n)=>!e||!t||e===t||Uo(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function jx(e){const t=ot.useRef(e);t.current=e,ot.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function SIe(e){const t=hp(),{control:n=t.control,disabled:r,name:o,exact:i}=e||{},[s,a]=ot.useState(n._formState),l=ot.useRef(!0),u=ot.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=ot.useRef(o);return c.current=o,jx({disabled:r,next:d=>l.current&&QW(c.current,d.name,i)&&KW(d,u.current,n._updateFormState)&&a({...n._formState,...d}),subject:n._subjects.state}),ot.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),ot.useMemo(()=>qW(s,n,u.current,!1),[s,n])}var sa=e=>typeof e=="string",YW=(e,t,n,r,o)=>sa(e)?(r&&t.watch.add(e),Ne(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Ne(n,i))):(r&&(t.watchAll=!0),n);function zx(e){const t=hp(),{control:n=t.control,name:r,defaultValue:o,disabled:i,exact:s}=e||{},a=ot.useRef(r);a.current=r,jx({disabled:i,subject:n._subjects.values,next:c=>{QW(a.current,c.name,s)&&u(fr(YW(a.current,n._names,c.values||n._formValues,!1,o)))}});const[l,u]=ot.useState(n._getWatch(r,o));return ot.useEffect(()=>n._removeUnmounted()),l}function Ii(e){const t=hp(),{name:n,disabled:r,control:o=t.control,shouldUnregister:i}=e,s=UW(o._names.array,n),a=zx({control:o,name:n,defaultValue:Ne(o._formValues,n,Ne(o._defaultValues,n,e.defaultValue)),exact:!0}),l=SIe({control:o,name:n,exact:!0}),u=ot.useRef(o.register(n,{...e.rules,value:a,...Di(e.disabled)?{disabled:e.disabled}:{}})),c=ot.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ne(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ne(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ne(l.validatingFields,n)},error:{enumerable:!0,get:()=>Ne(l.errors,n)}}),[l,n]),d=ot.useMemo(()=>({name:n,value:a,...Di(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:f=>u.current.onChange({target:{value:zW(f),name:n},type:Lw.CHANGE}),onBlur:()=>u.current.onBlur({target:{value:Ne(o._formValues,n),name:n},type:Lw.BLUR}),ref:f=>{const h=Ne(o._fields,n);h&&f&&(h._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:p=>f.setCustomValidity(p),reportValidity:()=>f.reportValidity()})}}),[n,o._formValues,r,l.disabled,a,o._fields]);return ot.useEffect(()=>{const f=o._options.shouldUnregister||i,h=(p,g)=>{const b=Ne(o._fields,p);b&&b._f&&(b._f.mount=g)};if(h(n,!0),f){const p=fr(Ne(o._options.defaultValues,n));Ht(o._defaultValues,n,p),wn(Ne(o._formValues,n))&&Ht(o._formValues,n,p)}return!s&&o.register(n),()=>{(s?f&&!o._state.action:f)?o.unregister(n):h(n,!1)}},[n,o,s,i]),ot.useEffect(()=>{o._updateDisabledField({disabled:r,fields:o._fields,name:n})},[r,n,o]),ot.useMemo(()=>({field:d,formState:l,fieldState:c}),[d,l,c])}const XW=e=>e.render(Ii(e));var JW=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},zl=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},V_=(e,t,n={})=>n.shouldFocus||wn(n.shouldFocus)?n.focusName||`${e}
3633.${wn(n.focusIndex)?t:n.focusIndex}.`:"",Gm=e=>({isOnSubmit:!e||e===ji.onSubmit,isOnBlur:e===ji.onBlur,isOnChange:e===ji.onChange,isOnAll:e===ji.all,isOnTouch:e===ji.onTouched}),FA=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Kf=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=Ne(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!r)return!0;if(s.ref&&t(s.ref,s.name)&&!r)return!0;if(Kf(a,t))break}else if(Yn(a)&&Kf(a,t))break}}};var ZW=(e,t,n)=>{const r=Uo(Ne(e,n));return Ht(r,"root",t[n]),Ht(e,n,r),e},wO=e=>e.type==="file",ea=e=>typeof e=="function",Nw=e=>{if(!vO)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Jb=e=>sa(e),CO=e=>e.type==="radio",Vw=e=>e instanceof RegExp;const DN={value:!1,isValid:!1},$N={value:!0,isValid:!0};var e7=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!wn(e[0].attributes.value)?wn(e[0].value)||e[0].value===""?$N:{value:e[0].value,isValid:!0}:$N:DN}return DN};const FN={isValid:!1,value:null};var t7=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,FN):FN;function LN(e,t,n="validate"){if(Jb(e)||Array.isArray(e)&&e.every(Jb)||Di(e)&&!e)return{type:n,message:Jb(e)?e:"",ref:t}}var zd=e=>Yn(e)&&!Vw(e)?e:{value:e,message:""},LA=async(e,t,n,r,o,i)=>{const{ref:s,refs:a,required:l,maxLength:u,minLength:c,min:d,max:f,pattern:h,validate:p,name:g,valueAsNumber:b,mount:y}=e._f,v=Ne(n,g);if(!y||t.has(g))return{};const w=a?a[0]:s,C=F=>{o&&w.reportValidity&&(w.setCustomValidity(Di(F)?"":F||""),w.reportValidity())},A={},S=CO(s),_=Zy(s),k=S||_,M=(b||wO(s))&&wn(s.value)&&wn(v)||Nw(s)&&s.value===""||v===""||Array.isArray(v)&&!v.length,R=JW.bind(null,g,r,A),O=(F,N,V,$=Ua.maxLength,D=Ua.minLength)=>{const L=F?N:V;A[g]={type:F?$:D,message:L,ref:s,...R(F?$:D,L)}};if(i?!Array.isArray(v)||!v.length:l&&(!k&&(M||Co(v))||Di(v)&&!v||_&&!e7(a).isValid||S&&!t7(a).isValid)){const{value:F,message:N}=Jb(l)?{value:!!l,message:l}:zd(l);if(F&&(A[g]={type:Ua.required,message:N,ref:w,...R(Ua.required,N)},!r))return C(N),A}if(!M&&(!Co(d)||!Co(f))){let F,N;const V=zd(f),$=zd(d);if(!Co(v)&&!isNaN(v)){const D=s.valueAsNumber||v&&+v;Co(V.value)||(F=D>V.value),Co($.value)||(N=D<$.value)}else{const D=s.valueAsDate||new Date(v),L=E=>new Date(new Date().toDateString()+" "+E),P=s.type=="time",B=s.type=="week";sa(V.value)&&v&&(F=P?L(v)>L(V.value):B?v>V.value:D>new Date(V.value)),sa($.value)&&v&&(N=P?L(v)<L($.value):B?v<$.value:D<new Date($.value))}if((F||N)&&(O(!!F,V.message,$.message,Ua.max,Ua.min),!r))return C(A[g].message),A}if((u||c)&&!M&&(sa(v)||i&&Array.isArray(v))){const F=zd(u),N=zd(c),V=!Co(F.value)&&v.length>+F.value,$=!Co(N.value)&&v.length<+N.value;if((V||$)&&(O(V,F.message,N.message),!r))return C(A[g].message),A}if(h&&!M&&sa(v)){const{value:F,message:N}=zd(h);if(Vw(F)&&!v.match(F)&&(A[g]={type:Ua.pattern,message:N,ref:s,...R(Ua.pattern,N)},!r))return C(N),A}if(p){if(ea(p)){const F=await p(v,n),N=LN(F,w);if(N&&(A[g]={...N,...R(Ua.validate,N.message)},!r))return C(N.message),A}else if(Yn(p)){let F={};for(const N in p){if(!bo(F)&&!r)break;const V=LN(await p[N](v,n),w,N);V&&(F={...V,...R(N,V.message)},C(V.message),r&&(A[g]=F))}if(!bo(F)&&(A[g]={ref:w,...F},!r))return A}}return C(!0),A},B_=(e,t)=>[...e,...Uo(t)],j_=e=>Array.isArray(e)?e.map(()=>{}):void 0;function z_(e,t,n){return[...e.slice(0,t),...Uo(n),...e.slice(t)]}var U_=(e,t,n)=>Array.isArray(e)?(wn(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],H_=(e,t)=>[...Uo(t),...Uo(e)];function _Ie(e,t){let n=0;const r=[...e];for(const o of t)r.splice(o-n,1),n++;return ev(r).length?r:[]}var W_=(e,t)=>wn(t)?[]:_Ie(e,Uo(t).sort((n,r)=>n-r)),G_=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function EIe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=wn(e)?r++:e[t[r++]];return e}function IIe(e){for(const t in e)if(e.hasOwnProperty(t)&&!wn(e[t]))return!1;return!0}function nr(e,t){const n=Array.isArray(t)?t:bO(t)?[t]:HW(t),r=n.length===1?e:EIe(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(Yn(r)&&bo(r)||Array.isArray(r)&&IIe(r))&&nr(e,n.slice(0,-1)),e}var NN=(e,t,n)=>(e[t]=n,e);function n7(e){const t=hp(),{control:n=t.control,name:r,keyName:o="id",shouldUnregister:i,rules:s}=e,[a,l]=ot.useState(n._getFieldArray(r)),u=ot.useRef(n._getFieldArray(r).map(zl)),c=ot.useRef(a),d=ot.useRef(r),f=ot.useRef(!1);d.current=r,c.current=a,n._names.array.add(r),s&&n.register(r,s),jx({next:({values:S,name:_})=>
3633{if(_===d.current||!_){const k=Ne(S,d.current);Array.isArray(k)&&(l(k),u.current=k.map(zl))}},subject:n._subjects.array});const h=ot.useCallback(S=>{f.current=!0,n._updateFieldArray(r,S)},[n,r]),p=(S,_)=>{const k=Uo(fr(S)),M=B_(n._getFieldArray(r),k);n._names.focus=V_(r,M.length-1,_),u.current=B_(u.current,k.map(zl)),h(M),l(M),n._updateFieldArray(r,M,B_,{argA:j_(S)})},g=(S,_)=>{const k=Uo(fr(S)),M=H_(n._getFieldArray(r),k);n._names.focus=V_(r,0,_),u.current=H_(u.current,k.map(zl)),h(M),l(M),n._updateFieldArray(r,M,H_,{argA:j_(S)})},b=S=>{const _=W_(n._getFieldArray(r),S);u.current=W_(u.current,S),h(_),l(_),!Array.isArray(Ne(n._fields,r))&&Ht(n._fields,r,void 0),n._updateFieldArray(r,_,W_,{argA:S})},y=(S,_,k)=>{const M=Uo(fr(_)),R=z_(n._getFieldArray(r),S,M);n._names.focus=V_(r,S,k),u.current=z_(u.current,S,M.map(zl)),h(R),l(R),n._updateFieldArray(r,R,z_,{argA:S,argB:j_(_)})},v=(S,_)=>{const k=n._getFieldArray(r);G_(k,S,_),G_(u.current,S,_),h(k),l(k),n._updateFieldArray(r,k,G_,{argA:S,argB:_},!1)},w=(S,_)=>{const k=n._getFieldArray(r);U_(k,S,_),U_(u.current,S,_),h(k),l(k),n._updateFieldArray(r,k,U_,{argA:S,argB:_},!1)},C=(S,_)=>{const k=fr(_),M=NN(n._getFieldArray(r),S,k);u.current=[...M].map((R,O)=>!R||O===S?zl():u.current[O]),h(M),l([...M]),n._updateFieldArray(r,M,NN,{argA:S,argB:k},!0,!1)},A=S=>{const _=Uo(fr(S));u.current=_.map(zl),h([..._]),l([..._]),n._updateFieldArray(r,[..._],k=>k,{},!0,!1)};return ot.useEffect(()=>{if(n._state.action=!1,FA(r,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!Gm(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(S=>{const _=Ne(S.errors,r),k=Ne(n._formState.errors,r);(k?!_&&k.type||_&&(k.type!==_.type||k.message!==_.message):_&&_.type)&&(_?Ht(n._formState.errors,r,_):nr(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const S=Ne(n._fields,r);S&&S._f&&!(Gm(n._options.reValidateMode).isOnSubmit&&Gm(n._options.mode).isOnSubmit)&&LA(S,n._names.disabled,n._formValues,n._options.criteriaMode===ji.all,n._options.shouldUseNativeValidation,!0).then(_=>!bo(_)&&n._subjects.state.next({errors:ZW(n._formState.errors,_,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&Kf(n._fields,(S,_)=>{if(n._names.focus&&_.startsWith(n._names.focus)&&S.focus)return S.focus(),1}),n._names.focus="",n._updateValid(),f.current=!1},[a,r,n]),ot.useEffect(()=>(!Ne(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||i)&&n.unregister(r)}),[r,n,o,i]),{swap:ot.useCallback(v,[h,r,n]),move:ot.useCallback(w,[h,r,n]),prepend:ot.useCallback(g,[h,r,n]),append:ot.useCallback(p,[h,r,n]),remove:ot.useCallback(b,[h,r,n]),insert:ot.useCallback(y,[h,r,n]),update:ot.useCallback(C,[h,r,n]),replace:ot.useCallback(A,[h,r,n]),fields:ot.useMemo(()=>a.map((S,_)=>({...S,[o]:u.current[_]||zl()})),[a,o])}}var q_=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},NA=e=>Co(e)||!jW(e);function uu(e,t){if(NA(e)||NA(t))return e===t;if(_c(e)&&_c(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const s=t[o];if(_c(i)&&_c(s)||Yn(i)&&Yn(s)||Array.isArray(i)&&Array.isArray(s)?!uu(i,s):i!==s)return!1}}return!0}var r7=e=>e.type==="select-multiple",AIe=e=>CO(e)||Zy(e),K_=e=>Nw(e)&&e.isConnected,o7=e=>{for(const t in e)if(ea(e[t]))return!0;return!1};function Bw(e,t={}){const n=Array.isArray(e);if(Yn(e)||n)for(const r in e)Array.isArray(e[r])||Yn(e[r])&&!o7(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Bw(e[r],t[r])):Co(e[r])||(t[r]=!0);return t}function i7(e,t,n){const r=Array.isArray(e);if(Yn(e)||r)for(const o in e)Array.isArray(e[o])||Yn(e[o])&&!o7(e[o])?wn(t)||NA(n[o])?n[o]=Array.isArray(e[o])?Bw(e[o],[]):{...Bw(e[o])}:i7(e[o],Co(t)?{}:t[o],n[o]):n[o]=!uu(e[o],t[o]);return n}var Hp=(e,t)=>i7(e,t,Bw(t)),s7=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>wn(e)?e:t?e===""?NaN:e&&+e:n&&sa(e)?new Date(e):r?r(e):e;function Q_(e){const t=e.ref;return wO(t)?t.files:CO(t)?t7(e.refs).value:r7(t)?[...t.selectedOptions].map(({value:n})=>n):Zy(t)?e7(e.refs).value:s7(wn(t.value)?e.ref.value:t.value,e)}var kIe=(e,t,n,r)=>{const o={};for(const i of e){const s=Ne(t,i);s&&Ht(o,i,s._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Wp=e=>wn(e)?e:Vw(e)?e.source:Yn(e)?Vw(e.value)?e.value.source:e.value:e;const VN="AsyncFunction";var PIe=e=>!!e&&!!e.validate&&!!(ea(e.validate)&&e.validate.constructor.name===VN||Yn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===VN)),TIe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function BN(e,t,n){const r=Ne(e,n);if(r||bO(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=Ne(t,i),a=Ne(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:n}}var RIe=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,OIe=(e,t)=>!ev(Ne(e,t)).length&&nr(e,t);const MIe={mode:ji.onSubmit,reValidateMode:ji.onChange,shouldFocusError:!0};function DIe(e={}){let t={...MIe,...e},n={submitCount:0,isDirty:!1,isLoading:ea(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1}
vendor: 10,849 bytes, line 3633
3633,r={},o=Yn(t.defaultValues)||Yn(t.values)?fr(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:fr(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:q_(),array:q_(),state:q_()},f=Gm(t.mode),h=Gm(t.reValidateMode),p=t.criteriaMode===ji.all,g=U=>q=>{clearTimeout(u),u=setTimeout(U,q)},b=async U=>{if(!t.disabled&&(c.isValid||U)){const q=t.resolver?bo((await k()).errors):await R(r,!0);q!==n.isValid&&d.state.next({isValid:q})}},y=(U,q)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((U||Array.from(a.mount)).forEach(K=>{K&&(q?Ht(n.validatingFields,K,q):nr(n.validatingFields,K))}),d.state.next({validatingFields:n.validatingFields,isValidating:!bo(n.validatingFields)}))},v=(U,q=[],K,ae,ue=!0,Z=!0)=>{if(ae&&K&&!t.disabled){if(s.action=!0,Z&&Array.isArray(Ne(r,U))){const X=K(Ne(r,U),ae.argA,ae.argB);ue&&Ht(r,U,X)}if(Z&&Array.isArray(Ne(n.errors,U))){const X=K(Ne(n.errors,U),ae.argA,ae.argB);ue&&Ht(n.errors,U,X),OIe(n.errors,U)}if(c.touchedFields&&Z&&Array.isArray(Ne(n.touchedFields,U))){const X=K(Ne(n.touchedFields,U),ae.argA,ae.argB);ue&&Ht(n.touchedFields,U,X)}c.dirtyFields&&(n.dirtyFields=Hp(o,i)),d.state.next({name:U,isDirty:F(U,q),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ht(i,U,q)},w=(U,q)=>{Ht(n.errors,U,q),d.state.next({errors:n.errors})},C=U=>{n.errors=U,d.state.next({errors:n.errors,isValid:!1})},A=(U,q,K,ae)=>{const ue=Ne(r,U);if(ue){const Z=Ne(i,U,wn(K)?Ne(o,U):K);wn(Z)||ae&&ae.defaultChecked||q?Ht(i,U,q?Z:Q_(ue._f)):$(U,Z),s.mount&&b()}},S=(U,q,K,ae,ue)=>{let Z=!1,X=!1;const W={name:U};if(!t.disabled){const le=!!(Ne(r,U)&&Ne(r,U)._f&&Ne(r,U)._f.disabled);if(!K||ae){c.isDirty&&(X=n.isDirty,n.isDirty=W.isDirty=F(),Z=X!==W.isDirty);const _e=le||uu(Ne(o,U),q);X=!!(!le&&Ne(n.dirtyFields,U)),_e||le?nr(n.dirtyFields,U):Ht(n.dirtyFields,U,!0),W.dirtyFields=n.dirtyFields,Z=Z||c.dirtyFields&&X!==!_e}if(K){const _e=Ne(n.touchedFields,U);_e||(Ht(n.touchedFields,U,K),W.touchedFields=n.touchedFields,Z=Z||c.touchedFields&&_e!==K)}Z&&ue&&d.state.next(W)}return Z?W:{}},_=(U,q,K,ae)=>{const ue=Ne(n.errors,U),Z=c.isValid&&Di(q)&&n.isValid!==q;if(t.delayError&&K?(l=g(()=>w(U,K)),l(t.delayError)):(clearTimeout(u),l=null,K?Ht(n.errors,U,K):nr(n.errors,U)),(K?!uu(ue,K):ue)||!bo(ae)||Z){const X={...ae,...Z&&Di(q)?{isValid:q}:{},errors:n.errors,name:U};n={...n,...X},d.state.next(X)}},k=async U=>{y(U,!0);const q=await t.resolver(i,t.context,kIe(U||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return y(U),q},M=async U=>{const{errors:q}=await k(U);if(U)for(const K of U){const ae=Ne(q,K);ae?Ht(n.errors,K,ae):nr(n.errors,K)}else n.errors=q;return q},R=async(U,q,K={valid:!0})=>{for(const ae in U){const ue=U[ae];if(ue){const{_f:Z,...X}=ue;if(Z){const W=a.array.has(Z.name),le=ue._f&&PIe(ue._f);le&&c.validatingFields&&y([ae],!0);const _e=await LA(ue,a.disabled,i,p,t.shouldUseNativeValidation&&!q,W);if(le&&c.validatingFields&&y([ae]),_e[Z.name]&&(K.valid=!1,q))break;!q&&(Ne(_e,Z.name)?W?ZW(n.errors,_e,Z.name):Ht(n.errors,Z.name,_e[Z.name]):nr(n.errors,Z.name))}!bo(X)&&await R(X,q,K)}}return K.valid},O=()=>{for(const U of a.unMount){const q=Ne(r,U);q&&(q._f.refs?q._f.refs.every(K=>!K_(K)):!K_(q._f.ref))&&ee(U)}a.unMount=new Set},F=(U,q)=>!t.disabled&&(U&&q&&Ht(i,U,q),!uu(z(),o)),N=(U,q,K)=>YW(U,a,{...s.mount?i:wn(q)?o:sa(U)?{[U]:q}:q},K,q),V=U=>ev(Ne(s.mount?i:o,U,t.shouldUnregister?Ne(o,U,[]):[])),$=(U,q,K={})=>{const ae=Ne(r,U);let ue=q;if(ae){const Z=ae._f;Z&&(!Z.disabled&&Ht(i,U,s7(q,Z)),ue=Nw(Z.ref)&&Co(q)?"":q,r7(Z.ref)?[...Z.ref.options].forEach(X=>X.selected=ue.includes(X.value)):Z.refs?Zy(Z.ref)?Z.refs.length>1?Z.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(ue)?!!ue.find(W=>W===X.value):ue===X.value)):Z.refs[0]&&(Z.refs[0].checked=!!ue):Z.refs.forEach(X=>X.checked=X.value===ue):wO(Z.ref)?Z.ref.value="":(Z.ref.value=ue,Z.ref.type||d.values.next({name:U,values:{...i}})))}(K.shouldDirty||K.shouldTouch)&&S(U,ue,K.shouldTouch,K.shouldDirty,!0),K.shouldValidate&&E(U)},D=(U,q,K)=>{for(const ae in q){const ue=q[ae],Z=`${U}.${ae}`,X=Ne(r,Z);(a.array.has(U)||Yn(ue)||X&&!X._f)&&!_c(ue)?D(Z,ue,K):$(Z,ue,K)}},L=(U,q,K={})=>{const ae=Ne(r,U),ue=a.array.has(U),Z=fr(q);Ht(i,U,Z),ue?(d.array.next({name:U,values:{...i}}),(c.isDirty||c.dirtyFields)&&K.shouldDirty&&d.state.next({name:U,dirtyFields:Hp(o,i),isDirty:F(U,Z)})):ae&&!ae._f&&!Co(Z)?D(U,Z,K):$(U,Z,K),FA(U,a)&&d.state.next({...n}),d.values.next({name:s.mount?U:void 0,values:{...i}})},P=async U=>{s.mount=!0;const q=U.target;let K=q.name,ae=!0;const ue=Ne(r,K),Z=()=>q.type?Q_(ue._f):zW(U),X=W=>{ae=Number.isNaN(W)||_c(W)&&isNaN(W.getTime())||uu(W,Ne(i,K,W))};if(ue){let W,le;const _e=Z(),ne=U.type===Lw.BLUR||U.type===Lw.FOCUS_OUT,te=!TIe(ue._f)&&!t.resolver&&!Ne(n.errors,K)&&!ue._f.deps||RIe(ne,Ne(n.touchedFields,K),n.isSubmitted,h,f),ke=FA(K,a,ne);Ht(i,K,_e),ne?(ue._f.onBlur&&ue._f.onBlur(U),l&&l(0)):ue._f.onChange&&ue._f.onChange(U);const Ve=S(K,_e,ne,!1),Fe=!bo(Ve)||ke;if(!ne&&d.values.next({name:K,type:U.type,values:{...i}}),te)return c.isValid&&(t.mode==="onBlur"&&ne?b():ne||b()),Fe&&d.state.next({name:K,...ke?{}:Ve});if(!ne&&ke&&d.state.next({...n}),t.resolver){const{errors:Ie}=await k([K]);if(X(_e),ae){const Be=BN(n.errors,r,K),Ee=BN(Ie,r,Be.name||K);W=Ee.error,K=Ee.name,le=bo(Ie)}}else y([K],!0),W=(await LA(ue,a.disabled,i,p,t.shouldUseNativeValidation))[K],y([K]),X(_e),ae&&(W?le=!1:c.isValid&&(le=await R(r,!0)));ae&&(ue._f.deps&&E(ue._f.deps),_(K,le,W,Ve))}},B=(U,q)=>{if(Ne(n.errors,q)&&U.focus)return U.focus(),1},E=async(U,q={})=>{let K,ae;const ue=Uo(U);if(t.resolver){const Z=await M(wn(U)?U:ue);K=bo(Z),ae=U?!ue.some(X=>Ne(Z,X)):K}else U?(ae=(await Promise.all(ue.map(async Z=>{const X=Ne(r,Z);return await R(X&&X._f?{[Z]:X}:X)}))).every(Boolean),!(!ae&&!n.isValid)&&b()):ae=K=await R(r);return d.state.next({...!sa(U)||c.isValid&&K!==n.isValid?{}:{name:U},...t.resolver||!U?{isValid:K}:{},errors:n.errors}),q.shouldFocus&&!ae&&Kf(r,B,U?ue:a.mount),ae},z=U=>{const q={...s.mount?i:o};return wn(U)?q:sa(U)?Ne(q,U):U.map(K=>Ne(q,K))},H=(U,q)=>({invalid:!!Ne((q||n).errors,U),isDirty:!!Ne((q||n).dirtyFields,U),error:Ne((q||n).errors,U),isValidating:!!Ne(n.validatingFields,U),isTouched:!!Ne((q||n).touchedFields,U)}),j=U=>{U&&Uo(U).forEach(q=>nr(n.errors,q)),d.state.next({errors:U?n.errors:{}})},G=(U,q,K)=>{const ae=(Ne(r,U,{_f:{}})._f||{}).ref,ue=Ne(n.errors,U)||{},{ref:Z,message:X,type:W,...le}=ue;Ht(n.errors,U,{...le,...q,ref:ae}),d.state.next({name:U,errors:n.errors,isValid:!1}),K&&K.shouldFocus&&ae&&ae.focus&&ae.focus()},Q=(U,q)=>ea(U)?d.values.subscribe({next:K=>U(N(void 0,q),K)}):N(U,q,!0),ee=(U,q={})=>{for(const K of U?Uo(U):a.mount)a.mount.delete(K),a.array.delete(K),q.keepValue||(nr(r,K),nr(i,K)),!q.keepError&&nr(n.errors,K),!q.keepDirty&&nr(n.dirtyFields,K),!q.keepTouched&&nr(n.touchedFields,K),!q.keepIsValidating&&nr(n.validatingFields,K),!t.shouldUnregister&&!q.keepDefaultValue&&nr(o,K);d.values.next({values:{...i}}),d.state.next({...n,...q.keepDirty?{isDirty:F()}:{}}),!q.keepIsValid&&b()},Y=({disabled:U,name:q,field:K,fields:ae})=>{(Di(U)&&s.mount||U||a.disabled.has(q))&&(U?a.disabled.add(q):a.disabled.delete(q),S(q,Q_(K?K._f:Ne(ae,q)._f),!1,!1,!0))},se=(U,q={})=>{let K=Ne(r,U);const ae=Di(q.disabled)||Di(t.disabled);return Ht(r,U,{...K||{},_f:{...K&&K._f?K._f:{ref:{name:U}},name:U,mount:!0,...q}}),a.mount.add(U),K?Y({field:K,disabled:Di(q.disabled)?q.disabled:t.disabled,name:U}):A(U,!0,q.value),{...ae?{disabled:q.disabled||t.disabled}:{},...t.progressive?{required:!!q.required,min:Wp(q.min),max:Wp(q.max),minLength:Wp(q.minLength),maxLength:Wp(q.maxLength),pattern:Wp(q.pattern)}:{},name:U,onChange:P,onBlur:P,ref:ue=>{if(ue){se(U,q),K=Ne(r,U);const Z=wn(ue.value)&&ue.querySelectorAll&&ue.querySelectorAll("input,select,textarea")[0]||ue,X=AIe(Z),W=K._f.refs||[];if(X?W.find(le=>le===Z):Z===K._f.ref)return;Ht(r,U,{_f:{...K._f,...X?{refs:[...W.filter(K_),Z,...Array.isArray(Ne(o,U))?[{}]:[]],ref:{type:Z.type,name:U}}:{ref:Z}}}),A(U,!1,void 0,Z)}else K=Ne(r,U,{}),K._f&&(K._f.mount=!1),(t.shouldUnregister||q.shouldUnregister)&&!(UW(a.array,U)&&s.action)&&a.unMount.add(U)}}},fe=()=>t.shouldFocusError&&Kf(r,B,a.mount),ve=U=>{Di(U)&&(d.state.next({disabled:U}),Kf(r,(q,K)=>{const ae=Ne(r,K);ae&&(q.disabled=ae._f.disabled||U,Array.isArray(ae._f.refs)&&ae._f.refs.forEach(ue=>{ue.disabled=ae._f.disabled||U}))},0,!1))},oe=(U,q)=>async K=>{let ae;K&&(K.preventDefault&&K.preventDefault(),K.persist&&K.persist());let ue=fr(i);if(a.disabled.size)for(const Z of a.disabled)Ht(ue,Z,void 0);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:Z,values:X}=await k();n.errors=Z,ue=X}else await R(r);if(nr(n.errors,"root"),bo(n.errors)){d.state.next({errors:{}});try{await U(ue,K)}catch(Z){ae=Z}}else q&&await q({...n.errors},K),fe(),setTimeout(fe);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:bo(n.errors)&&!ae,submitCount:n.submitCount+1,errors:n.errors}),ae)throw ae},ye=(U,q={})=>{Ne(r,U)&&(wn(q.defaultValue)?L(U,fr(Ne(o,U))):(L(U,q.defaultValue),Ht(o,U,fr(q.defaultValue))),q.keepTouched||nr(n.touchedFields,U),q.keepDirty||(nr(n.dirtyFields,U),n.isDirty=q.defaultValue?F(U,fr(Ne(o,U))):F()),q.keepError||(nr(n.errors,U),c.isValid&&b()),d.state.next({...n}))},we=(U,q={})=>{const K=U?fr(U):o,ae=fr(K),ue=bo(U),Z=ue?o:ae;if(q.keepDefaultValues||(o=K),!q.keepValues){if(q.keepDirtyValues){const X=new Set([...a.mount,...Object.keys(Hp(o,i))]);for(const W of Array.from(X))Ne(n.dirtyFields,W)?Ht(Z,W,Ne(i,W)):L(W,Ne(Z,W))}else{if(vO&&wn(U))for(const X of a.mount){const W=Ne(r,X);if(W&&W._f){const le=Array.isArray(W._f.refs)?W._f.refs[0]:W._f.ref;if(Nw(le)){const _e=le.closest("form");if(_e){_e.reset();break}}}}r={}}i=t.shouldUnregister?q.keepDefaultValues?fr(o):{}:fr(Z),d.array.next({values:{...Z}}),d.values.next({values:{...Z}})}a={mount:q.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!q.keepIsValid||!!q.keepDirtyValues,s.watch=!!t.shouldUnregister,d.state.next({submitCount:q.keepSubmitCount?n.submitCount:0,isDirty:ue?!1:q.keepDirty?n.isDirty:!!(q.keepDefaultValues&&!uu(U,o)),isSubmitted:q.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ue?{}:q.keepDirtyValues?q.keepDefaultValues&&i?Hp(o,i):n.dirtyFields:q.keepDefaultValues&&U?Hp(o,U):q.keepDirty?n.dirtyFields:{},touchedFields:q.keepTouched?n.touchedFields:{},errors:q.keepErrors?n.errors:{},isSubmitSuccessful:q.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},me=(U,q)=>we(ea(U)?U(i):U,q);return{control:{register:se,unregister:ee,getFieldState:H,handleSubmit:oe,setError:G,_executeSchema:k,_getWatch:N,_getDirty:F,_updateV
3633alid:b,_removeUnmounted:O,_updateFieldArray:v,_updateDisabledField:Y,_getFieldArray:V,_reset:we,_resetDefaultValues:()=>ea(t.defaultValues)&&t.defaultValues().then(U=>{me(U,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:U=>{n={...n,...U}},_disableForm:ve,_subjects:d,_proxyFormState:c,_setErrors:C,get _fields(){return r},get _formValues(){return i},get _state(){return s},set _state(U){s=U},get _defaultValues(){return o},get _names(){return a},set _names(U){a=U},get _formState(){return n},set _formState(U){n=U},get _options(){return t},set _options(U){t={...t,...U}}},trigger:E,register:se,handleSubmit:oe,watch:Q,setValue:L,getValues:z,reset:me,resetField:ye,clearErrors:j,unregister:ee,setError:G,setFocus:(U,q={})=>{const K=Ne(r,U),ae=K&&K._f;if(ae){const ue=ae.refs?ae.refs[0]:ae.ref;ue.focus&&(ue.focus(),q.shouldSelect&&ea(ue.select)&&ue.select())}},getFieldState:H}}function La(e={}){const t=ot.useRef(void 0),n=ot.useRef(void 0),[r,o]=ot.useState({isDirty:!1,isValidating:!1,isLoading:ea(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ea(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...DIe(e),formState:r});const i=t.current.control;return i._options=e,jx({subject:i._subjects.state,next:s=>{KW(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),ot.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),ot.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),ot.useEffect(()=>{e.values&&!uu(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[e.values,i]),ot.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),ot.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),ot.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=qW(r,i),t.current}var xO={},a7={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(a7);var Na=a7.exports,Y_={};const $Ie=Oa(Pte);var jN;function Va(){return jN||(jN=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=$Ie}(Y_)),Y_}var FIe=Na;Object.defineProperty(xO,"__esModule",{value:!0});var l7=xO.default=void 0,LIe=FIe(Va()),NIe=T;l7=xO.default=(0,LIe.default)((0,NIe.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var SO={},VIe=Na;Object.defineProperty(SO,"__esModule",{value:!0});var _O=SO.default=void 0,BIe=VIe(Va()),jIe=T;_O=SO.default=(0,BIe.default)((0,jIe.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");var EO={},zIe=Na;
3633Object.defineProperty(EO,"__esModule",{value:!0});var IO=EO.default=void 0,UIe=zIe(Va()),HIe=T;IO=EO.default=(0,UIe.default)((0,HIe.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");function VA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WIe(e){if(Array.isArray(e))return e}function GIe(e){if(Array.isArray(e))return VA(e)}function qIe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KIe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QIe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function YIe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function XIe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ut(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){qIe(e,o,n[o])})}return e}function JIe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xt(e,t){return t=t??{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):JIe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Ai(e,t){if(e==null)return{};var n=ZIe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZIe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function eAe(e,t){return WIe(e)||QIe(e,t)||d7(e,t)||YIe()}function u7(e){return GIe(e)||KIe(e)||d7(e)||XIe()}function c7(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}function d7(e,t){if(e){if(typeof e=="string")return VA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VA(e,t)}}var f7=m.forwardRef(function(e,t){var n=e.rules,r=n===void 0?{}:n,o=e.parseError,i=e.type,s=e.required,a=e.name,l=e.control,u=e.component,c=u===void 0?es:u,d=e.inputRef,f=e.transform,h=e.onBlur,p=Ai(e,["rules","parseError","type","required","name","control","component","inputRef","transform","onBlur"]),g=Rl(),b=o||g,y=ut({},r,s&&!r.required&&{required:"This field is required"},i==="email"&&!r.pattern&&{pattern:{value:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:"Please enter a valid email address"}}),v=Ii({name:a,control:l,disabled:p.disabled,rules:y}),w=v.field,C=v.fieldState,A=C.error,S=Fa({value:w.value,onChange:w.onChange,transform:{input:typeof(f==null?void 0:f.input)=="function"?f.input:function(R){return R??""},output:typeof(f==null?void 0:f.output)=="function"?f.output:function(R){var O=R.target.value;return i!=="number"?O:O===""?null:O==null?O:Number(O)}}}),_=S.value,k=S.onChange,M=bt(w.ref,d);return T.jsx(c,Xt(ut({}
3633,p),{name:w.name,value:_,onChange:function(R){k(R),typeof p.onChange=="function"&&p.onChange(R)},onBlur:function(R){w.onBlur(),typeof h=="function"&&h(R)},required:s,type:i,error:!!A,helperText:A?typeof b=="function"?b(A):A.message:p.helperText,ref:t,inputRef:M}))});f7.displayName="TextFieldElement";var it=f7;function Ol(e){var t=e.handleSubmit,n=e.children,r=e.FormProps,o=e.formContext,i=e.onSuccess,s=e.onError,a=Ai(e,["handleSubmit","children","FormProps","formContext","onSuccess","onError"]);return o?(typeof i=="function"&&typeof t=="function"&&console.warn("Property `onSuccess` will be ignored because handleSubmit is provided"),T.jsx(GW,Xt(ut({},o),{children:T.jsx("form",Xt(ut({noValidate:!0},r),{onSubmit:t||(i?o.handleSubmit(i,s):function(){return console.log("submit handler `onSuccess` is missing")}),children:n}))}))):T.jsx(tAe,ut({onSuccess:i,onError:s,FormProps:r,children:n},a))}function tAe(e){var t=e.onSuccess,n=e.onError,r=e.FormProps,o=e.children,i=Ai(e,["onSuccess","onError","FormProps","children"]),s=La(ut({},i)),a=s.handleSubmit;return T.jsx(GW,Xt(ut({},s),{children:T.jsx("form",Xt(ut({onSubmit:a(t||function(){return console.log("submit handler `onSuccess` is missing")},n),noValidate:!0},r),{children:o}))}))}var h7=m.forwardRef(function(e,t){var n=e.name,r=e.rules,o=r===void 0?{}:r,i=e.required,s=e.parseError,a=e.label,l=e.control,u=e.helperText,c=e.labelProps,d=e.inputRef,f=e.transform,h=Ai(e,["name","rules","required","parseError","label","control","helperText","labelProps","inputRef","transform"]),p=Rl(),g=s||p,b=ut({},o,i&&!o.required&&{required:"This field is required"}),y=Ii({name:n,control:l,disabled:h.disabled,rules:b}),v=y.field,w=y.fieldState,C=w.error,A=Fa({value:v.value,onChange:v.onChange,transform:{input:f==null?void 0:f.input,output:typeof(f==null?void 0:f.output)=="function"?f==null?void 0:f.output:function(R,O){return O}}}),S=A.value,_=A.onChange,k=bt(v.ref,d),M=C?typeof g=="function"?g(C):C.message:u;return T.jsxs(Al,{required:i,error:!!C,ref:t,children:[T.jsx(gT,{row:!0,children:T.jsx(ed,Xt(ut({},c),{label:a||"",control:T.jsx(Kh,Xt(ut({},h),{color:h.color||"primary",sx:u7(Array.isArray(h.sx)?h.sx:[h.sx]).concat([{color:C?"error.main":void 0}]),value:S,checked:!!S,onChange:function(R,O){_(R,O),typeof h.onChange=="function"&&h.onChange(R,O)},inputRef:k}))}))}),M&&T.jsx(wd,{error:!!C,children:M})]})});h7.displayName="CheckboxElement";var Ul=h7,p7=m.forwardRef(function(e,t){var n,r=e.name,o=e.required,i=e.valueKey,s=i===void 0?"id":i,a=e.labelKey,l=a===void 0?"label":a,u=e.options,c=u===void 0?[]:u,d=e.parseError,f=e.type,h=e.objectOnChange,p=e.rules,g=p===void 0?{}:p,b=e.control,y=e.inputRef,v=e.transform,w=e.onBlur,C=Ai(e,["name","required","valueKey","labelKey","options","parseError","type","objectOnChange","rules","control","inputRef","transform","onBlur"]),A=Rl(),S=d||A,_=!!(!((n=C.SelectProps)===null||n===void 0)&&n.native),k=ut({},g,o&&!g.required&&{required:"This field is required"}),M=Ii({name:r,rules:k,disabled:C.disabled,control:b}),R=M.field,O=M.fieldState,F=O.error,N=Fa({value:R.value,onChange:R.onChange,transform:{input:typeof(v==null?void 0:v.input)=="function"?v.input:function(L){var P,B;return(B=(P=L==null?void 0:L[s])!==null&&P!==void 0?P:L)!==null&&B!==void 0?B:""},output:typeof(v==null?void 0:v.output)=="function"?v.output:function(L){var P=L.target.value;return f==="number"&&P&&(P=Number(P)),P}}}),V=N.value,$=N.onChange,D=bt(R.ref,y);return f==="number"&&(typeof V>"u"?"undefined":c7(V))<"u"&&(C.InputLabelProps=C.InputLabelProps||{},C.InputLabelProps.shrink=!0),T.jsxs(es,Xt(ut({},C),{name:r,value:V,onBlur:function(L){R.onBlur(),typeof w=="function"&&w(L)},ref:t,onChange:function(L){if($(L),typeof C.onChange=="function"){var P=L.target.value;f==="number"&&P&&(P=Number(P)),h&&(P=c.find(function(B){return B[s]===P})),C.onChange(P)}},select:!0,required:o,error:!!F,helperText:F?typeof S=="function"?S(F):F.message:C.helperText,inputRef:D,children:[_&&T.jsx("option",{}),c.map(function(L){var P,B="".concat(r,"_").concat(L[s]),E={value:(P=L==null?void 0:L[s])!==null&&P!==void 0?P:L,disabled:No(L,"disabled")?!!L.disabled:!1,children:L[l]};return _?T.jsx("option",ut({},E),B):T.jsx(io,ut({},E),B)})]}))});p7.displayName="SelectElement";var jw=p7,nAe=m.forwardRef(function(e,t){var n=e.helperText,r=e.options,o=e.label,i=e.name,s=e.parseError,a=e.required,l=e.labelKey,u=l===void 0?"label":l,c=e.valueKey,d=c===void 0?"id":c,f=e.returnObject,h=e.disabled,p=e.row,g=e.control,b=e.checkboxColor,y=e.rules,v=e.labelProps,w=e.transform,C=e.defaultValue,A=C===void 0?[]:C,S=Ai(e,["helperText","options","label","name","parseError","required","labelKey","valueKey","returnObject","disabled","row","control","checkboxColor","rules","labelProps","transform","defaultValue"]),_=Zn(),k=Rl(),M=s||k,R=Ii({name:i,rules:a?{required:"This field is required"}:y,disabled:h,control:g,defaultValue:A}),O=R.field,F=R.fieldState,N=F.error,V=F.invalid,$=Fa({value:O.value,onChange:O.onChange,transform:{input:typeof(w==null?void 0:w.input)=="function"?w.input
3633:function(E){return Array.isArray(E)?E:[]},output:w==null?void 0:w.output}}),D=$.value,L=$.onChange,P=function(E){var z=No(E,d)?E[d]:E,H=D.findIndex(function(G){var Q=No(G,d)?G[d]:G;return z===Q}),j=(H===-1?u7(D).concat([E]):D.filter(function(G,Q){return H!==Q})).map(function(G){return f||!No(G,d)?G:G[d]});L(j),typeof S.onChange=="function"&&S.onChange(j)},B=N?typeof M=="function"?M(N):N.message:n;return T.jsxs(Al,{error:V,required:a,ref:t,children:[o?T.jsx(wy,{children:o}):null,T.jsx(gT,{row:p,children:r.map(function(E){var z=No(E,d)?E[d]:E,H=No(E,u)?E[u]:E,j=D.some(function(G){return(No(G,d)?G[d]:G)===z});return m.createElement(ed,Xt(ut({},v),{control:T.jsx(Kh,{sx:{color:N?_.palette.error.main:void 0},color:b,value:z,checked:j,disabled:h,onChange:function(){return P(E)}}),label:H,key:"".concat(z)}))})}),B&&T.jsx(wd,{children:B})]})});nAe.displayName="CheckboxButtonGroup";var rAe=48,oAe=8,iAe=m.forwardRef(function(e,t){var n,r,o,i,s,a=e.onBlur,l=e.options,u=e.label,c=u===void 0?"":u,d=e.itemKey,f=d===void 0?"id":d,h=e.itemValue,p=h===void 0?"":h,g=e.itemLabel,b=g===void 0?"label":g,y=e.required,v=y===void 0?!1:y,w=e.rules,C=w===void 0?{}:w,A=e.parseError,S=e.name,_=e.menuMaxHeight,k=_===void 0?rAe*4.5+oAe:_,M=e.menuMaxWidth,R=M===void 0?250:M,O=e.minWidth,F=O===void 0?120:O,N=e.helperText,V=e.showChips,$=e.preserveOrder,D=e.control,L=e.showCheckbox,P=e.formControlProps,B=e.inputRef,E=e.transform,z=e.inputLabelProps,H=Ai(e,["onBlur","options","label","itemKey","itemValue","itemLabel","required","rules","parseError","name","menuMaxHeight","menuMaxWidth","minWidth","helperText","showChips","preserveOrder","control","showCheckbox","formControlProps","inputRef","transform","inputLabelProps"]),j=Rl(),G=A||j,Q=function(pe){var U,q;return(q=(U=l.find(function(K){var ae;return((ae=K[p||f])!==null&&ae!==void 0?ae:K)===pe}))===null||U===void 0?void 0:U[b])!==null&&q!==void 0?q:pe},ee=ut({},C,v&&!C.required&&{required:"This field is required"}),Y=Ii({name:S,rules:ee,disabled:H.disabled,control:D}),se=Y.field,fe=Y.fieldState,ve=fe.error,oe=Fa({value:se.value,onChange:se.onChange,transform:{input:typeof(E==null?void 0:E.input)=="function"?E.input:function(pe){return Array.isArray(pe)?pe:[]},output:E==null?void 0:E.output}}),ye=oe.value,we=oe.onChange,me=bt(se.ref,B),be=ve?typeof G=="function"?G(ve):ve.message:N,ie;return T.jsxs(Al,Xt(ut({},P),{style:ut({minWidth:F},P==null?void 0:P.style),variant:H.variant,fullWidth:H.fullWidth,error:!!ve,size:H.size,ref:t,children:[c&&T.jsx(yT,Xt(ut({},z),{size:H.size==="small"?"small":z==null?void 0:z.size,error:!!ve,htmlFor:H.id||"select-multi-select-".concat(S),required:v,children:c})),T.jsx(Cy,Xt(ut({},H),{id:H.id||"select-multi-select-".concat(S),multiple:!0,label:c||void 0,error:!!ve,value:ye,required:v,onChange:we,onBlur:function(pe){se.onBlur(),typeof a=="function"&&a(pe)},MenuProps:Xt(ut({},H.MenuProps),{slotProps:Xt(ut({},(n=H.MenuProps)===null||n===void 0?void 0:n.slotProps),{paper:ut({},(ie=(o=H.MenuProps)===null||o===void 0||(r=o.slotProps)===null||r===void 0?void 0:r.paper)!==null&&ie!==void 0?ie:{style:ut({maxHeight:k,width:R},No((s=H.MenuProps)===null||s===void 0||(i=s.slotProps)===null||i===void 0?void 0:i.paper,"style")&&typeof H.MenuProps.slotProps.paper.style=="object"&&ut({},H.MenuProps.slotProps.paper.style))})})}),renderValue:typeof H.renderValue=="function"?H.renderValue:V?function(pe){return T.jsx("div",{style:{display:"flex",flexWrap:"wrap"},children:($?l.filter(function(U){return pe.includes(U)}):pe||[]).map(function(U){return T.jsx(Ps,{label:Q(U),style:{display:"flex",flexWrap:"wrap"},onDelete:function(){we((Array.isArray(ye)?ye:[]).filter(function(q){return q!==U}))},deleteIcon:T.jsx(l7,{onMouseDown:function(q){q.stopPropagation()}})},U)})})}:function(pe){return Array.isArray(pe)?pe.map(Q).join(", "):""},inputRef:me,children:l.map(function(pe){var U,q=(U=pe[p||f])!==null&&U!==void 0?U:pe,K=Array.isArray(ye)?ye.some(function(ae){return ae===q}):!1;return T.jsxs(io,{value:q,sx:{fontWeight:function(ae){return K?ae.typography.fontWeightBold:ae.typography.fontWeightRegular}},children:[L&&T.jsx(Kh,{checked:K}
3633),T.jsx(mi,{primary:pe[b]||pe})]},q)})})),be&&T.jsx(wd,{error:!!ve,children:be})]}))});iAe.displayName="MultiSelectElement";var m7=m.forwardRef(function(e,t){var n=e.iconColor,r=e.renderIcon,o=r===void 0?function(h){return h?T.jsx(_O,{}):T.jsx(IO,{})}:r,i=e.InputProps,s=i===void 0?{}:i,a=e.slotProps,l=Ai(e,["iconColor","renderIcon","InputProps","slotProps"]),u=eAe(m.useState(!0),2),c=u[0],d=u[1],f=T.jsx(Ou,{position:"end",children:T.jsx(Zt,{onMouseDown:function(h){return h.preventDefault()},onClick:function(){return d(!c)},tabIndex:-1,color:n??"default",children:o(c)})});return T.jsx(it,ut(Xt(ut({},l),{ref:t,type:c?"password":"text"}),(typeof a>"u"?"undefined":c7(a))>"u"?{InputProps:ut({endAdornment:f},s)}:{slotProps:Xt(ut({},a),{input:ut({endAdornment:f},s,a==null?void 0:a.input)})}))});m7.displayName="PasswordElement";var sAe=m7,aAe=m.forwardRef(function(e,t){var n=e.helperText,r=e.options,o=e.label,i=e.name,s=e.parseError,a=e.labelKey,l=a===void 0?"label":a,u=e.valueKey,c=u===void 0?"id":u,d=e.disabledKey,f=d===void 0?"disabled":d,h=e.required,p=e.emptyOptionLabel,g=e.returnObject,b=e.row,y=e.control,v=e.type,w=e.labelProps,C=e.disabled,A=e.formLabelProps,S=e.radioProps,_=e.transform,k=e.rules,M=k===void 0?{}:k,R=Ai(e,["helperText","options","label","name","parseError","labelKey","valueKey","disabledKey","required","emptyOptionLabel","returnObject","row","control","type","labelProps","disabled","formLabelProps","radioProps","transform","rules"]),O=Zn(),F=Rl(),N=s||F,V=ut({},M,h&&!M.required&&{required:"This field is required"}),$=Ii({name:i,rules:V,disabled:C,control:y}),D=$.field,L=$.fieldState,P=L.error,B=Fa({value:D.value,onChange:D.onChange,transform:{input:typeof(_==null?void 0:_.input)=="function"?_.input:function(G){return G||""},output:typeof(_==null?void 0:_.output)=="function"?_==null?void 0:_.output:function(G,Q){return Q&&v==="number"?Number(Q):Q}}}),E=B.value,z=B.onChange,H=P?typeof N=="function"?N(P):P.message:n,j=function(G,Q){var ee=g?r.find(function(Y){return Y[c]===Q}):Q;z(G,ee),typeof R.onChange=="function"&&R.onChange(ee)};return T.jsxs(Al,{error:!!P,ref:t,children:[o&&T.jsx(wy,Xt(ut({},A),{required:h,error:!!P,children:o})),T.jsxs(Vde,{onChange:j,name:i,row:b,value:E,children:[p&&T.jsx(ed,Xt(ut({},w),{control:T.jsx(M$,Xt(ut({},S),{sx:{color:P?O.palette.error.main:void 0},checked:!E})),label:p,value:""})),r.map(function(G){var Q=G[c],ee=G[f]||!1;Q===void 0&&console.error("RadioButtonGroup: valueKey ".concat(c," does not exist on option"),G);var Y=g?E==null?void 0:E[c]:E;v==="number"&&(Y=Number(Y));var se=Y===Q;return m.createElement(ed,Xt(ut({},w),{control:T.jsx(M$,Xt(ut({},S),{sx:{color:P?O.palette.error.main:void 0},disabled:C||ee,checked:se})),value:Q,label:G[l],key:Q}))})]}),H&&T.jsx(wd,{children:H})]})});aAe.displayName="RadioButtonGroup";var g7=m.forwardRef(function(e,t){var n=e.name,r=e.control,o=e.switchProps,i=e.transform,s=Ai(e,["name","control","switchProps","transform"]),a=Ii({name:n,control:r,disabled:s.disabled}),l=a.field,u=Fa({value:l.value,onChange:l.onChange,transform:{input:i==null?void 0:i.input,output:typeof(i==null?void 0:i.output)=="function"?i.output:function(h,p){return p}}}),c=u.value,d=u.onChange,f=bt(l.ref,o==null?void 0:o.ref);return T.jsx(ed,ut({ref:t,control:T.jsx(kU,Xt(ut({},o),{name:l.name,value:c,onChange:function(h,p){d(h,p),typeof(o==null?void 0:o.onChange)=="function"&&o.onChange(h,p)},onBlur:function(h){l.onBlur(),typeof(o==null?void 0:o.onBlur)=="function"&&(o==null||o.onBlur(h))},ref:f,checked:!!c}))},s))});g7.displayName="SwitchElement";var Ec=g7,lAe=m.forwardRef(function(e,t){var n=e.passwordFieldName,r=e.customInvalidFieldMessage,o=e.control,i=Ai(e,["passwordFieldName","customInvalidFieldMessage","control"]),s=zx({name:n,control:o});return T.jsx(sAe,Xt(ut({control:o},i),{ref:t,rules:{validate:function(a){return a===s||(r??"Password should match")}}}))});lAe.displayName="PasswordRepeatElement";var y7=m.forwardRef(function(e,t){var n=e.textFieldProps,r=e.autocompleteProps,o=e.name,i=e.control,s=e.options,a=e.loading,l=e.showCheckbox,u=e.rules,c=e.loadingIndicator,d=e.required,f=e.multiple,h=e.label,p=e.parseError,g=e.transform,b=e.matchI
3633d,y=Rl(),v=p||y,w=ut({},u,d&&{required:(u==null?void 0:u.required)||"This field is required"}),C=Ii({name:o,control:i,disabled:r==null?void 0:r.disabled,rules:w}),A=C.field,S=C.fieldState,_=S.error,k=function(L){return typeof(r==null?void 0:r.getOptionLabel)=="function"?r.getOptionLabel(L):No(L,"label")?"".concat(L==null?void 0:L.label):"".concat(L)},M=function(L,P){if(typeof(r==null?void 0:r.isOptionEqualToValue)=="function")return r.isOptionEqualToValue(L,P);var B=No(L,"id")?L.id:L,E=No(P,"id")?P.id:P;return B===E},R=function(L){return s.find(function(P){return b&&No(P,"id")?P.id===L:M(P,L)})},O=Fa({value:A.value,onChange:A.onChange,transform:{input:typeof(g==null?void 0:g.input)=="function"?g.input:function(L){var P;return f?(Array.isArray(L)?L:[]).map(R):(P=R(L))!==null&&P!==void 0?P:null},output:typeof(g==null?void 0:g.output)=="function"?g.output:function(L,P){if(f){var B=Array.isArray(P)?P:[];return b?B.map(function(E){return No(E,"id")?E.id:E}):B}return b&&No(P,"id")?P.id:P}}}),F=O.value,N=O.onChange,V=bt(A.ref,n==null?void 0:n.inputRef),$=c||T.jsx(Qn,{color:"inherit",size:20}),D;return T.jsx(vy,Xt(ut({},r),{value:F,loading:a,multiple:f,options:s,disableCloseOnSelect:typeof(r==null?void 0:r.disableCloseOnSelect)=="boolean"?r.disableCloseOnSelect:!!f,isOptionEqualToValue:M,getOptionLabel:k,onChange:function(L,P,B,E){N(L,P,B,E),r!=null&&r.onChange&&r.onChange(L,P,B,E)},ref:t,renderOption:(D=r==null?void 0:r.renderOption)!==null&&D!==void 0?D:l?function(L,P,B){var E=B.selected;return T.jsxs("li",Xt(ut({},L),{children:[T.jsx(Kh,{sx:{marginRight:1},checked:E}),k(P)]}))}:void 0,onBlur:function(L){A.onBlur(),typeof(r==null?void 0:r.onBlur)=="function"&&r.onBlur(L)},renderInput:function(L){return T.jsx(es,Xt(ut({name:o,required:u!=null&&u.required?!0:d,label:h},n,L),{error:!!_,InputLabelProps:ut({},L.InputLabelProps,n==null?void 0:n.InputLabelProps),InputProps:ut(Xt(ut({},L.InputProps),{endAdornment:T.jsxs(T.Fragment,{children:[a?$:null,L.InputProps.endAdornment]})}),n==null?void 0:n.InputProps),inputProps:ut({},L.inputProps,n==null?void 0:n.inputProps),helperText:_?typeof v=="function"?v(_):_.message:n==null?void 0:n.helperText,inputRef:V}))}}))});y7.displayName="AutocompleteElement";var uAe=y7,cAe=m.forwardRef(function(e,t){var n=e.name,r=e.control,o=e.label,i=e.rules,s=i===void 0?{}:i,a=e.parseError,l=e.required,u=e.formControlProps,c=e.transform,d=Ai(e,["name","control","label","rules","parseError","required","formControlProps","transform"]),f=Rl(),h=a||f,p=ut({},s,l&&!s.required&&{required:"This field is required"}),g=Ii({name:n,control:r,disabled:d.disabled,rules:p}),b=g.field,y=g.fieldState,v=y.error,w=y.invalid,C=Fa({value:b.value,onChange:b.onChange,transform:c}),A=C.value,S=C.onChange,_=v?typeof h=="function"?h(v):v.message:null;return T.jsxs(Al,Xt(ut({error:w,required:l,fullWidth:!0},u),{ref:t,children:[o&&T.jsx(wy,{component:"legend",error:w,children:o}),T.jsx(AU,Xt(ut({},d),{value:A,onChange:S,valueLabelDisplay:d.valueLabelDisplay||"auto"})),_&&T.jsx(wd,{error:w,children:_})]}))});cAe.displayName="SliderElement";var dAe=m.forwardRef(function(e,t){var n=e.rules,r=n===void 0?{}:n,o=e.parseError,i=e.required,s=e.name,a=e.control,l=e.rows,u=e.resizeStyle,c=u===void 0?"none":u,d=e.maxRows,f=e.minRows,h=e.inputRef,p=e.inputProps,g=e.transform,b=e.onBlur,y=Ai(e,["rules","parseError","required","name","control","rows","resizeStyle","maxRows","minRows","inputRef","inputProps","transform","onBlur"]),v=Rl(),w=o||v,C=ut({},r,i&&!r.required&&{required:"This field is required"}),A=Ii({name:s,control:a,rules:C,disabled:y.disabled}),S=A.field,_=A.fieldState,k=_.error,M=Fa({value:S.value,onChange:S.onChange,transform:{input:typeof(g==null?void 0:g.input)=="function"?g.input:function(N){return N??""},output:typeof(g==null?void 0:g.output)=="function"?g.output:function(N){return N.target.value}}}),R=M.value,O=M.onChange,F=bt(S.ref,h);return T.jsx(es,Xt(ut({},y),{name:s,value:R,onChange:function(N){O(N),typeof y.onChange=="function"&&y.onChange(N)},onBlur:function(N){S.onBlur(),typeof b=="function"&&b(N)},required:i,error:!!k,helperText:k?typeof w=="function"?w(k):k.message:y.helperText,inputRef:F,multiline:!0,ref:t,slotProps:{input:{inputComponent:Gz,inputProps:ut({minRows:f||l,maxRows:d||l,style:{resize:c}},p||{})}}}))});dAe.displayName="TextareaAutosizeElement";function Id(e){this._maxSize=e,this.clear()}Id.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Id.prototype.get=function(e){return this._values[e]};Id.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var fAe=/[^.^\]^[]+|(?=\[\]|\.\.)/g,v7=/^\d+$/,hAe=/^\d/,pAe=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,mAe=/^\s*(['"]?)(.*?)(\1)\s*$/,AO=512,zN=new Id(AO),UN=new Id(AO),HN=new Id(AO),Vc={Cache:Id,split:BA,normalizePath:X_,setter:function(e){var t=X_(e);return UN.get(e)||UN.set(e,function(r,o){for(var i=0,s=t.length,a=r;i<s-1;){var l=t[i];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[i++]]}a[t[i]]=o})},getter:function(e,t){var n=X_(e);return HN.get(e)||HN.set(e,function(o){for(var i=0,s=n.length;i<s;)if(o!=null||!t)o=o[n[i++]];else return;return o}
vendor: 29,244 bytes, lines 3633-3636
3633)},join:function(e){return e.reduce(function(t,n){return t+(kO(n)||v7.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){gAe(Array.isArray(e)?e:BA(e),t,n)}};function X_(e){return zN.get(e)||zN.set(e,BA(e).map(function(t){return t.replace(mAe,"$2")}))}function BA(e){return e.match(fAe)||[""]}function gAe(e,t,n){var r=e.length,o,i,s,a;for(i=0;i<r;i++)o=e[i],o&&(bAe(o)&&(o='"'+o+'"'),a=kO(o),s=!a&&/^\d+$/.test(o),t.call(n,o,a,s,i,e))}function kO(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function yAe(e){return e.match(hAe)&&!e.match(v7)}function vAe(e){return pAe.test(e)}function bAe(e){return!kO(e)&&(yAe(e)||vAe(e))}const wAe=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Ux=e=>e.match(wAe)||[],Hx=e=>e[0].toUpperCase()+e.slice(1),PO=(e,t)=>Ux(e).join(t).toLowerCase(),b7=e=>Ux(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),CAe=e=>Hx(b7(e)),xAe=e=>PO(e,"_"),SAe=e=>PO(e,"-"),_Ae=e=>Hx(PO(e," ")),EAe=e=>Ux(e).map(Hx).join(" ");var J_={words:Ux,upperFirst:Hx,camelCase:b7,pascalCase:CAe,snakeCase:xAe,kebabCase:SAe,sentenceCase:_Ae,titleCase:EAe},TO={exports:{}};TO.exports=function(e){return w7(IAe(e),e)};TO.exports.array=w7;function w7(e,t){var n=e.length,r=new Array(n),o={},i=n,s=AAe(t),a=kAe(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(e[i],i,new Set);return r;function l(u,c,d){if(d.has(u)){var f;try{f=", node was:"+JSON.stringify(u)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!o[c]){o[c]=!0;var h=s.get(u)||new Set;if(h=Array.from(h),c=h.length){d.add(u);do{var p=h[--c];l(p,a.get(p),d)}while(c);d.delete(u)}r[--n]=u}}}function IAe(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var o=e[n];t.add(o[0]),t.add(o[1])}return Array.from(t)}function AAe(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var o=e[n];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}function kAe(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var PAe=TO.exports;const TAe=Fh(PAe),RAe=Object.prototype.toString,OAe=Error.prototype.toString,MAe=RegExp.prototype.toString,DAe=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",$Ae=/^Symbol\((.*)\)(.*)$/;function FAe(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function WN(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return FAe(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return DAe.call(e).replace($Ae,"Symbol($1)");const r=RAe.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+OAe.call(e)+"]":r==="RegExp"?MAe.call(e):null}function ul(e,t){let n=WN(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=WN(this[r],t);return i!==null?i:o},2)}function C7(e){return e==null?[]:[].concat(e)}let x7,S7,_7,LAe=/\$\{\s*(\w+)\s*\}/g;x7=Symbol.toStringTag;class GN{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[x7]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],C7(t).forEach(i=>{if(Vo.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}S7=Symbol.hasInstance;_7=Symbol.toStringTag;class Vo extends Error{static formatError(t,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof t=="string"?t.replace(LAe,(o,i)=>ul(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const s=new GN(t,n,r,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[_7]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Vo)}static[S7](t){return GN[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Gs={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${ul(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ul(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${ul(n,!0)}\``+o}},Do={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},NAe={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},jA={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},zA={isValue:"${path} field must be ${value}"},UA={noUnknown:"${path} field has unspecified keys: ${unknown}"},Zb={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},VAe={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${ul(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${ul(n,!0)}\``}return Vo.formatError(Gs.notType,e)}};Object.assign(Object.create(null),{mixed:Gs,string:Do,number:NAe,date:jA,object:UA,array:Zb,boolean:zA,tuple:VAe});const Wx=e=>e&&e.__isYupSchema__;class zw{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,s=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new zw(t,(a,l)=>{var u;let c=s(...a)?o:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!Wx(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const fb={context:"$",value:"."};class Ad{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===fb.context,this.isValue=this.key[0]===fb.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?fb.context:this.isValue?fb.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Vc.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ad.prototype.__isYupRef=!0;const ol=e=>e==null;function Ud(e){function t({value:n,path:r="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:c,params:d,message:f,skipAbsent:h}=e;let{parent:p,context:g,abortEarly:b=s.spec.abortEarly,disableStackTrace:y=s.spec.disableStackTrace}=o;function v(O){return Ad.isRef(O)?O.getValue(n,p,g):O}function w(O={}){const F=Object.assign({value:n,originalValue:i,label:s.spec.label,path:O.path||r,spec:s.spec,disableStackTrace:O.disableStackTrace||y},d,O.params);for(const V of Object.keys(F))F[V]=v(F[V]);const N=new Vo(Vo.formatError(O.message||f,F),n,F.path,O.type||u,F.disableStackTrace);return N.params=F,N}const C=b?a:l;let A={path:r,parent:p,type:u,from:o.from,createError:w,resolve:v,options:o,originalValue:i,schema:s};const S=O=>{Vo.isError(O)?C(O):O?l(null):C(w())},_=O=>{Vo.isError(O)?C(O):a(O)};if(h&&ol(n))return S(!0);let M;try{var R;if(M=c.call(A,n,A),typeof((R=M)==null?void 0:R.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${A.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(M).then(S,_)}}catch(O){_(O);return}S(M)}return t.OPTIONS=e,t}function BAe(e,t,n,r=n){let o,i,s;return t?(Vc.forEach(t,(a,l,u)=>{let c=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:o,value:n});let d=e.type==="tuple",f=u?parseInt(c,10):0;if(e.innerType||d){if(d&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);o=n,n=n&&n[c],e=e.fields[c]}i=c,s=l?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class Uw extends Set{describe(){const t=[];for(const n of this.values())t.push(Ad.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Uw(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function _f(e,t=new Map){if(Wx(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=_f(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,_f(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(_f(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=_f(o,t)}else throw Error(`Unable to clone ${e}`);return n}let ts=class{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Uw,this._blacklist=new Uw,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Gs.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=_f(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(s=>{i.test(s.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&ol(i))return i;let s=ul(t),a=ul(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". 
3634
3635attempted value: ${s} 
3636`+(a!==s?`result of cast: ${a}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:s=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:s,options:n,tests:u},r,c=>{if(c.length)return o(c,l);this.runTests({path:i,value:l,originalValue:s,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=t,c=g=>{o||(o=!0,n(g,s))},d=g=>{o||(o=!0,r(g,s))},f=i.length,h=[];if(!f)return d([]);let p={value:s,originalValue:a,path:l,options:u,schema:this};for(let g=0;g<i.length;g++){const b=i[g];b(p,c,function(v){v&&(Array.isArray(v)?h.push(...v):h.push(v)),--f<=0&&d(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:i,options:s}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const c=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(d,f,h)=>this.resolve(c)._validate(u,c,f,h)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(t,n,(l,u)=>{Vo.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new Vo(l,u,void 0,void 0,i)):s(u)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw Vo.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new Vo(a,t,void 0,void 0,s);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Vo.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Vo.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):_f(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Ud({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Ud({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Gs.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Gs.notNull){return this.nullability(!1,t)}required(t=Gs.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Gs.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Ud(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(s=>!(s.OPTIONS.name===n.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=C7(t).map(i=>new Ad(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new zw(o,n):zw.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Ud({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Gs.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Ud({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),r}notOneOf(t,n=Gs.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Ud({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:s}=n.spec;return{meta:o,label:r,optional:i,nullable:s,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(d=>d.name===l.name)===u)}}};ts.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ts.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:s}=BAe(this,t,n,r.context);return s[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])ts.prototype[e]=ts.prototype.oneOf;for(const e of["not","nope"])ts.prototype[e]=ts.prototype.notOneOf;function jAe(){return new E7}class E7 extends ts{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=zA.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return ol(n)||n===!0}})}isFalse(t=zA.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return ol(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}jAe.prototype=E7.prototype;const zAe=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function UAe(e){const t=HA(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function HA(e){var t,n;const r=zAe.exec(e);return r?{year:Ha(r[1]),month:Ha(r[2],1)-1,day:Ha(r[3],1),hour:Ha(r[4]),minute:Ha(r[5]),second:Ha(r[6]),millisecond:r[7]?Ha(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Ha(r[10]),minuteOffset:Ha(r[11])}:null}function Ha(e,t=0){return Number(e)||t}let HAe=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,WAe=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,GAe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,qAe="^\\d{4}-\\d{2}-\\d{2}",KAe="\\d{2}:\\d{2}:\\d{2}",QAe="(([+-]\\d{2}(:?\\d{2})?)|Z)",YAe=new RegExp(`${qAe}T${KAe}(\\.\\d+)?${QAe}$`),XAe=e=>ol(e)||e===e.trim(),JAe={}.toString();function Hw(){return new I7}class I7 extends ts{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===JAe?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Gs.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Do.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Do.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Do.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||Do.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&r||s.search(t)!==-1})}email(t=Do.email){return this.matches(HAe,{name:"email",message:t,excludeEmptyString:!0})}url(t=Do.url){return this.matches(WAe,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Do.uuid){return this.matches(GAe,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(YAe,{name:"datetime",message:n||Do.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Do.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const s=HA(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||Do.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=HA(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Do.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:XAe})}lowercase(t=Do.lowercase){return this.transform(n=>ol(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ol(n)||n===n.toLowerCase()})}uppercase(t=Do.uppercase){return this.transform(n=>ol(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ol(n)||n===n.toUpperCase()})}}Hw.prototype=I7.prototype;let A7=new Date(""),ZAe=e=>Object.prototype.toString.call(e)==="[object Date]";function k7(){return new tv}class tv extends ts{constructor(){super({type:"date",check(t){return ZAe(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=UAe(t),isNaN(t)?tv.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Ad.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=jA.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=jA.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}tv.INVALID_DATE=A7;k7.prototype=tv.prototype;k7.INVALID_DATE=A7;function eke(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([s,a])=>`${s}-${a}
3636`));function i(s,a){let l=Vc.split(s)[0];r.add(l),o.has(`${a}-${l}`)||n.push([a,l])}for(const s of Object.keys(e)){let a=e[s];r.add(s),Ad.isRef(a)&&a.isSibling?i(a.path,s):Wx(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return TAe.array(Array.from(r),n).reverse()}function qN(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function P7(e){return(t,n)=>qN(e,t)-qN(e,n)}const T7=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function e0(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=e0(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=e0(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(e0)}):"optional"in e?e.optional():e}const tke=(e,t)=>{const n=[...Vc.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=Vc.getter(Vc.join(n),!0)(e);return!!(o&&r in o)};let KN=e=>Object.prototype.toString.call(e)==="[object Object]";function nke(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const rke=P7([]);function RO(e){return new R7(e)}class R7 extends ts{constructor(t){super({type:"object",check(n){return KN(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=rke,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,s=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(d=>!this._nodes.includes(d))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),c=!1;for(const d of a){let f=i[d],h=d in o;if(f){let p,g=o[d];u.path=(n.path?`${n.path}.`:"")+d,f=f.resolve({value:g,context:n.context,parent:l});let b=f instanceof ts?f.spec:void 0,y=b==null?void 0:b.strict;if(b!=null&&b.strip){c=c||d in o;continue}p=!n.__validating||!y?f.cast(o[d],u):o[d],p!==void 0&&(l[d]=p)}else h&&!s&&(l[d]=o[d]);(h!==d in l||l[d]!==o[d])&&(c=!0)}return c?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:s=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:s},...i],n.__validating=!0,n.originalValue=s,super._validate(t,n,r,(l,u)=>{if(!a||!KN(u)){o(l,u);return}s=s||u;let c=[];for(let d of this._nodes){let f=this.fields[d];!f||Ad.isRef(f)||c.push(f.asNestedTest({options:n,key:d,parent:u,parentPath:n.path,originalParent:s}))}this.runTests({tests:c,value:u,originalValue:s,options:n},r,d=>{o(d.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const s=r[o];r[o]=s===void 0?i:s}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=eke(t,n),r._sortErrors=P7(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return e0(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=Vc.getter(t,!0);return this.transform(i=>{if(!i)return i;let s=i;return tke(i,t)&&(s=Object.assign({},i),r||delete s[t],s[n]=o(i)),s})}json(){return this.transform(T7)}noUnknown(t=!0,n=UA.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=nke(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=UA.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(J_.camelCase)}snakeCase(){return this.transformKeys(J_.snakeCase)}constantCase(){return this.transformKeys(t=>J_.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,s]of Object.entries(n.fields)){var o;let a=t;
3636(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),r.fields[i]=s.describe(a)}return r}}RO.prototype=R7.prototype;function oke(e){return new O7(e)}class O7 extends ts{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((s,a)=>{const l=this.innerType.cast(s,Object.assign({},n,{path:`${n.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let s=this.innerType,a=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,u)=>{var c;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let d=new Array(u.length);for(let h=0;h<u.length;h++){var f;d[h]=s.asNestedTest({options:n,index:h,parent:u,parentPath:n.path,originalParent:(f=n.originalValue)!=null?f:t})}this.runTests({value:u,tests:d,originalValue:(c=n.originalValue)!=null?c:t,options:n},r,h=>o(h.concat(l),u))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(T7)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Wx(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ul(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=Zb.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||Zb.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||Zb.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}oke.prototype=O7.prototype;var QN=function(e,t,n){if(e&&"reportValidity"in e){var r=Ne(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},M7=function(e,t){var n=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?QN(i.ref,o,e):i.refs&&i.refs.forEach(function(s){return QN(s,o,e)})};for(var r in t.fields)n(r)},ike=function(e,t){t.shouldUseNativeValidation&&M7(e,t);var n={};for(var r in e){var o=Ne(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(ske(t.names||Object.keys(e),r)){var s=Object.assign({},Ne(n,r));Ht(s,"root",i),Ht(n,r,s)}else Ht(n,r,i)}return n},ske=function(e,t){return e.some(function(n){return n.startsWith(t+".")})};function D7(e,t,n){return t===void 0&&(t={}),n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve(function(s,a){try{var l=(t.context,Promise.resolve(e[n.mode==="sync"?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:o}))).then(function(u){return i.shouldUseNativeValidation&&M7({},i),{values:n.raw?r:u,errors:{}}}))}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:ike((a=s,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,c){if(u[c.path]||(u[c.path]={message:c.message,type:c.type}),l){var d=u[c.path].types,f=d&&d[c.type];u[c.path]=JW(c.path,l,u,c.type,f?[].concat(f,c.message):c.message)}return u},{})),i)};var a,l}))}catch(s){return Promise.reject(s)}}}const ake=gge({reducer:{auth:iIe.reducer}}),nv=()=>Ome(),lke=RO({email:Hw().email().required(),password:Hw().min(5).max(255).trim().required()}).required(),uke=({})=>{const e=Hh("(prefers-color-scheme: dark)"),t=nv(),n=La({defaultValues:{email:"",password:""}}),r=td(aIe),{watch:o,formState:i}=n;return J(Ft,{children:[I(pi,{component:"main",maxWidth:"md",sx:{justifyContent:"center",display:"flex",marginTop:4},children:I("img",{src:`/logos/${e?"open-planner-light.svg":"open-planner.svg"}`,alt:"OpenPlanner logo",height:"200px"})}
3636),I(pi,{maxWidth:"xs",sx:{display:"flex",justifyContent:"center",marginTop:1},children:I(Mu,{href:"/features",children:"New here? Discover what OpenPlanner can do →"})}),I(pi,{component:"main",maxWidth:"xs",children:I(Ol,{formContext:n,resolver:D7(lke),onSuccess:async s=>{await t(DA({email:s.email,password:s.password}))},children:J(Me,{sx:{marginTop:4,display:"flex",flexDirection:"column",alignItems:"center"},children:[I(Ae,{component:"h1",variant:"h5",children:"Sign in"}),I(Ae,{component:"p",variant:"body1",children:"Use a single account per event or organization as OpenPlanner don't have a role system yet."}),I(it,{margin:"normal",required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,disabled:i.isSubmitting,sx:{mt:6}}),I(it,{margin:"normal",required:!0,fullWidth:!0,name:"password",label:"Password",type:"password",id:"password",autoComplete:"current-password",disabled:i.isSubmitting}),I(xi,{type:"submit",disabled:i.isSubmitting,loading:i.isSubmitting,fullWidth:!0,variant:"contained",sx:{mt:3,mb:2},children:"Sign In (or sign up)"}),r&&(r==null?void 0:r.error)==="auth/user-not-found"&&J(Me,{display:"flex",flexDirection:"column",mb:2,color:"red",children:[I(Ae,{children:"No user found matching this email, do you want to signup now using this email and password?"}),I(xi,{title:"Sign up",disabled:i.isSubmitting,loading:i.isSubmitting,onClick:()=>{const s=o("email"),a=o("password");t(Xb({email:s,password:a}))},variant:"outlined",color:"secondary",children:"Sign up now"})]}),r&&(r==null?void 0:r.error)!=="auth/user-not-found"&&I(Me,{display:"flex",flexDirection:"column",mb:2,color:"red",children:I(Ae,{children:`Error: ${r==null?void 0:r.error}, ${r==null?void 0:r.message}`})}),I(Ye,{container:!0,children:I(Ye,{item:!0,xs:!0,children:I(Mu,{href:"/auth/reset",variant:"body2",children:"Forgot password?"})})})]})})})]})},cke=({})=>I(uke,{}),dke=({children:e})=>{const t=nv(),n=td(sIe),[r,o]=m.useState(!1);return m.useEffect(()=>t(rIe(()=>{o(!0)})),[]),r?n?I(Ft,{children:e}):I(cke,{}):I(Me,{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"80vh",children:I(Qn,{})})},fke=jU,t0=m.forwardRef((e,t)=>{const{href:n,...r}=e;return I(fke,{ref:t,to:n,...r,asChild:!1})}),hke=e=>{const t=kl(),[n]=Da(),r=`${t.base}${e.base}`;return n.startsWith(r)?I(BU,{base:r,children:e.children},r):null};var pke=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,i){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var s in r)n.d(i,s,(function(a){return r[a]}).bind(null,s));return i},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=2)}([function(e,t){e.exports=qj},function(e,t){e.exports=m},function(e,t,n){n.r(t);var r=n(1),o=n(0),i=function(){return(i=Object.assign||function(p){for(var g,b=1,y=arguments.length;b<y;b++)for(var v in g=arguments[b])Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v]);return p}).apply(this,arguments)},s=function(p,g){var b={};for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&g.indexOf(y)<0&&(b[y]=p[y]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(y=Object.getOwnPropertySymbols(p);v<y.length;v++)g.indexOf(y[v])<0&&Object.prototype.propertyIsEnumerable.call(p,y[v])&&(b[y[v]]=p[y[v]])}return b},a=0,l=r.forwardRef(function(p,g){var b=p.title,y=b===void 0?null:b,v=p.description,w=v===void 0?null:v,C=p.size,A=C===void 0?null:C,S=p.color,_=S===void 0?"currentColor":S,k=p.horizontal,M=k===void 0?null:k,R=p.vertical,O=R===void 0?null:R,F=p.rotate,N=F===void 0?null:F,V=p.spin,$=V===void 0?null:V,D=p.style,L=D===void 0?{}:D,P=p.children,B=s(p,["title","description","size","color","horizontal","vertical","rotate","spin","style","children"]);a++;var E,z=$!==null&&$,H=r.Children.map(P,function(ee){var Y=ee;z!==!0&&(z=($===null?Y.props.spin:$)===!0);var se=Y.props.size;typeof A=="number"&&typeof Y.props.size=="number"&&(se=Y.props.size/A);var fe={size:se,color:_===null?Y.props.color:_,horizontal:M===null?Y.props.horizontal:M,vertical:O===null?Y.props.vertical:O,rotate:N===null?Y.props.rotate:N,spin:$===null?Y.props.spin:$,inStack:!0};return r.cloneElement(Y,fe)});A!==null&&(L.width=typeof A=="string"?A:1.5*A+"rem");var j,G="stack_labelledby_"+a,Q="stack_describedby_"+a;if(y)E=w?G+" "+Q:G;else if(j="presentation",w)throw new Error("title attribute required when description is set");return r.createElement("svg",i({ref:g,viewBox:"0 0 24 24",style:L,role:j,"aria-labelledby":E},B),y&&r.createElement("title",{id:G},y),w&&r.createElement("desc",{id:Q},w),z&&r.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }","@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"),H)});l.displayName="Stack",l.propTypes={size:o.oneOfType([o.number,o.string]),color:o.string,horizontal:o.bool,vertical:o.bool,rotate:o.number,spin:o.oneOfType([o.bool,o.number]),children:o.oneOfType([o.arrayOf(o.node),o.node]).isRequired,className:o.string,
3636style:o.object},l.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var u=l;n.d(t,"Icon",function(){return h}),n.d(t,"Stack",function(){return u});var c=function(){return(c=Object.assign||function(p){for(var g,b=1,y=arguments.length;b<y;b++)for(var v in g=arguments[b])Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v]);return p}).apply(this,arguments)},d=function(p,g){var b={};for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&g.indexOf(y)<0&&(b[y]=p[y]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(y=Object.getOwnPropertySymbols(p);v<y.length;v++)g.indexOf(y[v])<0&&Object.prototype.propertyIsEnumerable.call(p,y[v])&&(b[y[v]]=p[y[v]])}return b},f=0,h=r.forwardRef(function(p,g){var b=p.path,y=p.id,v=y===void 0?++f:y,w=p.title,C=w===void 0?null:w,A=p.description,S=A===void 0?null:A,_=p.size,k=_===void 0?null:_,M=p.color,R=M===void 0?"currentColor":M,O=p.horizontal,F=O!==void 0&&O,N=p.vertical,V=N!==void 0&&N,$=p.rotate,D=$===void 0?0:$,L=p.spin,P=L!==void 0&&L,B=p.style,E=B===void 0?{}:B,z=p.inStack,H=z!==void 0&&z,j=d(p,["path","id","title","description","size","color","horizontal","vertical","rotate","spin","style","inStack"]),G={},Q=[];k!==null&&(H?Q.push("scale("+k+")"):(E.width=typeof k=="string"?k:1.5*k+"rem",E.height=E.width)),F&&Q.push("scaleX(-1)"),V&&Q.push("scaleY(-1)"),D!==0&&Q.push("rotate("+D+"deg)"),R!==null&&(G.fill=R);var ee=r.createElement("path",c({d:b,style:G},H?j:{})),Y=ee;Q.length>0&&(E.transform=Q.join(" "),E.transformOrigin="center",H&&(Y=r.createElement("g",{style:E},ee,r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))));var se,fe=Y,ve=P===!0||typeof P!="number"?2:P,oe=!H&&(F||V);if(ve<0&&(oe=!oe),P&&(fe=r.createElement("g",{style:{animation:"spin"+(oe?"-inverse":"")+" linear "+Math.abs(ve)+"s infinite",transformOrigin:"center"}},Y,!(F||V||D!==0)&&r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))),H)return fe;var ye,we="icon_labelledby_"+v,me="icon_describedby_"+v;if(C)se=S?we+" "+me:we;else if(ye="presentation",S)throw new Error("title attribute required when description is set");return r.createElement("svg",c({ref:g,viewBox:"0 0 24 24",style:E,role:ye,"aria-labelledby":se},j),C&&r.createElement("title",{id:we},C),S&&r.createElement("desc",{id:me},S),!H&&P&&(oe?r.createElement("style",null,"@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"):r.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }")),fe)});h.displayName="Icon",h.propTypes={path:o.string.isRequired,size:o.oneOfType([o.number,o.string]),color:o.string,horizontal:o.bool,vertical:o.bool,rotate:o.number,spin:o.oneOfType([o.bool,o.number]),style:o.object,inStack:o.bool,className:o.string},h.defaultProps={size:null,color:"currentColor",horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=h}]),mke="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z",gke="M9,5A4,4 0 0,1 13,9A4,4 0 0,1 9,13A4,4 0 0,1 5,9A4,4 0 0,1 9,5M9,15C11.67,15 17,16.34 17,19V21H1V19C1,16.34 6.33,15 9,15M16.76,5.36C18.78,7.56 18.78,10.61 16.76,12.63L15.08,10.94C15.92,9.76 15.92,8.23 15.08,7.05L16.76,5.36M20.07,2C24,6.05 23.97,12.11 20.07,16L18.44,14.37C21.21,11.19 21.21,6.65 18.44,3.63L20.07,2Z",yke="M7 7H5A2 2 0 0 0 3 9V17H5V13H7V17H9V9A2 2 0 0 0 7 7M7 11H5V9H7M14 7H10V17H12V13H14A2 2 0 0 0 16 11V9A2 2 0 0 0 14 7M14 11H12V9H14M20 9V15H21V17H17V15H18V9H17V7H21V9Z",vke="M19 19V8H5V19H19M16 1H18V3H19C20.11 3 21 3.9 21 5V19C21 20.11 20.11 21 19 21H5C3.9 21 3 20.11 3 19V5C3 3.9 3.9 3 5 3H6V1H8V3H16V1M7 17V10H9V17H7M15 10H17V17H15V10Z",bke="M5,6H23V18H5V6M14,9A3,3 0 0,1 17,12A3,3 0 0,1 14,15A3,3 0 0,1 11,12A3,3 0 0,1 14,9M9,8A2,2 0 0,1 7,10V14A2,2 0 0,1 9,16H19A2,2 0 0,1 21,14V10A2,2 0 0,1 19,8H9M1,10H3V20H19V22H1V10Z",wke="M17.25,12C17.25,12.23 17.23,12.46 17.2,12.68L18.68,13.84C18.81,13.95 18.85,14.13 18.76,14.29L17.36,16.71C17.27,16.86 17.09,16.92 16.93,16.86L15.19,16.16C14.83,16.44 14.43,16.67 14,16.85L13.75,18.7C13.72,18.87 13.57,19 13.4,19H10.6C10.43,19 10.28,18.87 10.25,18.7L10,16.85C9.56,16.67 9.17,16.44 8.81,16.16L7.07,16.86C6.91,16.92 6.73,16.86 6.64,16.71L5.24,14.29C5.15,14.13 5.19,13.95 5.32,13.84L6.8,12.68C6.77,12.46 6.75,12.23 6.75,12C6.75,11.77 6.77,11.54 6.8,11.32L5.32,10.16C5.19,10.05 5.15,9.86 5.24,9.71L6.64,7.29C6.73,7.13 6.91,7.07 7.07,7.13L8.81,7.84C9.17,7.56 9.56,7.32 10,7.15L10.25,5.29C10.28,5.13 10.43,5 10.6,5H13.4C13.57,5 13.72,5.13 13.75,5.29L14,7.15C14.43,7.32 14.83,7.56 15.19,7.84L16.93,7.13C17.09,7.07 17.27,7.13 17.36,7.29L18.76,9.71C18.85,9.86 18.81,10.05 18.68,10.16L17.2,11.32C17.23,11.54 17.25,11.77 17.25,12M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M12,10C10.89,10 10,10.89 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12C14,10.89 13.1,10 12,10Z",Cke="M17.9,17.39C17.64,16.59 16.89,16 16,16H15V13A1,1 0 0,0 14,12H8V10H10A1,1 0 0,0 11,9V7H13A2,2 0 0,0 15,5V4.59C17.93,5.77 20,8.64 20,12C20,14.08 19.2,15.97 17.9,17.39M11,19.93C7.05,19.44 4,16.08 4,12C4,11.38 4.08,10.78 4.21,10.21L9,15V16A2,2 0 0,0 11,18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",xke="M18,15H6L2,19V3A1,1 0 0,1 3,2H18A1,1 0 0,1 19,3V14A1,1 0 0,1 18,15M23,9V23L19,19H8A1,1 0 0,1 7,18V17H21V8H22A1,1 0 0,1 23,9M8.19,4C7.32,4 6.62,4.2 6.08,4.59C5.56,5 5.3,5.57 5.31,6.36L5.32,6.39H7.25C7.26,6.09 7.35,5.86 7.53,5.7C7.71,5.55 7.93,5.47 8.19,5.47C8.5,5.47 8.76,5.57 8.94,5.75C9.12,5.94 9.2,6.2 9.2,6.5C9.2,6.82 9.13,7.09 8.97,7.32C8.83,7.55 8.62,7.75 8.36,7.91C7.85,8.25 7.5,8.55 7.31,8.82C7.11,9.08 7,9.5 7,10H9C9,9.69 9.04,9.44 9.13,9.26C9.22,9.08 9.39,8.9 9.64,8.74C10.09,8.5 10.46,8.21 10.75,7.81C11.04,7.41 11.19,7 11.19,6.5C11.19,5.74 10.92,5.13 10.38,4.68C9.85,4.23 9.12,4 8.19,4M7,11V13H9V11H7M13,13H15V11H13V13M13,4V10H15V4H13Z",Ske="M2,3H10A2,2 0 0,1 12,1A2,2 0 0,1 14,3H22V5H21V16H15.25L17,22H15L13.25,16H10.75L9,22H7L8.75,16H3V5H2V3M5,5V14H19V5H5Z",_ke="M15.58,16.8L12,14.5L8.42,16.8L9.5,12.68L6.21,10L10.46,9.74L12,5.8L13.54,9.74L17.79,10L14.5,12.68M20,12C20,10.89 20.9,10 22,10V6C22,4.89 21.1,4 20,4H4A2,2 0 0,0 2,6V10C3.11,10 4,10.9 4,12A2,2 0 0,1 2,14V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V14A2,2 0 0,1 20,12Z",Eke="M19 6V5A2 2 0 0 0 17 3H15A2 2 0 0 0 13 5V6H11V5A2 2 0 0 0 9 3H7A2 2 0 0 0 5 5V6H3V20H21V6M19 18H5V8H19Z",Ike="M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 3,4.79C2.63,5.42 2.42,6.16 2.42,6.94C2.42,8.43 3.17,9.75 4.33,10.5C3.62,10.5 2.96,10.3 2.38,10C2.38,10 2.38,10 2.38,10.03C2.38,12.11 3.86,13.85 5.82,14.24C5.46,14.34 5.08,14.39 4.69,14.39C4.42,14.39 4.15,14.36 3.89,14.31C4.43,16 6,17.26 7.89,17.29C6.43,18.45 4.58,19.13 2.56,19.13C2.22,19.13 1.88,19.11 1.54,19.07C3.44,20.29 5.7,21 8.12,21C16,21 20.33,14.46 20.33,8.79C20.33,8.6 20.33,8.42 20.32,8.23C21.16,7.63 21.88,6.87 22.46,6Z";const Ake=({children:e,href:t})=>{const[n]=Eg(t);return I(tce,{selected:n,href:t,component:t0,children:e})},$7=[{href:"/sponsors",icon:bke,name:"Sponsors"},{href:"/team",icon:mke,name:"Team"},{href:"/faq",icon:xke,name:"FAQ"},{href:"/blocks",icon:Eke,name:"Blocks"},{href:"/sessions",icon:Ske,name:"Sessions"},{href:"/speakers",icon:gke,name:"Speakers"},{href:"/schedule",icon:vke,name:"Schedule"},{href:"/tickets",icon:_ke,name:"Tickets"},{href:"/social",icon:Ike,name:"Social"},{href:"/settings",icon:wke,name:"Settings"},{href:"/public",icon:Cke,name:"Public"},{href:"/api",icon:yke,name:"Integration & API"}],kke=()=>(td(yO),I(Ft,{children:$7.map(e=>J(Ake,{href:e.href,children:[I(pa,{children:I(pke.Icon,{path:e.icon,size:1})}),I(mi,{primary:e.name})]},e.href))}));var OO={},Pke=Na;
3636Object.defineProperty(OO,"__esModule",{value:!0});var F7=OO.default=void 0,Tke=Pke(Va()),Rke=T;F7=OO.default=(0,Tke.default)((0,Rke.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");var MO={},Oke=Na;Object.defineProperty(MO,"__esModule",{value:!0});var L7=MO.default=void 0,Mke=Oke(Va()),Dke=T;L7=MO.default=(0,Mke.default)((0,Dke.jsx)("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H6l-2 2V4h16z"}),"ChatBubbleOutline");const $ke=m.forwardRef(function(t,n){return I(so,{ref:n,variant:"filled",...t})}),Fke=({message:e,type:t,handleClose:n,...r})=>I(Vfe,{anchorOrigin:{vertical:"bottom",horizontal:"center"},onClose:n,TransitionComponent:vh,...r,children:I($ke,{severity:t??"info",sx:{width:"100%"},onClose:n,children:e})});let hb;const Lke=new Uint8Array(16);function Nke(){if(!hb&&(hb=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!hb))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return hb(Lke)}const kr=[];for(let e=0;e<256;++e)kr.push((e+256).toString(16).slice(1));function Vke(e,t=0){return kr[e[t+0]]+kr[e[t+1]]+kr[e[t+2]]+kr[e[t+3]]+"-"+kr[e[t+4]]+kr[e[t+5]]+"-"+kr[e[t+6]]+kr[e[t+7]]+"-"+kr[e[t+8]]+kr[e[t+9]]+"-"+kr[e[t+10]]+kr[e[t+11]]+kr[e[t+12]]+kr[e[t+13]]+kr[e[t+14]]+kr[e[t+15]]}const Bke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),YN={randomUUID:Bke};function DO(e,t,n){if(YN.randomUUID&&!t&&!e)return YN.randomUUID();e=e||{};const r=e.random||(e.rng||Nke)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return Vke(r)}const jke=3e3,N7=m.createContext({createNotification:()=>{}}),zke=({children:e})=>{const[t,n]=m.useState([]),r=m.useCallback((s,a)=>n(l=>[...l,{id:DO(),message:s,type:a==null?void 0:a.type,dismissDelay:a==null?void 0:a.dismissDelay}]),[]),o=m.useMemo(()=>({createNotification:r}),[r]),i=s=>{n(a=>a.filter(l=>l.id!==s))};return J(N7.Provider,{value:o,children:[e,t.map((s,a)=>I(Fke,{type:s.type,open:t.findIndex(l=>l.id==s.id)!==-1,onClose:()=>i(s.id),message:s.message,autoHideDuration:s.dismissDelay??jke,handleClose:()=>i(s.id)},a))]})},pp=()=>m.useContext(N7),$O=(e=48)=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let r=0;r<e;r++)n+=t.charAt(Math.floor(Math.random()*t.length));return"op_"+n};async function V7(e,t){if(!e.apiKey){const n=$O();return await tO(t,{apiKey:n}),n}return e.apiKey}const Uke=e=>{const t=jr(cn.events,e.id),n=m.useCallback(async()=>V7(e,t),[e,t]);return m.useEffect(()=>{e.apiKey||n()},[e.apiKey,n]),{ensureApiKey:n}},cl="https://api.openplanner.fr",Hke="https://europe-west1-conferencecenterr.cloudfunctions.net/api",Wke="https://storage.googleapis.com/open-sponsor.firebasestorage.app/scopes/Ogh97t2FZ7xzsGp6N3ro/projects/openplanner.json",WUe="https://captcha.openplanner.fr/9f288c55f9/";async function B7(e,t,n={method:"GET"}){if(!e.apiKey)throw new Error("No API key provided");const r=new URL(cl);if(r.pathname+=`v1/${e.id}/${t}`,r.searchParams.append("apiKey",e.apiKey),n.query)for(const[s,a]of Object.entries(n.query))a!=null&&r.searchParams.append(s,String(a));const o={method:n.method};n.body&&n.method!=="GET"&&(o.headers={"Content-Type":"application/json"},o.body=JSON.stringify(n.body));const i=await fetch(r.href,o);if(!i.ok){const s=await i.clone().json().then(a=>a&&typeof a.error=="string"?a.error:null).catch(()=>null);throw new Error(s||`Failed to fetch from ${t}`)}return await i.json()}const Gke=(e,t,n={method:"GET"})=>{const[r,o]=m.useState(null),[i,s]=m.useState(!1),[a,l]=m.useState(null),u=async()=>{if(e.apiKey){s(!0),l(null);try{const c=await B7(e,t,n);o(c)}catch(c){l(c instanceof Error?c.message:"An error occurred"),console.error(`Error fetching from ${t}:`,c)}finally{s(!1)}}};return m.useEffect(()=>{u()},[e.apiKey,e.id,t,n.method,JSON.stringify(n.body)]),{data:r,isLoading:i,error:a,refetch:u}},qke=async(e,t)=>{try{await V7(e,jr(cn.events,e.id));const n=await B7(e,"deploy",{method:"POST"});n.warnings&&n.warnings.length>0?t(`APIs and webhooks triggered, with warnings: ${n.warnings.join(", ")}`,{type:"warning",dismissDelay:1e4}):t("APIs and webhooks triggered",{type:"success"})}
3636catch(n){console.error(n),t("Failed to update... "+String(n),{type:"error"})}},Ml=(e,t=!1)=>{const[n,r]=m.useState(!0),[o,i]=m.useState(""),[s,a]=m.useState(),l=o!=="",u=d=>{a(d.docs.map(f=>({id:f.id,...f.data()})))},c=m.useCallback(()=>{r(!0);let d=()=>{};try{t?d=A9(e,f=>{u(f),r(!1)},f=>{i(f.message),r(!1)}):wxe(e).then(f=>{u(f)}).catch(f=>{r(!1),i(f.message)}).finally(()=>{r(!1)})}catch(f){i(f.message)}return d},[]);return m.useEffect(()=>c(),[c]),{isLoading:n,load:c,error:o,isError:l,data:s||null,loaded:s!==void 0}},FO=(e,t=!1)=>{const[n,r]=m.useState(!0),[o,i]=m.useState(""),[s,a]=m.useState(),l=o!=="",u=d=>{const f=d.data();f!==void 0&&a({id:d.id,...f})},c=m.useCallback(()=>{r(!0);let d=()=>{};try{t?d=A9(e,f=>{u(f),r(!1)},f=>{i(f.message),r(!1)}):bxe(e).then(f=>{u(f)}).catch(f=>{i(f.message)}).finally(()=>{r(!1)})}catch(f){i(f.message)}return d},[e.path]);return m.useEffect(()=>c(),[e.path]),{isLoading:n,load:c,error:o,isError:l,data:s||null,loaded:s!==void 0}},Kke=e=>{const t=[];return t.push(S9("members","array-contains",e)),Ml(qy(cn.events,...t),!0)},j7=Ze(T.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),mp=Ze(T.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),Qke=Ze(T.jsx("path",{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4"}),"Build"),z7=Ze(T.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),Yke=Ze(T.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),Xke=Ze(T.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Jke=Ze(T.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"Crop"),U7=Ze(T.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Gx=Ze(T.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),XN=Ze(T.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),H7=Ze(T.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Zke=Ze(T.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"}),"HomeOutlined"),ePe=Ze(T.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),tPe=Ze(T.jsx("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout"),W7=Ze(T.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew"),nPe=Ze(T.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),rPe=Ze(T.jsx("path",{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02z"}),"Phone"),Z_=Ze([T.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),T.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"Schedule"),oPe=Ze(T.jsx("path",{d:"M14 2H6.01c-1.1 0-2 .89-2 2L4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8zm-1 7V3.5L18.5 9zm1 5 2-1.06v4.12L14 16v1c0 .55-.45 1-1 1H9c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h4c.55 0 1 .45 1 1z"}),"VideoFile"),iPe=he(vd)(({theme:e})=>({"& .MuiInputBase-input":{borderRadius:4,position:"relative",backgroundColor:e.palette.background.paper,border:"none",fontSize:16,padding:"10px 26px 10px 12px"}})),JN="home",ZN="logout",sPe=({event:e})=>{const t=nv(),n=td(BW),r=Kke(n),o=td(yO),i=s=>{if(s===JN)window.history.pushState({},"","/");else if(s===ZN)t(gO());else{const a=window.location.pathname,l=a.substring(a.indexOf(e.id)+e.id.length);window.history.pushState({},"",`/events/${s}${l}`)}};return!r.data||r.isLoading?null:I(Al,{sx:{flex:1},size:"small",children:J(Cy,{labelId:"event-select-label",id:"event-select",value:e.id,label:"Event",input:I(iPe,{}),onChange:s=>i(s.target.value),children:[r.data.map(s=>I(io,{value:s.id,children:s.name},s.id)),I(Sg,{}),J(io,{value:JN,children:[I(pa,{children:I(Zke,{fontSize:"small"})}),I(mi,{children:"Home"})]}),I(Sg,{}),J(io,{disabled:!0,children:[I(pa,{children:I(by,{src:o==null?void 0:o.avatarURL,sx:{width:24,height:24}})}),I(mi,{children:o==null?void 0:o.displayName})]}),J(io,{value:ZN,children:[I(pa,{children:I(tPe,{fontSize:"small"})}),I(mi,{children:"Logout"})]})]})})};var LO={};(function e(t,n,r,o){var i=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var E=new OffscreenCanvas(1,1),z=E.getContext("2d");z.fillRect(0,0,1,1);var H=E.transferToImageBitmap();try{z.createPattern(H,"no-repeat")}catch{return!1}return!0}();function l(){}function u(E){var z=n.exports.Promise,H=z!==void 0?z:t.Promise;return typeof H=="function"?new H(E):(E(l,l),null)}var c=function(E,z){return{transform:function(H){if(E)return H;if(z.has(H))return z.get(H);var j=new OffscreenCanvas(H.width,H.height),G=j.getContext("2d");return G.drawImage(H,0,0),z.set(H,j),j},clear:function(){z.clear()}}}
vendor: 4,793 bytes, lines 3636-3637
3636(a,new Map),d=function(){var E=Math.floor(16.666666666666668),z,H,j={},G=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(z=function(Q){var ee=Math.random();return j[ee]=requestAnimationFrame(function Y(se){G===se||G+E-1<se?(G=se,delete j[ee],Q()):j[ee]=requestAnimationFrame(Y)}),ee},H=function(Q){j[Q]&&cancelAnimationFrame(j[Q])}):(z=function(Q){return setTimeout(Q,E)},H=function(Q){return clearTimeout(Q)}),{frame:z,cancel:H}}(),f=function(){var E,z,H={};function j(G){function Q(ee,Y){G.postMessage({options:ee||{},callback:Y})}G.init=function(Y){var se=Y.transferControlToOffscreen();G.postMessage({canvas:se},[se])},G.fire=function(Y,se,fe){if(z)return Q(Y,null),z;var ve=Math.random().toString(36).slice(2);return z=u(function(oe){function ye(we){we.data.callback===ve&&(delete H[ve],G.removeEventListener("message",ye),z=null,c.clear(),fe(),oe())}G.addEventListener("message",ye),Q(Y,ve),H[ve]=ye.bind(null,{data:{callback:ve}})}),z},G.reset=function(){G.postMessage({reset:!0});for(var Y in H)H[Y](),delete H[Y]}}return function(){if(E)return E;if(!r&&i){var G=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {","  if (msg.data.options) {","    CONFETTI(msg.data.options).then(function () {","      if (msg.data.callback) {","        postMessage({ callback: msg.data.callback });","      }","    });","  } else if (msg.data.reset) {","    CONFETTI && CONFETTI.reset();","  } else if (msg.data.resize) {","    SIZE.width = msg.data.resize.width;","    SIZE.height = msg.data.resize.height;","  } else if (msg.data.canvas) {","    SIZE.width = msg.data.canvas.width;","    SIZE.height = msg.data.canvas.height;","    CONFETTI = module.exports.create(msg.data.canvas);","  }","}"].join(`
3637`);try{E=new Worker(URL.createObjectURL(new Blob([G])))}catch(Q){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",Q),null}j(E)}return E}}(),h={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function p(E,z){return z?z(E):E}function g(E){return E!=null}function b(E,z,H){return p(E&&g(E[z])?E[z]:h[z],H)}function y(E){return E<0?0:Math.floor(E)}function v(E,z){return Math.floor(Math.random()*(z-E))+E}function w(E){return parseInt(E,16)}function C(E){return E.map(A)}function A(E){var z=String(E).replace(/[^0-9a-f]/gi,"");return z.length<6&&(z=z[0]+z[0]+z[1]+z[1]+z[2]+z[2]),{r:w(z.substring(0,2)),g:w(z.substring(2,4)),b:w(z.substring(4,6))}}function S(E){var z=b(E,"origin",Object);return z.x=b(z,"x",Number),z.y=b(z,"y",Number),z}function _(E){E.width=document.documentElement.clientWidth,E.height=document.documentElement.clientHeight}function k(E){var z=E.getBoundingClientRect();E.width=z.width,E.height=z.height}function M(E){var z=document.createElement("canvas");return z.style.position="fixed",z.style.top="0px",z.style.left="0px",z.style.pointerEvents="none",z.style.zIndex=E,z}function R(E,z,H,j,G,Q,ee,Y,se){E.save(),E.translate(z,H),E.rotate(Q),E.scale(j,G),E.arc(0,0,1,ee,Y,se),E.restore()}function O(E){var z=E.angle*(Math.PI/180),H=E.spread*(Math.PI/180);return{x:E.x,y:E.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:E.startVelocity*.5+Math.random()*E.startVelocity,angle2D:-z+(.5*H-Math.random()*H),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:E.color,shape:E.shape,tick:0,totalTicks:E.ticks,decay:E.decay,drift:E.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:E.gravity*3,ovalScalar:.6,scalar:E.scalar,flat:E.flat}}function F(E,z){z.x+=Math.cos(z.angle2D)*z.velocity+z.drift,z.y+=Math.sin(z.angle2D)*z.velocity+z.gravity,z.velocity*=z.decay,z.flat?(z.wobble=0,z.wobbleX=z.x+10*z.scalar,z.wobbleY=z.y+10*z.scalar,z.tiltSin=0,z.tiltCos=0,z.random=1):(z.wobble+=z.wobbleSpeed,z.wobbleX=z.x+10*z.scalar*Math.cos(z.wobble),z.wobbleY=z.y+10*z.scalar*Math.sin(z.wobble),z.tiltAngle+=.1,z.tiltSin=Math.sin(z.tiltAngle),z.tiltCos=Math.cos(z.tiltAngle),z.random=Math.random()+2);var H=z.tick++/z.totalTicks,j=z.x+z.random*z.tiltCos,G=z.y+z.random*z.tiltSin,Q=z.wobbleX+z.random*z.tiltCos,ee=z.wobbleY+z.random*z.tiltSin;if(E.fillStyle="rgba("+z.color.r+", "+z.color.g+", "+z.color.b+", "+(1-H)+")",E.beginPath(),s&&z.shape.type==="path"&&typeof z.shape.path=="string"&&Array.isArray(z.shape.matrix))E.fill(L(z.shape.path,z.shape.matrix,z.x,z.y,Math.abs(Q-j)*.1,Math.abs(ee-G)*.1,Math.PI/10*z.wobble));else if(z.shape.type==="bitmap"){var Y=Math.PI/10*z.wobble,se=Math.abs(Q-j)*.1,fe=Math.abs(ee-G)*.1,ve=z.shape.bitmap.width*z.scalar,oe
3637=z.shape.bitmap.height*z.scalar,ye=new DOMMatrix([Math.cos(Y)*se,Math.sin(Y)*se,-Math.sin(Y)*fe,Math.cos(Y)*fe,z.x,z.y]);ye.multiplySelf(new DOMMatrix(z.shape.matrix));var we=E.createPattern(c.transform(z.shape.bitmap),"no-repeat");we.setTransform(ye),E.globalAlpha=1-H,E.fillStyle=we,E.fillRect(z.x-ve/2,z.y-oe/2,ve,oe),E.globalAlpha=1}else if(z.shape==="circle")E.ellipse?E.ellipse(z.x,z.y,Math.abs(Q-j)*z.ovalScalar,Math.abs(ee-G)*z.ovalScalar,Math.PI/10*z.wobble,0,2*Math.PI):R(E,z.x,z.y,Math.abs(Q-j)*z.ovalScalar,Math.abs(ee-G)*z.ovalScalar,Math.PI/10*z.wobble,0,2*Math.PI);else if(z.shape==="star")for(var me=Math.PI/2*3,be=4*z.scalar,ie=8*z.scalar,pe=z.x,U=z.y,q=5,K=Math.PI/q;q--;)pe=z.x+Math.cos(me)*ie,U=z.y+Math.sin(me)*ie,E.lineTo(pe,U),me+=K,pe=z.x+Math.cos(me)*be,U=z.y+Math.sin(me)*be,E.lineTo(pe,U),me+=K;else E.moveTo(Math.floor(z.x),Math.floor(z.y)),E.lineTo(Math.floor(z.wobbleX),Math.floor(G)),E.lineTo(Math.floor(Q),Math.floor(ee)),E.lineTo(Math.floor(j),Math.floor(z.wobbleY));return E.closePath(),E.fill(),z.tick<z.totalTicks}function N(E,z,H,j,G){var Q=z.slice(),ee=E.getContext("2d"),Y,se,fe=u(function(ve){function oe(){Y=se=null,ee.clearRect(0,0,j.width,j.height),c.clear(),G(),ve()}function ye(){r&&!(j.width===o.width&&j.height===o.height)&&(j.width=E.width=o.width,j.height=E.height=o.height),!j.width&&!j.height&&(H(E),j.width=E.width,j.height=E.height),ee.clearRect(0,0,j.width,j.height),Q=Q.filter(function(we){return F(ee,we)}),Q.length?Y=d.frame(ye):oe()}Y=d.frame(ye),se=oe});return{addFettis:function(ve){return Q=Q.concat(ve),fe},canvas:E,promise:fe,reset:function(){Y&&d.cancel(Y),se&&se()}}}function V(E,z){var H=!E,j=!!b(z||{},"resize"),G=!1,Q=b(z,"disableForReducedMotion",Boolean),ee=i&&!!b(z||{},"useWorker"),Y=ee?f():null,se=H?_:k,fe=E&&Y?!!E.__confetti_initialized:!1,ve=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,oe;function ye(me,be,ie){for(var pe=b(me,"particleCount",y),U=b(me,"angle",Number),q=b(me,"spread",Number),K=b(me,"startVelocity",Number),ae=b(me,"decay",Number),ue=b(me,"gravity",Number),Z=b(me,"drift",Number),X=b(me,"colors",C),W=b(me,"ticks",Number),le=b(me,"shapes"),_e=b(me,"scalar"),ne=!!b(me,"flat"),te=S(me),ke=pe,Ve=[],Fe=E.width*te.x,Ie=E.height*te.y;ke--;)Ve.push(O({x:Fe,y:Ie,angle:U,spread:q,startVelocity:K,color:X[ke%X.length],shape:le[v(0,le.length)],ticks:W,decay:ae,gravity:ue,drift:Z,scalar:_e,flat:ne}));return oe?oe.addFettis(Ve):(oe=N(E,Ve,se,be,ie),oe.promise)}function we(me){var be=Q||b(me,"disableForReducedMotion",Boolean),ie=b(me,"zIndex",Number);if(be&&ve)return u(function(K){K()});H&&oe?E=oe.canvas:H&&!E&&(E=M(ie),document.body.appendChild(E)),j&&!fe&&se(E);var pe={width:E.width,height:E.height};Y&&!fe&&Y.init(E),fe=!0,Y&&(E.__confetti_initialized=!0);function U(){if(Y){var K={getBoundingClientRect:function(){if(!H)return E.getBoundingClientRect()}};se(K),Y.postMessage({resize:{width:K.width,height:K.height}});return}pe.width=pe.height=null}function q(){oe=null,j&&(G=!1,t.removeEventListener("resize",U)),H&&E&&(document.body.contains(E)&&document.body.removeChild(E),E=null,fe=!1)}return j&&!G&&(G=!0,t.addEventListener("resize",U,!1)),Y?Y.fire(me,pe,q):ye(me,pe,q)}return we.reset=function(){Y&&Y.reset(),oe&&oe.reset()},we}var $;function D(){return $||($=V(null,{useWorker:!0,resize:!0})),$}function L(E,z,H,j,G,Q,ee){var Y=new Path2D(E),se=new Path2D;se.addPath(Y,new DOMMatrix(z));var fe=new Path2D;return fe.addPath(se,new DOMMatrix([Math.cos(ee)*G,Math.sin(ee)*G,-Math.sin(ee)*Q,Math.cos(ee)*Q,H,j])),fe}function P(E){if(!s)throw new Error("path confetti are not supported in this browser");var z,H;typeof E=="string"?z=E:(z=E.path,H=E.matrix);var j=new Path2D(z),G=document.createElement("canvas"),Q=G.getContext("2d");if(!H){for(var ee=1e3,Y=ee,se=ee,fe=0,ve=0,oe,ye,we=0;we<ee;we+=2)for(var me=0;me<ee;me+=2)Q.isPointInPath(j,we,me,"nonzero")&&(Y=Math.min(Y,we),se=Math.min(se,me),fe=Math.max(fe,we),ve=Math.max(ve,me));oe=fe-Y,ye=ve-se;var be=10,ie=Math.min(be/oe,be/ye);H=[ie,0,0,ie,-Math.round(oe/2+Y)*ie,-Math.round(ye/2+se)*ie]}return{type:"path",path:z,matrix:H}}function B(E){var z,H=1,j="#000000",G='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof E=="string"?z=E:(z=E.text,H="scalar"in E?E.scalar:H,G="fontFamily"in E?E.fontFamily:G,j="color"in E?E.color:j);var Q=10*H,ee=""+Q+"px "+G,Y=new OffscreenCanvas(Q,Q),se=Y.getContext("2d");se.font=ee;var fe=se.measureText(z),ve=Math.ceil(fe.actualBoundingBoxRight+fe.actualBoundingBoxLeft),oe=Math.ceil(fe.actualBoundingBoxAscent+fe.actualBoundingBoxDescent),ye=2,we=fe.actualBoundingBoxLeft+ye,me=fe.actualBoundingBoxAscent+ye;ve+=ye+ye,oe+=ye+ye,Y=new OffscreenCanvas(ve,oe),se=Y.getContext("2d"),se.font=ee,se.fillStyle=j,se.fillText(z,we,me);var be=1/H;return{type:"bitmap",bitmap:Y.transferToImageBitmap(),matrix:[be,0,0,be,-ve*be/2,-oe*be/2]}}n.exports=function(){return D().apply(this,arguments)},n.exports.reset=function(){D().reset()},n.exports.create=V,n.exports.shapeFromPath=P,n.exports.shapeFromText=B})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),LO,!1);const aPe=LO.exports;LO.exports.create;const lPe=()=>{const[e,t]=m.useState([]);return m.useEffect(()=>{(async()=>{const o=await(await fetch(Wke)).json();t(o.sponsors||[])})().catch(console.error)},[]),e},uPe=()=>{const e=lPe();return J(Ft,{children:[I(Me,{display:"flex",alignItems:"center",sx:{backgroundImage:`url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%23555' stroke-width='3' stroke-dasharray='4%2c 8' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e")`,":hover":{filter:"brightness(150%)"}},borderRadius:2,padding:2,marginBottom:2,justifyContent:"center",color:"#999",component:"a",target:"_blank",href:"https://github.com/sponsors/HugoGresse",children:I(Ae,{children:"Become a sponsor"})}),I(Me,{display:"flex",alignItems:"center",gap:2,justifyContent:"space-evenly",children:e.map(t=>I(Me,{component:"a",href:t.website,target:"_blank",onClick:()=>{fetch(t.tracking)},sx:{":hover":{opacity:.4}},children:I("img",{src:t.logoDark||t.logo,alt:t.name,style:{height:30,borderRadius:5}})},t.name))})]})};var NO={},cPe=Na;
3637Object.defineProperty(NO,"__esModule",{value:!0});var G7=NO.default=void 0;hPe(m);var dPe=cPe(Va()),fPe=T;function q7(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(q7=function(r){return r?n:t})(e)}function hPe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=q7(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}G7=NO.default=(0,dPe.default)((0,fPe.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub");const K7="https://api.github.com",Q7=async(e,t)=>{const n={Accept:"application/vnd.github.v3+json"};t&&(n.Authorization=`token ${t}`);const r=await fetch(e,{headers:n});if(!r.ok)throw new Error(`GitHub API error: ${r.status} ${r.statusText}`);return r.json()},pPe=async(e,t,n,r)=>{try{const o=new URLSearchParams({per_page:"1"});n&&o.append("branch",n);const i=`${K7}/repos/${e}/${t}/actions/runs?${o.toString()}`,s=await Q7(i,r);return s.workflow_runs.length>0?s.workflow_runs[0]:null}catch(o){return console.error("Failed to fetch latest workflow run:",o),null}},mPe=({owner:e,repo:t,branch:n,token:r,autoRefresh:o=!0,refreshInterval:i=5e3,timeout:s=18e4})=>{const[a,l]=m.useState(),[u,c]=m.useState(!1),[d,f]=m.useState(),[h,p]=m.useState(new Date),[g,b]=m.useState(),[y,v]=m.useState(!1),w=m.useCallback(async()=>{if(!(!e||!t))try{c(!0),f(void 0);let A;if(g){const S=`${K7}/repos/${e}/${t}/actions/runs/${g}`;A=await Q7(S,r)}else{const S=await pPe(e,t,n,r);if(!S){f("No workflow runs found"),c(!1);return}A=S,b(A.id)}l(A),p(new Date)}catch(A){f(A instanceof Error?A.message:"Failed to fetch workflow run")}finally{c(!1)}},[e,t,g,n,r]),C=m.useCallback(()=>{w()},[w]);return m.useEffect(()=>{if(!e||!t)return;w();const A=(a==null?void 0:a.status)==="completed"||(a==null?void 0:a.status)==="failed"||(a==null?void 0:a.status)==="cancelled",S=(a==null?void 0:a.status)==="in_progress"||(a==null?void 0:a.status)==="queued";if(v(o&&S&&!A),o&&S&&!A){const _=setInterval(w,i),k=setTimeout(()=>{clearInterval(_),v(!1)},s);return()=>{clearInterval(_),clearTimeout(k)}}},[e,t,n,o,i,a==null?void 0:a.status,w,s]),{workflowRun:a,loading:u,error:d,refresh:C,lastRefresh:h,isWatching:y}},gPe=e=>{try{const t=new URL(e);if(t.hostname!=="github.com")return null;const n=t.pathname.split("/").filter(Boolean);return n.length<2?null:{owner:n[0],repo:n[1]}}catch{return null}},yPe=(e,t)=>{switch(e){case"completed":return t==="success"?"success":"error";case"in_progress":return"primary";case"queued":return"warning";case"failed":return"error";case"cancelled":return"default";case"skipped":return"default";default:return"default"}},vPe=(e,t)=>{switch(e){case"completed":return t==="success"?I(z7,{}):I(XN,{});case"in_progress":return I(Qke,{});case"queued":return I(Z_,{});case"failed":return I(XN,{});case"cancelled":return I(nPe,{});case"skipped":return I(Z_,{});default:return I(Z_,{})}},bPe=e=>{const t=Math.floor(e/60),n=e%60;return t>0?`${t}m ${n}s`:`${n}s`},wPe=e=>{if(e)return Math.floor((Date.now()-new Date(e).getTime())/1e3)},CPe=({repoUrl:e,branch:t,token:n,refreshInterval:r=5e3,timeout:o=18e4})=>{const i=m.useMemo(()=>gPe(e),[e]),s=i==null?void 0:i.owner,a=i==null?void 0:i.repo,{workflowRun:l,loading:u,isWatching:c}=mPe({owner:s||"",repo:a||"",branch:t,token:n,autoRefresh:!0,refreshInterval:r,timeout:o}),d=l==null?void 0:l.status,f=l==null?void 0:l.conclusion,h=l!=null&&l.run_started_at?wPe(l.run_started_at):void 0,p=d==="in_progress"||d==="queued";return u&&!p||!d?I(Me,{sx:{width:16,height:16}}):I(Me,{children:J(Me,{display:"flex",alignItems:"center",mb:2,mx:1,children:[I(Ps,{icon:I(G7,{}
3637),deleteIcon:vPe(d,f),label:d.replace("_"," ")+(h&&p?` (${bPe(h)})`:""),color:yPe(d,f),variant:"outlined",onClick:()=>{if(l&&s&&a){const g=`https://github.com/${s}/${a}/actions/runs/${l.id}`;window.open(g,"_blank")}},sx:{cursor:"pointer"}}),c&&I(Me,{sx:{marginLeft:1,width:8,height:8,borderRadius:"50%",backgroundColor:"success.main",animation:"pulse 2s infinite","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.2},"100%":{opacity:1}}}})]})})},eV=({event:e})=>{const[t,n]=m.useState(!1),{createNotification:r}=pp(),[o,i]=m.useState(0),s=m.useRef(null);return J(Ft,{children:[I(rw,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:[1]},children:I(sPe,{event:e})}),I(Sg,{}),J(UC,{component:"nav",children:[I(kke,{}),I(CT,{title:e.updatedAt?`Last updated ${tt.fromJSDate(e.updatedAt).toRelative()}`:"Never updated",arrow:!0,placement:"top",children:J(Me,{children:[I(xi,{ref:s,variant:"contained",loading:t,disabled:t,onClick:async()=>{if(n(!0),await qke(e,r),n(!1),s.current){const c=s.current.getBoundingClientRect(),d=c.left+c.width/2,f=c.top+c.height/2;aPe({origin:{x:d/window.innerWidth,y:f/window.innerHeight},spread:70,startVelocity:30,particleCount:100,angle:20,gravity:-.4,zIndex:2e3,drift:.5})}let l=0;const u=setInterval(()=>{i(c=>c+1),l+=1,l===5&&clearInterval(u)},1e3)},sx:{margin:1,whiteSpace:"break-spaces",width:"calc(100% - 16px)"},loadingIndicator:I(Qn,{color:"secondary",size:16}),children:I(mi,{primary:"Update website"})}),e.repoUrl&&I(CPe,{repoUrl:e.repoUrl,token:e.repoToken||void 0,refreshInterval:5e3,timeout:18e4},o)]})})]}),I(Me,{padding:1,children:I(uPe,{})})]})},Y7=m.createContext(null),xPe=({event:e,children:t})=>{Uke(e);const{data:n,isLoading:r,error:o,refetch:i}=Gke(e,"deploy/files"),s=m.useMemo(()=>({filesPath:n||{public:"",private:"",openfeedback:"",voxxrin:"",imageFolder:"",pdf:""},isLoading:r,error:o,refetch:i}),[n,r,o,i]);return I(Y7.Provider,{value:s,children:t})},SPe=()=>{const e=m.useContext(Y7);if(!e)throw new Error("useEventFiles must be used within an EventFilesProvider");return e};var VO={},_Pe=Na;Object.defineProperty(VO,"__esModule",{value:!0});var rv=VO.default=void 0,EPe=_Pe(Va()),IPe=T;rv=VO.default=(0,EPe.default)((0,IPe.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var BO={},APe=Na;Object.defineProperty(BO,"__esModule",{value:!0});var X7=BO.default=void 0,kPe=APe(Va()),PPe=T;X7=BO.default=(0,kPe.default)((0,PPe.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send");var jO={},TPe=Na;
3637Object.defineProperty(jO,"__esModule",{value:!0});var J7=jO.default=void 0,RPe=TPe(Va()),OPe=T;J7=jO.default=(0,RPe.default)((0,OPe.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");const MPe=({streaming:e,disabled:t,onSend:n,onCancel:r})=>{const[o,i]=m.useState(""),s=m.useRef(null);m.useEffect(()=>{var l;t||(l=s.current)==null||l.focus()},[t]);const a=()=>{const l=o.trim();!l||e||t||(n(l),i(""))};return J(Me,{sx:{display:"flex",alignItems:"flex-end",gap:1,p:1.5,borderTop:"1px solid",borderColor:"divider"},children:[I(es,{inputRef:s,autoFocus:!0,value:o,onChange:l=>i(l.target.value),onKeyDown:l=>{l.key==="Enter"&&!l.shiftKey&&(l.preventDefault(),a())},placeholder:t?"No API key available for this event":"Ask about your event…",multiline:!0,maxRows:6,fullWidth:!0,size:"small",disabled:t}),e?I(Zt,{color:"error",onClick:r,"aria-label":"Stop",children:I(J7,{})}):I(Zt,{color:"primary",onClick:a,disabled:!o.trim()||t,"aria-label":"Send",children:I(X7,{})})]})};var zO={},DPe=Na;Object.defineProperty(zO,"__esModule",{value:!0});var UO=zO.default=void 0,$Pe=DPe(Va()),FPe=T;UO=zO.default=(0,$Pe.default)((0,FPe.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");function GUe(){}function qUe(){}function KUe(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const s=n.slice(o,r).trim();(s||!i)&&t.push(s),o=r+1,r=n.indexOf(",",o)}return t}function LPe(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const NPe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VPe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BPe={};function tV(e,t){return((t||BPe).jsx?VPe:NPe).test(e)}const jPe=/[ \t\n\f\r]/g;function zPe(e){return typeof e=="object"?e.type==="text"?nV(e.value):!1:nV(e)}function nV(e){return e.replace(jPe,"")===""}class ov{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ov.prototype.property={};ov.prototype.normal={};ov.prototype.space=null;function Z7(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new ov(n,r,t)}function WA(e){return e.toLowerCase()}class os{constructor(t,n){this.property=t,this.attribute=n}}os.prototype.space=null;os.prototype.boolean=!1;os.prototype.booleanish=!1;os.prototype.overloadedBoolean=!1;os.prototype.number=!1;os.prototype.commaSeparated=!1;os.prototype.spaceSeparated=!1;os.prototype.commaOrSpaceSeparated=!1;os.prototype.mustUseProperty=!1;os.prototype.defined=!1;let UPe=0;const St=kd(),rr=kd(),e8=kd(),$e=kd(),hn=kd(),Qf=kd(),Zo=kd();function kd(){return 2**++UPe}const GA=Object.freeze(Object.defineProperty({__proto__:null,boolean:St,booleanish:rr,commaOrSpaceSeparated:Zo,commaSeparated:Qf,number:$e,overloadedBoolean:e8,spaceSeparated:hn},Symbol.toStringTag,{value:"Module"})),eE=Object.keys(GA);class HO extends os{constructor(t,n,r,o){let i=-1;if(super(t,n),rV(this,"space",o),typeof r=="number")for(;++i<eE.length;){const s=eE[i];rV(this,eE[i],(r&GA[s])===GA[s])}}}HO.prototype.defined=!0;function rV(e,t,n){n&&(e[t]=n)}const HPe={}.hasOwnProperty;function gp(e){const t={},n={};let r;for(r in e.properties)if(HPe.call(e.properties,r)){const o=e.properties[r],i=new HO(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[WA(r)]=r,n[WA(i.attribute)]=r}return new ov(t,n,e.space)}const t8=gp({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),n8=gp({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function r8(e,t){return t in e?e[t]:t}function o8(e,t){return r8(e,t.toLowerCase())}const i8=gp({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:o8,properties:{xmlns:null,xmlnsXLink:null}}),s8=gp({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:rr,ariaAutoComplete:null,ariaBusy:rr,ariaChecked:rr,ariaColCount:$e,ariaColIndex:$e,ariaColSpan:$e,ariaControl
3637s:hn,ariaCurrent:null,ariaDescribedBy:hn,ariaDetails:null,ariaDisabled:rr,ariaDropEffect:hn,ariaErrorMessage:null,ariaExpanded:rr,ariaFlowTo:hn,ariaGrabbed:rr,ariaHasPopup:null,ariaHidden:rr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:hn,ariaLevel:$e,ariaLive:null,ariaModal:rr,ariaMultiLine:rr,ariaMultiSelectable:rr,ariaOrientation:null,ariaOwns:hn,ariaPlaceholder:null,ariaPosInSet:$e,ariaPressed:rr,ariaReadOnly:rr,ariaRelevant:null,ariaRequired:rr,ariaRoleDescription:hn,ariaRowCount:$e,ariaRowIndex:$e,ariaRowSpan:$e,ariaSelected:rr,ariaSetSize:$e,ariaSort:null,ariaValueMax:$e,ariaValueMin:$e,ariaValueNow:$e,ariaValueText:null,role:null}}),WPe=gp({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:o8,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qf,acceptCharset:hn,accessKey:hn,action:null,allow:null,allowFullScreen:St,allowPaymentRequest:St,allowUserMedia:St,alt:null,as:null,async:St,autoCapitalize:null,autoComplete:hn,autoFocus:St,autoPlay:St,blocking:hn,capture:null,charSet:null,checked:St,cite:null,className:hn,cols:$e,colSpan:null,content:null,contentEditable:rr,controls:St,controlsList:hn,coords:$e|Qf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:St,defer:St,dir:null,dirName:null,disabled:St,download:e8,draggable:rr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:St,formTarget:null,headers:hn,height:$e,hidden:St,high:$e,href:null,hrefLang:null,htmlFor:hn,httpEquiv:hn,id:null,imageSizes:null,imageSrcSet:null,inert:St,inputMode:null,integrity:null,is:null,isMap:St,itemId:null,itemProp:hn,itemRef:hn,itemScope:St,itemType:hn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:St,low:$e,manifest:null,max:null,maxLength:$e,media:null,method:null,min:null,minLength:$e,multiple:St,muted:St,name:null,nonce:null,noModule:St,noValidate:St,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:St,optimum:$e,pattern:null,ping:hn,placeholder:null,playsInline:St,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:St,referrerPolicy:null,rel:hn,required:St,reversed:St,rows:$e,rowSpan:$e,sandbox:hn,scope:null,scoped:St,seamless:St,selected:St,shadowRootDelegatesFocus:St,shadowRootMode:null,shape:null,size:$e,sizes:null,slot:null,span:$e,spellCheck:rr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$e,step:null,style:null,tabIndex:$e,target:null,title:null,translate:null,type:null,typeMustMatch:St,useMap:null,value:rr,width:$e,wrap:null,align:null,aLink:null,archive:hn,axis:null,background:null,bgColor:null,border:$e,borderColor:null,bottomMargin:$e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:St,declare:St,event:null,face:null,frame:null,frameBorder:null,hSpace:$e,leftMargin:$e,link:null,longDesc:null,lowSrc:null,marginHeight:$e,marginWidth:$e,noResize:St,noHref:St,noShade:St,noWrap:St,object:null,profile:null,prompt:null,rev:null,rightMargin:$e,rules:null,scheme:null,scrolling:rr,standby:null,summary:null,text:null,topMargin:$e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:St,disableRemotePlayback:St,prefix:null,property:null,results:$e,security:null,unselectable:null}}),GPe=gp({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRen
3637dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:r8,properties:{about:Zo,accentHeight:$e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$e,amplitude:$e,arabicForm:null,ascent:$e,attributeName:null,attributeType:null,azimuth:$e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$e,by:null,calcMode:null,capHeight:$e,className:hn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
vendor: 7,588 bytes, lines 3637-3638
3637dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$e,diffuseConstant:$e,direction:null,display:null,dur:null,divisor:$e,dominantBaseline:null,download:St,dx:null,dy:null,edgeMode:null,editable:null,elevation:$e,enableBackground:null,end:null,event:null,exponent:$e,externalResourcesRequired:null,fill:null,fillOpacity:$e,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Qf,g2:Qf,glyphName:Qf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$e,horizOriginX:$e,horizOriginY:$e,id:null,ideographic:$e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$e,k:$e,k1:$e,k2:$e,k3:$e,k4:$e,kernelMatrix:Zo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$e,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$e,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$e,overlineThickness:$e,paintOrder:null,panose1:null,path:null,pathLength:$e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:hn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$e,pointsAtY:$e,pointsAtZ:$e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zo,rev:Zo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zo,requiredFeatures:Zo,requiredFonts:Zo,requiredFormats:Zo,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$e,specularExponent:$e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$e,strikethroughThickness:$e,string:null,stroke:null,strokeDashArray:Zo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$e,strokeOpacity:$e,strokeWidth:null,style:null,surfaceScale:$e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zo,tabIndex:$e,tableValues:null,target:null,targetX:$e,targetY:$e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$e,underlineThickness:$e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$e,values:null,vAlphabetic:$e,vMathematical:$e,vectorEffect:null,vHanging:$e,vIdeographic:$e,version:null,vertAdvY:$e,vertOriginX:$e,vertOriginY:$e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),qPe=/^data[-\w.:]+$/i,oV=/-[a-z]/g,KPe=/[A-Z]/g;function QPe(e,t){const n=WA(t);let r=t,o=os;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qPe.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(oV,XPe);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!oV.test(i)){let s=i.replace(KPe,YPe);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=HO}return new o(r,t)}function YPe(e){return"-"+e.toLowerCase()}function XPe(e){return e.charAt(1).toUpperCase()}const JPe={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ZPe=Z7([n8,t8,i8,s8,WPe],"html"),WO=Z7([n8,t8,i8,s8,GPe],"svg");function QUe(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function eTe(e){return e.join(" ").trim()}var a8={},iV=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,tTe=/\n/g,nTe=/^\s*/,rTe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oTe=/^:\s*/,iTe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,sTe=/^[;\s]*/,aTe=/^\s+|\s+$/g,lTe=`
3638`,sV="/",aV="*",cc="",uTe="comment",cTe="declaration",dTe=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(p){var g=p.match(tTe);g&&(n+=g.length);var b=p.lastIndexOf(lTe);r=~b?p.length-b:r+p.length}function i(){var p={line:n,column:r};return function(g){return g.position=new s(p),u(),g}}function s(p){this.start=p,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(p){var g=new Error(t.source+":"+n+":"+r+": "+p);if(g.reason=p,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function l(p){var g=p.exec(e);if(g){var b=g[0];return o(b),e=e.slice(b.length),g}}function u(){l(nTe)}function c(p){var g;for(p=p||[];g=d();)g!==!1&&p.push(g);return p}function d(){var p=i();if(!(sV!=e.charAt(0)||aV!=e.charAt(1))){for(var g=2;cc!=e.charAt(g)&&(aV!=e.charAt(g)||sV!=e.charAt(g+1));)++g;if(g+=2,cc===e.charAt(g-1))return a("End of comment missing");var b=e.slice(2,g-2);return r+=2,o(b),e=e.slice(g),r+=2,p({type:uTe,comment:b})}}function f(){var p=i(),g=l(rTe);
vendor: 1,394 bytes, line 3638
3638if(g){if(d(),!l(oTe))return a("property missing ':'");var b=l(iTe),y=p({type:cTe,property:lV(g[0].replace(iV,cc)),value:b?lV(b[0].replace(iV,cc)):cc});return l(sTe),y}}function h(){var p=[];c(p);for(var g;g=f();)g!==!1&&(p.push(g),c(p));return p}return u(),h()};function lV(e){return e?e.replace(aTe,cc):cc}var fTe=K2&&K2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a8,"__esModule",{value:!0});var hTe=fTe(dTe);function pTe(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,hTe.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var s=i.property,a=i.value;o?t(s,a,i):a&&(n=n||{},n[s]=a)}}),n}var uV=a8.default=pTe;const mTe=uV.default||uV,l8=u8("end"),GO=u8("start");function u8(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function gTe(e){const t=GO(e),n=l8(e);if(t&&n)return{start:t,end:n}}function qm(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?cV(e.position):"start"in e||"end"in e?cV(e):"line"in e||"column"in e?qA(e):""}function qA(e){return dV(e&&e.line)+":"+dV(e&&e.column)}function cV(e){return qA(e&&e.start)+"-"+qA(e&&e.end)}function dV(e){return e&&typeof e=="number"?e:1}
vendor: 1,912 bytes, line 3638
3638class mo extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(s=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=a?a.line:void 0,this.name=qm(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}mo.prototype.file="";mo.prototype.name="";mo.prototype.reason="";mo.prototype.message="";mo.prototype.stack="";mo.prototype.column=void 0;mo.prototype.line=void 0;mo.prototype.ancestors=void 0;mo.prototype.cause=void 0;mo.prototype.fatal=void 0;mo.prototype.place=void 0;mo.prototype.ruleId=void 0;mo.prototype.source=void 0;const qO={}.hasOwnProperty,yTe=new Map,vTe=/[A-Z]/g,bTe=/-([a-z])/g,wTe=new Set(["table","tbody","thead","tfoot","tr"]),CTe=new Set(["td","th"]),c8="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xTe(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=TTe(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 17,571 bytes, line 3638
3638if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=PTe(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?WO:ZPe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=d8(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function d8(e,t,n){if(t.type==="element")return STe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _Te(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ITe(e,t,n);if(t.type==="mdxjsEsm")return ETe(e,t);if(t.type==="root")return ATe(e,t,n);if(t.type==="text")return kTe(e,t)}function STe(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=WO,e.schema=o),e.ancestors.push(t);const i=h8(e,t.tagName,!1),s=RTe(e,t);let a=QO(e,t);return wTe.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!zPe(l):!0})),f8(e,s,i,t),KO(s,a),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function _Te(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Kg(e,t.position)}function ETe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Kg(e,t.position)}function ITe(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=WO,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:h8(e,t.name,!0),s=OTe(e,t),a=QO(e,t);return f8(e,s,i,t),KO(s,a),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function ATe(e,t,n){const r={};return KO(r,QO(e,t)),e.create(t,e.Fragment,r,n)}function kTe(e,t){return t.value}function f8(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function KO(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function PTe(e,t,n){return r;function r(o,i,s,a){const u=Array.isArray(s.children)?n:t;return a?u(i,s,a):u(i,s)}}function TTe(e,t){return n;function n(r,o,i,s){const a=Array.isArray(i.children),l=GO(r);return t(o,i,s,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function RTe(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&qO.call(t.properties,o)){const i=MTe(e,o,t.properties[o]);if(i){const[s,a]=i;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&CTe.has(t.tagName)?r=a:n[s]=a}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function OTe(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Kg(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,i=e.evaluater.evaluateExpression(a.expression)}else Kg(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function QO(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:yTe;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const u=o.get(l)||0;s=l+"-"+u,o.set(l,u+1)}}const a=d8(e,i,s);a!==void 0&&n.push(a)}return n}function MTe(e,t,n){const r=QPe(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?LPe(n):eTe(n)),r.property==="style"){let o=typeof n=="object"?n:DTe(e,String(n));return e.stylePropertyNameCase==="css"&&(o=$Te(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?JPe[r.property]||r.property:r.attribute,n]}}function DTe(e,t){const n={};try{mTe(t,r)}catch(o){if(!e.ignoreInvalidStyle){const i=o,s=new mo("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=c8+"#cannot-parse-style-attribute",s}}return n;function r(o,i){let s=o;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(bTe,LTe)),n[s]=i}}function h8(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,s;for(;++i<o.length;){const a=tV(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(i&&a.type==="Literal"),optional:!1}:a}r=s}else r=tV(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return qO.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Kg(e)}function Kg(e,t){const n=new mo("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=c8+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $Te(e){const t={};let n;for(n in e)qO.call(e,n)&&(t[FTe(n)]=e[n]);return t}function FTe(e){let t=e.replace(vTe,NTe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function LTe(e,t){return t.toUpperCase()}function NTe(e){return"-"+e.toLowerCase()}const tE={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},VTe={};function BTe(e,t){const n=t||VTe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return p8(e,r,o)}function p8(e,t,n){if(jTe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return fV(e.children,t,n)}return Array.isArray(e)?fV(e,t,n):""}function fV(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=p8(e[o],t,n);return r.join("")}function jTe(e){return!!(e&&typeof e=="object")}const hV=document.createElement("i");function YO(e){const t="&"+e+";";hV.innerHTML=t;const n=hV.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pa(e,t,n,r){const o=e.length;let i=0,s;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function Vi(e,t){return e.length>0?(Pa(e,e.length,0,t),e):t}const pV={}.hasOwnProperty;function zTe(e){const t={};let n=-1;for(;++n<e.length;)UTe(t,e[n]);return t}function UTe(e,t){let n;for(n in t){const o=(pV.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){pV.call(o,s)||(o[s]=[]);const a=i[s];HTe(o[s],Array.isArray(a)?a:a?[a]:[])}}}function HTe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pa(e,0,0,r)}function m8(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Yf(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ta=Yu(/[A-Za-z]/),ci=Yu(/[\dA-Za-z]/),WTe=Yu(/[#-'*+\--9=?A-Z^-~]/);function KA(e){return e!==null&&(e<32||e===127)}const QA=Yu(/\d/),GTe=Yu(/[\dA-Fa-f]/),qTe=Yu(/[!-/:-@[-`{-~]/);function ft(e){return e!==null&&e<-2}function Qo(e){return e!==null&&(e<0||e===32)}function Yt(e){return e===-2||e===-1||e===32}const KTe=Yu(new RegExp("\\p{P}|\\p{S}","u")),QTe=Yu(/\s/);function Yu(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function yp(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&ci(e.charCodeAt(n+1))&&ci(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const a=e.charCodeAt(n+1);i<56320&&a>56319&&a<57344?(s=String.fromCharCode(i,a),o=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+o+1,s=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function mn(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(l){return Yt(l)?(e.enter(n),a(l)):t(l)}function a(l){return Yt(l)&&i++<o?(e.consume(l),a):(e.exit(n),t(l))}}const YTe={tokenize:XTe};function XTe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),mn(e,t,"linePrefix")}function o(a){return e.enter("paragraph"),i(a)}function i(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return ft(a)?(e.consume(a),e.exit("chunkText"),i):(e.consume(a),s)}}const JTe={tokenize:ZTe},mV={tokenize:eRe};function ZTe(e){const t=this,n=[];let r=0,o,i,s;return a;function a(w){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&v();const C=t.events.length;let A=C,S;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){S=t.events[A][1].end;break}y(r);let _=C;for(;_<t.events.length;)t.events[_][1].end=Object.assign({},S),_++;return Pa(t.events,A+1,0,t.events.slice(C)),t.events.length=_,u(w)}return a(w)}function u(w){if(r===n.length){if(!o)return f(w);if(o.currentConstruct&&o.currentConstruct.concrete)return p(w);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mV,c,d)(w)}function c(w){return o&&v(),y(r),f(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,p(w)}function f(w){return t.containerState={},e.attempt(mV,h,p)(w)}function h(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function p(w){if(w===null){o&&v(),y(0),e.consume(w);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),g(w)}function g(w){if(w===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(w);return}return ft(w)?(e.consume(w),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(w),g)}function b(w,C){const A=t.sliceStream(w);if(C&&A.push(null),w.previous=i,i&&(i.next=w),i=w,o.defineSkip(w.start),o.write(A),t.parser.lazy[w.start.line]){let S=o.events.length;for(;S--;)if(o.events[S][1].start.offset<s&&(!o.events[S][1].end||o.events[S][1].end.offset>s))return;const _=t.events.length;let k=_,M,R;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){if(M){R=t.events[k][1].end;break}M=!0}for(y(r),S=_;S<t.events.length;)t.events[S][1].end=Object.assign({},R),S++;Pa(t.events,k+1,0,t.events.slice(_)),t.events.length=S}}function y(w){let C=n.length;for(;C-- >w;){const A=n[C];t.containerState=A[1],A[0].exit.call(t,e)}n.length=w}function v(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function eRe(e,t,n){return mn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gV(e){if(e===null||Qo(e)||QTe(e))return 1;if(KTe(e))return 2}function XO(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const YA={name:"attention",tokenize:nRe,resolveAll:tRe};function tRe(e,t){let n=-1,r,o,i,s,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[r][1].end),f=Object.assign({},e[n][1].start);yV(d,-l),yV(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:f},i={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Vi(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Vi(u,[["enter",o,t],["enter",s,t],["exit",s,t],["enter",i,t]]),u=Vi(u,XO(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Vi(u,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Vi(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Pa(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function nRe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=gV(r);let i;return s;function s(l){return i=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===i)return e.consume(l),a;const u=e.exit("attentionSequence"),c=gV(l),d=!c||c===2&&o||n.includes(l),f=!o||o===2&&c||n.includes(r);return u._open=!!(i===42?d:d&&(o||!f)),u._close=!!(i===42?f:f&&(c||!d)),t(l)}}function yV(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const rRe={name:"autolink",tokenize:oRe};function oRe(e,t,n){let r=0;return o;function o(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(h){return ta(h)?(e.consume(h),s):u(h)}function s(h){return h===43||h===45||h===46||ci(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||ci(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||KA(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),c):WTe(h)?(e.consume(h),u):n(h)}function c(h){return ci(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||ci(h))&&r++<63){const p=h===45?f:d;return e.consume(h),p}return n(h)}}const qx={tokenize:iRe,partial:!0};function iRe(e,t,n){return r;function r(i){return Yt(i)?mn(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||ft(i)?t(i):n(i)}}const g8={name:"blockQuote",tokenize:sRe,continuation:{tokenize:aRe},exit:lRe};function sRe(e,t,n){const r=this;return o;function o(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return Yt(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function aRe(e,t,n){const r=this;return o;function o(s){return Yt(s)?mn(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(g8,t,n)(s)}}function lRe(e){e.exit("blockQuote")}const y8={name:"characterEscape",tokenize:uRe};function uRe(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return qTe(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const v8={name:"characterReference",tokenize:cRe};function cRe(e,t,n){const r=this;let o=0,i,s;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,s=ci,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=GTe,c):(e.enter("characterReferenceValue"),i=7,s=QA,c(d))}function c(d){if(d===59&&o){const f=e.exit("characterReferenceValue");return s===ci&&!YO(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&o++<i?(e.consume(d),c):n(d)}}const vV={tokenize:fRe,partial:!0},bV={name:"codeFenced",tokenize:dRe,concrete:!0};function dRe(e,t,n){const r=this,o={tokenize:A,partial:!0};let i=0,s=0,a;return l;function l(S){return u(S)}function u(S){const _=r.events[r.events.length-1];return i=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,a=S,e.enter("co
3638deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(s++,e.consume(S),c):s<3?n(S):(e.exit("codeFencedFenceSequence"),Yt(S)?mn(e,d,"whitespace")(S):d(S))}function d(S){return S===null||ft(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(vV,g,C)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(S))}function f(S){return S===null||ft(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):Yt(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),mn(e,h,"whitespace")(S)):S===96&&S===a?n(S):(e.consume(S),f)}function h(S){return S===null||ft(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||ft(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===a?n(S):(e.consume(S),p)}function g(S){return e.attempt(o,C,b)(S)}function b(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return i>0&&Yt(S)?mn(e,v,"linePrefix",i+1)(S):v(S)}function v(S){return S===null||ft(S)?e.check(vV,g,C)(S):(e.enter("codeFlowValue"),w(S))}function w(S){return S===null||ft(S)?(e.exit("codeFlowValue"),v(S)):(e.consume(S),w)}function C(S){return e.exit("codeFenced"),t(S)}function A(S,_,k){let M=0;return R;function R($){return S.enter("lineEnding"),S.consume($),S.exit("lineEnding"),O}function O($){return S.enter("codeFencedFence"),Yt($)?mn(S,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):F($)}function F($){return $===a?(S.enter("codeFencedFenceSequence"),N($)):k($)}function N($){return $===a?(M++,S.consume($),N):M>=s?(S.exit("codeFencedFenceSequence"),Yt($)?mn(S,V,"whitespace")($):V($)):k($)}function V($){return $===null||ft($)?(S.exit("codeFencedFence"),_($)):k($)}}}function fRe(e,t,n){const r=this;return o;function o(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const nE={name:"codeIndented",tokenize:pRe},hRe={tokenize:mRe,partial:!0};function pRe(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),mn(e,i,"linePrefix",5)(u)}function i(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):ft(u)?e.attempt(hRe,s,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||ft(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function mRe(e,t,n){const r=this;return o;function o(s){return r.parser.lazy[r.now().line]?n(s):ft(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):mn(e,i,"linePrefix",5)(s)}function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):ft(s)?o(s):n(s)}}const gRe={name:"codeText",tokenize:bRe,resolve:yRe,previous:vRe};function yRe(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function vRe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bRe(e,t,n){let r=0,o,i;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),o=0,c(d)):ft(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||ft(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),o++,c):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",u(
vendor: 15,870 bytes, line 3638
3638d))}}function b8(e){const t={};let n=-1,r,o,i,s,a,l,u;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,wRe(e,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,o=void 0;i--&&(s=e[i],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),s[1].type="lineEnding",o=i);o&&(r[1].end=Object.assign({},e[o][1].start),a=e.slice(o,n),a.unshift(r),Pa(e,o,n-o+1,a))}}return!u}function wRe(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const i=[],s=n._tokenizer||r.parser[n.contentType](n.start),a=s.events,l=[],u={};let c,d,f=-1,h=n,p=0,g=0;const b=[g];for(;h;){for(;e[++o][1]!==h;);i.push(o),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(g=f+1,b.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),f=b.length;f--;){const y=a.slice(b[f],b[f+1]),v=i.pop();l.unshift([v,v+y.length-1]),Pa(e,v,2,y)}for(f=-1;++f<l.length;)u[p+l[f][0]]=p+l[f][1],p+=l[f][1]-l[f][0]-1;return u}const CRe={tokenize:_Re,resolve:SRe},xRe={tokenize:ERe,partial:!0};function SRe(e){return b8(e),e}function _Re(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(a)}function o(a){return a===null?i(a):ft(a)?e.check(xRe,s,i)(a):(e.consume(a),o)}function i(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function ERe(e,t,n){const r=this;return o;function o(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),mn(e,i,"linePrefix")}function i(s){if(s===null||ft(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function w8(e,t,n,r,o,i,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),f):y===null||y===32||y===41||KA(y)?n(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),g(y))}function f(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(a),f(y)):y===null||y===60||ft(y)?n(y):(e.consume(y),y===92?p:h)}function p(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function g(y){return!c&&(y===null||y===41||Qo(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(y)):c<u&&y===40?(e.consume(y),c++,g):y===41?(e.consume(y),c--,g):y===null||y===32||y===40||KA(y)?n(y):(e.consume(y),y===92?b:g)}function b(y){return y===40||y===41||y===92?(e.consume(y),g):g(y)}}function C8(e,t,n,r,o,i){const s=this;let a=0,l;return u;function u(h){return e.enter(r),e.enter(o),e.consume(h),e.exit(o),e.enter(i),c}function c(h){return a>999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(i),e.enter(o),e.consume(h),e.exit(o),e.exit(r),t):ft(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||ft(h)||a++>999?(e.exit("chunkString"),c(h)):(e.consume(h),l||(l=!Yt(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function x8(e,t,n,r,o,i){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(o),e.consume(f),e.exit(o),s=f===40?41:f,l):n(f)}function l(f){return f===s?(e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):(e.enter(i),u(f))}function u(f){return f===s?(e.exit(i),l(s)):f===null?n(f):ft(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),mn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||ft(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===s||f===92?(e.consume(f),c):c(f)}}function Km(e,t){let n;return r;function r(o){return ft(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Yt(o)?mn(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const IRe={name:"definition",tokenize:kRe},ARe={tokenize:PRe,partial:!0};function kRe(e,t,n){const r=this;let o;return i;function i(h){return e.enter("definition"),s(h)}function s(h){return C8.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return o=Yf(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return Qo(h)?Km(e,u)(h):u(h)}function u(h){return w8(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(ARe,d,d)(h)}function d(h){return Yt(h)?mn(e,f,"whitespace")(h):f(h)}function f(h){return h===null||ft(h)?(e.exit("definition"),r.parser.defined.push(o),t(h)):n(h)}}function PRe(e,t,n){return r;function r(a){return Qo(a)?Km(e,o)(a):n(a)}function o(a){return x8(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return Yt(a)?mn(e,s,"whitespace")(a):s(a)}function s(a){return a===null||ft(a)?t(a):n(a)}}const TRe={name:"hardBreakEscape",tokenize:RRe};function RRe(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return ft(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const ORe={name:"headingAtx",tokenize:DRe,resolve:MRe};function MRe(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pa(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function DRe(e,t,n){let r=0;return o;function o(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||Qo(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||ft(c)?(e.exit("atxHeading"),t(c)):Yt(c)?mn(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||Qo(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const $Re=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wV=["pre","script","style","textarea"],FRe={name:"htmlFlow",tokenize:BRe,resolveTo:VRe,concrete:!0},LRe={tokenize:zRe,partial:!0},NRe={tokenize:jRe,partial:!0};function VRe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function BRe(e,t,n){const r=this;let o,i,s,a,l;return u;function u(j){return c(j)}function c(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),d}function d(j){return j===33?(e.consume(j),f):j===47?(e.consume(j),i=!0,g):j===63?(e.consume(j),o=3,r.interrupt?t:E):ta(j)?(e.consume(j),s=String.fromCharCode(j),b):n(j)}function f(j){return j===45?(e.consume(j),o=2,h):j===91?(e.consume(j),o=5,a=0,p):ta(j)?(e.consume(j),o=4,r.interrupt?t:E):n(j)}function h(j){return j===45?(e.consume(j),r.interrupt?t:E):n(j)}function p(j){const G="CDATA[";return j===G.charCodeAt(a++)?(e.consume(j),a===G.length?r.interrupt?t:F:p):n(j)}function g(j){return ta(j)?(e.consume(j),s=String.fromCharCode(j),b):n(j)}function b(j){if(j===null||j===47||j===62||Qo(j)){const G=j===47,Q=s.toLowerCase();return!G&&!i&&wV.includes(Q)?(o=1,r.interrupt?t(j):F(j)):$Re.includes(s.toLowerCase())?(o=6,G?(e.consume(j),y):r.interrupt?t(j):F(j)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):i?v(j):w(j))}return j===45||ci(j)?(e.consume(j),s+=String.fromCharCode(j),b):n(j)}function y(j){return j===62?(e.consume(j),r.interrupt?t:F):n(j)}function v(j){return Yt(j)?(e.consume(j),v):R(j)}function w(j){return j===47?(e.consume(j),R):j===58||j===95||ta(j)?(e.consume(j),C):Yt(j)?(e.consume(j),w):R(j)}function C(j){return j===45||j===46||j===58||j===95||ci(j)?(e.consume(j),C):A(j)}function A(j){return j===61?(e.consume(j),S):Yt(j)?(e.consume(j),A):w(j)}function S(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),l=j,_):Yt(j)?(e.consume(j),S):k(j)}function _(j){return j===l?(e.consume(j),l=null,M):j===null||ft(j)?n(j):(e.consume(j),_)}function k(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||Qo(j)?A(j):(e.consume(j),k)}function M(j){return j===47||j===62||Yt(j)?w(j):n(j)}function R(j){return j===62?(e.consume(j),O):n(j)}function O(j){return j===null||ft(j)?F(j):Yt(j)?(e.consume(j),O):n(j)}function F(j){return j===45&&o===2?(e.consume(j),D):j===60&&o===1?(e.consume(j),L):j===62&&o===4?(e.consume(j),z):j===63&&o===3?(e.consume(j),E):j===93&&o===5?(e.consume(j),B):ft(j)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(LRe,H,N)(j)):j===null||ft(j)?(e.exit("htmlFlowData"),N(j)):(e.consume(j),F)}function N(j){return e.check(NRe,V,H)(j)}function V(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),$}function $(j){return j===null||ft(j)?N(j):(e.enter("htmlFlowData"),F(j))}function D(j){return j===45?(e.consume(j),E):F(j)}function L(j){return j===47?(e.consume(j),s="",P):F(j)}function P(j){if(j===62){const G=s.toLowerCase();return wV.includes(G)?(e.consume(j),z):F(j)}return ta(j)&&s.length<8?(e.consume(j),s+=String.fromCharCode(j),P):F(j)}function B(j){return j===93?(e.consume(j),E):F(j)}function E(j){return j===62?(e.consume(j),z):j===45&&o===2?(e.consume(j),E):F(j)}function z(j){return j===null||ft(j)?(e.exit("htmlFlowData"),H(j)):(e.consume(j),z)}function H(j){return e.exit("htmlFlow"),t(j)}}function jRe(e,t,n){const r=this;return o;function o(s){return ft(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function zRe(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(qx,t,n)}}const URe={name:"htmlText",tokenize:HRe};function HRe(e,t,n){const r=this;let o,i,s;return a;function a(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),l}function l(E){return E===33?(e.consume(E),u):E===47?(e.consume(E),A):E===63?(e.consume(E),w):ta(E)?(e.consume(E),k):n(E)}function u(E){return E===45?(e.consume(E),c):E===91?(e.consume(E),i=0,p):ta(E)?(e.consume(E),v):n(E)}function c(E){return E===45?(e.consume(E),h):n(E)}function d(E){return E===null?n(E):E===45?(e.consume(E),f):ft(E)?(s=d,L(E)):(e.consume(E),d)}function f(E){return E===45?(e.consume(E),h):d(E)}function h(E){return E===62?D(E):E===45?f(E):d(E)}function p(E){const z="CDATA[";return E===z.charCodeAt(i++)?(e.consume(E),i===z.length?g:p):n(E)}function g(E){return E===null?n(E):E===93?(e.consume(E),b):ft(E)?(s=g,L(E)):(e.consume(E),g)}function b(E){return E===93?(e.consume(E),y):g(E)}function y(E){return E===62?D(E):E===93?(e.consume(E),y):g(E)}function v(E){return E===null||E===62?D(E):ft(E)?(s=v,L(E)):(e.consume(E),v)}function w(E){return E===null?n(E):E===63?(e.consume(E),C):ft(E)?(s=w,L(E)):(e.consume(E),w)}function C(E){return E===62?D(E):w(E)}function A(E){return ta(E)?(e.consume(E),S):n(E)}function S(E){return E===45||ci(E)?(e.consume(E),S):_(E)}function _(E){return ft(E)?(s=_,L(E)):Yt(E)?(e.consume(E),_):D(E)}function k(E){return E===45||ci(E)?(e.consume(E),k):E===47||E===62||Qo(E)?M(E):n(E)}function M(E){return E===47?(e.consume(E),D):E===58||E===95||ta(E)?(e.consume(E),R):ft(E)?(s=M,L(E)):Yt(E)?(e.consume(E),M):D(E)}function R(E){return E===45||E===46||E===58||E===95||ci(E)?(e.consume(E),R):O(E)}function O(E){return E===61?(e.consume(E),F):ft(E)?(s=O,L(E)):Yt(E)?(e.consume(E),O):M(E)}function F(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),o=E,N):ft(E)?(s=F,L(E)):Yt(E)?(e.consume(E),F):(e.consume(E),V)}function N(E){return E===o?(e.consume(E),o=void 0,$):E===null?n(E):ft(E)?(s=N,L(E)):(e.consume(E),N)}function V(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Qo(E)?M(E):(e.consume(E),V)}function $(E){return E===47||E===62||Qo(E)?M(E):n(E)}function D(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function L(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),P}function P(E){return Yt(E)?mn(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):B(E)}function B(E){return e.enter("htmlTextData"),s(E)}}const JO={name:"labelEnd",tokenize:YRe,resolveTo:QRe,resolveAll:KRe},WRe={tokenize:XRe},GRe={tokenize:JRe},qRe={tokenize:ZRe};function KRe(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function QRe(e,t){let n=e.length,r=0,o,i,s,a;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(s=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[s][1].end)},c={type:"labelText",start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return a=[["enter",l,t],["enter",u,t]],a=Vi(a,e.slice(i+1,i+r+3)),a=Vi(a,[["enter",c,t]]),a=Vi(a,XO(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),a=Vi(a,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),a=Vi(a,e.slice(s+1)),a=Vi(a,[["exit",l,t]]),Pa(e,i,e.length,a),e}function YRe(e,t,n){const r=this;let o=r.events.length,i,s;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return a;function a(f){return i?i._inactive?d(f):(s=r.parser.defined.includes(Yf(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(WRe,c,s?c:d)(f):f===91?e.attempt(GRe,c,s?u:d
vendor: 3,822 bytes, line 3638
3638)(f):s?c(f):d(f)}function u(f){return e.attempt(qRe,c,d)(f)}function c(f){return t(f)}function d(f){return i._balanced=!0,n(f)}}function XRe(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return Qo(d)?Km(e,i)(d):i(d)}function i(d){return d===41?c(d):w8(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Qo(d)?Km(e,l)(d):c(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?x8(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Qo(d)?Km(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function JRe(e,t,n){const r=this;return o;function o(a){return C8.call(r,e,i,s,"reference","referenceMarker","referenceString")(a)}function i(a){return r.parser.defined.includes(Yf(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function ZRe(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const eOe={name:"labelStartImage",tokenize:tOe,resolveAll:JO.resolveAll};function tOe(e,t,n){const r=this;return o;function o(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),i}function i(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const nOe={name:"labelStartLink",tokenize:rOe,resolveAll:JO.resolveAll};function rOe(e,t,n){const r=this;return o;function o(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const rE={name:"lineEnding",tokenize:oOe};function oOe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),mn(e,t,"linePrefix")}}const n0={name:"thematicBreak",tokenize:iOe};function iOe(e,t,n){let r=0,o;return i;function i(u){return e.enter("thematicBreak"),s(u)}function s(u){return o=u,a(u)}function a(u){return u===o?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||ft(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===o?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Yt(u)?mn(e,a,"whitespace")(u):a(u))}}const $o={name:"list",tokenize:lOe,continuation:{tokenize:uOe},exit:dOe},sOe={tokenize:fOe,partial:!0},aOe={tokenize:cOe,partial:!0};function lOe(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return a;function a(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:QA(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(n0,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return QA(h)&&++s<10?(e.consume(h),l):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(qx,r.interrupt?n:c,e.attempt(sOe,f,d))}
vendor: 5,109 bytes, line 3638
3638function c(h){return r.containerState.initialBlankLine=!0,i++,f(h)}function d(h){return Yt(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function uOe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(qx,o,i);function o(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mn(e,t,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!Yt(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(aOe,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,mn(e,e.attempt($o,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function cOe(e,t,n){const r=this;return mn(e,o,"listItemIndent",r.containerState.size+1);function o(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function dOe(e){e.exit(this.containerState.type)}function fOe(e,t,n){const r=this;return mn(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const s=r.events[r.events.length-1];return!Yt(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const CV={name:"setextUnderline",tokenize:pOe,resolveTo:hOe};function hOe(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function pOe(e,t,n){const r=this;let o;return i;function i(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),o=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===o?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Yt(u)?mn(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ft(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const mOe={tokenize:gOe};function gOe(e){const t=this,n=e.attempt(qx,r,e.attempt(this.parser.constructs.flowInitial,o,mn(e,e.attempt(this.parser.constructs.flow,o,e.attempt(CRe,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const yOe={resolveAll:_8()},vOe=S8("string"),bOe=S8("text");function S8(e){return{tokenize:t,resolveAll:_8(e==="text"?wOe:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,s,a);return s;function s(c){return u(c)?i(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),i(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=o[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function _8(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function wOe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,s=-1,a=0,l;for(;i--;){const u=o[i];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(u===-2)l=!0,a++;else if(u!==-1){i++;break}}if(a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-a,offset:r.end.offset-a,_index:r.start._index+i,_bufferIndex:i?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function COe(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let s=[],a=[];const l={consume:v,enter:w,exit:C,attempt:_(A),check:_(S),interrupt:_(S,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:f,now:p,defineSki
vendor: 4,137 bytes, lines 3638-3640
3638p:g,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;function d(O){return s=Vi(s,O),b(),s[s.length-1]!==null?[]:(k(t,0),u.events=XO(i,u.events,u),u.events)}function f(O,F){return SOe(h(O),F)}function h(O){return xOe(s,O)}function p(){const{line:O,column:F,offset:N,_index:V,_bufferIndex:$}=r;return{line:O,column:F,offset:N,_index:V,_bufferIndex:$}}function g(O){o[O.line]=O.column,R()}function b(){let O;for(;r._index<s.length;){const F=s[r._index];if(typeof F=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<F.length;)y(F.charCodeAt(r._bufferIndex));else y(F)}}function y(O){c=c(O)}function v(O){ft(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,R()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=O}function w(O,F){const N=F||{};return N.type=O,N.start=p(),u.events.push(["enter",N,u]),a.push(N),N}function C(O){const F=a.pop();return F.end=p(),u.events.push(["exit",F,u]),F}function A(O,F){k(O,F.from)}function S(O,F){F.restore()}function _(O,F){return N;function N(V,$,D){let L,P,B,E;return Array.isArray(V)?H(V):"tokenize"in V?H([V]):z(V);function z(ee){return Y;function Y(se){const fe=se!==null&&ee[se],ve=se!==null&&ee.null,oe=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return H(oe)(se)}}function H(ee){return L=ee,P=0,ee.length===0?D:j(ee[P])}function j(ee){return Y;function Y(se){return E=M(),B=ee,ee.partial||(u.currentConstruct=ee),ee.name&&u.parser.constructs.disable.null.includes(ee.name)?Q():ee.tokenize.call(F?Object.assign(Object.create(u),F):u,l,G,Q)(se)}}function G(ee){return O(B,E),$}function Q(ee){return E.restore(),++P<L.length?j(L[P]):D}}}function k(O,F){O.resolveAll&&!i.includes(O)&&i.push(O),O.resolve&&Pa(u.events,F,u.events.length-F,O.resolve(u.events.slice(F),u)),O.resolveTo&&(u.events=O.resolveTo(u.events,u))}function M(){const O=p(),F=u.previous,N=u.currentConstruct,V=u.events.length,$=Array.from(a);return{restore:D,from:V};function D(){r=O,u.previous=F,u.currentConstruct=N,u.events.length=V,a=$,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function xOe(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let s;if(n===o)s=[e[n].slice(r,i)];else{if(s=e.slice(n,o),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}i>0&&s.push(e[o].slice(0,i))}return s}function SOe(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
3639`;break}case-3:{s=`\r
3640`;break}case-2:{s=t?" ":"	";break}case-1:{if(!t&&o)continue;s=" ";break}default:s=String.fromCharCode(i)}o=i===-2,r.push(s)}return r.join("")}const _Oe={42:$o,43:$o,45:$o,48:$o,49:$o,50:$o,51:$o,52:$o,53:$o,54:$o,55:$o,56:$o,57:$o,62:g8},EOe={91:IRe},IOe={[-2]:nE,[-1]:nE,32:nE},AOe={35:ORe,42:n0,45:[CV,n0],60:FRe,61:CV,95:n0,96:bV,126:bV},kOe={38:v8,92:y8},POe={[-5]:rE,[-4]:rE,[-3]:rE,33:eOe,38:v8,42:YA,60:[rRe,URe],91:nOe,92:[TRe,y8],93:JO,95:YA,96:gRe},TOe={null:[YA,yOe]},ROe={null:[42,95]},OOe={null:[]},MOe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ROe,contentInitial:EOe,disable:OOe,document:_Oe,flow:AOe,flowInitial:IOe,insideSpan:TOe,string:kOe,text:POe},Symbol.toStringTag,{value:"Module"}));function DOe(e){const n=zTe([MOe,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(YTe),document:o(JTe),flow:o(mOe),string:o(vOe),text:o(bOe)};return r;function o(i){return s;function s(a){return COe(r,i,a)}}}function $Oe(e){for(;!b8(e););return e}const xV=/[\0\t\n\r]/g;function FOe(){let e=1,t="",n=!0,r;return o;function o(i,s,a){const l=[];let u,c,d,f,h;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(xV.lastIndex=d,u=xV.exec(i),f=u&&u.index!==void 0?u.index:i.length,h=i.charCodeAt(f),!u){t=i.slice(d);break}if(h===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(i.slice(d,f)),e
vendor: 2,668 bytes, line 3640
3640+=f-d),h){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const LOe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NOe(e){return e.replace(LOe,VOe)}function VOe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return m8(n.slice(i?2:1),i?16:10)}return YO(n)||e}const E8={}.hasOwnProperty;function BOe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),jOe(n)($Oe(DOe(n).document().write(FOe()(e,t,!0))))}function jOe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(U),autolinkProtocol:M,autolinkEmail:M,atxHeading:i(me),blockQuote:i(fe),characterEscape:M,characterReference:M,codeFenced:i(ve),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(ve,s),codeText:i(oe,s),codeTextData:M,data:M,codeFlowValue:M,definition:i(ye),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(we),hardBreakEscape:i(be),hardBreakTrailing:i(be),htmlFlow:i(ie,s),htmlFlowData:M,htmlText:i(ie,s),htmlTextData:M,image:i(pe),label:s,link:i(U),listItem:i(K),listItemValue:f,listOrdered:i(q,d),listUnordered:i(q),paragraph:i(ae),reference:j,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(me),strong:i(ue),thematicBreak:i(X)},exit:{atxHeading:l(),atxHeadingSequence:A,autolink:l(),autolinkEmail:se,autolinkProtocol:Y,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:Q,characterReferenceMarkerNumeric:Q,characterReferenceValue:ee,codeFenced:l(b),codeFencedFence:g,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:R,codeIndented:l(y),codeText:l($),codeTextData:R,data:R,definition:l(),definitionDestinationString:C,definitionLabelString:v,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(F),hardBreakTrailing:l(F),htmlFlow:l(N),htmlFlowData:R,htmlText:l(V),htmlTextData:R,image:l(L),label:B,labelText:P,lineEnding:O,link:l(D),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:G,resourceDestinationString:E,resourceTitleString:z,resource:H,setextHeading:l(k),setextHeadingLineSequence:_,setextHeadingText:S,strong:l(),thematicBreak:l()}};I8(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let le={type:"root",children:[]};const _e={stack:[le],tokenStack:[],config:t,enter:a,exit:u,buffer:s,resume:c,data:n},ne=[];let te=-1;for(;++te<W.length;)if(W[te][1].type==="listOrdered"||W[te][1].type==="listUnordered")if(W[te][0]==="enter")ne.push(te);
vendor: 8,123 bytes, line 3640
3640else{const ke=ne.pop();te=o(W,ke,te)}for(te=-1;++te<W.length;){const ke=t[W[te][0]];E8.call(ke,W[te][1].type)&&ke[W[te][1].type].call(Object.assign({sliceSerialize:W[te][2].sliceSerialize},_e),W[te][1])}if(_e.tokenStack.length>0){const ke=_e.tokenStack[_e.tokenStack.length-1];(ke[1]||SV).call(_e,void 0,ke[0])}for(le.position={start:Hl(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:Hl(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},te=-1;++te<t.transforms.length;)le=t.transforms[te](le)||le;return le}function o(W,le,_e){let ne=le-1,te=-1,ke=!1,Ve,Fe,Ie,Be;for(;++ne<=_e;){const Ee=W[ne];switch(Ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ee[0]==="enter"?te++:te--,Be=void 0;break}case"lineEndingBlank":{Ee[0]==="enter"&&(Ve&&!Be&&!te&&!Ie&&(Ie=ne),Be=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Be=void 0}if(!te&&Ee[0]==="enter"&&Ee[1].type==="listItemPrefix"||te===-1&&Ee[0]==="exit"&&(Ee[1].type==="listUnordered"||Ee[1].type==="listOrdered")){if(Ve){let Te=ne;for(Fe=void 0;Te--;){const We=W[Te];if(We[1].type==="lineEnding"||We[1].type==="lineEndingBlank"){if(We[0]==="exit")continue;Fe&&(W[Fe][1].type="lineEndingBlank",ke=!0),We[1].type="lineEnding",Fe=Te}else if(!(We[1].type==="linePrefix"||We[1].type==="blockQuotePrefix"||We[1].type==="blockQuotePrefixWhitespace"||We[1].type==="blockQuoteMarker"||We[1].type==="listItemIndent"))break}Ie&&(!Fe||Ie<Fe)&&(Ve._spread=!0),Ve.end=Object.assign({},Fe?W[Fe][1].start:Ee[1].end),W.splice(Fe||ne,0,["exit",Ve,Ee[2]]),ne++,_e++}if(Ee[1].type==="listItemPrefix"){const Te={type:"listItem",_spread:!1,start:Object.assign({},Ee[1].start),end:void 0};Ve=Te,W.splice(ne,0,["enter",Te,Ee[2]]),ne++,_e++,Ie=void 0,Be=!0}}}return W[le][1]._spread=ke,_e}function i(W,le){return _e;function _e(ne){a.call(this,W(ne),ne),le&&le.call(this,ne)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(W,le,_e){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([le,_e]),W.position={start:Hl(le.start),end:void 0}}function l(W){return le;function le(_e){W&&W.call(this,_e),u.call(this,_e)}}function u(W,le){const _e=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==W.type&&(le?le.call(this,W,ne[0]):(ne[1]||SV).call(this,W,ne[0]));else throw new Error("Cannot close `"+W.type+"` ("+qm({start:W.start,end:W.end})+"): it’s not open");_e.position.end=Hl(W.end)}function c(){return BTe(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(W){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function h(){const W=this.resume(),le=this.stack[this.stack.length-1];le.lang=W}function p(){const W=this.resume(),le=this.stack[this.stack.length-1];le.meta=W}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const W=this.resume(),le=this.stack[this.stack.length-1];le.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const W=this.resume(),le=this.stack[this.stack.length-1];le.value=W.replace(/(\r?\n|\r)$/g,"")}function v(W){const le=this.resume(),_e=this.stack[this.stack.length-1];_e.label=le,_e.identifier=Yf(this.sliceSerialize(W)).toLowerCase()}function w(){const W=this.resume(),le=this.stack[this.stack.length-1];le.title=W}function C(){const W=this.resume(),le=this.stack[this.stack.length-1];le.url=W}function A(W){const le=this.stack[this.stack.length-1];if(!le.depth){const _e=this.sliceSerialize(W).length;le.depth=_e}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function _(W){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function M(W){const _e=this.stack[this.stack.length-1].children;let ne=_e[_e.length-1];(!ne||ne.type!=="text")&&(ne=Z(),ne.position={start:Hl(W.start),end:void 0},_e.push(ne)),this.stack.push(ne)}function R(W){const le=this.stack.pop();le.value+=this.sliceSerialize(W),le.position.end=Hl(W.end)}function O(W){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=le.children[le.children.length-1];_e.position.end=Hl(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(M.call(this,W),R.call(this,W))}function F(){this.data.atHardBreak=!0}function N(){const W=this.resume(),le=this.stack[this.stack.length-1];le.value=W}function V(){const W=this.resume(),le=this.stack[this.stack.length-1];le.value=W}function $(){const W=this.resume(),le=this.stack[this.stack.length-1];le.value=W}function D(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=le,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function L(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=le,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function P(W){const le=this.sliceSerialize(W),_e=this.stack[this.stack.length-2];_e.label=NOe(le),_e.identifier=Yf(le).toLowerCase()}function B(){const W=this.stack[this.stack.length-1],le=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const ne=W.children;_e.children=ne}else _e.alt=le}function E(){const W=this.resume(),le=this.stack[this.stack.length-1];le.url=W}function z(){const W=this.resume(),le=this.stack[this.stack.length-1];le.title=W}function H(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function G(W){const le=this.resume(),_e=this.stack[this.stack.length-1];_e.label=le,_e.identifier=Yf(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function Q(W){this.data.characterReferenceType=W.type}function ee(W){const le=this.sliceSerialize(W),_e=this.data.characterReferenceType;let ne;_e?(ne=m8(le,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=YO(le);const te=this.stack.pop();te.value+=ne,te.position.end=Hl(W.end)}function Y(W){R.call(this,W);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(W)}function se(W){R.call(this,W);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(W)}function fe(){return{type:"blockquote",children:[]}}function ve(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function be(){return{type:"break"}}function ie(){return{type:"html",value:""}}function pe(){return{type:"image",title:null,url:"",alt:null}}function U(){return{type:"link",title:null,url:"",children:[]}}function q(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function K(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function ue(){return{type:"strong",children:[]}}function Z(){return{type:"text",value:""}}function X(){return{type:"thematicBreak"}}}function Hl(e){return{line:e.line,column:e.column,offset:e.offset}}function I8(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?I8(e,r):zOe(e,r)}}function zOe(e,t){let n;for(n in t)if(E8.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function SV(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qm({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qm({start:t.start,end:t.end}
vendor: 17,486 bytes, lines 3640-3650
3640)+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qm({start:t.start,end:t.end})+") is still open")}function UOe(e){const t=this;t.parser=n;function n(r){return BOe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function HOe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function WOe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
3641`}]}function GOe(e,t){const n=t.value?t.value+`
3642`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function qOe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KOe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QOe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=yp(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function YOe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XOe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function A8(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const s=o[o.length-1];return s&&s.type==="text"?s.value+=r:o.push({type:"text",value:r}),o}function JOe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return A8(e,t);const o={src:yp(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function ZOe(e,t){const n={src:yp(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function e2e(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function t2e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return A8(e,t);const o={href:yp(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function n2e(e,t){const n={href:yp(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function r2e(e,t,n){const r=e.all(t),o=n?o2e(n):k8(t),i={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(o||a!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
3643`}),c.type==="element"&&c.tagName==="p"&&!o?s.push(...c.children):s.push(c)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
3644`});const u={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,u),e.applyData(t,u)}function o2e(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=k8(n[r])}return t}function k8(e){const t=e.spread;return t??e.children.length>1}function i2e(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const s=r[o];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function s2e(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function a2e(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function l2e(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function u2e(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),o.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=GO(t.children[1]),l=l8(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),o.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function c2e(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const d=t.children[l],f={},h=s?s[l]:void 0;h&&(f.align=h);let p={type:"element",tagName:i,properties:f,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),u.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function d2e(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const _V=9,EV=32;function f2e(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(IV(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(IV(t.slice(o),o>0,!1)),i.join("")}function IV(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===_V||i===EV;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===_V||i===EV;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function h2e(e,t){const n={type:"text",value:f2e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function p2e(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const m2e={blockquote:HOe,break:WOe,code:GOe,delete:qOe,emphasis:KOe,footnoteReference:QOe,heading:YOe,html:XOe,imageReference:JOe,image:ZOe,inlineCode:e2e,linkReference:t2e,link:n2e,listItem:r2e,list:i2e,paragraph:s2e,root:a2e,strong:l2e,table:u2e,tableCell:d2e,tableRow:c2e,text:h2e,thematicBreak:p2e,toml:pb,yaml:pb,definition:pb,footnoteDefinition:pb};function pb(){}const P8=-1,Kx=0,Ww=1,Gw=2,ZO=3,e2=4,t2=5,n2=6,T8=7,R8=8,AV=typeof self=="object"?self:globalThis,g2e=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,s]=t[o];switch(i){case Kx:case P8:return n(s,o);case Ww:{const a=n([],o);for(const l of s)a.push(r(l));return a}case Gw:{const a=n({},o);for(const[l,u]of s)a[r(l)]=r(u);return a}case ZO:return n(new Date(s),o);case e2:{const{source:a,flags:l}=s;return n(new RegExp(a,l),o)}case t2:{const a=n(new Map,o);for(const[l,u]of s)a.set(r(l),r(u));return a}case n2:{const a=n(new Set,o);for(const l of s)a.add(r(l));return a}case T8:{const{name:a,message:l}=s;return n(new AV[a](l),o)}case R8:return n(BigInt(s),o);case"BigInt":return n(Object(BigInt(s)),o)}return n(new AV[i](s),o)};return r},kV=e=>g2e(new Map,e)(0),Hd="",{toString:y2e}={},{keys:v2e}=Object,Gp=e=>{const t=typeof e;if(t!=="object"||!e)return[Kx,t];const n=y2e.call(e).slice(8,-1);switch(n){case"Array":return[Ww,Hd];case"Object":return[Gw,Hd];case"Date":return[ZO,Hd];case"RegExp":return[e2,Hd];case"Map":return[t2,Hd];case"Set":return[n2,Hd]}return n.includes("Array")?[Ww,n]:n.includes("Error")?[T8,n]:[Gw,n]},mb=([e,t])=>e===Kx&&(t==="function"||t==="symbol"),b2e=(e,t,n,r)=>{const o=(s,a)=>{const l=r.push(s)-1;return n.set(a,l),l},i=s=>{if(n.has(s))return n.get(s);let[a,l]=Gp(s);switch(a){case Kx:{let c=s;switch(l){case"bigint":a=R8,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return o([P8],s)}return o([a,c],s)}case Ww:{if(l)return o([l,[...s]],s);const c=[],d=o([a,c],s);for(const f of s)c.push(i(f));return d}case Gw:{if(l)switch(l){case"BigInt":return o([l,s.toString()],s);case"Boolean":case"Number":case"String":return o([l,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const c=[],d=o([a,c],s);for(const f of v2e(s))(e||!mb(Gp(s[f])))&&c.push([i(f),i(s[f])]);return d}case ZO:return o([a,s.toISOString()],s);case e2:{const{source:c,flags:d}=s;return o([a,{source:c,flags:d}],s)}case t2:{const c=[],d=o([a,c],s);for(const[f,h]of s)(e||!(mb(Gp(f))||mb(Gp(h))))&&c.push([i(f),i(h)]);return d}case n2:{const c=[],d=o([a,c],s);for(const f of s)(e||!mb(Gp(f)))&&c.push(i(f));return d}}const{message:u}=s;return o([a,{name:l,message:u}],s)};return i},PV=(e,{json:t,lossy:n}={})=>{const r=[];return b2e(!(t||n),!!t,new Map,r)(e),r},qw=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?kV(PV(e,t)):structuredClone(e):(e,t)=>kV(PV(e,t));function w2e(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function C2e(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function x2e(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||w2e,r=e.options.footnoteBackLabel||C2e,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),f=yp(d.toLowerCase());let h=0;const p=[],g=e.footnoteCounts.get(d);for(;g!==void 0&&++h<=g;){p.length>0&&p.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,h);typeof v=="string"&&(v={type:"text",value:v}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const b=c[c.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const v=b.children[b.children.length-1];v&&v.type==="text"?v.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...p)}else c.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(c,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...qw(s),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
3645`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
3646`}]}}const r2=function(e){if(e==null)return I2e;if(typeof e=="function")return Qx(e);if(typeof e=="object")return Array.isArray(e)?S2e(e):_2e(e);if(typeof e=="string")return E2e(e);throw new Error("Expected function, string, or object as test")};function S2e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=r2(e[n]);return Qx(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function _2e(e){const t=e;return Qx(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function E2e(e){return Qx(t);function t(n){return n&&n.type===e}}function Qx(e){return t;function t(n,r,o){return!!(A2e(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function I2e(){return!0}function A2e(e){return e!==null&&typeof e=="object"&&"type"in e}const O8=[],k2e=!0,TV=!1,P2e="skip";function M8(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=r2(o),s=r?-1:1;a(e,void 0,[])();function a(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=O8,p,g,b;if((!t||i(l,u,c[c.length-1]||void 0))&&(h=T2e(n(l,c)),h[0]===TV))return h;if("children"in l&&l.children){const y=l;if(y.children&&h[0]!==P2e)for(g=(r?y.children.length:-1)+s,b=c.concat(y);g>-1&&g<y.children.length;){const v=y.children[g];if(p=a(v,g,b)(),p[0]===TV)return p;g=typeof p[1]=="number"?p[1]:g+s}}return h}}}function T2e(e){return Array.isArray(e)?e:typeof e=="number"?[k2e,e]:e==null?O8:[e]}function D8(e,t,n,r){let o,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,o=n):(i=t,s=n,o=r),M8(e,i,a,o);function a(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return s(l,d,c)}}const XA={}.hasOwnProperty,R2e={};function O2e(e,t){const n=t||R2e,r=new Map,o=new Map,i=new Map,s={...m2e,...n.handlers},a={all:u,applyData:D2e,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:s,one:l,options:n,patch:M2e,wrap:F2e};return D8(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:o,f=String(c.identifier).toUpperCase();d.has(f)||d.set(f,c)}}),a;function l(c,d){const f=c.type,h=a.handlers[f];if(XA.call(a.handlers,f)&&h)return h(a,c,d);if(a.options.passThrough&&a.options.passThrough.includes(f)){if("children"in c){const{children:g,...b}=c,y=qw(b);return y.children=a.all(c),y}return qw(c)}return(a.options.unknownHandler||$2e)(a,c,d)}function u(c){const d=[];if("children"in c){const f=c.children;let h=-1;for(;++h<f.length;){const p=a.one(f[h],c);if(p){if(h&&f[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=RV(p.value)),!Array.isArray(p)&&p.type==="element")){const g=p.children[0];g&&g.type==="text"&&(g.value=RV(g.value))}Array.isArray(p)?d.push(...p):d.push(p)}}}return d}}function M2e(e,t){e.position&&(t.position=gTe(e))}function D2e(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,qw(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function $2e(e,t){const n=t.data||{},r="value"in t&&!(XA.call(n,"hProperties")||XA.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function F2e(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
3647`});++r<e.length;)r&&n.push({type:"text",value:`
3648`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
3649`}),n}function RV(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function OV(e,t){const n=O2e(e,t),r=n.one(e,void 0),o=x2e(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
3650`},o),i}function L2e(e,t){return e&&"run"in e?async function(n,r){const o=OV(n,{file:r,...t});await e.run(o,r)}:function(n,r){return OV(n,{file:r,...t||e})}}function MV(e){if(e)throw e}var r0=Object.prototype.hasOwnProperty,$8=Object.prototype.toString,DV=Object.defineProperty,$V=Object.getOwnPropertyDescriptor,FV=function(t){return typeof Array.isArray=="function"?Array.isArray(t):$8.call(t)==="[object Array]"},LV=function(t){if(!t||$8.call(t)!=="[object Object]")return!1;var n=r0.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&r0.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||r0.call(t,o)},NV=function(t,n){DV&&n.name==="__proto__"?DV(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},VV=function(t,n){if(n==="__proto__")if(r0.call(t,n)){if($V)return $V(t,n).value}else return;return t[n]},N2e=function e(){var t,n,r,o,i,s,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=VV(a,n),o=VV(t,n),a!==o&&(c&&o&&(LV(o)||(i=FV(o)))?(i?(i=!1,s=r&&FV(r)?r:[]):s=r&&LV(r)?r:{},NV(a,{name:n,newValue:e(c,s,o)})):typeof o<"u"&&NV(a,{name:n,newValue:o}));return a};const oE=Fh(N2e);function JA(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);
vendor: 4,461 bytes, line 3650
3650return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function V2e(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const s=o.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...o);function a(l,...u){const c=e[++i];let d=-1;if(l){s(l);return}for(;++d<o.length;)(u[d]===null||u[d]===void 0)&&(u[d]=o[d]);o=u,c?B2e(c,a)(...u):s(null,...u)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function B2e(e,t){let n;return r;function r(...s){const a=e.length>s.length;let l;a&&s.push(o);try{l=e.apply(this,s)}catch(u){const c=u;if(a&&n)throw c;return o(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(s,...a){n||(n=!0,t(s,...a))}function i(s){o(null,s)}}const Ws={basename:j2e,dirname:z2e,extname:U2e,join:H2e,sep:"/"};function j2e(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');iv(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else s<0&&(i=!0,s=o+1),a>-1&&(e.codePointAt(o)===t.codePointAt(a--)?a<0&&(r=o):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function z2e(e){if(iv(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function U2e(e){iv(e);let t=e.length,n=-1,r=0,o=-1,i=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function H2e(...e){let t=-1,n;for(;++t<e.length;)iv(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":W2e(n)}function W2e(e){iv(e);const t=e.codePointAt(0)===47;let n=G2e(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function G2e(e,t){let n="",r=0,o=-1,i=0,s=-1,a,l;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(o===s-1||i===1))if(o!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=s,i=0;continue}}else if(n.length>0){n="",r=0,o=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),r=s-o-1;o=s,i=0}else a===46&&i>-1?i++:i=-1}return n}function iv(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const q2e={cwd:K2e};function K2e(){return"/"}function ZA(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Q2e(e){if(typeof e=="string")e=new URL(e);else if(!ZA(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Y2e(e)}function Y2e(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const iE=["history","path","basename","stem","extname","dirname"];class F8{constructor(t){let n;t?ZA(t)?n={path:t}:typeof t=="string"||X2e(t)?n={value:t}:n=t:n={},this.cwd=q2e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<iE.length;){const i=iE[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)iE.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Ws.basename(this.path):void 0}
vendor: 5,609 bytes, line 3650
3650set basename(t){aE(t,"basename"),sE(t,"basename"),this.path=Ws.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ws.dirname(this.path):void 0}set dirname(t){BV(this.basename,"dirname"),this.path=Ws.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ws.extname(this.path):void 0}set extname(t){if(sE(t,"extname"),BV(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ws.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ZA(t)&&(t=Q2e(t)),aE(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ws.basename(this.path,this.extname):void 0}set stem(t){aE(t,"stem"),sE(t,"stem"),this.path=Ws.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new mo(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function sE(e,t){if(e&&e.includes(Ws.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ws.sep+"`")}function aE(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function BV(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function X2e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const J2e=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};Object.setPrototypeOf(i,r);const s=Object.getOwnPropertyNames(o);for(const a of s){const l=Object.getOwnPropertyDescriptor(o,a);l&&Object.defineProperty(i,a,l)}return i},Z2e={}.hasOwnProperty;class o2 extends J2e{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=V2e()}copy(){const t=new o2;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(oE(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(cE("data",this.frozen),this.namespace[t]=n,this):Z2e.call(this.namespace,t)&&this.namespace[t]||void 0:t?(cE("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=gb(t),r=this.parser||this.Parser;return lE("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),lE("process",this.parser||this.Parser),uE("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,s){const a=gb(t),l=r.parse(a);r.run(l,a,function(c,d,f){if(c||!d||!f)return u(c);const h=d,p=r.stringify(h,f);nMe(p)?f.value=p:f.result=p,u(c,f)});function u(c,d){c||!d?s(c):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),lE("processSync",this.parser||this.Parser),uE("processSync",this.compiler||this.Compiler),this.process(t,o),zV("processSync","process",n),r;function o(i,s){n=!0,MV(i),r=s}}run(t,n,r){jV(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,a){const l=gb(n);o.run(t,l,u);function u(c,d,f){const h=d||t;c?a(c):s?s(h):r(void 0,h,f)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),zV("runSync","run",r),o;function i(s,a){MV(s),o=a,r=!0}}stringify(t,n){this.freeze();const r=gb(n),o=this.compiler||this.Compiler;return uE("stringify",o),jV(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(cE("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;l(c,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(o.settings=oE(!0,o.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];i(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===u){f=d;break}if(f===-1)r.push([u,...c]);else if(c.length>0){let[h,...p]=c;const g=r[f][1];JA(g)&&JA(h)&&(h=oE(!0,g,h)),r[f]=[u,h,...p]}}}}const eMe=new o2().freeze();function lE(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uE(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function cE(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function jV(e){if(!JA(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}
3650function zV(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gb(e){return tMe(e)?e:new F8(e)}function tMe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function nMe(e){return typeof e=="string"||rMe(e)}function rMe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oMe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",UV=[],HV={allowDangerousHtml:!0},iMe=/^(https?|ircs?|mailto|xmpp)$/i,sMe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function aMe(e){const t=lMe(e),n=uMe(e);return cMe(t.runSync(t.parse(n),n),e)}function lMe(e){const t=e.rehypePlugins||UV,n=e.remarkPlugins||UV,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...HV}:HV;return eMe().use(UOe).use(n).use(L2e,r).use(t)}function uMe(e){const t=e.children||"",n=new F8;return typeof t=="string"&&(n.value=t),n}function cMe(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,s=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||dMe;for(const c of sMe)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+oMe+c.id,void 0);return D8(e,u),xTe(e,{Fragment:T.Fragment,components:o,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function u(c,d,f){if(c.type==="raw"&&f&&typeof d=="number")return s?f.children.splice(d,1):f.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let h;for(h in tE)if(Object.hasOwn(tE,h)&&Object.hasOwn(c.properties,h)){const p=c.properties[h],g=tE[h];(g===null||g.includes(c.tagName))&&(c.properties[h]=l(String(p||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):i?i.includes(c.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(c,d,f)),h&&f&&typeof d=="number")return a&&c.children?f.children.splice(d,1,...c.children):f.children.splice(d,1),d}}}function dMe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||iMe.test(e.slice(0,t))?e:""}function fMe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function hMe(e,t,n){const o=r2((n||{}).ignore||[]),i=pMe(t);let s=-1;for(;++s<i.length;)M8(e,"text",a);function a(u,c){let d=-1,f;for(;++d<c.length;){const h=c[d],p=f?f.children:void 0;if(o(h,p?p.indexOf(h):void 0,f))return;f=h}if(f)return l(u,c)}function l(u,c){const d=c[c.length-1],f=i[s][0],h=i[s][1];let p=0;const b=d.children.indexOf(u);let y=!1,v=[];f.lastIndex=0;let w=f.exec(u.value);for(;w;){const C=w.index,A={index:w.index,input:w.input,stack:[...c,u]};let S=h(...w,A);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?f.lastIndex=C+1:(p!==C&&v.push({type:"text",value:u.value.slice(p,C)}),Array.isArray(S)?v.push(...S):S&&v.push(S),p=C+w[0].length,y=!0),!f.global)break;w=f.exec(u.value)}return y?(p<u.value.length&&v.push({type:"text",value:u.value.slice(p)}),d.children.splice(b,1,...v)):v=[u],b+v.length}}function pMe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([mMe(o[0]),gMe(o[1])])}return t}function mMe(e){return typeof e=="string"?new RegExp(fMe(e),"g"):e}function gMe(e){return typeof e=="function"?e:function(){return e}}function yMe(e){hMe(e,[/\r?\n|\r/g,vMe])}function vMe(){return{type:"break"}}function bMe(){return function(e){yMe(e)}}const wMe={patchSpeaker:"Update speaker",patchSession:"Update session",patchEvent:"Update event",deleteSpeaker:"Delete speaker"},dE=e=>e===null?I("em",{children:"null"}):e===void 0?I("em",{children:"—"}):typeof e=="string"?e||I("em",{children:"(empty)"}):I("code",{style:{fontSize:"0.75rem"},children:JSON.stringify(e)}),CMe=({entry:e,onApply:t,onReject:n})=>{const{proposal:r,status:o,error:i}=e,s=r.kind==="deleteSpeaker",a=Object.keys(r.diff.before??{}),l=Object.keys(r.diff.after??{}),u=Array.from(new Set([...a,...l]));return J(fo,{variant:"outlined",sx:{borderColor:s?"error.main":"warning.main",p:1.5,my:1},children:[J(vc,{direction:"row",alignItems:"center",spacing:1,sx:{mb:1},children:[I(Ps,{size:"small",label:wMe[r.kind],color:s?"error":"warning"}),I(Ae,{variant:"body2",sx:{fontWeight:600},children:r.target.label||r.target.id})]}),r.summary&&I(Ae,{variant:"caption",color:"text.secondary",sx:{dis
3650play:"block",mb:.5},children:r.summary}),r.rationale&&J(Ae,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:1,fontStyle:"italic"},children:["Reason (from assistant): ",r.rationale]}),J(Me,{sx:{display:"grid",gridTemplateColumns:"auto 1fr 1fr",columnGap:1,rowGap:.5,fontSize:"0.85rem",mb:1.5},children:[I(Ae,{variant:"caption",sx:{fontWeight:700},children:"field"}),I(Ae,{variant:"caption",sx:{fontWeight:700},children:"before"}),I(Ae,{variant:"caption",sx:{fontWeight:700},children:"after"}),s?J(Ft,{children:[I(Ae,{variant:"caption",children:"document"}),I(Ae,{variant:"caption",component:"div",children:dE(r.diff.before)}),I(Ae,{variant:"caption",component:"div",color:"error",children:"(deleted)"})]}):u.map(c=>{var d,f;return J(m.Fragment,{children:[I(Ae,{variant:"caption",sx:{fontFamily:"monospace"},children:c}),I(Ae,{variant:"caption",component:"div",color:"text.secondary",children:dE((d=r.diff.before)==null?void 0:d[c])}),I(Ae,{variant:"caption",component:"div",children:dE((f=r.diff.after)==null?void 0:f[c])})]},c)})]}),i&&I(so,{severity:"error",sx:{mb:1},children:i}),o==="pending"&&J(vc,{direction:"row",spacing:1,children:[I(gt,{size:"small",variant:"contained",color:s?"error":"primary",startIcon:I(UO,{}),onClick:()=>t(e.id),children:s?"Confirm delete":"Apply"}),I(gt,{size:"small",variant:"outlined",startIcon:I(rv,{}),onClick:()=>n(e.id),children:"Reject"})]}),o==="applying"&&J(vc,{direction:"row",spacing:1,alignItems:"center",children:[I(Qn,{size:16}),I(Ae,{variant:"caption",children:"Applying…"})]}),o==="applied"&&I(so,{severity:"success",sx:{py:0},children:"Applied"}),o==="rejected"&&I(so,{severity:"info",sx:{py:0},children:"Rejected"}),o==="failed"&&I(vc,{direction:"row",spacing:1,sx:{mt:1},children:I(gt,{size:"small",variant:"outlined",onClick:()=>t(e.id),children:"Retry"})})]})},xMe=({turns:e,streaming:t,proposals:n,onApplyProposal:r,onRejectProposal:o,onApplyAllProposals:i,onRejectAllProposals:s})=>{const a=Zn(),l=m.useRef(null);return m.useEffect(()=>{var u;(u=l.current)==null||u.scrollTo({top:l.current.scrollHeight,behavior:"smooth"})},[e]),I(Me,{ref:l,sx:{flexGrow:1,overflowY:"auto",p:2,display:"flex",flexDirection:"column",gap:1.5},children:e.map((u,c)=>{const d=u.role==="user",f=(u.proposalIds??[]).map(h=>n[h]).filter(Boolean);return J(Me,{sx:{alignSelf:d?"flex-end":"flex-start",maxWidth:"95%",display:"flex",flexDirection:"column",gap:.5},children:[J(fo,{elevation:0,sx:{alignSelf:d?"flex-end":"flex-start",maxWidth:"100%",bgcolor:d?"primary.main":"action.hover",color:d?"primary.contrastText":"text.primary",px:1.5,py:1,borderRadius:2},children:[u.tools&&u.tools.length>0&&I(Me,{sx:{mb:u.content?1:0,display:"flex",flexWrap:"wrap",gap:.5},children:u.tools.map(h=>I(Ps,{size:"small",label:`${h.name}${h.result===void 0?"…":""}`,variant:"outlined",sx:{fontSize:"0.7rem"}},h.id))}),d?I(Ae,{variant:"body2",sx:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:u.content}):u.content?I(Me,{sx:{fontSize:a.typography.body2.fontSize,lineHeight:a.typography.body2.lineHeight,color:"text.primary",wordBreak:"break-word","& p":{m:0,mb:1,"&:last-child":{mb:0}},"& ul, & ol":{pl:3,m:0,mb:1},"& li":{mb:.25},"& code":{bgcolor:"action.selected",px:.5,py:.1,borderRadius:.5,fontFamily:"monospace",fontSize:"0.85em"},"& pre":{bgcolor:"action.selected",p:1,borderRadius:1,overflowX:"auto",mb:1},"& pre code":{bgcolor:"transparent",p:0},"& a":{color:"primary.main"},"& h1, & h2, & h3, & h4":{mt:1,mb:.5,fontWeight:600},"& blockquote":{borderLeft:"3px solid",borderColor:"divider",pl:1.5,ml:0,color:"text.secondary"},"& table":{borderCollapse:"collapse"},"& th, & td":{border:"1px solid",borderColor:"divider",px:1,py:.5}},children:I(aMe,{remarkPlugins:[bMe],children:u.content})}):I(Ae,{variant:"body2",color:"text.secondary",children:t&&c===e.length-1?"…":""})]}),f.length>1&&f.some(h=>h.status==="pending")&&J(fo,{variant:"outlined",sx:{mt:1,px:1.5,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"background.paper"},children:[J(Ae,{variant:"caption",sx:{fontWeight:600},children:["Batch: ",f.filter(h=>h.status==="pending").length," pending"," · ",f.filter(h=>h.status==="applied").length," applied"," · ",f.filter(h=>h.status==="rejected").length," rejected"]}),J(vc,{direction:"row",spacing:1,children:[I(gt,{size:"small",variant:"contained",startIcon:I(UO,{}),onClick:()=>i(f.filter(h=>h.status==="pending").map(h=>h.id)),children:"Apply all"}),I(gt,{size:"small",variant:"outlined",startIcon:I(rv,{}),onClick:()=>s(f.filter(h=>h.status==="pending").map(h=>h.id)),children:"Reject all"})]})]}),f.map(h=>I(CMe,{entry:h,onApply:r,onReject:o},h.id))]},c)})})},i2=async(e,t)=>{const n=jr(cn.events,e);return await tO(n,{...t})},SMe="https://openrouter.ai/api/v1/auth/key",_Me=e=>/^sk-or-[\w-]{10,}$/i.test(e.trim()),EMe=async e=>{try{const t=await fetch(SMe,{method:"GET",headers:{Authorization:`Bearer ${e}`,"HTTP-Referer":"https://openplanner.fr","X-Title":"OpenPlanner"}});
3650if(t.status===401||t.status===403)return{ok:!1,error:"OpenRouter rejected this key (unauthorized)."};if(!t.ok){const n=await t.text().catch(()=>"");return{ok:!1,error:`OpenRouter responded with ${t.status}: ${n||t.statusText}`}}return{ok:!0}}catch(t){return{ok:!1,error:t instanceof Error?t.message:"Could not reach OpenRouter."}}},IMe=({event:e,onSaved:t})=>{const[n,r]=m.useState(""),[o,i]=m.useState(!1),[s,a]=m.useState(!1),[l,u]=m.useState(null),c=_Me(n),d=s||n.trim().length===0,f=async()=>{const h=n.trim();if(h){a(!0),u(null);try{const p=await EMe(h);if(!p.ok){u(p.error);return}await i2(e.id,{openRouterAPIKey:h}),t(h)}catch(p){u(p instanceof Error?p.message:"Failed to save the API key.")}finally{a(!1)}}};return J(Me,{sx:{flexGrow:1,overflowY:"auto",p:2.5},children:[I(Ae,{variant:"h6",sx:{mb:1},children:"Set up the OpenPlanner assistant"}),J(Ae,{variant:"body2",sx:{mb:2},children:["The assistant lets you ask questions about ",I("strong",{children:e.name})," and propose edits in plain English. Every change is shown as a diff that you explicitly approve before anything is written."]}),I(Ae,{variant:"subtitle2",sx:{mb:.5},children:"What it can do"}),J(Me,{component:"ul",sx:{pl:3,m:0,mb:2,"& li":{mb:.5}},children:[I(Ae,{component:"li",variant:"body2",children:"Read your event data — sessions, speakers, sponsors, FAQ, event settings."}),I(Ae,{component:"li",variant:"body2",children:"Propose patches to speakers (incl. private fields like email/phone), sessions, and event-level settings."}),I(Ae,{component:"li",variant:"body2",children:"Propose deletions (speakers)."}),I(Ae,{component:"li",variant:"body2",children:"Batch related changes — review and apply them all at once."})]}),I(Ae,{variant:"subtitle2",sx:{mb:.5},children:"What it never does"}),J(Me,{component:"ul",sx:{pl:3,m:0,mb:2,"& li":{mb:.5}},children:[I(Ae,{component:"li",variant:"body2",children:"Write any change without your explicit approval."}),I(Ae,{component:"li",variant:"body2",children:"See your event's API keys, transcription password, or sponsor management tokens."})]}),J(so,{severity:"info",sx:{mb:2},children:["The assistant runs through"," ",I(Mu,{href:"https://openrouter.ai",target:"_blank",rel:"noopener noreferrer",children:"OpenRouter"}),". You bring your own API key — billing happens directly on your OpenRouter account, not OpenPlanner. The key is stored on this event document. Anyone with admin access to this event can read it (same level as the existing OpenAI / Gladia keys), and the OpenPlanner backend uses it to call OpenRouter on your behalf."]}),I(Ae,{variant:"subtitle2",sx:{mb:.5},children:"Get a key"}),J(Ae,{variant:"body2",sx:{mb:2},children:["Sign in at"," ",I(Mu,{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",children:"openrouter.ai/keys"}),", click ",I("strong",{children:"Create key"}),", copy the value (starts with ",I("code",{children:"sk-or-…"}),") and paste it below."]}),J(vc,{spacing:1.5,children:[I(es,{label:"OpenRouter API key",placeholder:"sk-or-v1-…",value:n,onChange:h=>r(h.target.value),type:o?"text":"password",autoComplete:"off",autoFocus:!0,fullWidth:!0,size:"small",disabled:s,error:n.length>0&&!c,helperText:n.length===0?"We will validate the key with OpenRouter before saving.":c?"Format looks right. We'll verify with OpenRouter when you save.":"Expected format: sk-or-… Make sure you copied the full key.",InputProps:{endAdornment:I(Ou,{position:"end",children:I(Zt,{size:"small",onClick:()=>i(h=>!h),"aria-label":o?"Hide API key":"Show API key",edge:"end",children:o?I(IO,{}):I(_O,{})})})},onKeyDown:h=>{h.key==="Enter"&&!d&&(h.preventDefault(),f())}}),l&&I(so,{severity:"error",children:l}),I(gt,{variant:"contained",onClick:f,disabled:d,startIcon:s?I(Qn,{size:16}):null,children:s?"Verifying…":"Save and start chatting"}),I(Ae,{variant:"caption",color:"text.secondary",children:"You can change or remove the key later under Event Settings → Other stuffs → OpenRouter API key."})]})]})},AMe=(e,t)=>{const n=new URL(Hke),r=n.pathname.replace(/\/$/,"");return n.pathname=`${r}/v1/${e}/chat`,n.searchParams.set("apiKey",t),n.href},WV=(e,t)=>{const n=new URL(cl),r=n.pathname.replace(/\/$/,"");return n.pathname=`${r}${e}`,n.searchParams.set("apiKey",t),n.href},GV=e=>{const t=[];for(const n of e.split(`
3651
3652`)){const r=n.trim();if(!r.startsWith("data:"))continue;const o=r.slice(5).trim();if(!(!o||o==="[DONE]"))try{t.push(JSON.parse(o))}catch{}}return t},kMe=(e,t)=>{const[n,r]=m.useState({turns:[],streaming:!1,error:null,eventSummary:null,proposals:{}}),o=m.useRef(""),i=m.useRef(void 0),s=m.useRef(null),a=m.useRef(!0);m.useEffect(()=>()=>{var y;a.current=!1,(y=s.current)==null||y.abort(),s.current=null},[]);const l=m.useCallback(()=>{var y;(y=s.current)==null||y.abort(),s.current=null,r(v=>({...v,streaming:!1}))},[]),u=m.useCallback(()=>{var y;(y=s.current)==null||y.abort(),s.current=null,r({turns:[],streaming:!1,error:null,eventSummary:null,proposals:{}})},[]),c=m.useCallback((y,v)=>{r(w=>{const C=w.proposals[y];return C?{...w,proposals:{...w.proposals,[y]:{...C,...v}}}:w})},[]),d=m.useCallback(async(y,v,w)=>{if(!t)return!1;try{const C=await fetch(WV(`/v1/${e}/ai-actions`,t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:y.proposal.kind,target:y.proposal.target,args:{proposalId:y.id,target:y.proposal.target,method:y.proposal.endpoint.method,path:y.proposal.endpoint.path,body:y.proposal.endpoint.body??null},diff:y.proposal.diff,summary:y.proposal.summary,prompt:y.prompt,model:y.model,applied:v,rejected:w})});if(!C.ok){const A=await C.text().catch(()=>"");return console.warn(`AI audit log returned ${C.status}: ${A||C.statusText}`),!1}return!0}catch(C){return console.warn("Failed to record AI action audit log:",C),!1}},[e,t]),f=m.useCallback(async y=>{if(!t)return;const v=n.proposals[y];if(!(!v||v.status!=="pending")){c(y,{status:"applying",error:void 0});try{const w=WV(v.proposal.endpoint.path,t),C={method:v.proposal.endpoint.method,headers:{"Content-Type":"application/json"}};v.proposal.endpoint.body&&v.proposal.endpoint.method!=="DELETE"&&(C.body=JSON.stringify(v.proposal.endpoint.body));const A=await fetch(w,C);if(!A.ok){const _=await A.text().catch(()=>"");c(y,{status:"failed",error:`${A.status}: ${_||A.statusText}`});return}c(y,{status:"applied"}),await d(v,!0,!1)||c(y,{error:"Change applied, but writing the audit log failed. The action was performed."})}catch(w){c(y,{status:"failed",error:w instanceof Error?w.message:"Unknown error"})}}},[t,n.proposals,c,d]),h=m.useCallback(y=>{const v=n.proposals[y];!v||v.status!=="pending"||(c(y,{status:"rejected"}),d(v,!1,!0))},[n.proposals,c,d]),p=m.useCallback(async y=>{var v;
3652for(const w of y)((v=n.proposals[w])==null?void 0:v.status)==="pending"&&await f(w)},[f,n.proposals]),g=m.useCallback(y=>{var v;for(const w of y)((v=n.proposals[w])==null?void 0:v.status)==="pending"&&h(w)},[h,n.proposals]),b=m.useCallback(async y=>{if(!t){r(C=>({...C,error:"Event has no API key configured."}));return}if(!y.trim())return;o.current=y,i.current=void 0;const v=[...n.turns,{role:"user",content:y}];r(C=>({...C,turns:[...v,{role:"assistant",content:"",tools:[],proposalIds:[]}],streaming:!0,error:null}));const w=new AbortController;s.current=w;try{const C=await fetch(AMe(e,t),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({messages:v.map(({role:M,content:R})=>({role:M,content:R}))}),signal:w.signal});if(!C.ok){const M=await C.text().catch(()=>"");r(R=>({...R,streaming:!1,error:`Chat request failed (${C.status}): ${M||C.statusText}`}));return}if(!C.body){r(M=>({...M,streaming:!1,error:"Empty response body"}));return}const A=C.body.getReader(),S=new TextDecoder;let _="";const k=M=>{if(M.type==="eventSummary"&&M.model&&(i.current=M.model),M.type==="proposal"){const R=o.current,O=i.current;r(F=>qV(F,M,{prompt:R,model:O}))}else r(R=>qV(R,M))};for(;;){const{value:M,done:R}=await A.read();if(R)break;_+=S.decode(M,{stream:!0});const O=_.lastIndexOf(`
3653
3654`);if(O===-1)continue;const F=_.slice(0,O+2);_=_.slice(O+2);for(const N of GV(F))k(N)}if(_.trim().length>0)for(const M of GV(_))k(M)}catch(C){if((C==null?void 0:C.name)==="AbortError"){r(A=>({...A,streaming:!1}));return}r(A=>({...A,streaming:!1,error:C instanceof Error?C.message:"Unknown error"}))}finally{s.current=null,r(C=>({...C,streaming:!1}))}},[e,t,n.turns]);return{state:n,send:b,cancel:l,reset:u,applyProposal:f,rejectProposal:h,applyAllProposals:p,rejectAllProposals:g}},qV=(e,t,n)=>{switch(t.type){case"eventSummary":return{...e,eventSummary:t.event};case"content":{const r=[...e.turns],o=r[r.length-1];if(o&&o.role==="assistant"){const s=o.pendingSeparator&&o.content.length>0&&!o.content.endsWith(`
3655
3656`)?`${o.content.endsWith(`
3657`)?`
3658`:`
3659
3660`}${t.delta}`:t.delta;r[r.length-1]={...o,content:o.content+s,pendingSeparator:!1}}return{...e,turns:r}}case"toolCall":{const r=[...e.turns],o=r[r.length-1];if(o&&o.role==="assistant"){const i=[...o.tools??[],{id:t.id,name:t.name,args:t.arguments}];r[r.length-1]={...o,tools:i}}return{...e,turns:r}}case"toolResult":{const r=[...e.turns],o=r[r.length-1];if(o&&o.role==="assistant"&&o.tools){const i=o.tools.map(s=>s.id===t.id?{...s,result:t.result}:s);r[r.length-1]={...o,tools:i,pendingSeparator:!0}}return{...e,turns:r}}case"proposal":{const r="pending",o={...e.proposals,[t.id]:{id:t.id,proposal:t.proposal,status:r,prompt:n==null?void 0:n.prompt,model:n==null?void 0:n.model}},i=[...e.turns],s=i[i.length-1];if(s&&s.role==="assistant"){const a=[...s.proposalIds??[],t.id];i[i.length-1]={...s,proposalIds:a}}return{...e,turns:i,proposals:o}}case"error":return{...e,error:t.error,streaming:!1};default:return e}},PMe=({event:e,open:t,onClose:n})=>{var C,A;const[r,o]=m.useState(e.apiKey??null),[i,s]=m.useState(!1),[a,l]=m.useState(null),[u,c]=m.useState(!!e.openRouterAPIKey);m.useEffect(()=>{c(!!e.openRouterAPIKey)},[e.openRouterAPIKey]);const{state:d,send:f,cancel:h,reset:p,applyProposal:g,rejectProposal:b,applyAllProposals:y,rejectAllProposals:v}=kMe(e.id,r);m.useEffect(()=>{if(!t||r||i||!u)return;let S=!1;return s(!0),l(null),(async()=>{try{const _=$O();await i2(e.id,{apiKey:_}),S||o(_)}catch(_){S||l(_ instanceof Error?`Failed to provision an event API key: ${_.message}`:"Failed to provision an event API key.")}finally{S||s(!1)}})(),()=>{S=!0}},[t,r,i,u,e.id]);const w=m.useCallback(()=>{h(),n()},[h,n]);return I(ew,{anchor:"right",open:t,onClose:w,PaperProps:{sx:{width:{xs:"100%",sm:480}}},children:J(Me,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[J(Me,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:2,py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:[J(Me,{children:[I(Ae,{variant:"h6",children:"Event assistant"}),J(Ae,{variant:"caption",color:"text.secondary",children:["Read-only preview · ",((C=d.eventSummary)==null?void 0:C.sessionsCount)??"·"," sessions ·"," ",((A=d.eventSummary)==null?void 0:A.speakersCount)??"·"," speakers"]})]}),J(Me,{children:[I(Zt,{size:"small",onClick:p,"aria-label":"Reset conversation",sx:{mr:.5},children:I(Ae,{variant:"caption",children:"Clear"})}),I(Zt,{size:"small",onClick:w,"aria-label":"Close",children:I(rv,{})})]})]}),u?J(Ft,{children:[J(so,{severity:"info",sx:{m:1},children:["The assistant proposes changes that you must explicitly approve. Nothing is written to the event until you click ",I("strong",{children:"Apply"})," on a proposal card."]}),a&&I(so,{severity:"error",sx:{mx:1,mb:1},children:a}),d.error&&I(so,{severity:"error",sx:{mx:1,mb:1},children:d.error}),I(xMe,{turns:d.turns,streaming:d.streaming,proposals:d.proposals,onApplyProposal:g,onRejectProposal:b,onApplyAllProposals:y,onRejectAllProposals:v}),I(MPe,{streaming:d.streaming,disabled:!r||i,onSend:f,onCancel:h})]}):I(IMe,{event:e,onSaved:()=>c(!0)})]})})},Ef=240,TMe=he(Hne,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...t&&{marginLeft:Ef,width:`calc(100% - ${Ef}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}})),L8=m.createContext({rightToolbarElement:null,titleElement:null}),RMe=()=>{const{titleElement:e}=m.useContext(L8);return e},YUe=({children:e})=>{const t=RMe();return t?md.createPortal(e,t):null},OMe=({children:e,event:t,customTitle:n})=>{const r=Zn(),o=Hh(r.breakpoints.down("sm")),[i,s]=Eg("/:routeName"),[a,l]=Eg("/:routeName/:subRoute"),[u,c]=m.useState(!0),[d,f]=m.useState(!1),[h,p]=m.useState(!1),[g,b]=m.useState(null),[y,v]=m.useState(null),[w,C]=m.useState(!1);m.useEffect(()=>{if(y){const O=new MutationObserver(F=>{C(y.childNodes.length>0)});return O.observe(y,{childList:!0,subtree:!0}),()=>{O.disconnect()}}},[y]);const A=()=>{f(!0),c(!1)},S=()=>{d||(c(!u),f(!0))},_=()=>{f(!1)},k=$7.find(O=>`/${s==null?void 0:s.routeName}`.startsWith(O.href)||`/${l==null?void 0:l.routeName}`.startsWith(O.href)),M=k?k.name:"Loading...",R=(k==null?void 0:k.href)==="/schedule"||(s==null?void 0:s.routeName)==="whatsapp";return I(L8.Provider,{value:{rightToolbarElement:g,titleElement:y},children:I(xPe,{event:t,children:J(Me,{sx:{display:"flex"},children:[!R&&I(TMe,{position:"absolute",open:!o||u,children:J(rw,{sx:{pr:"24px",display:"flex",justifyContent:"space-between"},children:[J(Me,{sx:{display:"flex",alignItems:"center"},children:[I(Zt,{edge:"start",color:"inherit","aria-label":"open drawer",onClick:S,sx:{mr:2,display:{sm:"none"}},children:I(F7,{})}),I(Ae,{component:"h1",variant:"h6",color:"inherit",noWrap:!0,ref:v}),!w&&I(Ae,{component:"h1",variant:"h6",color:"inherit",noWrap:!0,children:M})]}),J(Me,{sx:{display:"flex",alignItems:"center",gap:1},children:[I("div",{ref:b}),I(Zt,{color:"inherit","aria-label":"open chat assistant",onClick:()=>p(!0),children:I(L7,{})})]})]})}
3660),I(PMe,{event:t,open:h,onClose:()=>p(!1)}),J(Me,{component:"nav",sx:{width:{sm:Ef},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:[I(ew,{variant:"temporary",open:u,onTransitionEnd:_,onClose:A,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",sm:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:Ef}},children:I(eV,{event:t})}),I(ew,{variant:"permanent",sx:{display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:Ef}},open:!0,children:I(eV,{event:t})})]}),J(Me,{component:"main",sx:{flexGrow:1,height:"100vh",width:{sm:`calc(100% - ${Ef}px)`},overflow:"auto"},children:[!R&&I(rw,{}),e]})]})})})},MMe=e=>{const t=jr(cn.events,e);return FO(t,!0)},s2=({hookResult:e})=>e.isLoading?I(Qn,{}):e.isError?I(Ft,{children:I(Ae,{variant:"body1",children:J(Ft,{children:["Error: ",String(e.error)]})})}):null,DMe=El`
3661    from { opacity: 0 }
3662    to { opacity: 1 }
3663`,$Me=Qc`
3664    text-align: center;
3665    display: flex;
3666    align-items: center;
3667    justify-content: center;
3668    flex-direction: column;
3669    opacity: 0;
3670    transition: all 1s ease-in;
3671    animation-name: ${DMe};
3672    animation-delay: 500ms;
3673    animation-duration: 300ms;
3674    animation-fill-mode: forwards;
3675    width: 100%;
3676    height: 100vh;
3677    '& > div': {
3678       color: #550000;
3679    },
3680`,vn=()=>I("div",{css:$Me,children:I(Qn,{"aria-label":"Loading..."})}),a2="openplanner.chunkReloadAttempted",FMe=e=>{if(!(e instanceof Error))return!1;const t=`${e.name} ${e.message}`;return/ChunkLoadError/i.test(t)||/Loading chunk \S+ failed/i.test(t)||/Failed to fetch dynamically imported module/i.test(t)||/error loading dynamically imported module/i.test(t)||/Importing a module script failed/i.test(t)},LMe=()=>{try{window.sessionStorage.removeItem(a2)}catch{}},NMe=()=>{try{return window.sessionStorage.getItem(a2)==="1"}catch{return!0}},VMe=()=>{try{window.sessionStorage.setItem(a2,"1")}catch{}},Vn=e=>m.lazy(async()=>{try{const t=await e();return LMe(),t}catch(t){const n=NMe();if(FMe(t)&&!n)return VMe(),window.location.reload(),new Promise(()=>{});throw t}}),N8=({isOpen:e,onClose:t,title:n,children:r,containerProps:o})=>I(ew,{anchor:"right",open:e,onClose:t,sx:{zIndex:1500},...o,children:J(Me,{margin:1,sx:{maxWidth:300,minWidth:380,padding:2,height:"auto",bottom:0,display:"flex",flexDirection:"column"},children:[I(Me,{justifyContent:"flex-end",marginBottom:2,display:"flex",flex:1,children:I(Zt,{"aria-label":"Close the side panel",onClick:t,children:I(rv,{})})}),I(Ae,{variant:"h6",children:n}),r]})});var BMe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function sv(e,t){var n=jMe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>
36800?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function jMe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=BMe.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var zMe=[".DS_Store","Thumbs.db"];function UMe(e){return Jh(this,void 0,void 0,function(){return Zh(this,function(t){return Kw(e)&&HMe(e.dataTransfer)?[2,KMe(e.dataTransfer,e.type)]:WMe(e)?[2,GMe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,qMe(e)]:[2,[]]})})}function HMe(e){return Kw(e)}function WMe(e){return Kw(e)&&Kw(e.target)}function Kw(e){return typeof e=="object"&&e!==null}function GMe(e){return ek(e.target.files).map(function(t){return sv(t)})}function qMe(e){return Jh(this,void 0,void 0,function(){var t;return Zh(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return sv(r)})]}})})}function KMe(e,t){return Jh(this,void 0,void 0,function(){var n,r;return Zh(this,function(o){switch(o.label){case 0:return e.items?(n=ek(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(QMe))]):[3,2];case 1:return r=o.sent(),[2,KV(V8(r))];case 2:return[2,KV(ek(e.files).map(function(i){return sv(i)}))]}})})}function KV(e){return e.filter(function(t){return zMe.indexOf(t.name)===-1})}function ek(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function QMe(e){if(typeof e.webkitGetAsEntry!="function")return QV(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?B8(t):QV(e)}function V8(e){return e.reduce(function(t,n){return TF(TF([],PF(t),!1),PF(Array.isArray(n)?V8(n):[n]),!1)},[])}function QV(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=sv(t);return Promise.resolve(n)}function YMe(e){return Jh(this,void 0,void 0,function(){return Zh(this,function(t){return[2,e.isDirectory?B8(e):XMe(e)]})})}function B8(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return Jh(s,void 0,void 0,function(){var l,u,c;return Zh(this,function(d){switch(d.label){case 0:if(a.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=d.sent(),n(l),[3,4];case 3:return u=d.sent(),r(u),[3,4];case 4:return[3,6];case 5:c=Promise.all(a.map(YMe)),o.push(c),i(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function XMe(e){return Jh(this,void 0,void 0,function(){return Zh(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=sv(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var JMe=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function YV(e){return tDe(e)||eDe(e)||z8(e)||ZMe()}function ZMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3681In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tDe(e){if(Array.isArray(e))return tk(e)}function XV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function JV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XV(Object(n),!0).forEach(function(r){j8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qg(e,t){return oDe(e)||rDe(e,t)||z8(e,t)||nDe()}
vendor: 12,149 bytes, lines 3681-3684
3681function nDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3682In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z8(e,t){if(e){if(typeof e=="string")return tk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tk(e,t)}}function tk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rDe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function oDe(e){if(Array.isArray(e))return e}var iDe="file-invalid-type",sDe="file-too-large",aDe="file-too-small",lDe="too-many-files",uDe=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:iDe,message:"File type must be ".concat(n)}},ZV=function(t){return{code:sDe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},e4=function(t){return{code:aDe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},cDe={code:lDe,message:"Too many files"};function U8(e,t){var n=e.type==="application/x-moz-file"||JMe(e,t);return[n,n?null:uDe(t)]}function H8(e,t,n){if(dc(e.size))if(dc(t)&&dc(n)){if(e.size>n)return[!1,ZV(n)];if(e.size<t)return[!1,e4(t)]}else{if(dc(t)&&e.size<t)return[!1,e4(t)];if(dc(n)&&e.size>n)return[!1,ZV(n)]}return[!0,null]}function dc(e){return e!=null}function dDe(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var u=U8(l,n),c=Qg(u,1),d=c[0],f=H8(l,r,o),h=Qg(f,1),p=h[0],g=a?a(l):null;return d&&p&&!g})}function Qw(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function yb(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function t4(e){e.preventDefault()}function fDe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function hDe(e){return e.indexOf("Edge/")!==-1}function pDe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return fDe(e)||hDe(e)}function js(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!Qw(r)&&a&&a.apply(void 0,[r].concat(i)),Qw(r)})}}function mDe(){return"showOpenFilePicker"in window}function gDe(e){if(dc(e)){var t=Object.entries(e).filter(function(n){var r=Qg(n,2),o=r[0],i=r[1],s=!0;return W8(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(G8))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Qg(r,2),i=o[0],s=o[1];return JV(JV({},n),{},j8({},i,s))},{});return[{description:"Files",accept:t}]}return e}function yDe(e){if(dc(e))return Object.entries(e).reduce(function(t,n){var r=Qg(n,2),o=r[0],i=r[1];return[].concat(YV(t),[o],YV(i))},[]).filter(function(t){return W8(t)||G8(t)}).join(",")}function vDe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function bDe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function W8(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function G8(e){return/^.*\.[\w]+$/.test(e)}var wDe=["children"],CDe=["open"],xDe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],SDe=["refKey","onChange","onClick"];function _De(e){return ADe(e)||IDe(e)||q8(e)||EDe()}function EDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3683In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ADe(e){if(Array.isArray(e))return nk(e)}function fE(e,t){return TDe(e)||PDe(e,t)||q8(e,t)||kDe()}function kDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3684In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q8(e,t){if(e){if(typeof e=="string")return nk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nk(e,t)}}function nk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function PDe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function TDe(e){if(Array.isArray(e))return e}function n4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n4(Object(n),!0).forEach(function(r){rk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yw(e,t){if(e==null)return{};var n=RDe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RDe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var l2=m.forwardRef(function(e,t){var n=e.children,r=Yw(e,wDe),o=Q8(r),i=o.open,s=Yw(o,CDe);return m.useImperativeHandle(t,function(){return{open:i}},[i]),ot.createElement(m.Fragment,null,n(On(On({},s),{},{open:i})))});l2.displayName="Dropzone";var K8={disabled:!1,getFilesFromEvent:UMe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};l2.defaultProps=K8;l2.propTypes={children:ce.func,accept:ce.objectOf(ce.arrayOf(ce.string)),multiple:ce.bool,preventDropOnDocument:ce.bool,noClick:ce.bool,noKeyboard:ce.bool,noDrag:ce.bool,noDragEventsBubbling:ce.bool,minSize:ce.number,maxSize:ce.number,maxFiles:ce.number,disabled:ce.bool,getFilesFromEvent:ce.func,onFileDialogCancel:ce.func,onFileDialogOpen:ce.func,useFsAccessApi:ce.bool,autoFocus:ce.bool,onDragEnter:ce.func,onDragLeave:ce.func,onDragOver:ce.func,onDrop:ce.func,onDropAccepted:ce.func,onDropRejected:ce.func,onError:ce.func,validator:ce.func};var ok={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Q8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=On(On({},K8),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,g=t.onFileDialogCancel,b=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,w=t.preventDropOnDocument,C=t.noClick,A=t.noKeyboard,S=t.noDrag,_=t.noDragEventsBubbling,k=t.onError,M=t.validator,R=m.useMemo(function(){return yDe(n)},[n]),O=m.useMemo(function(){return gDe(n)},[n]),F=m.useMemo(function(){return typeof b=="function"?b:r4},[b]),N=m.useMemo(function(){return typeof g=="function"?g:r4},[g]),V=m.useRef(null),$=m.useRef(null),D=m.useReducer(ODe,ok),L=fE(D,2),P=L[0],B=L[1],E=P.isFocused,z=P.isFileDialogActive,H=m.useRef(typeof window<"u"&&window.isSecureContext&&y&&mDe()),j=function(){!H.current&&z&&setTimeout(function(){if($.current){var W=$.current.files;W.length||(B({type:"closeDialog"}),N())}},300)};m.useEffect(function(){return window.addEventListener("focus",j,!1),function(){window.removeEventListener("focus",j,!1)}},[$,z,N,H]);var G=m.useRef([]),Q=function(W){V.current&&V.current.contains(W.target)||(W.preventDefault(),G.current=[])};m.useEffect(function(){return w&&(document.addEventListener("dragover",t4,!1),document.addEventListener("drop",Q,!1)),function(){w&&(document.removeEventListener("dragover",t4),document.removeEventListener("drop",Q))}},[V,w]),m.useEffect(function(){return!r&&v&&V.current&&V.current.focus(),function(){}},[V,v,r]);var ee=m.useCallback(function(X){k?k(X):console.error(X)},[k]),Y=m.useCallback(function(X){X.preventDefault(),X.persist(),K(X),G.current=[].concat(_De(G.current),[X.target]),yb(X)&&Promise.resolve(o(X)).then(function(W){if(!(Qw(X)&&!_)){var le=W.length,_e=le>0&&dDe({files:W,accept:R,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:M}),ne=le>0&&!_e;B({isDragAccept:_e,isDragReject:ne,isDragActive:!0,type:"setDraggedFiles"}),u&&u(X)}}).catch(function(W){return ee(W)})},[o,u,ee,_,R,s,i,a,l,M]),se=m.useCallback(function(X){X.preventDefault(),X.persist(),K(X);var W=yb(X);if(W&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return W&&d&&d(X),!1},[d,_]),fe=m.useCallback(function(X){X.preventDefault(),X.persist(),K(X);var W=G.current.filter(function(_e){return V.current&&V.current.contains(_e)}),le=W.indexOf(X.target);le!==-1&&W.splice(le,1),G.current=W,!(W.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),yb(X)&&c&&c(X))},[V,c,_]),ve=m.useCallback(function(X,W){var le=[],_e=[];X.forEach(function(ne){var te=U8(ne,R),ke=fE(te,2),Ve=ke[0],Fe=ke[1],Ie=H8(ne,s,i),Be=fE(Ie,2),Ee=Be[0],Te=Be[1],We=M?M(ne):null;if(Ve&&Ee&&!We)le.push(ne);else{var lt=[Fe,Te];We&&(lt=lt.concat(We)),_e.push({file:ne,errors:lt.filter(function(xt){return xt})})}}),(!a&&le.length>1||a&&l>=1&&le.length>l)&&(le.forEach(function(ne){_e.push({file:ne,errors:[cDe]})}),le.splice(0)),B({acceptedFiles:le,fileRejections:_e,type:"setFiles"}),f&&f(le,_e,W),_e.length>0&&p&&p(_e,W),le.length>0&&h&&h(le,W)},[B,a,R,s,i,l,f,h,p,M]),oe=m.useCallback(function(X){X.preventDefault(),X.persist(),K(X),G.current=[],yb(X)&&Promise.resolve(o(X)).then(function(W){Qw(X)&&!_||ve(W,X)}).catch(function(W){return ee(W)}),B({type:"reset"})},[o,ve,ee,_]),ye=m.useCallback(function(){if(H.current){B({type:"openDialog"}),F();var X={multiple:a,types:O};window.showOpenFilePicker(X).then(function(W){return o(W)}).then(function(W){ve(W,null),B({type:"closeDialog"})}).catch(function(W){vDe(W)?(N(W),B({type:"closeDialog"})):bDe(W)?(H.current=!1,$.current?($.current.value=null,$.current.click()):ee(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ee(W)});return}$.current&&(B({type:"openDialog"}),F(),$.current.value=null,$.current.click())},[B,F,N,y,ve,ee,O,a]),we=m.useCallback(function(X){!V.current||!V.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),ye())},[V,ye]),me=m.useCallback(function(){B({type:"focus"})},[]),be=m.useCallback(function(){B({type:"blur"})},[]),ie=m.useCallback(function(){C||(pDe()?setTimeout(ye,0):ye())}
3684,[C,ye]),pe=function(W){return r?null:W},U=function(W){return A?null:pe(W)},q=function(W){return S?null:pe(W)},K=function(W){_&&W.stopPropagation()},ae=m.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},W=X.refKey,le=W===void 0?"ref":W,_e=X.role,ne=X.onKeyDown,te=X.onFocus,ke=X.onBlur,Ve=X.onClick,Fe=X.onDragEnter,Ie=X.onDragOver,Be=X.onDragLeave,Ee=X.onDrop,Te=Yw(X,xDe);return On(On(rk({onKeyDown:U(js(ne,we)),onFocus:U(js(te,me)),onBlur:U(js(ke,be)),onClick:pe(js(Ve,ie)),onDragEnter:q(js(Fe,Y)),onDragOver:q(js(Ie,se)),onDragLeave:q(js(Be,fe)),onDrop:q(js(Ee,oe)),role:typeof _e=="string"&&_e!==""?_e:"presentation"},le,V),!r&&!A?{tabIndex:0}:{}),Te)}},[V,we,me,be,ie,Y,se,fe,oe,A,S,r]),ue=m.useCallback(function(X){X.stopPropagation()},[]),Z=m.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},W=X.refKey,le=W===void 0?"ref":W,_e=X.onChange,ne=X.onClick,te=Yw(X,SDe),ke=rk({accept:R,multiple:a,type:"file",style:{display:"none"},onChange:pe(js(_e,oe)),onClick:pe(js(ne,ue)),tabIndex:-1},le,$);return On(On({},ke),te)}},[$,n,a,oe,r]);return On(On({},P),{},{isFocused:E&&!r,getRootProps:ae,getInputProps:Z,rootRef:V,inputRef:$,open:pe(ye)})}function ODe(e,t){switch(t.type){case"focus":return On(On({},e),{},{isFocused:!0});case"blur":return On(On({},e),{},{isFocused:!1});case"openDialog":return On(On({},ok),{},{isFileDialogActive:!0});case"closeDialog":return On(On({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return On(On({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return On(On({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return On({},ok);default:return e}}function r4(){}const Yx=async(e,t)=>{const n=t||e.split("/").pop(),r=document.createElement("a");document.body.appendChild(r);const o=await fetch(e).then(s=>s.blob()),i=window.URL.createObjectURL(o);r.href=i,r.download=n||"file",r.click(),window.URL.revokeObjectURL(i),document.body.removeChild(r)},XUe=(e,t)=>{const n=new Blob([e],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=t,o.click()},MDe=(e,t)=>{const n=document.createElement("canvas"),r=n.getContext("2d");if(!r)return"";n.width=t.width,n.height=t.height;try{return r.drawImage(e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),n.toDataURL("image/jpeg")}catch(o){if(o instanceof DOMException&&o.name==="SecurityError")return console.error("Cross-origin image security error. Make sure to:",'1. Set crossOrigin="anonymous" on the image element before setting src',"2. Ensure the server provides proper CORS headers (Access-Control-Allow-Origin)"),"";throw o}},o4=(e,t)=>{const n=document.createElement("canvas"),r=n.getContext("2d");if(!r)return"";n.width=t.width,n.height=t.height;try{return r.drawImage(e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),n.toDataURL("image/png")}catch(o){if(o instanceof DOMException&&o.name==="SecurityError")return console.error("Cross-origin image security error. Make sure to:",'1. Set crossOrigin="anonymous" on the image element before setting src',"2. Ensure the server provides proper CORS headers (Access-Control-Allow-Origin)"),"";throw o}},DDe=async(e,t,n)=>{var r;try{const i=await(await fetch(e)).text(),a=new DOMParser().parseFromString(i,"image/svg+xml"),l=a.documentElement,u=((r=l.getAttribute("viewBox"))==null?void 0:r.split(" ").map(Number))||[0,0,parseFloat(l.getAttribute("width")||"100"),parseFloat(l.getAttribute("height")||"100")],c=u[2]||parseFloat(l.getAttribute("width")||"100"),d=u[3]||parseFloat(l.getAttribute("height")||"100"),f=n?c/n.width:1,h=n?d/n.height:1,p={x:t.x*f,y:t.y*h,width:t.width*f,height:t.height*h},g=[u[0]+p.x,u[1]+p.y,p.width,p.height].join(" ");l.setAttribute("viewBox",g),l.setAttribute("width",p.width.toString()),l.setAttribute("height",p.height.toString());const y=new XMLSerializer().serializeToString(a);return`data:image/svg+xml;base64,${btoa(encodeURIComponent(y).replace(/%([0-9A-F]{2})/g,(w,C)=>String.fromCharCode(parseInt(C,16))))}`}catch(o){return console.error("Error cropping SVG:",o),""}},$De=async e=>{if(e.startsWith("data:image/jpeg")||e.endsWith(".jpg")||e.endsWith(".jpeg"))return"jpeg";if(e.startsWith("data:image/png")||e.endsWith(".png"))return"png";if(e.startsWith("data:image/svg+xml")||e.includes("<svg")||e.endsWith(".svg"))return"svg";if(e.startsWith("http"))try{const n=(await fetch(e)).headers.get("content-type");if(n){if(n.includes("image/jpeg"))return"jpeg";if(n.includes("image/png"))return"png";if(n.includes("image/svg+xml"))return"svg"}}catch(t){console.error("Error fetching image type:",t)}return"unknown"},FDe=(e,t,n,r)=>new Promise((o,i)=>{const s=new Image;s.onload=()=>{const a=document.createElement("canvas");a.width=Math.max(1,Math.round(t)),a.height=Math.max(1,Math.round(n));const l=a.getContext("2d");if(!l){i(new Error("Canvas 2D context unavailable"));return}l.imageSmoothingQuality="high",l.drawImage(s,0,0,a.width,a.height),o(a.toDataURL(r,r==="image/jpeg"?.9:void 0))},s.onerror=()=>i(new Error("Failed to load image for resizing")),s.src=e}),LDe=e=>{if(e.startsWith("data:"))return!1;try{return new URL(e,window.location.href).origin!==window.location.origin}catch{return!1}},NDe=({open:e,onClose:t,imageSrc:n,onApplyCrop:r})=>{const[o,i]=m.useState({x:0,y:0,width:0,height:0}),[s,a]=m.useState(!1),[l,u]=m.useState({x:0,y:0}),[c,d]=m.useState(!1),[f,h]=m.useState({width:0,height:0}),[p,g]=m.useState("unknown"),[b,y]=m.useState(!1),[v,w]=m.useState("image"),[C,A]=m.useState(0),[S,_]=m.useState(!1),[k,M]=m.useState({width:0,height:0}),[R,O]=m.useState(100),F=m.useRef(null),N=m.useRef(null),V=m.useRef(null);m.useEffect(()=>{e&&O(100)},[e,n]),m.useEffect(()=>{if($De(n).then(Y=>{g(Y)}),_(LDe(n)),n.startsWith("data:"))w("cropped-image");else try{const se=new URL(n).pathname.split("/"),fe=se[se.length-1];if(fe){const ve=fe.split(".")[0];w(ve||"cropped-image")}}catch{w("cropped-image")}},[n]),m.useEffect(()=>{var Y;
3684if(c&&F.current)if(p==="svg"){const se=F.current.naturalWidth===0?document.querySelector("svg"):null;let fe=F.current.clientWidth||F.current.width,ve=F.current.clientHeight||F.current.height;if(se&&se.getAttribute("viewBox")){const be=(Y=se.getAttribute("viewBox"))==null?void 0:Y.split(" ");if(be&&be.length===4){const[,,ie,pe]=be.map(Number);if(!isNaN(ie)&&!isNaN(pe)){const U=ie/pe;U>1?(fe=F.current.clientWidth||F.current.width,ve=(F.current.clientWidth||F.current.width)/U):(ve=F.current.clientHeight||F.current.height,fe=(F.current.clientHeight||F.current.height)*U)}}}const oe=fe*.98,ye=ve*.98,we=(fe-oe)/2,me=(ve-ye)/2;i({x:we,y:me,width:oe,height:ye})}else{const se=F.current.clientWidth||F.current.width,fe=F.current.clientHeight||F.current.height,ve=se*.98,oe=fe*.98,ye=(se-ve)/2,we=(fe-oe)/2;i({x:ye,y:we,width:ve,height:oe})}},[c,p]);const $=()=>{if(F.current){const Y=F.current.naturalWidth||F.current.width,se=F.current.naturalHeight||F.current.height,fe=Y/se;A(fe),M({width:Y,height:se}),h({width:F.current.clientWidth||F.current.width,height:F.current.clientHeight||F.current.height}),d(!0)}},D=f.width?Math.round(o.width*(k.width/f.width)):0,L=f.height?Math.round(o.height*(k.height/f.height)):0,P=Math.max(1,Math.round(D*R/100)),B=Math.max(1,Math.round(L*R/100)),E=p!=="svg",z=Y=>{if(!V.current)return;const se=V.current.getBoundingClientRect(),fe=Y.clientX-se.left,ve=Y.clientY-se.top;fe>=o.x&&fe<=o.x+o.width&&ve>=o.y&&ve<=o.y+o.height&&(a(!0),u({x:fe-o.x,y:ve-o.y}))},H=Y=>{var be,ie;if(!s||!V.current)return;const se=V.current.getBoundingClientRect(),fe=Y.clientX-se.left-l.x,ve=Y.clientY-se.top-l.y,oe=((be=F.current)==null?void 0:be.clientWidth)||f.width,ye=((ie=F.current)==null?void 0:ie.clientHeight)||f.height,we=Math.max(0,Math.min(fe,oe-o.width)),me=Math.max(0,Math.min(ve,ye-o.height));i(pe=>({...pe,x:we,y:me}))},j=()=>{a(!1)},G=(Y,se,fe)=>{var ve;try{if(!Y||typeof Y!="string"||!Y.startsWith("data:"))throw new Error("Invalid data URL format");const[oe,ye]=Y.split(",");if(!ye)throw new Error("Invalid data URL: missing base64 data");const we=((ve=oe.match(/:(.*?);/))==null?void 0:ve[1])||fe;let me;if(typeof window<"u"&&window.atob){const be=window.atob(ye);me=Uint8Array.from(Array.from(be).map(ie=>ie.charCodeAt(0)))}else throw new Error("Base64 decoding is not supported in this environment");return new File([me],se,{type:we,lastModified:Date.now()})}catch(oe){return console.error("Error converting data URL to File:",oe),new File([],se,{type:fe})}},Q=async()=>{if(F.current){y(!0);try{const Y=F.current.naturalWidth,se=F.current.naturalHeight,fe=F.current.clientWidth||f.width,ve=F.current.clientHeight||f.height,oe=Y/fe,ye=se/ve,we={x:Math.round(o.x*oe),y:Math.round(o.y*ye),width:Math.round(o.width*oe),height:Math.round(o.height*ye)};let me="",be="image/png";switch(p){case"jpeg":me=MDe(F.current,we),be="image/jpeg";break;case"png":me=o4(F.current,we),be="image/png";break;case"svg":me=await DDe(n,we,{width:Y,height:se}),be="image/svg+xml";break;default:me=o4(F.current,we),be="image/png"}if(!me)throw new Error("Failed to crop image. This may be due to cross-origin restrictions.");if(E&&R<100&&(me=await FDe(me,we.width*R/100,we.height*R/100,be)),r&&me){const ie=be.split("/")[1],pe=`${v}-cropped.${ie}`,U=G(me,pe,be),q={dataUrl:me,file:U,type:be,name:pe,size:U.size};r(q)}t()}catch(Y){console.error("Error applying crop:",Y),alert(`Failed to crop image: ${Y instanceof Error?Y.message:"Unknown error"}`)}finally{y(!1)}}},ee=(Y,se)=>{var ie,pe;if(se.stopPropagation(),se.preventDefault(),!V.current)return;V.current.getBoundingClientRect();const fe=se.clientX,ve=se.clientY,oe={...o},ye=((ie=F.current)==null?void 0:ie.clientWidth)||f.width,we=((pe=F.current)==null?void 0:pe.clientHeight)||f.height,me=U=>{const q=U.clientX-fe,K=U.clientY-ve;let ae={...oe};const ue=10;switch(Y){case"se":ae.width=Math.max(ue,Math.min(oe.width+q,ye-oe.x)),ae.height=Math.max(ue,Math.min(oe.height+K,we-oe.y));break;case"sw":const Z=Math.max(ue,oe.width-q),X=oe.x+oe.width-ue,W=Math.min(X,oe.x+oe.width-Z);W>
3684=0?(ae.x=W,ae.width=Z):(ae.x=0,ae.width=oe.x+oe.width),ae.height=Math.max(ue,Math.min(oe.height+K,we-oe.y));break;case"ne":ae.width=Math.max(ue,Math.min(oe.width+q,ye-oe.x));const le=Math.max(ue,oe.height-K),_e=oe.y+oe.height-ue,ne=Math.min(_e,oe.y+oe.height-le);ne>=0?(ae.y=ne,ae.height=le):(ae.y=0,ae.height=oe.y+oe.height);break;case"nw":const te=Math.max(ue,oe.width-q),ke=oe.x+oe.width-ue,Ve=Math.min(ke,oe.x+oe.width-te),Fe=Math.max(ue,oe.height-K),Ie=oe.y+oe.height-ue,Be=Math.min(Ie,oe.y+oe.height-Fe);Ve>=0?(ae.x=Ve,ae.width=te):(ae.x=0,ae.width=oe.x+oe.width),Be>=0?(ae.y=Be,ae.height=Fe):(ae.y=0,ae.height=oe.y+oe.height);break}i(ae)},be=()=>{document.removeEventListener("mousemove",me),document.removeEventListener("mouseup",be)};document.addEventListener("mousemove",me),document.addEventListener("mouseup",be)};return J(Qh,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,sx:{zIndex:1500},children:[J(zC,{children:["Crop & resize image ",p!=="unknown"?`(${p.toUpperCase()})`:""]}),J(Yh,{children:[J(Me,{ref:V,sx:{width:"fit-content",maxWidth:"100%",height:"auto",maxHeight:"70vh",position:"relative",backgroundColor:"#f0f0f0",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",cursor:s?"grabbing":"default",margin:"0 auto"},onMouseDown:z,onMouseMove:H,onMouseUp:j,onMouseLeave:j,children:[I("img",{ref:F,src:n,crossOrigin:S?"anonymous":void 0,alt:"Crop preview",style:{maxWidth:"100%",maxHeight:"70vh",objectFit:"contain",display:"block"},onLoad:$}),c&&I(Ft,{children:J(Me,{sx:{position:"absolute",left:o.x,top:o.y,width:o.width,height:o.height,border:"2px dashed rgba(255, 255, 255, 0.9)",boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.6)",pointerEvents:"auto",cursor:s?"grabbing":"grab",zIndex:1,touchAction:"none"},children:[I(Me,{sx:{position:"absolute",right:-6,bottom:-6,width:12,height:12,backgroundColor:"white",border:"1px solid #333",cursor:"se-resize",zIndex:2,borderRadius:"50%",touchAction:"none"},onMouseDown:Y=>ee("se",Y)}),I(Me,{sx:{position:"absolute",left:-6,bottom:-6,width:12,height:12,backgroundColor:"white",border:"1px solid #333",cursor:"sw-resize",zIndex:2,borderRadius:"50%",touchAction:"none"},onMouseDown:Y=>ee("sw",Y)}),I(Me,{sx:{position:"absolute",right:-6,top:-6,width:12,height:12,backgroundColor:"white",border:"1px solid #333",cursor:"ne-resize",zIndex:2,borderRadius:"50%",touchAction:"none"},onMouseDown:Y=>ee("ne",Y)}),I(Me,{sx:{position:"absolute",left:-6,top:-6,width:12,height:12,backgroundColor:"white",border:"1px solid #333",cursor:"nw-resize",zIndex:2,borderRadius:"50%",touchAction:"none"},onMouseDown:Y=>ee("nw",Y)})]})}),I("canvas",{ref:N,style:{display:"none"}})]}),c&&J(Me,{marginTop:3,children:[I(Ae,{fontWeight:"bold",children:"Image size"}),E?J(Ft,{children:[I(Ae,{variant:"body2",color:"text.secondary",children:"Slide left to make the saved image smaller. Smaller images load faster on your website; 100% keeps the original quality."}),I(Me,{paddingX:2,children:I(AU,{value:R,min:10,max:100,step:5,marks:[{value:25,label:"25%"},{value:50,label:"50%"},{value:75,label:"75%"},{value:100,label:"100%"}],valueLabelDisplay:"auto",valueLabelFormat:Y=>`${Y}%`,onChange:(Y,se)=>O(se)})}),J(Ae,{variant:"body2",children:["The image will be saved at"," ",J("strong",{children:[P," × ",B," px"]}),R<100?` — ${R}% of the selected area`:" (original size)"]})]}):I(Ae,{variant:"body2",color:"text.secondary",children:"This image is an SVG (vector) file: it scales without any quality loss, so there is no size to reduce."})]})]}),J(jC,{children:[I(gt,{onClick:t,children:"Cancel"}),I(gt,{variant:"contained",onClick:Q,disabled:b||!c,children:b?"Processing...":"Apply"})]})]})},VDe=async e=>new Promise(t=>{const n=new Image;n.onload=()=>{const r=n.naturalWidth,o=n.naturalHeight;let i=null;if(e.startsWith("data:")){const s=e.match(/^data:([^;]+);/);s&&(i=s[1]);const a=e.split(",")[1]||"",l=(a.match(/=/g)||[]).length,u=Math.floor(a.length*3/4)-l;t({width:r,height:o,fileType:i,fileSize:u})}else{fetch(e,{method:"HEAD"}).then(s=>{const a=s.headers.get("content-type");a&&(i=a);const l=s.headers.get("content-length"),u=l?parseInt(l,10):null;t({width:r,height:o,fileType:i,fileSize:u})}).catch(()=>{var s;try{const u=(s=new URL(e).pathname.split(".").pop())==null?void 0:s.toLowerCase();u&&(i={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp"}[u]||`image/${u}`)}catch{}t({width:r,height:o,fileType:i,fileSize:null})});return}},n.onerror=()=>{t({width:0,height:0,fileType:null,fileSize:null})},n.src=e}),ef=e=>e>=1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`,BDe=({urlValue:e,onUrlChange:t,file:n,helpText:r,isDragActive:o,getInputProps:i,onInputClick:s,onSaveClick:a,uploading:l,onImageChange:u,disabled:c=!1})=>{const d=Zn(),[f,h]=m.useState(n&&n.preview||e),[p,g]=m.useState(!1),[b,y]=m.useState(null),v=(n==null?void 0:n.file.size)??(b==null?void 0:b.fileSize)??null;m.useEffect(()=>{h(n&&n.preview||e),y(null)},[n,e]);const w=()=>{g(!0)},C=()=>{g(!1)},A=_=>{h(_.dataUrl),u&&u(_.file,_.dataUrl)},S=async _=>{_.currentTarget;const k=await VDe(f);y(k)};return J(Ft,{children:[I(Ae,{children:r}),J(Me,{sx:{border:`2px dashed ${o?"#55F":"#999"}`,color:"#666",background:"rgba(0,0,0,0.04)",transition:"all 300ms",borderRadius:4,textAlign:"center",padding:1,marginTop:1,marginBottom:1,opacity:c?.5:1,pointerEvents:c?"none":"auto"},onClick:s,children:[I("input",{...i()}),o?I(Me,{sx:{},children:I(Ae,{children:"Drop the image here to upload it instantly"})}):I(Ae,{children:"Drag & drop image here"}),!o&&I(gt,{sx:{},children:"Upload image"})]}),I(Me,{sx:{borderTop:"1px solid #DDD",lineHeight:0,marginY:2,textAlign:"center","& span":{backgroundColor:d.palette.background.paper,color:"#BBB",padding:1}},children:I("span",{children:"OR"})}),I(es,{margin:"dense",fullWidth:!0,label:"Image URL",value:e,onCh
3684ange:_=>t(_.target.value),variant:"filled",size:"small",disabled:c}),f&&J(Ft,{children:[J(Me,{sx:{borderRadius:1,border:"4px solid #EEE",textAlign:"center",textTransform:"uppercase",marginTop:4,marginBottom:2,width:"100%","& img":{maxWidth:"100%",display:"block"}},children:[J(Ae,{children:["Preview",b&&J("span",{style:{textTransform:"none"},children:[" ","(",b.width,"px × ",b.height,"px)",b.fileType&&J("span",{children:[" • ",b.fileType]}),v!==null&&J("span",{children:[" • ",ef(v)]})]})]}),I(Me,{sx:{width:"100%",backgroundImage:"linear-gradient(45deg, #BBB 25%, transparent 25%), linear-gradient(-45deg, #BBB 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #BBB 75%), linear-gradient(-45deg, transparent 75%, #BBB 75%), linear-gradient(0deg, #FFFFFF 0%, #FFFFFF 100%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px"},children:I("img",{src:f,alt:"",width:"100%",onLoad:S})})]}),J(Me,{sx:{display:"flex",gap:2,mb:2},children:[I(gt,{sx:{flex:1},variant:"outlined",endIcon:I(Gx,{}),onClick:async()=>{await Yx(f,"OpenPlanner")},children:"Download"}),I(gt,{sx:{flex:1},variant:"outlined",endIcon:I(Jke,{}),onClick:w,children:"Crop"})]}),I(NDe,{open:p,onClose:C,imageSrc:f,onApplyCrop:A})]}),I(xi,{variant:"contained",onClick:a,disabled:l||c,loading:l,children:"Upload image"})]})};/*! image-blob-reduce 4.1.0 https://github.com/nodeca/image-blob-reduce @license MIT */function vb(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Xx={};Xx.assign=function(t){for(var n,r=1;r<arguments.length;r++){n=Object(arguments[r]);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function Y8(e,t){var n={};return t.forEach(function(r){Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}),n}function jDe(e){return Y8(e,["alpha","unsharpAmount","unsharpRadius","unsharpThreshold","cancelToken"])}Xx.pick=Y8;Xx.pick_pica_resize_options=jDe;var X8={exports:{}};/*!
3685
3686pica
3687https://github.com/nodeca/pica
3688
3689*/(function(e,t){(function(n){e.exports=n()})(function(){return function(){function n(r,o,i){function s(u,c){if(!o[u]){if(!r[u]){var d=typeof vb=="function"&&vb;if(!c&&d)return d(u,!0);if(a)return a(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var h=o[u]={exports:{}};r[u][0].call(h.exports,function(p){var g=r[u][1][p];return s(g||p)},h,h.exports,n,r,o,i)}return o[u].exports}for(var a=typeof vb=="function"&&vb,l=0;l<i.length;l++)s(i[l]);return s}return n}()({1:[function(n,r,o){var i=n("multimath"),s=n("./mm_unsharp_mask"),a=n("./mm_resize");function l(u){var c=u||[],d={js:c.indexOf("js")>=0,wasm:c.indexOf("wasm")>=0};i.call(this,d),this.features={js:d.js,wasm:d.wasm&&this.has_wasm()},this.use(s),this.use(a)}l.prototype=Object.create(i.prototype),l.prototype.constructor=l,l.prototype.resizeAndUnsharp=function(c,d){var f=this.resize(c,d);return c.unsharpAmount&&this.unsharp_mask(f,c.toWidth,c.toHeight,c.unsharpAmount,c.unsharpRadius,c.unsharpThreshold),f},r.exports=l},{"./mm_resize":4,"./mm_unsharp_mask":9,multimath:19}],2:[function(n,r,o){function i(d){return d<0?0:d>255?255:d}function s(d){return d>=0?d:0}function a(d,f,h,p,g,b){var y,v,w,C,A,S,_,k,M,R,O,F=0,N=0;for(M=0;M<p;M++){for(A=0,R=0;R<g;R++){for(S=b[A++],_=b[A++],k=F+S*4|0,y=v=w=C=0;_>0;_--)O=b[A++],C=C+O*d[k+3]|0,w=w+O*d[k+2]|0,v=v+O*d[k+1]|0,y=y+O*d[k]|0,k=k+4|0;f[N+3]=s(C>>7),f[N+2]=s(w>>7),f[N+1]=s(v>>7),f[N]=s(y>>7),N=N+p*4|0}N=(M+1)*4|0,F=(M+1)*h*4|0}}function l(d,f,h,p,g,b){var y,v,w,C,A,S,_,k,M,R,O,F=0,N=0;for(M=0;M<p;M++){for(A=0,R=0;R<g;R++){for(S=b[A++],_=b[A++],k=F+S*4|0,y=v=w=C=0;_>0;_--)O=b[A++],C=C+O*d[k+3]|0,w=w+O*d[k+2]|0,v=v+O*d[k+1]|0,y=y+O*d[k]|0,k=k+4|0;y>>=7,v>>=7,w>>=7,C>>=7,f[N+3]=i(C+8192>>14),f[N+2]=i(w+8192>>14),f[N+1]=i(v+8192>>14),f[N]=i(y+8192>>14),N=N+p*4|0}N=(M+1)*4|0,F=(M+1)*h*4|0}}function u(d,f,h,p,g,b){var y,v,w,C,A,S,_,k,M,R,O,F,N=0,V=0;for(R=0;R<p;R++){for(S=0,O=0;O<g;O++){for(_=b[S++],k=b[S++],M=N+_*4|0,y=v=w=C=0;k>0;k--)F=b[S++],A=d[M+3],C=C+F*A|0,w=w+F*d[M+2]*A|0,v=v+F*d[M+1]*A|0,y=y+F*d[M]*A|0,M=M+4|0;w=w/255|0,v=v/255|0,y=y/255|0,f[V+3]=s(C>>7),f[V+2]=s(w>>7),f[V+1]=s(v>>7),f[V]=s(y>>7),V=V+p*4|0}V=(R+1)*4|0,N=(R+1)*h*4|0}}function c(d,f,h,p,g,b){var y,v,w,C,A,S,_,k,M,R,O,F=0,N=0;for(M=0;M<p;M++){for(A=0,R=0;R<g;R++){for(S=b[A++],_=b[A++],k=F+S*4|0,y=v=w=C=0;_>0;_--)O=b[A++],C=C+O*d[k+3]|0,w=w+O*d[k+2]|0,v=v+O*d[k+1]|0,y=y+O*d[k]|0,k=k+4|0;y>>=7,v>>=7,w>>=7,C>>=7,C=i(C+8192>>14),C>0&&(y=y*255/C|0,v=v*255/C|0,w=w*255/C|0),f[N+3]=C,f[N+2]=i(w+8192>>14),f[N+1]=i(v+8192>>14),f[N]=i(y+8192>>14),N=N+p*4|0}N=(M+1)*4|0,F=(M+1)*h*4|0}}
3689r.exports={convolveHor:a,convolveVert:l,convolveHorWithPre:u,convolveVertWithPre:c}},{}],3:[function(n,r,o){r.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEYA2AGf39/f39/AGAAAGAIf39/f39/f38AAg8BA2VudgZtZW1vcnkCAAADBwYBAAAAAAIGBgF/AEEACweUAQgRX193YXNtX2NhbGxfY3RvcnMAAAtjb252b2x2ZUhvcgABDGNvbnZvbHZlVmVydAACEmNvbnZvbHZlSG9yV2l0aFByZQADE2NvbnZvbHZlVmVydFdpdGhQcmUABApjb252b2x2ZUhWAAUMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAKyA4GAwABC4wDARB/AkAgA0UNACAERQ0AIANBAnQhFQNAQQAhE0EAIQsDQCALQQJqIQcCfyALQQF0IAVqIgYuAQIiC0UEQEEAIQhBACEGQQAhCUEAIQogBwwBCyASIAYuAQBqIQhBACEJQQAhCiALIRRBACEOIAchBkEAIQ8DQCAFIAZBAXRqLgEAIhAgACAIQQJ0aigCACIRQRh2bCAPaiEPIBFB/wFxIBBsIAlqIQkgEUEQdkH/AXEgEGwgDmohDiARQQh2Qf8BcSAQbCAKaiEKIAhBAWohCCAGQQFqIQYgFEEBayIUDQALIAlBB3UhCCAKQQd1IQYgDkEHdSEJIA9BB3UhCiAHIAtqCyELIAEgDEEBdCIHaiAIQQAgCEEAShs7AQAgASAHQQJyaiAGQQAgBkEAShs7AQAgASAHQQRyaiAJQQAgCUEAShs7AQAgASAHQQZyaiAKQQAgCkEAShs7AQAgDCAVaiEMIBNBAWoiEyAERw0ACyANQQFqIg0gAmwhEiANQQJ0IQwgAyANRw0ACwsL2gMBD38CQCADRQ0AIARFDQAgAkECdCEUA0AgCyEMQQAhE0EAIQIDQCACQQJqIQYCfyACQQF0IAVqIgcuAQIiAkUEQEEAIQhBACEHQQAhCkEAIQkgBgwBCyAHLgEAQQJ0IBJqIQhBACEJIAIhCkEAIQ0gBiEHQQAhDkEAIQ8DQCAFIAdBAXRqLgEAIhAgACAIQQF0IhFqLwEAbCAJaiEJIAAgEUEGcmovAQAgEGwgDmohDiAAIBFBBHJqLwEAIBBsIA9qIQ8gACARQQJyai8BACAQbCANaiENIAhBBGohCCAHQQFqIQcgCkEBayIKDQALIAlBB3UhCCANQQd1IQcgDkEHdSEKIA9BB3UhCSACIAZqCyECIAEgDEECdGogB0GAQGtBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobQQh0QYD+A3EgCUGAQGtBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobQRB0QYCA/AdxIApBgEBrQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBgEBrQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG3I2AgAgAyAMaiEMIBNBAWoiEyAERw0ACyAUIAtBAWoiC2whEiADIAtHDQALCwuSAwEQfwJAIANFDQAgBEUNACADQQJ0IRUDQEEAIRNBACEGA0AgBkECaiEIAn8gBkEBdCAFaiIGLgECIgdFBEBBACEJQQAhDEEAIQ1BACEOIAgMAQsgEiAGLgEAaiEJQQAhDkEAIQ1BACEMIAchFEEAIQ8gCCEGA0AgBSAGQQF0ai4BACAAIAlBAnRqKAIAIhBBGHZsIhEgD2ohDyARIBBBEHZB/wFxbCAMaiEMIBEgEEEIdkH/AXFsIA1qIQ0gESAQQf8BcWwgDmohDiAJQQFqIQkgBkEBaiEGIBRBAWsiFA0ACyAPQQd1IQkgByAIagshBiABIApBAXQiCGogDkH/AW1BB3UiB0EAIAdBAEobOwEAIAEgCEECcmogDUH/AW1BB3UiB0EAIAdBAEobOwEAIAEgCEEEcmogDEH/AW1BB3UiB0EAIAdBAEobOwEAIAEgCEEGcmogCUEAIAlBAEobOwEAIAogFWohCiATQQFqIhMgBEcNAAsgC0EBaiILIAJsIRIgC0ECdCEKIAMgC0cNAAsLC4IEAQ9/AkAgA0UNACAERQ0AIAJBAnQhFANAIAshDEEAIRJBACEHA0AgB0ECaiEKAn8gB0EBdCAFaiICLgECIhNFBEBBACEIQQAhCUEAIQYgCiEHQQAMAQsgAi4BAEECdCARaiEJQQAhByATIQJBACENIAohBkEAIQ5BACEPA0AgBSAGQQF0ai4BACIIIAAgCUEBdCIQai8BAGwgB2ohByAAIBBBBnJqLwEAIAhsIA5qIQ4gACAQQQRyai8BACAIbCAPaiEPIAAgEEECcmovAQAgCGwgDWohDSAJQQRqIQkgBkEBaiEGIAJBAWsiAg0ACyAHQQd1IQggDUEHdSEJIA9BB3UhBiAKIBNqIQcgDkEHdQtBgEBrQQ51IgJB/wEgAkH/AUgbIgJBACACQQBKGyIKQf8BcQRAIAlB/wFsIAJtIQkgCEH/AWwgAm0hCCAGQf8BbCACbSEGCyABIAxBAnRqIAlBgEBrQQ51IgJB/wEgAkH/AUgbIgJBACACQQBKG0EIdEGA/gNxIAZBgEBrQQ51IgJB/wEgAkH/AUgbIgJBACACQQBKG0EQdEGAgPwHcSAKQRh0ciAIQYBAa0EOdSICQf8BIAJB/wFIGyICQQAgAkEAShtycjYCACADIAxqIQwgEkEBaiISIARHDQALIBQgC0EBaiILbCERIAMgC0cNAAsLC0AAIAcEQEEAIAIgAyAEIAUgABADIAJBACAEIAUgBiABEAQPC0EAIAIgAyAEIAUgABABIAJBACAEIAUgBiABEAIL"},{}],4:[function(n,r,o){r.exports={name:"resize",fn:n("./resize"),wasm_fn:n("./resize_wasm"),wasm_src:n("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(n,r,o){var i=n("./resize_filter_gen"),s=n("./convolve"),a=s.convolveHor,l=s.convolveVert,u=s.convolveHorWithPre,c=s.convolveVertWithPre;function d(h,p,g){for(var b=3,y=p*g*4|0;b<y;){if(h[b]!==255)return!0;b=b+4|0}return!1}function f(h,p,g){for(var b=3,y=p*g*4|0;b<y;)h[b]=255,b=b+4|0}r.exports=function(p){var g=p.src,b=p.width,y=p.height,v=p.toWidth,w=p.toHeight,C=p.scaleX||p.toWidth/p.width,A=p.scaleY||p.toHeight/p.height,S=p.offsetX||0,_=p.offsetY||0,k=p.dest||new Uint8Array(v*w*4),M=typeof p.filter>"u"?"mks2013":p.filter,R=i(M,b,v,C,S),O=i(M,y,w,A,_),F=new Uint16Array(v*y*4);return d(g,b,y)?(u(g,F,b,y,v,R),c(F,k,y,v,w,O)):(a(g,F,b,y,v,R),l(F,k,y,v,w,O),f(k,v,w)),k}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(n,r,o){var i=n("./resize_filter_info"),s=14;function a(l){return Math.round(l*((1<<s)-1))}r.exports=function(u,c,d,f,h){var p=i.filter[u].fn,g=1/f,b=Math.min(1,f),y=i.filter[u].win/b,v,w,C,A,S,_,k,M,R,O,F,N,V,$,D,L,P,B=Math.floor((y+1)*2),E=new Int16Array((B+2)*d),z=0,H=!E.subarray||!E.set;for(v=0;v<d;v++){for(w=(v+.5)*g+h,C=Math.max(0,Math.floor(w-y)),A=Math.min(c-1,Math.ceil(w+y)),S=A-C+1,_=new Float32Array(S),k=new Int16Array(S),M=0,R=C,O=0;R<=A;R++,O++)F=p((R+.5-w)*b),M+=F,_[O]=F;for(N=0,O=0;O<_.length;O++)V=_[O]/M,N+=V,k[O]=a(V);for(k[d>>1]+=a(1-N),$=0;$<k.length&&k[$]===0;)$++;if($<k.length){for(D=k.length-1;D>0&&k[D]===0;)D--;if(L=C+$,P=D-$+1,E[z++]=L,E[z++]=P,!H)E.set(k.subarray($,D+1),z),z+=P;else for(O=$;O<=D;O++)E[z++]=k[O]}else E[z++]=0,E[z++]=0}return E}},{"./resize_filter_info":7}],7:[function(n,r,o){var i={box:{win:.5,fn:function(a){return a<0&&(a=-a),a<.5?1:0}}
3689,hamming:{win:1,fn:function(a){if(a<0&&(a=-a),a>=1)return 0;if(a<11920929e-14)return 1;var l=a*Math.PI;return Math.sin(l)/l*(.54+.46*Math.cos(l/1))}},lanczos2:{win:2,fn:function(a){if(a<0&&(a=-a),a>=2)return 0;if(a<11920929e-14)return 1;var l=a*Math.PI;return Math.sin(l)/l*Math.sin(l/2)/(l/2)}},lanczos3:{win:3,fn:function(a){if(a<0&&(a=-a),a>=3)return 0;if(a<11920929e-14)return 1;var l=a*Math.PI;return Math.sin(l)/l*Math.sin(l/3)/(l/3)}},mks2013:{win:2.5,fn:function(a){return a<0&&(a=-a),a>=2.5?0:a>=1.5?-.125*(a-2.5)*(a-2.5):a>=.5?.25*(4*a*a-11*a+7):1.0625-1.75*a*a}}};r.exports={filter:i,f2q:{box:0,hamming:1,lanczos2:2,lanczos3:3},q2f:["box","hamming","lanczos2","lanczos3"]}},{}],8:[function(n,r,o){var i=n("./resize_filter_gen");function s(d,f,h){for(var p=3,g=f*h*4|0;p<g;){if(d[p]!==255)return!0;p=p+4|0}return!1}function a(d,f,h){for(var p=3,g=f*h*4|0;p<g;)d[p]=255,p=p+4|0}function l(d){return new Uint8Array(d.buffer,0,d.byteLength)}var u=!0;try{u=new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]===1}catch{}function c(d,f,h){if(u){f.set(l(d),h);return}for(var p=h,g=0;g<d.length;g++){var b=d[g];f[p++]=b&255,f[p++]=b>>8&255}}r.exports=function(f){var h=f.src,p=f.width,g=f.height,b=f.toWidth,y=f.toHeight,v=f.scaleX||f.toWidth/f.width,w=f.scaleY||f.toHeight/f.height,C=f.offsetX||0,A=f.offsetY||0,S=f.dest||new Uint8Array(b*y*4),_=typeof f.filter>"u"?"mks2013":f.filter,k=i(_,p,b,v,C),M=i(_,g,y,w,A),R=0,O=Math.max(h.byteLength,S.byteLength),F=this.__align(R+O),N=g*b*4*2,V=this.__align(F+N),$=this.__align(V+k.byteLength),D=$+M.byteLength,L=this.__instance("resize",D),P=new Uint8Array(this.__memory.buffer),B=new Uint32Array(this.__memory.buffer),E=new Uint32Array(h.buffer);B.set(E),c(k,P,V),c(M,P,$);var z=L.exports.convolveHV||L.exports._convolveHV;s(h,p,g)?z(V,$,F,p,g,b,y,1):(z(V,$,F,p,g,b,y,0),a(S,b,y));var H=new Uint32Array(S.buffer);return H.set(new Uint32Array(this.__memory.buffer,0,y*b)),S}},{"./resize_filter_gen":6}],9:[function(n,r,o){r.exports={name:"unsharp_mask",fn:n("./unsharp_mask"),wasm_fn:n("./unsharp_mask_wasm"),wasm_src:n("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":10,"./unsharp_mask_wasm":11,"./unsharp_mask_wasm_base64":12}],10:[function(n,r,o){var i=n("glur/mono16");function s(a,l,u){for(var c=l*u,d=new Uint16Array(c),f,h,p,g,b=0;b<c;b++)f=a[4*b],h=a[4*b+1],p=a[4*b+2],g=f>=h&&f>=p?f:h>=p&&h>=f?h:p,d[b]=g<<8;return d}r.exports=function(l,u,c,d,f,h){var p,g,b,y,v;if(!(d===0||f<.5)){f>2&&(f=2);var w=s(l,u,c),C=new Uint16Array(w);i(C,u,c,f);for(var A=d/100*4096+.5|0,S=h<<8,_=u*c,k=0;k<_;k++)p=w[k],y=p-C[k],Math.abs(y)>=S&&(g=p+(A*y+2048>>12),g=g>65280?65280:g,g=g<0?0:g,p=p!==0?p:1,b=(g<<12)/p|0,v=k*4,l[v]=l[v]*b+2048>>12,l[v+1]=l[v+1]*b+2048>>12,l[v+2]=l[v+2]*b+2048>>12)}}},{"glur/mono16":18}],11:[function(n,r,o){r.exports=function(s,a,l,u,c,d){if(!(u===0||c<.5)){c>2&&(c=2);var f=a*l,h=f*4,p=f*2,g=f*2,b=Math.max(a,l)*4,y=8*4,v=0,w=h,C=w+p,A=C+g,S=A+g,_=S+b,k=this.__instance("unsharp_mask",h+p+g*2+b+y,{exp:Math.exp}),M=new Uint32Array(s.buffer),R=new Uint32Array(this.__memory.buffer);R.set(M);var O=k.exports.hsv_v16||k.exports._hsv_v16;O(v,w,a,l),O=k.exports.blurMono16||k.exports._blurMono16,O(w,C,A,S,_,a,l,c),O=k.exports.unsharp||k.exports._unsharp,O(v,v,w,C,a,l,u,d),M.set(new Uint32Array(this.__memory.buffer,0,f))}}},{}],12:[function(n,r,o){r.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAE0B2AAAGAEf39/fwBgBn9/f39/fwBgCH9/f39/f39/AGAIf39/f39/f30AYAJ9fwBgAXwBfAIZAgNlbnYDZXhwAAYDZW52Bm1lbW9yeQIAAAMHBgAFAgQBAwYGAX8AQQALB4oBCBFfX3dhc21fY2FsbF9jdG9ycwABFl9fYnVpbGRfZ2F1c3NpYW5fY29lZnMAAg5fX2dhdXNzMTZfbGluZQADCmJsdXJNb25vMTYABAdoc3ZfdjE2AAUHdW5zaGFycAAGDF9fZHNvX2hhbmRsZQMAGF9fd2FzbV9hcHBseV9kYXRhX3JlbG9jcwABCsUMBgMAAQvWAQEHfCABRNuGukOCGvs/IAC7oyICRAAAAAAAAADAohAAIgW2jDgCFCABIAKaEAAiAyADoCIGtjgCECABRAAAAAAAAPA/IAOhIgQgBKIgAyACIAKgokQAAAAAAADwP6AgBaGjIgS2OAIAIAEgBSAEmqIiB7Y4AgwgASADIAJEAAAAAAAA8D+gIASioiIItjgCCCABIAMgAkQAAAAAAADwv6AgBKKiIgK2OAIEIAEgByAIoCAFRAAAAAAAAPA/IAahoCIDo7Y4AhwgASAEIAKgIAOjtjgCGAuGBQMGfwl8An0gAyoCDCEVIAMqAgghFiADKgIUuyERIAMqAhC7IRACQCAEQQFrIghBAEgiCQRAIAIhByAAIQYMAQsgAiAALwEAuCIPIAMqAhi7oiIMIBGiIg0gDCAQoiAPIAMqAgS7IhOiIhQgAyoCALsiEiAPoqCgoCIOtjgCACACQQRqIQcgAEECaiEGIAhFDQAgCEEBIAhBA
3689UgbIgpBf3MhCwJ/IAQgCmtBAXFFBEAgDiENIAgMAQsgAiANIA4gEKIgFCASIAAvAQK4Ig+ioKCgIg22OAIEIAJBCGohByAAQQRqIQYgDiEMIARBAmsLIQIgC0EAIARrRg0AA0AgByAMIBGiIA0gEKIgDyAToiASIAYvAQC4Ig6ioKCgIgy2OAIAIAcgDSARoiAMIBCiIA4gE6IgEiAGLwECuCIPoqCgoCINtjgCBCAHQQhqIQcgBkEEaiEGIAJBAkohACACQQJrIQIgAA0ACwsCQCAJDQAgASAFIAhsQQF0aiIAAn8gBkECay8BACICuCINIBW7IhKiIA0gFrsiE6KgIA0gAyoCHLuiIgwgEKKgIAwgEaKgIg8gB0EEayIHKgIAu6AiDkQAAAAAAADwQWMgDkQAAAAAAAAAAGZxBEAgDqsMAQtBAAs7AQAgCEUNACAGQQRrIQZBACAFa0EBdCEBA0ACfyANIBKiIAJB//8DcbgiDSAToqAgDyIOIBCioCAMIBGioCIPIAdBBGsiByoCALugIgxEAAAAAAAA8EFjIAxEAAAAAAAAAABmcQRAIAyrDAELQQALIQMgBi8BACECIAAgAWoiACADOwEAIAZBAmshBiAIQQFKIQMgDiEMIAhBAWshCCADDQALCwvRAgIBfwd8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIglEAAAAAAAAAMCiEAAiDLaMOAIUIAQgCZoQACIKIAqgIg22OAIQIAREAAAAAAAA8D8gCqEiCyALoiAKIAkgCaCiRAAAAAAAAPA/oCAMoaMiC7Y4AgAgBCAMIAuaoiIOtjgCDCAEIAogCUQAAAAAAADwP6AgC6KiIg+2OAIIIAQgCiAJRAAAAAAAAPC/oCALoqIiCbY4AgQgBCAOIA+gIAxEAAAAAAAA8D8gDaGgIgqjtjgCHCAEIAsgCaAgCqO2OAIYIAYEQANAIAAgBSAIbEEBdGogAiAIQQF0aiADIAQgBSAGEAMgCEEBaiIIIAZHDQALCyAFRQ0AQQAhCANAIAIgBiAIbEEBdGogASAIQQF0aiADIAQgBiAFEAMgCEEBaiIIIAVHDQALCwtxAQN/IAIgA2wiBQRAA0AgASAAKAIAIgRBEHZB/wFxIgIgAiAEQQh2Qf8BcSIDIAMgBEH/AXEiBEkbIAIgA0sbIgYgBiAEIAIgBEsbIAMgBEsbQQh0OwEAIAFBAmohASAAQQRqIQAgBUEBayIFDQALCwuZAgIDfwF8IAQgBWwhBAJ/IAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6AiC5lEAAAAAAAA4EFjBEAgC6oMAQtBgICAgHgLIQUgBARAIAdBCHQhCUEAIQYDQCAJIAIgBkEBdCIHai8BACIBIAMgB2ovAQBrIgcgB0EfdSIIaiAIc00EQCAAIAZBAnQiCGoiCiAFIAdsQYAQakEMdSABaiIHQYD+AyAHQYD+A0gbIgdBACAHQQBKG0EMdCABQQEgARtuIgEgCi0AAGxBgBBqQQx2OgAAIAAgCEEBcmoiByABIActAABsQYAQakEMdjoAACAAIAhBAnJqIgcgASAHLQAAbEGAEGpBDHY6AAALIAZBAWoiBiAERw0ACwsL"},{}],13:[function(n,r,o){var i=100;function s(a,l){this.create=a,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=l||2e3}s.prototype.acquire=function(){var a=this,l;return this.available.length!==0?l=this.available.pop():(l=this.create(),l.id=this.lastId++,l.release=function(){return a.release(l)}),this.acquired[l.id]=l,l},s.prototype.release=function(a){var l=this;delete this.acquired[a.id],a.lastUsed=Date.now(),this.available.push(a),this.timeoutId===0&&(this.timeoutId=setTimeout(function(){return l.gc()},i))},s.prototype.gc=function(){var a=this,l=Date.now();this.available=this.available.filter(function(u){return l-u.lastUsed>a.idle?(u.destroy(),!1):!0}),this.available.length!==0?this.timeoutId=setTimeout(function(){return a.gc()},i):this.timeoutId=0},r.exports=s},{}],14:[function(n,r,o){var i=2;r.exports=function(a,l,u,c,d,f){var h=u/a,p=c/l,g=(2*f+i+1)/d;if(g>.5)return[[u,c]];var b=Math.ceil(Math.log(Math.min(h,p))/Math.log(g));if(b<=1)return[[u,c]];for(var y=[],v=0;v<b;v++){var w=Math.round(Math.pow(Math.pow(a,b-v-1)*Math.pow(u,v+1),1/b)),C=Math.round(Math.pow(Math.pow(l,b-v-1)*Math.pow(c,v+1),1/b));y.push([w,C])}return y}},{}],15:[function(n,r,o){var i=1e-5;function s(l){var u=Math.round(l);return Math.abs(l-u)<i?u:Math.floor(l)}function a(l){var u=Math.round(l);return Math.abs(l-u)<i?u:Math.ceil(l)}r.exports=function(u){var c=u.toWidth/u.width,d=u.toHeight/u.height,f=s(u.srcTileSize*c)-2*u.destTileBorder,h=s(u.srcTileSize*d)-2*u.destTileBorder;if(f<1||h<1)throw new Error("Internal error in pica: target tile width/height is too small.");var p,g,b,y,v,w,C=[],A;for(y=0;y<u.toHeight;y+=h)for(b=0;b<u.toWidth;b+=f)p=b-u.destTileBorder,p<0&&(p=0),v=b+f+u.destTileBorder-p,p+v>=u.toWidth&&(v=u.toWidth-p),g=y-u.destTileBorder,g<0&&(g=0),w=y+h+u.destTileBorder-g,g+w>=u.toHeight&&(w=u.toHeight-g),A={toX:p,toY:g,toWidth:v,toHeight:w,toInnerX:b,toInnerY:y,toInnerWidth:f,toInnerHeight:h,offsetX:p/c-s(p/c),offsetY:g/d-s(g/d),scaleX:c,scaleY:d,x:s(p/c),y:s(g/d),width:a(v/c),height:a(w/d)},C.push(A);return C}},{}],16:[function(n,r,o){function i(s){return Object.prototype.toString.call(s)}r.exports.isCanvas=function(a){var l=i(a);return l==="[object HTMLCanvasElement]"||l==="[object OffscreenCanvas]"||l==="[object Canvas]"},r.exports.isImage=function(a){return i(a)==="[object HTMLImageElement]"},r.exports.isImageBitmap=function(a){return i(a)==="[object ImageBitmap]"},r.exports.limiter=function(a){var l=0,u=[];function c(){l<a&&u.length&&(l++,u.shift()())}return function(f){return new Promise(function(h,p){u.push(function(){f().then(function(g){h(g),l--,c()},function(g){p(g),l--,c()})}),c()})}},r.exports.cib_quality_name=function(a){switch(a){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},r.exports.cib_support=function(a){return Promise.resolve().then(function(){if(typeof createImageBitmap>"u")return!1;var l=a(100,100);return createImageBitmap(l,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then(function(u){var c=u.width===10;return u.close(),l=null,c})}).catch(function(){return!1})},r.exports.worker_offscreen_canvas_support=function(){return new Promise(function(a,l){if(typeof OffscreenCanvas>"u"){a(!1);return}function u(f){if(typeof createImageBitmap>"u"){f.postMessage(!1);return}Promise.resolve().then(function(){var h=new OffscreenCanvas(10,10),p=h.getContext("2d");return p.rect(0,0,1,1),createImageBitmap(h,0,0,1,1)}).then(function(){return f.postMessage(!0)},function(){return f.postMessage(!1)})}var c=btoa("(".concat(u.toString(),")(self);")),d=new Worker("data:text/javascript;base64,".concat(c));d.onmessage=function(f){return a(f.data)},d.onerror=l}).then(function(a){return a},function(){return!1})},r.exports.can_use_canvas=function(a){var l=!1;try{var u=a(2,1),c=u.getContext("2d"),d=c.createImageData(2,1);d.data[0]=12,d.data[1]=23,d.data[2]=34,d.data[3]=255,d.data[4]=45,d.data[5]=56,d.data[6]=67,d.data[7]=255,c.putImageData(d,0,0),d=null,d=c.getImageData(0,0,2,1),d.data[0]===12&&d.data[1]===23&&d.data[2]===34&&d.data[3]===255&&d.data[4]===45&&d.data[5]===56&&d.data[6]===67&&d.data[7]===255&&(l=!0)}catch{}return l},r.exports.cib_can_use_region=function(){return new Promise(function(a){if
3689(typeof createImageBitmap>"u"){a(!1);return}var l=new Image;l.src="data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z",l.onload=function(){createImageBitmap(l,0,0,l.width,l.height).then(function(u){u.width===l.width&&u.height===l.height?a(!0):a(!1)},function(){return a(!1)})},l.onerror=function(){return a(!1)}})}},{}],17:[function(n,r,o){r.exports=function(){var i=n("./mathlib"),s;onmessage=function(l){var u=l.data.opts;if(!u.src&&u.srcBitmap){var c=new OffscreenCanvas(u.width,u.height),d=c.getContext("2d");d.drawImage(u.srcBitmap,0,0),u.src=d.getImageData(0,0,u.width,u.height).data,c.width=c.height=0,c=null,u.srcBitmap.close(),u.srcBitmap=null}s||(s=new i(l.data.features));var f=s.resizeAndUnsharp(u);postMessage({data:f},[f.buffer])}}},{"./mathlib":1}],18:[function(n,r,o){var i,s,a,l,u,c,d,f;function h(b){b<.5&&(b=.5);var y=Math.exp(.726*.726)/b,v=Math.exp(-y),w=Math.exp(-2*y),C=(1-v)*(1-v)/(1+2*y*v-w);return i=C,s=C*(y-1)*v,a=C*(y+1)*v,l=-C*w,u=2*v,c=-w,d=(i+s)/(1-u-c),f=(a+l)/(1-u-c),new Float32Array([i,s,a,l,u,c,d,f])}function p(b,y,v,w,C,A){var S,_,k,M,R,O,F,N,V,$,D,L,P,B;for(V=0;V<A;V++){for(O=V*C,F=V,N=0,S=b[O],R=S*w[6],M=R,D=w[0],L=w[1],P=w[4],B=w[5],$=0;$<C;$++)_=b[O],k=_*D+S*L+M*P+R*B,R=M,M=k,S=_,v[N]=M,N++,O++;for(O--,N--,F+=A*(C-1),S=b[O],R=S*w[7],M=R,_=S,D=w[2],L=w[3],$=C-1;$>=0;$--)k=_*D+S*L+M*P+R*B,R=M,M=k,S=_,_=b[O],y[F]=v[N]+M,O--,N--,F-=A}}function g(b,y,v,w){if(w){var C=new Uint16Array(b.length),A=new Float32Array(Math.max(y,v)),S=h(w);p(b,C,A,S,y,v),p(C,b,A,S,v,y)}}r.exports=g},{}],19:[function(n,r,o){var i=n("object-assign"),s=n("./lib/base64decode"),a=n("./lib/wa_detect"),l={js:!0,wasm:!0};function u(c){if(!(this instanceof u))return new u(c);var d=i({},l,c||{});if(this.options=d,this.__cache={},this.__init_promise=null,this.__modules=d.modules||{},this.__memory=null,this.__wasm={},this.__isLE=new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]===1,!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}u.prototype.has_wasm=a,u.prototype.use=function(c){return this.__modules[c.name]=c,this.options.wasm&&this.has_wasm()&&c.wasm_fn?this[c.name]=c.wasm_fn:this[c.name]=c.fn,this},u.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error(`mathlib: only "wasm" was enabled, but it's not supported`));var c=this;return this.__init_promise=Promise.all(Object.keys(c.__modules).map(function(d){var f=c.__modules[d];return!c.options.wasm||!c.has_wasm()||!f.wasm_fn||c.__wasm[d]?null:WebAssembly.compile(c.__base64decode(f.wasm_src)).then(function(h){c.__wasm[d]=h})})).then(function(){return c}),this.__init_promise},u.prototype.__base64decode=s,u.prototype.__reallocate=function(d){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(d/(64*1024))}),this.__memory;var f=this.__memory.buffer.byteLength;return f<d&&this.__memory.grow(Math.ceil((d-f)/(64*1024))),this.__memory},u.prototype.__instance=function(d,f,h){if(f&&this.__reallocate(f),!this.__wasm[d]){var p=this.__modules[d];this.__wasm[d]=new WebAssembly.Module(this.__base64decode(p.wasm_src))}if(!this.__cache[d]){var g={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[d]=new WebAssembly.Instance(this.__wasm[d],{env:i(g,h||{})})}return this.__cache[d]},u.prototype.__align=function(d,f){f=f||8;var h=d%f;return d+(h?f-h:0)},r.exports=u},{"./lib/base64decode":20,"./lib/wa_detect":21,"object-assign":22}],20:[function(n,r,o){var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
3689+/";r.exports=function(a){for(var l=a.replace(/[\r\n=]/g,""),u=l.length,c=new Uint8Array(u*3>>2),d=0,f=0,h=0;h<u;h++)h%4===0&&h&&(c[f++]=d>>16&255,c[f++]=d>>8&255,c[f++]=d&255),d=d<<6|i.indexOf(l.charAt(h));var p=u%4*6;return p===0?(c[f++]=d>>16&255,c[f++]=d>>8&255,c[f++]=d&255):p===18?(c[f++]=d>>10&255,c[f++]=d>>2&255):p===12&&(c[f++]=d>>4&255),c}},{}],21:[function(n,r,o){var i;r.exports=function(){if(typeof i<"u"||(i=!1,typeof WebAssembly>"u"))return i;try{var a=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),l=new WebAssembly.Module(a),u=new WebAssembly.Instance(l,{});return u.exports.test(4)!==0&&(i=!0),i}catch{}return i}},{}],22:[function(n,r,o){var i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function l(c){if(c==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(c)}function u(){try{if(!Object.assign)return!1;var c=new String("abc");if(c[5]="de",Object.getOwnPropertyNames(c)[0]==="5")return!1;for(var d={},f=0;f<10;f++)d["_"+String.fromCharCode(f)]=f;var h=Object.getOwnPropertyNames(d).map(function(g){return d[g]});if(h.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(g){p[g]=g}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}r.exports=u()?Object.assign:function(c,d){for(var f,h=l(c),p,g=1;g<arguments.length;g++){f=Object(arguments[g]);for(var b in f)s.call(f,b)&&(h[b]=f[b]);if(i){p=i(f);for(var y=0;y<p.length;y++)a.call(f,p[y])&&(h[p[y]]=f[p[y]])}}return h}},{}],23:[function(n,r,o){var i=arguments[3],s=arguments[4],a=arguments[5],l=JSON.stringify;r.exports=function(u,c){for(var d,f=Object.keys(a),h=0,p=f.length;h<p;h++){var g=f[h],b=a[g].exports;if(b===u||b&&b.default===u){d=g;break}}if(!d){d=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var y={},h=0,p=f.length;h<p;h++){var g=f[h];y[g]=g}s[d]=["function(require,module,exports){"+u+"(self); }",y]}var v=Math.floor(Math.pow(16,8)*Math.random()).toString(16),w={};w[d]=d,s[v]=["function(require,module,exports){var f = require("+l(d)+");(f.default ? f.default : f)(self);}",w];var C={};A(v);function A(O){C[O]=!0;for(var F in s[O][1]){var N=s[O][1][F];C[N]||A(N)}}var S="("+i+")({"+Object.keys(C).map(function(O){return l(O)+":["+s[O][0]+","+l(s[O][1])+"]"}).join(",")+"},{},["+l(v)+"])",_=window.URL||window.webkitURL||window.mozURL||window.msURL,k=new Blob([S],{type:"text/javascript"});if(c&&c.bare)return k;var M=_.createObjectURL(k),R=new Worker(M);return R.objectURL=M,R}},{}],"/index.js":[function(n,r,o){function i(D,L){return c(D)||u(D,L)||a(D,L)||s()}function s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3690In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}
3690function a(D,L){if(D){if(typeof D=="string")return l(D,L);var P=Object.prototype.toString.call(D).slice(8,-1);if(P==="Object"&&D.constructor&&(P=D.constructor.name),P==="Map"||P==="Set")return Array.from(D);if(P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P))return l(D,L)}}function l(D,L){(L==null||L>D.length)&&(L=D.length);for(var P=0,B=new Array(L);P<L;P++)B[P]=D[P];return B}function u(D,L){var P=D==null?null:typeof Symbol<"u"&&D[Symbol.iterator]||D["@@iterator"];if(P!=null){var B=[],E=!0,z=!1,H,j;try{for(P=P.call(D);!(E=(H=P.next()).done)&&(B.push(H.value),!(L&&B.length===L));E=!0);}catch(G){z=!0,j=G}finally{try{!E&&P.return!=null&&P.return()}finally{if(z)throw j}}return B}}function c(D){if(Array.isArray(D))return D}var d=n("object-assign"),f=n("webworkify"),h=n("./lib/mathlib"),p=n("./lib/pool"),g=n("./lib/utils"),b=n("./lib/worker"),y=n("./lib/stepper"),v=n("./lib/tiler"),w=n("./lib/mm_resize/resize_filter_info"),C={},A=!1;try{typeof navigator<"u"&&navigator.userAgent&&(A=navigator.userAgent.indexOf("Safari")>=0)}catch{}var S=1;typeof navigator<"u"&&(S=Math.min(navigator.hardwareConcurrency||1,4));var _={tile:1024,concurrency:S,features:["js","wasm","ww"],idle:2e3,createCanvas:function(L,P){var B=document.createElement("canvas");return B.width=L,B.height=P,B}},k={filter:"mks2013",unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},M=!1,R=!1,O=!1,F=!1,N=!1;function V(){return{value:f(b),destroy:function(){if(this.value.terminate(),typeof window<"u"){var L=window.URL||window.webkitURL||window.mozURL||window.msURL;L&&L.revokeObjectURL&&this.value.objectURL&&L.revokeObjectURL(this.value.objectURL)}}}}function $(D){if(!(this instanceof $))return new $(D);this.options=d({},_,D||{});var L="lk_".concat(this.options.concurrency);this.__limit=C[L]||g.limiter(this.options.concurrency),C[L]||(C[L]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}$.prototype.init=function(){var D=this;if(this.__initPromise)return this.__initPromise;if(typeof ImageData<"u"&&typeof Uint8ClampedArray<"u")try{new ImageData(new Uint8ClampedArray(400),10,10),M=!0}catch{}typeof ImageBitmap<"u"&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?R=!0:this.debug("ImageBitmap does not support .close(), disabled"));var L=this.options.features.slice();if(L.indexOf("all")>=0&&(L=["cib","wasm","js","ww"]),this.__requested_features=L,this.__mathlib=new h(L),L.indexOf("ww")>=0&&typeof window<"u"&&"Worker"in window)try{var P=n("webworkify")(function(){});P.terminate(),this.features.ww=!0;var B="wp_".concat(JSON.stringify(this.options));C[B]?this.__workersPool=C[B]:(this.__workersPool=new p(V,this.options.idle),C[B]=this.__workersPool)}catch{}var E=this.__mathlib.init().then(function(G){d(D.features,G.features)}),z;R?z=g.cib_support(this.options.createCanvas).then(function(G){if(D.features.cib&&L.indexOf("cib")<0){D.debug("createImageBitmap() resize supported, but disabled by config");return}L.indexOf("cib")>=0&&(D.features.cib=G)}):z=Promise.resolve(!1),O=g.can_use_canvas(this.options.createCanvas);var H;R&&M&&L.indexOf("ww")!==-1?H=g.worker_offscreen_canvas_support():H=Promise.resolve(!1),H=H.then(function(G){F=G});var j=g.cib_can_use_region().then(function(G){N=G});return this.__initPromise=Promise.all([E,z,H,j]).then(function(){return D}),this.__initPromise},$.prototype.__invokeResize=function(D,L){var P=this;return L.__mathCache=L.__mathCache||{},Promise.resolve().then(function(){return P.features.ww?new Promise(function(B,E){var z=P.__workersPool.acquire();L.cancelToken&&L.cancelToken.catch(function(j){return E(j)}),z.value.onmessage=function(j){z.release(),j.data.err?E(j.data.err):B(j.data)};var H=[];D.src&&H.push(D.src.buffer),D.srcBitmap&&H.push(D.srcBitmap),z.value.postMessage({opts:D,features:P.__requested_features,preload:{wasm_nodule:P.__mathlib.__}},H)}):{data:P.__mathlib.resizeAndUnsharp(D,L.__mathCache)}})},$.prototype.__extractTileData=function(D,L,P,B,E){if(this.features.ww&&F&&(g.isCanvas(L)||N))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(B.srcImageBitmap||L,D.x,D.y,D.width,D.height).then(function(j){return E.srcBitmap=j,E});if(g.isCanvas(L))return B.srcCtx||(B.srcCtx=L.getContext("2d")),this.debug("Get tile pixel data"),E.src=B.srcCtx.getImageData(D.x,D.y,D.width,D.height).data,E;this.debug("Draw tile imageBitmap/image to temporary canvas");var z=this.options.createCanvas(D.width,D.height),H=z.getContext("2d");return H.globalCompositeOperation="copy",H.drawImage(B.srcImageBitmap||L,D.x,D.y,D.width,D.height,0,0,D.width,D.height),this.debug("Get tile pixel data"),E.src=H.getImageData(0,0,D.width,D.height).data,z.width=z.height=0,E},$.prototype.__landTileData=function(D,L,P){var B;if(this.debug("Convert raw rgba tile result to ImageData"),L.bitmap)return P.toCtx.drawImage(L.bitmap,D.toX,D.toY),null;if(M)B=new ImageData(new Uint8ClampedArray(L.data),D.toWidth,D.toHeight);else if(B=P.toCtx.createImageData(D.toWidth,D.toHeight),B.data.set)B.data.set(L.data);else for(var E=B.data.length-1;E>=0;E--)B.data[E]=L.data[E];return this.debug("Draw tile"),A?P.toCtx.putImageData(B,D.toX,D.toY,D.toInnerX-D.toX,D.toInnerY-D.toY,D.toInnerWidth+1e-5,D.toInnerHeight+1e-5):P.toCtx.putImageData(B,D.toX,D.toY,D.toInnerX-D.toX,D.toInnerY-D.toY,D.toInnerWidth,D.toInnerHeight),null},$.prototype.__tileAndResize=function(D,L,P){var B=this,E={srcCtx:null,srcImageBitmap:null,isImageBitmapReused:!1,toCtx:null},z=function(j){return B.__limit(function(){if(P.canceled)return P.cancelToken;var G={width:j.width,height:j.height,toWidth:j.toWidth,toHeight:j.toHeight,scaleX:j.scaleX,scaleY:j.scaleY,offsetX:j.offsetX,offsetY:j.offsetY,filter:P.filter,unsharpAmount:P.unsharpAmount,unsharpRadius:P.unsharpRadius,unsharpThreshold:P.unsharpThreshold};return B.debug("Invoke resize math"),Promise.resolve(G).then(function(Q){return B.__extractTileData(j,D,P,E,Q)}).then(function(Q){return B.debug("Invoke resize math"),B.__invokeResize(Q,P)}
3690).then(function(Q){return P.canceled?P.cancelToken:(E.srcImageData=null,B.__landTileData(j,Q,E))})})};return Promise.resolve().then(function(){if(E.toCtx=L.getContext("2d"),g.isCanvas(D))return null;if(g.isImageBitmap(D))return E.srcImageBitmap=D,E.isImageBitmapReused=!0,null;if(g.isImage(D))return R?(B.debug("Decode image via createImageBitmap"),createImageBitmap(D).then(function(H){E.srcImageBitmap=H}).catch(function(H){return null})):null;throw new Error('Pica: ".from" should be Image, Canvas or ImageBitmap')}).then(function(){if(P.canceled)return P.cancelToken;B.debug("Calculate tiles");var H=v({width:P.width,height:P.height,srcTileSize:B.options.tile,toWidth:P.toWidth,toHeight:P.toHeight,destTileBorder:P.__destTileBorder}),j=H.map(function(Q){return z(Q)});function G(Q){Q.srcImageBitmap&&(Q.isImageBitmapReused||Q.srcImageBitmap.close(),Q.srcImageBitmap=null)}return B.debug("Process tiles"),Promise.all(j).then(function(){return B.debug("Finished!"),G(E),L},function(Q){throw G(E),Q})})},$.prototype.__processStages=function(D,L,P,B){var E=this;if(B.canceled)return B.cancelToken;var z=D.shift(),H=i(z,2),j=H[0],G=H[1],Q=D.length===0,ee;Q||w.q2f.indexOf(B.filter)<0?ee=B.filter:B.filter==="box"?ee="box":ee="hamming",B=d({},B,{toWidth:j,toHeight:G,filter:ee});var Y;return Q||(Y=this.options.createCanvas(j,G)),this.__tileAndResize(L,Q?P:Y,B).then(function(){return Q?P:(B.width=j,B.height=G,E.__processStages(D,Y,P,B))}).then(function(se){return Y&&(Y.width=Y.height=0),se})},$.prototype.__resizeViaCreateImageBitmap=function(D,L,P){var B=this,E=L.getContext("2d");return this.debug("Resize via createImageBitmap()"),createImageBitmap(D,{resizeWidth:P.toWidth,resizeHeight:P.toHeight,resizeQuality:g.cib_quality_name(w.f2q[P.filter])}).then(function(z){if(P.canceled)return P.cancelToken;if(!P.unsharpAmount)return E.drawImage(z,0,0),z.close(),E=null,B.debug("Finished!"),L;B.debug("Unsharp result");var H=B.options.createCanvas(P.toWidth,P.toHeight),j=H.getContext("2d");j.drawImage(z,0,0),z.close();var G=j.getImageData(0,0,P.toWidth,P.toHeight);return B.__mathlib.unsharp_mask(G.data,P.toWidth,P.toHeight,P.unsharpAmount,P.unsharpRadius,P.unsharpThreshold),E.putImageData(G,0,0),H.width=H.height=0,G=j=H=E=null,B.debug("Finished!"),L})},$.prototype.resize=function(D,L,P){var B=this;this.debug("Start resize...");var E=d({},k);if(isNaN(P)?P&&(E=d(E,P)):E=d(E,{quality:P}),E.toWidth=L.width,E.toHeight=L.height,E.width=D.naturalWidth||D.width,E.height=D.naturalHeight||D.height,Object.prototype.hasOwnProperty.call(E,"quality")){if(E.quality<0||E.quality>3)throw new Error("Pica: .quality should be [0..3], got ".concat(E.quality));E.filter=w.q2f[E.quality]}if(L.width===0||L.height===0)return Promise.reject(new Error("Invalid output size: ".concat(L.width,"x").concat(L.height)));E.unsharpRadius>2&&(E.unsharpRadius=2),E.canceled=!1,E.cancelToken&&(E.cancelToken=E.cancelToken.then(function(H){throw E.canceled=!0,H},function(H){throw E.canceled=!0,H}));var z=3;return E.__destTileBorder=Math.ceil(Math.max(z,2.5*E.unsharpRadius|0)),this.init().then(function(){if(E.canceled)return E.cancelToken;if(B.features.cib){if(w.q2f.indexOf(E.filter)>=0)return B.__resizeViaCreateImageBitmap(D,L,E);B.debug("cib is enabled, but not supports provided filter, fallback to manual math")}if(!O){var H=new Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");throw H.code="ERR_GET_IMAGE_DATA",H}var j=y(E.width,E.height,E.toWidth,E.toHeight,B.options.tile,E.__destTileBorder);return B.__processStages(j,D,L,E)})},$.prototype.resizeBuffer=function(D){var L=this,P=d({},k,D);if(Object.prototype.hasOwnProperty.call(P,"quality")){if(P.quality<0||P.quality>3)throw new Error("Pica: .quality should be [0..3], got ".concat(P.quality));P.filter=w.q2f[P.quality]}return this.init().then(function(){return L.__mathlib.resizeAndUnsharp(P)})},$.prototype.toBlob=function(D,L,P){return L=L||"image/png",new Promise(function(B){if(D.toBlob){D.toBlob(function(G){return B(G)},L,P);return}if(D.convertToBlob){B(D.convertToBlob({type:L,quality:P}));return}for(var E=atob(D.toDataURL(L,P).split(",")[1]),z=E.length,H=new Uint8Array(z),j=0;j<z;j++)H[j]=E.charCodeAt(j);B(new Blob([H],{type:L}))})},$.prototype.debug=function(){},r.exports=$},{"./lib/mathlib":1,"./lib/mm_resize/resize_filter_info":7,"./lib/pool":13,"./lib/stepper":14,"./lib/tiler":15,"./lib/utils":16,"./lib/worker":17,"object-assign":22,webworkify:23}]},{},[])("/index.js")})})(X8);var av={},J8={exports:{}};(function(e){function t(a,l){var u=new Error(a);return u.code=l,u}function n(a){for(var l=a.toString(16).toUpperCase(),u=2-l.length;u>0;u--)l="0"+l;return"0x"+l}function r(a){try{return unescape(encodeURIComponent(a))}catch{return a}}function o(a){try{return decodeURIComponent(escape(a))}catch{return a}}function i(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}function s(a,l,u){this.input=a.subarray(l,u),this.start=l;var c=String.fromCharCode.apply(null,this.input.subarray(0,4));if(c!=="II*\0"&&c!=="MM\0*")throw t("invalid TIFF signature","EBADDATA");this.big_endian=c[0]==="M"}s.prototype.each=function(a){this.aborted=!1;var l=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:l}];this.ifds_to_read.length>0&&!this.aborted;){var u=this.ifds_to_read.shift();u.offset&&this.scan_ifd(u.id,u.offset,a)}},s.prototype.filter=function(a){var l={};l.ifd0={id:0,entries:[]}
3690,this.each(function(f){a(f)===!1&&!f.is_subifd_link||f.is_subifd_link&&f.count!==1&&f.format!==4||(l["ifd"+f.ifd]||(l["ifd"+f.ifd]={id:f.ifd,entries:[]}),l["ifd"+f.ifd].entries.push(f))}),delete l.ifd1;var u=8;Object.keys(l).forEach(function(f){u+=2,l[f].entries.forEach(function(h){u+=12+(h.data_length>4?Math.ceil(h.data_length/2)*2:0)}),u+=4}),this.output=new Uint8Array(u),this.output[0]=this.output[1]=(this.big_endian?"M":"I").charCodeAt(0),this.write_uint16(2,42);var c=8,d=this;if(this.write_uint32(4,c),Object.keys(l).forEach(function(f){l[f].written_offset=c;var h=c,p=h+2+l[f].entries.length*12+4;c=p,d.write_uint16(h,l[f].entries.length),l[f].entries.sort(function(b,y){return b.tag-y.tag}).forEach(function(b,y){var v=h+2+y*12;d.write_uint16(v,b.tag),d.write_uint16(v+2,b.format),d.write_uint32(v+4,b.count),b.is_subifd_link?l["ifd"+b.tag]&&(l["ifd"+b.tag].link_offset=v+8):b.data_length<=4?d.output.set(d.input.subarray(b.data_offset-d.start,b.data_offset-d.start+4),v+8):(d.write_uint32(v+8,c),d.output.set(d.input.subarray(b.data_offset-d.start,b.data_offset-d.start+b.data_length),c),c+=Math.ceil(b.data_length/2)*2)});var g=l["ifd"+(l[f].id+1)];g&&(g.link_offset=p-4)}),Object.keys(l).forEach(function(f){l[f].written_offset&&l[f].link_offset&&d.write_uint32(l[f].link_offset,l[f].written_offset)}),this.output.length!==c)throw t("internal error: incorrect buffer size allocated");return this.output},s.prototype.read_uint16=function(a){var l=this.input;if(a+2>l.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?l[a]*256+l[a+1]:l[a]+l[a+1]*256},s.prototype.read_uint32=function(a){var l=this.input;if(a+4>l.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?l[a]*16777216+l[a+1]*65536+l[a+2]*256+l[a+3]:l[a]+l[a+1]*256+l[a+2]*65536+l[a+3]*16777216},s.prototype.write_uint16=function(a,l){var u=this.output;this.big_endian?(u[a]=l>>>8&255,u[a+1]=l&255):(u[a]=l&255,u[a+1]=l>>>8&255)},s.prototype.write_uint32=function(a,l){var u=this.output;this.big_endian?(u[a]=l>>>24&255,u[a+1]=l>>>16&255,u[a+2]=l>>>8&255,u[a+3]=l&255):(u[a]=l&255,u[a+1]=l>>>8&255,u[a+2]=l>>>16&255,u[a+3]=l>>>24&255)},s.prototype.is_subifd_link=function(a,l){return a===0&&l===34665||a===0&&l===34853||a===34665&&l===40965},s.prototype.exif_format_length=function(a){switch(a){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},s.prototype.exif_format_read=function(a,l){var u;switch(a){case 1:case 2:return u=this.input[l],u;case 6:return u=this.input[l],u|(u&128)*33554430;case 3:return u=this.read_uint16(l),u;case 8:return u=this.read_uint16(l),u|(u&32768)*131070;case 4:return u=this.read_uint32(l),u;case 9:return u=this.read_uint32(l),u|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},s.prototype.scan_ifd=function(a,l,u){var c=this.read_uint16(l);l+=2;for(var d=0;d<c;d++){var f=this.read_uint16(l),h=this.read_uint16(l+2),p=this.read_uint32(l+4),g=this.exif_format_length(h),b=p*g,y=b<=4?l+8:this.read_uint32(l+8),v=!1;if(y+b>this.input.length)throw t("unexpected EOF","EBADDATA");for(var w=[],C=y,A=0;A<p;A++,C+=g){var S=this.exif_format_read(h,C);if(S===null){w=null;break}w.push(S)}if(Array.isArray(w)&&h===2){try{w=o(String.fromCharCode.apply(null,w))}catch{w=null}w&&w[w.length-1]==="\0"&&(w=w.slice(0,-1))}this.is_subifd_link(a,f)&&Array.isArray(w)&&Number.isInteger(w[0])&&w[0]>0&&(this.ifds_to_read.push({id:f,offset:w[0]}),v=!0);var _={is_big_endian:this.big_endian,ifd:a,tag:f,format:h,count:p,entry_offset:l+this.start,data_length:b,data_offset:y+this.start,value:w,is_subifd_link:v};if(u(_)===!1){this.aborted=!0;return}l+=12}a===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},e.exports.is_jpeg=function(a){return a.length>=4&&a[0]===255&&a[1]===216&&a[2]===255},e.exports.jpeg_segments_each=function(a,l){if(!i(a))throw t("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if(typeof l!="function")throw t("Invalid argument (on_segment), Function expected","EINVAL");if(!e.exports.is_jpeg(a))throw t("Unknown file format","ENOTJPEG");for(var u=0,c=a.length,d=!1;;){var f,h;if(u+1>=c)throw t("Unexpected EOF","EBADDATA");var p=a[u],g=a[u+1];if(p===255&&g===255)f=255,h=1;else if(p===255&&g!==0){if(f=g,h=2,!(208<=f&&f<=217||f===1)){if(u+3>=c)throw t("Unexpected EOF","EBADDATA");if(h+=a[u+2]*256+a[u+3],h<2)throw t("Invalid segment length","EBADDATA");if(u+h-1>=c)throw t("Unexpected EOF","EBADDATA")}d&&(f>=208&&f<=215||(d=!1)),f===218&&(d=!0)}else if(d)for(var b=u+1;;b++){if(b>=c)throw t("Unexpected EOF","EBADDATA");if(a[b]===255){if(b+1>=c)throw t("Unexpected EOF","EBADDATA");if(a[b+1]!==0){f=0,h=b-u;break}}}else throw t("Unexpected byte at segment start: "+n(p)+" (offset "+n(u)+")","EBADDATA");if(l({code:f,offset:u,length:h})===!1||f===217)break;u+=h}},e.exports.jpeg_segments_filter=function(a,l){if(!i(a))throw t("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if(typeof l!="function")throw t("Invalid argument (on_segment), Function expected","EINVAL");var u=[],c=0;e.exports.jpeg_segments_each(a,function(h){var p=l(h);
3690if(i(p))u.push({data:p}),c+=p.length;else if(Array.isArray(p))p.filter(i).forEach(function(b){u.push({data:b}),c+=b.length});else if(p!==!1){var g={start:h.offset,end:h.offset+h.length};u.length>0&&u[u.length-1].end===g.start?u[u.length-1].end=g.end:u.push(g),c+=h.length}});var d=new Uint8Array(c),f=0;return u.forEach(function(h){var p=h.data||a.subarray(h.start,h.end);d.set(p,f),f+=p.length}),d},e.exports.jpeg_exif_tags_each=function(a,l){if(!i(a))throw t("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if(typeof l!="function")throw t("Invalid argument (on_exif_entry), Function expected","EINVAL");e.exports.jpeg_segments_each(a,function(u){if(u.code===218)return!1;if(u.code===225&&u.length>=10&&a[u.offset+4]===69&&a[u.offset+5]===120&&a[u.offset+6]===105&&a[u.offset+7]===102&&a[u.offset+8]===0&&a[u.offset+9]===0)return new s(a,u.offset+10,u.offset+u.length).each(l),!1})},e.exports.jpeg_exif_tags_filter=function(a,l){if(!i(a))throw t("Invalid argument (jpeg_bin), Uint8Array expected","EINVAL");if(typeof l!="function")throw t("Invalid argument (on_exif_entry), Function expected","EINVAL");var u=!1;return e.exports.jpeg_segments_filter(a,function(c){if(!u&&(c.code===218&&(u=!0),c.code===225&&c.length>=10&&a[c.offset+4]===69&&a[c.offset+5]===120&&a[c.offset+6]===105&&a[c.offset+7]===102&&a[c.offset+8]===0&&a[c.offset+9]===0)){var d=new s(a,c.offset+10,c.offset+c.length).filter(l);if(!d)return!1;var f=new Uint8Array(10);return f.set(a.slice(c.offset,c.offset+10)),f[2]=d.length+8>>>8&255,f[3]=d.length+8&255,u=!0,[f,d]}})},e.exports.jpeg_add_comment=function(a,l){var u=!1,c=0;return e.exports.jpeg_segments_filter(a,function(d){if(c++,!(c===1&&d.code===216)&&!(c===2&&d.code===224)&&!u){l=r(l);var f=new Uint8Array(5+l.length),h=0;return f[h++]=255,f[h++]=254,f[h++]=l.length+3>>>8&255,f[h++]=l.length+3&255,l.split("").forEach(function(p){f[h++]=p.charCodeAt(0)&255}),f[h++]=0,u=!0,[f,a.subarray(d.offset,d.offset+d.length)]}})}})(J8);var Xw=J8.exports;function Z8(e){return this._getUint8Array(e.blob).then(function(t){if(e.is_jpeg=Xw.is_jpeg(t),!e.is_jpeg)return Promise.resolve(e);e.orig_blob=e.blob;try{var n,r;if(Xw.jpeg_exif_tags_each(t,function(i){if(i.ifd===0&&i.tag===274&&Array.isArray(i.value))return e.orientation=i.value[0]||1,n=i.is_big_endian,r=i.data_offset,!1}),r){var o=n?new Uint8Array([0,1]):new Uint8Array([1,0]);e.blob=new Blob([t.slice(0,r),o,t.slice(r+2)],{type:"image/jpeg"})}}catch{}return e})}function eG(e){if(!e.is_jpeg)return Promise.resolve(e);var t=e.orientation-1;if(!t)return Promise.resolve(e);var n;t&4?n=this.pica.options.createCanvas(e.out_canvas.height,e.out_canvas.width):n=this.pica.options.createCanvas(e.out_canvas.width,e.out_canvas.height);var r=n.getContext("2d");
3690return r.save(),t&1&&r.transform(-1,0,0,1,n.width,0),t&2&&r.transform(-1,0,0,-1,n.width,n.height),t&4&&r.transform(0,1,1,0,0,0),r.drawImage(e.out_canvas,0,0),r.restore(),e.out_canvas.width=e.out_canvas.height=0,e.out_canvas=n,Promise.resolve(e)}function tG(e){return e.is_jpeg?Promise.all([this._getUint8Array(e.blob),this._getUint8Array(e.out_blob)]).then(function(t){var n=t[0],r=t[1];if(!Xw.is_jpeg(n))return Promise.resolve(e);var o=[];return Xw.jpeg_segments_each(n,function(i){if(i.code===218)return!1;o.push(i)}),o=o.filter(function(i){return i.code===226?!1:i.code>=224&&i.code<240||i.code===254}).map(function(i){return n.slice(i.offset,i.offset+i.length)}),e.out_blob=new Blob([r.slice(0,2)].concat(o).concat([r.slice(20)]),{type:"image/jpeg"}),e}):Promise.resolve(e)}function zDe(e){e.before("_blob_to_image",Z8),e.after("_transform",eG),e.after("_create_blob",tG)}av.jpeg_patch_exif=Z8;av.jpeg_rotate_canvas=eG;av.jpeg_attach_orig_segments=tG;av.assign=zDe;var u2=Xx,nG=X8.exports;function po(e){if(!(this instanceof po))return new po(e);e=e||{},this.pica=e.pica||nG({}),this.initialized=!1,this.utils=u2}po.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};po.prototype.init=function(){this.use(av.assign)};po.prototype.toBlob=function(e,t){var n=u2.assign({max:1/0},t),r={blob:e,opts:n};return this.initialized||(this.init(),this.initialized=!0),Promise.resolve(r).then(this._blob_to_image).then(this._calculate_size).then(this._transform).then(this._cleanup).then(this._create_blob).then(function(o){return o.out_canvas.width=o.out_canvas.height=0,o.out_blob})};po.prototype.toCanvas=function(e,t){var n=u2.assign({max:1/0},t),r={blob:e,opts:n};return this.initialized||(this.init(),this.initialized=!0),Promise.resolve(r).then(this._blob_to_image).then(this._calculate_size).then(this._transform).then(this._cleanup).then(function(o){return o.out_canvas})};po.prototype.before=function(e,t){if(!this[e])throw new Error('Method "'+e+'" does not exist');if(typeof t!="function")throw new Error('Invalid argument "fn", function expected');var n=this[e],r=this;return this[e]=function(o){return t.call(r,o).then(function(i){return n.call(r,i)})},this};po.prototype.after=function(e,t){if(!this[e])throw new Error('Method "'+e+'" does not exist');if(typeof t!="function")throw new Error('Invalid argument "fn", function expected');var n=this[e],r=this;return this[e]=function(o){return n.call(r,o).then(function(i){return t.call(r,i)})},this};po.prototype._blob_to_image=function(e){var t=window.URL||window.webkitURL||window.mozURL||window.msURL;return e.image=document.createElement("img"),e.image_url=t.createObjectURL(e.blob),e.image.src=e.image_url,new Promise(function(n,r){e.image.onerror=function(){r(new Error("ImageBlobReduce: failed to create Image() from blob"))},e.image.onload=function(){n(e)}})};po.prototype._calculate_size=function(e){var t=e.opts.max/Math.max(e.image.width,e.image.height);return t>1&&(t=1),e.transform_width=Math.max(Math.round(e.image.width*t),1),e.transform_height=Math.max(Math.round(e.image.height*t),1),e.scale_factor=t,Promise.resolve(e)};po.prototype._transform=function(e){e.out_canvas=this.pica.options.createCanvas(e.transform_width,e.transform_height),e.transform_width=null,e.transform_height=null;var t={alpha:e.blob.type==="image/png"};return this.utils.assign(t,this.utils.pick_pica_resize_options(e.opts)),this.pica.resize(e.image,e.out_canvas,t).then(function(){return e})};po.prototype._cleanup=function(e){e.image.src="",e.image=null;var t=window.URL||window.webkitURL||window.mozURL||window.msURL;return t.revokeObjectURL&&t.revokeObjectURL(e.image_url),e.image_url=null,Promise.resolve(e)};po.prototype._create_blob=function(e){return this.pica.toBlob(e.out_canvas,e.blob.type).then(function(t){return e.out_blob=t,e})};po.prototype._getUint8Array=function(e){return e.arrayBuffer?e.arrayBuffer().then(function(t){return new Uint8Array(t)}):new Promise(function(t,n){var r=new FileReader;r.readAsArrayBuffer(e),r.onload=function(){t(new Uint8Array(r.result))},r.onerror=function(){n(new Error("ImageBlobReduce: failed to load data from input blob")),r.abort()},r.onabort=function(){n(new Error("ImageBlobReduce: failed to load data from input blob (aborted)"))}})};po.pica=nG;var UDe=po;const HDe=async(e,t=500)=>{switch(e.type){case"image/svg+xml":return e;default:return await UDe().toBlob(e,{max:t})}}
3690,i4={"image/jpeg":"jpg","image/jpg":"jpg","image/png":"png","image/webp":"webp","image/gif":"gif","image/svg+xml":"svg","image/avif":"avif","image/bmp":"bmp"},WDe=e=>{const t=e.type.split(";")[0].trim().toLowerCase();if(i4[t])return i4[t];const n=t.split("/")[1];return n?n.replace("+xml",""):"jpg"},GDe=async(e,t)=>{const n=`${DO()}.${WDe(t)}`,r=QEe(e),o=$Se(VW,`${r}${n}`);return await DSe(o,t,{contentType:t.type||void 0,cacheControl:"public, max-age=31536000, immutable"}),YEe(o.fullPath)},qDe=e=>{const[t,n]=m.useState(null),{createNotification:r}=pp();return m.useEffect(()=>{if(!e)return;const o=i=>{if(i.clipboardData){const s=i.clipboardData.items;if(!s)return;for(let a=0;a<s.length;a++)if(s[a].type.indexOf("image")!==-1){const l=s[a].getAsFile();if(!l)continue;n(l),i.preventDefault(),r("Image pasted",{type:"success"});break}}};return document.addEventListener("paste",o,!1),()=>{document.removeEventListener("paste",o,!1)}},[e]),t},KDe=e=>SPe(),QDe=({event:e,isOpen:t,onClose:n,title:r,value:o,onChange:i,maxImageSize:s=500})=>{const{filesPath:a,isLoading:l,error:u}=KDe(),{createNotification:c}=pp(),[d,f]=m.useState(null),[h,p]=m.useState(!1);m.useEffect(()=>{u&&c("Error loading files path. Upload functionality may not work properly.",{type:"error"})},[u,c]);const g=qDe(t);m.useEffect(()=>{g&&!d&&f({file:g,preview:URL.createObjectURL(g)})},[g]);const b=async()=>{if(!a){c("Cannot upload image: files path not available",{type:"error"});return}p(!0);try{if(d){const _=await HDe(d.file,s),k=await GDe(a.imageFolder,_);i(k)}n()}catch(_){c("Error while resizing image or uploading it (check JS console?)",{type:"error"}),console.log(_)}p(!1)},y=m.useCallback(_=>{_.length>0&&f({file:_[0],preview:URL.createObjectURL(_[0])})},[]),v=m.useCallback((_,k)=>{f({file:_,preview:k})},[]),{getRootProps:w,getInputProps:C,open:A,isDragActive:S}=Q8({onDrop:y,multiple:!1,noClick:!0,noKeyboard:!0,accept:{"image/jpeg":[".png",".jpg",".jpeg"],"image/png":[".png",".jpg",".jpeg"],"image/svg+xml":[".svg"]}});return I(N8,{onClose:n,isOpen:t,title:r,containerProps:w(),children:I(BDe,{uploading:h||l,isDragActive:S,file:d,getInputProps:C,urlValue:o,onUrlChange:i,onInputClick:A,onSaveClick:b,onImageChange:v,helpText:"SVG images are recommended. PNG or JPEG image, will be resized in the browser. You can also paste image directly from clipboard.",disabled:l||!!u||!a})})},YDe=({event:e,isOpen:t,onClose:n,title:r,fieldName:o,maxImageSize:i=500})=>{const{field:s}=Ii({name:o});return I(QDe,{event:e,isOpen:t,onClose:n,title:r,value:s.value||"",onChange:s.onChange,maxImageSize:i})},Rh=({event:e,maxImageSize:t=500,fileSuffix:n="",...r})=>{const o=zx({name:r.name}),[i,s]=m.useState(!1),a=()=>{s(!0)},l=o==null?void 0:o.split(".").pop();return J(Ft,{children:[I(it,{...r,InputProps:{endAdornment:J(Me,{display:"flex",alignItems:"center",ml:1,sx:{cursor:"pointer"},children:[o&&J(Ft,{children:[I("img",{src:o,width:30,onClick:a,alt:"Preview"}),I(Zt,{"aria-label":"download image",disabled:!o,onClick:async()=>{await Yx(o,`OpenPlanner-${n}.${l}`)},edge:"end",children:I(Gx,{})})]}),I(Ou,{position:"end",children:I(Zt,{"aria-label":"add image",onClick:a,onMouseDown:a,edge:"end",children:I(ePe,{})})})]})}}),I(YDe,{event:e,isOpen:i,onClose:()=>s(!1),title:"Add image",fieldName:r.name,maxImageSize:t})]})};function ik(){return ik=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ik.apply(this,arguments)}var rG=["shift","alt","meta","mod","ctrl"],XDe={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function mu(e){return(XDe[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function JDe(e){return rG.includes(e)}function hE(e,t){return t===void 0&&(t=","),e.split(t)}function pE(e,t,n){t===void 0&&(t="+");var r=e.toLocaleLowerCase().split(t).map(function(s){return mu(s)}),o={alt:r.includes("alt"),ctrl:r.includes("ctrl")||r.includes("control"),shift:r.includes("shift"),meta:r.includes("meta"),mod:r.includes("mod")},i=r.filter(function(s){return!rG.includes(s)});return ik({},o,{keys:i,description:n})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&oG([mu(e.key),mu(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&iG([mu(e.key),mu(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){gu.clear()})})();var gu=new Set;function c2(e){return Array.isArray(e)}function ZDe(e,t){t===void 0&&(t=",");var n=c2(e)?e:e.split(t);return n.every(function(r){return gu.has(r.trim().toLowerCase())})}function oG(e){var t=Array.isArray(e)?e:[e];gu.has("meta")&&gu.forEach(function(n){return!JDe(n)&&gu.delete(n.toLowerCase())}),t.forEach(function(n){return gu.add(n.toLowerCase())})}function iG(e){var t=Array.isArray(e)?e:[e];e==="meta"?gu.clear():t.forEach(function(n){return gu.delete(n.toLowerCase())})}function e$e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function t$e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function n$e(e){return sG(e,["input","textarea","select"])}function sG(e,t){var n=e.target;t===void 0&&(t=!1);var r=n&&n.tagName;return c2(t)?!!(r&&t&&t.some(function(o){return o.toLowerCase()===r.toLowerCase()})):!!(r&&t&&t===!0)}function r$e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var o$e=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,i=n.meta,s=n.mod,a=n.shift,l=n.ctrl,u=n.keys,c=t.key,d=t.code,f=t.ctrlKey,h=t.metaKey,p=t.shiftKey,g=t.altKey,b=mu(d),y=c.toLowerCase();if(!(u!=null&&u.includes(b))&&!(u!=null&&u.includes(y))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(b))return!1;if(!r){if(o===!g&&y!=="alt"||a===!p&&y!=="shift")return!1;if(s){if(!h&&!f)return!1}else if(i===!h&&y!=="meta"&&y!=="os"||l===!f&&y!=="ctrl"&&y!=="control")return!1}return u&&u.length===1&&(u.includes(y)||u.includes(b))?!0:u?ZDe(u):!u},i$e=m.createContext(void 0),s$e=function(){return m.useContext(i$e)};function aG(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&aG(e[r],t[r])},!0):e===t}var a$e=m.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),l$e=function(){return m.useContext(a$e)};function u$e(e){var t=m.useRef(void 0);return aG(t.current,e)||(t.current=e),t.current}var s4=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},c$e=typeof window<"u"?m.useLayoutEffect:m.useEffect;function d$e(e,t,n,r){var o=m.useRef(null),i=m.useRef(!1),s=n instanceof Array?r instanceof Array?void 0:r:n,a=c2(e)?e.join(s==null?void 0:s.splitKey):e,l=n instanceof Array?n:r instanceof Array?r:void 0,u=m.useCallback(t,l??[]),c=m.useRef(u);l?c.current=u:c.current=t;var d=u$e(s),f=l$e(),h=f.enabledScopes,p=s$e();return c$e(function(){if(!((d==null?void 0:d.enabled)===!1||!r$e(h,d==null?void 0:d.scopes))){var g=function(C,A){var S;if(A===void 0&&(A=!1),!(n$e(C)&&!sG(C,d==null?void 0:d.enableOnFormTags))){if(o.current!==null){var _=o.current.getRootNode();if((_ instanceof Document||_ instanceof ShadowRoot)&&_.activeElement!==o.current&&!o.current.contains(_.activeElement)){s4(C);return}}(S=C.target)!=null&&S.isContentEditable&&!(d!=null&&d.enableOnContentEditable)||hE(a,d==null?void 0:d.splitKey).forEac
3690h(function(k){var M,R=pE(k,d==null?void 0:d.combinationKey);if(o$e(C,R,d==null?void 0:d.ignoreModifiers)||(M=R.keys)!=null&&M.includes("*")){if(d!=null&&d.ignoreEventWhen!=null&&d.ignoreEventWhen(C)||A&&i.current)return;if(e$e(C,R,d==null?void 0:d.preventDefault),!t$e(C,R,d==null?void 0:d.enabled)){s4(C);return}c.current(C,R),A||(i.current=!0)}})}},b=function(C){C.key!==void 0&&(oG(mu(C.code)),((d==null?void 0:d.keydown)===void 0&&(d==null?void 0:d.keyup)!==!0||d!=null&&d.keydown)&&g(C))},y=function(C){C.key!==void 0&&(iG(mu(C.code)),i.current=!1,d!=null&&d.keyup&&g(C,!0))},v=o.current||(s==null?void 0:s.document)||document;return v.addEventListener("keyup",y),v.addEventListener("keydown",b),p&&hE(a,d==null?void 0:d.splitKey).forEach(function(w){return p.addHotkey(pE(w,d==null?void 0:d.combinationKey,d==null?void 0:d.description))}),function(){v.removeEventListener("keyup",y),v.removeEventListener("keydown",b),p&&hE(a,d==null?void 0:d.splitKey).forEach(function(w){return p.removeHotkey(pE(w,d==null?void 0:d.combinationKey,d==null?void 0:d.description))})}}},[a,d,h]),o}const Pd=()=>{const e=m.useRef(null);return d$e(["ctrl+s","meta+s"],t=>{var r;t.preventDefault();const n=(r=e.current)==null?void 0:r.closest("form");n&&n.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))}),I("div",{ref:e})},f$e=({control:e,isSubmitting:t})=>{const{fields:n,append:r,remove:o}=n7({control:e,name:"socials",keyName:"key"});return J(Ft,{children:[I(Ae,{fontWeight:"600",mt:2,children:"Socials"}),J(Me,{paddingLeft:2,children:[n.map((i,s)=>J(Me,{display:"flex",children:[I(it,{id:i.key,label:"Social name",name:`socials.${s}.name`,control:e,variant:"filled",size:"small",margin:"dense",disabled:t}),I(it,{id:i.key,label:"Icon",name:`socials.${s}.icon`,control:e,variant:"filled",size:"small",margin:"dense",disabled:t}),I(it,{id:i.key,label:"URL",name:`socials.${s}.link`,control:e,variant:"filled",size:"small",margin:"dense",disabled:t}),I(Zt,{"aria-label":"Remove social",onClick:()=>{o(s)},edge:"end",children:I(U7,{})})]},i.key)),I(Zt,{"aria-label":"Add social",onClick:()=>{r({name:"",icon:"",link:""})},children:I(j7,{})})]})]})},JUe=e=>Ml(qy(cn.team(e)),!0),h$e=e=>{const t=Ml(qy(cn.team(e[0])),!0),n=m.useMemo(()=>{var i;const r=((i=t.data)==null?void 0:i.reduce((s,a)=>{const l=a.team||"default";return s[l]||(s[l]=[]),s[l].push(a),s},{}))||{};Object.keys(r).forEach(s=>{r[s].sort((a,l)=>(a.teamOrder||0)-(l.teamOrder||0))});const o={};return Object.keys(r).sort((s,a)=>{const l=Math.min(...r[s].map(c=>c.teamOrder||0)),u=Math.min(...r[a].map(c=>c.teamOrder||0));return l-u}).forEach(s=>{o[s]=r[s]}),o},[t.data]);return{...t,data:n}};function p$e({name:e,options:t,label:n,required:r=!1,multiple:o=!1,disabled:i=!1,placeholder:s,freeSolo:a=!1,loading:l=!1,loadingText:u="Loading...",textFieldProps:c}){const{control:d}=hp();return I(XW,{name:e,control:d,rules:{required:r},render:({field:{onChange:f,value:h},fieldState:{error:p}})=>I(vy,{multiple:o,freeSolo:a,options:t,disabled:i,value:h??(o?[]:null),loading:l,loadingText:u,onChange:(g,b)=>{a&&typeof b=="string"?f({id:b,label:b}):Array.isArray(b)?f(b.map(y=>typeof y=="string"?{id:y,label:y}:y)):f(b)},onBlur:g=>{if(a){const b=g.target.value.trim();if(b)if(o){const y=h??[];y.some(v=>v.label===b)||f([...y,{id:b,label:b}])}else(!h||h.label!==b)&&f({id:b,label:b})}},isOptionEqualToValue:(g,b)=>typeof b=="string"?g.label===b:g.id===(b==null?void 0:b.id),renderInput:g=>I(es,{...g,...c,label:n,placeholder:s,error:!!p,helperText:p==null?void 0:p.message,required:r})})})}const m$e=({event:e,member:t,onSubmit:n})=>{const r=h$e([e.id]),o=m.useMemo(()=>r.data?Object.keys(r.data).map(u=>({id:u,label:u})):[],[r.data]),i=La({defaultValues:t||{name:"",bio:"",photoUrl:"",role:"",team:"",socials:[]}}),{formState:s,control:a}=i,l=s.isSubmitting;return J(Ol,{formContext:i,onSuccess:async u=>{var f;const c=(u.socials||[]).filter(h=>h.link&&h.link.length),d={name:u.name,bio:u.bio||"",role:u.role||"",team:((f=u.team)==null?void 0:f.label)||u.team||"default",photoUrl:u.photoUrl,socials:c};return n(t?{id:t==null?void 0:t.id,...d}:d)},children:[J(Ye,{container:!0,spacing:4,children:[J(Ye,{item:!0,xs:12,md:6,children:[I(it,{margin:"dense",required:!!t,fullWidth:!0,label:"ID",name:"id",variant:"filled",disabled:!0,size:"small"}),I(it,{margin:"dense",fullWidth:!0,required:!0,label:"Name",name:"name",variant:"filled",disabled:l}),I(p$e,{name:"team",label:"Team",options:o,loading:r.isLoading,freeSolo:!0,textFieldProps:{margin:"dense",variant:"filled",disabled:l}}),I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"Bio",name:"bio",variant:"filled",disabled:l,size:"small"}),I(it,{margin:"dense",fullWidth:!0,required:!1,label:"Role",name:"role",variant:"filled",disabled:l}),I(Rh,{event:e,margin:"dense",fullWidth:!0,required:!1,label:"Photo URL",name:"photoUrl",variant:"filled",disabled:l})]}),I(Ye,{item:!0,xs:12,md:6,children:I(f$e,{control:a,isSubmitting:l})})]}),I(Ye,{item:!0,xs:12,children:I(xi,{type:"submit",disabled:s.isSubmitting,loading:s.isSubmitting,fullWidth:!0,variant:"contained",sx:{mt:2,mb:2},children:t?"Save":"Add member"})}),I(Pd,{})]})},Jx=e=>{const[t,n]=m.useState(!1),[r,o]=m.useState(null),i=m.useCallback(async(s,a)=>{try{if(n(!0),o(null),a)return await eO(jr(e,a),s,{merge:!0}),n(!1),a;const l=await Cxe(e,s);return n(!1),l.id}catch(l){o(l)}n(!1)},[e]);return{isLoading:t,error:r,isError:r!==null,mutate:i}},Zx=e=>{const[t,n]=m.useState(!1),[r,o]=m.useState(null),i=m.useCallback(async s=>{let a=null;try{n(!0),o(null),await eO(e,s,{merge:!0})}catch(l){a=l,o(l)}return n(!1),a},[e]);return{isLoading:t,error:r,isError:r!==null,mutate:i}},ZUe=e=>{const[t,n]=m.useState(!1),[r,o]=m.useState(null),i=m.useCallback(async(s,a)=>{try{n(!0),o(null);const l=jr(e,a);await eO(l,s,{merge:!0})}catch(l){o(l)}n(!1)},[e]);return{isLoading:t,error:r,isError:r!==null,mutate:i}},g$e=e=>{const[t,n]=m.useState(!1),[r,o]=m.useState(null),i=m.useCallback(async s=>{try{n(!0),o(null),e instanceof ll?s&&await QL(jr(e,s)):await QL(e)}catch(a){o(a)}n(!1)},[e]);return{isLoading:t,error:r,isError:r!==null,mutate:i}},y$e=(...e)=>e.join(" ").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 ]/g,"").replace(/\s+/g,"-"),v$e=({event:e})=>{var o;const[t,n]=Da(),r=Jx(cn.team(e.id));return J(pi,{maxWidth:"lg",sx:{mt:4,mb:4},children:[I(gt,{href:"/team",startIcon:I(mp,{}),children:"Cancel"}),J(bd,{sx:{paddingX:2},children:[I(Ae,{variant:"h2",children:"New member"}),I(m$e,{event:e,onSubmit:i=>r.mutate(i,y$e(i.name)).then(()=>{n("/team")})}),r.isError&&J(Ae,{color:"error",children:["Error while adding member: ",(o=r.error)==null?void 0:o.message]})]})]})};function lG(){const e={};
3690return new URLSearchParams(window.location.search).forEach((n,r)=>{e[r]=n}),e}const b$e=({event:e,sponsor:t,onSubmit:n})=>{const r=e.sponsorCustomFields||[],o=r.reduce((l,u)=>(l[u.id]=u.type==="boolean"?!1:"",l),{}),i=La({defaultValues:{id:(t==null?void 0:t.id)||"",name:(t==null?void 0:t.name)||"",logoUrl:(t==null?void 0:t.logoUrl)||"",website:(t==null?void 0:t.website)||void 0,customFields:{...o,...t==null?void 0:t.customFields}}}),{formState:s}=i,a=s.isSubmitting;return J(Ol,{formContext:i,onSuccess:async l=>{var c;const u={};for(const d of r){const f=(c=l.customFields)==null?void 0:c[d.id];u[d.id]=d.type==="boolean"?!!f:f||""}return n({...t,id:(t==null?void 0:t.id)||"",name:l.name,logoUrl:l.logoUrl,website:l.website||null,customFields:u})},children:[I(Ye,{container:!0,spacing:4,children:J(Ye,{item:!0,xs:12,md:6,children:[I(it,{margin:"dense",required:!!t,fullWidth:!0,label:"ID",name:"id",variant:"filled",disabled:!0,size:"small"}),I(it,{margin:"dense",fullWidth:!0,required:!0,label:"Name",name:"name",variant:"filled",disabled:a}),I(Rh,{event:e,margin:"dense",fullWidth:!0,required:!0,label:"Logo Url",name:"logoUrl",variant:"filled",disabled:a}),I(it,{margin:"dense",fullWidth:!0,label:"Website",name:"website",variant:"filled",disabled:a,type:"url"}),r.length>0&&J(Ft,{children:[I(Ae,{fontWeight:"600",mt:2,mb:1,children:"Custom fields"}),r.map(l=>l.type==="boolean"?I(Ec,{label:l.name,name:`customFields.${l.id}`},l.id):I(it,{margin:"dense",fullWidth:!0,label:l.name,name:`customFields.${l.id}`,variant:"filled",disabled:a},l.id))]})]})}),I(Ye,{item:!0,xs:12,children:I(xi,{type:"submit",disabled:s.isSubmitting,loading:s.isSubmitting,fullWidth:!0,variant:"contained",sx:{mt:2,mb:2},children:t?"Save":"Add sponsor"})}),I(Pd,{})]})},w$e=({event:e})=>{var i;const[t,n]=Da(),r=lG().categoryId,o=Zx(jr(cn.sponsors(e.id),r));return J(pi,{maxWidth:"lg",sx:{mt:4,mb:4},children:[I(gt,{href:"/sponsors",startIcon:I(mp,{}),children:"Cancel"}),J(bd,{sx:{paddingX:2},children:[I(Ae,{variant:"h2",children:"New sponsor"}),I(b$e,{event:e,onSubmit:s=>o.mutate({sponsors:Sxe({...s,id:DO()})}).then(()=>{n("/sponsors")})}),o.isError&&J(Ae,{color:"error",children:["Error while adding sponsor: ",(i=o.error)==null?void 0:i.message]})]})]})},d2=e=>Ml(cn.speakers(e),!0),C$e=e=>e.reduce((t,n)=>(t[n.id]=n,t),{}),uG=e=>{const t=d2(e);return{...t,data:t.data?C$e(t.data):null}},a4=e=>e?e.toLocaleString({month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}):null,x$e=({isOpen:e,onClose:t,title:n,fieldName:r,filePrefix:o})=>{const{field:i}=Ii({name:r}),s=i.value;return J(N8,{onClose:t,isOpen:e,title:n,children:[I("video",{controls:!0,src:s,style:{width:"100%",borderRadius:1,border:"4px solid #EEE"}}),I(gt,{variant:"outlined",endIcon:I(Gx,{}),disabled:!s,sx:{mt:2},onClick:async()=>{await Yx(s,`${o||"OpenPlanner"}`)},children:"Download"}),I(gt,{variant:"contained",onClick:t,sx:{mt:2},children:"Close"})]})},S$e=({filePrefix:e,...t})=>{const n=zx({name:t.name}),[r,o]=m.useState(!1),i=()=>{o(!0)};return J(Ft,{children:[I(it,{...t,InputProps:{endAdornment:J(Me,{display:"flex",alignItems:"center",ml:1,sx:{cursor:"pointer"},children:[I(Ou,{position:"end",children:I(Zt,{"aria-label":"download video",disabled:!n,onClick:async()=>{await Yx(n,`${e||"OpenPlanner"}.mp4`)},edge:"end",children:I(Gx,{})})}),I(Ou,{position:"end",children:I(Zt,{"aria-label":"preview video",onClick:i,onMouseDown:i,edge:"end",children:I(oPe,{})})})]})}}),I(x$e,{isOpen:r,onClose:()=>o(!1),title:"Video preview",filePrefix:e,fieldName:t.name})]})},_$e=e=>Math.ceil(e/60),e6e=async(e,t)=>{var r,o;const n=jr(cn.sessions(e),t.id);return await tO(n,{...t,dates:{start:(r=t.dates)!=null&&r.start?t.dates.start.toJSDate():null,end:(o=t.dates)!=null&&o.end?t.dates.end.toJSDate():null}})},E$e=async(e,t)=>{const n=_xe(ei);return t.forEach(r=>{const o=jr(cn.sessions(e),r.id);n.update(o,{...r})}),await n.commit()},I$e=(e,t)=>{m.useEffect(()=>{function n(r){e&&(r.preventDefault(),r.returnValue=t)}return window.addEventListener("beforeunload",n),()=>{window.removeEventListener("beforeunload",n)}},[e])};var Cs=(e=>(e.IDLE="IDLE",e.GENERATING="GENERATING",e.SUCCESS="SUCCESS",e.ERROR="ERROR",e))(Cs||{});const Jw=(e,t)=>{const[n,r]=m.useState({generationState:"IDLE",progress:"",message:"",results:null});I$e(n.generationState==="GENERATING","Generation in progress");const o=m.useCallback(async(i,s=!1,a)=>{const l=i.length;r({...n,generationState:"GENERATING",progress:`0/${l}`});const u=await t(i,a,(c,d)=>{r(f=>({...f,progress:`${d}/${c}`}))});if(!u.success)return r({...n,generationState:"ERROR",progress:`${u.results.length}/${l}`,message:u.message||"Error"}),{success:!1,results:[],message:u.message||"Unknown error while generating the video/image, you may want to switch the ShortVid server"};if(s){const c=i.map(d=>{const f=u.results.find(h=>h.baseSession.id===d.id);return f?{id:d.id,...f.updatedSession}:d});await E$e(e.id,c)}return r({...n,generationState:"SUCCESS",progress:"",message:"",results:u}),u},[]);return{generatingState:n,generate:o}};var Yg=(e=>(e["shortvid-openplanner"]="ShortVid hosted by Hugo Gresse (faster?)",e["shortvid-official"]="ShortVid Official",e))(Yg||{});const A$e="ShortVid hosted by Hugo Gresse (faster?)",f2=Object.keys(Yg)[Object.values(Yg).indexOf(A$e)],l4=async(e,t,n,r,o,i,s=f2,a)=>{const l=new URL(cl);l.pathname+=`v1/${e}/sessions/${t}/shortvid`,l.searchParams.append("apiKey",n);try{const u=await fetch(l.href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shortVidType:r,updateSession:o,settings:i,frame:a,endpoint:s})});return u.ok?await u.json():{success:!1,message:`Error: ${u.statusText} - ${u.status} - ${u.type}`}}catch(u){return{success:!1,message:`Error: ${u.message}`,results:[]}}},u4=async(e,t,n)=>{var a,l,u;const r=e.length;let o=t.eventApiKey;if(o||(o=$O(),await i2(t.eventId,{apiKey:o})),!r)return{success:!1,message:"No sessions to generate",results:[]};
3690if(!t.colorBackground||!t.logoUrl||!t.locationName||!t.eventStartDate){const c=[];return t.colorBackground||c.push("colorBackground"),t.logoUrl||c.push("logoUrl"),t.locationName||c.push("locationName"),t.eventStartDate||c.push("eventStartDate"),{success:!1,message:`Missing settings, ensure those are set in the event settings: ${c.join(", ")}`,results:[]}}const i={};let s=0;for(const c of e){const d={backgroundColor:t.colorBackground,title:c.title,startingDate:((l=(a=c.dates)==null?void 0:a.start)==null?void 0:l.toISO())||((u=t.eventStartDate)==null?void 0:u.toISOString())||"",logoUrl:t.logoUrl,location:t.locationName,speakers:(c.speakersData||[]).map(p=>({pictureUrl:p.photoUrl||"",name:p.name,company:p.company||"",job:p.jobTitle||""}))},[f,h]=await Promise.all([l4(t.eventId,c.id,o,t.template,t.updateSession,d,t.endpoint),l4(t.eventId,c.id,o,t.template,t.updateSession,d,t.endpoint,-1)]);if(!f.success||!h.success)return{success:!1,message:f.message||h.message,results:[]};s++,i[c.id]={video:f.shortVidUrl,image:h.shortVidUrl},n(r,s)}return{success:!0,results:e.map(c=>({baseSession:c,updatedSession:{id:c.id,teaserImageUrl:i[c.id].image,teaserVideoUrl:i[c.id].video},videoUrl:i[c.id].video,imageUrl:i[c.id].image}))}},k$e=({event:e})=>{var s,a;const t=Zx(jr(cn.events,e.id)),[n,r]=m.useState(!1),o=La({defaultValues:{template:((s=e.shortVidSettings)==null?void 0:s.template)||"TalkBranded",server:((a=e.shortVidSettings)==null?void 0:a.server)||f2}}),{formState:i}=o;return I(Me,{padding:2,borderRadius:2,border:1,borderColor:"#66666688",mt:2,mb:2,children:J(Ol,{formContext:o,onSuccess:async l=>{const u={template:l.template,server:l.server};return t.mutate({shortVidSettings:u})},children:[I(Ae,{component:"h6",variant:"h6",children:"ShortVid settings"}),J(Ye,{container:!0,spacing:2,children:[J(Ye,{item:!0,xs:12,md:6,children:[I(it,{margin:"dense",required:!0,fullWidth:!0,id:"template",label:"Template name (exemple: TalkBranded or Devoxx2024)",name:"template",variant:"filled",disabled:i.isSubmitting}),I(jw,{margin:"dense",required:!0,fullWidth:!0,label:"Server",name:"server",helperText:"The server to use, OpenPlanner is 2x faster but not updated by the ShortVid team",variant:"filled",disabled:i.isSubmitting,options:Object.keys(Yg).map(l=>({id:l,label:Yg[l]}))})]}),J(Ye,{item:!0,xs:12,md:6,children:[I(gt,{endIcon:I(H7,{}),onClick:()=>r(!n),children:"Expected format"}),n&&I("pre",{children:` # for each session (already compatible with TalkBranded)
3691title: string
3692location: string | null
3693startingDate: string
3694logoUrl: string
3695backgroundColor: string
3696speakers?: {
3697    pictureUrl: string
3698    name: string
3699    company: string
3700    job: string | null
3701}[] `})]}),J(Ye,{item:!0,xs:12,children:[I(xi,{type:"submit",disabled:i.isSubmitting,loading:i.isSubmitting,variant:"contained",children:"Save"}),t.error&&I(Ae,{color:"error",children:t.error.message})]})]}),I(Pd,{})]})})},P$e=async(e,t,n)=>{const r=n.filter(s=>!!s);if(r.length===0)return{success:!0,results:[],inaccessibleUrls:[]};const o=new URL(cl),i=o.pathname.replace(/\/$/,"");o.pathname=`${i}/v1/${e}/check-media`,o.searchParams.append("apiKey",t);try{const s=await fetch(o.href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:r})});if(!s.ok)return{success:!1,results:[],inaccessibleUrls:[],message:`Failed to check media URLs: ${s.statusText}`};const l=(await s.json()).results,u=l.filter(c=>!c.ok);return{success:!0,results:l,inaccessibleUrls:u}}catch(s){return{success:!1,results:[],inaccessibleUrls:[],message:`Error checking media URLs: ${(s==null?void 0:s.message)||"Unknown error"}`}}},T$e=({isOpen:e,onClose:t,event:n,sessions:r,onSuccess:o,forceGenerate:i=!1,onlyMissing:s=!1})=>{var S,_;const{createNotification:a}=pp(),[l,u]=m.useState(s),[c,d]=m.useState({inaccessibleUrls:[],checked:!1,checking:!1}),{generatingState:f,generate:h}=Jw(n,u4),p=Jw(n,u4),g={template:((S=n.shortVidSettings)==null?void 0:S.template)||"TalkBranded",endpoint:((_=n.shortVidSettings)==null?void 0:_.server)||f2,eventId:n.id,eventApiKey:n.apiKey,locationName:n.locationName||"",logoUrl:n.logoUrl||"",colorBackgroun
3701d:n.colorBackground||"",eventStartDate:n.dates.start},b=f.generationState===Cs.GENERATING||p.generatingState.generationState===Cs.GENERATING||c.checking,y=m.useMemo(()=>{let k=i?r:r.filter(M=>M.speakers&&M.speakers.length>0);return l&&(k=k.filter(M=>!M.teaserVideoUrl||!M.teaserImageUrl)),k},[r,i,l]);m.useEffect(()=>{d({inaccessibleUrls:[],checked:!1,checking:!1})},[y,n.logoUrl]);const v=m.useCallback(()=>{const k=[];g.logoUrl&&k.push(g.logoUrl);for(const M of y)for(const R of M.speakersData||[])R.photoUrl&&k.push(R.photoUrl);return[...new Set(k)]},[g.logoUrl,y]),w=m.useCallback(async()=>{const k=g.eventApiKey;if(!k){d({inaccessibleUrls:[],checked:!0,checking:!1}),a("No API key available yet. Please generate a video first or set an API key in the event settings.",{type:"warning"});return}d({inaccessibleUrls:[],checked:!1,checking:!0});const M=v(),R=await P$e(g.eventId,k,M);d({inaccessibleUrls:R.inaccessibleUrls,checked:!0,checking:!1}),!R.success&&R.message&&a(R.message,{type:"error"})},[g.eventId,g.eventApiKey,v,a]),C=()=>{const k=!o;p.generate(y,k,{...g,updateSession:k}).then(({success:M,results:R,message:O})=>{if(M&&R.length){const F=o?"Video generation done!":"Video generation done, sessions updated!";o&&o(R[0]),a(F,{type:"success"}),t()}else a(O||"Error while generating the video/image, you may want to switch the ShortVid server",{type:"error"})})},A=`Generate ${y.length} videos/images (${_$e(y.length*20)} minutes) using ShortVid.io${o?"":", and save them to the sessions"}`;return I(Qh,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,scroll:"body",children:J(Yh,{sx:{minHeight:"80vh"},children:[I(Ae,{variant:"h5",children:"Generate session(s) announcement videos"}),J(Ae,{children:["This will do generate a video (and an image) for each session using shortvid.io. Only sessions with speakers will be generated. The template only apply for one or two speakers and will not render correctly for 3 or more.",I("br",{}),"⚠️ Please fill the event details & theme info in the settings page before generating the videos. ⚠️ Please don't spam this service, as video generation is compute heavy and is not free.",I("br",{}),I("a",{href:"https://github.com/lyonjs/shortvid.io",children:"More info"}),I("br",{})]}),I(k$e,{event:n}),I(ed,{sx:{width:"100%"},control:I(Kh,{checked:l,onChange:k=>u(k.target.checked)}),label:"Only generate for sessions without videos or images"}),J(Me,{sx:{mt:1,mb:1},children:[I(gt,{variant:"outlined",size:"small",disabled:b||y.length===0||!g.eventApiKey,onClick:w,sx:{mr:1},children:c.checking?J(Ft,{children:["Checking media...",I(Qn,{size:16,sx:{ml:1}})]}):"Check media accessibility"}),c.checked&&c.inaccessibleUrls.length===0&&I(so,{severity:"success",sx:{mt:1},children:"All media URLs are accessible."}),c.checked&&c.inaccessibleUrls.length>0&&J(so,{severity:"warning",sx:{mt:1},children:[I(Ae,{variant:"body2",fontWeight:"bold",children:"The following media URLs are not accessible and may cause generation failures:"}),c.inaccessibleUrls.map(k=>J(Ae,{variant:"body2",sx:{wordBreak:"break-all"},children:["• ",k.url,k.status?` (HTTP ${k.status})`:"",k.error?` — ${k.error}`:""]},k.url))]})]}),!i&&J(gt,{variant:"contained",disabled:b,onClick:()=>h(y.slice(0,1),!1,{...g,updateSession:!1}),children:[f.generationState==="GENERATING"?J(Ft,{children:["Generating...",I(Qn,{})]}):"Preview (~20s)",f.progress&&` (${f.progress})`]}),J(gt,{variant:i?"contained":"outlined",disabled:b||y.length===0,onClick:C,sx:{marginLeft:1},children:[p.generatingState.generationState==="GENERATING"?J(Ft,{children:["Generating...",I(Qn,{})]}):A,p.generatingState.progress&&` (${p.generatingState.progress})`]}),y.length===0&&J(Ae,{color:"text.secondary",sx:{mt:2},children:["No sessions to generate."," ",l?"All sessions already have videos.":"No sessions with speakers found."]}),f.generationState===Cs.ERROR&&I(Ae,{color:"error",children:f.message}),p.generatingState.generationState===Cs.ERROR&&I(Ae,{color:"error",children:p.generatingState.message}),f.generationState===Cs.SUCCESS&&J(Ft,{children:[I(Ae,{color:"success",children:f.message}),I(Me,{padding:2,border:1,borderColor:"#66666688",borderRadius:4,margin:2,children:f.results&&f.results.results.map((k,M)=>J(Me,{children:[I("video",{src:k.videoUrl,controls:!0,width:"100%",style:{maxWidth:"400px",marginRight:14}}),I("img",{src:k.imageUrl,width:"100%",style:{maxWidth:"400px"}})]},M))}),J(gt,{variant:"outlined",disabled:p.generatingState.generationState===Cs.GENERATING,onClick:C,children:[p.generatingState.generationState==="GENERATING"?J(Ft,{children:["Generating...",I(Qn,{})]}):A,p.generatingState.progress&&` (${p.generatingState.progress})`]})]})]})})};class R$e{constructor(t){fS(this,"value");fS(this,"next");this.value=t}}var Ks,kc,Pc;class O$e{constructor(){hv(this,Ks,void 0);hv(this,kc,void 0);hv(this,Pc,void 0);this.clear()}enqueue(t){const n=new R$e(t);$l(this,Ks)?($l(this,kc).next=n,ja(this,kc,n)):(ja(this,Ks,n),ja(this,kc,n)),hS(this,Pc)._
3701++}dequeue(){const t=$l(this,Ks);if(t)return ja(this,Ks,$l(this,Ks).next),hS(this,Pc)._--,t.value}clear(){ja(this,Ks,void 0),ja(this,kc,void 0),ja(this,Pc,0)}get size(){return $l(this,Pc)}*[Symbol.iterator](){let t=$l(this,Ks);for(;t;)yield t.value,t=t.next}}Ks=new WeakMap,kc=new WeakMap,Pc=new WeakMap;const M$e={bind(e,t,n){return e.bind(n)}};function D$e(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new O$e;let n=0;const r=()=>{n--,t.size>0&&t.dequeue()()},o=async(a,l,u)=>{n++;const c=(async()=>a(...u))();l(c);try{await c}catch{}r()},i=(a,l,u)=>{t.enqueue(M$e.bind(o.bind(void 0,a,l,u))),(async()=>(await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()))()},s=(a,...l)=>new Promise(u=>{i(a,u,l)});return Object.defineProperties(s,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value(){t.clear()}}}),s}const tf="4.31.0";let c4=!1,Qm,cG,dG,sk,fG,hG,pG,mG,gG;function $$e(e,t={auto:!1}){if(c4)throw new Error(`you must \`import 'openai/shims/${e.kind}'\` before importing anything else from openai`);if(Qm)throw new Error(`can't \`import 'openai/shims/${e.kind}'\` after \`import 'openai/shims/${Qm}'\``);c4=t.auto,Qm=e.kind,cG=e.fetch,e.Request,e.Response,e.Headers,dG=e.FormData,e.Blob,sk=e.File,fG=e.ReadableStream,hG=e.getMultipartRequestOptions,pG=e.getDefaultAgent,mG=e.fileFromPath,gG=e.isFsReadStream}class F$e{constructor(t){this.body=t}get[Symbol.toStringTag](){return"MultipartBody"}}function L$e({manuallyImported:e}={}){const t=e?"You may need to use polyfills":"Add one of these imports before your first `import … from 'openai'`:\n- `import 'openai/shims/node'` (if you're running on Node)\n- `import 'openai/shims/web'` (otherwise)\n";let n,r,o,i;try{n=fetch,r=Request,o=Response,i=Headers}catch(s){throw new Error(`this environment is missing the following Web Fetch API type: ${s.message}. ${t}`)}return{kind:"web",fetch:n,Request:r,Response:o,Headers:i,FormData:typeof FormData<"u"?FormData:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${t}`)}},Blob:typeof Blob<"u"?Blob:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${t}`)}},File:typeof File<"u"?File:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${t}`)}},ReadableStream:typeof ReadableStream<"u"?ReadableStream:class{constructor(){throw new Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${t}`)}},getMultipartRequestOptions:async(s,a)=>({...a,body:new F$e(s)}),getDefaultAgent:s=>{},fileFromPath:()=>{throw new Error("The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/openai/openai-node#file-uploads")},isFsReadStream:s=>!1}}Qm||$$e(L$e(),{auto:!0});class $t extends Error{}class zr extends $t{constructor(t,n,r,o){super(`${zr.makeMessage(t,n,r)}`),this.status=t,this.headers=o;const i=n;this.error=i,this.code=i==null?void 0:i.code,this.param=i==null?void 0:i.param,this.type=i==null?void 0:i.type}static makeMessage(t,n,r){const o=n!=null&&n.message?typeof n.message=="string"?n.message:JSON.stringify(n.message):n?JSON.stringify(n):r;return t&&o?`${t} ${o}`:t?`${t} status code (no body)`:o||"(no status code or body)"}static generate(t,n,r,o){if(!t)return new eS({cause:lk(n)});const i=n==null?void 0:n.error;return t===400?new yG(t,i,r,o):t===401?new vG(t,i,r,o):t===403?new bG(t,i,r,o):t===404?new wG(t,i,r,o):t===409?new CG(t,i,r,o):t===422?new xG(t,i,r,o):t===429?new SG(t,i,r,o):t>=500?new _G(t,i,r,o):new zr(t,i,r,o)}}class di extends zr{constructor({message:t}={}){super(void 0,void 0,t||"Request was aborted.",void 0),this.status=void 0}}class eS extends zr{constructor({message:t,cause:n}){super(void 0,void 0,t||"Connection error.",void 0),this.status=void 0,n&&(this.cause=n)}}class h2 extends eS{constructor({message:t}={}){super({message:t??"Request timed out."})}}class yG extends zr{constructor(){super(...arguments),this.status=400}}class vG extends zr{constructor(){super(...arguments),this.status=401}}class bG extends zr{constructor(){super(...arguments),this.status=403}}class wG extends zr{constructor(){super(...arguments),this.status=404}}class CG extends zr{constructor(){super(...arguments),this.status=409}}class xG extends zr{constructor(){super(...arguments),this.status=422}}class SG extends zr{constructor(){super(...arguments),this.status=429}}class _G extends zr{}class aa{constructor(t,n){this.iterator=t,this.controller=n}static fromSSEResponse(t,n){let r=!1;const o=new N$e;async function*i(){if(!t.body)throw n.abort(),new $t("Attempted to iterate over a response with no body");const a=new cd,l=d4(t.body);for await(const u of l)for(const c of a.decode(u)){const d=o.decode(c);d&&(yield d)}for(const u of a.flush()){const c=o.decode(u);c&&(yield c)}}async function*s(){if(r)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let a=!1;try{for await(const l of i())if(!a){if(l.data.startsWith("[DONE]")){a=!0;continue}if(l.event===null){let u;
3701try{u=JSON.parse(l.data)}catch(c){throw console.error("Could not parse message into JSON:",l.data),console.error("From chunk:",l.raw),c}if(u&&u.error)throw new zr(void 0,u.error,void 0,void 0);yield u}else{let u;try{u=JSON.parse(l.data)}catch(c){throw console.error("Could not parse message into JSON:",l.data),console.error("From chunk:",l.raw),c}if(l.event=="error")throw new zr(void 0,u.error,u.message,void 0);yield{event:l.event,data:u}}}a=!0}catch(l){if(l instanceof Error&&l.name==="AbortError")return;throw l}finally{a||n.abort()}}return new aa(s,n)}static fromReadableStream(t,n){let r=!1;async function*o(){const s=new cd,a=d4(t);for await(const l of a)for(const u of s.decode(l))yield u;for(const l of s.flush())yield l}async function*i(){if(r)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let s=!1;try{for await(const a of o())s||a&&(yield JSON.parse(a));s=!0}catch(a){if(a instanceof Error&&a.name==="AbortError")return;throw a}finally{s||n.abort()}}return new aa(i,n)}[Symbol.asyncIterator](){return this.iterator()}tee(){const t=[],n=[],r=this.iterator(),o=i=>({next:()=>{if(i.length===0){const s=r.next();t.push(s),n.push(s)}return i.shift()}});return[new aa(()=>o(t),this.controller),new aa(()=>o(n),this.controller)]}toReadableStream(){const t=this;let n;const r=new TextEncoder;return new fG({async start(){n=t[Symbol.asyncIterator]()},async pull(o){try{const{value:i,done:s}=await n.next();if(s)return o.close();const a=r.encode(JSON.stringify(i)+`
3702`);o.enqueue(a)}catch(i){o.error(i)}},async cancel(){var o;await((o=n.return)==null?void 0:o.call(n))}})}}class N$e{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(t){if(t.endsWith("\r")&&(t=t.substring(0,t.length-1)),!t){if(!this.event&&!this.data.length)return null;const i={event:this.event,data:this.data.join(`
3703`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],i}if(this.chunks.push(t),t.startsWith(":"))return null;let[n,r,o]=V$e(t,":");return o.startsWith(" ")&&(o=o.substring(1)),n==="event"?this.event=o:n==="data"&&this.data.push(o),null}}class cd{constructor(){this.buffer=[],this.trailingCR=!1}decode(t){let n=this.decodeText(t);if(this.trailingCR&&(n="\r"+n,this.trailingCR=!1),n.endsWith("\r")&&(this.trailingCR=!0,n=n.slice(0,-1)),!n)return[];const r=cd.NEWLINE_CHARS.has(n[n.length-1]||"");let o=n.split(cd.NEWLINE_REGEXP);return r&&o.pop(),o.length===1&&!r?(this.buffer.push(o[0]),[]):(this.buffer.length>0&&(o=[this.buffer.join("")+o[0],...o.slice(1)],this.buffer=[]),r||(this.buffer=[o.pop()||""]),o)}decodeText(t){if(t==null)return"";if(typeof t=="string")return t;if(typeof Buffer<"u"){if(t instanceof Buffer)return t.toString();if(t instanceof Uint8Array)return Buffer.from(t).toString();throw new $t(`Unexpected: received non-Uint8Array (${t.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if(typeof TextDecoder<"u"){if(t instanceof Uint8Array||t instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(t);throw new $t(`Unexpected: received non-Uint8Array/ArrayBuffer (${t.constructor.name}) in a web platform. Please report this error.`)}throw new $t("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];const t=[this.buffer.join("")];return this.buffer=[],this.trailingCR=!1,t}}cd.NEWLINE_CHARS=new Set([`
3704`,"\r","\v","\f","�","�","�","…","\u2028","\u2029"]);cd.NEWLINE_REGEXP=/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;function V$e(e,t){const n=e.indexOf(t);return n!==-1?[e.substring(0,n),t,e.substring(n+t.length)]:[e,"",""]}function d4(e){if(e[Symbol.asyncIterator])return e;const t=e.getReader();return{async next(){try{const n=await t.read();return n!=null&&n.done&&t.releaseLock(),n}catch(n){throw t.releaseLock(),n}},async return(){const n=t.cancel();return t.releaseLock(),await n,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}const EG=e=>e!=null&&typeof e=="object"&&typeof e.url=="string"&&typeof e.blob=="function",IG=e=>e!=null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.lastModified=="number"&&AG(e),AG=e=>e!=null&&typeof e=="object"&&typeof e.size=="number"&&typeof e.type=="string"&&typeof e.text=="function"&&typeof e.slice=="function"&&typeof e.arrayBuffer=="function",B$e=e=>IG(e)||EG(e)||gG(e);async function kG(e,t,n){var o;if(e=await e,n??(n=IG(e)?{lastModified:e.lastModified,type:e.type}:{}),EG(e)){const i=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()??"unknown_file"),new sk([i],t,n)}const r=await j$e(e);if(t||(t=U$e(e)??"unknown_file"),!n.type){const i=(o=r[0])==null?void 0:o.type;typeof i=="string"&&(n={...n,type:i})}return new sk(r,t,n)}async function j$e(e){var n;let t=[];if(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(AG(e))t.push(await e.arrayBuffer());else if(H$e(e))for await(const r of e)t.push(r);else throw new Error(`Unexpected data type: ${typeof e}; constructor: ${(n=e==null?void 0:e.constructor)==null?void 0:n.name}; props: ${z$e(e)}`);return t}function z$e(e){return`[${Object.getOwnPropertyNames(e).map(n=>`"${n}"`).join(", ")}]`}function U$e(e){var t;return mE(e.name)||mE(e.filename)||((t=mE(e.path))==null?void 0:t.split(/[\\/]/).pop())}const mE=e=>{if(typeof e=="string")return e;if(typeof Buffer<"u"&&e instanceof Buffer)return String(e)},H$e=e=>e!=null&&typeof e=="object"&&typeof e[Symbol.asyncIterator]=="function",f4=e=>e&&typeof e=="object"&&e.body&&e[Symbol.toStringTag]==="MultipartBody",Xg=async e=>{const t=await W$e(e.body);return hG(t,e)},W$e=async e=>{const t=new dG;return await Promise.all(Object.entries(e||{}).map(([n,r])=>ak(t,n,r))),t},ak=async(e,t,n)=>{if(n!==void 0){if(n==null)throw new TypeError(`Received null for "${t}"; to pass null in FormData, you must use the string 'null'`);if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")e.append(t,String(n));else if(B$e(n)){const r=await kG(n);e.append(t,r)}else if(Array.isArray(n))await Promise.all(n.map(r=>ak(e,t+"[]",r)));else if(typeof n=="object")await Promise.all(Object.entries(n).map(([r,o])=>ak(e,`${t}[${r}]`,o)));else throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${n} instead`)}};var Xf={},G$e=function(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n},q$e=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},bb;async function PG(e){const{response:t}=e;if(e.options.stream)return Jf("response",t.status,t.url,t.headers,t.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(t,e.controller):aa.fromSSEResponse(t,e.controller);if(t.status===204)return null;if(e.options.__binaryResponse)return t;const n=t.headers.get("content-type");if((n==null?void 0:n.includes("application/json"))||(n==null?void 0:n.includes("application/vnd.api+json"))){const i=await t.json();return Jf("response",t.status,t.url,t.headers,i),i}const o=await t.text();return Jf("response",t.status,t.url,t.headers,o),o}class tS extends Promise{constructor(t,n=PG){super(r=>{r(null)}),this.responsePromise=t,this.parseResponse=n}_thenUnwrap(t){return new tS(this.responsePromise,async n=>t(await this.parseResponse(n)))}asResponse(){return this.responsePromise.then(t=>t.response)}async withResponse(){const[t,n]=await Promise.all([this.parse(),this.asResponse()]);return{data:t,response:n}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(this.parseResponse)),this.parsedPromise}then(t,n){return this.parse().then(t,n)}catch(t){return this.parse().catch(t)}finally(t){return this.parse().finally(t)}}class K$e{constructor({baseURL:t,maxRetries:n=2,timeout:r=6e5,httpAgent:o,fetch:i}){this.baseURL=t,this.maxRetries=gE("maxRetries",n),this.timeout=gE("timeout",r),this.httpAgent=o,this.fetch=i??cG}authHeaders(t){return{}}defaultHeaders(t){return{Accept:"application/json","Content-Type":"application/json","User-Agent":this.getUserAgent(),...eFe(),...this.authHeaders(t)}}validateHeaders(t,n){}defaultIdempotencyKey(){return`stainless-node-retry-${oFe()}`}get(t,n){return this.methodRequest("get",t,n)}post(t,n){return this.methodRequest("post",t,n)}patch(t,n){return this.methodRequest("patch",t,n)}
3704put(t,n){return this.methodRequest("put",t,n)}delete(t,n){return this.methodRequest("delete",t,n)}methodRequest(t,n,r){return this.request(Promise.resolve(r).then(o=>({method:t,path:n,...o})))}getAPIList(t,n,r){return this.requestAPIList(n,{method:"get",path:t,...r})}calculateContentLength(t){if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.byteLength(t,"utf8").toString();if(typeof TextEncoder<"u")return new TextEncoder().encode(t).length.toString()}return null}buildRequest(t){var p;const{method:n,path:r,query:o,headers:i={}}=t,s=f4(t.body)?t.body.body:t.body?JSON.stringify(t.body,null,2):null,a=this.calculateContentLength(s),l=this.buildURL(r,o);"timeout"in t&&gE("timeout",t.timeout);const u=t.timeout??this.timeout,c=t.httpAgent??this.httpAgent??pG(l),d=u+1e3;typeof((p=c==null?void 0:c.options)==null?void 0:p.timeout)=="number"&&d>(c.options.timeout??0)&&(c.options.timeout=d),this.idempotencyHeader&&n!=="get"&&(t.idempotencyKey||(t.idempotencyKey=this.defaultIdempotencyKey()),i[this.idempotencyHeader]=t.idempotencyKey);const f=this.buildHeaders({options:t,headers:i,contentLength:a});return{req:{method:n,...s&&{body:s},headers:f,...c&&{agent:c},signal:t.signal??null},url:l,timeout:u}}buildHeaders({options:t,headers:n,contentLength:r}){const o={};r&&(o["content-length"]=r);const i=this.defaultHeaders(t);return g4(o,i),g4(o,n),f4(t.body)&&Qm!=="node"&&delete o["content-type"],this.validateHeaders(o,n),o}async prepareOptions(t){}async prepareRequest(t,{url:n,options:r}){}parseHeaders(t){return t?Symbol.iterator in t?Object.fromEntries(Array.from(t).map(n=>[...n])):{...t}:{}}makeStatusError(t,n,r,o){return zr.generate(t,n,r,o)}request(t,n=null){return new tS(this.makeRequest(t,n))}async makeRequest(t,n){var c,d;const r=await t;n==null&&(n=r.maxRetries??this.maxRetries),await this.prepareOptions(r);const{req:o,url:i,timeout:s}=this.buildRequest(r);if(await this.prepareRequest(o,{url:i,options:r}),Jf("request",i,r,o.headers),(c=r.signal)!=null&&c.aborted)throw new di;const a=new AbortController,l=await this.fetchWithTimeout(i,o,s,a).catch(lk);if(l instanceof Error){if((d=r.signal)!=null&&d.aborted)throw new di;if(n)return this.retryRequest(r,n);throw l.name==="AbortError"?new h2:new eS({cause:l})}const u=Y$e(l.headers);if(!l.ok){if(n&&this.shouldRetry(l)){const y=`retrying, ${n} attempts remaining`;return Jf(`response (error; ${y})`,l.status,i,u),this.retryRequest(r,n,u)}const f=await l.text().catch(y=>lk(y).message),h=tFe(f),p=h?void 0:f;throw Jf(`response (error; ${n?"(error; no more retries left)":"(error; not retryable)"})`,l.status,i,u,p),this.makeStatusError(l.status,h,p,u)}return{response:l,options:r,controller:a}}requestAPIList(t,n){const r=this.makeRequest(n,null);return new Q$e(this,r,t)}buildURL(t,n){const r=rFe(t)?new URL(t):new URL(this.baseURL+(this.baseURL.endsWith("/")&&t.startsWith("/")?t.slice(1):t)),o=this.defaultQuery();return OG(o)||(n={...o,...n}),typeof n=="object"&&n&&!Array.isArray(n)&&(r.search=this.stringifyQuery(n)),r.toString()}stringifyQuery(t){return Object.entries(t).filter(([n,r])=>typeof r<"u").map(([n,r])=>{if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return`${encodeURIComponent(n)}=${encodeURIComponent(r)}`;if(r===null)return`${encodeURIComponent(n)}=`;throw new $t(`Cannot stringify type ${typeof r}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}async fetchWithTimeout(t,n,r,o){const{signal:i,...s}=n||{};i&&i.addEventListener("abort",()=>o.abort());const a=setTimeout(()=>o.abort(),r);return this.getRequestClient().fetch.call(void 0,t,{signal:o.signal,...s}).finally(()=>{clearTimeout(a)})}getRequestClient(){return{fetch:this.fetch}}shouldRetry(t){const n=t.headers.get("x-should-retry");return n==="true"?!0:n==="false"?!1:t.status===408||t.status===409||t.status===429||t.status>=500}async retryRequest(t,n,r){let o;const i=r==null?void 0:r["retry-after-ms"];
3704if(i){const a=parseFloat(i);Number.isNaN(a)||(o=a)}const s=r==null?void 0:r["retry-after"];if(s&&!o){const a=parseFloat(s);Number.isNaN(a)?o=Date.parse(s)-Date.now():o=a*1e3}if(!(o&&0<=o&&o<60*1e3)){const a=t.maxRetries??this.maxRetries;o=this.calculateDefaultRetryTimeoutMillis(n,a)}return await RG(o),this.makeRequest(t,n-1)}calculateDefaultRetryTimeoutMillis(t,n){const i=n-t,s=Math.min(.5*Math.pow(2,i),8),a=1-Math.random()*.25;return s*a*1e3}getUserAgent(){return`${this.constructor.name}/JS ${tf}`}}class TG{constructor(t,n,r,o){bb.set(this,void 0),G$e(this,bb,t,"f"),this.options=o,this.response=n,this.body=r}hasNextPage(){return this.getPaginatedItems().length?this.nextPageInfo()!=null:!1}async getNextPage(){const t=this.nextPageInfo();if(!t)throw new $t("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");const n={...this.options};if("params"in t&&typeof n.query=="object")n.query={...n.query,...t.params};else if("url"in t){const r=[...Object.entries(n.query||{}),...t.url.searchParams.entries()];for(const[o,i]of r)t.url.searchParams.set(o,i);n.query=void 0,n.path=t.url.toString()}return await q$e(this,bb,"f").requestAPIList(this.constructor,n)}async*iterPages(){let t=this;for(yield t;t.hasNextPage();)t=await t.getNextPage(),yield t}async*[(bb=new WeakMap,Symbol.asyncIterator)](){for await(const t of this.iterPages())for(const n of t.getPaginatedItems())yield n}}class Q$e extends tS{constructor(t,n,r){super(n,async o=>new r(t,o.response,await PG(o),o.options))}async*[Symbol.asyncIterator](){const t=await this;for await(const n of t)yield n}}const Y$e=e=>new Proxy(Object.fromEntries(e.entries()),{get(t,n){const r=n.toString();return t[r.toLowerCase()]||t[r]}}),X$e={method:!0,path:!0,query:!0,body:!0,headers:!0,maxRetries:!0,stream:!0,timeout:!0,httpAgent:!0,signal:!0,idempotencyKey:!0,__binaryResponse:!0,__streamClass:!0},Ta=e=>typeof e=="object"&&e!==null&&!OG(e)&&Object.keys(e).every(t=>MG(X$e,t)),J$e=()=>{var t;if(typeof Deno<"u"&&Deno.build!=null)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":tf,"X-Stainless-OS":p4(Deno.build.os),"X-Stainless-Arch":h4(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:((t=Deno.version)==null?void 0:t.deno)??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":tf,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":process.version};if(Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":tf,"X-Stainless-OS":p4(process.platform),"X-Stainless-Arch":h4(process.arch),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":process.version};const e=Z$e();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":tf,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":tf,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function Z$e(){if(typeof navigator>"u"||!navigator)return null;const e=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(const{key:t,pattern:n}of e){const r=n.exec(navigator.userAgent);if(r){const o=r[1]||0,i=r[2]||0,s=r[3]||0;return{browser:t,version:`${o}.${i}.${s}`}}}return null}const h4=e=>e==="x32"?"x32":e==="x86_64"||e==="x64"?"x64":e==="arm"?"arm":e==="aarch64"||e==="arm64"?"arm64":e?`other:${e}`:"unknown",p4=e=>(e=e.toLowerCase(),e.includes("ios")?"iOS":e==="android"?"Android":e==="darwin"?"MacOS":e==="win32"?"Windows":e==="freebsd"?"FreeBSD":e==="openbsd"?"OpenBSD":e==="linux"?"Linux":e?`Other:${e}`:"Unknown");let m4;const eFe=()=>m4??(m4=J$e()),tFe=e=>{try{return JSON.parse(e)}catch{return}},nFe=new RegExp("^(?:[a-z]+:)?//","i"),rFe=e=>nFe.test(e),RG=e=>new Promise(t=>setTimeout(t,e)),gE=(e,t)=>{if(typeof t!="number"||!Number.isInteger(t))throw new $t(`${e} must be an integer`);if(t<0)throw new $t(`${e} must be a positive integer`);return t},lk=e=>e instanceof Error?e:new Error(e),yE=e=>{var t,n,r,o;
3704if(typeof process<"u")return((t=Xf==null?void 0:Xf[e])==null?void 0:t.trim())??void 0;if(typeof Deno<"u")return(o=(r=(n=Deno.env)==null?void 0:n.get)==null?void 0:r.call(n,e))==null?void 0:o.trim()};function OG(e){if(!e)return!0;for(const t in e)return!1;return!0}function MG(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function g4(e,t){for(const n in t){if(!MG(t,n))continue;const r=n.toLowerCase();if(!r)continue;const o=t[n];o===null?delete e[r]:o!==void 0&&(e[r]=o)}}function Jf(e,...t){typeof process<"u"&&(Xf==null?void 0:Xf.DEBUG)==="true"&&console.log(`OpenAI:DEBUG:${e}`,...t)}const oFe=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),iFe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function y4(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}class p2 extends TG{constructor(t,n,r,o){super(t,n,r,o),this.data=r.data||[],this.object=r.object}getPaginatedItems(){return this.data??[]}nextPageParams(){return null}nextPageInfo(){return null}}class Dl extends TG{constructor(t,n,r,o){super(t,n,r,o),this.data=r.data||[]}getPaginatedItems(){return this.data??[]}nextPageParams(){const t=this.nextPageInfo();if(!t)return null;if("params"in t)return t.params;const n=Object.fromEntries(t.url.searchParams);return Object.keys(n).length?n:null}nextPageInfo(){var r;const t=this.getPaginatedItems();if(!t.length)return null;const n=(r=t[t.length-1])==null?void 0:r.id;return n?{params:{after:n}}:null}}class Tn{constructor(t){this._client=t}}let Zw=class extends Tn{create(t,n){return this._client.post("/chat/completions",{body:t,...n,stream:t.stream??!1})}};Zw||(Zw={});let e1=class extends Tn{constructor(){super(...arguments),this.completions=new Zw(this._client)}};(function(e){e.Completions=Zw})(e1||(e1={}));class t1 extends Tn{create(t,n){return this._client.post("/audio/speech",{body:t,...n,__binaryResponse:!0})}}t1||(t1={});class n1 extends Tn{create(t,n){return this._client.post("/audio/transcriptions",Xg({body:t,...n}))}}n1||(n1={});class r1 extends Tn{create(t,n){return this._client.post("/audio/translations",Xg({body:t,...n}))}}r1||(r1={});class o1 extends Tn{constructor(){super(...arguments),this.transcriptions=new n1(this._client),this.translations=new r1(this._client),this.speech=new t1(this._client)}}(function(e){e.Transcriptions=n1,e.Translations=r1,e.Speech=t1})(o1||(o1={}));let i1=class extends Tn{create(t,n,r){return this._client.post(`/assistants/${t}/files`,{body:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}retrieve(t,n,r){return this._client.get(`/assistants/${t}/files/${n}`,{...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}list(t,n={},r){return Ta(n)?this.list(t,{},n):this._client.getAPIList(`/assistants/${t}/files`,m2,{query:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}del(t,n,r){return this._client.delete(`/assistants/${t}/files/${n}`,{...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}};class m2 extends Dl{}(function(e){e.AssistantFilesPage=m2})(i1||(i1={}));class s1 extends Tn{constructor(){super(...arguments),this.files=new i1(this._client)}create(t,n){return this._client.post("/assistants",{body:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n==null?void 0:n.headers}})}retrieve(t,n){return this._client.get(`/assistants/${t}`,{...n,headers:{"OpenAI-Beta":"assistants=v1",...n==null?void 0:n.headers}})}update(t,n,r){return this._client.post(`/assistants/${t}`,{body:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}list(t={},n){return Ta(t)?this.list({},t):this._client.getAPIList("/assistants",g2,{query:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n==null?void 0:n.headers}})}del(t,n){return this._client.delete(`/assistants/${t}`,{...n,headers:{"OpenAI-Beta":"assistants=v1",...n==null?void 0:n.headers}})}}class g2 extends Dl{}(function(e){e.AssistantsPage=g2,e.Files=i1,e.AssistantFilesPage=m2})(s1||(s1={}));function v4(e){return typeof e.parse=="function"}const Zf=e=>(e==null?void 0:e.role)==="assistant",DG=e=>(e==null?void 0:e.role)==="function",$G=e=>(e==null?void 0:e.role)==="tool";var fs=function(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n},It=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Zr,o0,i0,cm,dm,s0,fm,Wa,hm,a0,l0,nf,uk,a1,ck,dk,fk,hk,FG,pk;const b4=10;class LG{constructor(){Zr.add(this),this.controller=new AbortController,o0.set(this,void 0),i0.set(this,()=>{}),cm.set(this,()=>{}),dm.set(this,void 0),s0.set(this,()=>{}),fm.set(this,()=>{}),Wa.set(this,{}),this._chatCompletions=[],this.messages=[],hm.set(this,!1),a0.set(this,!1),l0.set(this,!1),nf.set(this,!1),hk.set(this,t=>{if(fs(this,a0,!0,"f"),t instanceof Error&&t.name==="AbortError"&&(t=new di),t instanceof di)return fs(this,l0,!0,"f"),this._emit("abort",t);if(t instanceof $t)return this._emit("error",t);if(t instanceof Error){const n=new $t(t.message);return n.cause=t,this._emit("error",n)}return this._emit("error",new $t(String(t)))}),fs(this,o0,new Promise((t,n)=>{fs(this,i0,t,"f"),fs(this,cm,n,"f")}),"f"),fs(this,dm,new Promise((t,n)=>{fs(this,s0,t,"f"),fs(this,fm,n,"f")}),"f"),It(this,o0,"f").catch(()=>{}),It(this,dm,"f").catch(()=>{})}_run(t){setTimeout(()=>{t().then(()=>{this._emitFinal(),this._emit("end")},It(this,hk,"f"))},0)}_addChatCompletion(t){var r;this._chatCompletions.push(t),this._emit("chatCompletion",t);const n=(r=t.choices[0])==null?void 0:r.message;return n&&this._addMessage(n),t}_addMessage(t,n=!0){if("content"in t||(t.content=null),this.messages.push(t),n){if
3704(this._emit("message",t),(DG(t)||$G(t))&&t.content)this._emit("functionCallResult",t.content);else if(Zf(t)&&t.function_call)this._emit("functionCall",t.function_call);else if(Zf(t)&&t.tool_calls)for(const r of t.tool_calls)r.type==="function"&&this._emit("functionCall",r.function)}}_connected(){this.ended||(It(this,i0,"f").call(this),this._emit("connect"))}get ended(){return It(this,hm,"f")}get errored(){return It(this,a0,"f")}get aborted(){return It(this,l0,"f")}abort(){this.controller.abort()}on(t,n){return(It(this,Wa,"f")[t]||(It(this,Wa,"f")[t]=[])).push({listener:n}),this}off(t,n){const r=It(this,Wa,"f")[t];if(!r)return this;const o=r.findIndex(i=>i.listener===n);return o>=0&&r.splice(o,1),this}once(t,n){return(It(this,Wa,"f")[t]||(It(this,Wa,"f")[t]=[])).push({listener:n,once:!0}),this}emitted(t){return new Promise((n,r)=>{fs(this,nf,!0,"f"),t!=="error"&&this.once("error",r),this.once(t,n)})}async done(){fs(this,nf,!0,"f"),await It(this,dm,"f")}async finalChatCompletion(){await this.done();const t=this._chatCompletions[this._chatCompletions.length-1];if(!t)throw new $t("stream ended without producing a ChatCompletion");return t}async finalContent(){return await this.done(),It(this,Zr,"m",uk).call(this)}async finalMessage(){return await this.done(),It(this,Zr,"m",a1).call(this)}async finalFunctionCall(){return await this.done(),It(this,Zr,"m",ck).call(this)}async finalFunctionCallResult(){return await this.done(),It(this,Zr,"m",dk).call(this)}async totalUsage(){return await this.done(),It(this,Zr,"m",fk).call(this)}allChatCompletions(){return[...this._chatCompletions]}_emit(t,...n){if(It(this,hm,"f"))return;t==="end"&&(fs(this,hm,!0,"f"),It(this,s0,"f").call(this));const r=It(this,Wa,"f")[t];if(r&&(It(this,Wa,"f")[t]=r.filter(o=>!o.once),r.forEach(({listener:o})=>o(...n))),t==="abort"){const o=n[0];!It(this,nf,"f")&&!(r!=null&&r.length)&&Promise.reject(o),It(this,cm,"f").call(this,o),It(this,fm,"f").call(this,o),this._emit("end");return}if(t==="error"){const o=n[0];!It(this,nf,"f")&&!(r!=null&&r.length)&&Promise.reject(o),It(this,cm,"f").call(this,o),It(this,fm,"f").call(this,o),this._emit("end")}}_emitFinal(){const t=this._chatCompletions[this._chatCompletions.length-1];t&&this._emit("finalChatCompletion",t);const n=It(this,Zr,"m",a1).call(this);n&&this._emit("finalMessage",n);const r=It(this,Zr,"m",uk).call(this);r&&this._emit("finalContent",r);const o=It(this,Zr,"m",ck).call(this);o&&this._emit("finalFunctionCall",o);const i=It(this,Zr,"m",dk).call(this);i!=null&&this._emit("finalFunctionCallResult",i),this._chatCompletions.some(s=>s.usage)&&this._emit("totalUsage",It(this,Zr,"m",fk).call(this))}async _createChatCompletion(t,n,r){const o=r==null?void 0:r.signal;o&&(o.aborted&&this.controller.abort(),o.addEventListener("abort",()=>this.controller.abort())),It(this,Zr,"m",FG).call(this,n);const i=await t.create({...n,stream:!1},{...r,signal:this.controller.signal});return this._connected(),this._addChatCompletion(i)}async _runChatCompletion(t,n,r){for(const o of n.messages)this._addMessage(o,!1);return await this._createChatCompletion(t,n,r)}async _runFunctions(t,n,r){var f;const o="function",{function_call:i="auto",stream:s,...a}=n,l=typeof i!="string"&&(i==null?void 0:i.name),{maxChatCompletions:u=b4}=r||{},c={};for(const h of n.functions)c[h.name||h.function.name]=h;const d=n.functions.map(h=>({name:h.name||h.function.name,parameters:h.parameters,description:h.description}));for(const h of n.messages)this._addMessage(h,!1);for(let h=0;h<u;++h){const g=(f=(await this._createChatCompletion(t,{...a,function_call:i,functions:d,messages:[...this.messages]},r)).choices[0])==null?void 0:f.message;if(!g)throw new $t("missing message in ChatCompletion response");if(!g.function_call)return;const{name:b,arguments:y}=g.function_call,v=c[b];if(v){if(l&&l!==b){const S=`Invalid function_call: ${JSON.stringify(b)}. ${JSON.stringify(l)} requested. Please try again`;this._addMessage({role:o,name:b,content:S});continue}}else{const S=`Invalid function_call: ${JSON.stringify(b)}. Available options are: ${d.map(_=>JSON.stringify(_.name)).join(", ")}. Please try again`;this._addMessage({role:o,name:b,content:S});continue}let w;try{w=v4(v)?await v.parse(y):y}catch(S){this._addMessage({role:o,name:b,content:S instanceof Error?S.message:String(S)});continue}const C=await v.function(w,this),A=It(this,Zr,"m",pk).call(this,C);if(this._addMessage({role:o,name:b,content:A}),l)return}}async _runTools(t,n,r){var f,h;
3704const o="tool",{tool_choice:i="auto",stream:s,...a}=n,l=typeof i!="string"&&((f=i==null?void 0:i.function)==null?void 0:f.name),{maxChatCompletions:u=b4}=r||{},c={};for(const p of n.tools)p.type==="function"&&(c[p.function.name||p.function.function.name]=p.function);const d="tools"in n?n.tools.map(p=>p.type==="function"?{type:"function",function:{name:p.function.name||p.function.function.name,parameters:p.function.parameters,description:p.function.description}}:p):void 0;for(const p of n.messages)this._addMessage(p,!1);for(let p=0;p<u;++p){const b=(h=(await this._createChatCompletion(t,{...a,tool_choice:i,tools:d,messages:[...this.messages]},r)).choices[0])==null?void 0:h.message;if(!b)throw new $t("missing message in ChatCompletion response");if(!b.tool_calls)return;for(const y of b.tool_calls){if(y.type!=="function")continue;const v=y.id,{name:w,arguments:C}=y.function,A=c[w];if(A){if(l&&l!==w){const M=`Invalid tool_call: ${JSON.stringify(w)}. ${JSON.stringify(l)} requested. Please try again`;this._addMessage({role:o,tool_call_id:v,content:M});continue}}else{const M=`Invalid tool_call: ${JSON.stringify(w)}. Available options are: ${d.map(R=>JSON.stringify(R.function.name)).join(", ")}. Please try again`;this._addMessage({role:o,tool_call_id:v,content:M});continue}let S;try{S=v4(A)?await A.parse(C):C}catch(M){const R=M instanceof Error?M.message:String(M);this._addMessage({role:o,tool_call_id:v,content:R});continue}const _=await A.function(S,this),k=It(this,Zr,"m",pk).call(this,_);if(this._addMessage({role:o,tool_call_id:v,content:k}),l)return}}}}o0=new WeakMap,i0=new WeakMap,cm=new WeakMap,dm=new WeakMap,s0=new WeakMap,fm=new WeakMap,Wa=new WeakMap,hm=new WeakMap,a0=new WeakMap,l0=new WeakMap,nf=new WeakMap,hk=new WeakMap,Zr=new WeakSet,uk=function(){return It(this,Zr,"m",a1).call(this).content??null},a1=function(){let t=this.messages.length;for(;t-- >0;){const n=this.messages[t];if(Zf(n))return{...n,content:n.content??null}}throw new $t("stream ended without producing a ChatCompletionMessage with role=assistant")},ck=function(){var t,n;for(let r=this.messages.length-1;r>=0;r--){const o=this.messages[r];if(Zf(o)&&(o!=null&&o.function_call))return o.function_call;if(Zf(o)&&((t=o==null?void 0:o.tool_calls)!=null&&t.length))return(n=o.tool_calls.at(-1))==null?void 0:n.function}},dk=function(){for(let t=this.messages.length-1;t>=0;t--){const n=this.messages[t];if(DG(n)&&n.content!=null||$G(n)&&n.content!=null&&this.messages.some(r=>{var o;return r.role==="assistant"&&((o=r.tool_calls)==null?void 0:o.some(i=>i.type==="function"&&i.id===n.tool_call_id))}))return n.content}},fk=function(){const t={completion_tokens:0,prompt_tokens:0,total_tokens:0};for(const{usage:n}of this._chatCompletions)n&&(t.completion_tokens+=n.completion_tokens,t.prompt_tokens+=n.prompt_tokens,t.total_tokens+=n.total_tokens);return t},FG=function(t){if(t.n!=null&&t.n>1)throw new $t("ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.")},pk=function(t){return typeof t=="string"?t:t===void 0?"undefined":JSON.stringify(t)};class Jg extends LG{static runFunctions(t,n,r){const o=new Jg,i={...r,headers:{...r==null?void 0:r.headers,"X-Stainless-Helper-Method":"runFunctions"}};return o._run(()=>o._runFunctions(t,n,i)),o}static runTools(t,n,r){const o=new Jg,i={...r,headers:{...r==null?void 0:r.headers,"X-Stainless-Helper-Method":"runTools"}};return o._run(()=>o._runTools(t,n,i)),o}_addMessage(t){super._addMessage(t),Zf(t)&&t.content&&this._emit("content",t.content)}}var hs=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},vE=function(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n},zs,Wl,bE,wE,wb,w4;class Zg extends LG{constructor(){super(...arguments),zs.add(this),Wl.set(this,void 0)}get currentChatCompletionSnapshot(){return hs(this,Wl,"f")}static fromReadableStream(t){const n=new Zg;return n._run(()=>n._fromReadableStream(t)),n}static createChatCompletion(t,n,r){const o=new Zg;return o._run(()=>o._runChatCompletion(t,{...n,stream:!0}
3704,{...r,headers:{...r==null?void 0:r.headers,"X-Stainless-Helper-Method":"stream"}})),o}async _createChatCompletion(t,n,r){var s;const o=r==null?void 0:r.signal;o&&(o.aborted&&this.controller.abort(),o.addEventListener("abort",()=>this.controller.abort())),hs(this,zs,"m",bE).call(this);const i=await t.create({...n,stream:!0},{...r,signal:this.controller.signal});this._connected();for await(const a of i)hs(this,zs,"m",wE).call(this,a);if((s=i.controller.signal)!=null&&s.aborted)throw new di;return this._addChatCompletion(hs(this,zs,"m",wb).call(this))}async _fromReadableStream(t,n){var s;const r=n==null?void 0:n.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),hs(this,zs,"m",bE).call(this),this._connected();const o=aa.fromReadableStream(t,this.controller);let i;for await(const a of o)i&&i!==a.id&&this._addChatCompletion(hs(this,zs,"m",wb).call(this)),hs(this,zs,"m",wE).call(this,a),i=a.id;if((s=o.controller.signal)!=null&&s.aborted)throw new di;return this._addChatCompletion(hs(this,zs,"m",wb).call(this))}[(Wl=new WeakMap,zs=new WeakSet,bE=function(){this.ended||vE(this,Wl,void 0,"f")},wE=function(n){var s,a,l;if(this.ended)return;const r=hs(this,zs,"m",w4).call(this,n);this._emit("chunk",n,r);const o=(a=(s=n.choices[0])==null?void 0:s.delta)==null?void 0:a.content,i=(l=r.choices[0])==null?void 0:l.message;o!=null&&(i==null?void 0:i.role)==="assistant"&&(i!=null&&i.content)&&this._emit("content",o,i.content)},wb=function(){if(this.ended)throw new $t("stream has ended, this shouldn't happen");const n=hs(this,Wl,"f");if(!n)throw new $t("request ended without sending any chunks");return vE(this,Wl,void 0,"f"),sFe(n)},w4=function(n){var r,o,i;let s=hs(this,Wl,"f");const{choices:a,...l}=n;s?Object.assign(s,l):s=vE(this,Wl,{...l,choices:[]},"f");for(const{delta:u,finish_reason:c,index:d,logprobs:f=null,...h}of n.choices){let p=s.choices[d];if(p||(p=s.choices[d]={finish_reason:c,index:d,message:{},logprobs:f,...h}),f)if(!p.logprobs)p.logprobs=Object.assign({},f);else{const{content:C,...A}=f;Object.assign(p.logprobs,A),C&&((r=p.logprobs).content??(r.content=[]),p.logprobs.content.push(...C))}if(c&&(p.finish_reason=c),Object.assign(p,h),!u)continue;const{content:g,function_call:b,role:y,tool_calls:v,...w}=u;if(Object.assign(p.message,w),g&&(p.message.content=(p.message.content||"")+g),y&&(p.message.role=y),b&&(p.message.function_call?(b.name&&(p.message.function_call.name=b.name),b.arguments&&((o=p.message.function_call).arguments??(o.arguments=""),p.message.function_call.arguments+=b.arguments)):p.message.function_call=b),v){p.message.tool_calls||(p.message.tool_calls=[]);for(const{index:C,id:A,type:S,function:_,...k}of v){const M=(i=p.message.tool_calls)[C]??(i[C]={});Object.assign(M,k),A&&(M.id=A),S&&(M.type=S),_&&(M.function??(M.function={arguments:""})),_!=null&&_.name&&(M.function.name=_.name),_!=null&&_.arguments&&(M.function.arguments+=_.arguments)}}}return s},Symbol.asyncIterator)](){const t=[],n=[];let r=!1;return this.on("chunk",o=>{const i=n.shift();i?i.resolve(o):t.push(o)}),this.on("end",()=>{r=!0;for(const o of n)o.resolve(void 0);n.length=0}),this.on("abort",o=>{r=!0;for(const i of n)i.reject(o);n.length=0}),this.on("error",o=>{r=!0;for(const i of n)i.reject(o);n.length=0}),{next:async()=>t.length?{value:t.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise((i,s)=>n.push({resolve:i,reject:s})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new aa(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}function sFe(e){const{id:t,choices:n,created:r,model:o,system_fingerprint:i,...s}=e;return{...s,id:t,choices:n.map(({message:a,finish_reason:l,index:u,logprobs:c,...d})=>{if(!l)throw new $t(`missing finish_reason for choice ${u}`);const{content:f=null,function_call:h,tool_calls:p,...g}=a,b=a.role;if(!b)throw new $t(`missing role for choice ${u}`);if(h){const{arguments:y,name:v}=h;if(y==null)throw new $t(`missing function_call.arguments for choice ${u}`);if(!v)throw new $t(`missing function_call.name for choice ${u}`);return{...d,message:{content:f,function_call:{arguments:y,name:v},role:b},finish_reason:l,index:u,logprobs:c}}return p?{...d,index:u,finish_reason:l,logprobs:c,message:{...g,role:b,content:f,tool_calls:p.map((y,v)=>{const{function:w,type:C,id:A,...S}=y,{arguments:_,name:k,...M}=w||{};if(A==null)throw new $t(`missing choices[${u}].tool_calls[${v}].id
3705${Cb(e)}`);
3705if(C==null)throw new $t(`missing choices[${u}].tool_calls[${v}].type
3706${Cb(e)}`);if(k==null)throw new $t(`missing choices[${u}].tool_calls[${v}].function.name
3707${Cb(e)}`);if(_==null)throw new $t(`missing choices[${u}].tool_calls[${v}].function.arguments
3708${Cb(e)}`);return{...S,id:A,type:C,function:{...M,name:k,arguments:_}}})}}:{...d,message:{...g,content:f,role:b},finish_reason:l,index:u,logprobs:c}}),created:r,model:o,object:"chat.completion",...i?{system_fingerprint:i}:{}}}function Cb(e){return JSON.stringify(e)}class eh extends Zg{static fromReadableStream(t){const n=new eh;return n._run(()=>n._fromReadableStream(t)),n}static runFunctions(t,n,r){const o=new eh,i={...r,headers:{...r==null?void 0:r.headers,"X-Stainless-Helper-Method":"runFunctions"}};return o._run(()=>o._runFunctions(t,n,i)),o}static runTools(t,n,r){const o=new eh,i={...r,headers:{...r==null?void 0:r.headers,"X-Stainless-Helper-Method":"runTools"}};return o._run(()=>o._runTools(t,n,i)),o}}let NG=class extends Tn{runFunctions(t,n){return t.stream?eh.runFunctions(this._client.chat.completions,t,n):Jg.runFunctions(this._client.chat.completions,t,n)}runTools(t,n){return t.stream?eh.runTools(this._client.chat.completions,t,n):Jg.runTools(this._client.chat.completions,t,n)}stream(t,n){return Zg.createChatCompletion(this._client.chat.completions,t,n)}};class l1 extends Tn{constructor(){super(...arguments),this.completions=new NG(this._client)}}(function(e){e.Completions=NG})(l1||(l1={}));var ps=function(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n},Rn=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},u0,c0,pm,mm,d0,gm,Ga,ym,f0,h0,rf,mk;class aFe{constructor(){this.controller=new AbortController,u0.set(this,void 0),c0.set(this,()=>{}),pm.set(this,()=>{}),mm.set(this,void 0),d0.set(this,()=>{}),gm.set(this,()=>{}),Ga.set(this,{}),ym.set(this,!1),f0.set(this,!1),h0.set(this,!1),rf.set(this,!1),mk.set(this,t=>{if(ps(this,f0,!0,"f"),t instanceof Error&&t.name==="AbortError"&&(t=new di),t instanceof di)return ps(this,h0,!0,"f"),this._emit("abort",t);if(t instanceof $t)return this._emit("error",t);if(t instanceof Error){const n=new $t(t.message);return n.cause=t,this._emit("error",n)}return this._emit("error",new $t(String(t)))}),ps(this,u0,new Promise((t,n)=>{ps(this,c0,t,"f"),ps(this,pm,n,"f")}),"f"),ps(this,mm,new Promise((t,n)=>{ps(this,d0,t,"f"),ps(this,gm,n,"f")}),"f"),Rn(this,u0,"f").catch(()=>{}),Rn(this,mm,"f").catch(()=>{})}_run(t){setTimeout(()=>{t().then(()=>{this._emit("end")},Rn(this,mk,"f"))},0)}_addRun(t){return t}_connected(){this.ended||(Rn(this,c0,"f").call(this),this._emit("connect"))}get ended(){return Rn(this,ym,"f")}get errored(){return Rn(this,f0,"f")}get aborted(){return Rn(this,h0,"f")}abort(){this.controller.abort()}
3708on(t,n){return(Rn(this,Ga,"f")[t]||(Rn(this,Ga,"f")[t]=[])).push({listener:n}),this}off(t,n){const r=Rn(this,Ga,"f")[t];if(!r)return this;const o=r.findIndex(i=>i.listener===n);return o>=0&&r.splice(o,1),this}once(t,n){return(Rn(this,Ga,"f")[t]||(Rn(this,Ga,"f")[t]=[])).push({listener:n,once:!0}),this}emitted(t){return new Promise((n,r)=>{ps(this,rf,!0,"f"),t!=="error"&&this.once("error",r),this.once(t,n)})}async done(){ps(this,rf,!0,"f"),await Rn(this,mm,"f")}_emit(t,...n){if(Rn(this,ym,"f"))return;t==="end"&&(ps(this,ym,!0,"f"),Rn(this,d0,"f").call(this));const r=Rn(this,Ga,"f")[t];if(r&&(Rn(this,Ga,"f")[t]=r.filter(o=>!o.once),r.forEach(({listener:o})=>o(...n))),t==="abort"){const o=n[0];!Rn(this,rf,"f")&&!(r!=null&&r.length)&&Promise.reject(o),Rn(this,pm,"f").call(this,o),Rn(this,gm,"f").call(this,o),this._emit("end");return}if(t==="error"){const o=n[0];!Rn(this,rf,"f")&&!(r!=null&&r.length)&&Promise.reject(o),Rn(this,pm,"f").call(this,o),Rn(this,gm,"f").call(this,o),this._emit("end")}}async _threadAssistantStream(t,n,r){return await this._createThreadAssistantStream(n,t,r)}async _runAssistantStream(t,n,r,o){return await this._createAssistantStream(n,t,r,o)}async _runToolAssistantStream(t,n,r,o,i){return await this._createToolAssistantStream(r,t,n,o,i)}async _createThreadAssistantStream(t,n,r){const o=r==null?void 0:r.signal;o&&(o.aborted&&this.controller.abort(),o.addEventListener("abort",()=>this.controller.abort()));const i=await t.createAndRun({...n,stream:!1},{...r,signal:this.controller.signal});return this._connected(),this._addRun(i)}async _createToolAssistantStream(t,n,r,o,i){const s=i==null?void 0:i.signal;s&&(s.aborted&&this.controller.abort(),s.addEventListener("abort",()=>this.controller.abort()));const a=await t.submitToolOutputs(n,r,{...o,stream:!1},{...i,signal:this.controller.signal});return this._connected(),this._addRun(a)}async _createAssistantStream(t,n,r,o){const i=o==null?void 0:o.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener("abort",()=>this.controller.abort()));const s=await t.create(n,{...r,stream:!1},{...o,signal:this.controller.signal});return this._connected(),this._addRun(s)}}u0=new WeakMap,c0=new WeakMap,pm=new WeakMap,mm=new WeakMap,d0=new WeakMap,gm=new WeakMap,Ga=new WeakMap,ym=new WeakMap,f0=new WeakMap,h0=new WeakMap,rf=new WeakMap,mk=new WeakMap;var at=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Jo=function(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n},Rr,gk,qs,p0,ys,Ic,If,fc,u1,ti,m0,g0,Ym,vm,bm,C4,x4,S4,_4,E4,I4,A4;class la extends aFe{constructor(){super(...arguments),Rr.add(this),gk.set(this,[]),qs.set(this,{}),p0.set(this,{}),ys.set(this,void 0),Ic.set(this,void 0),If.set(this,void 0),fc.set(this,void 0),u1.set(this,void 0),ti.set(this,void 0),m0.set(this,void 0),g0.set(this,void 0),Ym.set(this,void 0)}[(gk=new WeakMap,qs=new WeakMap,p0=new WeakMap,ys=new WeakMap,Ic=new WeakMap,If=new WeakMap,fc=new WeakMap,u1=new WeakMap,ti=new WeakMap,m0=new WeakMap,g0=new WeakMap,Ym=new WeakMap,Rr=new WeakSet,Symbol.asyncIterator)](){const t=[],n=[];let r=!1;return this.on("event",o=>{const i=n.shift();i?i.resolve(o):t.push(o)}),this.on("end",()=>{r=!0;for(const o of n)o.resolve(void 0);n.length=0}),this.on("abort",o=>{r=!0;for(const i of n)i.reject(o);n.length=0}),this.on("error",o=>{r=!0;for(const i of n)i.reject(o);n.length=0}),{next:async()=>t.length?{value:t.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise((i,s)=>n.push({resolve:i,reject:s})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}static fromReadableStream(t){const n=new la;return n._run(()=>n._fromReadableStream(t)),n}async _fromReadableStream(t,n){var i;const r=n==null?void 0:n.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),this._connected();const o=aa.fromReadableStream(t,this.controller);for await(const s of o)at(this,Rr,"m",vm).call(this,s);if((i=o.controller.signal)!=null&&i.aborted)throw new di;return this._addRun(at(this,Rr,"m",bm).call(this))}toReadableStream(){return new aa(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}static createToolAssistantStream(t,n,r,o,i){const s=new la;return s._run(()=>s._runToolAssistantStream(t,n,r,o,{...i,headers:{...i==null?void 0:i.headers,"X-Stainless-Helper
3708-Method":"stream"}})),s}async _createToolAssistantStream(t,n,r,o,i){var u;const s=i==null?void 0:i.signal;s&&(s.aborted&&this.controller.abort(),s.addEventListener("abort",()=>this.controller.abort()));const a={...o,stream:!0},l=await t.submitToolOutputs(n,r,a,{...i,signal:this.controller.signal});this._connected();for await(const c of l)at(this,Rr,"m",vm).call(this,c);if((u=l.controller.signal)!=null&&u.aborted)throw new di;return this._addRun(at(this,Rr,"m",bm).call(this))}static createThreadAssistantStream(t,n,r){const o=new la;return o._run(()=>o._threadAssistantStream(t,n,{...r,headers:{...r==null?void 0:r.headers,"X-Stainless-Helper-Method":"stream"}})),o}static createAssistantStream(t,n,r,o){const i=new la;return i._run(()=>i._runAssistantStream(t,n,r,{...o,headers:{...o==null?void 0:o.headers,"X-Stainless-Helper-Method":"stream"}})),i}currentEvent(){return at(this,m0,"f")}currentRun(){return at(this,g0,"f")}currentMessageSnapshot(){return at(this,ys,"f")}currentRunStepSnapshot(){return at(this,Ym,"f")}async finalRunSteps(){return await this.done(),Object.values(at(this,qs,"f"))}async finalMessages(){return await this.done(),Object.values(at(this,p0,"f"))}async finalRun(){if(await this.done(),!at(this,Ic,"f"))throw Error("Final run was not received.");return at(this,Ic,"f")}async _createThreadAssistantStream(t,n,r){var a;const o=r==null?void 0:r.signal;o&&(o.aborted&&this.controller.abort(),o.addEventListener("abort",()=>this.controller.abort()));const i={...n,stream:!0},s=await t.createAndRun(i,{...r,signal:this.controller.signal});this._connected();for await(const l of s)at(this,Rr,"m",vm).call(this,l);if((a=s.controller.signal)!=null&&a.aborted)throw new di;return this._addRun(at(this,Rr,"m",bm).call(this))}async _createAssistantStream(t,n,r,o){var l;const i=o==null?void 0:o.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener("abort",()=>this.controller.abort()));const s={...r,stream:!0},a=await t.create(n,s,{...o,signal:this.controller.signal});this._connected();for await(const u of a)at(this,Rr,"m",vm).call(this,u);if((l=a.controller.signal)!=null&&l.aborted)throw new di;return this._addRun(at(this,Rr,"m",bm).call(this))}static accumulateDelta(t,n){for(const[r,o]of Object.entries(n)){if(!t.hasOwnProperty(r)){t[r]=o;continue}let i=t[r];if(i==null){t[r]=o;continue}if(r==="index"||r==="type"){t[r]=o;continue}if(typeof i=="string"&&typeof o=="string")i+=o;else if(typeof i=="number"&&typeof o=="number")i+=o;else if(y4(i)&&y4(o))i=this.accumulateDelta(i,o);else if(Array.isArray(i)&&Array.isArray(o)){if(i.every(s=>typeof s=="string"||typeof s=="number")){i.push(...o);continue}}else throw Error(`Unhandled record type: ${r}, deltaValue: ${o}, accValue: ${i}`);t[r]=i}return t}}vm=function(t){if(!this.ended)switch(Jo(this,m0,t,"f"),at(this,Rr,"m",S4).call(this,t),t.event){case"thread.created":break;case"thread.run.created":case"thread.run.queued":case"thread.run.in_progress":case"thread.run.requires_action":case"thread.run.completed":case"thread.run.failed":case"thread.run.cancelling":case"thread.run.cancelled":case"thread.run.expired":at(this,Rr,"m",A4).call(this,t);break;case"thread.run.step.created":case"thread.run.step.in_progress":case"thread.run.step.delta":case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":at(this,Rr,"m",x4).call(this,t);break;case"thread.message.created":case"thread.message.in_progress":case"thread.message.delta":case"thread.message.completed":case"thread.message.incomplete":at(this,Rr,"m",C4).call(this,t);break;case"error":throw new Error("Encountered an error event in event processing - errors should be processed earlier")}},bm=function(){if(this.ended)throw new $t("stream has ended, this shouldn't happen");if(!at(this,Ic,"f"))throw Error("Final run has not been received");return at(this,Ic,"f")},C4=function(t){const[n,r]=at(this,Rr,"m",E4).call(this,t,at(this,ys,"f"));Jo(this,ys,n,"f"),at(this,p0,"f")[n.id]=n;for(const o of r){const i=n.content[o.index];(i==null?void 0:i.type)=="text"&&this._emit("textCreated",i.text)}switch(t.event){case"thread.message.created":this._emit("messageCreated",t.data);break;case"thread.message.in_progress":break;case"thread.message.delta":if(this._emit("messageDelta",t.data.delta,n),t.data.delta.content)for(const o of t.data.delta.content){if(o.type=="text"&&o.text){let i=o.text,s=n.content[o.index];if(s&&s.type=="text")this._emit("textDelta",i,s.text);else throw Error("The snapshot associated with this text delta is not text or missing")}if(o.index!=at(this,If,"f")){if(at(this,fc,"f"))switch(at(this,fc,"f").type){case"text":this._emit("textDone",at(this,fc,"f").text,at(this,ys,"f"));break;case"image_file":this._emit("imageFileDone",at(this,fc,"f").image_file,at(this,ys,"f"));break}Jo(this,If,o.index,"f")}Jo(this,fc,n.content[o.index],"f")}break;case"thread.message.completed":case"thread.message.incomplete":if(at(this,If,"f")!==void 0){const o=t.data.content[at(this,If,"f")];if(o)switch(o.type){case"image_file":this._emit("imageFileDone",o.image_file,at(this,ys,"f"));break;case"text":this._emit("textDone",o.text,at(this,ys,"f"));break}}at(this,ys,"f")&&this._emit("messageDone",t.data),Jo(this,ys,void 0,"f")}},x4=function(t){const n=at(this,Rr,"m",_4).call(this,t);switch(Jo(this,Ym,n,"f"),t.event){case"thread.run.step.created":this._emit("runStepCreated",t.data);break;case"thread.run.step.delta":const r=t.data.delta;if(r.step_details&&r.step_details.type=="tool_calls"&&r.step_details.tool_calls&&n.step_details.type=="tool_calls")for(const i of r.step_details.tool_calls)i.index==at(this,u1,"f")?this._emit("toolCallDelta",i,n.step_details.tool_calls[i.index]):(at(this,ti,"f")&&this._emit("toolCallDone",at(this,ti,"f")),Jo(this,u1,i.index,"f"),Jo(this,ti,n.step_details.tool_calls[i.index],"f"),at(this,ti,"f")&&this._emit("toolCallCreated",at(this,ti,"f")));this._emit("runStepDelta",t.data.delta,n);break;case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":Jo(this,Ym,void 0,"f"),t.data.step_details.type=="tool_calls"&&at(this,ti,"f")&&(this._emit("toolCallDone",at(this,ti,"f")),Jo(this,ti,void 0,"f")),this._emit("runStepDone",t.data,n);break}},S4=function(t){at(this,gk,"f").push(t),this._emit("event",t)},_4=function(t){switch(t.event){case"thread.run.step.created":return at(this,qs,"f")[t.data.id]=t.data,t.data;case"thread.run.step.delta":let n=at(this,qs,"f")[t.data.id];if(!n)throw Error("Received a RunStepDelta before creation of a snapshot");let r=t.data;if(r.delta){const o=la.accumulateDelta(n,r.delta);at(this,qs,"f")[t.data.id]=o}return at(this,qs,"f")[t.data.id];case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":case"thread.run.step.in_progress":at(this,qs,"f")[t.data.id]=t.data;break}if(at(this,qs,"f")[t.data.id])return at(this,qs,"f")[t.data.id];throw new Error("No snapshot available")},E4=function(t,n){let r=[];switch(t.event){case"thread.message.created":return[t.data,r];case"thread.message.delta":if(!n)throw Error("Received a delta with 
3708no existing snapshot (there should be one from message creation)");let o=t.data;if(o.delta.content)for(const i of o.delta.content)if(i.index in n.content){let s=n.content[i.index];n.content[i.index]=at(this,Rr,"m",I4).call(this,i,s)}else n.content[i.index]=i,r.push(i);return[n,r];case"thread.message.in_progress":case"thread.message.completed":case"thread.message.incomplete":if(n)return[n,r];throw Error("Received thread message event with no existing snapshot")}throw Error("Tried to accumulate a non-message event")},I4=function(t,n){return la.accumulateDelta(n,t)},A4=function(t){switch(Jo(this,g0,t.data,"f"),t.event){case"thread.run.created":break;case"thread.run.queued":break;case"thread.run.in_progress":break;case"thread.run.requires_action":case"thread.run.cancelled":case"thread.run.failed":case"thread.run.completed":case"thread.run.expired":Jo(this,Ic,t.data,"f"),at(this,ti,"f")&&(this._emit("toolCallDone",at(this,ti,"f")),Jo(this,ti,void 0,"f"));break}};let c1=class extends Tn{retrieve(t,n,r,o){return this._client.get(`/threads/${t}/messages/${n}/files/${r}`,{...o,headers:{"OpenAI-Beta":"assistants=v1",...o==null?void 0:o.headers}})}list(t,n,r={},o){return Ta(r)?this.list(t,n,{},r):this._client.getAPIList(`/threads/${t}/messages/${n}/files`,y2,{query:r,...o,headers:{"OpenAI-Beta":"assistants=v1",...o==null?void 0:o.headers}})}};class y2 extends Dl{}(function(e){e.MessageFilesPage=y2})(c1||(c1={}));class d1 extends Tn{constructor(){super(...arguments),this.files=new c1(this._client)}create(t,n,r){return this._client.post(`/threads/${t}/messages`,{body:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}retrieve(t,n,r){return this._client.get(`/threads/${t}/messages/${n}`,{...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}update(t,n,r,o){return this._client.post(`/threads/${t}/messages/${n}`,{body:r,...o,headers:{"OpenAI-Beta":"assistants=v1",...o==null?void 0:o.headers}})}list(t,n={},r){return Ta(n)?this.list(t,{},n):this._client.getAPIList(`/threads/${t}/messages`,v2,{query:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}}class v2 extends Dl{}(function(e){e.MessagesPage=v2,e.Files=c1,e.MessageFilesPage=y2})(d1||(d1={}));class f1 extends Tn{retrieve(t,n,r,o){return this._client.get(`/threads/${t}/runs/${n}/steps/${r}`,{...o,headers:{"OpenAI-Beta":"assistants=v1",...o==null?void 0:o.headers}})}list(t,n,r={},o){return Ta(r)?this.list(t,n,{},r):this._client.getAPIList(`/threads/${t}/runs/${n}/steps`,b2,{query:r,...o,headers:{"OpenAI-Beta":"assistants=v1",...o==null?void 0:o.headers}})}}class b2 extends Dl{}(function(e){e.RunStepsPage=b2})(f1||(f1={}));class h1 extends Tn{constructor(){super(...arguments),this.steps=new f1(this._client)}create(t,n,r){return this._client.post(`/threads/${t}/runs`,{body:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers},stream:n.stream??!1})}retrieve(t,n,r){return this._client.get(`/threads/${t}/runs/${n}`,{...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}update(t,n,r,o){return this._client.post(`/threads/${t}/runs/${n}`,{body:r,...o,headers:{"OpenAI-Beta":"assistants=v1",...o==null?void 0:o.headers}})}list(t,n={},r){return Ta(n)?this.list(t,{},n):this._client.getAPIList(`/threads/${t}/runs`,w2,{query:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}cancel(t,n,r){return this._client.post(`/threads/${t}/runs/${n}/cancel`,{...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}createAndStream(t,n,r){return la.createAssistantStream(t,this._client.beta.threads.runs,n,r)}submitToolOutputs(t,n,r,o){return this._client.post(`/threads/${t}/runs/${n}/submit_tool_outputs`,{body:r,...o,headers:{"OpenAI-Beta":"assistants=v1",...o==null?void 0:o.headers},stream:r.stream??!1})}submitToolOutputsStream(t,n,r,o){return la.createToolAssistantStream(t,n,this._client.beta.threads.runs,r,o)}}class w2 extends Dl{}(function(e){e.RunsPage=w2,e.Steps=f1,e.RunStepsPage=b2})(h1||(h1={}));class p1 extends Tn{constructor(){super(...arguments),this.runs=new h1(this._client),this.messages=new d1(this._client)}create(t={},n){return Ta(t)?this.create({},t):this._client.post("/threads",{body:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n==null?void 0:n.headers}})}retrieve(t,n){return this._client.get(`/threads/${t}`,{...n,headers:{"OpenAI-Beta":"assistants=v1",...n==null?void 0:n.headers}})}update(t,n,r){return this._client.post(`/threads/${t}`,{body:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r==null?void 0:r.headers}})}del(t,n){return this._client.delete(`/threads/${t}`,{...n,headers:{"OpenAI-Beta":"assistants=v1",...n==null?void 0:n.headers}})}createAndRun(t,n){return this._client.post("/threads/runs",{body:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n==null?void 0:n.headers},stream:t.stream??!1})}createAndRunStream(t,n){return la.createThreadAssistantStream(t,this._client.beta.threads,n)}}(function(e){e.Runs=h1,e.RunsPage=w2,e.Messages=d1,e.MessagesPage=v2})(p1||(p1={}));class m1 extends Tn{constructor(){super(...arguments),this.chat=new l1(this._client),this.assistants=new s1(this._client),this.threads=new p1(this._client)}}(function(e){e.Chat=l1,e.Assistants=s1,e.AssistantsPage=g2,e.Threads=p1})(m1||(m1={}));class g1 extends Tn{create(t,n){return this._client.post("/completions",{body:t,...n,stream:t.stream??!1})}}g1||(g1={});class y1 extends Tn{create(t,n){return this._client.post("/embeddings",{body:t,...n})}}y1||(y1={});class v1 extends Tn{create(t,n){return this._client.post("/files",Xg({body:t,...n}))}retrieve(t,n){return this._client.get(`/files/${t}`,n)}list(t={},n){return Ta(t)?this.list({},t):this._client.getAPIList("/files",C2,{query:t,...n})}del(t,n){return this._client.delete(`/files/${t}`,n)}content(t,n){return this._client.get(`/files/${t}/content`,{...n,__binaryResponse:!0})}
3708retrieveContent(t,n){return this._client.get(`/files/${t}/content`,{...n,headers:{Accept:"application/json",...n==null?void 0:n.headers}})}async waitForProcessing(t,{pollInterval:n=5e3,maxWait:r=30*60*1e3}={}){const o=new Set(["processed","error","deleted"]),i=Date.now();let s=await this.retrieve(t);for(;!s.status||!o.has(s.status);)if(await RG(n),s=await this.retrieve(t),Date.now()-i>r)throw new h2({message:`Giving up on waiting for file ${t} to finish processing after ${r} milliseconds.`});return s}}class C2 extends p2{}(function(e){e.FileObjectsPage=C2})(v1||(v1={}));class b1 extends Tn{create(t,n){return this._client.post("/fine_tuning/jobs",{body:t,...n})}retrieve(t,n){return this._client.get(`/fine_tuning/jobs/${t}`,n)}list(t={},n){return Ta(t)?this.list({},t):this._client.getAPIList("/fine_tuning/jobs",x2,{query:t,...n})}cancel(t,n){return this._client.post(`/fine_tuning/jobs/${t}/cancel`,n)}listEvents(t,n={},r){return Ta(n)?this.listEvents(t,{},n):this._client.getAPIList(`/fine_tuning/jobs/${t}/events`,S2,{query:n,...r})}}class x2 extends Dl{}class S2 extends Dl{}(function(e){e.FineTuningJobsPage=x2,e.FineTuningJobEventsPage=S2})(b1||(b1={}));class w1 extends Tn{constructor(){super(...arguments),this.jobs=new b1(this._client)}}(function(e){e.Jobs=b1,e.FineTuningJobsPage=x2,e.FineTuningJobEventsPage=S2})(w1||(w1={}));class C1 extends Tn{createVariation(t,n){return this._client.post("/images/variations",Xg({body:t,...n}))}edit(t,n){return this._client.post("/images/edits",Xg({body:t,...n}))}generate(t,n){return this._client.post("/images/generations",{body:t,...n})}}C1||(C1={});class x1 extends Tn{retrieve(t,n){return this._client.get(`/models/${t}`,n)}list(t){return this._client.getAPIList("/models",_2,t)}del(t,n){return this._client.delete(`/models/${t}`,n)}}class _2 extends p2{}(function(e){e.ModelsPage=_2})(x1||(x1={}));class S1 extends Tn{create(t,n){return this._client.post("/moderations",{body:t,...n})}}S1||(S1={});var VG;class _r extends K$e{constructor({baseURL:t=yE("OPENAI_BASE_URL"),apiKey:n=yE("OPENAI_API_KEY"),organization:r=yE("OPENAI_ORG_ID")??null,...o}={}){if(n===void 0)throw new $t("The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).");const i={apiKey:n,organization:r,...o,baseURL:t||"https://api.openai.com/v1"};if(!i.dangerouslyAllowBrowser&&iFe())throw new $t(`It looks like you're running in a browser-like environment.
3709
3710This is disabled by default, as it risks exposing your secret API credentials to attackers.
3711If you understand the risks and have appropriate mitigations in place,
3712you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
3713
3714new OpenAI({ apiKey, dangerouslyAllowBrowser: true });
3715
3716https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
3717`);super({baseURL:i.baseURL,timeout:i.timeout??6e5,httpAgent:i.httpAgent,maxRetries:i.maxRetries,fetch:i.fetch}),this.completions=new g1(this),this.chat=new e1(this),this.embeddings=new y1(this),this.files=new v1(this),this.images=new C1(this),this.audio=new o1(this),this.moderations=new S1(this),this.models=new x1(this),this.fineTuning=new w1(this),this.beta=new m1(this),this._options=i,this.apiKey=n,this.organization=r}defaultQuery(){return this._options.defaultQuery}defaultHeaders(t){return{...super.defaultHeaders(t),"OpenAI-Organization":this.organization,...this._options.defaultHeaders}}authHeaders(t){return{Authorization:`Bearer ${this.apiKey}`}}}VG=_r;_r.OpenAI=VG;_r.OpenAIError=$t;_r.APIError=zr;_r.APIConnectionError=eS;_r.APIConnectionTimeoutError=h2;_r.APIUserAbortError=di;_r.NotFoundError=wG;_r.ConflictError=CG;_r.RateLimitError=SG;_r.BadRequestError=yG;_r.AuthenticationError=vG;_r.InternalServerError=_G;_r.PermissionDeniedError=bG;_r.UnprocessableEntityError=xG;(function(e){e.toFile=kG,e.fileFromPath=mG,e.Page=p2,e.CursorPage=Dl,e.Completions=g1,e.Chat=e1,e.Embeddings=y1,e.Files=v1,e.FileObjectsPage=C2,e.Images=C1,e.Audio=o1,e.Moderations=S1,e.Models=x1,e.ModelsPage=_2,e.FineTuning=w1,e.Beta=m1})(_r||(_r={}));const lFe={apiKey:"",baseURL:"https://openrouter.ai/api/v1",dangerouslyAllowBrowser:!0,defaultHeaders:{"HTTP-Referer":"https://openplanner.fr","X-Title":"OpenPlanner"}},_1=new _r(lFe),Ac={model:"anthropic/claude-sonnet-4",temperature:.3},uFe=async e=>(_1.apiKey=e,await _1.models.list().then(n=>n.getPaginatedItems())),cFe=e=>{const[t,n]=m.useState([]);return m.useEffect(()=>{if(!e){n([]);return}uFe(e).then(n).catch(()=>n([]))},[e]),t},dFe=e=>e.startsWith("~")?e.slice(1):e,fFe=e=>{const t=dFe(e),n=t.indexOf("/");return n>0?t.slice(0,n):null},hFe=e=>{const t=new Map;for(const o of e){if(!(o!=null&&o.id)||o.id.startsWith("~"))continue;const i=fFe(o.id);if(!i)continue;const s=t.get(i);s?s.push(o):t.set(i,[o])}const n=[...t.entries()].sort((o,i)=>i[1].length-o[1].length||o[0].localeCompare(i[0])).slice(0,5).map(([o])=>o),r=new Set;for(const o of n){const i=(t.get(o)??[]).slice().sort((s,a)=>(a.created??0)-(s.created??0)).slice(0,3);for(const s of i)r.add(s.id)}return r},BG=m.createContext(void 0),nt=()=>{const e=m.useContext(BG);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e};function At(e){return Ke("MuiDataGrid",e)}const re=Qe("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--selectionMode","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterForm
3717ColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorderColor","cell--withRightBorder","columnHeader--withRightBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),pFe=e=>{const{classes:t}=e;return Re({root:["virtualScroller"]},At,t)},mFe=gr("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"},zIndex:0}),gFe=m.forwardRef(function(t,n){const r=nt(),o=pFe(r);return T.jsx(mFe,x({ref:n},t,{className:xe(o.root,t.className),ownerState:r}))}),yFe=(e,t)=>{const{classes:n}=e;return Re({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},At,n)},vFe=gr("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),bFe=m.forwardRef(function(t,n){var r;const o=nt(),i=!o.autoHeight&&((r=t.style)==null?void 0:r.minHeight)==="auto",s=yFe(o,i);return T.jsx(vFe,x({ref:n},t,{ownerState:o,className:xe(s.root,t.className)}))}),wFe=["className"],CFe=e=>{const{classes:t}=e;return Re({root:["virtualScrollerRenderZone"]},At,t)},xFe=gr("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),SFe=m.forwardRef(function(t,n){const{className:r}=t,o=de(t,wFe),i=nt(),s=CFe(i);return T.jsx(xFe,x({ref:n,className:xe(s.root,r),ownerState:i},o))}),_Fe=["className"],EFe=e=>{const{classes:t}=e;return Re({root:["columnHeaders","withBorderColor"]},At,t)},IFe=gr("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({position:"relative",overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:"1px solid",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),AFe=m.forwardRef(function(t,n){const{className:r}=t,o=de(t,_Fe),i=nt(),s=EFe(i);return T.jsx(IFe,x({ref:n,className:xe(r,s.root),ownerState:i},o,{role:"presentation"}))}),jG=m.createContext(void 0);function kt(){const e=m.useContext(jG);if(e===void 0)throw new Error(["MUI: Could not find the data grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join(`
3718`));return e}const kFe=["isDragging","className"],PFe=e=>{const{isDragging:t,hasScrollX:n,classes:r}=e;return Re({root:["columnHeadersInner",t&&"columnHeaderDropZone",n&&"columnHeadersInner--scrollable"]},At,r)},TFe=gr("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${re.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})(()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${re.columnHeaderDropZone} .${re.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${re["columnHeadersInner--scrollable"]} .${re.columnHeader}:last-child`]:{borderRight:"none"}})),RFe=m.forwardRef(function(t,n){var r,o;const{isDragging:i,className:s}=t,a=de(t,kFe),l=kt(),u=nt(),c=x({},u,{isDragging:i,hasScrollX:(r=(o=l.current.getRootDimensions())==null?void 0:o.hasScrollX)!=null?r:!1}),d=PFe(c);return T.jsx(TFe,x({ref:n,className:xe(s,d.root),ownerState:c},a))}),zG=m.createContext(void 0);function Xu(){const e=m.useContext(zG);if(e===void 0)throw new Error(["MUI: Could not find the data grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join(`
3719`));return e}const k4={};function E2(e,t){const n=m.useRef(k4);return n.current===k4&&(n.current=e(t)),n}const OFe=[];function UG(e){m.useEffect(e,OFe)}const Ba=(e,t="warning")=>{let n=!1;const r=Array.isArray(e)?e.join(`
3720`):e;return()=>{n||(n=!0,t==="error"?console.error(r):console.warn(r))}},MFe=Object.is;function HG(e,t){if(e===t)return!0;
3720if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!MFe(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}Ba(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);function DFe(e){return e.acceptsApiRef}function P4(e,t){return DFe(t)?t(e):t(e.current.state)}const $Fe=Object.is,I2=HG,FFe=()=>({state:null,equals:null,selector:null}),qe=(e,t,n=$Fe)=>{const r=E2(FFe),o=r.current.selector!==null,[i,s]=m.useState(o?null:P4(e,t));return r.current.state=i,r.current.equals=n,r.current.selector=t,UG(()=>e.current.store.subscribe(()=>{const a=P4(e,r.current.selector);r.current.equals(r.current.state,a)||(r.current.state=a,s(a))})),i},LFe={cache:new WeakMap};Ba(["MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.","To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`."]);function of(e){return"current"in e&&"instanceId"in e.current}const sf={id:"default"},Ct=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error("Unsupported number of selectors");let a;if(e&&t&&n&&r&&o&&i)a=(l,u)=>{const c=of(l),d=u??(c?l.current.instanceId:sf),f=c?l.current.state:l,h=e(f,d),p=t(f,d),g=n(f,d),b=r(f,d),y=o(f,d);return i(h,p,g,b,y)};else if(e&&t&&n&&r&&o)a=(l,u)=>{const c=of(l),d=u??(c?l.current.instanceId:sf),f=c?l.current.state:l,h=e(f,d),p=t(f,d),g=n(f,d),b=r(f,d);return o(h,p,g,b)};else if(e&&t&&n&&r)a=(l,u)=>{const c=of(l),d=u??(c?l.current.instanceId:sf),f=c?l.current.state:l,h=e(f,d),p=t(f,d),g=n(f,d);return r(h,p,g)};else if(e&&t&&n)a=(l,u)=>{const c=of(l),d=u??(c?l.current.instanceId:sf),f=c?l.current.state:l,h=e(f,d),p=t(f,d);return n(h,p)};else if(e&&t)a=(l,u)=>{const c=of(l),d=u??(c?l.current.instanceId:sf),f=c?l.current.state:l,h=e(f,d);return t(h)};else throw new Error("Missing arguments");return a.acceptsApiRef=!0,a},En=(...e)=>{const t=(...n)=>{var r,o;const[i,s]=n,a=of(i),l=a?i.current.instanceId:s??sf,u=a?i.current.state:i,{cache:c}=LFe;if(c.get(l)&&(r=c.get(l))!=null&&r.get(e)){var d;return(d=c.get(l))==null?void 0:d.get(e)(u,l)}const f=ege(...e);return c.get(l)||c.set(l,new Map),(o=c.get(l))==null||o.set(e,f),f(u,l)};return t.acceptsApiRef=!0,t},Bc=e=>e.columns,dl=Ct(Bc,e=>e.orderedFields),vp=Ct(Bc,e=>e.lookup),xa=En(dl,vp,(e,t)=>e.map(n=>t[n])),Es=Ct(Bc,e=>e.columnVisibilityModel),Fr=En(xa,Es,(e,t)=>e.filter(n=>t[n.field]!==!1)),nS=En(Fr,e=>e.map(t=>t.field)),Oh=En(Fr,e=>{const t=[];let n=0;for(let r=0;r<e.length;r+=1)t.push(n),n+=e[r].computedWidth;return t}),A2=Ct(Fr,Oh,(e,t)=>{const n=e.length;return n===0?0:t[n-1]+e[n-1].computedWidth}),WG=En(xa,e=>e.filter(t=>t.filterable)),NFe=En(xa,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),rS=e=>e.columnGrouping,VFe=En(rS,e=>{var t;return(t=e==null?void 0:e.unwrappedGroupingModel)!=null?t:{}}),GG=En(rS,e=>{var t;return(t=e==null?void 0:e.lookup)!=null?t:{}}),BFe=En(rS,e=>{var t;return(t=e==null?void 0:e.headerStructure)!=null?t:[]}),lv=Ct(rS,e=>{var t;return(t=e==null?void 0:e.maxDepth)!=null?t:0}),Fs=e=>e.rows,oS=Ct(Fs,e=>e.totalRowCount),jFe=Ct(Fs,e=>e.loading),zFe=Ct(Fs,e=>e.totalTopLevelRowCount),il=Ct(Fs,e=>
3720e.dataRowIdToModelLookup),E1=Ct(Fs,e=>e.dataRowIdToIdLookup),xs=Ct(Fs,e=>e.tree),UFe=Ct(Fs,e=>e.groupingName),T4=Ct(Fs,e=>e.treeDepths),iS=En(Fs,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]+1}),wm=Ct(Fs,e=>e.dataRowIds),HFe=Ct(Fs,e=>e==null?void 0:e.additionalRowGroups),bp=En(HFe,e=>{var t,n;const r=e==null?void 0:e.pinnedRows;return{bottom:r==null||(t=r.bottom)==null?void 0:t.map(o=>{var i;return{id:o.id,model:(i=o.model)!=null?i:{}}}),top:r==null||(n=r.top)==null?void 0:n.map(o=>{var i;return{id:o.id,model:(i=o.model)!=null?i:{}}})}}),WFe=Ct(bp,e=>{var t,n;return((e==null||(t=e.top)==null?void 0:t.length)||0)+((e==null||(n=e.bottom)==null?void 0:n.length)||0)}),qG=()=>{var e;const t=Xu(),n=nt(),r=qe(t,Fr),o=qe(t,oS),i=qe(t,lv),s=qe(t,WFe);let a="grid";return(e=n.experimentalFeatures)!=null&&e.ariaV7&&n.treeData&&(a="treegrid"),{role:a,"aria-colcount":r.length,"aria-rowcount":i+1+s+o,"aria-multiselectable":!n.disableMultipleRowSelection}},GFe=e=>{const{classes:t}=e;return Re({root:["main"]},At,t)},qFe=gr("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})(()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"})),KFe=m.forwardRef((e,t)=>{var n;const r=nt(),o=GFe(r),i=(n=r.experimentalFeatures)!=null&&n.ariaV7?qG:null,s=typeof i=="function"?i():null;return T.jsx(qFe,x({ref:t,className:o.root,ownerState:r},s,{children:e.children}))}),KG=e=>e.sorting,k2=Ct(KG,e=>e.sortedRows),P2=En(k2,il,(e,t)=>e.map(n=>{var r;return{id:n,model:(r=t[n])!=null?r:{}}})),Ri=Ct(KG,e=>e.sortModel),QFe=En(Ri,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{})),T2=e=>e.filter,br=Ct(T2,e=>e.filterModel);Ct(br,e=>e.quickFilterValues);const YFe=e=>e.visibleRowsLookup,QG=Ct(T2,e=>e.filteredRowsLookup);Ct(T2,e=>e.filteredDescendantCountLookup);const Ju=En(YFe,P2,(e,t)=>t.filter(n=>e[n.id]!==!1)),Xm=En(Ju,e=>e.map(t=>t.id)),XFe=En(QG,P2,(e,t)=>t.filter(n=>e[n.id]!==!1)),JFe=En(XFe,e=>e.map(t=>t.id)),YG=En(Ju,xs,iS,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),XG=Ct(Ju,e=>e.length),sS=Ct(YG,e=>e.length),ZFe=En(br,vp,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var o,i;if(!r.field)return!1;const s=t[r.field];if(!(s!=null&&s.filterOperators)||(s==null||(o=s.filterOperators)==null?void 0:o.length)===0)return!1;const a=s.filterOperators.find(l=>l.value===r.operator);return a?!a.InputComponent||r.value!=null&&((i=r.value)==null?void 0:i.toString())!=="":!1})}),eLe=En(ZFe,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),aS=e=>e.focus,ri=Ct(aS,e=>
3720e.cell),tLe=Ct(aS,e=>e.columnHeader);Ct(aS,e=>e.columnHeaderFilter);const I1=Ct(aS,e=>e.columnGroupHeader),lS=e=>e.tabIndex,A1=Ct(lS,e=>e.cell),JG=Ct(lS,e=>e.columnHeader);Ct(lS,e=>e.columnHeaderFilter);const nLe=Ct(lS,e=>e.columnGroupHeader),R2=e=>e.density,rLe=Ct(R2,e=>e.value),wp=Ct(R2,e=>e.factor),yk=e=>e.columnMenu;function oLe(e){const{VirtualScrollerComponent:t,ColumnHeadersProps:n,children:r}=e,o=Xu(),i=nt(),s=m.useRef(null),a=qe(o,Fr),l=qe(o,eLe),u=qe(o,QFe),c=qe(o,Oh),d=qe(o,JG),f=qe(o,A1),h=qe(o,nLe),p=qe(o,tLe),g=qe(o,I1),b=qe(o,wp),y=qe(o,lv),v=qe(o,yk),w=qe(o,Es),C=qe(o,BFe),A=!(h===null&&d===null&&f===null);Bt(()=>{o.current.computeSizeAndPublishResizeEvent();const R=s.current;if(typeof ResizeObserver>"u")return()=>{};let O;const F=new ResizeObserver(()=>{O=requestAnimationFrame(()=>{o.current.computeSizeAndPublishResizeEvent()})});return R&&F.observe(R),()=>{O&&window.cancelAnimationFrame(O),R&&F.unobserve(R)}},[o]);const S=m.useRef(null),_=m.useRef(null),k=m.useRef(null);o.current.register("private",{columnHeadersContainerElementRef:_,columnHeadersElementRef:S,virtualScrollerRef:k,mainElementRef:s});const M=!!o.current.getRootDimensions();return T.jsxs(KFe,{ref:s,children:[T.jsx(i.slots.columnHeaders,x({ref:_,innerRef:S,visibleColumns:a,filterColumnLookup:l,sortColumnLookup:u,columnPositions:c,columnHeaderTabIndexState:d,columnGroupHeaderTabIndexState:h,columnHeaderFocus:p,columnGroupHeaderFocus:g,densityFactor:b,headerGroupingMaxDepth:y,columnMenuState:v,columnVisibility:w,columnGroupsHeaderStructure:C,hasOtherElementInTabSequence:A},n)),M&&T.jsx(t,{ref:k}),r]})}function iLe(){var e;const t=nt();return t.hideFooter?null:T.jsx(t.slots.footer,x({},(e=t.slotProps)==null?void 0:e.footer))}const So="auto-generated-group-node-root",th=Symbol("mui.id_autogenerated"),sLe=()=>({type:"group",id:So,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function aLe(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI: The data grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(`
3721`))}const k1=(e,t,n)=>{const r=t?t(e):e.id;return aLe(r,e,n),r},y0=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},s={};for(let a=0;a<e.length;a+=1){const l=e[a],u=k1(l,t);i[u]=l,s[u]=u,o.rows.push(u)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:r,updates:o,dataRowIdToIdLookup:s,dataRowIdToModelLo
3721okup:i}},ZG=({tree:e,rowCountProp:t=0})=>{const n=e[So];return Math.max(t,n.children.length+(n.footerId==null?0:1))},eq=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o})=>{const i=e.current.caches.rows,{tree:s,treeDepths:a,dataRowIds:l,groupingName:u}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:i.updates,dataRowIdToIdLookup:i.dataRowIdToIdLookup,dataRowIdToModelLookup:i.dataRowIdToModelLookup}),c=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:a,dataRowIdToIdLookup:i.dataRowIdToIdLookup,dataRowIds:l,dataRowIdToModelLookup:i.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},x({},c,{totalRowCount:Math.max(t,c.dataRowIds.length),totalTopLevelRowCount:ZG({tree:c.tree,rowCountProp:t}),groupingName:u,loading:n})},ey=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,O2=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i<r.children.length;i+=1){const s=r.children[i];(!n||!ey(e[s]))&&o.push(s);const a=O2(e,s,n);for(let l=0;l<a.length;l+=1)o.push(a[l])}return!n&&r.footerId!=null&&o.push(r.footerId),o},lLe=({previousCache:e,getRowId:t,updates:n})=>{var r,o,i;if(e.updates.type==="full")throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const s=new Map;n.forEach(f=>{const h=k1(f,t,"A row was provided without id when calling updateRows():");s.has(h)?s.set(h,x({},s.get(h),f)):s.set(h,f)});const a={type:"partial",actions:{insert:[...(r=e.updates.actions.insert)!=null?r:[]],modify:[...(o=e.updates.actions.modify)!=null?o:[]],remove:[...(i=e.updates.actions.remove)!=null?i:[]]},idToActionLookup:x({},e.updates.idToActionLookup)},l=x({}
3721,e.dataRowIdToModelLookup),u=x({},e.dataRowIdToIdLookup),c={insert:{},modify:{},remove:{}};s.forEach((f,h)=>{const p=a.idToActionLookup[h];if(f._action==="delete"){if(p==="remove"||!l[h])return;p!=null&&(c[p][h]=!0),a.actions.remove.push(h),delete l[h],delete u[h];return}const g=l[h];if(g){p==="remove"?(c.remove[h]=!0,a.actions.modify.push(h)):p==null&&a.actions.modify.push(h),l[h]=x({},g,f);return}p==="remove"?(c.remove[h]=!0,a.actions.insert.push(h)):p==null&&a.actions.insert.push(h),l[h]=f,u[h]=h});const d=Object.keys(c);for(let f=0;f<d.length;f+=1){const h=d[f],p=c[h];Object.keys(p).length>0&&(a.actions[h]=a.actions[h].filter(g=>!p[g]))}return{dataRowIdToModelLookup:l,dataRowIdToIdLookup:u,updates:a,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function tq(e){var t,n;const r=bp(e),o=(r==null||(t=r.top)==null?void 0:t.reduce((s,a)=>(s+=e.current.unstable_getRowHeight(a.id),s),0))||0,i=(r==null||(n=r.bottom)==null?void 0:n.reduce((s,a)=>(s+=e.current.unstable_getRowHeight(a.id),s),0))||0;return{top:o,bottom:i}}function nq(e,t){const n=wp(e);return`var(--DataGrid-overlayHeight, ${2*Math.floor(t*n)}px)`}const uLe=gr("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e})=>({position:"sticky",top:0,left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4})),cLe=gr("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),dLe=e=>{const{classes:t}=e;return Re({root:["overlayWrapper"],inner:["overlayWrapperInner"]},At,t)};function fLe(e){var t,n;const r=kt(),o=nt(),[i,s]=m.useState(()=>{var c,d;return(c=(d=r.current.getRootDimensions())==null?void 0:d.viewportInnerSize)!=null?c:null}),a=m.useCallback(()=>{var c,d;s((c=(d=r.current.getRootDimensions())==null?void 0:d.viewportInnerSize)!=null?c:null)},[r]);Bt(()=>r.current.subscribeEvent("viewportInnerSizeChange",a),[r,a]);let l=(t=i==null?void 0:i.height)!=null?t:0;o.autoHeight&&l===0&&(l=nq(r,o.rowHeight));const u=dLe(x({},e,{classes:o.classes}));return i?T.jsx(uLe,{className:xe(u.root),overlayType:e.overlayType,children:T.jsx(cLe,x({className:xe(u.inner),style:{height:l,width:(n=i==null?void 0:i.width)!=null?n:0}},e))}):null}function hLe(){const e=kt(),t=nt(),n=qe(e,oS),r=qe(e,XG),o=qe(e,jFe),i=!o&&n===0,s=!o&&n>0&&r===0;let a=null,l="";if(i){var u;a=T.jsx(t.slots.noRowsOverlay,x({},(u=t.slotProps)==null?void 0:u.noRowsOverlay)),l="noRowsOverlay"}if(s){var c;a=T.jsx(t.slots.noResultsOverlay,x({},(c=t.slotProps)==null?void 0:c.noResultsOverlay)),l="noResultsOverlay"}if(o){var d;a=T.jsx(t.slots.loadingOverlay,x({},(d=t.slotProps)==null?void 0:d.loadingOverlay)),l="loadingOverlay"}return a===null?null:T.jsx(fLe,{overlayType:l,children:a})}function uS(e){return m.memo(e,HG)}let CE;function pLe(){return CE===void 0&&document.createElement("div").focus({get preventScroll(){return CE=!0,!1}}),CE}var Ra=function(e){return e.Cell="cell",e.Row="row",e}(Ra||{}),nn=function(e){return e.Edit="edit",e.View="view",e}(nn||{}),fn=function(e){return e.Edit="edit",e.View="view",e}(fn||{}),jo=function(e){return e.And="and",e.Or="or",e}(jo||{}),qa=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(qa||{}),vs=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(vs||{}),Gl=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Gl||{}),Ka=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Ka||{});function rq(e){return e.field!==void 0}function mLe(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function gLe(e,t){return e.closest(`.${t}`)}function M2(e){return e.replace(/["\\]/g,"\\$&")}function yLe(e,t){return e.querySelector(`[role="columnheader"][data-field="${M2(t)}"]`)}function oq(e){return`.${re.row}[data-id="${M2(String(e))}"]`}function vLe(e,t){return e.querySelector(oq(t))}function bLe(e,{id:t,field:n}){const r=oq(t),o=`.${re.cell}[data-field="${M2(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function uv(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function _t(e,t,n){const r=m.useRef(!0);m.useEffect(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}
3721class Af extends Error{}function wLe(e,t){const{getRowId:n}=t,r=m.useCallback(p=>({field:p,colDef:e.current.getColumn(p)}),[e]),o=m.useCallback(p=>{const g=e.current.getRow(p);if(!g)throw new Af(`No row with id #${p} found`);return{id:p,columns:e.current.getAllColumns(),row:g}},[e]),i=m.useCallback((p,g)=>{const b=e.current.getRow(p),y=e.current.getRowNode(p);if(!b||!y)throw new Af(`No row with id #${p} found`);const v=ri(e),w=A1(e);return{id:p,field:g,row:b,rowNode:y,value:b[g],colDef:e.current.getColumn(g),cellMode:e.current.getCellMode(p,g),api:e.current,hasFocus:v!==null&&v.field===g&&v.id===p,tabIndex:w&&w.field===g&&w.id===p?0:-1}},[e]),s=m.useCallback((p,g)=>{const b=e.current.getColumn(g),y=e.current.getCellValue(p,g),v=e.current.getRow(p),w=e.current.getRowNode(p);if(!v||!w)throw new Af(`No row with id #${p} found`);const C=ri(e),A=A1(e),S={id:p,field:g,row:v,rowNode:w,colDef:b,cellMode:e.current.getCellMode(p,g),hasFocus:C!==null&&C.field===g&&C.id===p,tabIndex:A&&A.field===g&&A.id===p?0:-1,value:y,formattedValue:y,isEditable:!1};return b&&b.valueFormatter&&(S.formattedValue=b.valueFormatter({id:p,field:S.field,value:S.value,api:e.current})),S.isEditable=b&&e.current.isCellEditable(S),S},[e]),a=m.useCallback((p,g)=>{const b=e.current.getColumn(g);if(!b||!b.valueGetter){const y=e.current.getRow(p);if(!y)throw new Af(`No row with id #${p} found`);return y[g]}return b.valueGetter(i(p,g))},[e,i]),l=m.useCallback((p,g)=>{var b;const y=th in p?p[th]:(b=n==null?void 0:n(p))!=null?b:p.id,v=g.field;return!g||!g.valueGetter?p[v]:g.valueGetter(i(y,v))},[i,n]),u=m.useCallback((p,g)=>{var b;const y=l(p,g);if(!g||!g.valueFormatter)return y;const v=(b=n?n(p):p.id)!=null?b:p[th],w=g.field;return g.valueFormatter({id:v,field:w,value:y,api:e.current})},[e,n,l]),c=m.useCallback(p=>e.current.rootElementRef.current?yLe(e.current.rootElementRef.current,p):null,[e]),d=m.useCallback(p=>e.current.rootElementRef.current?vLe(e.current.rootElementRef.current,p):null,[e]),f=m.useCallback((p,g)=>e.current.rootElementRef.current?bLe(e.current.rootElementRef.current,{id:p,field:g}):null,[e]);_t(e,{getCellValue:a,getCellParams:s,getCellElement:f,getRowValue:l,getRowFormattedValue:u,getRowParams:o,getRowElement:d,getColumnHeaderParams:r,getColumnHeaderElement:c},"public")}
3721const CLe=["changeReason","unstable_updateValueOnRender"],xLe=["column","rowId","editCellState","align","children","colIndex","height","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","isNotVisible","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver","style"],SLe=["changeReason","unstable_updateValueOnRender"],P1={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:nn.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},_Le=e=>{const{align:t,showRightBorder:n,isEditable:r,isSelected:o,isSelectionMode:i,classes:s}=e,a={root:["cell",`cell--text${ge(t)}`,r&&"cell--editable",o&&"selected",n&&"cell--withRightBorder",i&&!r&&"cell--selectionMode","withBorderColor"],content:["cellContent"]};return Re(a,At,s)},ELe=m.forwardRef((e,t)=>{const{column:n,rowId:r,editCellState:o}=e,i=kt(),s=nt(),a=n.field,l=qe(i,()=>{try{const M=i.current.getCellParams(r,a);return M.api=i.current,M}catch(k){if(k instanceof Af)return P1;throw k}},I2),u=qe(i,()=>i.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:r,field:a}));if(l===P1)return null;const{cellMode:c,hasFocus:d,isEditable:f,value:h,formattedValue:p}=l,g=n.type==="actions",b=(c==="view"||!f)&&!g?l.tabIndex:-1,{classes:y,getCellClassName:v}=s,w=i.current.unstable_applyPipeProcessors("cellClassName",[],{id:r,field:a});n.cellClassName&&w.push(typeof n.cellClassName=="function"?n.cellClassName(l):n.cellClassName),v&&w.push(v(l));let C;if(o==null&&n.renderCell&&(C=n.renderCell(l),w.push(re["cell--withRenderer"]),w.push(y==null?void 0:y["cell--withRenderer"])),o!=null&&n.renderEditCell){const k=i.current.getRowWithUpdatedValues(r,n.field),M=de(o,CLe),R=x({},l,{row:k},M);C=n.renderEditCell(R),w.push(re["cell--editing"]),w.push(y==null?void 0:y["cell--editing"])}const{slots:A}=s,S=A.cell,_=x({},e,{ref:t,field:a,formattedValue:p,hasFocus:d,isEditable:f,isSelected:u,value:h,cellMode:c,children:C,tabIndex:b,className:xe(w)});return m.createElement(S,_)}),ILe=uS(ELe),ALe=m.forwardRef((e,t)=>{var n,r,o,i;const{column:s,rowId:a,editCellState:l,align:u,colIndex:c,height:d,width:f,className:h,showRightBorder:p,colSpan:g,disableDragEvents:b,isNotVisible:y,onClick:v,onDoubleClick:w,onMouseDown:C,onMouseUp:A,onMouseOver:S,onKeyDown:_,onKeyUp:k,onDragEnter:M,onDragOver:R,style:O}=e,F=de(e,xLe),N=kt(),V=nt(),$=s.field,D=qe(N,()=>{try{const X=N.current.getCellParams(a,$);return X.api=N.current,X}catch(Z){if(Z instanceof Af)return P1;throw Z}},I2),L=qe(N,()=>N.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:a,field:$})),{cellMode:P,hasFocus:B,isEditable:E,value:z,formattedValue:H}=D,j=s.type==="actions"&&((n=(r=s).getActions)==null?void 0:n.call(r,N.current.getRowParams(a)).some(Z=>!Z.props.disabled)),G=(P==="view"||!E)&&!j?D.tabIndex:-1,{classes:Q,getCellClassName:ee}=V,Y=N.current.unstable_applyPipeProcessors("cellClassName",[],{id:a,field:$});s.cellClassName&&Y.push(typeof s.cellClassName=="function"?s.cellClassName(D):s.cellClassName),ee&&Y.push(ee(D));const se=H??z,fe=m.useRef(null),ve=bt(t,fe),oe=m.useRef(null),ye=(o=V.unstable_cellSelection)!=null?o:!1,we={align:u,showRightBorder:p,isEditable:E,classes:V.classes,isSelected:L,isSelectionMode:ye},me=_Le(we),be=m.useCallback(Z=>X=>{const W=N.current.getCellParams(a,$||"");N.current.publishEvent(Z,W,X),A&&A(X)},[N,$,A,a]),ie=m.useCallback(Z=>X=>{const W=N.current.getCellParams(a,$||"");N.current.publishEvent(Z,W,X),C&&C(X)},[N,$,C,a]),pe=m.useCallback((Z,X)=>W=>{if(!N.current.getRow(a))return;const le=N.current.getCellParams(a,$||"");N.current.publishEvent(Z,le,W),X&&X(W)},[N,$,a]),U=m.useMemo(()=>x(y?{padding:0,opacity:0,width:0,border:0}:{minWidth:f,maxWidth:f,minHeight:d,maxHeight:d==="auto"?"none":d},O),[f,d,y,O]);if(m.useEffect(()=>{if(!B||P===nn.Edit)return;const Z=un(N.current.rootElementRef.current);if(fe.current&&!fe.current.contains(Z.activeElement)){const X=fe.current.querySelector('[tabindex="0"]'),W=oe.current||X||fe.current;if(pLe())W.focus({preventScroll:!0});else{const le=N.current.getScrollPosition();W.focus(),N.current.scroll(le)}}},[B,P,N]),D===P1)return null;let q=F.onFocus,K;if(l==null&&s.renderCell&&(K=s.renderCell(D),Y.push(re["cell--withRenderer"]),Y.push(Q==null?void 0:Q["cell--withRenderer"])),l!=null&&s.renderEditCell){const Z=N.current.getRowWithUpdatedValues(a,s.field),X=de(l,SLe),W=x({},D,{row:Z},X);K=s.renderEditCell(W),Y.push(re["cell--editing"]),Y.push(Q==null?void 0:Q["cell--editing"])}
3721if(K===void 0){const Z=se==null?void 0:se.toString();K=T.jsx("div",{className:me.content,title:Z,role:"presentation",children:Z})}m.isValidElement(K)&&j&&(K=m.cloneElement(K,{focusElementRef:oe}));const ae=b?null:{onDragEnter:pe("cellDragEnter",M),onDragOver:pe("cellDragOver",R)},ue=(i=V.experimentalFeatures)==null?void 0:i.ariaV7;return T.jsx("div",x({ref:ve,className:xe(h,Y,me.root),role:ue?"gridcell":"cell","data-field":$,"data-colindex":c,"aria-colindex":c+1,"aria-colspan":g,style:U,tabIndex:G,onClick:pe("cellClick",v),onDoubleClick:pe("cellDoubleClick",w),onMouseOver:pe("cellMouseOver",S),onMouseDown:ie("cellMouseDown"),onMouseUp:be("cellMouseUp"),onKeyDown:pe("cellKeyDown",_),onKeyUp:pe("cellKeyUp",k)},ae,F,{onFocus:q,children:K}))}),vk=uS(ALe),kLe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex"],PLe=e=>{const{classes:t}=e;return Re({root:["booleanCell"]},At,t)};function TLe(e){const{value:t}=e,n=de(e,kLe),r=kt(),o=nt(),i={classes:o.classes},s=PLe(i),a=m.useMemo(()=>t?o.slots.booleanCellTrueIcon:o.slots.booleanCellFalseIcon,[o.slots.booleanCellFalseIcon,o.slots.booleanCellTrueIcon,t]);return T.jsx(a,x({fontSize:"small",className:s.root,titleAccess:r.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},n))}const RLe=m.memo(TLe),OLe=e=>ey(e.rowNode)?"":T.jsx(RLe,x({},e)),MLe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],DLe=e=>{const{classes:t}=e;return Re({root:["editBooleanCell"]},At,t)};function $Le(e){var t;const{id:n,value:r,field:o,className:i,hasFocus:s,onValueChange:a}=e,l=de(e,MLe),u=kt(),c=m.useRef(null),d=Jt(),[f,h]=m.useState(r),p=nt(),g={classes:p.classes},b=DLe(g),y=m.useCallback(async v=>{const w=v.target.checked;a&&await a(v,w),h(w),await u.current.setEditCellValue({id:n,field:o,value:w},v)},[u,o,n,a]);return m.useEffect(()=>{h(r)}
3721,[r]),Bt(()=>{s&&c.current.focus()},[s]),T.jsx("label",x({htmlFor:d,className:xe(b.root,i)},l,{children:T.jsx(p.slots.baseCheckbox,x({id:d,inputRef:c,checked:!!f,onChange:y,size:"small"},(t=p.slotProps)==null?void 0:t.baseCheckbox))}))}const FLe=e=>T.jsx($Le,x({},e)),LLe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],NLe=he(vd)({fontSize:"inherit"}),VLe=e=>{const{classes:t}=e;return Re({root:["editInputCell"]},At,t)};function BLe(e){const{id:t,value:n,field:r,colDef:o,hasFocus:i,inputProps:s,onValueChange:a}=e,l=de(e,LLe),u=o.type==="dateTime",c=kt(),d=m.useRef(),f=m.useMemo(()=>{let C;n==null?C=null:n instanceof Date?C=n:C=new Date((n??"").toString());let A;return C==null||Number.isNaN(C.getTime())?A="":A=new Date(C.getTime()-C.getTimezoneOffset()*60*1e3).toISOString().substr(0,u?16:10),{parsed:C,formatted:A}},[n,u]),[h,p]=m.useState(f),b={classes:nt().classes},y=VLe(b),v=m.useCallback(C=>{if(C==="")return null;const[A,S]=C.split("T"),[_,k,M]=A.split("-"),R=new Date;if(R.setFullYear(Number(_),Number(k)-1,Number(M)),R.setHours(0,0,0,0),S){const[O,F]=S.split(":");R.setHours(Number(O),Number(F),0,0)}return R},[]),w=m.useCallback(async C=>{const A=C.target.value,S=v(A);a&&await a(C,S),p({parsed:S,formatted:A}),c.current.setEditCellValue({id:t,field:r,value:S},C)},[c,r,t,a,v]);return m.useEffect(()=>{p(C=>{var A,S;return f.parsed!==C.parsed&&((A=f.parsed)==null?void 0:A.getTime())!==((S=C.parsed)==null?void 0:S.getTime())?f:C})},[f]),Bt(()=>{i&&d.current.focus()},[i]),T.jsx(NLe,x({inputRef:d,fullWidth:!0,className:y.root,type:u?"datetime-local":"date",inputProps:x({max:u?"9999-12-31T23:59":"9999-12-31"},s),value:h.formatted,onChange:w},l))}const iq=e=>T.jsx(BLe,x({},e)),jLe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],zLe=e=>{const{classes:t}=e;return Re({root:["editInputCell"]},At,t)},ULe=he(vd,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>x({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),HLe=m.forwardRef((e,t)=>{const n=nt(),{id:r,value:o,field:i,colDef:s,hasFocus:a,debounceMs:l=200,isProcessingProps:u,onValueChange:c}=e,d=de(e,jLe),f=kt(),h=m.useRef(),[p,g]=m.useState(o),b=zLe(n),y=m.useCallback(async w=>{const C=w.target.value;c&&await c(w,C);const A=f.current.getColumn(i);let S=C;A.valueParser&&(S=A.valueParser(C,f.current.getCellParams(r,i))),g(S),f.current.setEditCellValue({id:r,field:i,value:S,debounceMs:l,unstable_skipValueParser:!0},w)},[f,l,i,r,c]),v=f.current.unstable_getEditCellMeta(r,i);return m.useEffect(()=>{(v==null?void 0:v.changeReason)!=="debouncedSetEditCellValue"&&g(o)},[v,o]),Bt(()=>{a&&h.current.focus()},[a]),T.jsx(ULe,x({ref:t,inputRef:h,className:b.root,ownerState:n,fullWidth:!0,type:s.type==="number"?s.type:"text",value:p??"",onChange:y,endAdornment:u?T.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},d))}),WLe=e=>T.jsx(HLe,x({},e)),T1=e=>e==="Escape",GLe=e=>e==="Enter",sq=e=>e==="Tab",aq=e=>e===" ",qLe=e=>e.indexOf("Arrow")===0,KLe=e=>e==="Home"||e==="End",QLe=e=>e.indexOf("Page")===0;function lq(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const R1=e=>KLe(e)||qLe(e)||QLe(e)||aq(e),YLe=e=>!!e.key,XLe=e=>sq(e)||T1(e);function jc(e){return(e==null?void 0:e.type)==="singleSelect"}function bk(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const JLe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","getOptionLabel","getOptionValue"],ZLe=["MenuProps"];function eNe(e){return!!e.key}function tNe(e){var t,n,r;const o=nt(),{id:i,value:s,field:a,row:l,colDef:u,hasFocus:c,error:d,onValueChange:f,initialOpen:h=o.editMode===Ra.Cell,getOptionLabel:p,getOptionValue:g}=e,b=de(e,JLe),y=kt(),v=m.useRef(),w=m.useRef(),[C,A]=m.useState(h),_=(n=(((t=o.slotProps)==null?void 0:t.baseSelect)||{}).native)!=null?n:!1,k=((r=o.slotProps)==null?void 0:r.baseSelect)||{},{MenuProps:M}=k,R=de(k,ZLe);if(Bt(()=>{if(c){var L;(L=w.current)==null||L.focus()}},[c]),!jc(u))return null;let O;if(typeof(u==null?void 0:u.valueOptions)=="function"?O=u==null?void 0:u.valueOptions({id:i,row:l,field:a}):O=u==null?void 0:u.valueOptions,!O)return null;const F=g||u.getOptionValue,N=p||u.getOptionLabel,V=async L=>{if(!jc(u)||!O)return;A(!1);const P=L.target,B=bk(P.value,O,F);f&&await f(L,B),await y.current.setEditCellValue({id:i,field:a,value:B},L)},$=(L,P)=>{if(o.editMode===Ra.Row){A(!1);return}if(P==="backdropClick"||T1(L.key)){const B=y.current.getCellParams(i,a);y.current.publishEvent("cellEditStop",x({},B,{reason:T1(L.key)?vs.escapeKeyDown:vs.cellFocusOut}))}},D=L=>{eNe(L)&&L.key==="Enter"||A(!0)};return!O||!u?null:T.jsx(o.slots.baseSelect,x({ref:v,inputRef:w,value:s,onChange:V,open:C,onOpen:D,MenuProps:x({onClose:$},M),error:d,native:_,fullWidth:!0},b,R,{children:O.map(L=>{var P;const B=F(L);return m.createElement(o.slots.baseSelectOption,x({},((P=o.slotProps)==null?void 0:P.baseSelectOption)||{},{native:_,key:B,value:B}),N(L))})}))}const nNe=e=>T.jsx(tNe,x({},e)),rNe=["open","target","onClose","children","position","className","onExited"],oNe=e=>{const{classes:t}=e;return Re({root:["menu"]},At,t)},iNe=he(yd,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${re.menuList}`]:{outline:0}})),sNe={"bottom-start":"top left","bottom-end":"top right"};function uq(e){var t;const{open:n,target:r,onClose:o,children:i,position:s,className:a,onExited:l}=e,u=de(e,rNe),c=kt(),d=nt(),f=oNe(d),h=m.useRef(null);Bt(()=>{if(n)h.current=document.activeElement instanceof HTMLElement?document.activeElement:null;else{var b,y;(b=h.current)==null||(y=b.focus)==null||y.call(b),h.current=null}},[n]),m.useEffect(()=>{const b=n?"menuOpen":"menuClose";c.current.publishEvent(b,{target:r})},[c,n,r]);const p=b=>y=>{b&&b(),l&&l(y)},g=b=>{b.target&&(r===b.target||r!=null&&r.contains(b.target))||o(b)};return T.jsx(iNe,x({as:d.slots.basePopper,className:xe(a,f.root),ownerState:d,open:n,anchorEl:r,transition:!0,placement:s}
3721,u,(t=d.slotProps)==null?void 0:t.basePopper,{children:({TransitionProps:b,placement:y})=>T.jsx(oT,{onClickAway:g,mouseEvent:"onMouseDown",children:T.jsx(vh,x({},b,{style:{transformOrigin:sNe[y]},onExited:p(b==null?void 0:b.onExited),children:T.jsx(fo,{children:i})}))})}))}const aNe=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],lNe=e=>typeof e.getActions=="function";function uNe(e){var t;const{colDef:n,id:r,hasFocus:o,tabIndex:i,position:s="bottom-end",focusElementRef:a}=e,l=de(e,aNe),[u,c]=m.useState(-1),[d,f]=m.useState(!1),h=kt(),p=m.useRef(null),g=m.useRef(null),b=m.useRef(!1),y=m.useRef({}),v=Zn(),w=Jt(),C=Jt(),A=nt();if(!lNe(n))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const S=n.getActions(h.current.getRowParams(r)),_=S.filter(D=>!D.props.showInMenu),k=S.filter(D=>D.props.showInMenu),M=_.length+(k.length?1:0);m.useLayoutEffect(()=>{o||Object.entries(y.current).forEach(([D,L])=>{L==null||L.stop({},()=>{delete y.current[D]})})},[o]),m.useEffect(()=>{if(u<0||!p.current||u>=p.current.children.length)return;p.current.children[u].focus({preventScroll:!0})},[u]),m.useEffect(()=>{o||(c(-1),b.current=!1)},[o]),m.useImperativeHandle(a,()=>({focus(){if(!b.current){const D=S.findIndex(L=>!L.props.disabled);c(D)}}}),[S]),m.useEffect(()=>{u>=M&&c(M-1)},[u,M]);const R=()=>{f(!0),c(M-1),b.current=!0},O=()=>{f(!1)},F=D=>L=>{y.current[D]=L},N=(D,L)=>P=>{c(D),b.current=!0,L&&L(P)},V=D=>{if(M<=1)return;const L=(B,E)=>{var z;if(B<0||B>S.length)return B;const H=v.direction==="rtl"?-1:1,j=(E==="left"?-1:1)*H;return(z=S[B+j])!=null&&z.props.disabled?L(B+j,E):B+j};let P=u;D.key==="ArrowRight"?P=L(u,"right"):D.key==="ArrowLeft"&&(P=L(u,"left")),!(P<0||P>=M)&&P!==u&&(D.preventDefault(),D.stopPropagation(),c(P))},$=D=>{D.key==="Tab"&&D.preventDefault(),["Tab","Escape"].includes(D.key)&&O()};return T.jsxs("div",x({role:"menu",ref:p,tabIndex:-1,className:re.actionsCell,onKeyDown:V},l,{children:[_.map((D,L)=>m.cloneElement(D,{key:L,touchRippleRef:F(L),onClick:N(L,D.props.onClick),tabIndex:u===L?i:-1})),k.length>0&&C&&T.jsx(A.slots.baseIconButton,x({ref:g,id:C,"aria-label":h.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":d,"aria-controls":d?w:void 0,role:"menuitem",size:"small",onClick:R,touchRippleRef:F(C),tabIndex:u===_.length?i:-1},(t=A.slotProps)==null?void 0:t.baseIconButton,{children:T.jsx(A.slots.moreActionsIcon,{fontSize:"small"})})),k.length>0&&T.jsx(uq,{open:d,target:g.current,position:s,onClose:O,children:T.jsx(vT,{id:w,className:re.menuList,onKeyDown:$,"aria-labelledby":C,variant:"menu",autoFocusItem:!0,children:k.map((D,L)=>m.cloneElement(D,{key:L,closeMenu:O}))})})]}))}const cNe=e=>T.jsx(uNe,x({},e)),dNe=["field","align","width","contentWidth"],fNe=e=>{const{align:t,classes:n}=e,r={root:["cell","cellSkeleton",`cell--text${ge(t)}`,"withBorderColor"]};return Re(r,At,n)};function hNe(e){const{align:t,width:n,contentWidth:r}=e,o=de(e,dNe),s={classes:nt().classes,align:t},a=fNe(s);return T.jsx("div",x({className:a.root,style:{width:n}},o,{children:T.jsx(lfe,{width:`${r}%`})}))}function pNe(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?EZ(gs(e.palette.divider,1),.88):_Z(gs(e.palette.divider,1),.68)}const R4={[`.${re.columnSeparator}, .${re["columnSeparator--resizing"]}`]:{visibility:"visible",width:"auto"}},O4={[`& .${re.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${re.menuIcon}`]:{width:"auto",visibility:"visible"}},mNe=he("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${re.autoHeight}`]:t.autoHeight},{[`&.${re.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${re["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${re["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${re["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${re.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${re["root--disableUserSelection"]} .${re.cell}`]:t["root--disableUserSelection"]},{[`&.${re.autosizing}`]:t.autosizing},{[`& .${re.editBooleanCell}`]:t.editBooleanCell},{[`& .${re["cell--editing"]}`]:t["cell--editing"]},{[`& .${re["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${re["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${re["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${re["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${re.cell}`]:t.cell},{[`& .${re["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${re["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${re["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${re["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${re["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${re.cellContent}`]:t.cellContent},{[`& .${re.cellCheckbox}`]:t.cellCheckbox},{[`& .${re.cellSkeleton}`]:t.cellSkeleton},{[`& .${re.checkboxInput}`]:t.checkboxInput},{[`& .${re["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${re["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${re["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${re["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${re["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${re["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${re["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${re["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${re["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${re.columnHeader}`]:t.columnHeader},{[`& .${re.headerFilterRow}`]:t.headerFilterRow},{[`& .${re.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${re.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${re.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${re["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${re["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${re.columnSeparator}`]:t.columnSeparator},{[`& .${re.filterIcon}`]:t.filterIcon},{[`& .${re.iconSeparator}`]:t.iconSeparator},{[`& .${re.menuIcon}`]:t.menuIcon},{[`& .${re.menuIconButton}`]:t.menuIconButton},{[`& .${re.menuOpen}`]:t.menuOpen},{[`& .${re.menuList}`]:t.menuList},{[`& .${re["row--editable"]}`]:t["row--editable"]},{[`& .${re["row--editing"]}`]:t["row--editing"]},{[`& .${re["row--dragging"]}`]:t["row--dragging"]},{[`& .${re.row}`]:t.row},{[`& .${re.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${re.rowReorderCell}`]:t.rowReorderCell},{[`& .${re["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${re.sortIcon}`]:t.sortIcon},{[`& .${re.withBorderColor}`]:t.withBorderColor},{[`& .${re.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${re.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${re.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${re["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{const t=pNe(e),n=e.shape.borderRadius;return x({"--unstable_DataGrid-radius":typeof n=="number"?`${n}
3721px`:n,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:gs(e.palette.background.default,e.palette.action.disabledOpacity),"--DataGrid-cellOffsetMultiplier":2,flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:t,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflowAnchor:"none",[`&.${re.autoHeight}`]:{height:"auto",[`& .${re["row--lastVisible"]} .${re.cell}`]:{borderBottomColor:"transparent"}},[`&.${re.autosizing}`]:{[`& .${re.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},[`& .${re.cell} > *`]:{overflow:"visible !important",whiteSpace:"nowrap"},[`& .${re.groupingCriteriaCell}`]:{width:"unset"},[`& .${re.treeDataGroupingCell}`]:{width:"unset"}},[`& .${re["virtualScrollerContent--overflowed"]} .${re["row--lastVisible"]} .${re.cell}`]:{borderBottomColor:"transparent"},[`& .${re.columnHeader}, & .${re.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${re.columnHeader}:focus-within, & .${re.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:gs(e.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${re.columnHeader}:focus, & .${re.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`},[`& .${re.columnHeaderCheckbox}, & .${re.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${re.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${re["columnHeader--sorted"]} .${re.iconButtonContainer}, & .${re["columnHeader--filtered"]} .${re.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${re.columnHeader}:not(.${re["columnHeader--sorted"]}) .${re.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${re.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden",position:"relative"},[`& .${re.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${re["columnHeader--filledGroup"]} .${re.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${re["columnHeader--filledGroup"]}.${re["columnHeader--showColumnBorder"]} .${re.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${re["columnHeader--filledGroup"]}.${re["columnHeader--showColumnBorder"]}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${re.headerFilterRow}`]:{borderTop:`1px solid ${t}`},[`& .${re.sortIcon}, & .${re.filterIcon}`]:{fontSize:"inherit"},[`& .${re["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${re["columnHeader--alignCenter"]} .${re.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${re["columnHeader--alignRight"]} .${re.columnHeaderDraggableContainer}, & .${re["columnHeader--alignRight"]} .${re.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${re["columnHeader--alignCenter"]} .${re.menuIcon}, & .${re["columnHeader--alignRight"]} .${re.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${re["columnHeader--alignRight"]} .${re.menuIcon}, & .${re["columnHeader--alignRight"]} .${re.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${re["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${re.columnSeparator}`]:{visibility:"hidden",position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:t},"@media (hover: hover)":{[`& .${re.columnHeaders}:hover`]:R4,[`& .${re.columnHeader}:hover`]:O4,[`& .${re.columnHeader}:not(.${re["columnHeader--sorted"]}):hover .${re.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${re.columnHeaders}`]:R4,[`& .${re.columnHeader}`]:O4},[`& .${re["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${re["columnSeparator--sideRight"]}`]:{right:-12},[`& .${re["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:(e.vars||e).palette.text.primary,"@media (hover: none)":{color:t}},[`&.${re["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${re.iconSeparator}`]:{color:"inherit"},[`& .${re.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`.${re.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${re.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gs(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(
3722                ${e.vars.palette.action.selectedOpacity} + 
3723                ${e.vars.palette.action.hoverOpacity}
3724              ))`:gs(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gs(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${re.cell}`]:{display:"flex",alignItems:"center",borderBottom:"1px solid","&.Mu
3724i-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gs(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity+e.palette.action.hoverOpacity})`:gs(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gs(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`&.${re["root--disableUserSelection"]} .${re.cell}`]:{userSelect:"none"},[`& .${re.row}:not(.${re["row--dynamicHeight"]}) > .${re.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${re.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${re.cell}.${re["cell--selectionMode"]}`]:{cursor:"default"},[`& .${re.cell}.${re["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`solid ${(e.vars||e).palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${re["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${re["row--editing"]} .${re.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${re.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${re.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${re.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${re.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${re.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${re["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${re.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`.${re.withBorderColor}`]:{borderColor:t},[`& .${re["cell--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${re["columnHeader--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${re["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${re["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${re["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${re.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${re.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${re["columnHeader--dragging"]}, & .${re["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${re["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${re.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${re.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${re.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${re.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${re.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})}),gNe=["children","className"],yNe=e=>{const{autoHeight:t,density:n,classes:r}=e,o={root:["root",t&&"autoHeight",`root--density${ge(n)}`,"withBorderColor"]};return Re(o,At,r)},vNe=m.forwardRef(function(t,n){var r;const o=nt(),{children:i,className:s}=t,a=de(t,gNe),l=Xu(),u=qe(l,rLe),c=m.useRef(null),d=bt(c,n),f=(r=o.experimentalFeatures)!=null&&r.ariaV7?null:qG,h=typeof f=="function"?f():null,p=x({},o,{density:u}),g=yNe(p);l.current.register("public",{rootElementRef:c});const[b,y]=m.useState(!1);return Bt(()=>{y(!0)},[]),b?T.jsx(mNe,x({ref:d,className:xe(s,g.root),ownerState:p},h,a,{children:i})):null}),bNe=["className"],wNe=e=>{const{classes:t}=e;return Re({root:["footerContainer","withBorderColor"]},At,t)},CNe=gr("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),xNe=m.forwardRef(function(t,n){const{className:r}
3724=t,o=de(t,bNe),i=nt(),s=wNe(i);return T.jsx(CNe,x({ref:n,className:xe(s.root,r),ownerState:i},o))}),SNe=["className"],_Ne=e=>{const{classes:t}=e;return Re({root:["overlay"]},At,t)},ENe=gr("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),D2=m.forwardRef(function(t,n){const{className:r}=t,o=de(t,SNe),i=nt(),s=_Ne(i);return T.jsx(ENe,x({ref:n,className:xe(s.root,r),ownerState:i},o))}),INe=["className"],ANe=e=>{const{classes:t}=e;return Re({root:["iconButtonContainer"]},At,t)},kNe=gr("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),cq=m.forwardRef(function(t,n){const{className:r}=t,o=de(t,INe),i=nt(),s=ANe(i);return T.jsx(kNe,x({ref:n,className:xe(s.root,r),ownerState:i},o))}),PNe=e=>{const{classes:t}=e;return Re({icon:["sortIcon"]},At,t)};function TNe(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=r),o?T.jsx(o,x({fontSize:"small",className:n},i)):null}function RNe(e){var t;const{direction:n,index:r,sortingOrder:o}=e,i=kt(),s=nt(),a=x({},e,{classes:s.classes}),l=PNe(a),u=TNe(s.slots,n,l.icon,o);if(!u)return null;const c=T.jsx(s.slots.baseIconButton,x({tabIndex:-1,"aria-label":i.current.getLocaleText("columnHeaderSortIconLabel"),title:i.current.getLocaleText("columnHeaderSortIconLabel"),size:"small"},(t=s.slotProps)==null?void 0:t.baseIconButton,{children:u}));return T.jsxs(cq,{children:[r!=null&&T.jsx(eU,{badgeContent:r,color:"default",children:c}),r==null&&c]})}const ONe=m.memo(RNe),MNe=e=>{const{classes:t,open:n}=e;return Re({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},At,t)},DNe=m.memo(e=>{var t,n;const{colDef:r,open:o,columnMenuId:i,columnMenuButtonId:s,iconButtonRef:a}=e,l=kt(),u=nt(),c=x({},e,{classes:u.classes}),d=MNe(c),f=m.useCallback(h=>{h.preventDefault(),h.stopPropagation(),l.current.toggleColumnMenu(r.field)},[l,r.field]);return T.jsx("div",{className:d.root,children:T.jsx(u.slots.baseTooltip,x({title:l.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(t=u.slotProps)==null?void 0:t.baseTooltip,{children:T.jsx(u.slots.baseIconButton,x({ref:a,tabIndex:-1,className:d.button,"aria-label":l.current.getLocaleText("columnMenuLabel"),size:"small",onClick:f,"aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?i:void 0,id:s},(n=u.slotProps)==null?void 0:n.baseIconButton,{children:T.jsx(u.slots.columnMenuIcon,{fontSize:"small"})}))}))})});function $Ne({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:s,onExited:a}){const l=kt(),u=l.current.getColumn(o),c=Vt(d=>{d&&(d.stopPropagation(),s!=null&&s.contains(d.target))||l.current.hideColumnMenu()});return!s||!u?null:T.jsx(uq,{placement:`bottom-${u.align==="right"?"start":"end"}`,open:i,target:s,onClose:c,onExited:a,children:T.jsx(n,x({colDef:u,hideMenu:c,open:i,id:e,labelledby:t},r))})}const FNe=["className"],LNe=e=>{const{classes:t}=e;return Re({root:["columnHeaderTitle"]},At,t)},NNe=gr("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)"}),VNe=m.forwardRef(function(t,n){const{className:r}
3724=t,o=de(t,FNe),i=nt(),s=LNe(i);return T.jsx(NNe,x({ref:n,className:xe(s.root,r),ownerState:i},o))});function BNe(e){var t;const{label:n,description:r}=e,o=nt(),i=m.useRef(null),[s,a]=m.useState(""),l=m.useCallback(()=>{if(!r&&i!=null&&i.current){const u=mLe(i.current);a(u?n:"")}},[r,n]);return T.jsx(o.slots.baseTooltip,x({title:r||s},(t=o.slotProps)==null?void 0:t.baseTooltip,{children:T.jsx(VNe,{onMouseOver:l,ref:i,children:n})}))}const jNe=["resizable","resizing","height","side"];var dq=function(e){return e.Left="left",e.Right="right",e}(dq||{});const zNe=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${ge(o)}`],icon:["iconSeparator"]};return Re(i,At,r)};function UNe(e){const{height:t,side:n=dq.Right}=e,r=de(e,jNe),o=nt(),i=x({},e,{side:n,classes:o.classes}),s=zNe(i),a=m.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return T.jsx("div",x({className:s.root,style:{minHeight:t,opacity:o.showColumnVerticalBorder?0:1}},r,{onClick:a,children:T.jsx(o.slots.columnResizeIcon,{className:s.icon})}))}const HNe=m.memo(UNe),WNe=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps"],fq=m.forwardRef(function(t,n){const{classes:r,columnMenuOpen:o,colIndex:i,height:s,isResizing:a,sortDirection:l,hasFocus:u,tabIndex:c,separatorSide:d,isDraggable:f,headerComponent:h,description:p,width:g,columnMenuIconButton:b=null,columnMenu:y=null,columnTitleIconButtons:v=null,headerClassName:w,label:C,resizable:A,draggableContainerProps:S,columnHeaderSeparatorProps:_}=t,k=de(t,WNe),M=Xu(),R=nt(),O=m.useRef(null),[F,N]=m.useState(o),V=bt(O,n);let $="none";return l!=null&&($=l==="asc"?"ascending":"descending"),m.useEffect(()=>{F||N(o)},[F,o]),m.useLayoutEffect(()=>{const D=M.current.state.columnMenu;if(u&&!D.open){const P=O.current.querySelector('[tabindex="0"]')||O.current;P==null||P.focus(),M.current.columnHeadersContainerElementRef.current.scrollLeft=0}},[M,u]),T.jsxs("div",x({ref:V,className:xe(r.root,w),style:{height:s,width:g,minWidth:g,maxWidth:g},role:"columnheader",tabIndex:c,"aria-colindex":i+1,"aria-sort":$,"aria-label":h==null?C:void 0},k,{children:[T.jsxs("div",x({className:r.draggableContainer,draggable:f,role:"presentation"},S,{children:[T.jsxs("div",{className:r.titleContainer,role:"presentation",children:[T.jsx("div",{className:r.titleContainerContent,children:h!==void 0?h:T.jsx(BNe,{label:C,description:p,columnWidth:g})}),v]}),b]})),T.jsx(HNe,x({resizable:!R.disableColumnResize&&!!A,resizing:a,height:s,side:d},_)),y]}))}),GNe=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,filterItemsCounter:s}=e,a=o!=null,l=s!=null&&s>0,u=t.type==="number",c={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",a&&"columnHeader--sorted",l&&"columnHeader--filtered",u&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Re(c,At,n)};function qNe(e){var t,n,r,o;const{colDef:i,columnMenuOpen:s,colIndex:a,headerHeight:l,isResizing:u,sortDirection:c,sortIndex:d,filterItemsCounter:f,hasFocus:h,tabIndex:p,disableReorder:g,separatorSide:b}=e,y=Xu(),v=nt(),w=m.useRef(null),C=Jt(),A=Jt(),S=m.useRef(null),[_,k]=m.useState(s),M=m.useMemo(()=>!v.disableColumnReorder&&!g&&!i.disableReorder,[v.disableColumnReorder,g,i.disableReorder]);let R;i.renderHeader&&(R=i.renderHeader(y.current.getColumnHeaderParams(i.field)));const O=x({},e,{classes:v.classes,showRightBorder:v.showColumnVerticalBorder}),F=GNe(O),N=m.useCallback(G=>Q=>{uv(Q)||y.current.publishEvent(G,y.current.getColumnHeaderParams(i.field),Q)},[y,i.field]),V=m.useMemo(()=>({onClick:N("columnHeaderClick"),onDoubleClick:N("columnHeaderDoubleClick"),onMouseOver:N("columnHeaderOver"),onMouseOut:N("columnHeaderOut"),onMouseEnter:N("columnHeaderEnter"),onMouseLeave:N("columnHeaderLeave"),onKeyDown:N("columnHeaderKeyDown"),onFocus:N("columnHeaderFocus"),onBlur:N("columnHeaderBlur")}),[N]),$=m.useMemo(()=>M?{onDragStart:N("columnHeaderDragStart"),onDragEnter:N("columnHeaderDragEnter"),onDragOver:N("columnHeaderDragOver"),onDragEnd:N("columnHeaderDragEnd")}:{},[M,N]),D=m.useMemo(()=>({onMouseDown:N("columnSeparatorMouseDown"),onDoubleClick:N("columnSeparatorDoubleClick")}),[N]);m.useEffect(()=>{_||k(s)},[_,s]);const L=m.useCallback(()=>{k(!1)},[]),P=!v.disableColumnMenu&&!i.disableColumnMenu&&T.jsx(DNe,{colDef:i,columnMenuId:C,columnMenuButtonId:A,open:_,iconButtonRef:S}),B=T.jsx($Ne,{columnMenuId:C,columnMenuButtonId:A,field:i.field,open:s,target:S.current,ContentComponent:v.slots.columnMenu,contentComponentProps:(t=v.slotProps)==null?void 0:t.columnMenu,onExited:L}),E=(n=i.sortingOrder)!=null?n:v.sortingOrder,z=T.jsxs(m.Fragment,{children:[!v.disableColumnFilter&&T.jsx(v.slots.columnHeaderFilterIconButton,x({field:i.field,counter:f},(r=v.slotProps)==null?void 0:r.columnHeaderFilterIconButton)),i.sortable&&!i.hideSortIcons&&T.jsx(ONe,{direction:c,index:d,sortingOrder:E})]});m.useLayoutEffect(()=>{const G=y.current.state.columnMenu;if(h&&!G.open){const ee=w.current.querySelector('[tabindex="0"]')||w.current;ee==null||ee.focus(),y.current.columnHeadersContainerElementRef.current.scrollLeft=0}},[y,h]);const H=typeof i.headerClassName=="function"?i.headerClassName({field:i.field,colDef:i}):i.headerClassName,j=(o=i.headerName)!=null?o:i.field;return T.jsx(fq,x({ref:w,classes:F,columnMenuOpen:s,colIndex:a,height:l,isResizing:u,sortDirection:c,hasFocus:h,tabIndex:p,separatorSide:b,isDraggable:M,headerComponent:R,description:i.description,elementId:i.field,width:i.computedWidth,columnMenuIconButton:P,columnTitleIconButtons:z,headerClassName:H,label:j,resizable:!v.disableColumnResize&&!!i.resizable,"data-field":i.field,columnMenu:B,draggableContainerProps:$,columnHeaderSeparatorProps:D},V))}const ty=()=>({items:[],logicOperator:jo.And,quickFilterValues:[],quickFilterLogicOperator:jo.And}),M4=1e3;class KNe{constructor(t=M4){this.timeouts=new Map,this.cleanupTimeout=M4,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}
3724reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class QNe{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}var Sa=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e}(Sa||{});class YNe{}function XNe(e){let t=0;return function(r,o,i,s){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new QNe:new KNe);const[a]=m.useState(new YNe),l=m.useRef(null),u=m.useRef();u.current=i;const c=m.useRef(null);if(!l.current&&u.current){const d=(f,h,p)=>{if(!h.defaultMuiPrevented){var g;(g=u.current)==null||g.call(u,f,h,p)}};l.current=r.current.subscribeEvent(o,d,s),t+=1,c.current={cleanupToken:t},e.registry.register(a,()=>{var f;(f=l.current)==null||f.call(l),l.current=null,c.current=null},c.current)}else!u.current&&l.current&&(l.current(),l.current=null,c.current&&(e.registry.unregister(c.current),c.current=null));m.useEffect(()=>{if(!l.current&&u.current){const d=(f,h,p)=>{if(!h.defaultMuiPrevented){var g;(g=u.current)==null||g.call(u,f,h,p)}};l.current=r.current.subscribeEvent(o,d,s)}return c.current&&e.registry&&(e.registry.unregister(c.current),c.current=null),()=>{var d;(d=l.current)==null||d.call(l),l.current=null}},[r,o,s])}}const JNe={registry:null},rt=XNe(JNe),ZNe={isFirst:!0};function bn(e,t,n){rt(e,t,n,ZNe)}function go(e,t){const n=m.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}function hq(e){return typeof e=="number"&&!Number.isNaN(e)}function pq(e){return typeof e=="function"}function $2(e){return typeof e=="object"&&e!==null}function eVe(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function v0(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const Mh=(e,t,n)=>Math.max(t,Math.min(n,e));function zc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(!zc(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;for(let i=0;i<o.length;i+=1){const s=o[i];if(!zc(s[1],t.get(s[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;for(let o=0;o<r;o+=1)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(let o=0;o<r;o+=1){const i=n[o];if(!zc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function tVe(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function nVe(e,t,n){const r=tVe(e);return()=>t+(n-t)*r()}function mq(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const rVe=(e,t,n,r,o)=>{const i=go(e,"useNativeEventListener"),[s,a]=m.useState(!1),l=m.useRef(r),u=m.useCallback(c=>l.current&&l.current(c),[]);m.useEffect(()=>{l.current=r},[r]),m.useEffect(()=>{let c;if(pq(t)?c=t():c=t&&t.current?t.current:null,c&&n&&!s){i.debug(`Binding native ${n} event`),c.addEventListener(n,u,o);const d=c;a(!0);const f=()=>{i.debug(`Clearing native ${n} event`),d.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",f)}},[t,u,n,s,i,o,e])},cv=e=>{const t=m.useRef(!0);t.current&&(t.current=!1,e())},oVe=100,iVe=e=>e?0:100,gq=(e,t)=>
3724t>0&&e>0?Math.ceil(e/t):0;Ba(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error");const yq=e=>({page:0,pageSize:e?0:100}),sVe=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),vq=(e,t)=>{if(t===Sa.DataGrid&&e>oVe)throw new Error(["MUI: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
3725`))},bq=e=>e.pagination,$i=Ct(bq,e=>e.paginationModel),aVe=Ct($i,e=>e.page),lVe=Ct($i,e=>e.pageSize);Ct($i,sS,(e,t)=>gq(t,e.pageSize));const F2=En($i,xs,iS,Ju,YG,(e,t,n,r,o)=>{const i=o.length,s=Math.min(e.pageSize*e.page,i-1),a=Math.min(s+e.pageSize-1,i-1);if(s===-1||a===-1)return null;if(n<2)return{firstRowIndex:s,lastRowIndex:a};const l=o[s],u=a-s+1,c=r.findIndex(p=>p.id===l.id);let d=c,f=0;for(;d<r.length&&f<=u;){var h;const p=r[d],g=(h=t[p.id])==null?void 0:h.depth;g===void 0?d+=1:((f<u||g>0)&&(d+=1),g===0&&(f+=1))}return{firstRowIndex:c,lastRowIndex:d-1}}),uVe=En(Ju,F2,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),wq=En(Xm,F2,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),ny=e=>e.preferencePanel;var dd=function(e){return e.filters="filters",e.columns="columns",e}(dd||{});const ry=e=>e.rowsMeta,Oi=e=>e.rowSelection,cVe=Ct(Oi,e=>e.length),dVe=En(Oi,il,(e,t)=>new Map(e.map(n=>[n,t[n]]))),O1=En(Oi,e=>e.reduce((t,n)=>(t[n]=n,t),{})),fVe=Ba(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),Cq=(e,t)=>t&&e.length>1?(fVe(),[e[0]]):e,D4=(e,t)=>n=>x({},n,{sorting:x({},n.sorting,{sortModel:Cq(e,t)})}),hVe=e=>e==="desc",pVe=(e,t)=>{const n=t.current.getColumn(e.field);if(!n)return null;const r=hVe(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator;return{getSortCellParams:i=>({id:i,field:n.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}},mVe=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const s=t.params[i],a=n.params[i];return r=o.comparator(s.value,a.value,s,a),r},0),gVe=(e,t)=>{const n=e.map(r=>pVe(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>mVe(n,o,i)).map(o=>o.node.id)},$4=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},L2=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,yVe=new Intl.Collator,vVe=(e,t)=>{const n=L2(e,t);return n!==null?n:typeof e=="string"?yVe.compare(e.toString(),t.toString()):e-t},xq=(e,t)=>{const n=L2(e,t);return n!==null?n:Number(e)-Number(t)},Sq=(e,t)=>{const n=L2(e,t);return n!==null?n:e>t?1:e<t?-1:0},_q=e=>e.headerFiltering,bVe=Ct(_q,e=>e.editing),wVe=Ct(_q,e=>e.menuOpen),CVe=(e,t)=>{const n={enabled:!t.disableVirtualization,enabledForColumns:!0};return x({},e,{virtualization:n})};function xVe(e,t){const n=i=>{e.current.setState(s=>x({},s,{virtualization:x({},s.virtualization,{enabled:i})}))};_t(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(s=>x({},s,{virtualization:x({},s.virtualization,{enabledForColumns:i})}))}},"public"),m.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization])}const Eq=e=>e.virtualization,SVe=Ct(Eq,e=>e.enabled),Iq=Ct(Eq,e=>e.enabledForColumns),_Ve=e=>{const{classes:t}=e;return Re({icon:["filterIcon"]},At,t)};function EVe(e){var t,n;const{counter:r,field:o,onClick:i}=e,s=kt(),a=nt(),l=x({},e,{classes:a.classes}),u=_Ve(l),c=qe(s,ny),d=Jt(),f=Jt(),h=m.useCallback(b=>{b.preventDefault(),b.stopPropagation();const{open:y,openedPanelValue:v}=ny(s.current.state);y&&v===dd.filters?s.current.hideFilterPanel():s.current.showFilterPanel(void 0,f,d),i&&i(s.current.getColumnHeaderParams(o),b)},[s,o,i,f,d]);if(!r)return null;const p=c.open&&c.labelId===d,g=T.jsx(a.slots.baseIconButton,x({id:d,onClick:h,color:"default","aria-label":s.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?f:void 0},(t=a.slotProps)==null?void 0:t.baseIconButton,{children:T.jsx(a.slots.columnFilteredIcon,{className:u.icon,fontSize:"small"})}));return T.jsx(a.slots.baseTooltip,x({title:s.current.getLocaleText("columnHeaderFiltersTooltipActive")(r),enterDelay:1e3},(n=a.slotProps)==null?void 0:n.baseTooltip,{children:T.jsxs(cq,{children:[r>1&&T.jsx(eU,{badgeContent:r,color:"default",children:g}),r===1&&g]})}
3725))}const IVe=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],AVe=e=>{const{classes:t}=e;return Re({root:["checkboxInput"]},At,t)},kVe=m.forwardRef(function(t,n){var r;const{field:o,id:i,value:s,rowNode:a,hasFocus:l,tabIndex:u}=t,c=de(t,IVe),d=kt(),f=nt(),h={classes:f.classes},p=AVe(h),g=m.useRef(null),b=m.useRef(null),y=bt(g,n),v=d.current.getCellElement(i,o),w=_=>{const k={value:_.target.checked,id:i};d.current.publishEvent("rowSelectionCheckboxChange",k,_)};m.useLayoutEffect(()=>{u===0&&v&&(v.tabIndex=-1)},[v,u]),m.useEffect(()=>{if(l){var _;const k=(_=g.current)==null?void 0:_.querySelector("input");k==null||k.focus({preventScroll:!0})}else b.current&&b.current.stop({})},[l]);const C=m.useCallback(_=>{aq(_.key)&&_.stopPropagation()},[]);if(a.type==="footer"||a.type==="pinnedRow")return null;const A=d.current.isRowSelectable(i),S=d.current.getLocaleText(s?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return T.jsx(f.slots.baseCheckbox,x({ref:y,tabIndex:u,checked:s,onChange:w,className:p.root,inputProps:{"aria-label":S},onKeyDown:C,disabled:!A,touchRippleRef:b},(r=f.slotProps)==null?void 0:r.baseCheckbox,c))}),PVe=kVe,TVe=["field","colDef"],RVe=e=>{const{classes:t}=e;return Re({root:["checkboxInput"]},At,t)},OVe=m.forwardRef(function(t,n){var r;const o=de(t,TVe),[,i]=m.useState(!1),s=kt(),a=nt(),l={classes:a.classes},u=RVe(l),c=qe(s,JG),d=qe(s,Oi),f=qe(s,Xm),h=qe(s,wq),p=m.useMemo(()=>typeof a.isRowSelectable!="function"?d:d.filter(k=>s.current.getRow(k)?a.isRowSelectable(s.current.getRowParams(k)):!1),[s,a.isRowSelectable,d]),g=m.useMemo(()=>(!a.pagination||!a.checkboxSelectionVisibleOnly?f:h).reduce((M,R)=>(M[R]=!0,M),{}),[a.pagination,a.checkboxSelectionVisibleOnly,h,f]),b=m.useMemo(()=>p.filter(k=>g[k]).length,[p,g]),y=b>0&&b<Object.keys(g).length,v=b>0,w=k=>{const M={value:k.target.checked};s.current.publishEvent("headerSelectionCheckboxChange",M)},C=c!==null&&c.field===t.field?0:-1;m.useLayoutEffect(()=>{const k=s.current.getColumnHeaderElement(t.field);C===0&&k&&(k.tabIndex=-1)},[C,s,t.field]);const A=m.useCallback(k=>{k.key===" "&&s.current.publishEvent("headerSelectionCheckboxChange",{value:!v})},[s,v]),S=m.useCallback(()=>{i(k=>!k)},[]);m.useEffect(()=>s.current.subscribeEvent("rowSelectionChange",S),[s,S]);const _=s.current.getLocaleText(v?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return T.jsx(a.slots.baseCheckbox,x({ref:n,indeterminate:y,checked:v,onChange:w,className:u.root,inputProps:{"aria-label":_},tabIndex:C,onKeyDown:A},(r=a.slotProps)==null?void 0:r.baseCheckbox,o))}),F4=Ze(T.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),L4=Ze(T.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),N4=Ze(T.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),V4=Ze(T.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),MVe=Ze(T.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),B4=Ze(T.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),DVe=Ze(T.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");Ze(T.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");Ze(T.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const $Ve=Ze(T.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),FVe=Ze(T.jsx("path",{d:"M11 19V5h2v14z"}),"Separator"),LVe=Ze(T.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),NVe=Ze(T.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),VVe=Ze(T.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),BVe=Ze(T.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),xE=Ze(T.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),j4=Ze(T.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),jVe=Ze(T.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),zVe=Ze(T.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),z4=Ze(T.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),UVe=Ze(T.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),HVe=Ze(T.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),WVe=Ze(T.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),GVe=Ze(T.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),qVe=Ze(T.jsx("g",{children:T.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),KVe=Ze(T.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");Ze(T.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const QVe=Ze(T.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),YVe=["hideMenu","colDef","id","labelledby","className","children","open"],XVe=he(vT)(()=>({minWidth:248})),JVe=m.forwardRef(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:s,children:a,open:l}=t,u=de(t,YVe),c=m.useCallback(d=>{sq(d.key)&&d.preventDefault(),XLe(d.key)&&r(d)},[r]);return T.jsx(XVe,x({id:o,ref:n,className:xe(re.menuList,s),"aria-labelledby":i,onKeyDown:c,autoFocus:l},u,{children:a}))}),ZVe=["displayOrder"],e4e=e=>{const t=Xu(),{defaultSlots:n,defaultSlotProps:r,slots:o={},slotProps:i={},hideMenu:s,colDef:a,addDividers:l=!0}=e,u=m.useMemo(()=>x({},n,o),[n,o]),c=m.useMemo(()=>
3725{if(!i||Object.keys(i).length===0)return r;const h=x({},i);return Object.entries(r).forEach(([p,g])=>{h[p]=x({},g,i[p]||{})}),h},[r,i]),d=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),f=m.useMemo(()=>{const h=Object.keys(n);return Object.keys(o).filter(p=>!h.includes(p))},[o,n]);return m.useMemo(()=>{const g=Array.from(new Set([...d,...f])).filter(b=>u[b]!=null).sort((b,y)=>{const v=c[b],w=c[y],C=Number.isFinite(v==null?void 0:v.displayOrder)?v.displayOrder:100,A=Number.isFinite(w==null?void 0:w.displayOrder)?w.displayOrder:100;return C-A});return g.reduce((b,y,v)=>{let w={colDef:a,onClick:s};const C=c[y];if(C){const A=de(C,ZVe);w=x({},w,A)}return l&&v!==g.length-1?[...b,[u[y],w],[Sg,{}]]:[...b,[u[y],w]]},[])},[l,a,d,s,u,c,f])};function t4e(e){const{colDef:t,onClick:n}=e,r=kt(),o=nt(),a=Fr(r).filter(u=>u.disableColumnMenu!==!0).length===1,l=m.useCallback(u=>{a||(r.current.setColumnVisibility(t.field,!1),n(u))},[r,t.field,n,a]);return o.disableColumnSelector||t.hideable===!1?null:T.jsxs(io,{onClick:l,disabled:a,children:[T.jsx(pa,{children:T.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"})}),T.jsx(mi,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function n4e(e){const{onClick:t}=e,n=kt(),r=nt(),o=m.useCallback(i=>{t(i),n.current.showPreferences(dd.columns)},[n,t]);return r.disableColumnSelector?null:T.jsxs(io,{onClick:o,children:[T.jsx(pa,{children:T.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),T.jsx(mi,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}function r4e(e){return T.jsxs(m.Fragment,{children:[T.jsx(t4e,x({},e)),T.jsx(n4e,x({},e))]})}function o4e(e){const{colDef:t,onClick:n}=e,r=kt(),o=nt(),i=m.useCallback(s=>{n(s),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:T.jsxs(io,{onClick:i,children:[T.jsx(pa,{children:T.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),T.jsx(mi,{children:r.current.getLocaleText("columnMenuFilter")})]})}function i4e(e){var t;const{colDef:n,onClick:r}=e,o=kt(),i=qe(o,Ri),s=nt(),a=m.useMemo(()=>{if(!n)return null;const d=i.find(f=>f.field===n.field);return d==null?void 0:d.sort},[n,i]),l=(t=n.sortingOrder)!=null?t:s.sortingOrder,u=m.useCallback(d=>{r(d);const f=d.currentTarget.getAttribute("data-value")||null;o.current.sortColumn(n,f===a?null:f)},[o,n,r,a]);if(!n||!n.sortable||!l.some(d=>!!d))return null;const c=d=>{const f=o.current.getLocaleText(d);return typeof f=="function"?f(n):f};return T.jsxs(m.Fragment,{children:[l.includes("asc")&&a!=="asc"?T.jsxs(io,{onClick:u,"data-value":"asc",children:[T.jsx(pa,{children:T.jsx(s.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),T.jsx(mi,{children:c("columnMenuSortAsc")})]}):null,l.includes("desc")&&a!=="desc"?T.jsxs(io,{onClick:u,"data-value":"desc",children:[T.jsx(pa,{children:T.jsx(s.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),T.jsx(mi,{children:c("columnMenuSortDesc")})]}):null,l.includes(null)&&a!=null?T.jsxs(io,{onClick:u,children:[T.jsx(pa,{}),T.jsx(mi,{children:o.current.getLocaleText("columnMenuUnsort")})]}):null]})}const s4e=["defaultSlots","defaultSlotProps","slots","slotProps"],a4e={columnMenuSortItem:i4e,columnMenuFilterItem:o4e,columnMenuColumnsItem:r4e},l4e={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},u4e=m.forwardRef(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:s}=t,a=de(t,s4e),l=e4e(x({},a,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:s}));return T.jsx(JVe,x({ref:n},a,{children:l.map(([u,c],d)=>T.jsx(u,x({},c),d))}))}),c4e=m.forwardRef(function(t,n){return T.jsx(u4e,x({},t,{ref:n,defaultSlots:a4e,defaultSlotProps:l4e}))}),d4e=["className"],f4e=e=>{const{classes:t}=e;return Re({root:["panelContent"]},At,t)},h4e=gr("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function Aq(e){const{className:t}=e,n=de(e,d4e),r=nt(),o=f4e(r);return T.jsx(h4e,x({className:xe(t,o.root),ownerState:r},n))}const p4e=["className"],m4e=e=>{const{classes:t}=e;return Re({root:["panelFooter"]},At,t)},g4e=gr("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function kq(e){const{className:t}=e,n=de(e,p4e),r=nt(),o=m4e(r);return T.jsx(g4e,x({className:xe(t,o.root),ownerState:r},n))}const y4e=["className"],v4e=e=>{const{classes:t}=e;return Re({root:["panelHeader"]},At,t)},b4e=gr("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})(({theme:e})=>({padding:e.spacing(1)}));function w4e(e){const{className:t}=e,n=de(e,y4e),r=nt(),o=v4e(r);return T.jsx(b4e,x({className:xe(t,o.root),ownerState:r},n))}const C4e=["className","slotProps"],x4e=e=>{const{classes:t}=e;return Re({root:["panelWrapper"]},At,t)},S4e=he("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),_4e=()=>!0,Pq=m.forwardRef(function(t,n){const{className:r,slotProps:o={}}
3725=t,i=de(t,C4e),s=nt(),a=x4e(s);return T.jsx(Mz,x({open:!0,disableEnforceFocus:!0,isEnabled:_4e},o.TrapFocus,{children:T.jsx(S4e,x({ref:n,tabIndex:-1,className:xe(r,a.root),ownerState:s},i))}))}),E4e=!1,I4e=["sort","searchPredicate","autoFocusSearchField","disableHideAllButton","disableShowAllButton","getTogglableColumns"],A4e=e=>{const{classes:t}=e;return Re({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},At,t)},k4e=he("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),P4e=he("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})(({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${eo.root}`]:{marginRight:e.spacing(.5)}})),T4e=he(Zt)({justifyContent:"flex-end"}),U4=new Intl.Collator,R4e=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;function O4e(e){var t,n,r;const o=kt(),i=m.useRef(null),s=qe(o,xa),a=qe(o,Es),l=nt(),[u,c]=m.useState(""),d=A4e(l),{sort:f,searchPredicate:h=R4e,autoFocusSearchField:p=!0,disableHideAllButton:g=!1,disableShowAllButton:b=!1,getTogglableColumns:y}=e,v=de(e,I4e),w=m.useMemo(()=>{switch(f){case"asc":return[...s].sort((O,F)=>U4.compare(O.headerName||O.field,F.headerName||F.field));case"desc":return[...s].sort((O,F)=>-U4.compare(O.headerName||O.field,F.headerName||F.field));default:return s}},[s,f]),C=O=>{const{name:F}=O.target;o.current.setColumnVisibility(F,a[F]===!1)},A=m.useCallback(O=>{const F=Es(o),N=x({},F),V=y?y(s):null;return s.forEach($=>{$.hideable&&(V==null||V.includes($.field))&&(O?delete N[$.field]:N[$.field]=!1)}),o.current.setColumnVisibilityModel(N)},[o,s,y]),S=m.useCallback(O=>{c(O.target.value)},[]),_=m.useMemo(()=>{const O=y?y(w):null,F=O?w.filter(({field:N})=>O.includes(N)):w;return u?F.filter(N=>h(N,u.toLowerCase())):F},[w,u,h,y]),k=m.useRef(null);m.useEffect(()=>{p?i.current.focus():k.current&&typeof k.current.focus=="function"&&k.current.focus()},[p]);let M=!1;const R=O=>M===!1&&O.hideable!==!1?(M=!0,!0):!1;return T.jsxs(Pq,x({},v,{children:[T.jsx(w4e,{children:T.jsx(l.slots.baseTextField,x({label:o.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:o.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:i,value:u,onChange:S,variant:"standard",fullWidth:!0},(t=l.slotProps)==null?void 0:t.baseTextField))}),T.jsx(Aq,{children:T.jsx(k4e,{className:d.root,ownerState:l,children:_.map(O=>{var F;return T.jsxs(P4e,{className:d.columnsPanelRow,ownerState:l,children:[T.jsx(ed,{control:T.jsx(l.slots.baseSwitch,x({disabled:O.hideable===!1,checked:a[O.field]!==!1,onClick:C,name:O.field,size:"small",inputRef:R(O)?k:void 0},(F=l.slotProps)==null?void 0:F.baseSwitch)),label:O.headerName||O.field}),!l.disableColumnReorder&&E4e&&T.jsx(T4e,{draggable:!0,"aria-label":o.current.getLocaleText("columnsPanelDragIconLabel"),title:o.current.getLocaleText("columnsPanelDragIconLabel"),size:"small",disabled:!0,children:T.jsx(l.slots.columnReorderIcon,{})})]},O.field)})})}),b&&g?null:T.jsxs(kq,{children:[g?T.jsx("span",{}):T.jsx(l.slots.baseButton,x({onClick:()=>A(!1)},(n=l.slotProps)==null?void 0:n.baseButton,{disabled:g,children:o.current.getLocaleText("columnsPanelHideAllButton")})),b?null:T.jsx(l.slots.baseButton,x({onClick:()=>A(!0)},(r=l.slotProps)==null?void 0:r.baseButton,{disabled:b,children:o.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))}const M4e=["children","className","classes"],D4e=Qe("MuiDataGrid",["panel","paper"]),$4e=he(yd,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),F4e=he(fo,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex"})),L4e=m.forwardRef((e,t)=>{const{children:n,className:r}=e,o=de(e,M4e),i=kt(),s=nt(),a=D4e,[l,u]=m.useState(!1),c=m.useCallback(()=>{i.current.hidePreferences()},[i]),d=m.useCallback(g=>{T1(g.key)&&i.current.hidePreferences()},[i]),f=m.useMemo(()=>[{name:"flip",enabled:!1},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{u(!0)},effect:()=>()=>{u(!1)}}],[]),[h,p]=m.useState(null);return m.useEffect(()=>{var g;const b=(g=i.current.rootElementRef)==null||(g=g.current)==null?void 0:g.querySelector(`.${re.columnHeaders}`);b&&p(b)},[i]),h?T.jsx($4e,x({ref:t,placement:"bottom-start",className:xe(r,a.panel),ownerState:s,anchorEl:h,modifiers:f},o,{children:T.jsx(oT,{mouseEvent:"onMouseUp",onClickAway:c,children:T.jsx(F4e,{className:a.paper,ownerState:s,elevation:8,onKeyDown:d,children:l&&n})})})):null}),N4e=m.forwardRef(function(t,n){var r,o,i;const s=kt(),a=qe(s,xa),l=nt(),u=qe(s,ny),c=s.current.unstable_applyPipeProcessors("preferencePanel",null,(r=u.openedPanelValue)!=null?r:dd.filters);return T.jsx(l.slots.panel,x({ref:n,as:l.slots.basePopper,open:a.length>0&&u.open,id:u.panelId,"aria-labelledby":u.labelId},(o=l.slotProps)==null?void 0:o.panel,t,(i=l.slotProps)==null?void 0:i.basePopper,{children:c}))}),V4e=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],B4e=["InputComponentProps"],j4e=e=>{const{classes:t}=e;return Re({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterForm
3725ColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},At,t)},z4e=he("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),U4e=he("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),H4e=he("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),W4e=he("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),G4e=he("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),q4e=he("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),K4e=e=>{switch(e){case jo.And:return"filterPanelOperatorAnd";case jo.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `logicOperator` property in the `GridFilterPanel`.")}},qp=e=>e.headerName||e.field,H4=new Intl.Collator,Q4e=m.forwardRef(function(t,n){var r,o,i,s,a,l,u,c,d,f;const{item:h,hasMultipleFilters:p,deleteFilter:g,applyFilterChanges:b,multiFilterOperator:y,showMultiFilterOperators:v,disableMultiFilterOperator:w,applyMultiFilterOperatorChanges:C,focusElementRef:A,logicOperators:S=[jo.And,jo.Or],columnsSort:_,filterColumns:k,deleteIconProps:M={},logicOperatorInputProps:R={},operatorInputProps:O={},columnInputProps:F={},valueInputProps:N={}}=t,V=de(t,V4e),$=kt(),D=qe($,WG),L=qe($,br),P=Jt(),B=Jt(),E=Jt(),z=Jt(),H=nt(),j=j4e(H),G=m.useRef(null),Q=m.useRef(null),ee=p&&S.length>0,Y=((r=H.slotProps)==null?void 0:r.baseFormControl)||{},fe=(i=(((o=H.slotProps)==null?void 0:o.baseSelect)||{}).native)!=null?i:!0,ve=((s=H.slotProps)==null?void 0:s.baseInputLabel)||{},oe=((a=H.slotProps)==null?void 0:a.baseSelectOption)||{},{InputComponentProps:ye}=N,we=de(N,B4e),me=m.useMemo(()=>{if(k===void 0||typeof k!="function")return D;const ue=k({field:h.field,columns:D,currentFilters:(L==null?void 0:L.items)||[]});return D.filter(Z=>ue.includes(Z.field))},[k,L==null?void 0:L.items,D,h.field]),be=m.useMemo(()=>{switch(_){case"asc":return me.sort((ue,Z)=>H4.compare(qp(ue),qp(Z)));case"desc":return me.sort((ue,Z)=>-H4.compare(qp(ue),qp(Z)));default:return me}},[me,_]),ie=h.field?$.current.getColumn(h.field):null,pe=m.useMemo(()=>{var ue;return!h.operator||!ie?null:(ue=ie.filterOperators)==null?void 0:ue.find(Z=>Z.value===h.operator)},[h,ie]),U=m.useCallback(ue=>{const Z=ue.target.value,X=$.current.getColumn(Z);if(X.field===ie.field)return;const W=X.filterOperators.find(_e=>_e.value===h.operator)||X.filterOperators[0],le=!W.InputComponent||W.InputComponent!==(pe==null?void 0:pe.InputComponent)||X.type!==ie.type;b(x({},h,{field:Z,operator:W.value,value:le?void 0:h.value}))},[$,b,h,ie,pe]),q=m.useCallback(ue=>{const Z=ue.target.value,X=ie==null?void 0:ie.filterOperators.find(le=>le.value===Z),W=!(X!=null&&X.InputComponent)||(X==null?void 0:X.InputComponent)!==(pe==null?void 0:pe.InputComponent);b(x({},h,{operator:Z,value:W?void 0:h.value}))},[b,h,ie,pe]),K=m.useCallback(ue=>{const Z=ue.target.value===jo.And.toString()?jo.And:jo.Or;C(Z)},[C]),ae=()=>{H.disableMultipleColumnsFiltering?h.value===void 0?g(h):b(x({},h,{value:void 0})):g(h)};return m.useImperativeHandle(A,()=>({focus:()=>{if(pe!=null&&pe.InputComponent){var ue;G==null||(ue=G.current)==null||ue.focus()}else Q.current.focus()}}),[pe]),T.jsxs(z4e,x({ref:n,className:j.root,"data-id":h.id,ownerState:H},V,{children:[T.jsx(U4e,x({variant:"standard",as:H.slots.baseFormControl},Y,M,{className:xe(j.deleteIcon,Y.className,M.className),ownerState:H,children:T.jsx(H.slots.baseIconButton,x({"aria-label":$.current.getLocaleText("filterPanelDeleteIconLabel"),title:$.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:ae,size:"small"},(l=H.slotProps)==null?void 0:l.baseIconButton,{children:T.jsx(H.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),T.jsx(H4e,x({variant:"standard",as:H.slots.baseFormControl},Y,R,{sx:x({display:ee?"flex":"none",visibility:v?"visible":"hidden"},Y.sx||{},R.sx||{}),className:xe(j.logicOperatorInput,Y.className,R.className),ownerState:H,children:T.jsx(H.slots.baseSelect,x({inputProps:{"aria-label":$.current.getLocaleText("filterPanelLogicOperator")},value:y,onChange:K,disabled:!!w||S.length===1,native:fe}
3725,(u=H.slotProps)==null?void 0:u.baseSelect,{children:S.map(ue=>m.createElement(H.slots.baseSelectOption,x({},oe,{native:fe,key:ue.toString(),value:ue.toString()}),$.current.getLocaleText(K4e(ue))))}))})),T.jsxs(W4e,x({variant:"standard",as:H.slots.baseFormControl},Y,F,{className:xe(j.columnInput,Y.className,F.className),ownerState:H,children:[T.jsx(H.slots.baseInputLabel,x({},ve,{htmlFor:P,id:B,children:$.current.getLocaleText("filterPanelColumns")})),T.jsx(H.slots.baseSelect,x({labelId:B,id:P,label:$.current.getLocaleText("filterPanelColumns"),value:h.field||"",onChange:U,native:fe},(c=H.slotProps)==null?void 0:c.baseSelect,{children:be.map(ue=>m.createElement(H.slots.baseSelectOption,x({},oe,{native:fe,key:ue.field,value:ue.field}),qp(ue)))}))]})),T.jsxs(G4e,x({variant:"standard",as:H.slots.baseFormControl},Y,O,{className:xe(j.operatorInput,Y.className,O.className),ownerState:H,children:[T.jsx(H.slots.baseInputLabel,x({},ve,{htmlFor:E,id:z,children:$.current.getLocaleText("filterPanelOperator")})),T.jsx(H.slots.baseSelect,x({labelId:z,label:$.current.getLocaleText("filterPanelOperator"),id:E,value:h.operator,onChange:q,native:fe,inputRef:Q},(d=H.slotProps)==null?void 0:d.baseSelect,{children:ie==null||(f=ie.filterOperators)==null?void 0:f.map(ue=>m.createElement(H.slots.baseSelectOption,x({},oe,{native:fe,key:ue.value,value:ue.value}),ue.label||$.current.getLocaleText(`filterOperator${ge(ue.value)}`)))}))]})),T.jsx(q4e,x({variant:"standard",as:H.slots.baseFormControl},Y,we,{className:xe(j.valueInput,Y.className,we.className),ownerState:H,children:pe!=null&&pe.InputComponent?T.jsx(pe.InputComponent,x({apiRef:$,item:h,applyValue:b,focusElementRef:G},pe.InputComponentProps,ye)):null}))]}))});class N2{constructor(){this.currentId=0,this.clear=()=>{this.currentId!==0&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new N2}start(t,n){this.clear(),this.currentId=setTimeout(n,t)}}function V2(){const e=E2(N2.create).current;return UG(e.disposeEffect),e}const Y4e=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps","variant"];function Xs(e){var t,n;const{item:r,applyValue:o,type:i,apiRef:s,focusElementRef:a,tabIndex:l,disabled:u,clearButton:c,InputProps:d,variant:f="standard"}=e,h=de(e,Y4e),p=V2(),[g,b]=m.useState((t=r.value)!=null?t:""),[y,v]=m.useState(!1),w=Jt(),C=nt(),A=m.useCallback(S=>{const{value:_}=S.target;b(String(_)),v(!0),p.start(C.filterDebounceMs,()=>{const k=x({},r,{value:_,fromInput:w});o(k),v(!1)})},[w,o,r,C.filterDebounceMs,p]);return m.useEffect(()=>{if(r.fromInput!==w||r.value===void 0){var _;b(String((_=r.value)!=null?_:""))}},[w,r]),T.jsx(C.slots.baseTextField,x({id:w,label:s.current.getLocaleText("filterPanelInputLabel"),placeholder:s.current.getLocaleText("filterPanelInputPlaceholder"),value:g,onChange:A,variant:f,type:i||"text",InputProps:x({},y||c?{endAdornment:y?T.jsx(C.slots.loadIcon,{fontSize:"small",color:"action"}):c}:{},{disabled:u},d,{inputProps:x({tabIndex:l},d==null?void 0:d.inputProps)}),InputLabelProps:{shrink:!0},inputRef:a},h,(n=C.slotProps)==null?void 0:n.baseTextField))}const X4e=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function Wd(e){var t,n;const{item:r,applyValue:o,type:i,apiRef:s,focusElementRef:a,InputProps:l,clearButton:u,tabIndex:c,disabled:d}=e,f=de(e,X4e),h=V2(),[p,g]=m.useState((t=r.value)!=null?t:""),[b,y]=m.useState(!1),v=Jt(),w=nt(),C=m.useCallback(A=>{const S=A.target.value;g(String(S)),y(!0),h.start(w.filterDebounceMs,()=>{o(x({},r,{value:S})),y(!1)})},[o,r,w.filterDebounceMs,h]);return m.useEffect(()=>{var A;const S=(A=r.value)!=null?A:"";g(String(S))},[r.value]),T.jsx(w.slots.baseTextField,x({fullWidth:!0,id:v,label:s.current.getLocaleText("filterPanelInputLabel"),placeholder:s.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:C,variant:"standard",type:i||"text",InputLabelProps:{shrink:!0},inputRef:a,InputProps:x({},b||u?{endAdornment:b?T.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):u}:{},{disabled:d},l,{inputProps:x({max:i==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:c},l==null?void 0:l.inputProps)})},f,(n=w.slotProps)==null?void 0:n.baseTextField))}const J4e=["item","applyValue","type","apiRef","focusElementRef","getOptionLabel","getOptionValue","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],Z4e=({column:{valueOptions:e,field:t},OptionComponent:n,getOptionLabel:r,getOptionValue:o,isSelectNative:i,baseSelectOptionProps:s})=>(typeof e=="function"?["",...e({field:t})]:["",...e||[]]).map(l=>{const u=o(l),c=r(l);return m.createElement(n,x({},s,{native:i,key:u,value:u}),c)}),eBe=he("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function W4(e){var t,n,r,o,i,s,a,l;const{item:u,applyValue:c,type:d,apiRef:f,focusElementRef:h,getOptionLabel:p,getOptionValue:g,placeholder:b,tabIndex:y,label:v,variant:w="standard",clearButton:C}=e,A=de(e,J4e),[S,_]=m.useState((t=u.value)!=null?t:""),k=Jt(),M=Jt(),R=nt(),O=(n=(r=R.slotProps)==null||(r=r.baseSelect)==null?void 0:r.native)!=null?n:!0;let F=null;if(u.field){const P=f.current.getColumn(u.field);jc(P)&&(F=P)}const N=g||((o=F)==null?void 0:o.getOptionValue),V=p||((i=F)==null?void 0:i.getOptionLabel),$=m.useMemo(()=>
3725{if(F)return typeof F.valueOptions=="function"?F.valueOptions({field:F.field}):F.valueOptions},[F]),D=m.useCallback(P=>{let B=P.target.value;B=bk(B,$,N),_(String(B)),c(x({},u,{value:B}))},[$,N,c,u]);if(m.useEffect(()=>{var P;let B;if($!==void 0){if(B=bk(u.value,$,N),B!==u.value){c(x({},u,{value:B}));return}}else B=u.value;B=(P=B)!=null?P:"",_(String(B))},[u,$,c,N]),!jc(F)||!jc(F))return null;const L=v??f.current.getLocaleText("filterPanelInputLabel");return T.jsxs(eBe,{children:[T.jsxs(R.slots.baseFormControl,{children:[T.jsx(R.slots.baseInputLabel,x({},(s=R.slotProps)==null?void 0:s.baseInputLabel,{id:M,htmlFor:k,shrink:!0,variant:w,children:L})),T.jsx(R.slots.baseSelect,x({id:k,label:L,labelId:M,value:S,onChange:D,variant:w,type:d||"text",inputProps:{tabIndex:y,ref:h,placeholder:b??f.current.getLocaleText("filterPanelInputPlaceholder")},native:O,notched:w==="outlined"?!0:void 0},A,(a=R.slotProps)==null?void 0:a.baseSelect,{children:Z4e({column:F,OptionComponent:R.slots.baseSelectOption,getOptionLabel:V,getOptionValue:N,isSelectNative:O,baseSelectOptionProps:(l=R.slotProps)==null?void 0:l.baseSelectOption})}))]}),C]})}const tBe=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],nBe=he("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function rBe(e){var t,n,r,o;const{item:i,applyValue:s,apiRef:a,focusElementRef:l,clearButton:u,tabIndex:c,label:d,variant:f="standard"}=e,h=de(e,tBe),[p,g]=m.useState(i.value||""),b=nt(),y=Jt(),v=Jt(),w=((t=b.slotProps)==null?void 0:t.baseSelect)||{},C=(n=w.native)!=null?n:!0,A=((r=b.slotProps)==null?void 0:r.baseSelectOption)||{},S=m.useCallback(k=>{const M=k.target.value;g(M),s(x({},i,{value:M}))},[s,i]);m.useEffect(()=>{g(i.value||"")},[i.value]);const _=d??a.current.getLocaleText("filterPanelInputLabel");return T.jsxs(nBe,{children:[T.jsxs(b.slots.baseFormControl,{fullWidth:!0,children:[T.jsx(b.slots.baseInputLabel,x({},(o=b.slotProps)==null?void 0:o.baseInputLabel,{id:y,shrink:!0,variant:f,children:_})),T.jsxs(b.slots.baseSelect,x({labelId:y,id:v,label:_,value:p,onChange:S,variant:f,notched:f==="outlined"?!0:void 0,native:C,displayEmpty:!0,inputProps:{ref:l,tabIndex:c}},h,w,{children:[T.jsx(b.slots.baseSelectOption,x({},A,{native:C,value:"",children:a.current.getLocaleText("filterValueAny")})),T.jsx(b.slots.baseSelectOption,x({},A,{native:C,value:"true",children:a.current.getLocaleText("filterValueTrue")})),T.jsx(b.slots.baseSelectOption,x({},A,{native:C,value:"false",children:a.current.getLocaleText("filterValueFalse")}))]}))]}),u]})}const oBe=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],G4=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),iBe=m.forwardRef(function(t,n){var r,o;const i=kt(),s=nt(),a=qe(i,br),l=qe(i,WG),u=m.useRef(null),c=m.useRef(null),{logicOperators:d=[jo.And,jo.Or],columnsSort:f,filterFormProps:h,getColumnForNewFilter:p,disableAddFilterButton:g=!1,disableRemoveAllButton:b=!1}=t,y=de(t,oBe),v=i.current.upsertFilterItem,w=m.useCallback(O=>{i.current.setFilterLogicOperator(O)},[i]),C=m.useCallback(()=>{let O;if(p&&typeof p=="function"){const F=p({currentFilters:(a==null?void 0:a.items)||[],columns:l});if(F===null)return null;O=l.find(({field:N})=>N===F)}else O=l.find(F=>{var N;return(N=F.filterOperators)==null?void 0:N.length});return O?G4(O):null},[a==null?void 0:a.items,l,p]),A=m.useCallback(()=>{if(p===void 0||typeof p!="function")return C();const O=a.items.length?a.items:[C()].filter(Boolean),F=p({currentFilters:O,columns:l});if(F===null)return null;const N=l.find(({field:V})=>V===F);return N?G4(N):null},[a.items,l,p,C]),S=m.useMemo(()=>a.items.length?a.items:(c.current||(c.current=C()),c.current?[c.current]:[]),[a.items,C]),_=S.length>1,k=()=>{const O=A();O&&i.current.upsertFilterItems([...S,O])},M=m.useCallback(O=>{const F=S.length===1;i.current.deleteFilterItem(O),F&&i.current.hideFilterPanel()},[i,S.length]),R=()=>{S.length===1&&S[0].value===void 0&&(i.current.deleteFilterItem(S[0]),i.current.hideFilterPanel()),i.current.setFilterModel(x({},a,{items:[]}))};return m.useEffect(()=>{d.length>0&&a.logicOperator&&!d.includes(a.logicOperator)&&w(d[0])},[d,w,a.logicOperator]),m.useEffect(()=>{S.length>0&&u.current.focus()},[S.length]),T.jsxs(Pq,x({ref:n},y,{children:[T.jsx(Aq,{children:S.map((O,F)=>T.jsx(Q4e,x({item:O,applyFilterChanges:v,deleteFilter:M,hasMultipleFilters:_,showMultiFilterOperators:F>0,multiFilterOperator:a.logicOperator,disableMultiFilterOperator:F!==1,applyMultiFilterOperatorChanges:w,focusElementRef:F===S.length-1?u:null,logicOperators:d,columnsSort:f},h),O.id==null?F:O.id))}),!s.disableMultipleColumnsFiltering&&!(g&&b)?T.jsxs(kq,{children:[g?T.jsx("span",{}):T.jsx(s.slots.baseButton,x({onClick:k,startIcon:T.jsx(s.slots.filterPanelAddIcon,{})},(r=s.slotProps)==null?void 0:r.baseButton,{children:i.current.getLocaleText("filterPanelAddFilter")})),b?null:T.jsx(s.slots.baseButton,x({onClick:R,startIcon:T.jsx(s.slots.filterPanelRemoveAllIcon,{})},(o=s.slotProps)==null?void 0:o.baseButton,{children:i.current.getLocaleText("filterPanelRemoveAll")}))]}):null]}))}),sBe=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function Tq(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,color:s,error:a,helperText:l,size:u,variant:c}=e,d=de(e,sBe),f={color:s,error:a,helperText:l,size:u,variant:c},[h,p]=m.useState(t.value||[]),g=Jt(),b=nt();m.useEffect(()=>{var v;const w=(v=t.value)!=null?v:[];p(w.map(String))},[t.value]);const y=m.useCallback((v,w)=>{p(w.map(String)),n(x({},t,{value:[...w]}))},[n,t]);return T.jsx(vy,x({multiple:!0,freeSolo:!0,options:[],filterOptions:(v,w)=>{const{inputValue:C}=w;return C==null||C===""?[]:[C]},id:g,value:h,onChange:y,renderTags:(v,w)=>v.map((C,A)=>T.jsx(b.slots.baseChip,x({variant:"outlined",size:"small",label:C},w({index:A})))),renderInput:v=>{var w;return T.jsx(b.slots.baseTextField,x({},v,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:x({},v.InputLabelProps,{shrink:!0}
3725),inputRef:i,type:r||"text"},f,(w=b.slotProps)==null?void 0:w.baseTextField))}},d))}const aBe=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant","getOptionLabel","getOptionValue"],lBe=fT();function uBe(e){var t,n;const{item:r,applyValue:o,apiRef:i,focusElementRef:s,color:a,error:l,helperText:u,size:c,variant:d="standard",getOptionLabel:f,getOptionValue:h}=e,p=de(e,aBe),g={color:a,error:l,helperText:u,size:c,variant:d},b=Jt(),y=nt();let v=null;if(r.field){const R=i.current.getColumn(r.field);jc(R)&&(v=R)}const w=h||((t=v)==null?void 0:t.getOptionValue),C=f||((n=v)==null?void 0:n.getOptionLabel),A=m.useCallback((R,O)=>w(R)===w(O),[w]),S=m.useMemo(()=>{var R;return(R=v)!=null&&R.valueOptions?typeof v.valueOptions=="function"?v.valueOptions({field:v.field}):v.valueOptions:[]},[v]),_=m.useMemo(()=>S==null?void 0:S.map(w),[S,w]),k=m.useMemo(()=>Array.isArray(r.value)?S!==void 0?r.value.map(O=>_==null?void 0:_.findIndex(F=>F===O)).filter(O=>O>=0).map(O=>S[O]):r.value:[],[r.value,S,_]);m.useEffect(()=>{(!Array.isArray(r.value)||k.length!==r.value.length)&&o(x({},r,{value:k.map(w)}))},[r,k,o,w]);const M=m.useCallback((R,O)=>{o(x({},r,{value:O.map(w)}))},[o,r,w]);return T.jsx(vy,x({multiple:!0,options:S,isOptionEqualToValue:A,filterOptions:lBe,id:b,value:k,onChange:M,getOptionLabel:C,renderTags:(R,O)=>R.map((F,N)=>T.jsx(y.slots.baseChip,x({variant:"outlined",size:"small",label:C(F)},O({index:N})))),renderInput:R=>{var O;return T.jsx(y.slots.baseTextField,x({},R,{label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:x({},R.InputLabelProps,{shrink:!0}),inputRef:s,type:"singleSelect"},g,(O=y.slotProps)==null?void 0:O.baseTextField))}},p))}const cBe=["hideMenu","options"],dBe=["hideMenu","options"];function fBe(e){const t=kt(),{hideMenu:n,options:r}=e,o=de(e,cBe);return T.jsx(io,x({onClick:()=>{t.current.exportDataAsCsv(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))}function hBe(e){const t=kt(),{hideMenu:n,options:r}=e,o=de(e,dBe);return T.jsx(io,x({onClick:()=>{t.current.exportDataAsPrint(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))}const pBe=["className","selectedRowCount"],mBe=e=>{const{classes:t}=e;return Re({root:["selectedRowCount"]},At,t)},gBe=gr("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),yBe=m.forwardRef(function(t,n){const{className:r,selectedRowCount:o}=t,i=de(t,pBe),s=kt(),a=nt(),l=mBe(a),u=s.current.getLocaleText("footerRowSelected")(o);return T.jsx(gBe,x({ref:n,className:xe(l.root,r),ownerState:a},i,{children:u}))}),vBe=m.forwardRef(function(t,n){var r,o;const i=kt(),s=nt(),a=qe(i,zFe),l=qe(i,cVe),u=qe(i,sS),c=!s.hideFooterSelectedRowCount&&l>0?T.jsx(yBe,{selectedRowCount:l}):T.jsx("div",{}),d=!s.hideFooterRowCount&&!s.pagination?T.jsx(s.slots.footerRowCount,x({},(r=s.slotProps)==null?void 0:r.footerRowCount,{rowCount:a,visibleRowCount:u})):null,f=s.pagination&&!s.hideFooterPagination&&s.slots.pagination&&T.jsx(s.slots.pagination,x({},(o=s.slotProps)==null?void 0:o.pagination));return T.jsxs(xNe,x({ref:n},t,{children:[c,d,f]}))});function bBe(){var e,t;const n=nt();return T.jsxs(m.Fragment,{children:[T.jsx(n.slots.preferencesPanel,x({},(e=n.slotProps)==null?void 0:e.preferencesPanel)),n.slots.toolbar&&T.jsx(n.slots.toolbar,x({},(t=n.slotProps)==null?void 0:t.toolbar))]})}const wBe=m.forwardRef(function(t,n){return T.jsx(D2,x({ref:n},t,{children:T.jsx(Qn,{})}))}),CBe=m.forwardRef(function(t,n){const o=kt().current.getLocaleText("noRowsLabel");return T.jsx(D2,x({ref:n},t,{children:o}))}),xBe=he(Uhe)(({theme:e})=>({[`& .${$c.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${$c.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),SBe=m.forwardRef(function(t,n){const r=kt(),o=nt(),i=qe(r,$i),s=qe(r,sS),a=m.useMemo(()=>{var h,p;
3725return(h=(p=o.rowCount)!=null?p:s)!=null?h:0},[o.rowCount,s]),l=m.useMemo(()=>Math.floor(a/(i.pageSize||1)),[a,i.pageSize]),u=m.useCallback(h=>{const p=Number(h.target.value);r.current.setPageSize(p)},[r]),c=m.useCallback((h,p)=>{r.current.setPage(p)},[r]),f=(h=>{for(let p=0;p<o.pageSizeOptions.length;p+=1){const g=o.pageSizeOptions[p];if(typeof g=="number"){if(g===h)return!0}else if(g.value===h)return!0}return!1})(i.pageSize)?o.pageSizeOptions:[];return T.jsx(xBe,x({ref:n,component:"div",count:a,page:i.page<=l?i.page:l,rowsPerPageOptions:f,rowsPerPage:i.pageSize,onPageChange:c,onRowsPerPageChange:u},r.current.getLocaleText("MuiTablePagination"),t))}),_Be=["className","rowCount","visibleRowCount"],EBe=e=>{const{classes:t}=e;return Re({root:["rowCount"]},At,t)},IBe=gr("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),ABe=m.forwardRef(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,s=de(t,_Be),a=kt(),l=nt(),u=EBe(l);if(o===0)return null;const c=i<o?a.current.getLocaleText("footerTotalVisibleRows")(i,o):o.toLocaleString();return T.jsxs(IBe,x({ref:n,className:xe(u.root,r),ownerState:l},s,{children:[a.current.getLocaleText("footerTotalRows")," ",c]}))}),M1=(e,t)=>{let n,r;return t.pagination&&t.paginationMode==="client"?(r=F2(e),n=uVe(e)):(n=Ju(e),n.length===0?r=null:r={firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},Td=(e,t)=>{const n=M1(e,t);return m.useMemo(()=>({rows:n.rows,range:n.range}),[n.rows,n.range])},wk={current:null};function dv(e){return e.isInternal=!0,e}function D1(e){return e!==void 0&&e.isInternal===!0}function kBe(e){return dv((t,n)=>{const r=e(t,n);return r&&(o=>r(o.value,o.row,n,wk.current))})}function fv(e){return e.map(t=>x({},t,{getApplyFilterFn:kBe(t.getApplyFilterFnV7),getApplyFilterFnV7:dv(t.getApplyFilterFnV7)}))}function Rq(e){return dv((t,n,r)=>{const o=e(t,n,r);return o&&(i=>o(i.value,i.row,n,r))})}function Oq(e){return{current:e.current.getPublicApi()}}let Kp;function PBe(){if(Kp!==void 0)return Kp;try{Kp=new Function("return true")()}catch{Kp=!1}return Kp}const Ck=(e,t)=>{const n=x({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=vp(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},TBe=Ba(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),RBe=Ba("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),OBe=Ba("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),Mq=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?(TBe(),o=[e.items[0]]):o=e.items;const i=r&&o.some(a=>a.id==null),s=o.some(a=>a.operator==null);return i&&RBe(),s&&OBe(),s||i?x({},e,{items:o.map(a=>Ck(a,n))}):e.items!==o?x({},e,{items:o}):e},q4=(e,t,n)=>r=>x({},r,{filterModel:Mq(e,t,n)}),yu=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,Dq=(e,t)=>{if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){var o;const h=n.valueParser;r=Array.isArray(e.value)?(o=e.value)==null?void 0:o.map(p=>h(p)):h(e.value)}else r=e.value;const{ignoreDiacritics:i}=t.current.rootProps;i&&(r=yu(r));const s=x({},e,{value:r}),a=n.filterOperators;if(!(a!=null&&a.length))throw new Error(`MUI: No filter operators found for column '${n.field}'.`);const l=a.find(h=>h.value===s.operator);if(!l)throw new Error(`MUI: No filter operator found for column '${n.field}' and operator value '${s.operator}'.`);const u=!D1(l.getApplyFilterFn),c=!D1(l.getApplyFilterFnV7),d=Oq(t);if(l.getApplyFilterFnV7&&!(u&&!c)){const h=l.getApplyFilterFnV7(s,n);return typeof h!="function"?null:{v7:!0,item:s,fn:p=>{let g=t.current.getRowValue(p,n);return i&&(g=yu(g)),h(g,p,n,d)}}}const f=l.getApplyFilterFn(s,n);return typeof f!="function"?null:{v7:!1,item:s,fn:h=>{const p=t.current.getCellParams(h,s.field);wk.current=d,i&&(p.value=yu(p.value));const g=f(p);return wk.current=null,g}}};let K4=1;const MBe=(e,t,n)=>{const{items:r}=e,o=r.map(a=>Dq(a,t)).filter(a=>!!a);if(o.length===0)return null;if(n||!PBe())return(a,l)=>{const u={};for(let c=0;c<o.length;c+=1){const d=o[c];(!l||l(d.item.field))&&(u[d.item.id]=d.v7?d.fn(a):d.fn(t.current.getRowId(a)))}return u};const i=new Function("getRowId","appliers","row","shouldApplyFilter",`"use strict";
3726${o.map((a,l)=>`const shouldApply${l} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(a.item.field)});`).join(`
3727`)}
3728
3729const result$$ = {
3730${o.map((a,l)=>`  ${JSON.stringify(String(a.item.id))}: !shouldApply${l}
3731    ? false
3732    : ${a.v7?`appliers[${l}].fn(row)`:`appliers[${l}].fn(getRowId(row))`},`).join(`
3733`)}
3734};
3735
3736return result$$;`.replaceAll("$$",String(K4)));return K4+=1,(a,l)=>i(t.current.getRowId,o,a,l)},DBe=(e,t)=>{var n,r,o;const i=(n=(r=e.quickFilterValues)==null?void 0:r.filter(Boolean))!=null?n:[];if(i.length===0)return null;const a=((o=e.quickFilterExcludeHiddenColumns)!=null?o:!1)?nS(t):dl(t),l=[],{ignoreDiacritics:u}=t.current.rootProps,c=Oq(t);return a.forEach(d=>{const f=t.current.getColumn(d),h=f==null?void 0:f.getApplyQuickFilterFn,p=f==null?void 0:f.getApplyQuickFilterFnV7,g=!D1(h),b=!D1(p);p&&!(g&&!b)?l.push({column:f,appliers:i.map(y=>{const v=u?yu(y):y;return{v7:!0,fn:p(v,f,c)}})}):h&&l.push({column:f,appliers:i.map(y=>{const v=u?yu(y):y;return{v7:!1,fn:h(v,f,c)}})})}),function(f,h){const p={},g={};e:for(let y=0;y<i.length;y+=1){const v=i[y];for(let w=0;w<l.length;w+=1){const{column:C,appliers:A}=l[w],{field:S}=C;if(h&&!h(S))continue;const _=A[y];let k=t.current.getRowValue(f,C);if(_.fn!==null)if(_.v7){if(u&&(k=yu(k)),_.fn(k,f,C,c)){p[v]=!0;continue e}}else{var b;const M=(b=g[S])!=null?b:t.current.getCellParams(t.current.getRowId(f),S);if(u&&(M.value=yu(M.value)),g[S]=M,_.fn(M)){p[v]=!0;continue e}}}p[v]=!1}
3736return p}},$Be=(e,t,n)=>{const r=MBe(e,t,n),o=DBe(e,t);return function(s,a,l){var u,c;l.passingFilterItems=(u=r==null?void 0:r(s,a))!=null?u:null,l.passingQuickFilterValues=(c=o==null?void 0:o(s,a))!=null?c:null}},Q4=e=>e!=null,FBe=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>Dq(r,t)!==null)),e.cleanedFilterItems),LBe=(e,t,n,r,o)=>{const i=FBe(o,r,n.items),s=e.filter(Q4),a=t.filter(Q4);if(s.length>0){var l;const c=f=>s.some(h=>h[f.id]);if(((l=n.logicOperator)!=null?l:ty().logicOperator)===jo.And){if(!i.every(c))return!1}else if(!i.some(c))return!1}if(a.length>0&&n.quickFilterValues!=null){var u;const c=f=>a.some(h=>h[f]);if(((u=n.quickFilterLogicOperator)!=null?u:ty().quickFilterLogicOperator)===jo.And){if(!n.quickFilterValues.every(c))return!1}else if(!n.quickFilterValues.some(c))return!1}return!0},Y4=dv(e=>{if(!e)return null;const t=new RegExp(v0(e),"i");return(n,r,o,i)=>{let s=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(s=yu(s)),s!=null?t.test(s.toString()):!1}}),NBe=(e=!1)=>fv([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(v0(n),"i");return o=>o!=null?r.test(String(o)):!1},InputComponent:Xs},{value:"equals",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?r.compare(n,o.toString())===0:!1},InputComponent:Xs},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${v0(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Xs},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${v0(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Xs},{value:"isEmpty",getApplyFilterFnV7:()=>t=>t===""||t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>t=>t!==""&&t!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:Tq}]),Ts={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:vVe,type:"string",align:"left",filterOperators:NBe(),renderEditCell:WLe,getApplyQuickFilterFn:Rq(Y4),getApplyQuickFilterFnV7:Y4},VBe=()=>fv([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t=e.value==="true";return n=>!!n===t},InputComponent:rBe}]);function BBe({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")}const jBe=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},$q=x({},Ts,{type:"boolean",align:"center",headerAlign:"center",renderCell:OLe,renderEditCell:FLe,sortComparator:xq,valueFormatter:BBe,filterOperators:VBe(),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>jBe(e)}),ql="__check__",Cp=x({},$q,{field:ql,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>O1(e.api.state,e.api.instanceId)[e.id]!==void 0,renderHeader:e=>T.jsx(OVe,x({},e)),renderCell:e=>T.jsx(PVe,x({},e))}),cS="actions",zBe=x({},Ts,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:cNe,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0}),B2="__detail_panel_toggle__",xo=e=>e.editRows,UBe=["selected","hovered","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","isLastVisible","focusedCellColumnIndexNotInRange","isNot
3736Visible","focusedCell","tabbableCell","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],HBe=e=>{const{editable:t,editing:n,selected:r,isLastVisible:o,rowHeight:i,classes:s}=e;return Re({root:["row",r&&"selected",t&&"row--editable",n&&"row--editing",o&&"row--lastVisible",i==="auto"&&"row--dynamicHeight"]},At,s)};function WBe({width:e}){if(!e)return null;const t={width:e};return T.jsx("div",{className:`${re.cell} ${re.withBorderColor}`,style:t})}const GBe=m.forwardRef(function(t,n){const{selected:r,hovered:o,rowId:i,row:s,index:a,style:l,position:u,rowHeight:c,className:d,visibleColumns:f,renderedColumns:h,containerWidth:p,firstColumnToRender:g,isLastVisible:b=!1,focusedCellColumnIndexNotInRange:y,isNotVisible:v,focusedCell:w,onClick:C,onDoubleClick:A,onMouseEnter:S,onMouseLeave:_,onMouseOut:k,onMouseOver:M}=t,R=de(t,UBe),O=kt(),F=m.useRef(null),N=nt(),V=Td(O,N),$=qe(O,A2),D=qe(O,Ri),L=qe(O,iS),P=qe(O,lv),B=qe(O,xo),E=bt(F,n),z=a+P+2,H={selected:r,hovered:o,isLastVisible:b,classes:N.classes,editing:O.current.getRowMode(i)===fn.Edit,editable:N.editMode===Ra.Row,rowHeight:c},j=HBe(H);m.useLayoutEffect(()=>{c==="auto"&&F.current&&typeof ResizeObserver>"u"&&O.current.unstable_storeRowHeightMeasurement(i,F.current.clientHeight,u)},[O,c,i,u]),m.useLayoutEffect(()=>{if(V.range){const le=O.current.getRowIndexRelativeToVisibleRows(i);le!=null&&O.current.unstable_setLastMeasuredRowIndex(le)}const Z=F.current;if(!Z||c!=="auto"||typeof ResizeObserver>"u")return;const W=new ResizeObserver(le=>{const[_e]=le,ne=_e.borderBoxSize&&_e.borderBoxSize.length>0?_e.borderBoxSize[0].blockSize:_e.contentRect.height;O.current.unstable_storeRowHeightMeasurement(i,ne,u)});return W.observe(Z),()=>W.disconnect()},[O,V.range,a,c,i,u]);const G=m.useCallback((Z,X)=>W=>{uv(W)||O.current.getRow(i)&&(O.current.publishEvent(Z,O.current.getRowParams(i),W),X&&X(W))},[O,i]),Q=m.useCallback(Z=>{const X=gLe(Z.target,re.cell),W=X==null?void 0:X.getAttribute("data-field");if(W){if(W===Cp.field||W===B2||W==="__reorder__"||O.current.getCellMode(i,W)===nn.Edit)return;const le=O.current.getColumn(W);if((le==null?void 0:le.type)===cS)return}G("rowClick",C)(Z)},[O,C,G,i]),{slots:ee,slotProps:Y,disableColumnReorder:se}=N,fe=ee.cell===vk?vk:ILe,ve=N.rowReordering,oe=(Z,X)=>{var W,le;const _e=se&&Z.disableReorder||!ve&&!!D.length&&L>1&&Object.keys(B).length>0,ne=(W=(le=B[i])==null?void 0:le[Z.field])!=null?W:null;let te=!1;return y!==void 0&&f[y].field===Z.field&&(te=!0),T.jsx(fe,x({column:Z,width:X.width,rowId:i,height:c,showRightBorder:X.showRightBorder,align:Z.align||"left",colIndex:X.indexRelativeToAllColumns,colSpan:X.colSpan,disableDragEvents:_e,editCellState:ne,isNotVisible:te},Y==null?void 0:Y.cell),Z.field)},ye=qe(O,()=>x({},O.current.unstable_getRowInternalSizes(i)),I2);let we=c;if(we==="auto"&&ye){let Z=0;const X=Object.entries(ye).reduce((W,[le,_e])=>/^base[A-Z]/.test(le)?(Z+=1,_e>W?_e:W):W,0);X>0&&Z>1&&(we=X)}const me=m.useMemo(()=>{if(v)return{opacity:0,width:0,height:0};const Z=x({},l,{maxHeight:c==="auto"?"none":c,minHeight:we});if(ye!=null&&ye.spacingTop){const X=N.rowSpacingType==="border"?"borderTopWidth":"marginTop";Z[X]=ye.spacingTop}if(ye!=null&&ye.spacingBottom){const X=N.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let W=Z[X];typeof W!="number"&&(W=parseInt(W||"0",10)),W+=ye.spacingBottom,Z[X]=W}return Z},[v,c,l,we,ye,N.rowSpacingType]),be=O.current.unstable_applyPipeProcessors("rowClassName",[],i);if(typeof N.getRowClassName=="function"){var ie;const Z=a-(((ie=V.range)==null?void 0:ie.firstRowIndex)||0),X=x({},O.current.getRowParams(i),{isFirstVisible:Z===0,isLastVisible:Z===V.rows.length-1,indexRelativeToCurrentPage:Z});be.push(N.getRowClassName(X))}const pe=nVe(1e4,20,80),U=O.current.getRowNode(i);if(!U)return null;const q=U.type,K=[];for(let Z=0;Z<h.length;Z+=1){const X=h[Z];let W=g+Z;y!==void 0&&w&&(f[y].field===X.field?W=y:W-=1);const le=O.current.unstable_getCellColSpanInfo(i,W);if(le&&!le.spannedByColSpan)if(q!=="skeletonRow"){const{colSpan:_e,width:ne}=le.cellProps,te={width:ne,colSpan:_e,showRightBorder:N.showCellVerticalBorder,indexRelativeToAllColumns:W};K.push(oe(X,te))}else{const{width:_e}=le.cellProps,ne=Math.round(pe());K.push(T.jsx(ee.skeletonCell,{width:_e,contentWidth:ne,field:X.field,align:X.align},X.field))}}const ae=p-$,ue=s?{onClick:Q,onDoubleClick:G("rowDoubleClick",A),onMouseEnter:G("rowMouseEnter",S),onMouseLeave:G("rowMouseLeave",_),onMouseOut:G("rowMouseOut",k),onMouseOver:G("rowMouseOver",M)}:null;return T.jsxs("div",x({ref:E,"data-id":i,"data-rowindex":a,role:"row",className:xe(...be,j.root,d,o&&"Mui-hovered"),"aria-rowindex":z,"aria-selected":r,style:me},ue,R,{children:[K,ae>0&&T.jsx(WBe,{width:ae})]}))}),qBe=uS(GBe),KBe=/(\d+)-(\d+)-(\d+)/,QBe=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function Gd(e,t,n,r){if(!e.value)return null;const[o,i,s,a,l]=e.value.match(n?QBe:KBe).slice(1).map(Number),u=new Date(o,i-1,s,a||0,l||0).getTime();return c=>
3736{if(!c)return!1;if(r)return t(c.getTime(),u);const f=new Date(c).setHours(n?c.getHours():0,n?c.getMinutes():0,0,0);return t(f,u)}}const Fq=e=>fv([{value:"is",getApplyFilterFnV7:t=>Gd(t,(n,r)=>n===r,e),InputComponent:Wd,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFnV7:t=>Gd(t,(n,r)=>n!==r,e),InputComponent:Wd,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFnV7:t=>Gd(t,(n,r)=>n>r,e),InputComponent:Wd,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFnV7:t=>Gd(t,(n,r)=>n>=r,e),InputComponent:Wd,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFnV7:t=>Gd(t,(n,r)=>n<r,e,!e),InputComponent:Wd,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFnV7:t=>Gd(t,(n,r)=>n<=r,e),InputComponent:Wd,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFnV7:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>t=>t!=null,requiresFilterValue:!1}]);function Lq({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(`
3737`))}function YBe({value:e,field:t,id:n}){return e?(Lq({value:e,columnType:"date",rowId:n,field:t}),e.toLocaleDateString()):""}function XBe({value:e,field:t,id:n}){return e?(Lq({value:e,columnType:"dateTime",rowId:n,field:t}),e.toLocaleString()):""}const JBe=x({},Ts,{type:"date",sortComparator:Sq,valueFormatter:YBe,filterOperators:Fq(),renderEditCell:iq,pastedValueParser:e=>new Date(e)}),ZBe=x({},Ts,{type:"dateTime",sortComparator:Sq,valueFormatter:XBe,filterOperators:Fq(!0),renderEditCell:iq,pastedValueParser:e=>new Date(e)}),Xl=e=>e==null?null:Number(e),X4=dv(e=>e==null||Number.isNaN(e)||e===""?null:t=>Xl(t)===Xl(e)),e5e=()=>fv([{value:"=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>Xl(t)===e.value,InputComponent:Xs,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>Xl(t)!==e.value,InputComponent:Xs,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Xl(t)>e.value,InputComponent:Xs,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Xl(t)>=e.value,InputComponent:Xs,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Xl(t)<e.value,InputComponent:Xs,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Xl(t)<=e.value,InputComponent:Xs,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:Tq,InputComponentProps:{type:"number"}}]),t5e=x({},Ts,{type:"number",align:"right",headerAlign:"right",sortComparator:xq,valueParser:e=>e===""?null:Number(e),valueFormatter:({value:e})=>hq(e)?e.toLocaleString():e||"",filterOperators:e5e(),getApplyQuickFilterFn:Rq(X4),getApplyQuickFilterFnV7:X4}),qd=e=>e==null||!$2(e)?e:e.value,n5e=()=>fv([{value:"is",getApplyFilterFnV7:e=>e.value==null||e.value===""?null:t=>qd(t)===qd(e.value),InputComponent:W4},{value:"not",getApplyFilterFnV7:e=>e.value==null||e.value===""?null:t=>qd(t)!==qd(e.value),InputComponent:W4},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(qd);return n=>t.includes(qd(n))},InputComponent:uBe}]),r5e=e=>typeof e[0]=="object",o5e=e=>$2(e)?e.value:e,i5e=e=>$2(e)?e.label:String(e),s5e=x({},Ts,{type:"singleSelect",getOptionLabel:i5e,getOptionValue:o5e,valueFormatter(e){const{id:t,field:n,value:r,api:o}=e,i=e.api.getColumn(n);if(!jc(i))return"";let s;if(typeof i.valueOptions=="function"?s=i.valueOptions({id:t,row:t?o.getRow(t):null,field:n}):s=i.valueOptions,r==null)return"";if(!s)return r;if(!r5e(s))return i.getOptionLabel(r);const a=s.find(l=>i.getOptionValue(l)===r);return a?i.getOptionLabel(a):""},renderEditCell:nNe,filterOperators:n5e(),pastedValueParser:(e,t)=>{const n=t.colDef,r=n.valueOptions,o=typeof r=="function"?r({field:n.field}):r||[],i=n.getOptionValue;if(o.find(a=>i(a)===e))return e}}),Nq="__default__",a5e=()=>({string:Ts,number:t5e,date:JBe,dateTime:ZBe,boolean:$q,singleSelect:s5e,[cS]:zBe,[Nq]:Ts}),Vq=["maxWidth","minWidth","width","flex"];function l5e({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(s=>s.field)),o={all:{},frozenFields:[],freeze:s=>{const a=o.all[s];a&&a.frozen!==!0&&(o.all[s].frozen=!0,o.frozenFields.push(s))}};function i(){if(o.frozenFields.length===r.size)return;const s={min:{},max:{}};let a=e,l=t,u=0;o.frozenFields.forEach(c=>{a-=o.all[c].computedWidth,l-=o.all[c].flex});for(let c=0;c<n.length;c+=1){const d=n[c];if(o.all[d.field]&&o.all[d.field].frozen===!0)continue;let h=a/l*d.flex;h<d.minWidth?(u+=d.minWidth-h,h=d.minWidth,s.min[d.field]=!0):h>d.maxWidth&&(u+=d.maxWidth-h,h=d.maxWidth,s.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:h,flex:d.flex}}
3737u<0?Object.keys(s.max).forEach(c=>{o.freeze(c)}):u>0?Object.keys(s.min).forEach(c=>{o.freeze(c)}):n.forEach(({field:c})=>{o.freeze(c)}),i()}return i(),o.all}const xk=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(a=>{const l=x({},e.lookup[a]);if(e.columnVisibilityModel[a]===!1)l.computedWidth=0;else{let u;l.flex&&l.flex>0?(r+=l.flex,u=0,i.push(l)):u=Mh(l.width||Ts.width,l.minWidth||Ts.minWidth,l.maxWidth||Ts.maxWidth),o+=u,l.computedWidth=u}n[a]=l});const s=Math.max(t-o,0);if(r>0&&t>0){const a=l5e({initialFreeSpace:s,totalFlexUnits:r,flexColumns:i});Object.keys(a).forEach(l=>{n[l].computedWidth=a[l].computedWidth})}return x({},e,{lookup:n})},u5e=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},s=[];for(let c=0;c<n.length;c+=1){const d=n[c];e.lookup[d]&&(i[d]=!0,s.push(d))}const a=s.length===0?e.orderedFields:[...s,...e.orderedFields.filter(c=>!i[c])],l=x({},e.lookup);for(let c=0;c<o.length;c+=1){const d=o[c],f=x({},l[d],{hasBeenResized:!0});Object.entries(r[d]).forEach(([h,p])=>{f[h]=p===-1?1/0:p}),l[d]=f}return x({},e,{orderedFields:a,lookup:l})};function J4(e,t){let n=e[Nq];return t&&e[t]&&(n=e[t]),n}const af=({apiRef:e,columnsToUpsert:t,initialState:n,columnTypes:r,columnVisibilityModel:o=Es(e),keepOnlyColumnsToUpsert:i=!1})=>{var s,a,l;const u=!e.current.state.columns;let c;if(u)c={orderedFields:[],lookup:{},columnVisibilityModel:o};else{const p=Bc(e.current.state);c={orderedFields:i?[]:[...p.orderedFields],lookup:x({},p.lookup),columnVisibilityModel:o}}let d={};i&&!u&&(d=Object.keys(c.lookup).reduce((p,g)=>x({},p,{[g]:!1}),{})),t.forEach(p=>{const{field:g}=p;d[g]=!0;let b=c.lookup[g];b==null?(b=x({},J4(r,p.type),{field:g,hasBeenResized:!1}),c.orderedFields.push(g)):i&&c.orderedFields.push(g),b&&b.type!==p.type&&(b=x({},J4(r,p.type),{field:g}));let y=b.hasBeenResized;Vq.forEach(v=>{p[v]!==void 0&&(y=!0,p[v]===-1&&(p[v]=1/0))}),c.lookup[g]=x({},b,p,{hasBeenResized:y})}),i&&!u&&Object.keys(c.lookup).forEach(p=>{d[p]||delete c.lookup[p]});const f=e.current.unstable_applyPipeProcessors("hydrateColumns",c),h=u5e(f,n);return xk(h,(s=(a=(l=e.current).getRootDimensions)==null||(a=a.call(l))==null?void 0:a.viewportInnerSize.width)!=null?s:0)},Z4=e=>t=>x({},t,{columns:e});function Sk({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let s=n;s<r;s+=1)if(o[s]){const l=o[s].id,u=t.current.unstable_getCellColSpanInfo(l,e);u&&u.spannedByColSpan&&(i=u.leftVisibleCellIndex)}return i}function c5e({firstColumnIndex:e,minColumnIndex:t,columnBuffer:n,firstRowToRender:r,lastRowToRender:o,apiRef:i,visibleRows:s}){const a=Math.max(e-n,t);return Sk({firstColumnToRender:a,apiRef:i,firstRowToRender:r,lastRowToRender:o,visibleRows:s})}function j2(e,t){const n=wp(e),r=lv(e);return Math.floor(t*n)*((r??0)+1)}const d5e=["style"],f5e=["style"];function nh(e,t,n=0,r=t.length){if(t.length<=0)return-1;if(n>=r)return n;const o=n+Math.floor((r-n)/2),i=t[o];return e<=i?nh(e,t,n,o):nh(e,t,o+1,r)}function h5e(e,t,n){let r=1;for(;n<t.length&&Math.abs(t[n])<e;)n+=r,r*=2;return nh(e,t,Math.floor(n/2),Math.min(n,t.length))}const Jl=({firstIndex:e,lastIndex:t,buffer:n,minFirstIndex:r,maxLastIndex:o})=>[Mh(e-n,r,o),Mh(t+n,r,o)],Bq=(e,t)=>e===t?!0:e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,p5e={maxSize:3},m5e=e=>{var t,n;const r=Xu(),o=nt(),i=qe(r,Fr),s=qe(r,SVe),a=qe(r,Iq),{ref:l,onRenderZonePositioning:u,renderZoneMinColumnIndex:c=0,renderZoneMaxColumnIndex:d=i.length,getRowProps:f}=e,h=Zn(),p=qe(r,Oh),g=qe(r,A2),b=qe(r,ri),y=qe(r,A1),v=qe(r,ry),w=qe(r,O1),C=Td(r,o),A=m.useRef(null),S=m.useRef(null),_=bt(l,S),[k,M]=m.useState(null),R=m.useRef(k),O=m.useRef({top:0,left:0}),[F,N]=m.useState({width:null,height:null}),V=m.useRef(g),[$,D]=m.useState(null),L=m.useRef(Object.create(null)),P=m.useRef(),B=m.useRef(),E=m.useRef(GC((ie,pe,U,q,K,ae)=>{let ue;const Z=ie.slice(pe,U);return ae>-1&&(pe>ae&&ae>=q||U<ae&&ae<K)&&(ue=ae),{focusedCellColumnIndexNotInRange:ue,renderedColumns:Z}},p5e)),z=m.useMemo(()=>b!==null?i.findIndex(ie=>ie.field===b.field):-1,[b,i]),H=m.useCallback(ie=>{var pe,U;const q=r.current.getLastMeasuredRowIndex();let K=q===1/0;(pe=C.range)!=null&&pe.lastRowIndex&&!K&&(K=q>=C.range.lastRowIndex);const ae=Mh(q-(((U=C.range)==null?void 0:U.firstRowIndex)||0),0,v.positions.length);return K||v.positions[ae]>=ie?nh(ie,v.positions):h5e(ie,v.positions,ae)},[r,(t=C.range)==null?void 0:t.firstRowIndex,(n=C.range)==null?void 0:n.lastRowIndex,v.positions]),j=m.useCallback(()=>
3737{if(!s)return{firstRowIndex:0,lastRowIndex:C.rows.length,firstColumnIndex:0,lastColumnIndex:i.length};const{top:ie,left:pe}=O.current,U=Math.min(H(ie),v.positions.length-1),q=o.autoHeight?U+C.rows.length:H(ie+F.height);let K=0,ae=p.length;if(a){let ue=!1;const[Z,X]=Jl({firstIndex:U,lastIndex:q,minFirstIndex:0,maxLastIndex:C.rows.length,buffer:o.rowBuffer});for(let W=Z;W<X&&!ue;W+=1){const le=C.rows[W];ue=r.current.rowHasAutoHeight(le.id)}ue||(K=nh(Math.abs(pe),p),ae=nh(Math.abs(pe)+F.width,p))}return{firstRowIndex:U,lastRowIndex:q,firstColumnIndex:K,lastColumnIndex:ae}},[s,a,H,v.positions.length,o.autoHeight,o.rowBuffer,C.rows,p,i.length,r,F]);Bt(()=>{s?(S.current.scrollLeft=0,S.current.scrollTop=0):A.current.style.transform="translate3d(0px, 0px, 0px)"},[s]),Bt(()=>{N({width:S.current.clientWidth,height:S.current.clientHeight})},[v.currentPageTotalHeight]);const G=m.useCallback(()=>{S.current&&N({width:S.current.clientWidth,height:S.current.clientHeight})},[]);rt(r,"debouncedResize",G);const Q=m.useCallback(ie=>{const[pe,U]=Jl({firstIndex:ie.firstRowIndex,lastIndex:ie.lastRowIndex,minFirstIndex:0,maxLastIndex:C.rows.length,buffer:o.rowBuffer}),[q]=Jl({firstIndex:ie.firstColumnIndex,lastIndex:ie.lastColumnIndex,minFirstIndex:c,maxLastIndex:d,buffer:o.columnBuffer}),K=Sk({firstColumnToRender:q,apiRef:r,firstRowToRender:pe,lastRowToRender:U,visibleRows:C.rows}),ae=h.direction==="ltr"?1:-1,ue=ry(r.current.state).positions[pe],Z=ae*Oh(r)[K];A.current.style.transform=`translate3d(${Z}px, ${ue}px, 0px)`,typeof u=="function"&&u({top:ue,left:Z})},[r,C.rows,u,c,d,o.columnBuffer,o.rowBuffer,h.direction]),ee=m.useCallback(()=>R.current,[]),Y=m.useCallback(ie=>{if(R.current&&Bq(ie,R.current)){Q(ie);return}M(ie),Q(ie);const[pe,U]=Jl({firstIndex:ie.firstRowIndex,lastIndex:ie.lastRowIndex,minFirstIndex:0,maxLastIndex:C.rows.length,buffer:o.rowBuffer});r.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:pe,lastRowToRender:U}),R.current=ie},[r,M,R,C.rows.length,o.rowBuffer,Q]);Bt(()=>{if(F.width==null)return;const ie=j();Y(ie);const{top:pe,left:U}=O.current,q={top:pe,left:U,renderContext:ie};r.current.publishEvent("scrollPositionChange",q)},[r,j,F.width,Y]);const se=Vt(ie=>{const{scrollTop:pe,scrollLeft:U}=ie.currentTarget;if(O.current.top=pe,O.current.left=U,!R.current||pe<0||h.direction==="ltr"&&U<0||h.direction==="rtl"&&U>0)return;const q=s?j():R.current,K=Math.abs(q.firstRowIndex-R.current.firstRowIndex),ae=Math.abs(q.lastRowIndex-R.current.lastRowIndex),ue=Math.abs(q.firstColumnIndex-R.current.firstColumnIndex),Z=Math.abs(q.lastColumnIndex-R.current.lastColumnIndex),X=K>=o.rowThreshold||ae>=o.rowThreshold||ue>=o.columnThreshold||Z>=o.columnThreshold||V.current!==g;r.current.publishEvent("scrollPositionChange",{top:pe,left:U,renderContext:X?q:R.current},ie),X&&(md.flushSync(()=>{Y(q)}),V.current=g)}),fe=Vt(ie=>{r.current.publishEvent("virtualScrollerWheel",{},ie)}),ve=Vt(ie=>{r.current.publishEvent("virtualScrollerTouchMove",{},ie)}),oe=m.useMemo(()=>b!==null?C.rows.findIndex(ie=>ie.id===b.id):-1,[b,C.rows]);rt(r,"rowMouseOver",(ie,pe)=>{var U;pe.currentTarget.contains(pe.relatedTarget)||D((U=ie.id)!=null?U:null)}),rt(r,"rowMouseOut",(ie,pe)=>{pe.currentTarget.contains(pe.relatedTarget)||D(null)});const ye=(ie={renderContext:k})=>{var pe;const{onRowRender:U,renderContext:q,minFirstColumn:K=c,maxLastColumn:ae=d,availableSpace:ue=F.width,rowIndexOffset:Z=0,position:X="center"}=ie;if(!q||ue==null)return null;const W=s?o.rowBuffer:0,le=s?o.columnBuffer:0,[_e,ne]=Jl({firstIndex:q.firstRowIndex,lastIndex:q.lastRowIndex,minFirstIndex:0,maxLastIndex:C.rows.length,buffer:W}),te=[];if(ie.rows)ie.rows.forEach(jt=>{te.push(jt),r.current.calculateColSpan({rowId:jt.id,minFirstColumn:K,maxLastColumn:ae,columns:i})});else{if(!C.range)return null;for(let jt=_e;jt<ne;jt+=1){const zt=C.rows[jt];te.push(zt),r.current.calculateColSpan({rowId:zt.id,minFirstColumn:K,maxLastColumn:ae,columns:i})}}let ke=!1;if(oe>-1){const jt=C.rows[oe];(_e>oe||ne<oe)&&(ke=!0,oe>_e?te.push(jt):te.unshift(jt),r.current.calculateColSpan({rowId:jt.id,minFirstColumn:K,maxLastColumn:ae,columns:i}))}const[Ve,Fe]=Jl({firstIndex:q.firstColumnIndex,lastIndex:q.lastColumnIndex,minFirstIndex:K,maxLastIndex:ae,buffer:le}),Ie=Sk({firstColumnToRender:Ve,apiRef:r,firstRowToRender:_e,lastRowToRender:ne,visibleRows:C.rows});let Be=!1;(Ie>z||Fe<z)&&(Be=!0);const{focusedCellColumnIndexNotInRange:Ee,renderedColumns:Te}=E.current(i,Ie,Fe,K,ae,Be?z:-1),We=((pe=o.slotProps)==null?void 0:pe.row)||{},{style:lt}=We,xt=de(We,d5e);(P.current!==f||B.current!==lt)&&(L.current=Object.create(null));const en=[];let Bn=!1;for(let jt=0;jt<te.length;jt+=1){var dn;const{id:zt,model:is}=te[jt],ss=ke&&b.id===zt,Ls=ke?_e+jt===C.rows.length:_e+jt===C.rows.length-1,Ur=r.current.rowHasAutoHeight(zt)?"auto":r.current.unstable_getRowHeight(zt);let In;w[zt]==null?In=!1:In=r.current.isRowSelectable(zt),U&&U(zt);const tn=b!==null&&b.id===zt?b.field:null,er=Ee!==void 0&&i[Ee],vr=er&&tn?[er,...Te]:Te;let Oo=null;y!==null&&y.id===zt&&(Oo=r.current.getCellParams(zt,y.field).cellMode==="view"?y.field:null);const Ns=typeof f=="function"&&f(zt,is)||{},{style:yo}=Ns,ki=de(Ns,f5e);if(!L.current[zt]){const Ar=x({},yo,lt);L.current[zt]=Ar}let Hr=Z+((C==null||(dn=C.range)==null?void 0:dn.firstRowIndex)||0)+_e+jt;ke&&(b==null?void 0:b.id)===zt?(Hr=oe,Bn=!0):Bn&&(Hr-=1),en.push(T.jsx(o.slots.row,x({row:is,rowId:zt,focusedCellColumnIndexNotInRange:Ee,isNotVisible:ss,rowHeight:Ur,focusedCell:tn,tabbableCell:Oo,renderedColumns:vr,visibleColumns:i,firstColumnToRender:Ie,last
3737ColumnToRender:Fe,selected:In,index:Hr,containerWidth:ue,isLastVisible:Ls,position:X},ki,xt,{hovered:$===zt,style:L.current[zt]}),zt))}return P.current=f,B.current=lt,en},we=F.width&&g>=F.width,me=m.useMemo(()=>{const ie=Math.max(v.currentPageTotalHeight,1);let pe=!1;S!=null&&S.current&&ie<=(S==null?void 0:S.current.clientHeight)&&(pe=!0);const U={width:we?g:"auto",height:ie,minHeight:pe?"100%":"auto"};return o.autoHeight&&C.rows.length===0&&(U.height=nq(r,o.rowHeight)),U},[r,S,g,v.currentPageTotalHeight,we,o.autoHeight,o.rowHeight,C.rows.length]);m.useEffect(()=>{r.current.publishEvent("virtualScrollerContentSizeChange")},[r,me]);const be=m.useMemo(()=>{const ie={};return we||(ie.overflowX="hidden"),o.autoHeight&&(ie.overflowY="hidden"),ie},[we,o.autoHeight]);return r.current.register("private",{getRenderContext:ee}),{renderContext:k,updateRenderZonePosition:Q,getRows:ye,getRootProps:(ie={})=>x({ref:_,onScroll:se,onWheel:fe,onTouchMove:ve},ie,{style:ie.style?x({},ie.style,be):be,role:"presentation"}),getContentProps:({style:ie}={})=>({style:ie?x({},ie,me):me,role:"presentation"}),getRenderZoneProps:()=>({ref:A,role:"rowgroup"})}},g5e=e=>{const{classes:t,headerAlign:n,isDragging:r,showColumnBorder:o,groupId:i}=e;return Re({root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",o&&"columnHeader--showColumnBorder",o&&"columnHeader--withRightBorder","withBorderColor",i===null?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},At,t)};function y5e(e){var t;const{groupId:n,width:r,depth:o,maxDepth:i,fields:s,height:a,colIndex:l,hasFocus:u,tabIndex:c,isLastColumn:d}=e,f=nt(),h=m.useRef(null),p=kt(),g=qe(p,GG),b=n?g[n]:{},{headerName:y=n??"",description:v="",headerAlign:w=void 0}=b;let C;const A=n&&((t=g[n])==null?void 0:t.renderHeaderGroup),S=m.useMemo(()=>({groupId:n,headerName:y,description:v,depth:o,maxDepth:i,fields:s,colIndex:l,isLastColumn:d}),[n,y,v,o,i,s,l,d]);n&&A&&(C=A(S));const _=f.showColumnVerticalBorder,k=x({},e,{classes:f.classes,showColumnBorder:_,headerAlign:w,depth:o,isDragging:!1}),M=y??n,R=Jt(),O=n===null?`empty-group-cell-${R}`:n,F=g5e(k);m.useLayoutEffect(()=>{if(u){const L=h.current.querySelector('[tabindex="0"]')||h.current;L==null||L.focus()}},[p,u]);const N=m.useCallback(D=>L=>{uv(L)||p.current.publishEvent(D,S,L)},[p,S]),V=m.useMemo(()=>({onKeyDown:N("columnGroupHeaderKeyDown"),onFocus:N("columnGroupHeaderFocus"),onBlur:N("columnGroupHeaderBlur")}),[N]),$=typeof b.headerClassName=="function"?b.headerClassName(S):b.headerClassName;return T.jsx(fq,x({ref:h,classes:F,columnMenuOpen:!1,colIndex:l,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:C,headerClassName:$,description:v,elementId:O,width:r,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:M,"aria-colspan":s.length,"data-fields":`|-${s.join("-|-")}-|`},V))}const eB=he("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})(()=>({display:"flex"}));function v5e(e){return!!e.target}const b5e=e=>{const{innerRef:t,minColumnIndex:n=0,visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnPositions:s,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:l,columnHeaderFocus:u,columnGroupHeaderFocus:c,densityFactor:d,headerGroupingMaxDepth:f,columnMenuState:h,columnVisibility:p,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:b}=e,y=Zn(),[v,w]=m.useState(""),[C,A]=m.useState(""),S=Xu(),_=qe(S,Iq),k=nt(),M=m.useRef(null),R=bt(t,M),[O,F]=m.useState(null),N=m.useRef(O),V=m.useRef(0),$=Td(S,k),D=j2(S,k.columnHeaderHeight),L=Math.floor(k.columnHeaderHeight*d),P=m.useCallback(ve=>{O&&ve&&Bq(O,ve)||F(ve)},[O]);m.useEffect(()=>{S.current.columnHeadersContainerElementRef.current.scrollLeft=0},[S]);const B=m.useRef(GC(c5e,{equalityCheck:(ve,oe)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every(ye=>ve[ye]===oe[ye])})),E=m.useCallback(ve=>{const[oe,ye]=Jl({firstIndex:ve.firstRowIndex,lastIndex:ve.lastRowIndex,minFirstIndex:0,maxLastIndex:$.rows.length,buffer:k.rowBuffer}),we=B.current({firstColumnIndex:ve.firstColumnIndex,minColumnIndex:n,columnBuffer:k.columnBuffer,firstRowToRender:oe,lastRowToRender:ye,apiRef:S,visibleRows:$.rows}),me=y.direction==="ltr"?1:-1,be=we>0?V.current-me*s[we]:V.current;M.current.style.transform=`translate3d(${-be}px, 0px, 0px)`},[s,n,k.columnBuffer,S,$.rows,k.rowBuffer,y.direction]);m.useLayoutEffect(()=>{O&&E(O)},[O,E]);const z=m.useCallback(({left:ve,renderContext:oe=null},ye)=>{var we,me;if(!M.current||V.current===ve&&((we=N.current)==null?void 0:we.firstColumnIndex)===(oe==null?void 0:oe.firstColumnIndex)&&((me=N.current)==null?void 0:me.lastColumnIndex)===(oe==null?void 0:oe.lastColumnIndex))return;V.current=ve;let be=!1;oe!==N.current||!N.current?(v5e(ye)?(md.flushSync(()=>{P(oe)}),be=!0):P(oe),N.current=oe):be=!0,oe&&be&&E(oe)},[E,P]),H=m.useCallback(ve=>A(ve.field),[]),j=m.useCallback(()=>A(""),[]),G=m.useCallback(ve=>w(ve.field),[]),Q=m.useCallback(()=>w(""),[]);rt(S,"columnResizeStart",H),rt(S,"columnResizeStop",j),rt(S,"columnHeaderDragStart",G),rt(S,"columnHeaderDragEnd",Q),rt(S,"scrollPositionChange",z);const ee=ve=>
3737{const{renderContext:oe=O,minFirstColumn:ye=n,maxLastColumn:we=r.length}=ve||{};if(!oe)return null;const[me,be]=Jl({firstIndex:oe.firstRowIndex,lastIndex:oe.lastRowIndex,minFirstIndex:0,maxLastIndex:$.rows.length,buffer:k.rowBuffer}),ie=_?B.current({firstColumnIndex:oe.firstColumnIndex,minColumnIndex:ye,columnBuffer:k.columnBuffer,apiRef:S,firstRowToRender:me,lastRowToRender:be,visibleRows:$.rows}):0,pe=_?Math.min(oe.lastColumnIndex+k.columnBuffer,we):we;return{renderedColumns:r.slice(ie,pe),firstColumnToRender:ie,lastColumnToRender:pe,minFirstColumn:ye,maxLastColumn:we}},Y=(ve,oe={})=>{const ye=ee(ve);if(ye==null)return null;const{renderedColumns:we,firstColumnToRender:me}=ye,be=[];for(let ie=0;ie<we.length;ie+=1){const pe=we[ie],U=me+ie,q=U===0,K=a!==null&&a.field===pe.field||q&&!b?0:-1,ae=u!==null&&u.field===pe.field,ue=h.open&&h.field===pe.field;be.push(T.jsx(qNe,x({},o[pe.field],{columnMenuOpen:ue,filterItemsCounter:i[pe.field]&&i[pe.field].length,headerHeight:L,isDragging:pe.field===v,colDef:pe,colIndex:U,isResizing:C===pe.field,hasFocus:ae,tabIndex:K},oe),pe.field))}return T.jsx(eB,{role:"row","aria-rowindex":f+1,ownerState:k,children:be})},se=ve=>{if(f===0)return null;const oe=ee(ve);if(oe==null||oe.renderedColumns.length===0)return null;const{firstColumnToRender:ye,lastColumnToRender:we}=oe,me=[],be=[];for(let U=0;U<f;U+=1){var ie,pe;const q=g[U],K=r[ye].field,ae=(ie=S.current.unstable_getColumnGroupPath(K)[U])!=null?ie:null,ue=q.findIndex(({groupId:Fe,columnFields:Ie})=>Fe===ae&&Ie.includes(K)),Z=r[we-1].field,X=(pe=S.current.unstable_getColumnGroupPath(Z)[U])!=null?pe:null,W=q.findIndex(({groupId:Fe,columnFields:Ie})=>Fe===X&&Ie.includes(Z)),le=q.slice(ue,W+1).map(Fe=>x({},Fe,{columnFields:Fe.columnFields.filter(Ie=>p[Ie]!==!1)})).filter(Fe=>Fe.columnFields.length>0),_e=le[0].columnFields.indexOf(K),te=le[0].columnFields.slice(0,_e).reduce((Fe,Ie)=>{var Be;const Ee=S.current.getColumn(Ie);return Fe+((Be=Ee.computedWidth)!=null?Be:0)},0);let ke=ye;const Ve=le.map(({groupId:Fe,columnFields:Ie})=>{const Be=c!==null&&c.depth===U&&Ie.includes(c.field),Ee=l!==null&&l.depth===U&&Ie.includes(l.field)?0:-1,Te={groupId:Fe,width:Ie.reduce((We,lt)=>We+S.current.getColumn(lt).computedWidth,0),fields:Ie,colIndex:ke,hasFocus:Be,tabIndex:Ee};return ke+=Ie.length,Te});be.push({leftOverflow:te,elements:Ve})}return be.forEach((U,q)=>{me.push(T.jsx(eB,{style:{height:`${L}px`,transform:`translateX(-${U.leftOverflow}px)`},role:"row","aria-rowindex":q+1,ownerState:k,children:U.elements.map(({groupId:K,width:ae,fields:ue,colIndex:Z,hasFocus:X,tabIndex:W},le)=>T.jsx(y5e,{groupId:K,width:ae,fields:ue,colIndex:Z,depth:q,isLastColumn:Z===r.length-ue.length,maxDepth:be.length,height:L,hasFocus:X,tabIndex:W},le))},q))}),me},fe={minHeight:D,maxHeight:D,lineHeight:`${L}px`};return{renderContext:O,getColumnHeaders:Y,getColumnsToRender:ee,getColumnGroupHeaders:se,isDragging:!!v,getRootProps:(ve={})=>x({style:fe},ve),getInnerProps:()=>({ref:R,role:"rowgroup"}),headerHeight:L}},w5e=["innerRef","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],C5e=m.forwardRef(function(t,n){const{innerRef:r,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:s,columnPositions:a,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:f,headerGroupingMaxDepth:h,columnMenuState:p,columnVisibility:g,columnGroupsHeaderStructure:b,hasOtherElementInTabSequence:y}=t,v=de(t,w5e),{isDragging:w,getRootProps:C,getInnerProps:A,getColumnHeaders:S,getColumnGroupHeaders:_}=b5e({innerRef:r,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:s,columnPositions:a,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:f,headerGroupingMaxDepth:h,columnMenuState:p,columnVisibility:g,columnGroupsHeaderStructure:b,hasOtherElementInTabSequence:y});return T.jsx(AFe,x({ref:n},C(v),{children:T.jsxs(RFe,x({isDragging:w},A(),{children:[_(),S()]}))}))}),x5e=uS(C5e),S5e=m.forwardRef(function(t,n){const o=kt().current.getLocaleText("noResultsOverlayLabel");return T.jsx(D2,x({ref:n},t,{children:o}))}),_5e=["sortingOrder"],E5e=m.memo(function(t){const{sortingOrder:n}=t,r=de(t,_5e),o=nt(),[i]=n,s=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return s?T.jsx(s,x({},r)):null}),I5e=["native"];function A5e(e){let{native:t}=e,n=de(e,I5e);return t?T.jsx("option",x({},n)):T.jsx(io,x({},n))}const k5e={BooleanCellTrueIcon:HVe,BooleanCellFalseIcon:xE,ColumnMenuIcon:BVe,OpenFilterButtonIcon:MVe,FilterPanelDeleteIcon:xE,ColumnFilteredIcon:B4,ColumnSelectorIcon:$Ve,ColumnUnsortedIcon:E5e,ColumnSortedAscendingIcon:F4,ColumnSortedDescendingIcon:L4,ColumnResizeIcon:FVe,DensityCompactIcon:LVe,DensityStandardIcon:NVe,DensityComfortableIcon:VVe,ExportIcon:UVe,MoreActionsIcon:WVe,TreeDataCollapseIcon:V4,TreeDataExpandIcon:N4,GroupingCriteriaCollapseIcon:V4,GroupingCriteriaExpandIcon:N4,DetailPanelExpandIcon:j4,DetailPanelCollapseIcon:jVe,RowReorderIcon:z4,QuickFilterIcon:DVe,QuickFilterClearIcon:xE,ColumnMenuHideIcon:GVe,ColumnMenuSortAscendingIcon:F4,ColumnMenuSortDescendingIcon:L4,ColumnMenuFilterIcon:B4,ColumnMenuManageColumnsIcon:qVe,ColumnMenuClearIcon:KVe,LoadIcon:zVe,FilterPanelAddIcon:j4,FilterPanelRemoveAllIcon:QVe,ColumnReorderIcon:z4},P5e=x({}
3737,k5e,{BaseCheckbox:Kh,BaseTextField:es,BaseFormControl:Al,BaseSelect:Cy,BaseSwitch:kU,BaseButton:gt,BaseIconButton:Zt,BaseInputAdornment:Ou,BaseTooltip:CT,BasePopper:yd,BaseInputLabel:yT,BaseSelectOption:A5e,BaseChip:Ps}),T5e=P5e,R5e=x({},T5e,{Cell:vk,SkeletonCell:hNe,ColumnHeaderFilterIconButton:EVe,ColumnMenu:c4e,ColumnHeaders:x5e,Footer:vBe,FooterRowCount:ABe,Toolbar:null,PreferencesPanel:N4e,LoadingOverlay:wBe,NoResultsOverlay:S5e,NoRowsOverlay:CBe,Pagination:SBe,FilterPanel:iBe,ColumnsPanel:O4e,Panel:L4e,Row:qBe}),O5e=e=>{const t=m.useRef({}),n=m.useRef(!1),r=m.useCallback(c=>{n.current||!c||(n.current=!0,Object.values(c.appliers).forEach(d=>{d()}),n.current=!1)},[]),o=m.useCallback((c,d,f)=>{t.current[c]||(t.current[c]={processors:new Map,appliers:{}});const h=t.current[c];return h.processors.get(d)!==f&&(h.processors.set(d,f),r(h)),()=>{t.current[c].processors.set(d,null)}},[r]),i=m.useCallback((c,d,f)=>(t.current[c]||(t.current[c]={processors:new Map,appliers:{}}),t.current[c].appliers[d]=f,()=>{const h=t.current[c].appliers,p=de(h,[d].map(fh));t.current[c].appliers=p}),[]),s=m.useCallback(c=>{const d=t.current[c];r(d)},[r]),a=m.useCallback((...c)=>{const[d,f,h]=c;return t.current[d]?Array.from(t.current[d].processors.values()).reduce((g,b)=>b?b(g,h):g,f):f},[]),l={registerPipeProcessor:o,registerPipeApplier:i,requestPipeProcessorsApplication:s},u={unstable_applyPipeProcessors:a};_t(e,l,"private"),_t(e,u,"public")},mr=(e,t,n)=>{const r=m.useRef(),o=m.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=m.useCallback(()=>{r.current=e.current.registerPipeProcessor(t,o.current,n)},[e,n,t]);cv(()=>{i()});const s=m.useRef(!0);m.useEffect(()=>(s.current?s.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},z2=(e,t,n)=>{const r=m.useRef(),o=m.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=m.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);cv(()=>{i()});const s=m.useRef(!0);m.useEffect(()=>(s.current?s.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},$1=(e,t,n,r)=>{const o=m.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);cv(()=>{o()});const i=m.useRef(!0);m.useEffect(()=>{i.current?i.current=!1:o()},[o])},fd="none",tB={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},M5e=e=>{const t=m.useRef(new Map),n=m.useRef({}),r=m.useCallback((l,u,c)=>{const d=()=>{const p=n.current[u],g=de(p,[l].map(fh));n.current[u]=g};n.current[u]||(n.current[u]={});const f=n.current[u],h=f[l];return f[l]=c,!h||h===c||l===e.current.getActiveStrategy(tB[u])&&e.current.publishEvent("activeStrategyProcessorChange",u),d},[e]),o=m.useCallback((l,u)=>{const c=e.current.getActiveStrategy(tB[l]);if(c==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const d=n.current[l];if(!d||!d[c])throw new Error(`No processor found for processor "${l}" on strategy "${c}"`);const f=d[c];return f(u)},[e]),i=m.useCallback(l=>{var u;const d=Array.from(t.current.entries()).find(([,f])=>f.group!==l?!1:f.isAvailable());return(u=d==null?void 0:d[0])!=null?u:fd},[]),s=m.useCallback((l,u,c)=>{t.current.set(u,{group:l,isAvailable:c}),e.current.publishEvent("strategyAvailabilityChange")},[e]);_t(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:s},"private")},D5e=eVe()&&window.localStorage.getItem("DEBUG")!=null,Cm=()=>{},$5e={debug:Cm,info:Cm,warn:Cm,error:Cm},nB=["debug","info","warn","error"];function rB(e,t,n=console){const r=nB.indexOf(t);if(r===-1)throw new Error(`MUI: Log level ${t} not recognized.`);return nB.reduce((i,s,a)=>(a>=r?i[s]=(...l)=>{const[u,...c]=l;n[s](`MUI: ${e} - ${u}`,...c)}:i[s]=Cm,i),{})}const F5e=(e,t)=>{const n=m.useCallback(r=>D5e?rB(r,"debug",t.logger):t.logLevel?rB(r,t.logLevel.toString(),t.logger):$5e,[t.logLevel,t.logger]);_t(e,{getLogger:n},"private")};class U2{static create(t){return new U2(t)}constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}
3737),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=t,this.listeners=new Set}}class L5e{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let s=o.length-1;s>=0;s-=1){const a=o[s];r.highPriority.has(a)&&a.apply(this,n)}for(let s=0;s<i.length;s+=1){const a=i[s];r.regular.has(a)&&a.apply(this,n)}}once(t,n){const r=this;this.on(t,function o(...i){r.removeListener(t,o),n.apply(r,i)})}}const jq=Symbol("mui.api_private"),N5e=e=>e.isPropagationStopped!==void 0;let oB=0;function V5e(e){var t;const n=(t=e.current)==null?void 0:t[jq];if(n)return n;const r={},o={state:r,store:U2.create(r),instanceId:{id:oB}};return oB+=1,o.getPublicApi=()=>e.current,o.register=(i,s)=>{Object.keys(s).forEach(a=>{const l=s[a],u=o[a];if((u==null?void 0:u.spying)===!0?u.target=l:o[a]=l,i==="public"){const c=e.current,d=c[a];(d==null?void 0:d.spying)===!0?d.target=l:c[a]=l}})},o.register("private",{caches:{},eventManager:new L5e}),o}function B5e(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[jq]:e.current}}function j5e(e,t){const n=m.useRef(),r=m.useRef();r.current||(r.current=V5e(n)),n.current||(n.current=B5e(r));const o=m.useCallback((...s)=>{const[a,l,u={}]=s;if(u.defaultMuiPrevented=!1,N5e(u)&&u.isPropagationStopped())return;const c=t.signature===Sa.DataGridPro?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(a,l,u,c)},[r,t.signature]),i=m.useCallback((s,a,l)=>{r.current.eventManager.on(s,a,l);const u=r.current;return()=>{u.eventManager.removeListener(s,a)}},[r]);return _t(r,{subscribeEvent:i,publishEvent:o},"public"),m.useImperativeHandle(e,()=>n.current,[n]),m.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const z5e=(e,t)=>{const n=m.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})},U5e=(e,t)=>{const n=m.useRef({}),[,r]=m.useState(),o=m.useCallback(c=>{n.current[c.stateId]=c},[]),i=m.useCallback((c,d)=>{let f;if(pq(c)?f=c(e.current.state):f=c,e.current.state===f)return!1;let h=!1;const p=[];if(Object.keys(n.current).forEach(g=>{const b=n.current[g],y=b.stateSelector(e.current.state,e.current.instanceId),v=b.stateSelector(f,e.current.instanceId);v!==y&&(p.push({stateId:b.stateId,hasPropChanged:v!==b.propModel}),b.propModel!==void 0&&v!==b.propModel&&(h=!0))}),p.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${p[0].stateId}, therefore, you're not allowed to update ${p.map(g=>g.stateId).join(", ")} in the same transaction.`);if(h||(e.current.state=f,e.current.publishEvent&&e.current.publishEvent("stateChange",f),e.current.store.update(f)),p.length===1){const{stateId:g,hasPropChanged:b}=p[0],y=n.current[g],v=y.stateSelector(f,e.current.instanceId);if(y.propOnChange&&b){const w=t.signature===Sa.DataGridPro?{api:e.current,reason:d}:{reason:d};y.propOnChange(v,w)}h||e.current.publishEvent(y.changeEvent,v,{reason:d})}return!h},[e,t.signature]),s=m.useCallback((c,d,f)=>e.current.setState(h=>x({},h,{[c]:d(h[c])}),f),[e]),a=m.useCallback(()=>r(()=>e.current.state),[e]),l={setState:i,forceUpdate:a},u={updateControlState:s,registerControlState:o};_t(e,l,"public"),_t(e,u,"private")},H5e=(e,t)=>{const n=j5e(e,t);return F5e(n,t),U5e(n,t),O5e(n),M5e(n),z5e(n,t),n.current.register("private",{rootProps:t}),n};function _k(e,t,n){return typeof e=="string"&&[t,`
3738`,"\r",'"'].some(r=>e.includes(r))?n?`"${e.replace(/"/g,'""')}"`:`${e.replace(/"/g,'""')}`:e}const zq=(e,t)=>
3738{const{delimiterCharacter:n,ignoreValueFormatter:r,shouldAppendQuotes:o}=t;let i;if(r){var s;const l=e.colDef.type;if(l==="number")i=String(e.value);else if(l==="date"||l==="dateTime"){var a;i=(a=e.value)==null?void 0:a.toISOString()}else typeof((s=e.value)==null?void 0:s.toString)=="function"?i=e.value.toString():i=e.value}else i=e.formattedValue;return _k(i,n,o)};Ba(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);class Ek{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.delimiterCharacter),t==null?this.rowString+="":typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.delimiterCharacter,this.options.shouldAppendQuotes):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const W5e=({id:e,columns:t,getCellParams:n,delimiterCharacter:r,ignoreValueFormatter:o,shouldAppendQuotes:i})=>{const s=new Ek({delimiterCharacter:r,shouldAppendQuotes:i});return t.forEach(a=>{const l=n(e,a.field);s.addValue(zq(l,{delimiterCharacter:r,ignoreValueFormatter:o,shouldAppendQuotes:i}))}),s.getRowString()};function G5e(e){const{columns:t,rowIds:n,delimiterCharacter:r,includeHeaders:o,includeColumnGroupsHeaders:i,ignoreValueFormatter:s,apiRef:a,shouldAppendQuotes:l}=e,u=n.reduce((p,g)=>`${p}${W5e({id:g,columns:t,getCellParams:a.current.getCellParams,delimiterCharacter:r,ignoreValueFormatter:s,shouldAppendQuotes:l})}\r
3739`,"").trim();if(!o)return u;const c=t.filter(p=>p.field!==Cp.field),d=[];if(i){const p=a.current.unstable_getAllGroupDetails();let g=0;const b=c.reduce((y,v)=>{const w=a.current.unstable_getColumnGroupPath(v.field);return y[v.field]=w,g=Math.max(g,w.length),y},{});for(let y=0;y<g;y+=1){const v=new Ek({delimiterCharacter:r,sanitizeCellValue:_k,shouldAppendQuotes:l});d.push(v),c.forEach(w=>{const C=(b[w.field]||[])[y],A=p[C];v.addValue(A?A.headerName||A.groupId:"")})}}const f=new Ek({delimiterCharacter:r,sanitizeCellValue:_k,shouldAppendQuotes:l});return c.forEach(p=>{f.addValue(p.headerName||p.field)}),d.push(f),`${`${d.map(p=>p.getRowString()).join(`\r
3740`)}\r
3741`}${u}`.trim()}function iB(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function q5e(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{iB(e)}):iB(e)}function K5e(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const Q5e=(e,t)=>{const n=t.unstable_ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=m.useCallback(s=>{if(!((s.ctrlKey||s.metaKey)&&s.key==="c")||K5e(s.target))return;let a="";if(e.current.getSelectedRows().size>0)a=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1});else{const u=ri(e);if(u){const c=e.current.getCellParams(u.id,u.field);a=zq(c,{delimiterCharacter:o,ignoreValueFormatter:r,shouldAppendQuotes:!1})}}a=e.current.unstable_applyPipeProcessors("clipboardCopy",a),a&&(q5e(a),e.current.publishEvent("clipboardCopy",a))},[e,r,o]);rVe(e,e.current.rootElementRef,"keydown",i),bn(e,"clipboardCopy",t.onClipboardCopy)},Y5e=e=>x({},e,{columnMenu:{open:!1}}),X5e=e=>{const t=go(e,"useGridColumnMenu"),n=m.useCallback(s=>{e.current.setState(l=>l.columnMenu.open&&l.columnMenu.field===s?l:(t.debug("Opening Column Menu"),x({},l,{columnMenu:{open:!0,field:s}})))&&(e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),r=m.useCallback(()=>{const s=yk(e.current.state);if(s.field){const l=vp(e),u=Es(e),c=dl(e);let d=s.field;if(l[d]||(d=c[0]),u[d]===!1){const f=c.filter(p=>p===d?!0:u[p]!==!1),h=f.indexOf(d);d=f[h+1]||f[h-1]}e.current.setColumnHeaderFocus(d)}e.current.setState(l=>!l.columnMenu.open&&l.columnMenu.field===void 0?l:(t.debug("Hiding Column Menu"),x({},l,{columnMenu:x({},l.columnMenu,{open:!1,field:void 0})})))&&e.current.forceUpdate()},[e,t]),o=m.useCallback(s=>{t.debug("Toggle Column Menu");const a=yk(e.current.state);!a.open||a.field!==s?n(s):r()},[e,t,n,r]);_t(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),rt(e,"columnResizeStart",r),rt(e,"virtualScrollerWheel",e.current.hideColumnMenu),rt(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},Uq=a5e(),J5e=(e,t,n)=>{var r,o,i,s;const a=af({apiRef:n,columnTypes:Uq,columnsToUpsert:t.columns,initialState:(r=t.initialState)==null?void 0:r.columns,columnVisibilityModel:(o=(i=t.columnVisibilityModel)!=null?i:(s=t.initialState)==null||(s=s.columns)==null?void 0:s.columnVisibilityModel)!=null?o:{},keepOnlyColumnsToUpsert:!0});return x({},e,{columns:a})};function Z5e(e,t){var n,r;const o=go(e,"useGridColumns"),i=Uq,s=m.useRef(t.columns),a=m.useRef(i);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:Es,changeEvent:"columnVisibilityModelChange"});const l=m.useCallback(V=>{o.debug("Updating columns state."),e.current.setState(Z4(V)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",V.orderedFields)},[o,e]),u=m.useCallback(V=>vp(e)[V],[e]),c=m.useCallback(()=>xa(e),[e]),d=m.useCallback(()=>Fr(e),[e]),f=m.useCallback((V,$=!0)=>($?Fr(e):xa(e)).findIndex(L=>L.field===V),[e]),h=m.useCallback(V=>{const $=f(V);return Oh(e)[$]},[e,f]),p=m.useCallback(V=>{Es(e)!==V&&(e.current.setState(D=>x({},D,{columns:af({apiRef:e,columnTypes:i,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:V,keepOnlyColumnsToUpsert:!1})})),e.current.forceUpdate())},[e,i]),g=m.useCallback(V=>{const $=af({apiRef:e,columnTypes:i,columnsToUpsert:V,initialState:void 0,keepOnlyColumnsToUpsert:!1});l($)},[e,l,i]),b=m.useCallback((V,$)=>{var D;const L=Es(e),P=(D=L[V])!=null?D:!0;if($!==P){const B=x({},L,{[V]:$});e.current.setColumnVisibilityModel(B)}},[e]),y=m.useCallback(V=>dl(e).findIndex(D=>D===V),[e]),v=m.useCallback((V,$)=>{const D=dl(e),L=y(V);if(L===$)return;o.debug(`Moving column ${V} to index ${$}`);const P=[...D],B=P.splice(L,1)[0];P.splice($,0,B),l(x({},Bc(e.current.state),{orderedFields:P}));const E={column:e.current.getColumn(V),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(V),oldIndex:L};e.current.publishEvent("columnIndexChange",E)},[e,o,l,y]),w=m.useCallback((V,$)=>{var D,L;
3741o.debug(`Updating column ${V} width to ${$}`);const P=Bc(e.current.state),B=P.lookup[V],E=x({},B,{width:$,hasBeenResized:!0});l(xk(x({},P,{lookup:x({},P.lookup,{[V]:E})}),(D=(L=e.current.getRootDimensions())==null?void 0:L.viewportInnerSize.width)!=null?D:0)),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(V),colDef:E,width:$})},[e,o,l]),C={getColumn:u,getAllColumns:c,getColumnIndex:f,getColumnPosition:h,getVisibleColumns:d,getColumnIndexRelativeToVisibleColumns:y,updateColumns:g,setColumnVisibilityModel:p,setColumnVisibility:b,setColumnWidth:w},A={setColumnIndex:v};_t(e,C,"public"),_t(e,A,t.signature===Sa.DataGrid?"private":"public");const S=m.useCallback((V,$)=>{var D,L;const P={},B=Es(e);(!$.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys((D=(L=t.initialState)==null||(L=L.columns)==null?void 0:L.columnVisibilityModel)!=null?D:{}).length>0||Object.keys(B).length>0)&&(P.columnVisibilityModel=B),P.orderedFields=dl(e);const z=xa(e),H={};return z.forEach(j=>{if(j.hasBeenResized){const G={};Vq.forEach(Q=>{let ee=j[Q];ee===1/0&&(ee=-1),G[Q]=ee}),H[j.field]=G}}),Object.keys(H).length>0&&(P.dimensions=H),x({},V,{columns:P})},[e,t.columnVisibilityModel,(n=t.initialState)==null?void 0:n.columns]),_=m.useCallback((V,$)=>{var D;const L=(D=$.stateToRestore.columns)==null?void 0:D.columnVisibilityModel,P=$.stateToRestore.columns;if(L==null&&P==null)return V;const B=af({apiRef:e,columnTypes:i,columnsToUpsert:[],initialState:P,columnVisibilityModel:L,keepOnlyColumnsToUpsert:!1});return e.current.setState(Z4(B)),P!=null&&e.current.publishEvent("columnsChange",B.orderedFields),V},[e,i]),k=m.useCallback((V,$)=>{if($===dd.columns){var D;const L=t.slots.columnsPanel;return T.jsx(L,x({},(D=t.slotProps)==null?void 0:D.columnsPanel))}return V},[t.slots.columnsPanel,(r=t.slotProps)==null?void 0:r.columnsPanel]),M=m.useCallback(V=>t.disableColumnSelector?V:[...V,"columnMenuColumnsItem"],[t.disableColumnSelector]);mr(e,"columnMenu",M),mr(e,"exportState",S),mr(e,"restoreState",_),mr(e,"preferencePanel",k);const R=m.useRef(null);rt(e,"viewportInnerSizeChange",V=>{R.current!==V.width&&(R.current=V.width,l(xk(Bc(e.current.state),V.width)))});const F=m.useCallback(()=>{o.info("Columns pipe processing have changed, regenerating the columns");const V=af({apiRef:e,columnTypes:i,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});l(V)},[e,o,l,i]);z2(e,"hydrateColumns",F);const N=m.useRef(!0);m.useEffect(()=>{if(N.current){N.current=!1;return}if(o.info(`GridColumns have changed, new length ${t.columns.length}`),s.current===t.columns&&a.current===i)return;const V=af({apiRef:e,columnTypes:i,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});s.current=t.columns,a.current=i,l(V)},[o,e,l,t.columns,i]),m.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,o,t.columnVisibilityModel])}const eje=e=>{const t=m.useRef({}),n=m.useCallback((u,c,d)=>{const f=t.current;f[u]||(f[u]={}),f[u][c]=d},[]),r=m.useCallback((u,c)=>{var d;return(d=t.current[u])==null?void 0:d[c]},[]),o=m.useCallback(u=>{const{columnIndex:c,rowId:d,minFirstColumnIndex:f,maxLastColumnIndex:h,columns:p}=u,g=p.length,b=p[c],y=typeof b.colSpan=="function"?b.colSpan(e.current.getCellParams(d,b.field)):b.colSpan;if(!y||y===1)return n(d,c,{spannedByColSpan:!1,cellProps:{colSpan:1,width:b.computedWidth}}),{colSpan:1};let v=b.computedWidth;for(let w=1;w<y;w+=1){const C=c+w;if(C>=f&&C<h){const A=p[C];v+=A.computedWidth,n(d,c+w,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(c+y,g-1),leftVisibleCellIndex:c})}n(d,c,{spannedByColSpan:!1,cellProps:{colSpan:y,width:v}})}return{colSpan:y}},[e,n]),i=m.useCallback(({rowId:u,minFirstColumn:c,maxLastColumn:d,columns:f})=>{for(let h=c;h<d;h+=1){const p=o({columnIndex:h,rowId:u,minFirstColumnIndex:c,maxLastColumnIndex:d,columns:f});p.colSpan>1&&(h+=p.colSpan-1)}},[o]),s={unstable_getCellColSpanInfo:r},a={calculateColSpan:i};_t(e,s,"public"),_t(e,a,"private");const l=m.useCallback(()=>{t.current={}},[]);rt(e,"columnOrderChange",l)},Hq=(e,t,n)=>{if(rq(e)){if(n[e.field]!==void 0)throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(`
3742`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>
3742{Hq(i,[...t,r],n)})},Ik=e=>{if(!e)return{};const t={};return e.forEach(n=>{Hq(n,[],t)}),t},Ak=(e,t,n)=>{const r=l=>{var u;return(u=t[l])!=null?u:[]},o=[],i=Math.max(...e.map(l=>r(l).length)),s=(l,u,c)=>zc(r(l).slice(0,c+1),r(u).slice(0,c+1)),a=(l,u)=>!!(n!=null&&n.left&&n.left.includes(l)&&!n.left.includes(u)||n!=null&&n.right&&!n.right.includes(l)&&n.right.includes(u));for(let l=0;l<i;l+=1){const u=e.reduce((c,d)=>{var f;const h=(f=r(d)[l])!=null?f:null;if(c.length===0)return[{columnFields:[d],groupId:h}];const p=c[c.length-1],g=p.columnFields[p.columnFields.length-1];return p.groupId!==h||!s(g,d,l)||a(g,d)?[...c,{columnFields:[d],groupId:h}]:[...c.slice(0,c.length-1),{columnFields:[...p.columnFields,d],groupId:h}]},[]);o.push(u)}return o},tje=["groupId","children"],H2=e=>{let t={};return e.forEach(n=>{if(rq(n))return;const{groupId:r,children:o}=n,i=de(n,tje);if(!r)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${r} has no children.`);const s=x({},i,{groupId:r}),a=H2(o);if(a[r]!==void 0||t[r]!==void 0)throw new Error(`MUI: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=x({},t,a,{[r]:s})}),x({},t)},nje=(e,t,n)=>{var r,o,i,s;if(!((r=t.experimentalFeatures)!=null&&r.columnGrouping))return e;const a=dl(n),l=nS(n),u=H2((o=t.columnGroupingModel)!=null?o:[]),c=Ik((i=t.columnGroupingModel)!=null?i:[]),d=Ak(a,c,(s=n.current.state.pinnedColumns)!=null?s:{}),f=l.length===0?0:Math.max(...l.map(h=>{var p,g;return(p=(g=c[h])==null?void 0:g.length)!=null?p:0}));return x({},e,{columnGrouping:{lookup:u,unwrappedGroupingModel:c,headerStructure:d,maxDepth:f}})},rje=(e,t)=>{var n;const r=m.useCallback(l=>{var u;return(u=VFe(e)[l])!=null?u:[]},[e]),o=m.useCallback(()=>GG(e),[e]);_t(e,{unstable_getColumnGroupPath:r,unstable_getAllGroupDetails:o},"public");const s=m.useCallback(()=>{var l;const u=Ik((l=t.columnGroupingModel)!=null?l:[]);e.current.setState(c=>{var d,f,h;const p=(d=(f=c.columns)==null?void 0:f.orderedFields)!=null?d:[],g=(h=c.pinnedColumns)!=null?h:{},b=Ak(p,u,g);return x({},c,{columnGrouping:x({},c.columnGrouping,{headerStructure:b})})})},[e,t.columnGroupingModel]),a=m.useCallback(l=>{var u,c,d,f;if(!((u=t.experimentalFeatures)!=null&&u.columnGrouping))return;const h=(c=(d=(f=e.current).getPinnedColumns)==null?void 0:d.call(f))!=null?c:{},p=dl(e),g=nS(e),b=H2(l??[]),y=Ik(l??[]),v=Ak(p,y,h),w=g.length===0?0:Math.max(...g.map(C=>{var A,S;return(A=(S=y[C])==null?void 0:S.length)!=null?A:0}));e.current.setState(C=>x({},C,{columnGrouping:{lookup:b,unwrappedGroupingModel:y,headerStructure:v,maxDepth:w}}))},[e,(n=t.experimentalFeatures)==null?void 0:n.columnGrouping]);rt(e,"columnIndexChange",s),rt(e,"columnsChange",()=>{a(t.columnGroupingModel)}),rt(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),m.useEffect(()=>{a(t.columnGroupingModel)},[a,t.columnGroupingModel])},oje=.7,ije=1.3,Wq={compact:oje,comfortable:ije,standard:1},sje=(e,t)=>x({},e,{density:{value:t.density,factor:Wq[t.density]}}),aje=(e,t)=>{const n=go(e,"useDensity"),r=m.useCallback(i=>{n.debug(`Set grid density to ${i}`),e.current.setState(s=>{const a=R2(s),l={value:i,factor:Wq[i]};return zc(a,l)?s:x({},s,{density:l})}),e.current.forceUpdate()},[n,e]);m.useEffect(()=>{e.current.setDensity(t.density)},[e,t.density]),_t(e,{setDensity:r},"public")};function lje(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI: exportAs not supported")}const Gq=({apiRef:e,options:t})=>{const n=xa(e);return t.fields?t.fields.reduce((o,i)=>{const s=n.find(a=>a.field===i);return s&&o.push(s),o},[]):(t.allColumns?n:Fr(e)).filter(o=>!o.disableExport)},uje=({apiRef:e})=>{var t,n;const r=JFe(e),o=xs(e),i=e.current.getSelectedRows(),s=r.filter(c=>o[c].type!=="footer"),a=bp(e),l=(a==null||(t=a.top)==null?void 0:t.map(c=>c.id))||[],u=(a==null||(n=a.bottom)==null?void 0:n.map(c=>c.id))||[];return s.unshift(...l),s.push(...u),i.size>0?s.filter(c=>i.has(c)):s},cje=(e,t)=>{const n=go(e,"useGridCsvExport"),r=t.unstable_ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=m.useCallback((u={})=>{var c,d,f,h;n.debug("Get data as CSV");const p=Gq({apiRef:e,options:u}),b=((c=u.getRowsToExport)!=null?c:uje)({apiRef:e});return G5e({columns:p,rowIds:b,delimiterCharacter:u.delimiter||",",includeHeaders:(d=u.includeHeaders)!=null?d:!0,includeColumnGroupsHeaders:(f=u.includeColumnGroupsHeaders)!=null?f:!0,ignoreValueFormatter:o,apiRef:e,shouldAppendQuotes:(h=u.shouldAppendQuotes)!=null?h:!0})},[n,e,o]),s=m.useCallback(u=>{n.debug("Export data as CSV");const c=i(u),d=new Blob([u!=null&&u.utf8WithBom?new Uint8Array([239,187,191]):"",c],{type:"text/csv"});lje(d,"csv",u==null?void 0:u.fileName)},[n,i]);_t(e,{getDataAsCsv:i,exportDataAsCsv:s},"public");const l=m.useCallback((u,c)=>{var d;return(d=c.csvOptions)!=null&&d.disableToolbarButton?u:[...u,{component:T.jsx(fBe,{options:c.csvOptions}),componentName:"csvExport"}]},[]);mr(e,"exportMenu",l)},dje=(e,t)=>{var n,r;const o=x({},yq(t.autoPageSize),(n=t.paginationModel)!=null?n:(r=t.initialState)==null||(r=r.pagination)==null?void 0:r.paginationModel);return vq(o.pageSize,t.signature),x({},e,{pagination:{paginationModel:o}})},b0=(e,t,n)=>r=>{var o;let i=r.paginationModel;const s=(o=n==null?void 0:n.pageSize)!=null?o:i.pageSize,a=gq(e,s);n&&((n==null?void 0:n.page)!==i.page||(n==null?void 0:n.pageSize)!==i.pageSize)&&(i=n);const l=sVe(i.page,a);return l!==i.page&&(i=x({},i,{page:l})),vq(i.pageSize,t),{paginationModel:i}},fje=(e,t)=>{var n;const r=go(e,"useGridPagination"),o=qe(e,sS),i=qe(e,wp),s=Math.floor(t.rowHeight*i);e.current.registerControlState({stateId:"pagination",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:$i,changeEvent:"paginationModelChange"});const a=m.useCallback(g=>{const b=$i(e);g!==b.page&&(r.debug(`Setting page to ${g}`),e.current.setPaginationModel({page:g,pageSize:b.pageSize}))},[e,r]),l=m.useCallback(g=>{const b=$i(e);g!==b.pageSize&&(r.debug(`Setting page size to ${g}`),e.current.setPaginationModel({pageSize:g,page:b.page}))},[e,r]),u=m.useCallback(g=>{var b;const y=$i(e);g!==y&&(r.debug("Setting 'paginationModel' to",g),e.current.updateControlState("pagination",b0((b=t.rowCount)!=null?b:o,t.signature,g),"setPaginationModel"),e.current.forceUpdate())},[e,r,t.rowCount,t.signature,o]);_t(e,{setPage:a,setPageSize:l,setPaginationModel:u},"public");const d=m.useCallback((g,b)=>{var y;const v=$i(e);return!b.exportOnlyDirtyModels||t.paginationModel!=null||((y=t.initialState)==null||(y=y.pagination)==null?void 0:y.paginationModel)!=null||v.page!==0&&v.pageSize!==iVe(t.autoPageSize)?x({},g,{pagination:x({},g.pagination,{paginationModel:v})}):g},[e,t.paginationModel,(n=t.initialState)==null||(n=n.pagination)==null?void 0:n.paginationModel,t.autoPageSize]),f=m.useCallback((g,b)=>{var y,v,w;const C=(y=b.stateToRestore.pagination)!=null&&y.paginationModel?x({},yq(t.autoPageSize),(v=b.stateToRestore.pagination)==null?void 0:v.paginationModel):$i(e);return e.current.updateControlState("pagination",b0((w=t.rowCount)!=null?w:o,t.signature,C),"stateRestorePreProcessing"),g},[e,t.autoPageSize,t.rowCount,t.signature,o]);mr(e,"exportState",d),mr(e,"restoreState",f);const h=()=>{var g;const b=$i(e);(g=e.current.virtualScrollerRef)!=null&&g.current&&e.current.scrollToIndexes({rowIndex:b.page*b.pageSize}),e.current.forceUpdate()},p=m.useCallback(()=>{const g=e.current.getRootDimensions();if(!t.autoPageSize||!g)return;const b=tq(e),y=Math.floor((g.viewportInnerSize.height-b.top-b.bottom)/s);e.current.setPageSize(y)},[e,t.autoPageSize,s]);rt(e,"viewportInnerSizeChange",p),rt(e,"paginationModelChange",h),m.useEffect(()=>{},[t.rowCount,t.paginationMode]),m.useEffect(()=>{var g;e.current.updateControlState("pagination",b0((g=t.rowCount)!=null?g:o,t.signature,t.paginationModel))},[e,t.paginationModel,t.rowCount,t.paginationMode,o,t.signature]),m.useEffect(()=>{p()},[p])};function hje(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function pje(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const mje=(e,t)=>{const n=go(e,"useGridPrintExport"),r=m.useRef(null),o=m.useRef(null),i=m.useRef({}),s=m.useRef([]);m.useEffect(()=>{r.current=un(e.current.rootElementRef.current)},[e]);const a=m.useCallback((p,g,b)=>new Promise(y=>{const v=Gq({apiRef:e,options:{fields:p,allColumns:g}}).map(A=>A.field),w=xa(e),C={};
3742w.forEach(A=>{C[A.field]=v.includes(A.field)}),b&&(C[Cp.field]=!0),e.current.setColumnVisibilityModel(C),y()}),[e]),l=m.useCallback(p=>{const b=p({apiRef:e}).map(y=>e.current.getRow(y));e.current.setRows(b)},[e]),u=m.useCallback((p,g)=>{var b,y;const v=x({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},g),w=p.contentDocument;if(!w)return;const C=ry(e.current.state),A=e.current.rootElementRef.current,S=A.cloneNode(!0),_=S.querySelector(`.${re.main}`);_.style.overflow="visible",S.style.contain="size";const M=S.querySelector(`.${re.columnHeaders}`).querySelector(`.${re.columnHeadersInner}`);M.style.width="100%";let R=((b=A.querySelector(`.${re.toolbarContainer}`))==null?void 0:b.offsetHeight)||0,O=((y=A.querySelector(`.${re.footerContainer}`))==null?void 0:y.offsetHeight)||0;if(v.hideToolbar){var F;(F=S.querySelector(`.${re.toolbarContainer}`))==null||F.remove(),R=0}if(v.hideFooter){var N;(N=S.querySelector(`.${re.footerContainer}`))==null||N.remove(),O=0}const V=C.currentPageTotalHeight+j2(e,t.columnHeaderHeight)+R+O;if(S.style.height=`${V}px`,S.style.boxSizing="content-box",g!=null&&g.getRowsToExport){const P=S.querySelector(`.${re.footerContainer}`);P.style.position="absolute",P.style.width="100%",P.style.top=`${V-O}px`}const $=document.createElement("div");$.appendChild(S),w.body.innerHTML=$.innerHTML;const D=typeof v.pageStyle=="function"?v.pageStyle():v.pageStyle;
3742if(typeof D=="string"){const P=w.createElement("style");P.appendChild(w.createTextNode(D)),w.head.appendChild(P)}v.bodyClassName&&w.body.classList.add(...v.bodyClassName.split(" "));const L=[];if(v.copyStyles){const P=A.getRootNode(),E=(P.constructor.name==="ShadowRoot"?P:r.current).querySelectorAll("style, link[rel='stylesheet']");for(let z=0;z<E.length;z+=1){const H=E[z];if(H.tagName==="STYLE"){const j=w.createElement(H.tagName),G=H.sheet;if(G){let Q="";for(let ee=0;ee<G.cssRules.length;ee+=1)typeof G.cssRules[ee].cssText=="string"&&(Q+=`${G.cssRules[ee].cssText}\r
3743`);j.appendChild(w.createTextNode(Q)),w.head.appendChild(j)}}else if(H.getAttribute("href")){const j=w.createElement(H.tagName);for(let G=0;G<H.attributes.length;G+=1){const Q=H.attributes[G];Q&&j.setAttribute(Q.nodeName,Q.nodeValue||"")}L.push(new Promise(G=>{j.addEventListener("load",()=>G())})),w.head.appendChild(j)}}}Promise.all(L).then(()=>{p.contentWindow.print()})},[e,r,t.columnHeaderHeight]),c=m.useCallback(p=>{var g;r.current.body.removeChild(p),e.current.restoreState(o.current||{}),(g=o.current)!=null&&(g=g.columns)!=null&&g.columnVisibilityModel||e.current.setColumnVisibilityModel(i.current),e.current.unstable_setVirtualization(!0),e.current.setRows(s.current),o.current=null,i.current={},s.current=[]},[e]),f={exportDataAsPrint:m.useCallback(async p=>{if(n.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");o.current=e.current.exportState(),i.current=Es(e);const g=il(e);if(s.current=wm(e).map(y=>g[y]),t.pagination){const y=XG(e),v={page:0,pageSize:y};e.current.updateControlState("pagination",b0(y,"DataGridPro",v)),e.current.forceUpdate()}await a(p==null?void 0:p.fields,p==null?void 0:p.allColumns,p==null?void 0:p.includeCheckboxes),p!=null&&p.getRowsToExport&&l(p.getRowsToExport),e.current.unstable_setVirtualization(!1),await hje();const b=pje(p==null?void 0:p.fileName);b.onload=()=>{u(b,p),b.contentWindow.matchMedia("print").addEventListener("change",v=>{v.matches===!1&&c(b)})},r.current.body.appendChild(b)},[t,n,e,u,c,a,l])};_t(e,f,"public");const h=m.useCallback((p,g)=>{var b;return(b=g.printOptions)!=null&&b.disableToolbarButton?p:[...p,{component:T.jsx(hBe,{options:g.printOptions}),componentName:"printExport"}]},[]);mr(e,"exportMenu",h)},gje=(e,t,n)=>{var r,o,i;const s=(r=(o=t.filterModel)!=null?o:(i=t.initialState)==null||(i=i.filter)==null?void 0:i.filterModel)!=null?r:ty();return x({},e,{filter:{filterModel:Mq(s,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},yje=e=>e.filteredRowsLookup;function sB(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function vje(){return GC(Object.values)}const bje=(e,t)=>{var n,r;const o=go(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:br,changeEvent:"filterModelChange"});const i=m.useCallback(()=>{e.current.setState(R=>{const O=br(R,e.current.instanceId),F=t.filterMode==="client"?$Be(O,e,t.disableEval):null,N=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:F,filterModel:O??ty()}),V=x({},R,{filter:x({},R.filter,N)}),$=sB(e,V);return x({},V,{visibleRowsLookup:$})}),e.current.publishEvent("filteredRowsSet")},[e,t.filterMode,t.disableEval]),s=m.useCallback((R,O)=>O==null||O.filterable===!1||t.disableColumnFilter?R:[...R,"columnMenuFilterItem"],[t.disableColumnFilter]),a=m.useCallback(()=>{i(),e.current.forceUpdate()},[e,i]),l=m.useCallback(R=>{const O=br(e),F=[...O.items],N=F.findIndex(V=>V.id===R.id);N===-1?F.push(R):F[N]=R,e.current.setFilterModel(x({},O,{items:F}),"upsertFilterItem")},[e]),u=m.useCallback(R=>{const O=br(e),F=[...O.items];R.forEach(N=>{const V=R.findIndex($=>$.id===N.id);V===-1?F.push(N):F[V]=N}),e.current.setFilterModel(x({},O,{items:R}),"upsertFilterItems")},[e]),c=m.useCallback(R=>{const O=br(e),F=O.items.filter(N=>N.id!==R.id);F.length!==O.items.length&&e.current.setFilterModel(x({},O,{items:F}),"deleteFilterItem")},[e]),d=m.useCallback((R,O,F)=>
3743{if(o.debug("Displaying filter panel"),R){const N=br(e),V=N.items.filter(P=>{var B;if(P.value!==void 0)return!(Array.isArray(P.value)&&P.value.length===0);const z=(B=e.current.getColumn(P.field).filterOperators)==null?void 0:B.find(j=>j.value===P.operator);return!(typeof(z==null?void 0:z.requiresFilterValue)>"u"?!0:z==null?void 0:z.requiresFilterValue)});let $;const D=V.find(P=>P.field===R),L=e.current.getColumn(R);D?$=V:t.disableMultipleColumnsFiltering?$=[Ck({field:R,operator:L.filterOperators[0].value},e)]:$=[...V,Ck({field:R,operator:L.filterOperators[0].value},e)],e.current.setFilterModel(x({},N,{items:$}))}e.current.showPreferences(dd.filters,O,F)},[e,o,t.disableMultipleColumnsFiltering]),f=m.useCallback(()=>{o.debug("Hiding filter panel"),e.current.hidePreferences()},[e,o]),h=m.useCallback(R=>{const O=br(e);O.logicOperator!==R&&e.current.setFilterModel(x({},O,{logicOperator:R}),"changeLogicOperator")},[e]),p=m.useCallback(R=>{const O=br(e);zc(O.quickFilterValues,R)||e.current.setFilterModel(x({},O,{quickFilterValues:[...R]}))},[e]),g=m.useCallback((R,O)=>{br(e)!==R&&(o.debug("Setting filter model"),e.current.updateControlState("filter",q4(R,t.disableMultipleColumnsFiltering,e),O),e.current.unstable_applyFilters())},[e,o,t.disableMultipleColumnsFiltering]),b={setFilterLogicOperator:h,unstable_applyFilters:a,deleteFilterItem:c,upsertFilterItem:l,upsertFilterItems:u,setFilterModel:g,showFilterPanel:d,hideFilterPanel:f,setQuickFilterValues:p,ignoreDiacritics:t.ignoreDiacritics};_t(e,b,"public");const y=m.useCallback((R,O)=>{var F;const N=br(e);return!O.exportOnlyDirtyModels||t.filterModel!=null||((F=t.initialState)==null||(F=F.filter)==null?void 0:F.filterModel)!=null||!zc(N,ty())?x({},R,{filter:{filterModel:N}}):R},[e,t.filterModel,(n=t.initialState)==null||(n=n.filter)==null?void 0:n.filterModel]),v=m.useCallback((R,O)=>{var F;const N=(F=O.stateToRestore.filter)==null?void 0:F.filterModel;return N==null?R:(e.current.updateControlState("filter",q4(N,t.disableMultipleColumnsFiltering,e),"restoreState"),x({},R,{callbacks:[...R.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),w=m.useCallback((R,O)=>{if(O===dd.filters){var F;const N=t.slots.filterPanel;return T.jsx(N,x({},(F=t.slotProps)==null?void 0:F.filterPanel))}return R},[t.slots.filterPanel,(r=t.slotProps)==null?void 0:r.filterPanel]),{getRowId:C}=t,A=E2(vje),S=m.useCallback(R=>{if(t.filterMode!=="client"||!R.isRowMatchingFilters)return{filteredRowsLookup:{},filteredDescendantCountLookup:{}};const O=il(e),F={},{isRowMatchingFilters:N}=R,V={},$={passingFilterItems:null,passingQuickFilterValues:null}
3743,D=A.current(e.current.state.rows.dataRowIdToModelLookup);for(let B=0;B<D.length;B+=1){const E=D[B],z=C?C(E):E.id;N(E,void 0,$);const H=LBe([$.passingFilterItems],[$.passingQuickFilterValues],R.filterModel,e,V);F[z]=H}const L="auto-generated-group-footer-root";return O[L]&&(F[L]=!0),{filteredRowsLookup:F,filteredDescendantCountLookup:{}}},[e,t.filterMode,C,A]);mr(e,"columnMenu",s),mr(e,"exportState",y),mr(e,"restoreState",v),mr(e,"preferencePanel",w),$1(e,fd,"filtering",S),$1(e,fd,"visibleRowsLookupCreation",yje);const _=m.useCallback(()=>{o.debug("onColUpdated - GridColumns changed, applying filters");const R=br(e),O=NFe(e),F=R.items.filter(N=>N.field&&O[N.field]);F.length<R.items.length&&e.current.setFilterModel(x({},R,{items:F}))},[e,o]),k=m.useCallback(R=>{R==="filtering"&&e.current.unstable_applyFilters()},[e]),M=m.useCallback(()=>{e.current.setState(R=>x({},R,{visibleRowsLookup:sB(e,R)})),e.current.forceUpdate()},[e]);rt(e,"rowsSet",i),rt(e,"columnsChange",_),rt(e,"activeStrategyProcessorChange",k),rt(e,"rowExpansionChange",M),rt(e,"columnVisibilityModelChange",()=>{const R=br(e);R.quickFilterValues&&R.quickFilterExcludeHiddenColumns&&e.current.unstable_applyFilters()}),cv(()=>{e.current.unstable_applyFilters()}),Bt(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,o,t.filterModel])},wje=e=>x({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),Cje=(e,t)=>{const n=go(e,"useGridFocus"),r=m.useRef(null),o=m.useCallback((_,k)=>{_&&e.current.getRow(_.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(_.id,_.field),k)},[e]),i=m.useCallback((_,k)=>{const M=ri(e);(M==null?void 0:M.id)===_&&(M==null?void 0:M.field)===k||(e.current.setState(R=>(n.debug(`Focusing on cell with id=${_} and field=${k}`),x({},R,{tabIndex:{cell:{id:_,field:k},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:_,field:k},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(_)&&(M&&o(M,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(_,k))))},[e,n,o]),s=m.useCallback((_,k={})=>{const M=ri(e);o(M,k),e.current.setState(R=>(n.debug(`Focusing on column header with colIndex=${_}`),x({},R,{tabIndex:{columnHeader:{field:_},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:_},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,o]),a=m.useCallback((_,k={})=>{const M=ri(e);o(M,k),e.current.setState(R=>(n.debug(`Focusing on column header filter with colIndex=${_}`),x({},R,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:_},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:_},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,o]),l=m.useCallback((_,k,M={})=>{const R=ri(e);R&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(R.id,R.field),M),e.current.setState(O=>x({},O,{tabIndex:{columnGroupHeader:{field:_,depth:k},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:_,depth:k},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),u=m.useCallback(()=>I1(e),[e]),c=m.useCallback((_,k,M)=>{let R=e.current.getColumnIndex(k);const O=Fr(e),F=M1(e,{pagination:t.pagination,paginationMode:t.paginationMode}),N=bp(e),V=[].concat(N.top||[],F.rows,N.bottom||[]);let $=V.findIndex(B=>B.id===_);M==="right"?R+=1:M==="left"?R-=1:$+=1,R>=O.length?($+=1,$<V.length&&(R=0)):R<0&&($-=1,$>=0&&(R=O.length-1)),$=Mh($,0,V.length-1);const D=V[$];if(!D)return;const L=e.current.unstable_getCellColSpanInfo(D.id,R);L&&L.spannedByColSpan&&(M==="left"||M==="below"?R=L.leftVisibleCellIndex:M==="right"&&(R=L.rightVisibleCellIndex)),R=Mh(R,0,O.length-1);const P=O[R];e.current.setCellFocus(D.id,P.field)},[e,t.pagination,t.paginationMode]),d=m.useCallback(({id:_,field:k})=>{e.current.setCellFocus(_,k)},[e]),f=m.useCallback((_,k)=>{k.key==="Enter"||k.key==="Tab"||k.key==="Shift"||R1(k.key)||e.current.setCellFocus(_.id,_.field)},[e]),h=m.useCallback(({field:_},k)=>{k.target===k.currentTarget&&e.current.setColumnHeaderFocus(_,k)},[e]),p=m.useCallback(({fields:_,depth:k},M)=>
3743{if(M.target!==M.currentTarget)return;const R=I1(e);R!==null&&R.depth===k&&_.includes(R.field)||e.current.setColumnGroupHeaderFocus(_[0],k,M)},[e]),g=m.useCallback((_,k)=>{var M;(M=k.relatedTarget)!=null&&M.className.includes(re.columnHeader)||(n.debug("Clearing focus"),e.current.setState(R=>x({},R,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),b=m.useCallback(_=>{r.current=_},[]),y=m.useCallback(_=>{const k=r.current;r.current=null;const M=ri(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:_,cell:k}))return;if(!M){k&&e.current.setCellFocus(k.id,k.field);return}if((k==null?void 0:k.id)===M.id&&(k==null?void 0:k.field)===M.field)return;const O=e.current.getCellElement(M.id,M.field);O!=null&&O.contains(_.target)||(k?e.current.setCellFocus(k.id,k.field):(e.current.setState(F=>x({},F,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),o(M,_)))},[e,o]),v=m.useCallback(_=>{if(_.cellMode==="view")return;const k=ri(e);((k==null?void 0:k.id)!==_.id||(k==null?void 0:k.field)!==_.field)&&e.current.setCellFocus(_.id,_.field)},[e]),w=m.useCallback(()=>{const _=ri(e);_&&!e.current.getRow(_.id)&&e.current.setState(k=>x({},k,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))},[e]),C=Vt(()=>{const _=ri(e);if(!_)return;const k=M1(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(k.rows.find(O=>O.id===_.id))return;const R=Fr(e);e.current.setState(O=>x({},O,{tabIndex:{cell:{id:k.rows[0].id,field:R[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),A={setCellFocus:i,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:a},S={moveFocusToRelativeCell:c,setColumnGroupHeaderFocus:l,getColumnGroupHeaderFocus:u};_t(e,A,"public"),_t(e,S,"private"),m.useEffect(()=>{const _=un(e.current.rootElementRef.current);return _.addEventListener("mouseup",y),()=>{_.removeEventListener("mouseup",y)}},[e,y]),rt(e,"columnHeaderBlur",g),rt(e,"cellDoubleClick",d),rt(e,"cellMouseDown",b),rt(e,"cellKeyDown",f),rt(e,"cellModeChange",v),rt(e,"columnHeaderFocus",h),rt(e,"columnGroupHeaderFocus",p),rt(e,"rowsSet",w),rt(e,"paginationModelChange",C)};function xje(e,t){const n=bp(e)||{};return[...n.top||[],...t,...n.bottom||[]]}const SE=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:r})=>{if(r==="rtl"){if(e<n)return e+1}else if(r==="ltr"&&e>t)return e-1;return null},_E=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:r})=>{if(r==="rtl"){if(e>t)return e-1}else if(r==="ltr"&&e<n)return e+1;return null},Sje=(e,t)=>{const n=go(e,"useGridKeyboardNavigation"),r=Td(e,t).rows,o=Zn(),i=m.useMemo(()=>xje(e,r),[e,r]),s=t.signature!=="DataGrid"&&t.unstable_headerFilters,a=m.useCallback((y,v,w="left")=>{const C=Ju(e),A=e.current.unstable_getCellColSpanInfo(v,y);A&&A.spannedByColSpan&&(w==="left"?y=A.leftVisibleCellIndex:w==="right"&&(y=A.rightVisibleCellIndex));const S=C.findIndex(k=>k.id===v);n.debug(`Navigating to cell row ${S}, col ${y}`),e.current.scrollToIndexes({colIndex:y,rowIndex:S});const _=e.current.getVisibleColumns()[y].field;e.current.setCellFocus(v,_)},[e,n]),l=m.useCallback((y,v)=>{n.debug(`Navigating to header col ${y}`),e.current.scrollToIndexes({colIndex:y});const w=e.current.getVisibleColumns()[y].field;e.current.setColumnHeaderFocus(w,v)},[e,n]),u=m.useCallback((y,v)=>{n.debug(`Navigating to header filter col ${y}`),e.current.scrollToIndexes({colIndex:y});const w=e.current.getVisibleColumns()[y].field;e.current.setColumnHeaderFilterFocus(w,v)},[e,n]),c=m.useCallback((y,v,w)=>{n.debug(`Navigating to header col ${y}`),e.current.scrollToIndexes({colIndex:y});const{field:C}=e.current.getVisibleColumns()[y];e.current.setColumnGroupHeaderFocus(C,v,w)},[e,n]),d=m.useCallback(y=>{var v;return(v=i[y])==null?void 0:v.id},[i]),f=m.useCallback((y,v)=>{const w=v.currentTarget.querySelector(`.${re.columnHeaderTitleContainerContent}`);if(!!w&&w.contains(v.target)&&y.field!==Cp.field||!e.current.getRootDimensions())return;const S=e.current.getViewportPageSize(),_=y.field?e.current.getColumnIndex(y.field):0,k=i.length>0?0:null,M=i.length-1,R=0,O=Fr(e).length-1,F=lv(e);let N=!0;switch(v.key){case"ArrowDown":{k!==null&&(s?u(_,v):a(_,d(k)));break}case"ArrowRight":{const V=_E({currentColIndex:_,firstColIndex:R,lastColIndex:O,direction:o.direction});V!==null&&l(V,v);break}case"ArrowLeft":{const V=SE({currentColIndex:_,firstColIndex:R,lastColIndex:O,direction:o.direction});V!==null&&l(V,v);break}case"ArrowUp":{F>0&&c(_,F-1,v);break}case"PageDown":{k!==null&&M!==null&&a(_,d(Math.min(k+S,M)));break}case"Home":{l(R,v);break}case"End":{l(O,v);break}case"Enter":{(v.ctrlKey||v.metaKey)&&e.current.toggleColumnMenu(y.field);break}case" ":break;default:N=!1}N&&v.preventDefault()},[e,i.length,s,u,a,d,o.direction,l,c]),h=m.useCallback((y,v)=>{if(!e.current.getRootDimensions())return;const C=bVe(e)===y.field,A=wVe(e)===y.field;if(C||A||!R1(v.key))return;const S=e.current.getViewportPageSize(),_=y.field?e.current.getColumnIndex(y.field):0,k=0,M=i.length-1,R=0,O=Fr(e).length-1;let F=!0;switch(v.key){case"ArrowDown":{const N=d(k);N!=null&&a(_,N);break}case"ArrowRight":{const N=_E({currentColIndex:_,firstColIndex:R,lastColIndex:O,direction:o.direction});N!==null&&u(N,v);break}case"ArrowLeft":{const N=SE({currentColIndex:_,firstColIndex:R,lastColIndex:O,direction:o.direction});N!==null?u(N,v):e.current.setColumnHeaderFilterFocus(y.field,v);break}case"ArrowUp":{l(_,v);break}case"PageDown":{M!==null&&a(_,d(Math.min(k+S,M)));break}case"Home":{u(R,v);break}case"End":{u(O,v);break}case" ":break;default:F=!1}F&&v.preventDefault()},[e,i.length,u,o.direction,l,a,d]),p=m.useCallback((y,v)=>{if(!e.current.getRootDimensions())return;const C=I1(e);if(C===null)return;const{field:A,depth:S}=C,{fields:_,depth:k,maxDepth:M}=y,R=e.current.getViewportPageSize(),O=e.current.getColumnIndex(A),F=A?e.current.getColumnIndex(A):0,N=0,V=i.length-1,$=0,D=Fr(e).length-1;let L=!0;switch(v.key){case"ArrowDown":{k===M-1?l(O,v):c(O,S+1,v);break}case"ArrowUp":{k>0&&c(O,S-1,v);break}case"ArrowRight":{const P=_.length-_.indexOf(A)-1;O+P+1<=D&&c(O+P+1,S,v);break}case"ArrowLeft":{const P=_.indexOf(A);O-P-1>=$&&c(O-P-1,S,v);break}case"PageDown":{V!==null&&a(F,d(Math.min(N+R,V)));break}case"Home":{c($,S,v);break}case"End":{c(D,S,v);break}case" ":break;default:L=!1}L&&v.preventDefault()},[e,i.length,l,c,a,d]),g=m.useCallback((y,v)=>{if(uv(v))return;const w=e.current.getCellParams(y.id,y.field);if(w.cellMode===nn.Edit||!R1(v.key)||!e.current.unstable_applyPipeProcessors("canU
3743pdateFocus",!0,{event:v,cell:w}))return;const A=e.current.getRootDimensions();if(i.length===0||!A)return;const S=o.direction,_=e.current.getViewportPageSize(),k=y.field?e.current.getColumnIndex(y.field):0,M=i.findIndex($=>$.id===y.id),R=0,O=i.length-1,F=0,N=Fr(e).length-1;let V=!0;switch(v.key){case"ArrowDown":{M<O&&a(k,d(M+1));break}case"ArrowUp":{M>R?a(k,d(M-1)):s?u(k,v):l(k,v);break}case"ArrowRight":{const $=_E({currentColIndex:k,firstColIndex:F,lastColIndex:N,direction:S});$!==null&&a($,d(M),S==="rtl"?"left":"right");break}case"ArrowLeft":{const $=SE({currentColIndex:k,firstColIndex:F,lastColIndex:N,direction:S});$!==null&&a($,d(M),S==="rtl"?"right":"left");break}case"Tab":{v.shiftKey&&k>F?a(k-1,d(M),"left"):!v.shiftKey&&k<N&&a(k+1,d(M),"right");break}case" ":{if(y.field===B2)break;const D=y.colDef;if(D&&D.type==="treeDataGroup")break;!v.shiftKey&&M<O&&a(k,d(Math.min(M+_,O)));break}case"PageDown":{M<O&&a(k,d(Math.min(M+_,O)));break}case"PageUp":{const $=Math.max(M-_,R);$!==M&&$>=R?a(k,d($)):l(k,v);break}case"Home":{v.ctrlKey||v.metaKey||v.shiftKey?a(F,d(R)):a(F,d(M));break}case"End":{v.ctrlKey||v.metaKey||v.shiftKey?a(N,d(O)):a(N,d(M));break}default:V=!1}V&&v.preventDefault()},[e,i,o.direction,a,d,s,u,l]),b=m.useCallback((y,{event:v})=>v.key===" "?!1:y,[]);mr(e,"canStartEditing",b),rt(e,"columnHeaderKeyDown",f),rt(e,"headerFilterKeyDown",h),rt(e,"columnGroupHeaderKeyDown",p),rt(e,"cellKeyDown",g)},_je=(e,t)=>{var n,r;return x({},e,{preferencePanel:(n=(r=t.initialState)==null?void 0:r.preferencePanel)!=null?n:{open:!1}})},Eje=(e,t)=>{var n;const r=go(e,"useGridPreferencesPanel"),o=m.useRef(),i=m.useRef(),s=m.useCallback(()=>{r.debug("Hiding Preferences Panel");const f=ny(e.current.state);f.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:f.openedPanelValue}),e.current.setState(h=>x({},h,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,r]),a=m.useCallback(()=>{i.current=setTimeout(()=>clearTimeout(o.current),0)},[]),l=m.useCallback(()=>{o.current=setTimeout(s,100)},[s]),u=m.useCallback((f,h,p)=>{r.debug("Opening Preferences Panel"),a(),e.current.setState(g=>x({},g,{preferencePanel:x({},g.preferencePanel,{open:!0,openedPanelValue:f,panelId:h,labelId:p})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:f}),e.current.forceUpdate()},[r,a,e]);_t(e,{showPreferences:u,hidePreferences:l},"public");const c=m.useCallback((f,h)=>{var p;const g=ny(e.current.state);return!h.exportOnlyDirtyModels||((p=t.initialState)==null?void 0:p.preferencePanel)!=null||g.open?x({},f,{preferencePanel:g}):f},[e,(n=t.initialState)==null?void 0:n.preferencePanel]),d=m.useCallback((f,h)=>{const p=h.stateToRestore.preferencePanel;return p!=null&&e.current.setState(g=>x({},g,{preferencePanel:p})),f},[e]);mr(e,"exportState",c),mr(e,"restoreState",d),m.useEffect(()=>()=>{clearTimeout(o.current),clearTimeout(i.current)},[])},Ije=["id","field"],Aje=["id","field"],kje=Ba(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),Pje=(e,t)=>{const[n,r]=m.useState({}),o=m.useRef(n),i=m.useRef({}),{processRowUpdate:s,onProcessRowUpdateError:a,cellModesModel:l,onCellModesModelChange:u}=t,c=V=>(...$)=>{t.editMode===Ra.Cell&&V(...$)},d=m.useCallback((V,$)=>{const D=e.current.getCellParams(V,$);if(!e.current.isCellEditable(D))throw new Error(`MUI: The cell with id=${V} and field=${$} is not editable.`)},[e]),f=m.useCallback((V,$,D)=>{if(e.current.getCellMode(V,$)!==D)throw new Error(`MUI: The cell with id=${V} and field=${$} is not in ${D} mode.`)},[e]),h=m.useCallback((V,$)=>{if(!V.isEditable||V.cellMode===nn.Edit)return;const D=x({},V,{reason:qa.cellDoubleClick});e.current.publishEvent("cellEditStart",D,$)},[e]),p=m.useCallback((V,$)=>{if(V.cellMode===nn.View||e.current.getCellMode(V.id,V.field)===nn.View)return;const D=x({},V,{reason:vs.cellFocusOut});e.current.publishEvent("cellEditStop",D,$)},[e]),g=m.useCallback((V,$)=>{if(V.cellMode===nn.Edit){if($.which===229)return;let D;if($.key==="Escape"?D=vs.escapeKeyDown:$.key==="Enter"?D=vs.enterKeyDown:$.key==="Tab"&&(D=$.shiftKey?vs.shiftTabKeyDown:vs.tabKeyDown,$.preventDefault()),D){const L=x({},V,{reason:D});e.current.publishEvent("cellEditStop",L,$)}}else if(V.isEditable){let D;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:$,cellParams:V,editMode:"cell"}))return;if(lq($)?D=qa.printableKeyDown:($.ctrlKey||$.metaKey)&&$.key==="v"?D=qa.pasteKeyDown:$.key==="Enter"?D=qa.enterKeyDown:($.key==="Delete"||$.key==="Backspace")&&(D=qa.deleteKeyDown),D){const P=x({},V,{reason:D,key:$.key});e.current.publishEvent("cellEditStart",P,$)}}},[e]),b=m.useCallback(V=>{const{id:$,field:D,reason:L}=V,P={id:$,field:D};(L===qa.printableKeyDown||L===qa.deleteKeyDown||L===qa.pasteKeyDown)&&(P.deleteValue=!0),e.current.startCellEditMode(P)},[e]),y=m.useCallback(V=>{const{id:$,field:D,reason:L}=V;e.current.runPendingEditCellValueMutation($,D);let P;
3743L===vs.enterKeyDown?P="below":L===vs.tabKeyDown?P="right":L===vs.shiftTabKeyDown&&(P="left");const B=L==="escapeKeyDown";e.current.stopCellEditMode({id:$,field:D,ignoreModifications:B,cellToFocusAfter:P})},[e]);rt(e,"cellDoubleClick",c(h)),rt(e,"cellFocusOut",c(p)),rt(e,"cellKeyDown",c(g)),rt(e,"cellEditStart",c(b)),rt(e,"cellEditStop",c(y)),bn(e,"cellEditStart",t.onCellEditStart),bn(e,"cellEditStop",t.onCellEditStop);const v=m.useCallback((V,$)=>{const D=xo(e.current.state);return D[V]&&D[V][$]?nn.Edit:nn.View},[e]),w=Vt(V=>{const $=V!==t.cellModesModel;u&&$&&u(V,{}),!(t.cellModesModel&&$)&&(r(V),o.current=V,e.current.publishEvent("cellModesModelChange",V))}),C=m.useCallback((V,$,D)=>{const L=x({},o.current);if(D!==null)L[V]=x({},L[V],{[$]:x({},D)});else{const P=L[V],B=de(P,[$].map(fh));L[V]=B,Object.keys(L[V]).length===0&&delete L[V]}w(L)},[w]),A=m.useCallback((V,$,D)=>{e.current.setState(L=>{const P=x({},L.editRows);return D!==null?P[V]=x({},P[V],{[$]:x({},D)}):(delete P[V][$],Object.keys(P[V]).length===0&&delete P[V]),x({},L,{editRows:P})}),e.current.forceUpdate()},[e]),S=m.useCallback(V=>{const{id:$,field:D}=V,L=de(V,Ije);d($,D),f($,D,nn.View),C($,D,x({mode:nn.Edit},L))},[d,f,C]),_=Vt(V=>
3743{const{id:$,field:D,deleteValue:L,initialValue:P}=V;let B=e.current.getCellValue($,D);(L||P)&&(B=L?"":P),A($,D,{value:B,error:!1,isProcessingProps:!1}),e.current.setCellFocus($,D)}),k=m.useCallback(V=>{const{id:$,field:D}=V,L=de(V,Aje);f($,D,nn.Edit),C($,D,x({mode:nn.View},L))},[f,C]),M=Vt(async V=>{const{id:$,field:D,ignoreModifications:L,cellToFocusAfter:P="none"}=V;f($,D,nn.Edit),e.current.runPendingEditCellValueMutation($,D);const B=()=>{A($,D,null),C($,D,null),P!=="none"&&e.current.moveFocusToRelativeCell($,D,P)};if(L){B();return}const E=xo(e.current.state),{error:z,isProcessingProps:H}=E[$][D];if(z||H){i.current[$][D].mode=nn.Edit,C($,D,{mode:nn.Edit});return}const j=e.current.getRowWithUpdatedValuesFromCellEditing($,D);if(s){const G=Q=>{i.current[$][D].mode=nn.Edit,C($,D,{mode:nn.Edit}),a?a(Q):kje()};try{const Q=e.current.getRow($);Promise.resolve(s(j,Q)).then(ee=>{e.current.updateRows([ee]),B()}).catch(G)}catch(Q){G(Q)}}else e.current.updateRows([j]),B()}),R=m.useCallback(async V=>{var $;const{id:D,field:L,value:P,debounceMs:B,unstable_skipValueParser:E}=V;d(D,L),f(D,L,nn.Edit);const z=e.current.getColumn(L),H=e.current.getRow(D);let j=P;z.valueParser&&!E&&(j=z.valueParser(P,e.current.getCellParams(D,L)));let G=xo(e.current.state),Q=x({},G[D][L],{value:j,changeReason:B?"debouncedSetEditCellValue":"setEditCellValue"});if(z.preProcessEditCellProps){const ee=P!==G[D][L].value;Q=x({},Q,{isProcessingProps:!0}),A(D,L,Q),Q=await Promise.resolve(z.preProcessEditCellProps({id:D,row:H,props:Q,hasChanged:ee}))}return e.current.getCellMode(D,L)===nn.View?!1:(G=xo(e.current.state),Q=x({},Q,{isProcessingProps:!1}),Q.value=z.preProcessEditCellProps?G[D][L].value:j,A(D,L,Q),G=xo(e.current.state),!(($=G[D])!=null&&($=$[L])!=null&&$.error))},[e,d,f,A]),O=m.useCallback((V,$)=>{const D=e.current.getColumn($),L=xo(e.current.state),P=e.current.getRow(V);if(!L[V]||!L[V][$])return e.current.getRow(V);const{value:B}=L[V][$];return D.valueSetter?D.valueSetter({value:B,row:P}):x({},P,{[$]:B})},[e]),F={getCellMode:v,startCellEditMode:S,stopCellEditMode:k},N={setCellEditingEditCellValue:R,getRowWithUpdatedValuesFromCellEditing:O};_t(e,F,"public"),_t(e,N,"private"),m.useEffect(()=>{l&&w(l)},[l,w]),Bt(()=>{const V=E1(e),$=i.current;i.current=mq(n),Object.entries(n).forEach(([D,L])=>{Object.entries(L).forEach(([P,B])=>{var E,z;const H=((E=$[D])==null||(E=E[P])==null?void 0:E.mode)||nn.View,j=(z=V[D])!=null?z:D;B.mode===nn.Edit&&H===nn.View?_(x({id:j,field:P},B)):B.mode===nn.View&&H===nn.Edit&&M(x({id:j,field:P},B))})})},[e,n,_,M])},Tje=["id"],Rje=["id"],Oje=Ba(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),Mje=(e,t)=>{const[n,r]=m.useState({}),o=m.useRef(n),i=m.useRef({}),s=m.useRef(null),a=m.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:u,rowModesModel:c,onRowModesModelChange:d}=t,f=P=>(...B)=>{t.editMode===Ra.Row&&P(...B)},h=m.useCallback((P,B)=>{const E=e.current.getCellParams(P,B);if(!e.current.isCellEditable(E))throw new Error(`MUI: The cell with id=${P} and field=${B} is not editable.`)},[e]),p=m.useCallback((P,B)=>{if(e.current.getRowMode(P)!==B)throw new Error(`MUI: The row with id=${P} is not in ${B} mode.`)},[e]),g=m.useCallback((P,B)=>{if(!P.isEditable||e.current.getRowMode(P.id)===fn.Edit)return;const E=e.current.getRowParams(P.id),z=x({},E,{field:P.field,reason:Gl.cellDoubleClick});e.current.publishEvent("rowEditStart",z,B)},[e]),b=m.useCallback(P=>{a.current=P},[]),y=m.useCallback((P,B)=>{P.isEditable&&e.current.getRowMode(P.id)!==fn.View&&(a.current=null,s.current=setTimeout(()=>{var E;if(s.current=null,((E=a.current)==null?void 0:E.id)!==P.id){if(!e.current.getRow(P.id)||e.current.getRowMode(P.id)===fn.View)return;const z=e.current.getRowParams(P.id),H=x({},z,{field:P.field,reason:Ka.rowFocusOut});e.current.publishEvent("rowEditStop",H,B)}}))},[e]);m.useEffect(()=>()=>{clearTimeout(s.current)},[]);const v=m.useCallback((P,B)=>{if(P.cellMode===fn.Edit){if(B.which===229)return;let E;if(B.key==="Escape")E=Ka.escapeKeyDown;else if(B.key==="Enter")E=Ka.enterKeyDown;else if(B.key==="Tab"){const z=nS(e).filter(H=>e.current.getColumn(H).type===cS?!0:e.current.isCellEditable(e.current.getCellParams(P.id,H)));
3743if(B.shiftKey?P.field===z[0]&&(E=Ka.shiftTabKeyDown):P.field===z[z.length-1]&&(E=Ka.tabKeyDown),B.preventDefault(),!E){const H=z.findIndex(G=>G===P.field),j=z[B.shiftKey?H-1:H+1];e.current.setCellFocus(P.id,j)}}if(E){const z=x({},e.current.getRowParams(P.id),{reason:E,field:P.field});e.current.publishEvent("rowEditStop",z,B)}}else if(P.isEditable){let E;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:B,cellParams:P,editMode:"row"}))return;if(lq(B)||(B.ctrlKey||B.metaKey)&&B.key==="v"?E=Gl.printableKeyDown:B.key==="Enter"?E=Gl.enterKeyDown:(B.key==="Delete"||B.key==="Backspace")&&(E=Gl.deleteKeyDown),E){const H=e.current.getRowParams(P.id),j=x({},H,{field:P.field,reason:E});e.current.publishEvent("rowEditStart",j,B)}}},[e]),w=m.useCallback(P=>{const{id:B,field:E,reason:z}=P,H={id:B,fieldToFocus:E};(z===Gl.printableKeyDown||z===Gl.deleteKeyDown)&&(H.deleteValue=!!E),e.current.startRowEditMode(H)},[e]),C=m.useCallback(P=>{const{id:B,reason:E,field:z}=P;e.current.runPendingEditCellValueMutation(B);let H;E===Ka.enterKeyDown?H="below":E===Ka.tabKeyDown?H="right":E===Ka.shiftTabKeyDown&&(H="left");const j=E==="escapeKeyDown";e.current.stopRowEditMode({id:B,ignoreModifications:j,field:z,cellToFocusAfter:H})},[e]);rt(e,"cellDoubleClick",f(g)),rt(e,"cellFocusIn",f(b)),rt(e,"cellFocusOut",f(y)),rt(e,"cellKeyDown",f(v)),rt(e,"rowEditStart",f(w)),rt(e,"rowEditStop",f(C)),bn(e,"rowEditStart",t.onRowEditStart),bn(e,"rowEditStop",t.onRowEditStop);const A=m.useCallback(P=>{if(t.editMode===Ra.Cell)return fn.View;const B=xo(e.current.state);return B[P]&&Object.keys(B[P]).length>0?fn.Edit:fn.View},[e,t.editMode]),S=Vt(P=>{const B=P!==t.rowModesModel;d&&B&&d(P,{}),!(t.rowModesModel&&B)&&(r(P),o.current=P,e.current.publishEvent("rowModesModelChange",P))}),_=m.useCallback((P,B)=>{const E=x({},o.current);B!==null?E[P]=x({},B):delete E[P],S(E)},[S]),k=m.useCallback((P,B)=>{e.current.setState(E=>{const z=x({},E.editRows);return B!==null?z[P]=B:delete z[P],x({},E,{editRows:z})}),e.current.forceUpdate()},[e]),M=m.useCallback((P,B,E)=>{e.current.setState(z=>{const H=x({},z.editRows);return E!==null?H[P]=x({},H[P],{[B]:x({},E)}):(delete H[P][B],Object.keys(H[P]).length===0&&delete H[P]),x({},z,{editRows:H})}),e.current.forceUpdate()},[e]),R=m.useCallback(P=>{const{id:B}=P,E=de(P,Tje);p(B,fn.View),_(B,x({mode:fn.Edit},E))},[p,_]),O=Vt(P=>{const{id:B,fieldToFocus:E,deleteValue:z,initialValue:H}=P,G=dl(e).reduce((Q,ee)=>{if(!e.current.getCellParams(B,ee).isEditable)return Q;let se=e.current.getCellValue(B,ee);return E===ee&&(z||H)&&(se=z?"":H),Q[ee]={value:se,error:!1,isProcessingProps:!1},Q},{});k(B,G),E&&e.current.setCellFocus(B,E)}),F=m.useCallback(P=>{const{id:B}=P,E=de(P,Rje);p(B,fn.Edit),_(B,x({mode:fn.View},E))},[p,_]),N=Vt(P=>{const{id:B,ignoreModifications:E,field:z,cellToFocusAfter:H="none"}=P;e.current.runPendingEditCellValueMutation(B);const j=()=>{H!=="none"&&z&&e.current.moveFocusToRelativeCell(B,z,H),k(B,null),_(B,null)};if(E){j();return}const G=xo(e.current.state),Q=e.current.getRow(B);if(Object.values(G[B]).some(fe=>fe.isProcessingProps)){i.current[B].mode=fn.Edit;return}if(Object.values(G[B]).some(fe=>fe.error)){i.current[B].mode=fn.Edit,_(B,{mode:fn.Edit});return}const se=e.current.getRowWithUpdatedValuesFromRowEditing(B);if(l){const fe=ve=>{i.current[B].mode=fn.Edit,_(B,{mode:fn.Edit}),u?u(ve):Oje()};try{Promise.resolve(l(se,Q)).then(ve=>{e.current.updateRows([ve]),j()}).catch(fe)}catch(ve){fe(ve)}}else e.current.updateRows([se]),j()}),V=m.useCallback(P=>{const{id:B,field:E,value:z,debounceMs:H,unstable_skipValueParser:j}=P;h(B,E);const G=e.current.getColumn(E),Q=e.current.getRow(B);let ee=z;G.valueParser&&!j&&(ee=G.valueParser(z,e.current.getCellParams(B,E)));let Y=xo(e.current.state),se=x({},Y[B][E],{value:ee,changeReason:H?"debouncedSetEditCellValue":"setEditCellValue"});return G.preProcessEditCellProps||M(B,E,se),new Promise(fe=>{const ve=[];if(G.preProcessEditCellProps){const oe=se.value!==Y[B][E].value;se=x({},se,{isProcessingProps:!0}),M(B,E,se);const ye=Y[B],we=de(ye,[E].map(fh)),me=Promise.resolve(G.preProcessEditCellProps({id:B,row:Q,props:se,hasChanged:oe,otherFieldsProps:we})).then(be=>{if(e.current.getRowMode(B)===fn.View){fe(!1);return}Y=xo(e.current.state),be=x({},be,{isProcessingProps:!1}),be.value=G.preProcessEditCellProps?Y[B][E].value:ee,M(B,E,be)});ve.push(me)}
3743Object.entries(Y[B]).forEach(([oe,ye])=>{if(oe===E)return;const we=e.current.getColumn(oe);if(!we.preProcessEditCellProps)return;ye=x({},ye,{isProcessingProps:!0}),M(B,oe,ye),Y=xo(e.current.state);const me=Y[B],be=de(me,[oe].map(fh)),ie=Promise.resolve(we.preProcessEditCellProps({id:B,row:Q,props:ye,hasChanged:!1,otherFieldsProps:be})).then(pe=>{if(e.current.getRowMode(B)===fn.View){fe(!1);return}pe=x({},pe,{isProcessingProps:!1}),M(B,oe,pe)});ve.push(ie)}),Promise.all(ve).then(()=>{e.current.getRowMode(B)===fn.Edit?(Y=xo(e.current.state),fe(!Y[B][E].error)):fe(!1)})})},[e,h,M]),$=m.useCallback(P=>{const B=xo(e.current.state),E=e.current.getRow(P);if(!B[P])return e.current.getRow(P);let z=x({},E);return Object.entries(B[P]).forEach(([H,j])=>{const G=e.current.getColumn(H);G.valueSetter?z=G.valueSetter({value:j.value,row:z}):z[H]=j.value}),z},[e]),D={getRowMode:A,startRowEditMode:R,stopRowEditMode:F},L={setRowEditingEditCellValue:V,getRowWithUpdatedValuesFromRowEditing:$};_t(e,D,"public"),_t(e,L,"private"),m.useEffect(()=>{c&&S(c)},[c,S]),Bt(()=>{const P=E1(e),B=i.current;i.current=mq(n),Object.entries(n).forEach(([E,z])=>{var H,j;const G=((H=B[E])==null?void 0:H.mode)||fn.View,Q=(j=P[E])!=null?j:E;z.mode===fn.Edit&&G===fn.View?O(x({id:Q},z)):z.mode===fn.View&&G===fn.Edit&&N(x({id:Q},z))})},[e,n,O,N])},Dje=e=>x({},e,{editRows:{}}),$je=(e,t)=>{Pje(e,t),Mje(e,t);const n=m.useRef({}),{isCellEditable:r}=t,o=m.useCallback(f=>ey(f.rowNode)||!f.colDef.editable||!f.colDef.renderEditCell?!1:r?r(f):!0,[r]),i=(f,h,p,g)=>{if(!p){g();return}if(n.current[f]||(n.current[f]={}),n.current[f][h]){const[v]=n.current[f][h];clearTimeout(v)}const b=()=>{const[v]=n.current[f][h];clearTimeout(v),g(),delete n.current[f][h]},y=setTimeout(()=>{g(),delete n.current[f][h]},p);n.current[f][h]=[y,b]};m.useEffect(()=>{const f=n.current;return()=>{Object.entries(f).forEach(([h,p])=>{Object.keys(p).forEach(g=>{const[b]=f[h][g];clearTimeout(b),delete f[h][g]})})}},[]);const s=m.useCallback((f,h)=>{if(n.current[f]){if(!h)Object.keys(n.current[f]).forEach(p=>{const[,g]=n.current[f][p];g()});else if(n.current[f][h]){const[,p]=n.current[f][h];p()}}},[]),a=m.useCallback(f=>{const{id:h,field:p,debounceMs:g}=f;return new Promise(b=>{i(h,p,g,async()=>{const y=t.editMode===Ra.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(h,p)===nn.Edit){const v=await y(f);b(v)}})})},[e,t.editMode]),l=m.useCallback((f,h)=>t.editMode===Ra.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(f,h):e.current.getRowWithUpdatedValuesFromRowEditing(f),[e,t.editMode]),u=m.useCallback((f,h)=>{var p,g;return(p=(g=xo(e.current.state)[f])==null?void 0:g[h])!=null?p:null},[e]),c={isCellEditable:o,setEditCellValue:a,getRowWithUpdatedValues:l,unstable_getEditCellMeta:u},d={runPendingEditCellValueMutation:s};_t(e,c,"public"),_t(e,d,"private")},Fje=(e,t,n)=>(n.current.caches.rows=y0({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),x({},e,{rows:eq({apiRef:n,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:null,previousTreeDepths:null})})),Lje=(e,t)=>{const n=go(e,"useGridRows"),r=Td(e,t),o=m.useRef(Date.now()),i=V2(),s=m.useCallback(N=>{const V=il(e)[N];if(V)return V;const $=e.current.getRowNode(N);return $&&ey($)?{[th]:N}:null},[e]),a=t.getRowId,l=m.useCallback(N=>th in N?N[th]:a?a(N):N.id,[a]),u=m.useMemo(()=>r.rows.reduce((N,{id:V},$)=>(N[V]=$,N),{}),[r.rows]),c=m.useCallback(({cache:N,throttle:V})=>{const $=()=>{o.current=Date.now(),e.current.setState(L=>x({},L,{rows:eq({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:xs(e),previousTreeDepths:T4(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(i.clear(),e.current.caches.rows=N,!V){$();return}const D=t.throttleRowsMs-(Date.now()-o.current);if(D>0){i.start(D,$);return}$()},[t.throttleRowsMs,t.rowCount,t.loading,e,i]),d=m.useCallback(N=>{n.debug(`Updating all rows, new length ${N.length}`);const V=y0({rows:N,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),$=e.current.caches.rows;V.rowsBeforePartialUpdates=$.rowsBeforePartialUpdates,c({cache:V,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,c,e]),f=m.useCallback(N=>{if(t.signature===Sa.DataGrid&&N.length>1)throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
3744`));const V=[];
3744N.forEach(D=>{const L=k1(D,t.getRowId,"A row was provided without id when calling updateRows():"),P=e.current.getRowNode(L);if((P==null?void 0:P.type)==="pinnedRow"){const B=e.current.caches.pinnedRows,E=B.idLookup[L];E&&(B.idLookup[L]=x({},E,D))}else V.push(D)});const $=lLe({updates:V,getRowId:t.getRowId,previousCache:e.current.caches.rows});c({cache:$,throttle:!0})},[t.signature,t.getRowId,c,e]),h=m.useCallback(()=>{const N=wm(e),V=il(e);return new Map(N.map($=>{var D;return[$,(D=V[$])!=null?D:{}]}))},[e]),p=m.useCallback(()=>oS(e),[e]),g=m.useCallback(()=>wm(e),[e]),b=m.useCallback(N=>u[N],[u]),y=m.useCallback((N,V)=>{const $=e.current.getRowNode(N);if(!$)throw new Error(`MUI: No row with id #${N} found`);if($.type!=="group")throw new Error("MUI: Only group nodes can be expanded or collapsed");const D=x({},$,{childrenExpanded:V});e.current.setState(L=>x({},L,{rows:x({},L.rows,{tree:x({},L.rows.tree,{[N]:D})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",D)},[e]),v=m.useCallback(N=>{var V;return(V=xs(e)[N])!=null?V:null},[e]),w=m.useCallback(({skipAutoGeneratedRows:N=!0,groupId:V,applySorting:$,applyFiltering:D})=>{const L=xs(e);let P;if($){const B=L[V];if(!B)return[];const E=k2(e);P=[];const z=E.findIndex(H=>H===V)+1;for(let H=z;H<E.length&&L[E[H]].depth>B.depth;H+=1){const j=E[H];(!N||!ey(L[j]))&&P.push(j)}}else P=O2(L,V,N);if(D){const B=QG(e);P=P.filter(E=>B[E]!==!1)}return P},[e]),C=m.useCallback((N,V)=>{const $=e.current.getRowNode(N);if(!$)throw new Error(`MUI: No row with id #${N} found`);if($.parent!==So)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if($.type!=="leaf")throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");e.current.setState(D=>{const L=xs(D,e.current.instanceId)[So],P=L.children,B=P.findIndex(z=>z===N);if(B===-1||B===V)return D;n.debug(`Moving row ${N} to index ${V}`);const E=[...P];return E.splice(V,0,E.splice(B,1)[0]),x({},D,{rows:x({},D.rows,{tree:x({},D.rows.tree,{[So]:x({},L,{children:E})})})})}),e.current.publishEvent("rowsSet")},[e,n]),A=m.useCallback((N,V)=>{if(t.signature===Sa.DataGrid&&V.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
3745`));if(V.length===0)return;if(iS(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const D=x({},xs(e)),L=x({},il(e)),P=x({},E1(e)),B=D[So],E=[...B.children],z=new Set;for(let j=0;j<V.length;j+=1){const G=V[j],Q=k1(G,t.getRowId,"A row was provided without id when calling replaceRows()."),[ee]=E.splice(N+j,1,Q);z.has(ee)||(delete L[ee],delete P[ee],delete D[ee]);const Y={id:Q,depth:0,parent:So,type:"leaf",groupingKey:null};L[Q]=G,P[Q]=Q,D[Q]=Y,z.add(Q)}D[So]=x({},B,{children:E});const H=E.filter(j=>D[j].type==="leaf");
3745e.current.caches.rows.dataRowIdToModelLookup=L,e.current.caches.rows.dataRowIdToIdLookup=P,e.current.setState(j=>x({},j,{rows:x({},j.rows,{dataRowIdToModelLookup:L,dataRowIdToIdLookup:P,dataRowIds:H,tree:D})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),S={getRow:s,getRowId:l,getRowModels:h,getRowsCount:p,getAllRowIds:g,setRows:d,updateRows:f,getRowNode:v,getRowIndexRelativeToVisibleRows:b,unstable_replaceRows:A},_={setRowIndex:C,setRowChildrenExpansion:y,getRowGroupChildren:w},k=m.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let N;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?N=x({},e.current.caches.rows,{updates:{type:"full",rows:wm(e)}}):N=y0({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),c({cache:N,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,c]),M=m.useCallback(N=>{N==="rowTreeCreation"&&k()},[k]),R=m.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==UFe(e)&&k()},[e,k]);rt(e,"activeStrategyProcessorChange",M),rt(e,"strategyAvailabilityChange",R);const O=m.useCallback(()=>{e.current.setState(N=>{const V=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:xs(N,e.current.instanceId),treeDepths:T4(N,e.current.instanceId),dataRowIds:wm(N,e.current.instanceId),dataRowIdToModelLo
3745okup:il(N,e.current.instanceId),dataRowIdToIdLookup:E1(N,e.current.instanceId)});return x({},N,{rows:x({},N.rows,V,{totalTopLevelRowCount:ZG({tree:V.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);z2(e,"hydrateRows",O),_t(e,S,"public"),_t(e,_,t.signature===Sa.DataGrid?"private":"public");const F=m.useRef(!0);m.useEffect(()=>{if(F.current){F.current=!1;return}const N=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,V=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,$=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(N){V||(e.current.setState(D=>x({},D,{rows:x({},D.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),$||(e.current.setState(D=>x({},D,{rows:x({},D.rows,{totalRowCount:Math.max(t.rowCount||0,D.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,D.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate());return}n.debug(`Updating all rows, new length ${t.rows.length}`),c({cache:y0({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1})},[t.rows,t.rowCount,t.getRowId,t.loading,n,c,e])},Nje=e=>{const t={[So]:x({},sLe(),{children:e})};for(let n=0;n<e.length;n+=1){const r=e[n];t[r]={id:r,depth:0,parent:So,type:"leaf",groupingKey:null}}return{groupingName:fd,tree:t,treeDepths:{0:e.length},dataRowIds:e}},Vje=({previousTree:e,actions:t})=>{const n=x({},e),r={};for(let s=0;s<t.remove.length;s+=1){const a=t.remove[s];r[a]=!0,delete n[a]}for(let s=0;s<t.insert.length;s+=1){const a=t.insert[s];n[a]={id:a,depth:0,parent:So,type:"leaf",groupingKey:null}}const o=n[So];let i=[...o.children,...t.insert];return Object.values(r).length&&(i=i.filter(s=>!r[s])),n[So]=x({},o,{children:i}),{groupingName:fd,tree:n,treeDepths:{0:i.length},dataRowIds:i}},Bje=e=>e.updates.type==="full"?Nje(e.updates.rows):Vje({previousTree:e.previousTree,actions:e.updates.actions}),jje=e=>{$1(e,fd,"rowTreeCreation",Bje)},zje={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorEquals:"Equals",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>
3745e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"},qq=e=>{if(e!==void 0)return Object.keys(e).reduce((t,n)=>x({},t,{[`${n.charAt(0).toLowerCase()}${n.slice(1)}`]:e[n]}),{})};function Uje({defaultSlots:e,slots:t,components:n}){const r=t??(n?qq(n):null);if(!r||Object.keys(r).length===0)return e;const o=x({},e);return Object.keys(r).forEach(i=>{const s=i;r[s]!==void 0&&(o[s]=r[s])}),o}const Hje=["components","componentsProps"];function Wje(e){var t;const n=Object.keys(e);if(!n.some(i=>i.startsWith("aria-")||i.startsWith("data-")))return e;const r={},o=(t=e.forwardedProps)!=null?t:{};for(let i=0;i<n.length;i+=1){const s=n[i];s.startsWith("aria-")||s.startsWith("data-")?o[s]=e[s]:r[s]=e[s]}return r.forwardedProps=o,r}function Gje(e){return m.useMemo(()=>{const{components:t,componentsProps:n}=e,r=de(e,Hje);return[t,n,Wje(r)]},[e])}const qje={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,disableMultipleRowSelection:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,disableColumnResize:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid"},dS={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,rowSelection:!0,density:"standard",disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleRowSelection:!1,disableMultipleColumnsSorting:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Ra.Cell,filterMode:"client",filterDebounceMs:150,columnHeaderHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:"client",rowHeight:52,pageSizeOptions:[25,50,100],rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingOrder:["asc","desc",null],sortingMode:"client",throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1,unstable_ignoreValueFormatterDuringExport:!1,clipboardCopyCellDelimiter:"	",rowPositionsDebounceMs:166},Kje=qq(R5e),Qje=e=>{const[t,n,r]=Gje(Je({props:e,name:"MuiDataGrid"})),o=m.useMemo(()=>x({},zje,r.localeText),[r.localeText]),i=m.useMemo(()=>Uje({defaultSlots:Kje,slots:r.slots,components:t}),[t,r.slots]);return m.useMemo(()=>{var s;return x({},dS,r,{localeText:o,slots:i,slotProps:(s=r.slotProps)!=null?s:n},qje)},[r,o,i,n])},Yje=e=>x({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}}),aB=(e,t,n)=>typeof e=="number"&&e>0?e:t,Xje=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=m.useRef(Object.create(null)),s=m.useRef(-1),a=m.useRef(!1),l=qe(e,wp),u=qe(e,br),c=qe(e,bq),d=qe(e,Ri),f=Td(e,t),h=qe(e,bp),p=aB(t.rowHeight,dS.rowHeight),g=Math.floor(p*l),b=m.useCallback(()=>{var F,N;a.current=!1;const V=L=>{i.current[L.id]||(i.current[L.id]={sizes:{baseCenter:g},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:P,needsFirstMeasurement:B,sizes:E}=i.current[L.id];let z=typeof g=="number"&&g>0?g:52;const H=E.baseCenter;if(P)z=H;else if(n){const Y=n(x({},L,{densityFactor:l}));if(Y==="auto"){if(B){const se=o?o(x({},L,{densityFactor:l})):g;z=se??g}else z=H;
3745a.current=!0,i.current[L.id].autoHeight=!0}else z=aB(Y,g),i.current[L.id].needsFirstMeasurement=!1,i.current[L.id].autoHeight=!1}else i.current[L.id].needsFirstMeasurement=!1;const j={};for(const Y in E)/^base[A-Z]/.test(Y)&&(j[Y]=E[Y]);if(j.baseCenter=z,r){var G,Q;const Y=e.current.getRowIndexRelativeToVisibleRows(L.id),se=r(x({},L,{isFirstVisible:Y===0,isLastVisible:Y===f.rows.length-1,indexRelativeToCurrentPage:Y}));j.spacingTop=(G=se.top)!=null?G:0,j.spacingBottom=(Q=se.bottom)!=null?Q:0}const ee=e.current.unstable_applyPipeProcessors("rowHeight",j,L);return i.current[L.id].sizes=ee,ee},$=[],D=f.rows.reduce((L,P)=>{$.push(L);let B=0,E=0;const z=V(P);for(const H in z){const j=z[H];/^base[A-Z]/.test(H)?B=j>B?j:B:E+=j}return L+B+E},0);h==null||(F=h.top)==null||F.forEach(L=>{V(L)}),h==null||(N=h.bottom)==null||N.forEach(L=>{V(L)}),e.current.setState(L=>x({},L,{rowsMeta:{currentPageTotalHeight:D,positions:$}})),a.current||(s.current=1/0),e.current.forceUpdate()},[e,f.rows,g,n,r,o,h,l]),y=m.useCallback(F=>{const N=i.current[F];return N?N.sizes.baseCenter:g},[g]),v=F=>{var N;return(N=i.current[F])==null?void 0:N.sizes},w=m.useCallback((F,N)=>{i.current[F].sizes.baseCenter=N,i.current[F].isResized=!0,i.current[F].needsFirstMeasurement=!1,b()},[b]),C=m.useMemo(()=>zu(b,t.rowPositionsDebounceMs),[b,t.rowPositionsDebounceMs]),A=m.useCallback((F,N,V)=>{if(!i.current[F]||!i.current[F].autoHeight)return;const $=i.current[F].sizes[`base${ge(V)}`]!==N;i.current[F].needsFirstMeasurement=!1,i.current[F].sizes[`base${ge(V)}`]=N,$&&C()},[C]),S=m.useCallback(F=>{var N;return((N=i.current[F])==null?void 0:N.autoHeight)||!1},[]),_=m.useCallback(()=>s.current,[]),k=m.useCallback(F=>{a.current&&F>s.current&&(s.current=F)},[]),M=m.useCallback(()=>{i.current={},b()},[b]);m.useEffect(()=>{b()},[g,u,c,d,b]),z2(e,"rowHeight",b);const R={unstable_setLastMeasuredRowIndex:k,unstable_getRowHeight:y,unstable_getRowInternalSizes:v,unstable_setRowHeight:w,unstable_storeRowHeightMeasurement:A,resetRowHeights:M},O={getLastMeasuredRowIndex:_,rowHasAutoHeight:S};_t(e,R,"public"),_t(e,O,"private")},Kq=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],Jje=(e,t)=>{var n;return x({},e,{rowSelection:t.rowSelection?(n=Kq(t.rowSelectionModel))!=null?n:[]:[]})},Zje=(e,t)=>{const n=go(e,"useGridSelection"),r=V=>(...$)=>{t.rowSelection&&V(...$)},o=m.useMemo(()=>Kq(t.rowSelectionModel,Oi(e.current.state)),[e,t.rowSelectionModel]),i=m.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:o,propOnChange:t.onRowSelectionModelChange,stateSelector:Oi,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableMultipleRowSelection:a,disableRowSelectionOnClick:l,isRowSelectable:u}=t,c=!a||s,d=Td(e,t),f=m.useCallback(V=>{var $;let D=V;const L=($=i.current)!=null?$:V,P=e.current.isRowSelected(V);if(P){const B=Xm(e),E=B.findIndex(H=>H===L),z=B.findIndex(H=>H===D);if(E===z)return;E>z?D=B[z+1]:D=B[z-1]}i.current=V,e.current.selectRowRange({startId:L,endId:D},!P)},[e]),h=m.useCallback(V=>{if(t.signature===Sa.DataGrid&&!t.checkboxSelection&&Array.isArray(V)&&V.length>1)throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(`
3746`));Oi(e.current.state)!==V&&(n.debug("Setting selection model"),e.current.setState(D=>x({},D,{rowSelection:t.rowSelection?V:[]})),e.current.forceUpdate())},[e,n,t.rowSelection,t.signature,t.checkboxSelection]),p=m.useCallback(V=>Oi(e.current.state).includes(V),[e]),g=m.useCallback(V=>{if(u&&!u(e.current.getRowParams(V)))return!1;const $=e.current.getRowNode(V);return!(($==null?void 0:$.type)==="footer"||($==null?void 0:$.type)==="pinnedRow")},[e,u]),b=m.useCallback(()=>dVe(e),[e]),y=m.useCallback((V,$=!0,D=!1)=>{if(e.current.isRowSelectable(V))if(i.current=V,D)n.debug(`Setting selection for row ${V}`),e.current.setRowSelectionModel($?[V]:[]);else{n.debug(`Toggling selection for row ${V}`);const P=Oi(e.current.state).filter(E=>E!==V);$&&P.push(V),(P.length<2||c)&&e.current.setRowSelectionModel(P)}},[e,n,c]),v=m.useCallback((V,$=!0,D=!1)=>{n.debug("Setting selection for several rows");const L=V.filter(E=>e.current.isRowSelectable(E));let P;if(D)P=$?L:[];else{const E=x({},O1(e));
3746L.forEach(z=>{$?E[z]=z:delete E[z]}),P=Object.values(E)}(P.length<2||c)&&e.current.setRowSelectionModel(P)},[e,n,c]),w=m.useCallback(({startId:V,endId:$},D=!0,L=!1)=>{if(!e.current.getRow(V)||!e.current.getRow($))return;n.debug(`Expanding selection from row ${V} to row ${$}`);const P=Xm(e),B=P.indexOf(V),E=P.indexOf($),[z,H]=B>E?[E,B]:[B,E],j=P.slice(z,H+1);e.current.selectRows(j,D,L)},[e,n]),C={selectRow:y,setRowSelectionModel:h,getSelectedRows:b,isRowSelected:p,isRowSelectable:g},A={selectRows:v,selectRowRange:w};_t(e,C,"public"),_t(e,A,t.signature===Sa.DataGrid?"private":"public");const S=m.useCallback(()=>{if(t.keepNonExistentRowsSelected)return;const V=Oi(e.current.state),$=il(e),D=x({},O1(e));let L=!1;V.forEach(P=>{$[P]||(delete D[P],L=!0)}),L&&e.current.setRowSelectionModel(Object.values(D))},[e,t.keepNonExistentRowsSelected]),_=m.useCallback((V,$)=>{const D=$.metaKey||$.ctrlKey,L=!s&&!D&&!YLe($),P=!c||L,B=e.current.isRowSelected(V);P?e.current.selectRow(V,L?!0:!B,!0):e.current.selectRow(V,!B,!1)},[e,c,s]),k=m.useCallback((V,$)=>{var D;if(l)return;const L=(D=$.target.closest(`.${re.cell}`))==null?void 0:D.getAttribute("data-field");if(L===Cp.field||L===B2)return;if(L){const B=e.current.getColumn(L);if((B==null?void 0:B.type)===cS)return}e.current.getRowNode(V.id).type!=="pinnedRow"&&($.shiftKey&&(c||s)?f(V.id):_(V.id,$))},[l,c,s,e,f,_]),M=m.useCallback((V,$)=>{if(c&&$.shiftKey){var D;(D=window.getSelection())==null||D.removeAllRanges()}},[c]),R=m.useCallback((V,$)=>{$.nativeEvent.shiftKey?f(V.id):e.current.selectRow(V.id,V.value)}
3746,[e,f]),O=m.useCallback(V=>{const D=t.checkboxSelectionVisibleOnly&&t.pagination?wq(e):Xm(e),L=br(e);e.current.selectRows(D,V.value,(L==null?void 0:L.items.length)>0)},[e,t.checkboxSelectionVisibleOnly,t.pagination]),F=m.useCallback((V,$)=>{if(e.current.getCellMode(V.id,V.field)!==nn.Edit&&!uv($)){if(R1($.key)&&$.shiftKey){const D=ri(e);if(D&&D.id!==V.id){$.preventDefault();const L=e.current.isRowSelected(D.id);if(!c){e.current.selectRow(D.id,!L,!0);return}const P=e.current.getRowIndexRelativeToVisibleRows(D.id),B=e.current.getRowIndexRelativeToVisibleRows(V.id);let E,z;P>B?L?(E=B,z=P-1):(E=B,z=P):L?(E=P+1,z=B):(E=P,z=B);const H=d.rows.slice(E,z+1).map(j=>j.id);e.current.selectRows(H,!L);return}}if($.key===" "&&$.shiftKey){$.preventDefault(),_(V.id,$);return}$.key==="a"&&($.ctrlKey||$.metaKey)&&($.preventDefault(),v(e.current.getAllRowIds(),!0))}},[e,_,v,d.rows,c]);rt(e,"sortedRowsSet",r(S)),rt(e,"rowClick",r(k)),rt(e,"rowSelectionCheckboxChange",r(R)),rt(e,"headerSelectionCheckboxChange",O),rt(e,"cellMouseDown",r(M)),rt(e,"cellKeyDown",r(F)),m.useEffect(()=>{o!==void 0&&e.current.setRowSelectionModel(o)},[e,o,t.rowSelection]),m.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const N=o!=null;m.useEffect(()=>{if(N||!t.rowSelection)return;const V=Oi(e.current.state);if(g){const $=V.filter(D=>g(D));$.length<V.length&&e.current.setRowSelectionModel($)}},[e,g,N,t.rowSelection]),m.useEffect(()=>{if(!t.rowSelection||N)return;const V=Oi(e.current.state);!c&&V.length>1&&e.current.setRowSelectionModel([])},[e,c,s,N,t.rowSelection])},eze=e=>{const{classes:t}=e;return m.useMemo(()=>Re({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},At,t),[t])},tze=(e,t)=>{const n={classes:t.classes},r=eze(n),o=m.useCallback(i=>{const s=x({},Cp,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,l=i.lookup[ql]!=null;return a&&!l?(i.lookup[ql]=s,i.orderedFields=[ql,...i.orderedFields]):!a&&l?(delete i.lookup[ql],i.orderedFields=i.orderedFields.filter(u=>u!==ql)):a&&l&&(i.lookup[ql]=x({},s,i.lookup[ql])),i},[e,r,t.checkboxSelection]);mr(e,"hydrateColumns",o)},nze=(e,t)=>{var n,r,o;const i=(n=(r=t.sortModel)!=null?r:(o=t.initialState)==null||(o=o.sorting)==null?void 0:o.sortModel)!=null?n:[];return x({},e,{sorting:{sortModel:Cq(i,t.disableMultipleColumnsSorting),sortedRows:[]}})},rze=(e,t)=>{var n;const r=go(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:Ri,changeEvent:"sortModelChange"});const o=m.useCallback((S,_)=>{const k=Ri(e),M=k.findIndex(O=>O.field===S);let R=[...k];return M>-1?_?R.splice(M,1,_):R.splice(M,1):R=[...k,_],R},[e]),i=m.useCallback((S,_)=>{var k;const R=Ri(e).find(F=>F.field===S.field);if(R){var O;const F=_===void 0?$4((O=S.sortingOrder)!=null?O:t.sortingOrder,R.sort):_;return F==null?void 0:x({},R,{sort:F})}return{field:S.field,sort:_===void 0?$4((k=S.sortingOrder)!=null?k:t.sortingOrder):_}},[e,t.sortingOrder]),s=m.useCallback((S,_)=>_==null||_.sortable===!1?S:(_.sortingOrder||t.sortingOrder).some(M=>
3746!!M)?[...S,"columnMenuSortItem"]:S,[t.sortingOrder]),a=m.useCallback(()=>{e.current.setState(S=>{if(t.sortingMode==="server")return r.debug("Skipping sorting rows as sortingMode = server"),x({},S,{sorting:x({},S.sorting,{sortedRows:O2(xs(e),So,!1)})});const _=Ri(S,e.current.instanceId),k=gVe(_,e),M=e.current.applyStrategyProcessor("sorting",{sortRowList:k});return x({},S,{sorting:x({},S.sorting,{sortedRows:M})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,r,t.sortingMode]),l=m.useCallback(S=>{Ri(e)!==S&&(r.debug("Setting sort model"),e.current.setState(D4(S,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,r,t.disableMultipleColumnsSorting]),u=m.useCallback((S,_,k)=>{if(!S.sortable)return;const M=i(S,_);let R;!k||t.disableMultipleColumnsSorting?R=M?[M]:[]:R=o(S.field,M),e.current.setSortModel(R)},[e,o,i,t.disableMultipleColumnsSorting]),c=m.useCallback(()=>Ri(e),[e]),d=m.useCallback(()=>P2(e).map(_=>_.model),[e]),f=m.useCallback(()=>k2(e),[e]),h=m.useCallback(S=>e.current.getSortedRowIds()[S],[e]);_t(e,{getSortModel:c,getSortedRows:d,getSortedRowIds:f,getRowIdFromRowIndex:h,setSortModel:l,sortColumn:u,applySorting:a},"public");const g=m.useCallback((S,_)=>{var k;const M=Ri(e);return!_.exportOnlyDirtyModels||t.sortModel!=null||((k=t.initialState)==null||(k=k.sorting)==null?void 0:k.sortModel)!=null||M.length>0?x({},S,{sorting:{sortModel:M}}):S},[e,t.sortModel,(n=t.initialState)==null||(n=n.sorting)==null?void 0:n.sortModel]),b=m.useCallback((S,_)=>{var k;const M=(k=_.stateToRestore.sorting)==null?void 0:k.sortModel;return M==null?S:(e.current.setState(D4(M,t.disableMultipleColumnsSorting)),x({},S,{callbacks:[...S.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),y=m.useCallback(S=>{const _=xs(e),k=_[So],M=S.sortRowList?S.sortRowList(k.children.map(R=>_[R])):[...k.children];return k.footerId!=null&&M.push(k.footerId),M},[e]);mr(e,"exportState",g),mr(e,"restoreState",b),$1(e,fd,"sorting",y);const v=m.useCallback(({colDef:S},_)=>{const k=_.shiftKey||_.metaKey||_.ctrlKey;u(S,void 0,k)},[u]),w=m.useCallback(({colDef:S},_)=>{GLe(_.key)&&!_.ctrlKey&&!_.metaKey&&u(S,void 0,_.shiftKey)},[u]),C=m.useCallback(()=>{const S=Ri(e),_=vp(e);if(S.length>0){const k=S.filter(M=>_[M.field]);k.length<S.length&&e.current.setSortModel(k)}},[e]),A=m.useCallback(S=>{S==="sorting"&&e.current.applySorting()},[e]);mr(e,"columnMenu",s),rt(e,"columnHeaderClick",v),rt(e,"columnHeaderKeyDown",w),rt(e,"rowsSet",e.current.applySorting),rt(e,"columnsChange",C),rt(e,"activeStrategyProcessorChange",A),cv(()=>{e.current.applySorting()}),Bt(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function lB(e){const{clientHeight:t,scrollTop:n,offsetHeight:r,offsetTop:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o<n)return o}const oze=(e,t)=>{const n=Zn(),r=go(e,"useGridScroll"),o=e.current.columnHeadersElementRef,i=e.current.virtualScrollerRef,s=qe(e,Ju),a=m.useCallback(d=>{const f=oS(e),h=Fr(e);if(!(d.rowIndex==null)&&f===0||h.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let g={};if(d.colIndex!=null){const w=Oh(e);let C;if(typeof d.rowIndex<"u"){var b;const A=(b=s[d.rowIndex])==null?void 0:b.id,S=e.current.unstable_getCellColSpanInfo(A,d.colIndex);S&&!S.spannedByColSpan&&(C=S.cellProps.width)}typeof C>"u"&&(C=h[d.colIndex].computedWidth),g.left=lB({clientHeight:i.current.clientWidth,scrollTop:Math.abs(i.current.scrollLeft),offsetHeight:C,offsetTop:w[d.colIndex]})}if(d.rowIndex!=null){var y,v;const w=ry(e.current.state),C=aVe(e),A=lVe(e),S=t.pagination?d.rowIndex-C*A:d.rowIndex,_=w.positions[S+1]?w.positions[S+1]-w.positions[S]:w.currentPageTotalHeight-w.positions[S],k=((y=i.current.querySelector(`.${re["pinnedRows--top"]}`))==null?void 0:y.clientHeight)||0,M=((v=i.current.querySelector(`.${re["pinnedRows--bottom"]}`))==null?void 0:v.clientHeight)||0;g.top=lB({clientHeight:i.current.clientHeight-k-M,scrollTop:i.current.scrollTop,offsetHeight:_,offsetTop:w.positions[S]})}return g=e.current.unstable_applyPipeProcessors("scrollToIndexes",g,d),typeof g.left!==void 0||typeof g.top!==void 0?(e.current.scroll(g),!0):!1},[r,e,i,t.pagination,s]),l=m.useCallback(d=>
3746{if(i.current&&d.left!=null&&o.current){const f=n.direction==="rtl"?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=f*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!=null&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n.direction,o,r]),u=m.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);_t(e,{scroll:l,scrollToIndexes:a,getScrollPosition:u},"public")};function ize(e,t){bn(e,"columnHeaderClick",t.onColumnHeaderClick),bn(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),bn(e,"columnHeaderOver",t.onColumnHeaderOver),bn(e,"columnHeaderOut",t.onColumnHeaderOut),bn(e,"columnHeaderEnter",t.onColumnHeaderEnter),bn(e,"columnHeaderLeave",t.onColumnHeaderLeave),bn(e,"cellClick",t.onCellClick),bn(e,"cellDoubleClick",t.onCellDoubleClick),bn(e,"cellKeyDown",t.onCellKeyDown),bn(e,"preferencePanelClose",t.onPreferencePanelClose),bn(e,"preferencePanelOpen",t.onPreferencePanelOpen),bn(e,"menuOpen",t.onMenuOpen),bn(e,"menuClose",t.onMenuClose),bn(e,"rowDoubleClick",t.onRowDoubleClick),bn(e,"rowClick",t.onRowClick),bn(e,"stateChange",t.onStateChange)}const sze=({content:e,container:t,scrollBarSize:n})=>{const r=e.width>t.width,o=e.height>t.height;let i=!1,s=!1;return(r||o)&&(i=r,s=e.height+(i?n:0)>t.height,s&&(i=e.width+n>t.width)),{hasScrollX:i,hasScrollY:s}};function aze(e,t){const n=go(e,"useResizeContainer"),r=m.useRef(!1),o=m.useRef(null),i=m.useRef(null),s=qe(e,ry),a=qe(e,wp),l=Math.floor(t.rowHeight*a),u=j2(e,t.columnHeaderHeight),c=m.useCallback(()=>{var _;const k=(_=e.current.rootElementRef)==null?void 0:_.current,M=A2(e),R=tq(e);if(!o.current)return;let O;if(t.scrollbarSize!=null)O=t.scrollbarSize;else if(!M||!k)O=0;else{const B=un(k).createElement("div");B.style.width="99px",B.style.height="99px",B.style.position="absolute",B.style.overflow="scroll",B.className="scrollDiv",k.appendChild(B),O=B.offsetWidth-B.clientWidth,k.removeChild(B)}let F,N,V;if(t.autoHeight)V=!1,N=Math.round(M)>Math.round(o.current.width),F={width:o.current.width,height:s.currentPageTotalHeight+(N?O:0)};else{F={width:o.current.width,height:Math.max(o.current.height-u,0)};const P=sze({content:{width:Math.round(M),height:s.currentPageTotalHeight},container:{width:Math.round(F.width),height:F.height-R.top-R.bottom},scrollBarSize:O});V=P.hasScrollY,N=P.hasScrollX}const $={width:F.width-(V?O:0),height:F.height-(N?O:0)},D={viewportOuterSize:F,viewportInnerSize:$,hasScrollX:N,hasScrollY:V,scrollBarSize:O},L=i.current;i.current=D,(D.viewportInnerSize.width!==(L==null?void 0:L.viewportInnerSize.width)||D.viewportInnerSize.height!==(L==null?void 0:L.viewportInnerSize.height))&&e.current.publishEvent("viewportInnerSizeChange",D.viewportInnerSize)},[e,t.scrollbarSize,t.autoHeight,s.currentPageTotalHeight,u]),[d,f]=m.useState(),h=m.useMemo(()=>zu(f,60),[]),p=m.useRef();Bt(()=>{d&&(c(),e.current.publishEvent("debouncedResize",o.current))},[e,d,c]);const g=m.useCallback(()=>{e.current.computeSizeAndPublishResizeEvent()},[e]),b=m.useCallback(()=>i.current,[]),y=m.useCallback(()=>{const _=e.current.getRootDimensions();if(!_)return 0;const k=M1(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const R=e.current.getRenderContext(),O=R.lastRowIndex-R.firstRowIndex;return Math.min(O-1,k.rows.length)}const M=Math.floor(_.viewportInnerSize.height/l);return Math.min(M,k.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,l]),v=m.useCallback(()=>{var _,k,M;const R=(_=e.current.mainElementRef)==null?void 0:_.current;if(!R)return;const F=vi(R).getComputedStyle(R),N=parseFloat(F.height)||0,V=parseFloat(F.width)||0,$=N!==((k=p.current)==null?void 0:k.height),D=V!==((M=p.current)==null?void 0:M.width);if(!p.current||$||D){const L={width:V,height:N};e.current.publishEvent("resize",L),p.current=L}},[e]),w={resize:g,getRootDimensions:b},C={getViewportPageSize:y,updateGridDimensionsRef:c,computeSizeAndPublishResizeEvent:v};_t(e,w,"public"),_t(e,C,"private");const A=m.useRef(!0),S=m.useCallback(_=>{o.current=_;const k=/jsdom/.test(window.navigator.userAgent);if(_.height===0&&!r.current&&!t.autoHeight&&!k&&(n.error(["The parent DOM element of the data grid has an empty he
3746ight.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(`
3747`)),r.current=!0),_.width===0&&!r.current&&!k&&(n.error(["The parent DOM element of the data grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(`
3748`)),r.current=!0),A.current){f(_),A.current=!1;return}h(_)},[t.autoHeight,h,n]);Bt(()=>c(),[c]),bn(e,"sortedRowsSet",c),bn(e,"paginationModelChange",c),bn(e,"columnsChange",c),rt(e,"resize",S),bn(e,"debouncedResize",t.onResize)}const lze=e=>{const t=m.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=m.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(s=>{s()}),e.current.forceUpdate()},[e]);_t(e,{exportState:t,restoreState:n},"public")},Mo=(e,t,n)=>{const r=m.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};var w0=(e=>(e.Twitter="twitter",e.LinkedIn="linkedin",e.Facebook="facebook",e.Instagram="instagram",e.Bluesky="bluesky",e))(w0||{});const kf={fr:{system:"Tu organises une conférence et tu écris des posts sur XSOCIALX dans lequels tu veux annoncer une session, teaser son contenu et son présentateur de manière brève et qui donne envie d'en savoir plus.",user:`Génère moi un post pour annoncer la session suivante :
3749Titre : XTITLEX
3750Résumé : XABSTRACTX
3751Catégorie : XCATEGORYX
3752Niveau : XLEVELX
3753Présentateur(s) : XPRESENTERX
3754Tags : XTAGSX
3755Format : XFORMATX`},en:{system:"You are organizing a conference and you are writing posts on XSOCIALX in which you want to announce a session, tease its content and its presenter in a brief way that makes you want to know more.",user:`Generate a post to announce the following session:
3756Title: XTITLEX
3757Abstract: XABSTRACTX
3758Category: XCATEGORYX
3759Level: XLEVELX
3760Presenter(s): XPRESENTERX
3761Tags: XTAGSX
3762Format: XFORMATX`}},Qq={model:Ac.model,temperature:`${Ac.temperature}`,sessions:{teasingPromptSystem:kf.fr.system,teasingPromptUser:kf.fr.user}},uze=async(e,t,n,r,o,i=Ac)=>{const s=r.replace("XSOCIALX",t),a=o.replace("XTITLEX",n.title).replace("XABSTRACTX",n.abstract||"").replace("XCATEGORYX",n.category||"").replace("XLEVELX",n.level||"").replace("XPRESENTERX",(n.speakersData||[]).map(l=>l.name).join(", ")).replace("XTAGSX",(n.tags||[]).join(", ")).replace("XFORMATX",n.format||"");return _1.apiKey=e,_1.chat.completions.create({messages:[{role:"system",content:s},{role:"user",content:a}],model:i.model,temperature:hq(i.temperature)?i.temperature:parseFloat(i.temperature)}).then(l=>l.choices[0].message.content)},cze=4,EE=D$e(cze),uB=async(e,t,n)=>{const r=t.aiSettings.sessions.teasingPromptSystem,o=t.aiSettings.sessions.teasingPromptUser,i={model:t.aiSettings.model,temperature:t.aiSettings.temperature},s=e.filter(f=>!f.teasingHidden),a=s.length;if(!t.openRouterApiKey||!a)return{success:!1,message:"No sessions to generate or no OpenRouter API key",results:[]};const l=s.flatMap(f=>Object.keys(w0).map(h=>EE(async()=>await uze(t.openRouterApiKey,w0[h],f,r,o,i)).then(p=>({social:w0[h],session:f,result:p})))),u=l.length,c=setInterval(()=>{const f=u-EE.pendingCount-EE.activeCount;n(u,f)},1e3),d=await Promise.all(l);return clearInterval(c),{success:!0,results:s.map(f=>({baseSession:f,updatedSession:{id:f.id,teasingPosts:{...f.teasingPosts}},social:""})).map(f=>(d.forEach(h=>{h.session.id===f.baseSession.id&&(f.updatedSession.teasingPosts||(f.updatedSession.teasingPosts={}),f.updatedSession.teasingPosts[h.social]=h.result,f.social=h.result||"")}),f))}},dze="Top picks",fze="All models",hze=fT({stringify:e=>`${e.model.name??""} ${e.id}`}),cB=e=>{if(e==null)return null;const t=Number(e);if(!Number.isFinite(t))return null;if(t===0)return"$0";const n=t*1e6;let r;return n>=1?r=n.toFixed(2).replace(/\.?0+$/,""):n>=.01?r=n.toFixed(3).replace(/\.?0+$/,""):r=n.toExponential(1),`$${r}`},pze=e=>{var r,o;const t=cB((r=e.pricing)==null?void 0:r.prompt)??"?",n=cB((o=e.pricing)==null?void 0:o.completion)??"?";return`${t} in / ${n} out · /Mtok`},mze=e=>{if(!e)return null;const t=new Date(e*1e3);return Number.isNaN(t.getTime())?null:t.toISOString().slice(0,10)};function gze({name:e,label:t,helperText:n,placeholder:r,disabled:o,required:i,models:s,margin:a="dense",variant:l="filled"}){const{control:u}=hp(),c=m.useMemo(()=>hFe(s),[s]),d=m.useMemo(()=>{const h=s.map(p=>({id:p.id,isTop:c.has(p.id),model:p}));return h.sort((p,g)=>p.isTop!==g.isTop?p.isTop?-1:1:p.id.localeCompare(g.id)),h},[s,c]),f=m.useMemo(()=>{const h=new Map;for(const p of d)h.set(p.id,p);return h},[d]);return I(XW,{name:e,control:u,rules:{required:i},render:({field:{value:h,onChange:p,onBlur:g,ref:b},fieldState:{error:y}})=>{const v=typeof h=="string"?h:"",w=f.get(v);return I(vy,{freeSolo:!0,autoHighlight:!0,options:d,filterOptions:hze,disabled:o,value:w??v,onChange:(C,A)=>{A==null?p(""):p(typeof A=="string"?A:A.id)},onInputChange:(C,A,S)=>{S==="input"&&p(A),S==="clear"&&p("")},onBlur:g,isOptionEqualToValue:(C,A)=>typeof A=="string"?C.id===A:C.id===A.id,getOptionLabel:C=>typeof C=="string"?C:C.id,groupBy:C=>C.isTop?dze:fze,renderOption:(C,A)=>{const S=A.model,_=mze(S.created);return jX(Me,{component:"li",...C,key:A.id},J(Me,{sx:{display:"flex",flexDirection:"column",flexGrow:1,minWidth:0},children:[I(Ae,{variant:"body2",sx:{fontWeight:A.isTop?600:400,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:S.name||S.id}
3762),J(Ae,{variant:"caption",color:"text.secondary",sx:{display:"block",fontSize:"0.7rem"},children:[S.id,_?` · ${_}`:""," · ",pze(S)]})]}))},renderInput:C=>I(es,{...C,inputRef:b,margin:a,variant:l,label:t,placeholder:r,helperText:(y==null?void 0:y.message)??n,error:!!y,required:i,disabled:o,fullWidth:!0})})}})}const yze=({event:e,onValuesChange:t})=>{var a,l,u,c;const n=Zx(jr(cn.events,e.id)),r=La({defaultValues:{teasingPromptSystem:((a=e.aiSettings)==null?void 0:a.sessions.teasingPromptSystem)||kf.fr.system,teasingPromptUser:((l=e.aiSettings)==null?void 0:l.sessions.teasingPromptUser)||kf.fr.user,model:((u=e.aiSettings)==null?void 0:u.model)||Ac.model,temperature:((c=e.aiSettings)==null?void 0:c.temperature)||Ac.temperature}}),o=cFe(e.openRouterAPIKey||""),{formState:i}=r,s=m.useRef(t);return s.current=t,m.useEffect(()=>{if(!s.current)return;const d=e.aiSettings??Qq,f=p=>{const g=p.temperature===void 0||p.temperature===null||p.temperature==="";return{model:p.model||d.model,temperature:g?d.temperature:`${p.temperature}`,sessions:{teasingPromptSystem:p.teasingPromptSystem||d.sessions.teasingPromptSystem,teasingPromptUser:p.teasingPromptUser||d.sessions.teasingPromptUser}}};s.current(f(r.getValues()));const h=r.watch(p=>{s.current&&s.current(f(p))});return()=>h.unsubscribe()},[r,e.aiSettings]),I(Me,{padding:2,borderRadius:2,border:1,borderColor:"#66666688",mt:2,mb:2,children:J(Ol,{formContext:r,onSuccess:async d=>{const f={...e.aiSettings,sessions:{teasingPromptSystem:d.teasingPromptSystem,teasingPromptUser:d.teasingPromptUser},model:d.model,temperature:`${d.temperature}`};return n.mutate({aiSettings:f})},children:[I(Ae,{component:"h6",variant:"h6",children:"ShortVid settings"}),J(Ye,{container:!0,spacing:2,children:[J(Ye,{item:!0,xs:12,md:6,children:[I(it,{margin:"dense",required:!0,fullWidth:!0,multiline:!0,label:"System prompt",name:"teasingPromptSystem",variant:"filled",disabled:i.isSubmitting}),I(it,{margin:"dense",required:!0,fullWidth:!0,multiline:!0,label:"User prompt",name:"teasingPromptUser",variant:"filled",disabled:i.isSubmitting})]}),J(Ye,{item:!0,xs:12,sm:6,children:[I(gze,{name:"model",label:"Model",helperText:"See model list at https://openrouter.ai/models",disabled:i.isSubmitting,required:!0,models:o}),I(it,{margin:"dense",required:!0,fullWidth:!0,type:"number",InputProps:{inputProps:{min:0,max:1,step:.1}},label:"Temperature",helperText:"from 0 to 1, lower temperature means more conservative predictions, it follows the prompt more closely, higher temperature means more creative predictions.",name:"temperature",variant:"filled",disabled:i.isSubmitting}),I(gt,{variant:"outlined",onClick:()=>{r.reset({teasingPromptSystem:kf.fr.system,teasingPromptUser:kf.fr.user,model:Ac.model,temperature:Ac.temperature})},children:"Reset to default"})]}),J(Ye,{item:!0,xs:12,children:[I(xi,{type:"submit",disabled:i.isSubmitting,loading:i.isSubmitting,variant:"contained",children:"Save"}),n.error&&I(Ae,{color:"error",children:n.error.message})]})]}),I(Pd,{})]})})},vze=({isOpen:e,onClose:t,event:n,sessions:r,onSuccess:o,forceGenerate:i=!1})=>{const{createNotification:s}=pp(),a=m.useRef(n.aiSettings||Qq),l=()=>({aiSettings:a.current,openRouterApiKey:n.openRouterAPIKey}),{generatingState:u,generate:c}=Jw(n,uB),d=Jw(n,uB),f=r.filter(b=>!b.teasingHidden),h=()=>{const b=!o;d.generate(f,b,l()).then(({results:y,success:v})=>{o&&v&&y.length&&o(y[0].updatedSession.teasingPosts),t(),s("Generation done, sessions updated!",{type:"success"})})},p=`Generate content on ${f.length} sessions (takes times)`,g=J(gt,{variant:"contained",disabled:d.generatingState.generationState===Cs.GENERATING,onClick:h,children:[d.generatingState.generationState==="GENERATING"?J(Ft,{children:["Generating...",I(Qn,{})]}):p,d.generatingState.progress&&` (${d.generatingState.progress})`]});return I(Qh,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,scroll:"body",children:J(Yh,{sx:{minHeight:"80vh"},children:[I(Ae,{variant:"h5",children:"Generate media content for sessions"}),J(Ae,{children:["This will generate post content via OpenRouter using the configured model.",I("br",{})]}),I(yze,{event:n,onValuesChange:b=>{a.current=b}}),!n.openRouterAPIKey&&J(Ae,{children:["You need to set up an OpenRouter API key in the event settings to use this feature.",I(gt,{href:"/settings",children:"Go to event settings"})]}),!i&&J(gt,{variant:"outlined",disabled:u.generationState===Cs.GENERATING,sx:{marginRight:2},onClick:()=>c(f.slice(0,1),!1,l()),children:[u.generationState==="GENERATING"?J(Ft,{children:["Generating...",I(Qn,{})]}):"Generate preview",u.progress&&` (${u.progress})`]}),g,u.generationState===Cs.ERROR&&I(Ae,{color:"error",children:u.message}),u.generationState===Cs.SUCCESS&&J(Ft,{children:[I(Ae,{color:"success",children:u.message}),I(Me,{padding:2,border:1,borderColor:"#66666688",borderRadius:4,margin:2,children:u.results&&u.results.results.flatMap((b,y)=>b.updatedSession.teasingPosts&&Object.keys(b.updatedSession.teasingPosts).map(v=>{const w=b.updatedSession.teasingPosts,C=v,A=w&&w[C]?w[C]:"???";return J(Me,{children:[J(Ae,{variant:"h6",children:["• ",v]},y),I(Ae,{children:A})]},v+y)}))}),g]})]})})},Dh="Buffer",bze=`https://publish.${Dh}.com/all-channels?tab=drafts`,wze=async e=>{try{const t=new URL(cl);t.pathname+=`v1/${e.eventId}/bupher/draft-post`,t.searchParams.append("apiKey",e.apiKey);const n=new FormData;if(n.append("profiles",JSON.stringify(e.profiles)),e.content)n.append("text",e.content);else if(e.contentMap)n.append("contentMap",JSON.stringify(e.contentMap));else return{success:!1,error:"No content provided"};n.append("file",e.file),e.thumbnailFile&&n.append("thumbnailFile",e.thumbnailFile);const r=await fetch(t.href,{method:"POST",body:n});return r.ok?{success:!0,draftId:(await r.json()).draftId}:{success:!1,error:(await r.json().catch(()=>({}))).message||`HTTP error ${r.status}: ${r.statusText}`}}catch(t){return console.error("Error posting draft to Bupher:",t),{success:!1,error:t instanceof Error?t.message:"Unknown error"}}},$h={login:async(e,t,n,r)=>{const o=new URL(cl);o.pathname+=`v1/${e}/bupher/login`,o.searchParams.append("apiKey",t);try{const i=await fetch(o.href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,password:r})});return i.ok?await i.json():{success:!1,error:(await i.json()).error||`Error: ${i.statusText}`}}catch(i){return{success:!1,error:`Error: ${i.message}`}}},getChannels:async(e,t)=>{const n=new URL(cl);return n.pathname+=`v1/${e}/bupher/channels`,n.searchParams.append("apiKey",t),await(await fetch(n.href,{method:"GET",headers:{"Content-Type":"application/json"}})).json()},getScheduledPosts:async(e,t)=>{const n=new URL(cl);return n.pathname+=`v1/${e}/bupher/scheduled-posts`,n.searchParams.append("apiKey",t),await(await fetch(n.href,{method:"GET",headers:{"Content-Type":"application/json"}})).json()},postDraftPost:async(e,t,n,r,o,i)=>{try{const s={eventId:e,apiKey:t,profiles:n,file:o};return typeof r=="string"?s.content=r:s.contentMap=r,i&&(s.thumbnailFile=i),await wze(s)}catch(s){return console.error("Error posting draft to Bupher:",s),{success:!1,error:s 
3762instanceof Error?s.message:"Unknown error"}}}},dB=async e=>{const t=await fetch(e);if(!t.ok)throw console.error("Failed to fetch video or image",t),new Error("Failed to fetch video or image, see logs for details");const n=await t.blob(),r=n.type||"image/png",o=r.split("/")[1]||"png",i=`${r.split("/")[0]}.${o}`;return new File([n],i,{type:r})},Cze=({event:e,session:t})=>{const[n,r]=m.useState(!1),[o,i]=m.useState(null),[s,a]=m.useState(null),l=m.useCallback(async()=>{var c;r(!0),i(null),a(null);try{const d=await $h.getChannels(e.id,e.apiKey||"");if(!d.success){i(d.error||"Failed to fetch channels");return}const h=d.channels.map(y=>({id:y.id,type:y.type}));if(h.filter(y=>["youtube","tiktok"].includes(y.type)).length>0){i("YouTube and TikTok are not supported yet, please fill an issue on Github");return}const g=h.filter(y=>{var w;const v=y.type;return((w=t.teasingPosts)==null?void 0:w[v])!==void 0});if(g.length===0){i("No text content found for any of the supported channels");return}const b=t.teaserVideoUrl||t.teaserImageUrl;if(!b){i("No image or video found, if you want to post without media, open a Github issue please");return}try{const y=await dB(b);let v;if(t.teaserVideoUrl&&t.teaserImageUrl)try{v=await dB(t.teaserImageUrl)}catch(S){console.warn("Failed to fetch thumbnail image:",S)}const w={};let C=!1;for(const S of g){const _=S.type,k=(c=t.teasingPosts)==null?void 0:c[_];k&&(w[S.id]=k,C=!0)}if(!C){i("No valid content found for any of the supported channels");return}const A=await $h.postDraftPost(e.id,e.apiKey||"",g,w,y,v);if(!A.success){i("Failed to post to Bupher: "+(A.error||"Unknown error"));return}a(`${g.length} draft(s) saved`)}catch(y){console.error("Error posting to Bupher:",y),i(`Error posting to Bupher: ${y instanceof Error?y.message:"Unknown error"}`)}}catch(d){i(d instanceof Error?d.message:"An error occurred")}finally{r(!1)}},[e,t]),u=m.useCallback(()=>{window.open(bze,"_blank","noopener,noreferrer")},[]);return J(Me,{display:"flex",flexDirection:"column",children:[I(gt,{onClick:l,disabled:n,startIcon:n?I(Qn,{size:20,color:"inherit"}):s?I(z7,{color:"success"}):null,children:s||`Send to ${Dh}`}),o&&I(so,{severity:"error",children:o}),s&&I(Me,{mt:1,children:J(gt,{variant:"text",color:"primary",onClick:u,startIcon:I(W7,{}),size:"small",children:["View drafts in ",Dh]})})]})},xze=({event:e,session:t,onSubmit:n})=>{var v,w,C,A,S;const r=d2(e.id),[o,i]=Da(),[s,a]=m.useState(!1),[l,u]=m.useState(!1),[c,d]=m.useState(!!(t!=null&&t.teasingPosts)),f=((v=e.tracks.find(_=>_.id===(t==null?void 0:t.trackId)))==null?void 0:v.name)||null,h=La({defaultValues:t?{...t,track:f,category:t.category||void 0,format:t.format||void 0,language:t.language||void 0,level:t.level||void 0,note:t.note||void 0,showInFeedback:t.showInFeedback||!1,teasingHidden:t.teasingHidden||!1,hideTrackTitle:t.hideTrackTitle||!1}:{showInFeedback:!0,hideTrackTitle:!1,teasingHidden:!1}}),{formState:p}=h,g=p.isSubmitting,b=(w=t==null?void 0:t.dates)!=null&&w.start?a4((C=t.dates)==null?void 0:C.start):"not set",y=(A=t==null?void 0:t.dates)!=null&&A.end?a4((S=t.dates)==null?void 0:S.end):"not set";return J(Ol,{formContext:h,onSuccess:async _=>{var M,R,O,F,N,V,$,D,L,P;const k={linkedin:((M=_.teasingPosts)==null?void 0:M.linkedin)||null,twitter:((R=_.teasingPosts)==null?void 0:R.twitter)||null,instagram:((O=_.teasingPosts)==null?void 0:O.instagram)||null,facebook:((F=_.teasingPosts)==null?void 0:F.facebook)||null,bluesky:((N=_.teasingPosts)==null?void 0:N.bluesky)||null};return n({title:_.title,speakers:_.speakers||[],abstract:_.abstract,format:_.format,category:_.category,hideTrackTitle:_.hideTrackTitle,showInFeedback:_.showInFeedback,imageUrl:_.imageUrl,videoLink:_.videoLink,presentationLink:_.presentationLink,language:_.language,level:_.level,note:_.note,teasingHidden:_.teasingHidden,teasingPosts:k,extendHeight:_.extendHeight,extendWidth:_.extendWidth,teaserVideoUrl:_.teaserVideoUrl,teaserImageUrl:_.teaserImageUrl,announcedOn:{twitter:((V=_.announcedOn)==null?void 0:V.twitter)||!1,linkedin:(($=_.announcedOn)==null?void 0:$.linkedin)||!1,facebook:((D=_.announcedOn)==null?void 0:D.facebook)||!1,instagram:((L=_.announcedOn)==null?void 0:L.instagram)||!1,bluesky:((P=_.announcedOn)==null?void 0:P.bluesky)||!1}})},children:[J(Ye,{container:!0,spacing:4,children:[J(Ye,{item:!0,xs:12,md:6,children:[I(it,{margin:"dense",required:!!t,fullWidth:!0,label:"ID",name:"id",variant:"filled",disabled:!0,size:"small"}),I(it,{margin:"dense",required:!0,fullWidth:!0,label:"title",name:"title",variant:"filled",disabled:g}),r.isLoading||!r.data?I(Qn,{}):I(uAe,{name:"speakers",label:"Speakers",multiple:!0,matchId:!0,options:r.data.map(_=>({id:_.id,label:_.name,photoUrl:_.photoUrl||""})),textFieldProps:{variant:"filled",margin:"dense"},autocompleteProps:{renderTags:(_,k)=>_.map((M,R)=>I(Ps,{avatar:I(by,{alt:M==null?void 0:M.label,src:(M==null?void 0:M.photoUrl)||void 0}),label:(M==null?void 0:M.label)||"Deleted",onClick:()=>{i(`/speakers/${M==null?void 0:M.id}?fromSession=${t==null?void 0:t.id}`)},sx:{cursor:"pointer"},...k({index:R})}))}}),I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"Abstract",name:"abstract",variant:"filled",disabled:g,size:"small"}),I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"Note (private, for organisers)",name:"note",variant:"filled",disabled:g})]}),J(Ye,{item:!0,xs:12,md:6,children:[J(Ae,{gutterBottom:!0,children:["Start at: ",b,I("br",{}),"End at: ",y,I("br",{}),"Last for ",I("b",{children:t==null?void 0:t.durationMinutes})," minutes in track ",I("b",{children:f||"not set"})]}),I("br",{}),J(Ye,{container:!0,spacing:4,children:[I(Ye,{item:!0,xs:12,md:6,children:I(jw,{label:"Format",name:"format",fullWidth:!0,margin:"dense",variant:"filled",options:e.formats.map(_=>({id:_.id,label:`${_.name} (${_.durationMinutes} min)`}))})}),I(Ye,{item:!0,xs:12,md:6,children:I(jw,{label:"Category",name:"category",fullWidth:!0,margin:"dense",variant:"filled",options:e.categories.map(_=>({id:_.id,label:_.name}))})})]}),J(Ye,{container:!0,spacing:4,children:[I(Ye,{item:!0,xs:12,md:6,children:I(it,{label:"Language",name:"language",variant:"filled",margin:"dense",fullWidth:!0,disabled:g})}),I(Ye,{item:!0,xs:12,md:6,children:I(it,{label:"Level",name:"level",variant:"filled",margin:"dense",fullWidth:!0,disabled:g})})]}),J(Ye,{container:!0,spacing:4,children:[I(Ye,{item:!0,xs:12,md:6,children:I(it,{label:"Presentation URL",name:"presentationLink",variant:"filled",margin:"dense",fullWidth:!0,disabled:g})}),I(Ye,{item:!0,xs:12,md:6,children:I(it,{label:"Video URL",name:"videoLink",variant:"filled",margin:"dense",fullWidth:!0,disabled:g})})]}),I(Ye,{container:!0,spacing:4,children:I(Ye,{item:!0,xs:12,md:6,children:I(Rh,{event:e,margin:"dense",fullWidth:!0,label:"Image URL",name:"imageUrl",variant:"filled",disabled:g,maxImageSize:1500,fileSuffix:t==null?void 0:t.t
3762itle})})}),J(Ye,{container:!0,spacing:4,children:[I(Ye,{item:!0,xs:12,md:6,children:I(it,{margin:"dense",fullWidth:!0,label:"Extend Width",name:"extendWidth",variant:"filled",disabled:g,type:"number"})}),I(Ye,{item:!0,xs:12,md:6,children:I(it,{label:"Extend height",name:"extendHeight",variant:"filled",margin:"dense",fullWidth:!0,disabled:g,type:"number"})})]}),I(Ul,{label:"Hide track title",name:"hideTrackTitle"}),I(Ul,{label:"Show in feedback",name:"showInFeedback"}),I(Ul,{label:"Don't share this session on socials",name:"teasingHidden"})]}),I(Ye,{item:!0,xs:12,children:J(Ye,{container:!0,spacing:1,children:[J(Ye,{item:!0,xs:12,sx:{flexDirection:"row",alignItems:"center",display:"flex"},children:[I(Ae,{variant:"h6",children:"Talk announcements"}),I(Zt,{onClick:()=>d(!c),children:I(H7,{})}),I(gt,{onClick:()=>a(!0),children:"Generate media"}),I(gt,{onClick:()=>u(!0),children:"Generate text"}),t&&I(Cze,{event:e,session:t})]}),c&&J(Ft,{children:[I(Ye,{item:!0,xs:12,sm:6,children:I(S$e,{margin:"dense",fullWidth:!0,minRows:4,maxRows:40,label:"Teaser video url",name:"teaserVideoUrl",variant:"filled",disabled:!1,filePrefix:(t==null?void 0:t.id)||(t==null?void 0:t.title)||void 0})}),I(Ye,{item:!0,xs:12,sm:6,children:I(Rh,{event:e,margin:"dense",fullWidth:!0,minRows:4,maxRows:40,label:"Teaser image url",name:"teaserImageUrl",variant:"filled",fileSuffix:"session-"+(t==null?void 0:t.title),disabled:!1})}),I(Ye,{item:!0,xs:12,md:6,children:I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"LinkedIn teasing post",name:"teasingPosts.linkedin",variant:"filled",disabled:!1})}),I(Ye,{item:!0,xs:12,md:6,children:I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"Twitter teasing post",name:"teasingPosts.twitter",variant:"filled",disabled:!1})}),I(Ye,{item:!0,xs:12,md:6,children:I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"Instagram teasing post",name:"teasingPosts.instagram",variant:"filled",disabled:!1})}),I(Ye,{item:!0,xs:12,md:6,children:I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"Facebook teasing post",name:"teasingPosts.facebook",variant:"filled",disabled:!1})}),I(Ye,{item:!0,xs:12,md:6,children:I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"Bluesky teasing post",name:"teasingPosts.bluesky",variant:"filled",disabled:!1})})]})]})}),J(Ye,{item:!0,xs:12,children:[I(Ye,{container:!0,spacing:1}),I(Ae,{variant:"h6",children:"Announced on:"}),J(Ye,{container:!0,spacing:2,children:[I(Ye,{item:!0,xs:3,children:I(Ul,{label:"Twitter",name:"announcedOn.twitter"})}),I(Ye,{item:!0,xs:3,children:I(Ul,{label:"LinkedIn",name:"announcedOn.linkedin"})}),I(Ye,{item:!0,xs:3,children:I(Ul,{label:"Facebook",name:"announcedOn.facebook"})}),I(Ye,{item:!0,xs:3,children:I(Ul,{label:"Instagram",name:"announcedOn.instagram"})}),I(Ye,{item:!0,xs:3,children:I(Ul,{label:"Bluesky",name:"announcedOn.bluesky"})})]})]}),I(Ye,{item:!0,xs:12,children:I(xi,{type:"submit",disabled:p.isSubmitting,loading:p.isSubmitting,fullWidth:!0,variant:"contained",sx:{mt:2,mb:2},children:t?"Save":"Add session"})})]}),s&&I(T$e,{isOpen:s,onClose:()=>{a(!1)},event:e,sessions:t?[t]:[],forceGenerate:!0,onSuccess:({imageUrl:_,videoUrl:k})=>{h.setValue("teaserImageUrl",_),h.setValue("teaserVideoUrl",k)}}),l&&I(vze,{isOpen:l,onClose:()=>{u(!1)},event:e,sessions:t?[t]:[],forceGenerate:!0,onSuccess:_=>{Object.keys(_).forEach(k=>{h.setValue(`teasingPosts.${k}`,_[k])})}}),I(Pd,{})]})},Sze=({event:e})=>{var o;const[t,n]=Da(),r=Jx(cn.sessions(e.id));return I(pi,{maxWidth:"lg",sx:{mt:4,mb:4},children:J(bd,{sx:{paddingX:2},children:[I(gt,{href:"/sessions",startIcon:I(mp,{}),children:"Cancel"}),I(Ae,{variant:"h2",children:"New session"}),I(xze,{event:e,onSubmit:i=>{if(!i.title){alert("Title is required");return}return r.mutate({...i,tags:[]}).then(()=>{n("/sessions")})}}),r.isError&&J(Ae,{color:"error",children:["Error while adding session: ",(o=r.error)==null?void 0:o.message]})]})})},_ze=({control:e,isSubmitting:t})=>{const{fields:n,append:r,remove:o}=n7({control:e,name:"socials",keyName:"key"});return J(Ft,{children:[I(Ae,{fontWeight:"600",mt:2,children:"Socials"}),J(Me,{paddingLeft:2,children:[n.map((i,s)=>J(Me,{display:"flex",children:[I(it,{id:i.key,label:"Social name",name:`socials.${s}.name`,control:e,variant:"filled",size:"small",margin:"dense",disabled:t}),I(it,{id:i.key,label:"Icon",name:`socials.${s}.icon`,control:e,variant:"filled",size:"small",margin:"dense",disabled:t}),I(it,{id:i.key,label:"URL",name:`socials.${s}.link`,control:e,variant:"filled",size:"small",margin:"dense",disabled:t}),I(Zt,{"aria-label":"Remove social",onClick:()=>{o(s)},edge:"end",children:I(U7,{})})]},i.key)),I(Zt,{"aria-label":"Add social",onClick:()=>{r({name:"",icon:"",link:""})},children:I(j7,{})})]})]})},c6e=()=>{const e=Zn();return Hh(e.breakpoints.down("sm"))},Eze=()=>{const e=Zn();return Hh(e.breakpoints.down("md"))},Ize=e=>e.replace(/[^\d+*#]/g,""),Yq=({speaker:e,onSubmit:t,event:n,rightColumns:r})=>{const o=n.speakerCustomFields||[],i=o.reduce((g,b)=>(g[b.id]=b.type==="boolean"?!1:"",g),{}),s=La({defaultValues:e?{...e,customFields:{...i,...e.customFields||{}}}:{customFields:i}}),{formState:a,control:l,watch:u}=s,c=a.isSubmitting,d=Eze(),f=u("phone"),h=o.filter(g=>g.privacy!=="private"),p=o.filter(g=>g.privacy==="private");return J(Ol,{formContext:s,onSuccess:async g=>{var y;
3762!g.id&&(e!=null&&e.id)&&(g.id=e.id);const b={};for(const v of o){const w=(y=g.customFields)==null?void 0:y[v.id];b[v.id]=v.type==="boolean"?!!w:w||""}return t({...g,jobTitle:g.jobTitle||(e==null?void 0:e.jobTitle)||null,company:g.company||(e==null?void 0:e.company)||null,companyLogoUrl:g.companyLogoUrl||(e==null?void 0:e.companyLogoUrl)||null,email:g.email||(e==null?void 0:e.email)||null,phone:g.phone||(e==null?void 0:e.phone)||null,geolocation:g.geolocation||(e==null?void 0:e.geolocation)||null,photoUrl:g.photoUrl||(e==null?void 0:e.photoUrl)||null,note:g.note||(e==null?void 0:e.note)||null,pronouns:g.pronouns||(e==null?void 0:e.pronouns)||null,customFields:b})},children:[J(Ye,{container:!0,spacing:4,children:[J(Ye,{item:!0,xs:12,md:6,children:[e&&I(it,{margin:"dense",required:!!e,fullWidth:!0,label:"ID",name:"id",variant:"filled",disabled:!0,size:"small"}),J(Ye,{container:!0,spacing:1,children:[I(Ye,{item:!0,xs:9,children:I(it,{margin:"dense",required:!0,fullWidth:!0,label:"Name",name:"name",variant:"filled",disabled:c,size:"small"})}),I(Ye,{item:!0,xs:3,children:I(it,{margin:"dense",fullWidth:!0,label:"Pronoun(s)",name:"pronouns",variant:"filled",disabled:c,size:"small"})})]}),I(it,{margin:"dense",fullWidth:!0,label:"Job title",name:"jobTitle",variant:"filled",disabled:c,size:"small"}),I(it,{margin:"dense",fullWidth:!0,label:"Company",name:"company",variant:"filled",disabled:c,size:"small"}),I(Rh,{event:n,margin:"dense",fullWidth:!0,label:"Company Logo Url",name:"companyLogoUrl",variant:"filled",disabled:c,size:"small"}),I(Rh,{event:n,margin:"dense",fullWidth:!0,label:"Photo URL",name:"photoUrl",variant:"filled",disabled:c,size:"small"}),I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"Bio",name:"bio",variant:"filled",disabled:c,size:"small"}),I(it,{margin:"dense",fullWidth:!0,label:"Geolocation (place)",name:"geolocation",variant:"filled",disabled:c,size:"small"}),I(_ze,{control:l,isSubmitting:c}),h.length>0&&J(Ft,{children:[I(Ae,{fontWeight:"600",mt:2,mb:1,children:"Custom fields (public)"}),h.map(g=>g.type==="boolean"?I(Ec,{label:g.name,name:`customFields.${g.id}`},g.id):I(it,{margin:"dense",fullWidth:!0,label:g.name,name:`customFields.${g.id}`,variant:"filled",disabled:c,size:"small"},g.id))]})]}),J(Ye,{item:!0,xs:12,md:6,children:[I(it,{margin:"dense",fullWidth:!0,label:"Email (private)",name:"email",variant:"filled",disabled:c,size:"small",type:"email"}),I(it,{margin:"dense",fullWidth:!0,label:"Phone (private)",name:"phone",variant:"filled",disabled:c,size:"small",type:"tel",InputProps:d&&f?{endAdornment:I(Ou,{position:"end",children:I(CT,{title:"Call",children:I(Zt,{"aria-label":"Call phone number",href:`tel:${Ize(f)}`,edge:"end",children:I(rPe,{})})})})}:void 0}),I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:4,maxRows:40,label:"Note (private)",name:"note",variant:"filled",disabled:c,size:"small"}),p.length>0&&J(Ft,{children:[I(Ae,{fontWeight:"600",mt:2,mb:1,children:"Custom fields (private)"}),p.map(g=>g.type==="boolean"?I(Ec,{label:g.name,name:`customFields.${g.id}`},g.id):I(it,{margin:"dense",fullWidth:!0,label:g.name,name:`customFields.${g.id}`,variant:"filled",disabled:c,size:"small"},g.id))]}),r]}),I(Ye,{item:!0,xs:12,children:I(xi,{type:"submit",disabled:a.isSubmitting,loading:a.isSubmitting,fullWidth:!0,variant:"contained",sx:{mt:2,mb:2},children:e?"Save":"Add speaker"})})]}),I(Pd,{})]})},Aze=({event:e})=>{var u;const[t,n]=Da(),r=Jx(cn.speakers(e.id)),[o,i]=m.useState(!1),[s,a]=m.useState(null),l=c=>r.mutate({name:c.name,bio:c.bio||null,email:c.email||null,phone:c.phone||null,jobTitle:c.jobTitle||null,company:c.company||null,companyLogoUrl:c.companyLogoUrl||null,geolocation:c.geolocation||null,photoUrl:c.photoUrl||null,note:c.note||null,socials:c.socials}).then(()=>{n("/speakers")});return J(pi,{maxWidth:"lg",sx:{mt:4,mb:4},children:[J(bd,{sx:{paddingX:2},children:[I(gt,{href:"/speakers",startIcon:I(mp,{}),children:"Cancel"}),I(Ae,{variant:"h2",children:"New speaker"}),I(Yq,{event:e,onSubmit:c=>c.email?l(c):(a(c),i(!0),Promise.resolve())}),r.isError&&J(Ae,{color:"error",children:["Error while adding speaker: ",(u=r.error)==null?void 0:u.message]})]}),J(Qh,{open:o,onClose:()=>i(!1),children:[I(zC,{children:"Add a speaker without email?"}),I(Yh,{children:I(oU,{children:"Adding an email address for the speaker is recommended for better communication. Would you like to proceed without an email or go back and add one?"})}),J(jC,{children:[I(gt,{onClick:()=>i(!1),children:"Go Back"}),I(gt,{variant:"contained",onClick:()=>{i(!1),s&&l(s)},autoFocus:!0,children:"Proceed Without Email"})]})]})]})},kze=(e,t)=>
3762FO(jr(cn.speakers(e),t),!0),Pze=({open:e,handleClose:t,title:n,children:r,acceptButton:o,cancelButton:i,handleAccept:s,disabled:a,loading:l,fullWidth:u,maxWidth:c})=>J(Qh,{open:e,onClose:t,fullWidth:u,maxWidth:c,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[I(zC,{id:"alert-dialog-title",children:n}),I(Yh,{children:r}),J(jC,{children:[I(gt,{onClick:t,children:i}),o&&I(xi,{onClick:s,disabled:a,loading:l,autoFocus:!0,variant:"contained",children:o})]})]}),Tze=(e,t,n)=>n.map(r=>({...r,speakersData:t.data&&r.speakers?r.speakers.map(o=>t.data?t.data[o]:void 0).filter(o=>!!o):void 0,formatText:Xq(e,r),categoryObject:e.categories?e.categories.find(o=>r.category===o.id):null})),d6e=e=>Ml(cn.sessions(e),!0),f6e=e=>{const t=e.id,n=uG(t),r=Ml(cn.sessions(t),!0);return{...r,data:Tze(e,n,r.data||[])}},Xq=(e,t)=>{const n=(e.formats||[]).find(r=>t.format===r.id);return n?`${n.name} (${n.durationMinutes} min)`:null},Rze=(e,t,n)=>n.map(r=>({...r,speakersData:t.data&&r.speakers?r.speakers.map(o=>t.data?t.data[o]:void 0).filter(o=>!!o):void 0,formatText:Xq(e,r),categoryObject:e.categories?e.categories.find(o=>r.category===o.id):null})),Oze=(e,t)=>{const n=e.id,r=uG(n),o=qy(cn.sessions(n),S9("speakers","array-contains",t)),i=Ml(o,!0);return{...i,data:Rze(e,r,i.data||[])}},Mze=({event:e,speaker:t})=>{const n=Oze(e,t.id);return J(Al,{fullWidth:!0,disabled:n.isLoading,sx:{mt:3},children:[I(wy,{id:"speaker-sessions-label",sx:{fontWeight:"bold",mb:1},children:"Speaker's Sessions"}),n.isLoading&&J(Me,{sx:{display:"flex",alignItems:"center",gap:1,ml:1},children:[I(Qn,{size:20}),I(Ae,{variant:"body2",color:"text.secondary",children:"Loading sessions..."})]}),n.error&&J(wd,{error:!0,children:["Error loading sessions: ",n.error.toString()]}),!n.isLoading&&n.data&&n.data.length===0&&I(Ae,{variant:"body2",color:"text.secondary",sx:{ml:1},children:"No sessions found for this speaker."}),!n.isLoading&&n.data&&n.data.length>0&&I(Me,{sx:{display:"flex",flexWrap:"wrap",gap:1,p:1,borderBottom:"1px solid",borderColor:"divider",borderTopLeftRadius:4,borderTopRightRadius:4,backgroundColor:"action.hover"},children:n.data.map(r=>I(Ps,{label:r.title,component:Mu,href:`/sessions/${r.id}?fromSpeaker=${t.id}`,sx:{cursor:"pointer"},color:"primary",variant:"outlined",size:"small"},r.id))})]})},Dze=({event:e})=>{var y;const[t,n]=Eg("/:routeName/:speakerId/*?"),[r,o]=Da(),i=d2(e.id),s=n==null?void 0:n.speakerId,[a,l]=m.useState(!1),u=g$e(jr(cn.speakers(e.id),s)),c=Zx(jr(cn.speakers(e.id),s));if(!s)return null;const d=kze(e.id,s);if(d.isLoading||!d.data)return I(s2,{hookResult:d});const f=d.data,h=()=>{if(!i.data)return[null,null];const v=i.data.findIndex(A=>A.id===s);let w=null,C=null;return i.data[v-1]&&(w=`/speakers/${i.data[v-1].id}`),i.data[v+1]&&(C=`/speakers/${i.data[v+1].id}`),[w,C]},[p,g]=h(),b=lG().fromSession;return J(pi,{maxWidth:"lg",sx:{mt:4,mb:4},children:[J(Me,{display:"flex",justifyContent:"space-between",mt:2,children:[I(gt,{onClick:()=>{o(b?`/sessions/${b}`:"/speakers")},startIcon:I(mp,{}),children:b?"To session":"All speaker"}),J(Me,{display:"flex",alignItems:"center",children:[J(Ae,{children:[i.data?i.data.findIndex(v=>v.id===s)+1:0,"/",i.data?i.data.length:0]}),I(Zt,{href:p||"",component:Mu,disabled:!p,children:I(Yke,{})}),I(Zt,{href:g||"",component:Mu,disabled:!g,children:I(Xke,{})})]})]}),J(bd,{sx:{paddingX:2},children:[I(Ae,{variant:"h2",children:f.name}),I(Yq,{event:e,speaker:f,onSubmit:v=>c.mutate(v),rightColumns:I(Mze,{event:e,speaker:f})}),c.isError&&J(Ae,{color:"error",children:["Error while saving speaker: ",(y=c.error)==null?void 0:y.message]})]}),I(Me,{mt:2,children:I(gt,{color:"warning",onClick:()=>l(!0),children:"Delete speaker"})}),I(Pze,{open:a,title:"Delete this speaker?",acceptButton:"Delete speaker",disabled:u.isLoading,loading:u.isLoading,cancelButton:"cancel",handleClose:()=>l(!1),handleAccept:async()=>{await u.mutate(),l(!1),o("/speakers")},children:J(oU,{id:"alert-dialog-description",children:[" ","Delete the speaker ",f.name," from this event (not the speaker's session(s))"]})})]},s)},W2=e=>{const[t,n]=m.useState({isLoggedIn:e.bupherSession!==void 0,isLoading:!1,error:null});return m.useEffect(()=>{e&&n(i=>i.isLoading?i:{...i,isLoggedIn:e.bupherSession!==void 0})},[e]),{...t,login:async(i,s)=>{if(!(e!=null&&e.apiKey))return n({isLoggedIn:!1,isLoading:!1,error:"No API key found for this event"}),!1;n(a=>({...a,isLoading:!0,error:null}));try{const a=await $h.login(e.id,e.apiKey,i,s);return a.success?(n({isLoggedIn:!0,isLoading:!1,error:null,cookies:a.cookies}),!0):(n({isLoggedIn:!1,isLoading:!1,error:a.error||"Login failed"}),!1)}catch(a){return n({isLoggedIn:!1,isLoading:!1,error:a instanceof Error?a.message:"Failed to login"}),!1}},logout:()=>{n({isLoggedIn:!1,isLoading:!1,error:null,cookies:void 0})}}},$ze=({open:e,onClose:t,onLogin:n,isLoading:r,error:o})=>{const[i,s]=m.useState(""),[a,l]=m.useState(""),u=async()=>{await n(i,a)&&(s(""),l(""))};return J(Qh,{open:e,onClose:t,children:[J(zC,{children:["Login to ",Dh]}),J(Yh,{children:[o&&I(so,{severity:"error",sx:{mb:2},children:o}),J(Me,{component:"form",sx:{mt:2},onSubmit:c=>{c.preventDefault(),u()},children:[I(es,{autoFocus:!0,margin:"dense",label:"Email",type:"email",fullWidth:!0,value:i,onChange:c=>s(c.target.value),disabled:r}),I(es,{margin:"dense",label:"Password",type:"password",fullWidth:!0,value:a,onChange:c=>l(c.target.value),disabled:r})]})]}),J(jC,{children:[I(gt,{onClick:t,disabled:r,children:"Cancel"}),I(gt,{onClick:u,variant:"contained",disabled:r||!i||!a,startIcon:r?I(Qn,{size:20}):null,children:r?"Logging in...":"Login"})]})]})},Jq=e=>{const[t,n]=m.useState({channels:[],isLoaded:!1,isLoading:!1,error:null}),r=W2(e),o=m.useCallback(async()=>{n(s=>({...s,isLoading:!0,error:null}));try{const s=await $h.getChannels(e.id,e.apiKey||"");return s.success?(n({channels:s.channels,isLoaded:!0,isLoading:!1,error:null}),!0):(n(a=>({...a,isLoading:!1,error:s.error||"Failed to fetch channels"})),!1)}catch(s){return n(a=>
3762({...a,isLoading:!1,error:s instanceof Error?s.message:"Failed to fetch channels"})),!1}},[e.id,e.apiKey,r.isLoggedIn]);return m.useEffect(()=>{r.isLoggedIn&&!t.isLoaded&&!t.isLoading&&!t.error&&o()},[r.isLoggedIn,t.isLoaded,t.isLoading,o,t.error]),{...t,fetchChannels:o,refreshChannels:()=>(n(s=>({...s,isLoaded:!1})),o())}},Fze=(e,t)=>{switch(e.toLowerCase()){case"twitter":return`https://twitter.com/${t}`;case"instagram":return`https://instagram.com/${t}`;case"facebook":return`https://facebook.com/${t}`;case"linkedin":return`https://linkedin.com/in/${t}`;case"youtube":return`https://youtube.com/${t}`;case"tiktok":return`https://tiktok.com/@${t}`;case"bluesky":return`https://bsky.app/profile/${t}`;default:return`https://${e}.com/${t}`}},Lze=({event:e})=>{const{channels:t,isLoading:n,error:r}=Jq(e);return n?I(Qn,{}):J(Me,{sx:{mt:2},children:[I(Ae,{variant:"h6",gutterBottom:!0,children:"Social Channels"}),r&&I(so,{severity:"error",sx:{mb:2},children:r}),t&&t.length>0?I(UC,{sx:{bgcolor:"background.paper"},children:t.map((o,i)=>J(ot.Fragment,{children:[J(gU,{alignItems:"flex-start",sx:{textDecoration:"none",color:"text.primary","&:hover":{bgcolor:"action.hover"}},children:[I(yU,{children:I(by,{alt:o.formatted_username,src:o.avatarUrl,sx:{bgcolor:"primary.main"},children:!o.avatarUrl&&o.type.charAt(0).toUpperCase()})}),I(mi,{primary:I(Me,{sx:{display:"flex",alignItems:"center"},children:J(Me,{component:"a",href:Fze(o.type,o.handle),target:"_blank",rel:"noopener noreferrer",sx:{display:"flex",alignItems:"center",color:"inherit",textDecoration:"none",cursor:"pointer"},children:[I(Ae,{component:"span",variant:"body1",color:"text.primary",children:o.formatted_username}),I(W7,{fontSize:"small",sx:{ml:.5,fontSize:"0.875rem"}})]})}),secondary:I(Ae,{component:"span",variant:"body2",color:"text.secondary",children:o.type.charAt(0).toUpperCase()+o.type.slice(1)})})]}),i<t.length-1&&I(Sg,{variant:"inset",component:"li"})]},`${o.type}-${o.handle}`))}):!r&&I(Ae,{variant:"body2",color:"text.secondary",children:"No social channels available."})]})},Nze=e=>{const[t,n]=m.useState({posts:[],isLoaded:!1,isLoading:!1,error:null}),r=W2(e),o=m.useCallback(async()=>{n(s=>({...s,isLoading:!0,error:null}));try{const s=await $h.getScheduledPosts(e.id,e.apiKey||"");return s.success?(n({posts:s.posts,isLoaded:!0,isLoading:!1,error:null}),!0):(n(a=>({...a,isLoading:!1,error:s.error||"Failed to fetch scheduled posts"})),!1)}catch(s){return n(a=>({...a,isLoading:!1,error:s instanceof Error?s.message:"Failed to fetch channels"})),!1}},[e.id,e.apiKey,r.isLoggedIn]);return m.useEffect(()=>{r.isLoggedIn&&!t.isLoaded&&!t.isLoading&&!t.error&&o()},[r.isLoggedIn,t.isLoaded,t.isLoading,o,t.error]),{...t,fetchPosts:o,refreshPosts:()=>(n(s=>({...s,isLoaded:!1})),o())}},Vze=e=>e.charAt(0).toUpperCase(),Bze=({event:e})=>{const{posts:t,isLoading:n,error:r}=Nze(e),[o,i]=ot.useState(0);if(n)return I(Qn,{});const s=t.filter(g=>g.status==="draft"),a=t.filter(g=>g.status!=="draft"),l=g=>{const b=g.reduce((v,w)=>{const C=w.scheduledAt?tt.fromISO(w.scheduledAt).toFormat("yyyy-MM-dd"):"No Date";return v[C]||(v[C]=[]),v[C].push(w),v},{}),y=Object.keys(b).sort((v,w)=>v==="No Date"?1:w==="No Date"?-1:tt.fromFormat(v,"yyyy-MM-dd").toMillis()-tt.fromFormat(w,"yyyy-MM-dd").toMillis());return{grouped:b,sortedDates:y}},{grouped:u,sortedDates:c}=l(a),{grouped:d,sortedDates:f}=l(s),h=(g,b)=>{i(b)},p=(g,b)=>b.length===0?I(Ae,{variant:"body2",color:"text.secondary",sx:{mt:2},children:"No posts available."}):b.map(y=>J(Me,{sx:{mb:3},children:[J(Me,{sx:{fontWeight:"bold",mb:1,display:"flex",alignItems:"center"},children:[I(Ae,{variant:"subtitle1",component:"span",children:y==="No Date"?"No Date":tt.fromFormat(y,"yyyy-MM-dd").toFormat("EEEE, MMMM d, yyyy")}),I(Ps,{label:`${g[y].length} post${g[y].length>1?"s":""}`,size:"small",sx:{ml:1}})]}),I(UC,{sx:{bgcolor:"background.paper"},children:g[y].map((v,w)=>J(ot.Fragment,{children:[I(fo,{elevation:1,sx:{mb:1,p:1},children:J(gU,{alignItems:"flex-start",children:[I(yU,{children:I(by,{sx:{bgcolor:"primary.main"},children:Vze(v.service)})}),J(Me,{sx:{flex:1},children:[J(Me,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[I(Ae,{variant:"body1",color:"text.primary",children:v.channelName||v.service}),v.scheduledAt&&I(Ae,{variant:"caption",color:"text.secondary",children:tt.fromISO(v.scheduledAt).toFormat("h:mm a")})]}),J(Me,{sx:{mt:1}
3762,children:[I(Ae,{variant:"body2",color:"text.primary",sx:{display:"block",whiteSpace:"pre-wrap",mb:v.imageUrl?1:0},children:v.text}),v.imageUrl&&I(Me,{component:"img",src:v.imageUrl,alt:"Post image",sx:{maxWidth:"100%",maxHeight:200,borderRadius:1,mt:1}})]})]})]})}),w<g[y].length-1&&I(Me,{sx:{my:1}})]},v.id))})]},y));return J(Me,{sx:{mt:2},children:[r&&I(so,{severity:"error",sx:{mb:2},children:r}),t.length===0&&!r?I(Ae,{variant:"body2",color:"text.secondary",children:"No posts available."}):J(Me,{sx:{width:"100%"},children:[I(Me,{sx:{borderBottom:1,borderColor:"divider"},children:J(hpe,{value:o,onChange:h,"aria-label":"post tabs",children:[I(U$,{label:J(Me,{sx:{display:"flex",alignItems:"center"},children:[I(Ae,{children:"Scheduled"}),I(Ps,{label:a.length,size:"small",sx:{ml:1}})]}),id:"tab-0","aria-controls":"tabpanel-0"}),I(U$,{label:J(Me,{sx:{display:"flex",alignItems:"center"},children:[I(Ae,{children:"Drafts"}),I(Ps,{label:s.length,size:"small",sx:{ml:1}})]}),id:"tab-1","aria-controls":"tabpanel-1"})]})}),I(Me,{role:"tabpanel",hidden:o!==0,id:"tabpanel-0","aria-labelledby":"tab-0",sx:{py:2},children:p(u,c)}),I(Me,{role:"tabpanel",hidden:o!==1,id:"tabpanel-1","aria-labelledby":"tab-1",sx:{py:2},children:p(d,f)})]})]})},jze=e=>{const[t,n]=m.useState({isLoading:!1,error:null});return{post:m.useCallback(async(o,i,s)=>{n(l=>({...l,isLoading:!0,error:null}));const a=await $h.postDraftPost(e.id,e.apiKey||"",o,i,s);return a.success?!0:(n(l=>({...l,isLoading:!1,error:a.error||"Unknown error"})),!1)},[e]),...t}},zze=({event:e,refreshPosts:t})=>{const[n,r]=m.useState(!1),{channels:o,isLoading:i,error:s}=Jq(e),{post:a,isLoading:l,error:u}=jze(e),c=async()=>{if(!e.logoUrl){alert("No logo URL available");return}r(!0);try{const f=await(await fetch(e.logoUrl)).blob(),h=new File([f],"logo.png",{type:"image/png"});await a(o==null?void 0:o.map(g=>({id:g.id,type:g.type})),"Hello at "+new Date().toLocaleString(),h)?t():alert("Failed to create post")}catch(d){console.error("Error downloading logo:",d),alert("Failed to download logo")}finally{r(!1)}};return I(bd,{sx:{maxWidth:400,margin:"20px auto"},children:I($se,{children:I(Me,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:e.logoUrl?J(Ft,{children:[I("img",{src:e.logoUrl,alt:`${e.name} logo`,style:{maxWidth:"100px",maxHeight:"100px",objectFit:"contain"}}),I(gt,{variant:"contained",onClick:c,disabled:n,children:n?"Posting...":`Test draft post to ${o==null?void 0:o.map(d=>d.handle).join(", ")}`})]}):I(Ae,{color:"text.secondary",children:"No logo available for this event"})})})})},Uze=({event:e})=>{const[t,n]=m.useState(!1),[r,o]=m.useState(null),{isLoggedIn:i,isLoading:s,error:a,login:l,logout:u}=W2(e);return m.useEffect(()=>{!s&&i&&!a&&n(!1)},[i,s]),J(pi,{maxWidth:"lg",sx:{mt:4,mb:4},children:[I(Ae,{gutterBottom:!0,children:"Manage your social publication right from OpenPlanner."}),I($ze,{open:t&&!i,onClose:()=>n(!1),onLogin:async(d,f)=>await l(d,f),isLoading:s,error:a}),i?J(Me,{sx:{display:"flex",gap:2},children:[J(Me,{sx:{flex:1},children:[J(so,{severity:"success",sx:{mb:2},children:["You are logged in to ",Dh,"!","  ",I(gt,{variant:"outlined",onClick:u,children:"Logout"})]}),I(Bze,{event:e},r)]}),J(Me,{sx:{flex:1},children:[I(Lze,{event:e}),I(zze,{event:e,refreshPosts:()=>o(Date.now().toString())})]})]}):J(gt,{variant:"contained",onClick:()=>n(!0),children:["Login to ",Dh]})]})},Hze=[{id:"EUR",label:"€ EUR"},{id:"USD",label:"$ USD"},{id:"GBP",label:"£ GBP"},{id:"CHF",label:"CHF"}],Wze={EUR:"€",USD:"$",GBP:"£",CHF:"CHF"},Gze=({event:e,ticket:t,onSubmit:n})=>{const r=l=>l?tt.isDateTime(l)?l.toFormat("yyyy-LL-dd'T'HH:mm"):l instanceof Date?tt.fromJSDate(l).toFormat("yyyy-LL-dd'T'HH:mm"):typeof l=="string"?tt.fromISO(l).toFormat("yyyy-LL-dd'T'HH:mm"):"":"",o=l=>{if(!l)return null;const u=tt.fromISO(l);return u.isValid?u:null},i=La({defaultValues:t?{...t,startDate:r(t.startDate),endDate:r(t.endDate)}:{name:"",price:0,currency:"EUR",url:"",ticketsCount:0,startDate:"",endDate:"",message:"",available:!0,soldOut:!1,highlighted:!1,displayNewsletterRegistration:!1}}),{formState:s}=i,a=s.isSubmitting;return J(Ol,{formContext:i,onSuccess:async l=>{const u={name:l.name,price:Number(l.price)||0,currency:l.currency||"EUR",url:l.url||"",ticketsCount:Number(l.ticketsCount)||0,startDate:o(l.startDate),endDate:o(l.endDate),message:l.message||"",available:l.available??!0,soldOut:l.soldOut??!1,highlighted:l.highlighted??!1,displayNewsletterRegistration:l.displayNewsletterRegistration??!1};return n(t?{id:t.id,...u}:u)},children:[J(Ye,{container:!0,spacing:4,children:[J(Ye,{item:!0,xs:12,md:6,children:[t&&I(it,{margin:"dense",fullWidth:!0,label:"ID",name:"id",variant:"filled",disabled:!0,size:"small"}),I(it,{margin:"dense",fullWidth:!0,required:!0,label:"Ticket Type Name",name:"name",variant:"filled",disabled:a}),J(Ye,{container:!0,spacing:2,children:[I(Ye,{item:!0,xs:8,children:I(it,{margin:"dense",fullWidth:!0,required:!0,label:"Price",name:"price",type:"number",variant:"filled",disabled:a,InputProps:{startAdornment:I(Ou,{position:"start",children:Wze[i.watch("currency")]||"€"})}})}),I(Ye,{item:!0,xs:4,children:I(jw,{margin:"dense",fullWidth:!0,required:!0,label:"Currency",name:"currency",variant:"filled",disabled:a,options:Hze})})]}),I(it,{margin:"dense",fullWidth:!0,required:!0,label:"Sale URL",name:"url",variant:"filled",disabled:a}),I(it,{margin:"dense",fullWidth:!0,required:!0,label:"Tickets Count",name:"ticketsCount",type:"number",variant:"filled",disabled:a}),I(it,{margin:"dense",fullWidth:!0,required:!0,label:"Start Date",name:"startDate",type:"datetime-local",variant:"filled",disabled:a,InputLabelProps:{shrink:!0}}),I(it,{margin:"dense",fullWidth:!0,required:!0,label:"End Date",name:"endDate",type:"datetime-local",variant:"filled",disabled:a,InputLabelProps:{shrink:!0}}),I(it,{margin:"dense",fullWidth:!0,multiline:!0,minRows:3,maxRows:40,label:"Message/Description",name:"message",variant:"filled",disabled:a,size:"small"})]}),J(Ye,{item:!0,xs:12,md:6,children:[I(Ec,{name:"available",label:"Available",disabled:a}),I(Ec,{name:"soldOut",label:"Sold Out",disabled:a}),I(Ec,{name:"highlighted",label:"Highlighted",disabled:a}),I(Ec,{name:"displayNewsletterRegistration",label:"Newsletter Registration",disabled:a})]})]}),I(Ye,{item:!0,xs:12,children:I(xi,{type:"submit",disabled:s.isSubmitting,loading:s.isSubmitting,fullWidth:!0,variant:"contained",sx:{mt:2,mb:2},children:t?"Save":"Add ticket"})}),I(Pd,{})]})},qze=({event:e})=>{var o;const[t,n]=Da(),r=Jx(cn.tickets(e.id));return J(pi,{maxWidth:"lg",sx:{mt:4,mb:4},children:[I(gt,{href:"/tickets",startIcon:I(mp,{}),children:"Cancel"}),J(bd,{sx:{paddingX:2},children:[I(Ae,{variant:"h2",children:"New ticket"}),I(Gze,{event:e,onSubmit:i=>r.mutate(i).then(()=>{n("/tickets")})}),r.isError&&J(Ae,{color:"error",children:["Error while adding ticket: ",(o=r.error)==null?void 0:o.message]})]})]})},Kze=Vn(()=>Nn(()=>import("./EventSettings-D9PAC6IZ.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.EventSettings}))),Qze=Vn(()=>Nn(()=>import("./Api-CmaPb114.js"),__vite__mapDeps([6,2,3,4,7,5])).then(e=>({default:e.API}))),Yze=Vn(()=>Nn(()=>import("./EventPublic-Cn0BkzVU.js"),__vite__mapDeps([8,2,3,4,7])).then(e=>({default:e.EventPublic}))),Xze=Vn(()=>Nn(()=>import("./EventWhatsApp-BtXjk5Ke.js"),__vite__mapDeps([9,10,2,3,4,7,11])).then(e=>({default:e.EventWhatsApp}))),Jze=Vn(()=>Nn(()=>import("./EventSlack-Bz3QXeHU.js"),__vite__mapDeps([12,2,3,4,7,5])).then(e=>({default:e.EventSlack}))),Zze=Vn(()=>Nn(()=>import("./EventSchedule-C5I__ZWU.js"),__vite__mapDeps([13,14,3,15,16,1,17])).then(e=>({default:e.EventSchedule}))),eUe=Vn(()=>Nn(()=>import("./EventScheduleTemplate-BsfHsi5W.js"),__vite__mapDeps([18,14,3,15,16,1,19,20])).then(e=>({default:e.EventScheduleTemplate}
3762))),tUe=Vn(()=>Nn(()=>import("./EventSessions-CEhHrcF5.js"),__vite__mapDeps([21,22,23,24])).then(e=>({default:e.EventSessions}))),nUe=Vn(()=>Nn(()=>import("./EventSession-By6OuWo3.js"),[]).then(e=>({default:e.EventSession}))),rUe=Vn(()=>Nn(()=>import("./EventSpeakers-CrwrOulD.js"),__vite__mapDeps([25,23,24,26,27,4,5,11])).then(e=>({default:e.EventSpeakers}))),oUe=Vn(()=>Nn(()=>import("./EventSponsors-529kG0Ed.js"),__vite__mapDeps([28,29,15,7,30,31,19,32,33,34,35,36,11])).then(e=>({default:e.EventSponsors}))),iUe=Vn(()=>Nn(()=>import("./Sponsor-BEne1JjU.js"),__vite__mapDeps([37,29])).then(e=>({default:e.Sponsor}))),sUe=Vn(()=>Nn(()=>import("./JobPosts-B60Re6fi.js"),__vite__mapDeps([38,35,29,36])).then(e=>({default:e.JobPosts}))),aUe=Vn(()=>Nn(()=>import("./EventTeam-DienYctR.js"),__vite__mapDeps([39,15,40,41,30,32,31,19,20])).then(e=>({default:e.EventTeam}))),lUe=Vn(()=>Nn(()=>import("./EventMember-BCf9IwHT.js"),[]).then(e=>({default:e.EventMember}))),uUe=Vn(()=>Nn(()=>import("./EventFaq-7aBbgU2v.js"),__vite__mapDeps([42,19,7,33,34,40,32,30,26,4,20])).then(e=>({default:e.EventFAQ}))),cUe=Vn(()=>Nn(()=>import("./EventBlocks-CQnaqbVg.js"),__vite__mapDeps([43,44,19,40,32,30])).then(e=>({default:e.EventBlocks}))),dUe=Vn(()=>Nn(()=>import("./EventBlock-tpKwt8ET.js"),__vite__mapDeps([45,44,19,40,33,34,32,30])).then(e=>({default:e.EventBlock}))),fUe=Vn(()=>Nn(()=>import("./EventTickets-B7lQrXZS.js"),__vite__mapDeps([46,15,41,30])).then(e=>({default:e.EventTickets}))),hUe=Vn(()=>Nn(()=>import("./EventTicket-CobWucDF.js"),[]).then(e=>({default:e.EventTicket}))),pUe=({eventId:e})=>{const t=MMe(e);if(m.useEffect(()=>{var o;document.title=`OpenPlanner | ${(o=t.data)==null?void 0:o.name}`},[t]),t.isLoading)return I(s2,{hookResult:t});if(!t.data)return J(Ft,{children:["Error? ",JSON.stringify(t,null,4)]});const n=t.data,r=n.dates.start&&n.tracks.length?"/schedule":"/settings";return I(OMe,{event:n,children:J(NI,{children:[I(Pt,{path:"/sponsors",children:I(m.Suspense,{fallback:I(vn,{}),children:I(oUe,{event:n})})}),I(Pt,{path:"/sponsors/new",children:I(w$e,{event:n})}),I(Pt,{path:"/sponsors/:id",children:I(m.Suspense,{fallback:I(vn,{}),children:I(iUe,{event:n})})}),I(Pt,{path:"/jobposts",children:I(m.Suspense,{fallback:I(vn,{}),children:I(sUe,{event:n})})}),I(Pt,{path:"/team",children:I(m.Suspense,{fallback:I(vn,{}),children:I(aUe,{event:n})})}),I(Pt,{path:"/team/new",children:I(v$e,{event:n})}),I(Pt,{path:"/team/:id",children:I(m.Suspense,{fallback:I(vn,{}),children:I(lUe,{event:n})})}),I(Pt,{path:"/faq",children:I(m.Suspense,{fallback:I(vn,{}),children:I(uUe,{event:n})})}),I(Pt,{path:"/blocks",children:I(m.Suspense,{fallback:I(vn,{}),children:I(cUe,{event:n})})}),I(Pt,{path:"/blocks/:id",children:I(m.Suspense,{fallback:I(vn,{}),children:I(dUe,{event:n})})}),I(Pt,{path:"/sessions",children:I(m.Suspense,{fallback:I(vn,{}),children:I(tUe,{event:n})})}),I(Pt,{path:"/sessions/new",children:I(Sze,{event:n})}),I(Pt,{path:"/sessions/:id",children:I(m.Suspense,{fallback:I(vn,{}),children:I(nUe,{event:n})})}),I(Pt,{path:"/speakers",children:I(m.Suspense,{fallback:I(vn,{}),children:I(rUe,{event:n})})}),I(Pt,{path:"/speakers/new",children:I(Aze,{event:n})}),I(Pt,{path:"/speakers/:id",children:I(m.Suspense,{fallback:I(vn,{}),children:I(Dze,{event:n})})}),I(Pt,{path:"/schedule/template",children:I(m.Suspense,{fallback:I(vn,{}),children:I(eUe,{event:n})})}),I(Pt,{path:"/schedule",children:I(m.Suspense,{fallback:I(vn,{}),children:I(Zze,{event:n})})}),I(Pt,{path:"/settings",children:I(m.Suspense,{fallback:I(vn,{}),children:I(Kze,{event:n})})}),I(Pt,{path:"/api",children:I(m.Suspense,{fallback:I(vn,{}),children:I(Qze,{event:n})})}),I(Pt,{path:"/public",children:I(m.Suspense,{fallback:I(vn,{}),children:I(Yze,{event:n})})}),I(Pt,{path:"/whatsapp",children:I(m.Suspense,{fallback:I(vn,{}),children:I(Xze,{event:n})})}),I(Pt,{path:"/slack",children:I(m.Suspense,{fallback:I(vn,{}),children:I(Jze,{event:n})})}),I(Pt,{path:"/social",children:I(Uze,{event:n})}),I(Pt,{path:"/tickets",children:I(m.Suspense,{fallback:I(vn,{}),children:I(fUe,{event:n})})}),I(Pt,{path:"/tickets/new",children:I(qze,{event:n})}),I(Pt,{path:"/tickets/:id",children:I(m.Suspense,{fallback:I(vn,{}),children:I(hUe,{event:n})})}),I(Pt,{children:I(UU,{to:r})})]})})},mUe=()=>{const[e,t]=Eg("/events/:eventId/*?");return I(hke,{base:`/events/${t==null?void 0:t.eventId}`,children:I(pUe,{eventId:t==null?void 0:t.eventId})})},gUe=RO({email:Hw().email().required()}).required(),yUe=({})=>{const e=Hh("(prefers-color-scheme: dark)"),t=nv(),{createNotification:n}=pp(),r=La({defaultValues:{email:""}}),{formState:o}=r;return J(Ft,{children:[I(pi,{component:"main",maxWidth:"md",sx:{justifyContent:"center",display:"flex",marginTop:4},children:I("img",{src:`/logos/${e?"open-planner-light.svg":"open-planner.svg"}`,alt:"OpenPlanner logo",height:"200px"})}),I(pi,{component:"main",maxWidth:"xs",children:I(Ol,{formContext:r,resolver:D7(gUe),onSuccess:async i=>{var a;const s=await t(oIe({email:i.email}));if((a=s.payload)!=null&&a.error){const l=`${s.payload.error} - ${s.payload.message}`;n("Fail to send reset password link... "+l,{type:"error"})}else n("Password email sent!",{type:"success"})},children:J(Me,{sx:{marginTop:4,display:"flex",flexDirection:"column",alignItems:"center"},children:[I(Mu,{href:"/",variant:"body2",children:"Back to login"}),I(Ae,{component:"h1",variant:"h5",children:"Forgot Password"}),I(it,{margin:"normal",required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,disabled:o.isSubmitting,sx:{mt:6}}),I(xi,{type:"submit",disabled:o.isSubmitting,loading:o.isSubmitting,fullWidth:!0,variant:"contained",sx:{mt:3,mb:2},children:"Send reset link"})]})})})]})},vUe=e=>{const t=jr(cn.adminsUsers,e),n=FO(t);return!!(!n.error&&n.data&&n.loaded&&n.data.id===e)},bUe=()=>{const e=[];return e.push(gxe("createdAt","desc")),Ml(qy(cn.events,...e).withConverter(VEe),!1)};function wUe({privateApiRef:e,props:t,children:n}){const r=m.useRef(e.current.getPublicApi());return T.jsx(BG.Provider,{value:t,children:T.jsx(zG.Provider,{value:e,children:T.jsx(jG.Provider,{value:r,children:n})})})}const CUe=(e,t)=>{const n=H5e(e,t);return tze(n,t),jje(n),Mo(Jje,n,t),Mo(J5e,n,t),Mo(Fje,n,t),Mo(Dje,n,t),Mo(wje,n,t),Mo(nze,n,t),Mo(_je,n,t),Mo(gje,n,t),Mo(sje,n,t),Mo(dje,n,t),Mo(Yje,n,t),Mo(Y5e,n,t),Mo(nje,n,t),Mo(CVe,n,t),Sje(n,t),Zje(n,t),Z5e(n,t),Lje(n,t),wLe(n,t),eje(n),rje(n,t),$je(n,t),Cje(n,t),Eje(n,t),bje(n,t),rze(n,t),aje(n,t),fje(n,t),Xje(n,t),oze(n,t),X5e(n),cje(n,t),mje(n,t),Q5e(n,t),aze(n,t),ize(n,t),lze(n),xVe(n,t),n},xUe=["className"],SUe=m.forwardRef(function(t,n){const{className:r}=t,o=de(t,xUe),{getRootProps:i,getContentProps:s,getRenderZoneProps:a,getRows:l}=m5e({ref:n});return T.jsxs(gFe,x({className:r},i(o),{children:[T.jsx(hLe,{}),T.jsx(bFe,x({},s(),{children:T.jsx(SFe,x({},a(),{children:l()}))}))]}))}),Zq=m.forwardRef(function(t,n){const r=Qje(t),o=CUe(r.apiRef,r);return T.jsx(wUe,{privateApiRef:o,props:r,children:T.jsxs(vNe,x({className:r.className,style:r.style,sx:r.sx,ref:n},r.forwardedProps,{children:[T.jsx(bBe,{}),T.jsx(oLe,{VirtualScrollerComponent:SUe}),T.jsx(iLe,{})]}))})}),eK=m.memo(Zq);dS.filterDebounceMs;dS.filterDebounceMs;
3762Zq.propTypes={apiRef:ce.shape({current:ce.object.isRequired}),"aria-label":ce.string,"aria-labelledby":ce.string,autoHeight:ce.bool,autoPageSize:ce.bool,cellModesModel:ce.object,checkboxSelection:ce.bool,classes:ce.object,clipboardCopyCellDelimiter:ce.string,columnBuffer:ce.number,columnGroupingModel:ce.arrayOf(ce.object),columnHeaderHeight:ce.number,columns:IZ(ce.array.isRequired),columnThreshold:ce.number,columnVisibilityModel:ce.object,components:ce.object,componentsProps:ce.object,density:ce.oneOf(["comfortable","compact","standard"]),disableColumnFilter:ce.bool,disableColumnMenu:ce.bool,disableColumnSelector:ce.bool,disableDensitySelector:ce.bool,disableEval:ce.bool,disableRowSelectionOnClick:ce.bool,disableVirtualization:ce.bool,editMode:ce.oneOf(["cell","row"]),experimentalFeatures:ce.shape({ariaV7:ce.bool,columnGrouping:ce.bool,warnIfFocusStateIsNotSynced:ce.bool}),filterDebounceMs:ce.number,filterMode:ce.oneOf(["client","server"]),filterModel:ce.shape({items:ce.arrayOf(ce.shape({field:ce.string.isRequired,id:ce.oneOfType([ce.number,ce.string]),operator:ce.string.isRequired,value:ce.any})).isRequired,logicOperator:ce.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:ce.bool,quickFilterLogicOperator:ce.oneOf(["and","or"]),quickFilterValues:ce.array}),forwardedProps:ce.object,getCellClassName:ce.func,getDetailPanelContent:ce.func,getEstimatedRowHeight:ce.func,getRowClassName:ce.func,getRowHeight:ce.func,getRowId:ce.func,getRowSpacing:ce.func,hideFooter:ce.bool,hideFooterPagination:ce.bool,hideFooterSelectedRowCount:ce.bool,ignoreDiacritics:ce.bool,initialState:ce.object,isCellEditable:ce.func,isRowSelectable:ce.func,keepNonExistentRowsSelected:ce.bool,loading:ce.bool,localeText:ce.object,logger:ce.shape({debug:ce.func.isRequired,error:ce.func.isRequired,info:ce.func.isRequired,warn:ce.func.isRequired}),logLevel:ce.oneOf(["debug","error","info","warn",!1]),nonce:ce.string,onCellClick:ce.func,onCellDoubleClick:ce.func,onCellEditStart:ce.func,onCellEditStop:ce.func,onCellKeyDown:ce.func,onCellModesModelChange:ce.func,onClipboardCopy:ce.func,onColumnHeaderClick:ce.func,onColumnHeaderDoubleClick:ce.func,onColumnHeaderEnter:ce.func,onColumnHeaderLeave:ce.func,onColumnHeaderOut:ce.func,onColumnHeaderOver:ce.func,onColumnOrderChange:ce.func,onColumnVisibilityModelChange:ce.func,onFilterModelChange:ce.func,onMenuClose:ce.func,onMenuOpen:ce.func,onPaginationModelChange:ce.func,onPreferencePanelClose:ce.func,onPreferencePanelOpen:ce.func,onProcessRowUpdateError:ce.func,onResize:ce.func,onRowClick:ce.func,onRowDoubleClick:ce.func,onRowEditCommit:ce.func,onRowEditStart:ce.func,onRowEditStop:ce.func,onRowModesModelChange:ce.func,onRowSelectionModelChange:ce.func,onSortModelChange:ce.func,onStateChange:ce.func,pageSizeOptions:ce.arrayOf(ce.oneOfType([ce.number,ce.shape({label:ce.string.isRequired,value:ce.number.isRequired})]).isRequired),pagination:e=>e.pagination===!1?new Error(["MUI: `<DataGrid pagination={false} />` is not a valid prop.","Infinite scrolling is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination."].join(`
3763`)):null,paginationMode:ce.oneOf(["client","server"]),paginationModel:ce.shape({page:ce.number.isRequired,pageSize:ce.number.isRequired}),processRowUpdate:ce.func,rowBuffer:ce.number,rowCount:ce.number,rowHeight:ce.number,rowModesModel:ce.object,rowPositionsDebounceMs:ce.number,rows:ce.arrayOf(ce.object).isRequired,rowSelection:ce.bool,rowSelectionModel:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.number,ce.string]).isRequired),ce.number,ce.string]),rowSpacingType:ce.oneOf(["border","margin"]),rowThreshold:ce.number,scrollbarSize:ce.number,showCellVerticalBorder:ce.bool,showColumnVerticalBorder:ce.bool,slotProps:ce.object,slots:ce.object,sortingMode:ce.oneOf(["client","server"]),sortingOrder:ce.arrayOf(ce.oneOf(["asc","desc"])),sortModel:ce.arrayOf(ce.shape({field:ce.string.isRequired,sort:ce.oneOf(["asc","desc"])})),sx:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.func,ce.object,ce.bool])),ce.func,ce.object]),unstable_ignoreValueFormatterDuringExport:ce.oneOfType([ce.shape({clipboardExport:ce.bool,csvExport:ce.bool}),ce.bool])};const _Ue=()=>{const e=nv(),t=td(yO);return I(Me,{display:"flex",justifyContent:"flex-end",alignItems:"flex-end",flexDirection:"column",marginTop:1,children:J(Me,{display:"flex",alignItems:"center",children:[I(by,{alt:t.avatarURL,src:t.displayName}),I(Ae,{variant:"body1",textTransform:"capitalize",marginLeft:1,children:t.displayName}),I(gt,{onClick:()=>e(gO()),children:"Logout"})]})})},EUe=()=>{const[e,t]=m.useState(null),[n,r]=m.useState(null),[o,i]=m.useState(!0);return m.useEffect(()=>{(async()=>{try{const a=fp().currentUser;if(!a)throw new Error("Not logged in");const l=await a.getIdToken(),u=new URL(cl);u.pathname+="v1/admin/usage";const c=await fetch(u.href,{headers:{Authorization:`Bearer ${l}`}});if(!c.ok)throw new Error(`Failed to load usage (${c.status})`);t(await c.json())}catch(a){r(""+a)}i(!1)})()},[]),{data:e,error:n,isLoading:o}},IUe=({eventNames:e})=>{const{data:t,error:n,isLoading:r}=EUe();if(r)return I(Ae,{color:"text.secondary",children:"Loading usage analytics..."});if(n||!t)return J(Ae,{color:"error",children:["Usage analytics unavailable: ",n]});const o=t.events.map(i=>({id:i.eventId,name:e.get(i.eventId)||i.eventId,storage:i.storageBytes,files:i.fileCount,network:i.networkBytes,requests:i.networkRequests}));return J(Me,{marginY:4,children:[I(Ae,{variant:"h2",children:"Usage analytics"}),J(Ae,{variant:"body1",marginY:1,children:[I("strong",{children:ef(t.totalStorageBytes)})," stored in ",t.totalFileCount," files."," ",t.networkAvailable?J(Ft,{children:[I("strong",{children:ef(t.totalNetworkBytes)})," served over the last 7 days (this is the bandwidth Google bills):",t.networkDays.map(i=>J(Ae,{component:"span",variant:"body2",display:"block",color:"text.secondary",children:[i.date,": ",ef(i.bytes)," • ",i.requests," requests"]},i.date))]}):"Network usage unavailable (usage logs not readable)."]}),I(eK,{autoHeight:!0,density:"compact",rows:o,initialState:{sorting:{sortModel:[{field:"network",sort:"desc"}]}},columns:[{field:"name",headerName:"Event",width:240},{field:"network",headerName:"Bandwidth 7d",width:140,valueFormatter:i=>ef(i.value||0)},{field:"requests",headerName:"Requests 7d",width:120},{field:"storage",headerName:"Storage",width:130,valueFormatter:i=>ef(i.value||0)},{field:"files",headerName:"Files",width:100}]})]})},AUe=({})=>{const e=td(BW),t=bUe(),n=vUe(e),r=m.useMemo(()=>t.data?t.data.map(i=>
3763({id:i.id,createdAt:i.createdAt.toDate().toLocaleString(),name:i.name,happenAt:tt.fromJSDate(i.dates.start).toRelative(),eventId:i.id,creator:i.owner})):[],[t.data]),o=[{field:"id",headerName:"ID",width:90},{field:"createdAt",headerName:"Created At",width:200},{field:"name",headerName:"Name",width:200},{field:"happenAt",headerName:"Event Date",width:200},{field:"creator",headerName:"Creator",width:200},{field:"speakersCount",headerName:"Speakers",width:100,renderCell:i=>I(fB,{eventId:i.row.eventId,type:"speakers"})},{field:"sessionsCount",headerName:"Sessions",width:100,renderCell:i=>I(fB,{eventId:i.row.eventId,type:"sessions"})}];return J(pi,{component:"main",maxWidth:"lg",children:[I(_Ue,{}),I(Ae,{variant:"h1",children:"Admin 🍿"}),I(gt,{variant:"outlined",size:"large",href:"/",children:n?"GO BACK":"Not an admin, back off!"}),I(s2,{hookResult:t}),n&&t.data&&I(IUe,{eventNames:new Map(t.data.map(i=>[i.id,i.name]))}),I(Me,{sx:{height:"80vh",width:"100%"},children:I(eK,{rows:r,columns:o,initialState:{pagination:{paginationModel:{pageSize:50}}},checkboxSelection:!0,disableRowSelectionOnClick:!0})})]})},fB=({eventId:e,type:t})=>{const n=t==="speakers"?cn.speakers(e):cn.sessions(e),r=Ml(n,!1);return r.isLoading?I("span",{children:"Loading..."}):r.error?I("span",{children:"Error"}):I("span",{children:r.data?r.data.length:0})},kUe=Vn(()=>Nn(()=>import("./PublicApp-DNSKi1k4.js").then(e=>e.P),__vite__mapDeps([47,10,33,34,22,35,27,23,48])).then(e=>({default:e.PublicApp}))),PUe=Vn(()=>Nn(()=>import("./FeaturesPage-BMzxvJQg.js"),[]).then(e=>({default:e.FeaturesPage}))),TUe=Vn(()=>Nn(()=>import("./EventsScreen-BuDAywqU.js"),[]).then(e=>({default:e.EventsScreen}))),RUe=({})=>{const e=Hh("(prefers-color-scheme: dark)"),t=m.useMemo(()=>ZP({palette:{mode:e?"dark":"light",primary:{main:"#00B19D"},secondary:{main:"#F8B904"},divider:e?"rgba(255, 255, 255, 0.12)":"rgba(0, 0, 0, 0.12)"},components:{MuiLink:{defaultProps:{component:t0}},MuiButtonBase:{defaultProps:{LinkComponent:t0}},MuiListItemButton:{defaultProps:{LinkComponent:t0}}}}),[e]);return I(Pme,{store:ake,children:J(Ste,{theme:t,children:[I(hae,{enableColorScheme:!0}),I(zke,{children:J(NI,{children:[I(Pt,{path:"/public/event/:eventId/*?",children:I(m.Suspense,{fallback:I(vn,{}),children:I(kUe,{})})}),I(Pt,{path:"/auth/reset",children:I(yUe,{})}),I(Pt,{path:"/features",children:I(m.Suspense,{fallback:I(vn,{}),children:I(PUe,{})})}),I(dke,{children:J(NI,{children:[I(Pt,{path:"/",children:I(m.Suspense,{fallback:I(vn,{}),children:I(TUe,{})})}),I(Pt,{path:"/admins",children:I(m.Suspense,{fallback:I(vn,{}),children:I(AUe,{})})}),I(Pt,{path:"/events/",children:I(UU,{to:"/"})}),I(Pt,{path:"/events/:eventId/*?",children:I(mUe,{})}),I(Pt,{children:J(Me,{sx:{display:"flex",p:5,flexDirection:"column",alignItems:"center"},children:[I(Ae,{children:"404, Not Found!"}),I(jU,{href:"/",children:"Go to home"})]})})]})})]})})]})})};PE.createRoot(document.getElementById("root")).render(I(ot.StrictMode,{children:I(RUe,{})}));export{XW as $,by as A,gt as B,pi as C,tt as D,H7 as E,Ft as F,Da as G,Va as H,Na as I,Mu as J,Zt as K,jU as L,G7 as M,Hh as N,ZP as O,fo as P,Ste as Q,Pt as R,NI as S,Ae as T,La as U,Ye as V,jw as W,wd as X,it as Y,Al as Z,x as _,Ke as a,oke as a$,xi as a0,Ol as a1,so as a2,FI as a3,U7 as a4,Qh as a5,zC as a6,Yh as a7,jC as a8,WUe as a9,vUe as aA,Sg as aB,uPe as aC,wxe as aD,_xe as aE,ei as aF,jr as aG,n7 as aH,f6e as aI,eK as aJ,Ts as aK,g$e as aL,Zx as aM,cFe as aN,Rh as aO,gze as aP,Pd as aQ,Pze as aR,Uke as aS,KDe as aT,Qn as aU,ed as aV,Gke as aW,ef as aX,Ii as aY,Ou as aZ,jAe as a_,cl as aa,vc as ab,Cy as ac,io as ad,kU as ae,Vn as af,Nn as ag,hke as ah,vn as ai,Yke as aj,Xke as ak,_Ue as al,oU as am,RO as an,Hw as ao,k7 as ap,td as aq,BW as ar,pp as as,Jx as at,D7 as au,BUe as av,$O as aw,Cxe as ax,cn as ay,Kke as az,MUe as b,uw as b$,B7 as b0,CT as b1,Ec as b2,gU as b3,mi as b4,UC as b5,Kh as b6,gT as b7,tO as b8,jX as b9,S9 as bA,xze as bB,fa as bC,TI as bD,qh as bE,_a as bF,VDe as bG,HDe as bH,AU as bI,d2 as bJ,d6e as bK,dhe as bL,hhe as bM,pt as bN,gc as bO,bt as bP,Wee as bQ,eT as bR,hh as bS,gs as bT,$se as bU,$Ue as bV,FUe as bW,Pme as bX,Ov as bY,i6 as bZ,qme as b_,vy as ba,i2 as bb,Hke as bc,mp as bd,y$e as be,K2 as bf,Oa as bg,yT as bh,e6e as bi,ot as bj,md as bk,Ml as bl,Xq as bm,a4 as bn,XUe as bo,UUe as bp,GDe as bq,E$e as br,Xce as bs,SU as bt,w0 as bu,vze as bv,T$e as bw,uG as bx,FO as by,qy as bz,de as c,gV as c$,Gx as c0,DO as c1,ZUe as c2,Dn as c3,lG as c4,b$e as c5,YUe as c6,h$e as c7,JUe as c8,m$e as c9,GUe as cA,LPe as cB,eTe as cC,zPe as cD,GO as cE,l8 as cF,qw as cG,eMe as cH,UOe as cI,L2e as cJ,F8 as cK,qUe as cL,xTe as cM,tE as cN,hMe as cO,QTe as cP,KTe as cQ,Yf as cR,BTe as cS,ci as cT,ta as cU,Qo as cV,KA as cW,mn as cX,qx as cY,Pa as cZ,XO as c_,gxe as ca,us as cb,zUe as cc,W7 as cd,El as ce,ge as cf,Qc as cg,gd as ch,Jc as ci,Xc as cj,oT as ck,QDe as cl,Q8 as cm,tte as cn,Fh as co,r2 as cp,QPe as cq,QUe as cr,KUe as cs,WA as ct,ZPe as cu,YO as cv,D8 as cw,WO as cx,TV as cy,P2e as cz,xe as d,ft as d0,Yt as d1,zTe as d2,mo as d3,Gze as d4,Az as d5,Tte as d6,Lte as d7,Bce as d8,Re as e,Ze as f,Qe as g,J as h,I as i,T as j,es as k,Me as l,DUe as m,Zn as 
3763n,j7 as o,bd as p,Eg as q,m as r,he as s,s2 as t,Je as u,c6e as v,U$ as w,hpe as x,Ps as y,Eze 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.