@visio-io/design-system 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +31 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +9093 -3886
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/GoogleMap/components/MapMarkers.d.ts +1 -1
- package/dist/types/components/GoogleMap/index.d.ts +1 -1
- package/dist/types/components/GoogleMap/types.d.ts +29 -2
- package/dist/types/components/MapSpot/MapSpot.d.ts +1 -1
- package/dist/types/components/MapSpot/MapSpot.stories.d.ts +13 -1
- package/dist/types/components/MapSpot/utils.d.ts +11 -0
- package/dist/types/components/index.d.ts +1 -1
- package/package.json +14 -14
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("@mui/material/styles"),x=require("react"),_=require("@mui/material"),Ve=require("@mui/icons-material"),wd=require("@emotion/styled"),xn=require("@emotion/react"),Cd=require("react-dom");function _d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Fe=_d(x),pe={primary:"#006399",onPrimary:"#ffffff",primaryContainer:"#cfe5ff",onPrimaryContainer:"#001d33",secondary:"#526070",onSecondary:"#ffffff",secondaryContainer:"#d5e4f7",onSecondaryContainer:"#0f1d2a",tertiary:"#68587a",onTertiary:"#ffffff",tertiaryContainer:"#eedcff",onTertiaryContainer:"#231533",error:"#ba1a1a",onError:"#ffffff",errorContainer:"#ffdad6",onErrorContainer:"#410002",surface:"#fdfcff",onSurface:"#1a1c1e",surfaceVariant:"#dee3eb",onSurfaceVariant:"#42474e",outline:"#72787e",inverseSurface:"#2f3033",inverseOnSurface:"#f1f0f4",inversePrimary:"#98cbff"},me={primary:"#98cbff",onPrimary:"#003354",primaryContainer:"#004a78",onPrimaryContainer:"#cfe5ff",secondary:"#b9c8da",onSecondary:"#233241",secondaryContainer:"#3a4a58",onSecondaryContainer:"#d5e4f7",tertiary:"#d3bee5",onTertiary:"#382a4a",tertiaryContainer:"#4f4062",onTertiaryContainer:"#eedcff",error:"#ffb4ab",onError:"#690005",errorContainer:"#93000a",onErrorContainer:"#ffdad6",surface:"#1a1c1e",onSurface:"#e2e2e6",surfaceVariant:"#42474e",onSurfaceVariant:"#c2c7cf",outline:"#8c9198",inverseSurface:"#e2e2e6",inverseOnSurface:"#2f3033",inversePrimary:"#006399"},Pe={fontFamily:'"Inter", "Helvetica", "Arial", sans-serif',fontSize:{xs:12,sm:14,md:16,lg:18,xl:20,xxl:24},fontWeight:{regular:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.2,normal:1.5,relaxed:1.7}},pc={xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,xxl:32,xxxl:64},rr={sm:4,md:8,lg:12,xl:16,pill:999},mc={shape:{borderRadius:rr.md,borderRadiusSm:rr.sm},spacing:8,components:{MuiButton:{styleOverrides:{root:{borderRadius:rr.md,fontWeight:Pe.fontWeight.medium,letterSpacing:"0.2px",textTransform:"none","&:focus-visible":{outline:"2px solid currentColor",outlineOffset:"2px"},"&.Mui-disabled":{opacity:.6}}},variants:[{props:{variant:"contained",color:"primary"},style:{boxShadow:"none"}}]}},typography:{fontFamily:Pe.fontFamily,fontWeightRegular:Pe.fontWeight.regular,fontWeightMedium:Pe.fontWeight.medium,fontWeightBold:Pe.fontWeight.bold,h1:{fontSize:Pe.fontSize.xxl,fontWeight:Pe.fontWeight.bold,lineHeight:Pe.lineHeight.tight},h2:{fontSize:Pe.fontSize.xl,fontWeight:Pe.fontWeight.bold,lineHeight:Pe.lineHeight.tight},body1:{fontSize:Pe.fontSize.md,lineHeight:Pe.lineHeight.normal},body2:{fontSize:Pe.fontSize.sm,lineHeight:Pe.lineHeight.normal},button:{fontWeight:Pe.fontWeight.semibold,textTransform:"none"}}},gc=Y.createTheme({...mc,palette:{mode:"light",primary:{main:pe.primary,contrastText:pe.onPrimary},secondary:{main:pe.secondary,contrastText:pe.onSecondary},error:{main:pe.error,contrastText:pe.onError},background:{default:pe.surface,paper:pe.surface},text:{primary:pe.onSurface,secondary:pe.onSurfaceVariant},divider:pe.outline},visio:{surfaceVariant:pe.surfaceVariant,onSurfaceVariant:pe.onSurfaceVariant,inverseSurface:pe.inverseSurface,inverseOnSurface:pe.inverseOnSurface,inversePrimary:pe.inversePrimary,outline:pe.outline,tertiary:{main:pe.tertiary,contrastText:pe.onTertiary,container:pe.tertiaryContainer,onContainer:pe.onTertiaryContainer}}}),yc=Y.createTheme({...mc,palette:{mode:"dark",primary:{main:me.primary,contrastText:me.onPrimary},secondary:{main:me.secondary,contrastText:me.onSecondary},error:{main:me.error,contrastText:me.onError},background:{default:me.surface,paper:me.surface},text:{primary:me.onSurface,secondary:me.onSurfaceVariant},divider:me.outline},visio:{surfaceVariant:me.surfaceVariant,onSurfaceVariant:me.onSurfaceVariant,inverseSurface:me.inverseSurface,inverseOnSurface:me.inverseOnSurface,inversePrimary:me.inversePrimary,outline:me.outline,tertiary:{main:me.tertiary,contrastText:me.onTertiary,container:me.tertiaryContainer,onContainer:me.onTertiaryContainer}}}),Ed=pc;function vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xt(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 Mo={exports:{}},cn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ci;function Pd(){if(ci)return cn;ci=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var i=null;if(s!==void 0&&(i=""+s),o.key!==void 0&&(i=""+o.key),"key"in o){s={};for(var a in o)a!=="key"&&(s[a]=o[a])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:i,ref:o!==void 0?o:null,props:s}}return cn.Fragment=t,cn.jsx=n,cn.jsxs=n,cn}var ln={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,31 +14,31 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var li;function Ad(){return li||(li=1,process.env.NODE_ENV!=="production"&&function(){function e(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===$?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case v:return"Fragment";case S:return"Profiler";case b:return"StrictMode";case E:return"Suspense";case P:return"SuspenseList";case L:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case h:return"Portal";case C:return w.displayName||"Context";case y:return(w._context.displayName||"Context")+".Consumer";case T:var j=w.render;return w=w.displayName,w||(w=j.displayName||j.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case A:return j=w.displayName||null,j!==null?j:e(w.type)||"Memo";case M:j=w._payload,w=w._init;try{return e(w(j))}catch{}}return null}function t(w){return""+w}function n(w){try{t(w);var j=!1}catch{j=!0}if(j){j=console;var k=j.error,O=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return k.call(j,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",O),t(w)}}function r(w){if(w===v)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===M)return"<...>";try{var j=e(w);return j?"<"+j+">":"<...>"}catch{return"<...>"}}function o(){var w=W.A;return w===null?null:w.getOwner()}function s(){return Error("react-stack-top-frame")}function i(w){if(H.call(w,"key")){var j=Object.getOwnPropertyDescriptor(w,"key").get;if(j&&j.isReactWarning)return!1}return w.key!==void 0}function a(w,j){function k(){Q||(Q=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",j))}k.isReactWarning=!0,Object.defineProperty(w,"key",{get:k,configurable:!0})}function c(){var w=e(this.type);return U[w]||(U[w]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),w=this.props.ref,w!==void 0?w:null}function u(w,j,k,O,F,N){var V=k.ref;return w={$$typeof:m,type:w,key:j,props:k,_owner:O},(V!==void 0?V:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:c}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:F}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function l(w,j,k,O,F,N){var V=j.children;if(V!==void 0)if(O)if(q(V)){for(O=0;O<V.length;O++)d(V[O]);Object.freeze&&Object.freeze(V)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(V);if(H.call(j,"key")){V=e(w);var z=Object.keys(j).filter(function(K){return K!=="key"});O=0<z.length?"{key: someKey, "+z.join(": ..., ")+": ...}":"{key: someKey}",R[V+O]||(z=0<z.length?"{"+z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,O,
|
|
22
|
+
<%s key={someKey} {...props} />`,O,V,z,V),R[V+O]=!0)}if(V=null,k!==void 0&&(n(k),V=""+k),i(j)&&(n(j.key),V=""+j.key),"key"in j){k={};for(var G in j)G!=="key"&&(k[G]=j[G])}else k=j;return V&&a(k,typeof w=="function"?w.displayName||w.name||"Unknown":w),u(w,V,k,o(),F,N)}function d(w){f(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===M&&(w._payload.status==="fulfilled"?f(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function f(w){return typeof w=="object"&&w!==null&&w.$$typeof===m}var p=x,m=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),C=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),W=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,q=Array.isArray,oe=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(w){return w()}};var Q,U={},I=p.react_stack_bottom_frame.bind(p,s)(),X=oe(r(s)),R={};ln.Fragment=v,ln.jsx=function(w,j,k){var O=1e4>W.recentlyCreatedOwnerStacks++;return l(w,j,k,!1,O?Error("react-stack-top-frame"):I,O?oe(r(w)):X)},ln.jsxs=function(w,j,k){var O=1e4>W.recentlyCreatedOwnerStacks++;return l(w,j,k,!0,O?Error("react-stack-top-frame"):I,O?oe(r(w)):X)}}()),ln}process.env.NODE_ENV==="production"?Mo.exports=Pd():Mo.exports=Ad();var g=Mo.exports;const bc=x.createContext(null),Md=({children:e,defaultMode:t="light",mode:n,onModeChange:r,enableCssBaseline:o=!0})=>{const[s,i]=x.useState(n??t),a=n??s;x.useEffect(()=>{n&&i(n)},[n]);const c=x.useCallback(f=>{n||i(f),r==null||r(f)},[n,r]),u=x.useCallback(()=>{c(a==="light"?"dark":"light")},[a,c]),l=x.useMemo(()=>a==="dark"?yc:gc,[a]),d=x.useMemo(()=>({mode:a,setMode:c,toggleMode:u,theme:l}),[a,c,u,l]);return g.jsx(bc.Provider,{value:d,children:g.jsxs(_.ThemeProvider,{theme:l,children:[o?g.jsx(_.CssBaseline,{}):null,e]})})},kd=()=>{const e=x.useContext(bc);if(!e)throw new Error("useVisioTheme must be used within VisioThemeProvider.");return e},Rd="_button_1x96v_1",Od="_borderRadiusNone_1x96v_8",Id="_borderRadiusSmall_1x96v_12",jd="_borderRadiusMedium_1x96v_16",Ld="_borderRadiusLarge_1x96v_20",Dd="_borderRadiusRound_1x96v_24",Pt={button:Rd,borderRadiusNone:Od,borderRadiusSmall:Id,borderRadiusMedium:jd,borderRadiusLarge:Ld,borderRadiusRound:Dd},$d=(e,t="medium")=>{const n=e??t;if(typeof n=="number")return"";switch(n){case"none":return Pt.borderRadiusNone;case"small":return Pt.borderRadiusSmall;case"medium":return Pt.borderRadiusMedium;case"large":return Pt.borderRadiusLarge;case"round":return Pt.borderRadiusRound;default:return Pt.borderRadiusMedium}},Vd=e=>{if(typeof e=="number")return`${e}px`},Nd=(e,t,n)=>{const r=n||t;if(r)return o=>{if(e){o.preventDefault();return}r(o)}},hs=x.forwardRef(({children:e,loading:t=!1,loadingText:n,startIcon:r,endIcon:o,variant:s="contained",size:i="medium",color:a="primary",borderRadius:c="medium",fullWidth:u=!1,disabled:l=!1,type:d="button",className:f,onClick:p,onAction:m,...h},v)=>{const b=l||t,S=$d(c),y=Vd(c),C=Nd(b,p,m),T=`${Pt.button} ${S} ${f||""}`.trim();return g.jsx(_.Button,{ref:v,variant:s,size:i,color:a,fullWidth:u,disabled:b,type:d,onClick:C,startIcon:t?g.jsx(_.CircularProgress,{size:i==="small"?16:i==="medium"?20:24,color:"inherit"}):r,endIcon:t?void 0:o,className:T,style:y?{borderRadius:y}:void 0,...h,children:t&&n?n:e})});hs.displayName="Button";const Bd=e=>{if(e)return t=>{e(t)}},Fd="_filterButton_8fgad_1",zd={filterButton:Fd},xc=x.forwardRef(({children:e="Filtros",onClick:t,className:n,...r},o)=>{const i=_.useTheme().palette.mode==="dark",a=Bd(t);return g.jsx(_.Button,{ref:o,variant:"outlined",onClick:a,className:`${zd.filterButton} ${n||""}`,"data-theme":i?"dark":"light",...r,children:e})});xc.displayName="FilterButton";const Wd=(e,t)=>n=>{n.stopPropagation(),t==null||t(n),e()},Ud="_filterChip_1ty7d_1",Hd="_icon_1ty7d_60",Gd="_label_1ty7d_76",Kd="_overlay_1ty7d_88",Yd="_deleteIcon_1ty7d_102",un={filterChip:Ud,icon:Hd,label:Gd,overlay:Kd,deleteIcon:Yd},Sc=({label:e,icon:t,onRemove:n,className:r,onClick:o,ref:s,...i})=>{const c=_.useTheme().palette.mode==="dark",u=Wd(n,o);return g.jsxs(_.Box,{ref:s,className:`${un.filterChip} ${r||""}`.trim(),"data-theme":c?"dark":"light",onClick:u,role:"button",tabIndex:0,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n())},"aria-label":`Remover filtro ${e}`,component:"div",...i,children:[t&&g.jsx(_.Box,{className:un.icon,component:"div",children:t}),g.jsx(_.Box,{className:un.label,component:"span",children:e}),g.jsx(_.Box,{className:un.overlay,component:"div",children:g.jsx(Ve.Delete,{className:un.deleteIcon})})]})};Sc.displayName="FilterChip";function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ce.apply(null,arguments)}function pt(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 Tc(e){if(Fe.isValidElement(e)||!pt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Tc(e[n])}),t}function tt(e,t,n={clone:!0}){const r=n.clone?ce({},e):e;return pt(e)&&pt(t)&&Object.keys(t).forEach(o=>{Fe.isValidElement(t[o])?r[o]=t[o]:pt(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&pt(e[o])?r[o]=tt(e[o],t[o],n):n.clone?r[o]=pt(t[o])?Tc(t[o]):t[o]:r[o]=t[o]}),r}const qd=Object.freeze(Object.defineProperty({__proto__:null,default:tt,isPlainObject:pt},Symbol.toStringTag,{value:"Module"}));var ko={exports:{}},Gn={exports:{}},ne={};/** @license React v16.13.1
|
|
23
23
|
* react-is.production.min.js
|
|
24
24
|
*
|
|
25
25
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the MIT license found in the
|
|
28
28
|
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/var
|
|
29
|
+
*/var ui;function Zd(){if(ui)return ne;ui=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function y(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case c:case u:case r:case s:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case a:case l:case m:case p:case i:return T;default:return E}}case n:return E}}}function C(T){return y(T)===u}return ne.AsyncMode=c,ne.ConcurrentMode=u,ne.ContextConsumer=a,ne.ContextProvider=i,ne.Element=t,ne.ForwardRef=l,ne.Fragment=r,ne.Lazy=m,ne.Memo=p,ne.Portal=n,ne.Profiler=s,ne.StrictMode=o,ne.Suspense=d,ne.isAsyncMode=function(T){return C(T)||y(T)===c},ne.isConcurrentMode=C,ne.isContextConsumer=function(T){return y(T)===a},ne.isContextProvider=function(T){return y(T)===i},ne.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},ne.isForwardRef=function(T){return y(T)===l},ne.isFragment=function(T){return y(T)===r},ne.isLazy=function(T){return y(T)===m},ne.isMemo=function(T){return y(T)===p},ne.isPortal=function(T){return y(T)===n},ne.isProfiler=function(T){return y(T)===s},ne.isStrictMode=function(T){return y(T)===o},ne.isSuspense=function(T){return y(T)===d},ne.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===u||T===s||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===m||T.$$typeof===p||T.$$typeof===i||T.$$typeof===a||T.$$typeof===l||T.$$typeof===v||T.$$typeof===b||T.$$typeof===S||T.$$typeof===h)},ne.typeOf=y,ne}var re={};/** @license React v16.13.1
|
|
30
30
|
* react-is.development.js
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var
|
|
36
|
+
*/var di;function Xd(){return di||(di=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function y(D){return typeof D=="string"||typeof D=="function"||D===r||D===u||D===s||D===o||D===d||D===f||typeof D=="object"&&D!==null&&(D.$$typeof===m||D.$$typeof===p||D.$$typeof===i||D.$$typeof===a||D.$$typeof===l||D.$$typeof===v||D.$$typeof===b||D.$$typeof===S||D.$$typeof===h)}function C(D){if(typeof D=="object"&&D!==null){var Ee=D.$$typeof;switch(Ee){case t:var Xe=D.type;switch(Xe){case c:case u:case r:case s:case o:case d:return Xe;default:var ft=Xe&&Xe.$$typeof;switch(ft){case a:case l:case m:case p:case i:return ft;default:return Ee}}case n:return Ee}}}var T=c,E=u,P=a,A=i,M=t,L=l,$=r,W=m,H=p,q=n,oe=s,Q=o,U=d,I=!1;function X(D){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(D)||C(D)===c}function R(D){return C(D)===u}function w(D){return C(D)===a}function j(D){return C(D)===i}function k(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function O(D){return C(D)===l}function F(D){return C(D)===r}function N(D){return C(D)===m}function V(D){return C(D)===p}function z(D){return C(D)===n}function G(D){return C(D)===s}function K(D){return C(D)===o}function he(D){return C(D)===d}re.AsyncMode=T,re.ConcurrentMode=E,re.ContextConsumer=P,re.ContextProvider=A,re.Element=M,re.ForwardRef=L,re.Fragment=$,re.Lazy=W,re.Memo=H,re.Portal=q,re.Profiler=oe,re.StrictMode=Q,re.Suspense=U,re.isAsyncMode=X,re.isConcurrentMode=R,re.isContextConsumer=w,re.isContextProvider=j,re.isElement=k,re.isForwardRef=O,re.isFragment=F,re.isLazy=N,re.isMemo=V,re.isPortal=z,re.isProfiler=G,re.isStrictMode=K,re.isSuspense=he,re.isValidElementType=y,re.typeOf=C}()),re}var fi;function wc(){return fi||(fi=1,process.env.NODE_ENV==="production"?Gn.exports=Zd():Gn.exports=Xd()),Gn.exports}/*
|
|
37
37
|
object-assign
|
|
38
38
|
(c) Sindre Sorhus
|
|
39
39
|
@license MIT
|
|
40
|
-
*/var
|
|
41
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
40
|
+
*/var Xr,hi;function Jd(){if(hi)return Xr;hi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(l){return i[l]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(l){u[l]=l}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xr=o()?Object.assign:function(s,i){for(var a,c=r(s),u,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var d in a)t.call(a,d)&&(c[d]=a[d]);if(e){u=e(a);for(var f=0;f<u.length;f++)n.call(a,u[f])&&(c[u[f]]=a[u[f]])}}return c},Xr}var Jr,pi;function ps(){if(pi)return Jr;pi=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jr=e,Jr}var Qr,mi;function Cc(){return mi||(mi=1,Qr=Function.call.bind(Object.prototype.hasOwnProperty)),Qr}var eo,gi;function Qd(){if(gi)return eo;gi=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ps(),n={},r=Cc();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,u){if(process.env.NODE_ENV!=="production"){for(var l in s)if(r(s,l)){var d;try{if(typeof s[l]!="function"){var f=Error((c||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[l](i,l,c,a,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=u?u():"";e("Failed "+a+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},eo=o,eo}var to,yi;function ef(){if(yi)return to;yi=1;var e=wc(),t=Jd(),n=ps(),r=Cc(),o=Qd(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return to=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function d(R){var w=R&&(u&&R[u]||R[l]);if(typeof w=="function")return w}var f="<<anonymous>>",p={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:S(),arrayOf:y,element:C(),elementType:T(),instanceOf:E,node:L(),objectOf:A,oneOf:P,oneOfType:M,shape:W,exact:H};function m(R,w){return R===w?R!==0||1/R===1/w:R!==R&&w!==w}function h(R,w){this.message=R,this.data=w&&typeof w=="object"?w:{},this.stack=""}h.prototype=Error.prototype;function v(R){if(process.env.NODE_ENV!=="production")var w={},j=0;function k(F,N,V,z,G,K,he){if(z=z||f,K=K||V,he!==n){if(c){var D=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 D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ee=z+":"+V;!w[Ee]&&j<3&&(s("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),w[Ee]=!0,j++)}}return N[V]==null?F?N[V]===null?new h("The "+G+" `"+K+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new h("The "+G+" `"+K+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:R(N,V,z,G,K)}var O=k.bind(null,!1);return O.isRequired=k.bind(null,!0),O}function b(R){function w(j,k,O,F,N,V){var z=j[k],G=Q(z);if(G!==R){var K=U(z);return new h("Invalid "+F+" `"+N+"` of type "+("`"+K+"` supplied to `"+O+"`, expected ")+("`"+R+"`."),{expectedType:R})}return null}return v(w)}function S(){return v(i)}function y(R){function w(j,k,O,F,N){if(typeof R!="function")return new h("Property `"+N+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var V=j[k];if(!Array.isArray(V)){var z=Q(V);return new h("Invalid "+F+" `"+N+"` of type "+("`"+z+"` supplied to `"+O+"`, expected an array."))}for(var G=0;G<V.length;G++){var K=R(V,G,O,F,N+"["+G+"]",n);if(K instanceof Error)return K}return null}return v(w)}function C(){function R(w,j,k,O,F){var N=w[j];if(!a(N)){var V=Q(N);return new h("Invalid "+O+" `"+F+"` of type "+("`"+V+"` supplied to `"+k+"`, expected a single ReactElement."))}return null}return v(R)}function T(){function R(w,j,k,O,F){var N=w[j];if(!e.isValidElementType(N)){var V=Q(N);return new h("Invalid "+O+" `"+F+"` of type "+("`"+V+"` supplied to `"+k+"`, expected a single ReactElement type."))}return null}return v(R)}function E(R){function w(j,k,O,F,N){if(!(j[k]instanceof R)){var V=R.name||f,z=X(j[k]);return new h("Invalid "+F+" `"+N+"` of type "+("`"+z+"` supplied to `"+O+"`, expected ")+("instance of `"+V+"`."))}return null}return v(w)}function P(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function w(j,k,O,F,N){for(var V=j[k],z=0;z<R.length;z++)if(m(V,R[z]))return null;var G=JSON.stringify(R,function(he,D){var Ee=U(D);return Ee==="symbol"?String(D):D});return new h("Invalid "+F+" `"+N+"` of value `"+String(V)+"` "+("supplied to `"+O+"`, expected one of "+G+"."))}return v(w)}function A(R){function w(j,k,O,F,N){if(typeof R!="function")return new h("Property `"+N+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var V=j[k],z=Q(V);if(z!=="object")return new h("Invalid "+F+" `"+N+"` of type "+("`"+z+"` supplied to `"+O+"`, expected an object."));for(var G in V)if(r(V,G)){var K=R(V,G,O,F,N+"."+G,n);if(K instanceof Error)return K}return null}return v(w)}function M(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var w=0;w<R.length;w++){var j=R[w];if(typeof j!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(j)+" at index "+w+"."),i}function k(O,F,N,V,z){for(var G=[],K=0;K<R.length;K++){var he=R[K],D=he(O,F,N,V,z,n);if(D==null)return null;D.data&&r(D.data,"expectedType")&&G.push(D.data.expectedType)}var Ee=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new h("Invalid "+V+" `"+z+"` supplied to "+("`"+N+"`"+Ee+"."))}return v(k)}function L(){function R(w,j,k,O,F){return q(w[j])?null:new h("Invalid "+O+" `"+F+"` supplied to "+("`"+k+"`, expected a ReactNode."))}return v(R)}function $(R,w,j,k,O){return new h((R||"React class")+": "+w+" type `"+j+"."+k+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function W(R){function w(j,k,O,F,N){var V=j[k],z=Q(V);if(z!=="object")return new h("Invalid "+F+" `"+N+"` of type `"+z+"` "+("supplied to `"+O+"`, expected `object`."));for(var G in R){var K=R[G];if(typeof K!="function")return $(O,F,N,G,U(K));var he=K(V,G,O,F,N+"."+G,n);if(he)return he}return null}return v(w)}function H(R){function w(j,k,O,F,N){var V=j[k],z=Q(V);if(z!=="object")return new h("Invalid "+F+" `"+N+"` of type `"+z+"` "+("supplied to `"+O+"`, expected `object`."));var G=t({},j[k],R);for(var K in G){var he=R[K];if(r(R,K)&&typeof he!="function")return $(O,F,N,K,U(he));if(!he)return new h("Invalid "+F+" `"+N+"` key `"+K+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(j[k],null," ")+`
|
|
41
|
+
Valid keys: `+JSON.stringify(Object.keys(R),null," "));var D=he(V,K,O,F,N+"."+K,n);if(D)return D}return null}return v(w)}function q(R){switch(typeof R){case"number":case"string":case"undefined":return!0;case"boolean":return!R;case"object":if(Array.isArray(R))return R.every(q);if(R===null||a(R))return!0;var w=d(R);if(w){var j=w.call(R),k;if(w!==R.entries){for(;!(k=j.next()).done;)if(!q(k.value))return!1}else for(;!(k=j.next()).done;){var O=k.value;if(O&&!q(O[1]))return!1}}else return!1;return!0;default:return!1}}function oe(R,w){return R==="symbol"?!0:w?w["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&w instanceof Symbol:!1}function Q(R){var w=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":oe(w,R)?"symbol":w}function U(R){if(typeof R>"u"||R===null)return""+R;var w=Q(R);if(w==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return w}function I(R){var w=U(R);switch(w){case"array":case"object":return"an "+w;case"boolean":case"date":case"regexp":return"a "+w;default:return w}}function X(R){return!R.constructor||!R.constructor.name?f:R.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},to}var no,vi;function tf(){if(vi)return no;vi=1;var e=ps();function t(){}function n(){}return n.resetWarningCache=t,no=function(){function r(i,a,c,u,l,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},no}if(process.env.NODE_ENV!=="production"){var nf=wc(),rf=!0;ko.exports=ef()(nf.isElement,rf)}else ko.exports=tf()();var of=ko.exports;const Z=vc(of);function _n(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 sf=Object.freeze(Object.defineProperty({__proto__:null,default:_n},Symbol.toStringTag,{value:"Module"}));var Ro={exports:{}},se={};/**
|
|
42
42
|
* @license React
|
|
43
43
|
* react-is.production.js
|
|
44
44
|
*
|
|
@@ -46,7 +46,7 @@ Valid keys: `+JSON.stringify(Object.keys(I),null," "));var P=le(N,H,O,D,L+"."+H
|
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the MIT license found in the
|
|
48
48
|
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/var
|
|
49
|
+
*/var bi;function af(){if(bi)return se;bi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function m(h){if(typeof h=="object"&&h!==null){var v=h.$$typeof;switch(v){case e:switch(h=h.type,h){case n:case o:case r:case c:case u:case f:return h;default:switch(h=h&&h.$$typeof,h){case i:case a:case d:case l:return h;case s:return h;default:return v}}case t:return v}}}return se.ContextConsumer=s,se.ContextProvider=i,se.Element=e,se.ForwardRef=a,se.Fragment=n,se.Lazy=d,se.Memo=l,se.Portal=t,se.Profiler=o,se.StrictMode=r,se.Suspense=c,se.SuspenseList=u,se.isContextConsumer=function(h){return m(h)===s},se.isContextProvider=function(h){return m(h)===i},se.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},se.isForwardRef=function(h){return m(h)===a},se.isFragment=function(h){return m(h)===n},se.isLazy=function(h){return m(h)===d},se.isMemo=function(h){return m(h)===l},se.isPortal=function(h){return m(h)===t},se.isProfiler=function(h){return m(h)===o},se.isStrictMode=function(h){return m(h)===r},se.isSuspense=function(h){return m(h)===c},se.isSuspenseList=function(h){return m(h)===u},se.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===o||h===r||h===c||h===u||typeof h=="object"&&h!==null&&(h.$$typeof===d||h.$$typeof===l||h.$$typeof===i||h.$$typeof===s||h.$$typeof===a||h.$$typeof===p||h.getModuleId!==void 0)},se.typeOf=m,se}var ie={};/**
|
|
50
50
|
* @license React
|
|
51
51
|
* react-is.development.js
|
|
52
52
|
*
|
|
@@ -54,22 +54,22 @@ Valid keys: `+JSON.stringify(Object.keys(I),null," "));var P=le(N,H,O,D,L+"."+H
|
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the MIT license found in the
|
|
56
56
|
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var jr;function va(){return jr||(jr=1,process.env.NODE_ENV!=="production"&&function(){function e(c){if(typeof c=="object"&&c!==null){var x=c.$$typeof;switch(x){case t:switch(c=c.type,c){case r:case s:case o:case d:case l:case h:return c;default:switch(c=c&&c.$$typeof,c){case i:case u:case m:case f:return c;case a:return c;default:return x}}case n:return x}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),i=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");oe.ContextConsumer=a,oe.ContextProvider=i,oe.Element=t,oe.ForwardRef=u,oe.Fragment=r,oe.Lazy=m,oe.Memo=f,oe.Portal=n,oe.Profiler=s,oe.StrictMode=o,oe.Suspense=d,oe.SuspenseList=l,oe.isContextConsumer=function(c){return e(c)===a},oe.isContextProvider=function(c){return e(c)===i},oe.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===t},oe.isForwardRef=function(c){return e(c)===u},oe.isFragment=function(c){return e(c)===r},oe.isLazy=function(c){return e(c)===m},oe.isMemo=function(c){return e(c)===f},oe.isPortal=function(c){return e(c)===n},oe.isProfiler=function(c){return e(c)===s},oe.isStrictMode=function(c){return e(c)===o},oe.isSuspense=function(c){return e(c)===d},oe.isSuspenseList=function(c){return e(c)===l},oe.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===s||c===o||c===d||c===l||typeof c=="object"&&c!==null&&(c.$$typeof===m||c.$$typeof===f||c.$$typeof===i||c.$$typeof===a||c.$$typeof===u||c.$$typeof===g||c.getModuleId!==void 0)},oe.typeOf=e}()),oe}process.env.NODE_ENV==="production"?Hn.exports=ya():Hn.exports=va();var Rr=Hn.exports;const ba=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function xo(e){const t=`${e}`.match(ba);return t&&t[1]||""}function _o(e,t=""){return e.displayName||e.name||xo(e)||t}function $r(e,t,n){const r=_o(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function xa(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return _o(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Rr.ForwardRef:return $r(e,e.render,"ForwardRef");case Rr.Memo:return $r(e,e.type,"memo");default:return}}}const _a=Object.freeze(Object.defineProperty({__proto__:null,default:xa,getFunctionName:xo},Symbol.toStringTag,{value:"Module"}));function tt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":It(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Sa=Object.freeze(Object.defineProperty({__proto__:null,default:tt},Symbol.toStringTag,{value:"Module"}));function Gn(e,t){const n=se({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=se({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},s=t[r];n[r]={},!s||!Object.keys(s)?n[r]=o:!o||!Object.keys(o)?n[r]=s:(n[r]=se({},s),Object.keys(o).forEach(a=>{n[r][a]=Gn(o[a],s[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function wa(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((s,a)=>{if(a){const i=t(a);i!==""&&s.push(i),n&&n[a]&&s.push(n[a])}return s},[]).join(" ")}),r}const Pr=e=>e,Ea=()=>{let e=Pr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Pr}}},Ca=Ea(),Ta={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 sr(e,t,n="Mui"){const r=Ta[t];return r?`${n}-${r}`:`${Ca.generate(e)}-${t}`}function ka(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=sr(e,o,n)}),r}function Oa(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Ia=Object.freeze(Object.defineProperty({__proto__:null,default:Oa},Symbol.toStringTag,{value:"Module"}));function Ke(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function So(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=So(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ma(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=So(e))&&(r&&(r+=" "),r+=t);return r}const Aa=We.createContext(void 0);process.env.NODE_ENV!=="production"&&(Y.node,Y.object);function ja(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Gn(o.defaultProps,r):!o.styleOverrides&&!o.variants?Gn(o,r):r}function Ra({props:e,name:t}){const n=We.useContext(Aa);return ja({props:e,name:t,theme:{components:n}})}process.env.NODE_ENV!=="production"&&(Y.node,Y.object.isRequired);function $a(e){return Ra(e)}var Rt={},wo={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})(wo);var Eo=wo.exports,$n={exports:{}},Nr;function Pa(){return Nr||(Nr=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var s in o)({}).hasOwnProperty.call(o,s)&&(n[s]=o[s])}return n},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}($n)),$n.exports}var Pn={exports:{}},Lr;function Na(){return Lr||(Lr=1,function(e){function t(n,r){if(n==null)return{};var o={};for(var s in n)if({}.hasOwnProperty.call(n,s)){if(r.indexOf(s)!==-1)continue;o[s]=n[s]}return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Pn)),Pn.exports}function La(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 Ba={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,scale: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};function Da(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var za=/[A-Z]|^ms/g,Fa=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Co=function(t){return t.charCodeAt(1)===45},Br=function(t){return t!=null&&typeof t!="boolean"},Nn=Da(function(e){return Co(e)?e:e.replace(za,"-$&").toLowerCase()}),Dr=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Fa,function(r,o,s){return Ge={name:o,styles:s,next:Ge},o})}return Ba[t]!==1&&!Co(t)&&typeof n=="number"&&n!==0?n+"px":n};function tn(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Ge={name:o.name,styles:o.styles,next:Ge},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)Ge={name:a.name,styles:a.styles,next:Ge},a=a.next;var i=s.styles+";";return i}return Wa(e,t,n)}}var u=n;return u}function Wa(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=tn(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;Br(i)&&(r+=Nn(s)+":"+Dr(s,i)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var u=0;u<a.length;u++)Br(a[u])&&(r+=Nn(s)+":"+Dr(s,a[u])+";");else{var d=tn(e,t,a);switch(s){case"animation":case"animationName":{r+=Nn(s)+":"+d+";";break}default:r+=s+"{"+d+"}"}}}return r}var zr=/label:\s*([^\s;{]+)\s*(;|$)/g,Ge;function Va(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Ge=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=tn(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=tn(n,t,e[i]),r){var u=s;o+=u[i]}zr.lastIndex=0;for(var d="",l;(l=zr.exec(o))!==null;)d+="-"+l[1];var f=La(o)+d;return{name:f,styles:o,next:Ge}}function Ua(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 Ha(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 Ga=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),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(Ha(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=Ua(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ee="-ms-",nn="-moz-",J="-webkit-",To="comm",ar="rule",ir="decl",Ya="@import",ko="@keyframes",qa="@layer",Ka=Math.abs,pn=String.fromCharCode,Za=Object.assign;function Ja(e,t){return we(e,0)^45?(((t<<2^we(e,0))<<2^we(e,1))<<2^we(e,2))<<2^we(e,3):0}function Oo(e){return e.trim()}function Xa(e,t){return(e=t.exec(e))?e[0]:e}function X(e,t,n){return e.replace(t,n)}function Yn(e,t){return e.indexOf(t)}function we(e,t){return e.charCodeAt(t)|0}function Mt(e,t,n){return e.slice(t,n)}function Le(e){return e.length}function cr(e){return e.length}function Wt(e,t){return t.push(e),e}function Qa(e,t){return e.map(t).join("")}var mn=1,ut=1,Io=0,Te=0,ye=0,ft="";function hn(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:mn,column:ut,length:a,return:""}}function St(e,t){return Za(hn("",null,null,"",null,null,0),e,{length:-e.length},t)}function ei(){return ye}function ti(){return ye=Te>0?we(ft,--Te):0,ut--,ye===10&&(ut=1,mn--),ye}function Oe(){return ye=Te<Io?we(ft,Te++):0,ut++,ye===10&&(ut=1,mn++),ye}function De(){return we(ft,Te)}function Kt(){return Te}function $t(e,t){return Mt(ft,e,t)}function At(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 Mo(e){return mn=ut=1,Io=Le(ft=e),Te=0,[]}function Ao(e){return ft="",e}function Zt(e){return Oo($t(Te-1,qn(e===91?e+2:e===40?e+1:e)))}function ni(e){for(;(ye=De())&&ye<33;)Oe();return At(e)>2||At(ye)>3?"":" "}function ri(e,t){for(;--t&&Oe()&&!(ye<48||ye>102||ye>57&&ye<65||ye>70&&ye<97););return $t(e,Kt()+(t<6&&De()==32&&Oe()==32))}function qn(e){for(;Oe();)switch(ye){case e:return Te;case 34:case 39:e!==34&&e!==39&&qn(ye);break;case 40:e===41&&qn(e);break;case 92:Oe();break}return Te}function oi(e,t){for(;Oe()&&e+ye!==57;)if(e+ye===84&&De()===47)break;return"/*"+$t(t,Te-1)+"*"+pn(e===47?e:Oe())}function si(e){for(;!At(De());)Oe();return $t(e,Te)}function ai(e){return Ao(Jt("",null,null,null,[""],e=Mo(e),0,[0],e))}function Jt(e,t,n,r,o,s,a,i,u){for(var d=0,l=0,f=a,m=0,h=0,g=0,c=1,x=1,_=1,E=0,v="",M=o,w=s,k=r,C=v;x;)switch(g=E,E=Oe()){case 40:if(g!=108&&we(C,f-1)==58){Yn(C+=X(Zt(E),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Zt(E);break;case 9:case 10:case 13:case 32:C+=ni(g);break;case 92:C+=ri(Kt()-1,7);continue;case 47:switch(De()){case 42:case 47:Wt(ii(oi(Oe(),Kt()),t,n),u);break;default:C+="/"}break;case 123*c:i[d++]=Le(C)*_;case 125*c:case 59:case 0:switch(E){case 0:case 125:x=0;case 59+l:_==-1&&(C=X(C,/\f/g,"")),h>0&&Le(C)-f&&Wt(h>32?Wr(C+";",r,n,f-1):Wr(X(C," ","")+";",r,n,f-2),u);break;case 59:C+=";";default:if(Wt(k=Fr(C,t,n,d,l,o,i,v,M=[],w=[],f),s),E===123)if(l===0)Jt(C,t,k,k,M,s,f,i,w);else switch(m===99&&we(C,3)===110?100:m){case 100:case 108:case 109:case 115:Jt(e,k,k,r&&Wt(Fr(e,k,k,0,0,o,i,v,o,M=[],f),w),o,w,f,i,r?M:w);break;default:Jt(C,k,k,k,[""],w,0,i,w)}}d=l=h=0,c=_=1,v=C="",f=a;break;case 58:f=1+Le(C),h=g;default:if(c<1){if(E==123)--c;else if(E==125&&c++==0&&ti()==125)continue}switch(C+=pn(E),E*c){case 38:_=l>0?1:(C+="\f",-1);break;case 44:i[d++]=(Le(C)-1)*_,_=1;break;case 64:De()===45&&(C+=Zt(Oe())),m=De(),l=f=Le(v=C+=si(Kt())),E++;break;case 45:g===45&&Le(C)==2&&(c=0)}}return s}function Fr(e,t,n,r,o,s,a,i,u,d,l){for(var f=o-1,m=o===0?s:[""],h=cr(m),g=0,c=0,x=0;g<r;++g)for(var _=0,E=Mt(e,f+1,f=Ka(c=a[g])),v=e;_<h;++_)(v=Oo(c>0?m[_]+" "+E:X(E,/&\f/g,m[_])))&&(u[x++]=v);return hn(e,t,n,o===0?ar:i,u,d,l)}function ii(e,t,n){return hn(e,t,n,To,pn(ei()),Mt(e,2,-2),0)}function Wr(e,t,n,r){return hn(e,t,n,ir,Mt(e,0,r),Mt(e,r+1,-1),r)}function ct(e,t){for(var n="",r=cr(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function ci(e,t,n,r){switch(e.type){case qa:if(e.children.length)break;case Ya:case ir:return e.return=e.return||e.value;case To:return"";case ko:return e.return=e.value+"{"+ct(e.children,r)+"}";case ar:e.value=e.props.join(",")}return Le(n=ct(e.children,r))?e.return=e.value+"{"+n+"}":""}function li(e){var t=cr(e);return function(n,r,o,s){for(var a="",i=0;i<t;i++)a+=e[i](n,r,o,s)||"";return a}}function ui(e){return function(t){t.root||(t=t.return)&&e(t)}}var di=function(t,n,r){for(var o=0,s=0;o=s,s=De(),o===38&&s===12&&(n[r]=1),!At(s);)Oe();return $t(t,Te)},fi=function(t,n){var r=-1,o=44;do switch(At(o)){case 0:o===38&&De()===12&&(n[r]=1),t[r]+=di(Te-1,n,r);break;case 2:t[r]+=Zt(o);break;case 4:if(o===44){t[++r]=De()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=pn(o)}while(o=Oe());return t},pi=function(t,n){return Ao(fi(Mo(t),n))},Vr=new WeakMap,mi=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&&!Vr.get(r))&&!o){Vr.set(t,!0);for(var s=[],a=pi(n,s),i=r.props,u=0,d=0;u<a.length;u++)for(var l=0;l<i.length;l++,d++)t.props[d]=s[u]?a[u].replace(/&\f/g,i[l]):i[l]+" "+a[u]}}},hi=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function jo(e,t){switch(Ja(e,t)){case 5103:return J+"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 J+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return J+e+nn+e+Ee+e+e;case 6828:case 4268:return J+e+Ee+e+e;case 6165:return J+e+Ee+"flex-"+e+e;case 5187:return J+e+X(e,/(\w+).+(:[^]+)/,J+"box-$1$2"+Ee+"flex-$1$2")+e;case 5443:return J+e+Ee+"flex-item-"+X(e,/flex-|-self/,"")+e;case 4675:return J+e+Ee+"flex-line-pack"+X(e,/align-content|flex-|-self/,"")+e;case 5548:return J+e+Ee+X(e,"shrink","negative")+e;case 5292:return J+e+Ee+X(e,"basis","preferred-size")+e;case 6060:return J+"box-"+X(e,"-grow","")+J+e+Ee+X(e,"grow","positive")+e;case 4554:return J+X(e,/([^-])(transform)/g,"$1"+J+"$2")+e;case 6187:return X(X(X(e,/(zoom-|grab)/,J+"$1"),/(image-set)/,J+"$1"),e,"")+e;case 5495:case 3959:return X(e,/(image-set\([^]*)/,J+"$1$`$1");case 4968:return X(X(e,/(.+:)(flex-)?(.*)/,J+"box-pack:$3"+Ee+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+J+e+e;case 4095:case 3583:case 4068:case 2532:return X(e,/(.+)-inline(.+)/,J+"$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(Le(e)-1-t>6)switch(we(e,t+1)){case 109:if(we(e,t+4)!==45)break;case 102:return X(e,/(.+:)(.+)-([^]+)/,"$1"+J+"$2-$3$1"+nn+(we(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Yn(e,"stretch")?jo(X(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(we(e,t+1)!==115)break;case 6444:switch(we(e,Le(e)-3-(~Yn(e,"!important")&&10))){case 107:return X(e,":",":"+J)+e;case 101:return X(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+J+(we(e,14)===45?"inline-":"")+"box$3$1"+J+"$2$3$1"+Ee+"$2box$3")+e}break;case 5936:switch(we(e,t+11)){case 114:return J+e+Ee+X(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return J+e+Ee+X(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return J+e+Ee+X(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return J+e+Ee+e+e}return e}var gi=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case ir:t.return=jo(t.value,t.length);break;case ko:return ct([St(t,{value:X(t.value,"@","@"+J)})],o);case ar:if(t.length)return Qa(t.props,function(s){switch(Xa(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ct([St(t,{props:[X(s,/:(read-\w+)/,":"+nn+"$1")]})],o);case"::placeholder":return ct([St(t,{props:[X(s,/:(plac\w+)/,":"+J+"input-$1")]}),St(t,{props:[X(s,/:(plac\w+)/,":"+nn+"$1")]}),St(t,{props:[X(s,/:(plac\w+)/,Ee+"input-$1")]})],o)}return""})}},yi=[gi],vi=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(c){var x=c.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(c),c.setAttribute("data-s",""))})}var o=t.stylisPlugins||yi,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(c){for(var x=c.getAttribute("data-emotion").split(" "),_=1;_<x.length;_++)s[x[_]]=!0;i.push(c)});var u,d=[mi,hi];{var l,f=[ci,ui(function(c){l.insert(c)})],m=li(d.concat(o,f)),h=function(x){return ct(ai(x),m)};u=function(x,_,E,v){l=E,h(x?x+"{"+_.styles+"}":_.styles),v&&(g.inserted[_.name]=!0)}}var g={key:n,sheet:new Ga({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:u};return g.sheet.hydrate(i),g};function bi(e,t){const n=vi({key:"css",prepend:e});if(t){const r=n.insert;n.insert=(...o)=>(o[1].styles.match(/^@layer\s+[^{]*$/)||(o[1].styles=`@layer mui {${o[1].styles}}`),r(...o))}return n}const Ln=new Map;function Ro(e){const{injectFirst:t,enableCssLayer:n,children:r}=e,o=We.useMemo(()=>{const s=`${t}-${n}`;if(typeof document=="object"&&Ln.has(s))return Ln.get(s);const a=bi(t,n);return Ln.set(s,a),a},[t,n]);return t||n?p.jsx(kt.CacheProvider,{value:o,children:r}):r}process.env.NODE_ENV!=="production"&&(Ro.propTypes={children:Y.node,enableCssLayer:Y.bool,injectFirst:Y.bool});function xi(e){return e==null||Object.keys(e).length===0}function $o(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(xi(o)?n:o):t;return p.jsx(kt.Global,{styles:r})}process.env.NODE_ENV!=="production"&&($o.propTypes={defaultTheme:Y.object,styles:Y.oneOfType([Y.array,Y.string,Y.object,Y.func])});/**
|
|
57
|
+
*/var xi;function cf(){return xi||(xi=1,process.env.NODE_ENV!=="production"&&function(){function e(h){if(typeof h=="object"&&h!==null){var v=h.$$typeof;switch(v){case t:switch(h=h.type,h){case r:case s:case o:case u:case l:case p:return h;default:switch(h=h&&h.$$typeof,h){case a:case c:case f:case d:return h;case i:return h;default:return v}}case n:return v}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");ie.ContextConsumer=i,ie.ContextProvider=a,ie.Element=t,ie.ForwardRef=c,ie.Fragment=r,ie.Lazy=f,ie.Memo=d,ie.Portal=n,ie.Profiler=s,ie.StrictMode=o,ie.Suspense=u,ie.SuspenseList=l,ie.isContextConsumer=function(h){return e(h)===i},ie.isContextProvider=function(h){return e(h)===a},ie.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},ie.isForwardRef=function(h){return e(h)===c},ie.isFragment=function(h){return e(h)===r},ie.isLazy=function(h){return e(h)===f},ie.isMemo=function(h){return e(h)===d},ie.isPortal=function(h){return e(h)===n},ie.isProfiler=function(h){return e(h)===s},ie.isStrictMode=function(h){return e(h)===o},ie.isSuspense=function(h){return e(h)===u},ie.isSuspenseList=function(h){return e(h)===l},ie.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===s||h===o||h===u||h===l||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===a||h.$$typeof===i||h.$$typeof===c||h.$$typeof===m||h.getModuleId!==void 0)},ie.typeOf=e}()),ie}process.env.NODE_ENV==="production"?Ro.exports=af():Ro.exports=cf();var Si=Ro.exports;const lf=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function _c(e){const t=`${e}`.match(lf);return t&&t[1]||""}function Ec(e,t=""){return e.displayName||e.name||_c(e)||t}function Ti(e,t,n){const r=Ec(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function uf(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Ec(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Si.ForwardRef:return Ti(e,e.render,"ForwardRef");case Si.Memo:return Ti(e,e.type,"memo");default:return}}}const df=Object.freeze(Object.defineProperty({__proto__:null,default:uf,getFunctionName:_c},Symbol.toStringTag,{value:"Module"}));function Ot(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":_n(7));return e.charAt(0).toUpperCase()+e.slice(1)}const ff=Object.freeze(Object.defineProperty({__proto__:null,default:Ot},Symbol.toStringTag,{value:"Module"}));function Oo(e,t){const n=ce({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=ce({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},s=t[r];n[r]={},!s||!Object.keys(s)?n[r]=o:!o||!Object.keys(o)?n[r]=s:(n[r]=ce({},s),Object.keys(o).forEach(i=>{n[r][i]=Oo(o[i],s[i])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function hf(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((s,i)=>{if(i){const a=t(i);a!==""&&s.push(a),n&&n[i]&&s.push(n[i])}return s},[]).join(" ")}),r}const wi=e=>e,pf=()=>{let e=wi;return{configure(t){e=t},generate(t){return e(t)},reset(){e=wi}}},mf=pf(),gf={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 ms(e,t,n="Mui"){const r=gf[t];return r?`${n}-${r}`:`${mf.generate(e)}-${t}`}function yf(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=ms(e,o,n)}),r}function vf(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const bf=Object.freeze(Object.defineProperty({__proto__:null,default:vf},Symbol.toStringTag,{value:"Module"}));function St(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Pc(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=Pc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xf(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Pc(e))&&(r&&(r+=" "),r+=t);return r}const Sf=Fe.createContext(void 0);process.env.NODE_ENV!=="production"&&(Z.node,Z.object);function Tf(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Oo(o.defaultProps,r):!o.styleOverrides&&!o.variants?Oo(o,r):r}function wf({props:e,name:t}){const n=Fe.useContext(Sf);return Tf({props:e,name:t,theme:{components:n}})}process.env.NODE_ENV!=="production"&&(Z.node,Z.object.isRequired);function Cf(e){return wf(e)}var jn={},Ac={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})(Ac);var Mc=Ac.exports,ro={exports:{}},Ci;function _f(){return Ci||(Ci=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var s in o)({}).hasOwnProperty.call(o,s)&&(n[s]=o[s])}return n},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(ro)),ro.exports}var oo={exports:{}},_i;function Ef(){return _i||(_i=1,function(e){function t(n,r){if(n==null)return{};var o={};for(var s in n)if({}.hasOwnProperty.call(n,s)){if(r.indexOf(s)!==-1)continue;o[s]=n[s]}return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(oo)),oo.exports}function Pf(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 Af={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,scale: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};function Mf(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var kf=/[A-Z]|^ms/g,Rf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kc=function(t){return t.charCodeAt(1)===45},Ei=function(t){return t!=null&&typeof t!="boolean"},so=Mf(function(e){return kc(e)?e:e.replace(kf,"-$&").toLowerCase()}),Pi=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Rf,function(r,o,s){return mt={name:o,styles:s,next:mt},o})}return Af[t]!==1&&!kc(t)&&typeof n=="number"&&n!==0?n+"px":n};function pr(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return mt={name:o.name,styles:o.styles,next:mt},o.name;var s=n;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)mt={name:i.name,styles:i.styles,next:mt},i=i.next;var a=s.styles+";";return a}return Of(e,t,n)}}var c=n;return c}function Of(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=pr(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object"){var a=i;Ei(a)&&(r+=so(s)+":"+Pi(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var c=0;c<i.length;c++)Ei(i[c])&&(r+=so(s)+":"+Pi(s,i[c])+";");else{var u=pr(e,t,i);switch(s){case"animation":case"animationName":{r+=so(s)+":"+u+";";break}default:r+=s+"{"+u+"}"}}}return r}var Ai=/label:\s*([^\s;{]+)\s*(;|$)/g,mt;function If(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";mt=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=pr(n,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=pr(n,t,e[a]),r){var c=s;o+=c[a]}Ai.lastIndex=0;for(var u="",l;(l=Ai.exec(o))!==null;)u+="-"+l[1];var d=Pf(o)+u;return{name:d,styles:o,next:mt}}function jf(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 Lf(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 Df=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),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(Lf(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=jf(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Re="-ms-",mr="-moz-",ee="-webkit-",Rc="comm",gs="rule",ys="decl",$f="@import",Oc="@keyframes",Vf="@layer",Nf=Math.abs,Or=String.fromCharCode,Bf=Object.assign;function Ff(e,t){return ke(e,0)^45?(((t<<2^ke(e,0))<<2^ke(e,1))<<2^ke(e,2))<<2^ke(e,3):0}function Ic(e){return e.trim()}function zf(e,t){return(e=t.exec(e))?e[0]:e}function te(e,t,n){return e.replace(t,n)}function Io(e,t){return e.indexOf(t)}function ke(e,t){return e.charCodeAt(t)|0}function En(e,t,n){return e.slice(t,n)}function et(e){return e.length}function vs(e){return e.length}function Kn(e,t){return t.push(e),e}function Wf(e,t){return e.map(t).join("")}var Ir=1,Kt=1,jc=0,$e=0,Te=0,Zt="";function jr(e,t,n,r,o,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Ir,column:Kt,length:i,return:""}}function dn(e,t){return Bf(jr("",null,null,"",null,null,0),e,{length:-e.length},t)}function Uf(){return Te}function Hf(){return Te=$e>0?ke(Zt,--$e):0,Kt--,Te===10&&(Kt=1,Ir--),Te}function Be(){return Te=$e<jc?ke(Zt,$e++):0,Kt++,Te===10&&(Kt=1,Ir++),Te}function nt(){return ke(Zt,$e)}function or(){return $e}function Ln(e,t){return En(Zt,e,t)}function Pn(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 Lc(e){return Ir=Kt=1,jc=et(Zt=e),$e=0,[]}function Dc(e){return Zt="",e}function sr(e){return Ic(Ln($e-1,jo(e===91?e+2:e===40?e+1:e)))}function Gf(e){for(;(Te=nt())&&Te<33;)Be();return Pn(e)>2||Pn(Te)>3?"":" "}function Kf(e,t){for(;--t&&Be()&&!(Te<48||Te>102||Te>57&&Te<65||Te>70&&Te<97););return Ln(e,or()+(t<6&&nt()==32&&Be()==32))}function jo(e){for(;Be();)switch(Te){case e:return $e;case 34:case 39:e!==34&&e!==39&&jo(Te);break;case 40:e===41&&jo(e);break;case 92:Be();break}return $e}function Yf(e,t){for(;Be()&&e+Te!==57;)if(e+Te===84&&nt()===47)break;return"/*"+Ln(t,$e-1)+"*"+Or(e===47?e:Be())}function qf(e){for(;!Pn(nt());)Be();return Ln(e,$e)}function Zf(e){return Dc(ir("",null,null,null,[""],e=Lc(e),0,[0],e))}function ir(e,t,n,r,o,s,i,a,c){for(var u=0,l=0,d=i,f=0,p=0,m=0,h=1,v=1,b=1,S=0,y="",C=o,T=s,E=r,P=y;v;)switch(m=S,S=Be()){case 40:if(m!=108&&ke(P,d-1)==58){Io(P+=te(sr(S),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:P+=sr(S);break;case 9:case 10:case 13:case 32:P+=Gf(m);break;case 92:P+=Kf(or()-1,7);continue;case 47:switch(nt()){case 42:case 47:Kn(Xf(Yf(Be(),or()),t,n),c);break;default:P+="/"}break;case 123*h:a[u++]=et(P)*b;case 125*h:case 59:case 0:switch(S){case 0:case 125:v=0;case 59+l:b==-1&&(P=te(P,/\f/g,"")),p>0&&et(P)-d&&Kn(p>32?ki(P+";",r,n,d-1):ki(te(P," ","")+";",r,n,d-2),c);break;case 59:P+=";";default:if(Kn(E=Mi(P,t,n,u,l,o,a,y,C=[],T=[],d),s),S===123)if(l===0)ir(P,t,E,E,C,s,d,a,T);else switch(f===99&&ke(P,3)===110?100:f){case 100:case 108:case 109:case 115:ir(e,E,E,r&&Kn(Mi(e,E,E,0,0,o,a,y,o,C=[],d),T),o,T,d,a,r?C:T);break;default:ir(P,E,E,E,[""],T,0,a,T)}}u=l=p=0,h=b=1,y=P="",d=i;break;case 58:d=1+et(P),p=m;default:if(h<1){if(S==123)--h;else if(S==125&&h++==0&&Hf()==125)continue}switch(P+=Or(S),S*h){case 38:b=l>0?1:(P+="\f",-1);break;case 44:a[u++]=(et(P)-1)*b,b=1;break;case 64:nt()===45&&(P+=sr(Be())),f=nt(),l=d=et(y=P+=qf(or())),S++;break;case 45:m===45&&et(P)==2&&(h=0)}}return s}function Mi(e,t,n,r,o,s,i,a,c,u,l){for(var d=o-1,f=o===0?s:[""],p=vs(f),m=0,h=0,v=0;m<r;++m)for(var b=0,S=En(e,d+1,d=Nf(h=i[m])),y=e;b<p;++b)(y=Ic(h>0?f[b]+" "+S:te(S,/&\f/g,f[b])))&&(c[v++]=y);return jr(e,t,n,o===0?gs:a,c,u,l)}function Xf(e,t,n){return jr(e,t,n,Rc,Or(Uf()),En(e,2,-2),0)}function ki(e,t,n,r){return jr(e,t,n,ys,En(e,0,r),En(e,r+1,-1),r)}function Ut(e,t){for(var n="",r=vs(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Jf(e,t,n,r){switch(e.type){case Vf:if(e.children.length)break;case $f:case ys:return e.return=e.return||e.value;case Rc:return"";case Oc:return e.return=e.value+"{"+Ut(e.children,r)+"}";case gs:e.value=e.props.join(",")}return et(n=Ut(e.children,r))?e.return=e.value+"{"+n+"}":""}function Qf(e){var t=vs(e);return function(n,r,o,s){for(var i="",a=0;a<t;a++)i+=e[a](n,r,o,s)||"";return i}}function eh(e){return function(t){t.root||(t=t.return)&&e(t)}}var th=function(t,n,r){for(var o=0,s=0;o=s,s=nt(),o===38&&s===12&&(n[r]=1),!Pn(s);)Be();return Ln(t,$e)},nh=function(t,n){var r=-1,o=44;do switch(Pn(o)){case 0:o===38&&nt()===12&&(n[r]=1),t[r]+=th($e-1,n,r);break;case 2:t[r]+=sr(o);break;case 4:if(o===44){t[++r]=nt()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Or(o)}while(o=Be());return t},rh=function(t,n){return Dc(nh(Lc(t),n))},Ri=new WeakMap,oh=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&&!Ri.get(r))&&!o){Ri.set(t,!0);for(var s=[],i=rh(n,s),a=r.props,c=0,u=0;c<i.length;c++)for(var l=0;l<a.length;l++,u++)t.props[u]=s[c]?i[c].replace(/&\f/g,a[l]):a[l]+" "+i[c]}}},sh=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function $c(e,t){switch(Ff(e,t)){case 5103:return ee+"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 ee+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ee+e+mr+e+Re+e+e;case 6828:case 4268:return ee+e+Re+e+e;case 6165:return ee+e+Re+"flex-"+e+e;case 5187:return ee+e+te(e,/(\w+).+(:[^]+)/,ee+"box-$1$2"+Re+"flex-$1$2")+e;case 5443:return ee+e+Re+"flex-item-"+te(e,/flex-|-self/,"")+e;case 4675:return ee+e+Re+"flex-line-pack"+te(e,/align-content|flex-|-self/,"")+e;case 5548:return ee+e+Re+te(e,"shrink","negative")+e;case 5292:return ee+e+Re+te(e,"basis","preferred-size")+e;case 6060:return ee+"box-"+te(e,"-grow","")+ee+e+Re+te(e,"grow","positive")+e;case 4554:return ee+te(e,/([^-])(transform)/g,"$1"+ee+"$2")+e;case 6187:return te(te(te(e,/(zoom-|grab)/,ee+"$1"),/(image-set)/,ee+"$1"),e,"")+e;case 5495:case 3959:return te(e,/(image-set\([^]*)/,ee+"$1$`$1");case 4968:return te(te(e,/(.+:)(flex-)?(.*)/,ee+"box-pack:$3"+Re+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ee+e+e;case 4095:case 3583:case 4068:case 2532:return te(e,/(.+)-inline(.+)/,ee+"$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(et(e)-1-t>6)switch(ke(e,t+1)){case 109:if(ke(e,t+4)!==45)break;case 102:return te(e,/(.+:)(.+)-([^]+)/,"$1"+ee+"$2-$3$1"+mr+(ke(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Io(e,"stretch")?$c(te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ke(e,t+1)!==115)break;case 6444:switch(ke(e,et(e)-3-(~Io(e,"!important")&&10))){case 107:return te(e,":",":"+ee)+e;case 101:return te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ee+(ke(e,14)===45?"inline-":"")+"box$3$1"+ee+"$2$3$1"+Re+"$2box$3")+e}break;case 5936:switch(ke(e,t+11)){case 114:return ee+e+Re+te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ee+e+Re+te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ee+e+Re+te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ee+e+Re+e+e}return e}var ih=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case ys:t.return=$c(t.value,t.length);break;case Oc:return Ut([dn(t,{value:te(t.value,"@","@"+ee)})],o);case gs:if(t.length)return Wf(t.props,function(s){switch(zf(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ut([dn(t,{props:[te(s,/:(read-\w+)/,":"+mr+"$1")]})],o);case"::placeholder":return Ut([dn(t,{props:[te(s,/:(plac\w+)/,":"+ee+"input-$1")]}),dn(t,{props:[te(s,/:(plac\w+)/,":"+mr+"$1")]}),dn(t,{props:[te(s,/:(plac\w+)/,Re+"input-$1")]})],o)}return""})}},ah=[ih],ch=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(h){var v=h.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||ah,s={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var v=h.getAttribute("data-emotion").split(" "),b=1;b<v.length;b++)s[v[b]]=!0;a.push(h)});var c,u=[oh,sh];{var l,d=[Jf,eh(function(h){l.insert(h)})],f=Qf(u.concat(o,d)),p=function(v){return Ut(Zf(v),f)};c=function(v,b,S,y){l=S,p(v?v+"{"+b.styles+"}":b.styles),y&&(m.inserted[b.name]=!0)}}var m={key:n,sheet:new Df({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return m.sheet.hydrate(a),m};function lh(e,t){const n=ch({key:"css",prepend:e});if(t){const r=n.insert;n.insert=(...o)=>(o[1].styles.match(/^@layer\s+[^{]*$/)||(o[1].styles=`@layer mui {${o[1].styles}}`),r(...o))}return n}const io=new Map;function Vc(e){const{injectFirst:t,enableCssLayer:n,children:r}=e,o=Fe.useMemo(()=>{const s=`${t}-${n}`;if(typeof document=="object"&&io.has(s))return io.get(s);const i=lh(t,n);return io.set(s,i),i},[t,n]);return t||n?g.jsx(xn.CacheProvider,{value:o,children:r}):r}process.env.NODE_ENV!=="production"&&(Vc.propTypes={children:Z.node,enableCssLayer:Z.bool,injectFirst:Z.bool});function uh(e){return e==null||Object.keys(e).length===0}function Nc(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(uh(o)?n:o):t;return g.jsx(xn.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(Nc.propTypes={defaultTheme:Z.object,styles:Z.oneOfType([Z.array,Z.string,Z.object,Z.func])});/**
|
|
58
58
|
* @mui/styled-engine v5.18.0
|
|
59
59
|
*
|
|
60
60
|
* @license MIT
|
|
61
61
|
* This source code is licensed under the MIT license found in the
|
|
62
62
|
* LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/function
|
|
64
|
-
`)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}const
|
|
63
|
+
*/function dh(e,t){const n=wd(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
64
|
+
`)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}const fh=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Oi=[];function hh(e){return Oi[0]=e,If(Oi)}const ph=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Nc,StyledEngineProvider:Vc,ThemeContext:xn.ThemeContext,css:xn.css,default:dh,internal_processStyles:fh,internal_serializeStyles:hh,keyframes:xn.keyframes},Symbol.toStringTag,{value:"Module"})),mh=xt(ph),gh=xt(qd),yh=xt(ff),vh=xt(df),bh=["values","unit","step"],xh=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)=>ce({},n,{[r.key]:r.val}),{})};function Bc(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=St(e,bh),s=xh(t),i=Object.keys(s);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function c(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function u(f,p){const m=i.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(m!==-1&&typeof t[i[m]]=="number"?t[i[m]]:p)-r/100}${n})`}function l(f){return i.indexOf(f)+1<i.length?u(f,i[i.indexOf(f)+1]):a(f)}function d(f){const p=i.indexOf(f);return p===0?a(i[1]):p===i.length-1?c(i[p]):u(f,i[i.indexOf(f)+1]).replace("@media","@media not all and")}return ce({keys:i,values:s,up:a,down:c,between:u,only:l,not:d,unit:n},o)}const Sh={borderRadius:4},Tt=process.env.NODE_ENV!=="production"?Z.oneOfType([Z.number,Z.string,Z.object,Z.array]):{};function Sn(e,t){return t?tt(e,t,{clone:!1}):e}const bs={xs:0,sm:600,md:900,lg:1200,xl:1536},Ii={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${bs[e]}px)`};function ct(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||Ii;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const s=r.breakpoints||Ii;return Object.keys(t).reduce((i,a)=>{if(Object.keys(s.values||bs).indexOf(a)!==-1){const c=s.up(a);i[c]=n(t[a],a)}else{const c=a;i[c]=t[c]}return i},{})}return n(t)}function Th(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const s=e.up(o);return r[s]={},r},{}))||{}}function ji(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Lr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function gr(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=Lr(e,n)||r,t&&(o=t(o,r,e)),o}function be(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],c=i.theme,u=Lr(c,r)||{};return ct(i,a,d=>{let f=gr(u,o,d);return d===f&&typeof d=="string"&&(f=gr(u,o,`${t}${d==="default"?"":Ot(d)}`,d)),n===!1?f:{[n]:f}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:Tt}:{},s.filterProps=[t],s}function wh(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Ch={m:"margin",p:"padding"},_h={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Li={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Eh=wh(e=>{if(e.length>2)if(Li[e])e=Li[e];else return[e];const[t,n]=e.split(""),r=Ch[t],o=_h[n]||"";return Array.isArray(o)?o.map(s=>r+s):[r+o]}),Dr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],$r=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ph=[...Dr,...$r];function Dn(e,t,n,r){var o;const s=(o=Lr(e,t,!1))!=null?o:n;return typeof s=="number"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),s*i):Array.isArray(s)?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>s.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${i} > ${s.length-1}, you need to add the missing values.`].join(`
|
|
65
65
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
66
|
-
`))),s[
|
|
67
|
-
`)),()=>{})}function No(e){return Pt(e,"spacing",8,"spacing")}function Nt(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 Bi(e,t){return n=>e.reduce((r,o)=>(r[o]=Nt(t,n),r),{})}function Di(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=Ni(n),s=Bi(o,r),a=e[n];return Ve(e,a,s)}function Lo(e,t){const n=No(e.theme);return Object.keys(e).map(r=>Di(e,t,r,n)).reduce(Ot,{})}function fe(e){return Lo(e,yn)}fe.propTypes=process.env.NODE_ENV!=="production"?yn.reduce((e,t)=>(e[t]=Ze,e),{}):{};fe.filterProps=yn;function pe(e){return Lo(e,vn)}pe.propTypes=process.env.NODE_ENV!=="production"?vn.reduce((e,t)=>(e[t]=Ze,e),{}):{};pe.filterProps=vn;process.env.NODE_ENV!=="production"&&Li.reduce((e,t)=>(e[t]=Ze,e),{});function zi(e=8){if(e.mui)return e;const t=No({spacing:e}),n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return n.mui=!0,n}function bn(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>Object.keys(r).reduce((o,s)=>t[s]?Ot(o,t[s](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Me(e){return typeof e!="number"?e:`${e}px solid`}function je(e,t){return he({prop:e,themeKey:"borders",transform:t})}const Fi=je("border",Me),Wi=je("borderTop",Me),Vi=je("borderRight",Me),Ui=je("borderBottom",Me),Hi=je("borderLeft",Me),Gi=je("borderColor"),Yi=je("borderTopColor"),qi=je("borderRightColor"),Ki=je("borderBottomColor"),Zi=je("borderLeftColor"),Ji=je("outline",Me),Xi=je("outlineColor"),xn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Pt(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Nt(t,r)});return Ve(e,e.borderRadius,n)}return null};xn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ze}:{};xn.filterProps=["borderRadius"];bn(Fi,Wi,Vi,Ui,Hi,Gi,Yi,qi,Ki,Zi,xn,Ji,Xi);const _n=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Pt(e.theme,"spacing",8,"gap"),n=r=>({gap:Nt(t,r)});return Ve(e,e.gap,n)}return null};_n.propTypes=process.env.NODE_ENV!=="production"?{gap:Ze}:{};_n.filterProps=["gap"];const Sn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Pt(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Nt(t,r)});return Ve(e,e.columnGap,n)}return null};Sn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ze}:{};Sn.filterProps=["columnGap"];const wn=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Pt(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Nt(t,r)});return Ve(e,e.rowGap,n)}return null};wn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ze}:{};wn.filterProps=["rowGap"];const Qi=he({prop:"gridColumn"}),ec=he({prop:"gridRow"}),tc=he({prop:"gridAutoFlow"}),nc=he({prop:"gridAutoColumns"}),rc=he({prop:"gridAutoRows"}),oc=he({prop:"gridTemplateColumns"}),sc=he({prop:"gridTemplateRows"}),ac=he({prop:"gridTemplateAreas"}),ic=he({prop:"gridArea"});bn(_n,Sn,wn,Qi,ec,tc,nc,rc,oc,sc,ac,ic);function lt(e,t){return t==="grey"?t:e}const cc=he({prop:"color",themeKey:"palette",transform:lt}),lc=he({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:lt}),uc=he({prop:"backgroundColor",themeKey:"palette",transform:lt});bn(cc,lc,uc);function ke(e){return e<=1&&e!==0?`${e*100}%`:e}const dc=he({prop:"width",transform:ke}),ur=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const s=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||lr[n];return s?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:ke(n)}};return Ve(e,e.maxWidth,t)}return null};ur.filterProps=["maxWidth"];const fc=he({prop:"minWidth",transform:ke}),pc=he({prop:"height",transform:ke}),mc=he({prop:"maxHeight",transform:ke}),hc=he({prop:"minHeight",transform:ke});he({prop:"size",cssProperty:"width",transform:ke});he({prop:"size",cssProperty:"height",transform:ke});const gc=he({prop:"boxSizing"});bn(dc,ur,fc,pc,mc,hc,gc);const Lt={border:{themeKey:"borders",transform:Me},borderTop:{themeKey:"borders",transform:Me},borderRight:{themeKey:"borders",transform:Me},borderBottom:{themeKey:"borders",transform:Me},borderLeft:{themeKey:"borders",transform:Me},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Me},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:xn},color:{themeKey:"palette",transform:lt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:lt},backgroundColor:{themeKey:"palette",transform:lt},p:{style:pe},pt:{style:pe},pr:{style:pe},pb:{style:pe},pl:{style:pe},px:{style:pe},py:{style:pe},padding:{style:pe},paddingTop:{style:pe},paddingRight:{style:pe},paddingBottom:{style:pe},paddingLeft:{style:pe},paddingX:{style:pe},paddingY:{style:pe},paddingInline:{style:pe},paddingInlineStart:{style:pe},paddingInlineEnd:{style:pe},paddingBlock:{style:pe},paddingBlockStart:{style:pe},paddingBlockEnd:{style:pe},m:{style:fe},mt:{style:fe},mr:{style:fe},mb:{style:fe},ml:{style:fe},mx:{style:fe},my:{style:fe},margin:{style:fe},marginTop:{style:fe},marginRight:{style:fe},marginBottom:{style:fe},marginLeft:{style:fe},marginX:{style:fe},marginY:{style:fe},marginInline:{style:fe},marginInlineStart:{style:fe},marginInlineEnd:{style:fe},marginBlock:{style:fe},marginBlockStart:{style:fe},marginBlockEnd:{style:fe},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:_n},rowGap:{style:wn},columnGap:{style:Sn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ke},maxWidth:{style:ur},minWidth:{transform:ke},height:{transform:ke},maxHeight:{transform:ke},minHeight:{transform:ke},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function yc(...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 vc(e,t){return typeof e=="function"?e(t):e}function Bo(){function e(n,r,o,s){const a={[n]:r,theme:o},i=s[n];if(!i)return{[n]:r};const{cssProperty:u=n,themeKey:d,transform:l,style:f}=i;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const m=gn(o,d)||{};return f?f(a):Ve(a,r,g=>{let c=rn(m,l,g);return g===c&&typeof g=="string"&&(c=rn(m,l,`${n}${g==="default"?"":tt(g)}`,g)),u===!1?c:{[u]:c}})}function t(n){var r;const{sx:o,theme:s={},nested:a}=n||{};if(!o)return null;const i=(r=s.unstable_sxConfig)!=null?r:Lt;function u(d){let l=d;if(typeof d=="function")l=d(s);else if(typeof d!="object")return d;if(!l)return null;const f=ji(s.breakpoints),m=Object.keys(f);let h=f;return Object.keys(l).forEach(g=>{const c=vc(l[g],s);if(c!=null)if(typeof c=="object")if(i[g])h=Ot(h,e(g,c,s,i));else{const x=Ve({theme:s},c,_=>({[g]:_}));yc(x,c)?h[g]=t({sx:c,theme:s,nested:!0}):h=Ot(h,x)}else h=Ot(h,e(g,c,s,i))}),!a&&s.modularCssLayers?{"@layer sx":Gr(m,h)}:Gr(m,h)}return Array.isArray(o)?o.map(u):u(o)}return t}const En=Bo();En.filterProps=["sx"];function Do(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 bc=["breakpoints","palette","spacing","shape"];function zo(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={}}=e,a=Ke(e,bc),i=Po(n),u=zi(o);let d=Be({breakpoints:i,direction:"ltr",components:{},palette:se({mode:"light"},r),spacing:u,shape:se({},Ai,s)},a);return d.applyStyles=Do,d=t.reduce((l,f)=>Be(l,f),d),d.unstable_sxConfig=se({},Lt,a==null?void 0:a.unstable_sxConfig),d.unstable_sx=function(f){return En({sx:f,theme:this})},d}const xc=Object.freeze(Object.defineProperty({__proto__:null,default:zo,private_createBreakpoints:Po,unstable_applyStyles:Do},Symbol.toStringTag,{value:"Module"})),_c=qe(xc),Sc=["sx"],wc=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Lt;return Object.keys(e).forEach(s=>{o[s]?r.systemProps[s]=e[s]:r.otherProps[s]=e[s]}),r};function Ec(e){const{sx:t}=e,n=Ke(e,Sc),{systemProps:r,otherProps:o}=wc(n);let s;return Array.isArray(t)?s=[r,...t]:typeof t=="function"?s=(...a)=>{const i=t(...a);return He(i)?se({},r,i):r}:s=se({},r,t),se({},o,{sx:s})}const Cc=Object.freeze(Object.defineProperty({__proto__:null,default:En,extendSxProp:Ec,unstable_createStyleFunctionSx:Bo,unstable_defaultSxConfig:Lt},Symbol.toStringTag,{value:"Module"})),Tc=qe(Cc);var pt=Eo;Object.defineProperty(Rt,"__esModule",{value:!0});var kc=Rt.default=Fc;Rt.shouldForwardProp=Xt;Rt.systemDefaultTheme=void 0;var Ie=pt(Pa()),Kn=pt(Na()),on=Nc(Ci),Oc=Ti,Ic=pt(ki),Mc=pt(Oi),Ac=pt(_c),jc=pt(Tc);const Rc=["ownerState"],$c=["variants"],Pc=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Fo(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Fo=function(r){return r?n:t})(e)}function Nc(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Fo(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var a=o?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(r,s,a):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function Lc(e){return Object.keys(e).length===0}function Bc(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Xt(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function qr(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const Dc=Rt.systemDefaultTheme=(0,Ac.default)(),Kr=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Vt({defaultTheme:e,theme:t,themeId:n}){return Lc(t)?e:t[n]||t}function zc(e){return e?(t,n)=>n[e]:null}function Qt(e,t,n){let{ownerState:r}=t,o=(0,Kn.default)(t,Rc);const s=typeof e=="function"?e((0,Ie.default)({ownerState:r},o)):e;if(Array.isArray(s))return s.flatMap(a=>Qt(a,(0,Ie.default)({ownerState:r},o),n));if(s&&typeof s=="object"&&Array.isArray(s.variants)){const{variants:a=[]}=s;let u=(0,Kn.default)(s,$c);return a.forEach(d=>{let l=!0;if(typeof d.props=="function"?l=d.props((0,Ie.default)({ownerState:r},o,r)):Object.keys(d.props).forEach(f=>{(r==null?void 0:r[f])!==d.props[f]&&o[f]!==d.props[f]&&(l=!1)}),l){Array.isArray(u)||(u=[u]);const f=typeof d.style=="function"?d.style((0,Ie.default)({ownerState:r},o,r)):d.style;u.push(n?qr((0,on.internal_serializeStyles)(f),n):f)}}),u}return n?qr((0,on.internal_serializeStyles)(s),n):s}function Fc(e={}){const{themeId:t,defaultTheme:n=Dc,rootShouldForwardProp:r=Xt,slotShouldForwardProp:o=Xt}=e,s=a=>(0,jc.default)((0,Ie.default)({},a,{theme:Vt((0,Ie.default)({},a,{defaultTheme:n,themeId:t}))}));return s.__mui_systemSx=!0,(a,i={})=>{(0,on.internal_processStyles)(a,k=>k.filter(C=>!(C!=null&&C.__mui_systemSx)));const{name:u,slot:d,skipVariantsResolver:l,skipSx:f,overridesResolver:m=zc(Kr(d))}=i,h=(0,Kn.default)(i,Pc),g=u&&u.startsWith("Mui")||d?"components":"custom",c=l!==void 0?l:d&&d!=="Root"&&d!=="root"||!1,x=f||!1;let _;process.env.NODE_ENV!=="production"&&u&&(_=`${u}-${Kr(d||"Root")}`);let E=Xt;d==="Root"||d==="root"?E=r:d?E=o:Bc(a)&&(E=void 0);const v=(0,on.default)(a,(0,Ie.default)({shouldForwardProp:E,label:_},h)),M=k=>typeof k=="function"&&k.__emotion_real!==k||(0,Oc.isPlainObject)(k)?C=>{const A=Vt({theme:C.theme,defaultTheme:n,themeId:t});return Qt(k,(0,Ie.default)({},C,{theme:A}),A.modularCssLayers?g:void 0)}:k,w=(k,...C)=>{let A=M(k);const $=C?C.map(M):[];u&&m&&$.push(W=>{const U=Vt((0,Ie.default)({},W,{defaultTheme:n,themeId:t}));if(!U.components||!U.components[u]||!U.components[u].styleOverrides)return null;const q=U.components[u].styleOverrides,ie={};return Object.entries(q).forEach(([Q,K])=>{ie[Q]=Qt(K,(0,Ie.default)({},W,{theme:U}),U.modularCssLayers?"theme":void 0)}),m(W,ie)}),u&&!c&&$.push(W=>{var U;const q=Vt((0,Ie.default)({},W,{defaultTheme:n,themeId:t})),ie=q==null||(U=q.components)==null||(U=U[u])==null?void 0:U.variants;return Qt({variants:ie},(0,Ie.default)({},W,{theme:q}),q.modularCssLayers?"theme":void 0)}),x||$.push(s);const z=$.length-C.length;if(Array.isArray(k)&&z>0){const W=new Array(z).fill("");A=[...k,...W],A.raw=[...k.raw,...W]}const B=v(A,...$);if(process.env.NODE_ENV!=="production"){let W;u&&(W=`${u}${(0,Ic.default)(d||"")}`),W===void 0&&(W=`Styled(${(0,Mc.default)(a)})`),B.displayName=W}return a.muiName&&(B.muiName=a.muiName),B};return v.withConfig&&(w.withConfig=v.withConfig),w}}function Wc(e,t){return se({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var ge={};const Vc=qe(ga),Uc=qe(Ia);var Wo=Eo;Object.defineProperty(ge,"__esModule",{value:!0});ge.alpha=Go;ge.blend=nl;ge.colorChannel=void 0;var Hc=ge.darken=fr;ge.decomposeColor=Ae;ge.emphasize=Yo;var Zr=ge.getContrastRatio=Jc;ge.getLuminance=sn;ge.hexToRgb=Vo;ge.hslToRgb=Ho;var Gc=ge.lighten=pr;ge.private_safeAlpha=Xc;ge.private_safeColorChannel=void 0;ge.private_safeDarken=Qc;ge.private_safeEmphasize=tl;ge.private_safeLighten=el;ge.recomposeColor=mt;ge.rgbToHex=Zc;var Jr=Wo(Vc),Yc=Wo(Uc);function dr(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),(0,Yc.default)(e,t,n)}function Vo(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 qc(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Ae(e){if(e.type)return e;if(e.charAt(0)==="#")return Ae(Vo(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
68
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,
|
|
69
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,
|
|
70
|
-
`))}return
|
|
71
|
-
The color object needs to have a \`main\` property or a \`${
|
|
72
|
-
\`color.main\` should be a string, but \`${JSON.stringify(
|
|
66
|
+
`))),s[i]):typeof s=="function"?s:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${s}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
67
|
+
`)),()=>{})}function Fc(e){return Dn(e,"spacing",8,"spacing")}function $n(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 Ah(e,t){return n=>e.reduce((r,o)=>(r[o]=$n(t,n),r),{})}function Mh(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=Eh(n),s=Ah(o,r),i=e[n];return ct(e,i,s)}function zc(e,t){const n=Fc(e.theme);return Object.keys(e).map(r=>Mh(e,t,r,n)).reduce(Sn,{})}function ge(e){return zc(e,Dr)}ge.propTypes=process.env.NODE_ENV!=="production"?Dr.reduce((e,t)=>(e[t]=Tt,e),{}):{};ge.filterProps=Dr;function ye(e){return zc(e,$r)}ye.propTypes=process.env.NODE_ENV!=="production"?$r.reduce((e,t)=>(e[t]=Tt,e),{}):{};ye.filterProps=$r;process.env.NODE_ENV!=="production"&&Ph.reduce((e,t)=>(e[t]=Tt,e),{});function kh(e=8){if(e.mui)return e;const t=Fc({spacing:e}),n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return n.mui=!0,n}function Vr(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>Object.keys(r).reduce((o,s)=>t[s]?Sn(o,t[s](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Ue(e){return typeof e!="number"?e:`${e}px solid`}function Ye(e,t){return be({prop:e,themeKey:"borders",transform:t})}const Rh=Ye("border",Ue),Oh=Ye("borderTop",Ue),Ih=Ye("borderRight",Ue),jh=Ye("borderBottom",Ue),Lh=Ye("borderLeft",Ue),Dh=Ye("borderColor"),$h=Ye("borderTopColor"),Vh=Ye("borderRightColor"),Nh=Ye("borderBottomColor"),Bh=Ye("borderLeftColor"),Fh=Ye("outline",Ue),zh=Ye("outlineColor"),Nr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Dn(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:$n(t,r)});return ct(e,e.borderRadius,n)}return null};Nr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Tt}:{};Nr.filterProps=["borderRadius"];Vr(Rh,Oh,Ih,jh,Lh,Dh,$h,Vh,Nh,Bh,Nr,Fh,zh);const Br=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Dn(e.theme,"spacing",8,"gap"),n=r=>({gap:$n(t,r)});return ct(e,e.gap,n)}return null};Br.propTypes=process.env.NODE_ENV!=="production"?{gap:Tt}:{};Br.filterProps=["gap"];const Fr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Dn(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:$n(t,r)});return ct(e,e.columnGap,n)}return null};Fr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Tt}:{};Fr.filterProps=["columnGap"];const zr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Dn(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:$n(t,r)});return ct(e,e.rowGap,n)}return null};zr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Tt}:{};zr.filterProps=["rowGap"];const Wh=be({prop:"gridColumn"}),Uh=be({prop:"gridRow"}),Hh=be({prop:"gridAutoFlow"}),Gh=be({prop:"gridAutoColumns"}),Kh=be({prop:"gridAutoRows"}),Yh=be({prop:"gridTemplateColumns"}),qh=be({prop:"gridTemplateRows"}),Zh=be({prop:"gridTemplateAreas"}),Xh=be({prop:"gridArea"});Vr(Br,Fr,zr,Wh,Uh,Hh,Gh,Kh,Yh,qh,Zh,Xh);function Ht(e,t){return t==="grey"?t:e}const Jh=be({prop:"color",themeKey:"palette",transform:Ht}),Qh=be({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ht}),ep=be({prop:"backgroundColor",themeKey:"palette",transform:Ht});Vr(Jh,Qh,ep);function Ne(e){return e<=1&&e!==0?`${e*100}%`:e}const tp=be({prop:"width",transform:Ne}),xs=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const s=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||bs[n];return s?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:Ne(n)}};return ct(e,e.maxWidth,t)}return null};xs.filterProps=["maxWidth"];const np=be({prop:"minWidth",transform:Ne}),rp=be({prop:"height",transform:Ne}),op=be({prop:"maxHeight",transform:Ne}),sp=be({prop:"minHeight",transform:Ne});be({prop:"size",cssProperty:"width",transform:Ne});be({prop:"size",cssProperty:"height",transform:Ne});const ip=be({prop:"boxSizing"});Vr(tp,xs,np,rp,op,sp,ip);const Vn={border:{themeKey:"borders",transform:Ue},borderTop:{themeKey:"borders",transform:Ue},borderRight:{themeKey:"borders",transform:Ue},borderBottom:{themeKey:"borders",transform:Ue},borderLeft:{themeKey:"borders",transform:Ue},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ue},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Nr},color:{themeKey:"palette",transform:Ht},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ht},backgroundColor:{themeKey:"palette",transform:Ht},p:{style:ye},pt:{style:ye},pr:{style:ye},pb:{style:ye},pl:{style:ye},px:{style:ye},py:{style:ye},padding:{style:ye},paddingTop:{style:ye},paddingRight:{style:ye},paddingBottom:{style:ye},paddingLeft:{style:ye},paddingX:{style:ye},paddingY:{style:ye},paddingInline:{style:ye},paddingInlineStart:{style:ye},paddingInlineEnd:{style:ye},paddingBlock:{style:ye},paddingBlockStart:{style:ye},paddingBlockEnd:{style:ye},m:{style:ge},mt:{style:ge},mr:{style:ge},mb:{style:ge},ml:{style:ge},mx:{style:ge},my:{style:ge},margin:{style:ge},marginTop:{style:ge},marginRight:{style:ge},marginBottom:{style:ge},marginLeft:{style:ge},marginX:{style:ge},marginY:{style:ge},marginInline:{style:ge},marginInlineStart:{style:ge},marginInlineEnd:{style:ge},marginBlock:{style:ge},marginBlockStart:{style:ge},marginBlockEnd:{style:ge},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:Br},rowGap:{style:zr},columnGap:{style:Fr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ne},maxWidth:{style:xs},minWidth:{transform:Ne},height:{transform:Ne},maxHeight:{transform:Ne},minHeight:{transform:Ne},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ap(...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 cp(e,t){return typeof e=="function"?e(t):e}function Wc(){function e(n,r,o,s){const i={[n]:r,theme:o},a=s[n];if(!a)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:l,style:d}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=Lr(o,u)||{};return d?d(i):ct(i,r,m=>{let h=gr(f,l,m);return m===h&&typeof m=="string"&&(h=gr(f,l,`${n}${m==="default"?"":Ot(m)}`,m)),c===!1?h:{[c]:h}})}function t(n){var r;const{sx:o,theme:s={},nested:i}=n||{};if(!o)return null;const a=(r=s.unstable_sxConfig)!=null?r:Vn;function c(u){let l=u;if(typeof u=="function")l=u(s);else if(typeof u!="object")return u;if(!l)return null;const d=Th(s.breakpoints),f=Object.keys(d);let p=d;return Object.keys(l).forEach(m=>{const h=cp(l[m],s);if(h!=null)if(typeof h=="object")if(a[m])p=Sn(p,e(m,h,s,a));else{const v=ct({theme:s},h,b=>({[m]:b}));ap(v,h)?p[m]=t({sx:h,theme:s,nested:!0}):p=Sn(p,v)}else p=Sn(p,e(m,h,s,a))}),!i&&s.modularCssLayers?{"@layer sx":ji(f,p)}:ji(f,p)}return Array.isArray(o)?o.map(c):c(o)}return t}const Wr=Wc();Wr.filterProps=["sx"];function Uc(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 lp=["breakpoints","palette","spacing","shape"];function Hc(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={}}=e,i=St(e,lp),a=Bc(n),c=kh(o);let u=tt({breakpoints:a,direction:"ltr",components:{},palette:ce({mode:"light"},r),spacing:c,shape:ce({},Sh,s)},i);return u.applyStyles=Uc,u=t.reduce((l,d)=>tt(l,d),u),u.unstable_sxConfig=ce({},Vn,i==null?void 0:i.unstable_sxConfig),u.unstable_sx=function(d){return Wr({sx:d,theme:this})},u}const up=Object.freeze(Object.defineProperty({__proto__:null,default:Hc,private_createBreakpoints:Bc,unstable_applyStyles:Uc},Symbol.toStringTag,{value:"Module"})),dp=xt(up),fp=["sx"],hp=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Vn;return Object.keys(e).forEach(s=>{o[s]?r.systemProps[s]=e[s]:r.otherProps[s]=e[s]}),r};function pp(e){const{sx:t}=e,n=St(e,fp),{systemProps:r,otherProps:o}=hp(n);let s;return Array.isArray(t)?s=[r,...t]:typeof t=="function"?s=(...i)=>{const a=t(...i);return pt(a)?ce({},r,a):r}:s=ce({},r,t),ce({},o,{sx:s})}const mp=Object.freeze(Object.defineProperty({__proto__:null,default:Wr,extendSxProp:pp,unstable_createStyleFunctionSx:Wc,unstable_defaultSxConfig:Vn},Symbol.toStringTag,{value:"Module"})),gp=xt(mp);var Xt=Mc;Object.defineProperty(jn,"__esModule",{value:!0});var yp=jn.default=Rp;jn.shouldForwardProp=ar;jn.systemDefaultTheme=void 0;var We=Xt(_f()),Lo=Xt(Ef()),yr=Ep(mh),vp=gh,bp=Xt(yh),xp=Xt(vh),Sp=Xt(dp),Tp=Xt(gp);const wp=["ownerState"],Cp=["variants"],_p=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Gc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Gc=function(r){return r?n:t})(e)}function Ep(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Gc(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function Pp(e){return Object.keys(e).length===0}function Ap(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ar(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Di(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const Mp=jn.systemDefaultTheme=(0,Sp.default)(),$i=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Yn({defaultTheme:e,theme:t,themeId:n}){return Pp(t)?e:t[n]||t}function kp(e){return e?(t,n)=>n[e]:null}function cr(e,t,n){let{ownerState:r}=t,o=(0,Lo.default)(t,wp);const s=typeof e=="function"?e((0,We.default)({ownerState:r},o)):e;if(Array.isArray(s))return s.flatMap(i=>cr(i,(0,We.default)({ownerState:r},o),n));if(s&&typeof s=="object"&&Array.isArray(s.variants)){const{variants:i=[]}=s;let c=(0,Lo.default)(s,Cp);return i.forEach(u=>{let l=!0;if(typeof u.props=="function"?l=u.props((0,We.default)({ownerState:r},o,r)):Object.keys(u.props).forEach(d=>{(r==null?void 0:r[d])!==u.props[d]&&o[d]!==u.props[d]&&(l=!1)}),l){Array.isArray(c)||(c=[c]);const d=typeof u.style=="function"?u.style((0,We.default)({ownerState:r},o,r)):u.style;c.push(n?Di((0,yr.internal_serializeStyles)(d),n):d)}}),c}return n?Di((0,yr.internal_serializeStyles)(s),n):s}function Rp(e={}){const{themeId:t,defaultTheme:n=Mp,rootShouldForwardProp:r=ar,slotShouldForwardProp:o=ar}=e,s=i=>(0,Tp.default)((0,We.default)({},i,{theme:Yn((0,We.default)({},i,{defaultTheme:n,themeId:t}))}));return s.__mui_systemSx=!0,(i,a={})=>{(0,yr.internal_processStyles)(i,E=>E.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:c,slot:u,skipVariantsResolver:l,skipSx:d,overridesResolver:f=kp($i(u))}=a,p=(0,Lo.default)(a,_p),m=c&&c.startsWith("Mui")||u?"components":"custom",h=l!==void 0?l:u&&u!=="Root"&&u!=="root"||!1,v=d||!1;let b;process.env.NODE_ENV!=="production"&&c&&(b=`${c}-${$i(u||"Root")}`);let S=ar;u==="Root"||u==="root"?S=r:u?S=o:Ap(i)&&(S=void 0);const y=(0,yr.default)(i,(0,We.default)({shouldForwardProp:S,label:b},p)),C=E=>typeof E=="function"&&E.__emotion_real!==E||(0,vp.isPlainObject)(E)?P=>{const A=Yn({theme:P.theme,defaultTheme:n,themeId:t});return cr(E,(0,We.default)({},P,{theme:A}),A.modularCssLayers?m:void 0)}:E,T=(E,...P)=>{let A=C(E);const M=P?P.map(C):[];c&&f&&M.push(W=>{const H=Yn((0,We.default)({},W,{defaultTheme:n,themeId:t}));if(!H.components||!H.components[c]||!H.components[c].styleOverrides)return null;const q=H.components[c].styleOverrides,oe={};return Object.entries(q).forEach(([Q,U])=>{oe[Q]=cr(U,(0,We.default)({},W,{theme:H}),H.modularCssLayers?"theme":void 0)}),f(W,oe)}),c&&!h&&M.push(W=>{var H;const q=Yn((0,We.default)({},W,{defaultTheme:n,themeId:t})),oe=q==null||(H=q.components)==null||(H=H[c])==null?void 0:H.variants;return cr({variants:oe},(0,We.default)({},W,{theme:q}),q.modularCssLayers?"theme":void 0)}),v||M.push(s);const L=M.length-P.length;if(Array.isArray(E)&&L>0){const W=new Array(L).fill("");A=[...E,...W],A.raw=[...E.raw,...W]}const $=y(A,...M);if(process.env.NODE_ENV!=="production"){let W;c&&(W=`${c}${(0,bp.default)(u||"")}`),W===void 0&&(W=`Styled(${(0,xp.default)(i)})`),$.displayName=W}return i.muiName&&($.muiName=i.muiName),$};return y.withConfig&&(T.withConfig=y.withConfig),T}}function Op(e,t){return ce({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var xe={};const Ip=xt(sf),jp=xt(bf);var Kc=Mc;Object.defineProperty(xe,"__esModule",{value:!0});xe.alpha=Xc;xe.blend=Gp;xe.colorChannel=void 0;var Lp=xe.darken=Ts;xe.decomposeColor=Ke;xe.emphasize=Jc;var Vi=xe.getContrastRatio=Fp;xe.getLuminance=vr;xe.hexToRgb=Yc;xe.hslToRgb=Zc;var Dp=xe.lighten=ws;xe.private_safeAlpha=zp;xe.private_safeColorChannel=void 0;xe.private_safeDarken=Wp;xe.private_safeEmphasize=Hp;xe.private_safeLighten=Up;xe.recomposeColor=Jt;xe.rgbToHex=Bp;var Ni=Kc(Ip),$p=Kc(jp);function Ss(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),(0,$p.default)(e,t,n)}function Yc(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 Vp(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Ke(e){if(e.type)return e;if(e.charAt(0)==="#")return Ke(Yc(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
68
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,Ni.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(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
|
|
69
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,Ni.default)(10,o))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:o}}const qc=e=>{const t=Ke(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};xe.colorChannel=qc;const Np=(e,t)=>{try{return qc(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};xe.private_safeColorChannel=Np;function Jt(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,s)=>s<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 Bp(e){if(e.indexOf("#")===0)return e;const{values:t}=Ke(e);return`#${t.map((n,r)=>Vp(r===3?Math.round(255*n):n)).join("")}`}function Zc(e){e=Ke(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,s=r*Math.min(o,1-o),i=(u,l=(u+n/30)%12)=>o-s*Math.max(Math.min(l-3,9-l,1),-1);let a="rgb";const c=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(a+="a",c.push(t[3])),Jt({type:a,values:c})}function vr(e){e=Ke(e);let t=e.type==="hsl"||e.type==="hsla"?Ke(Zc(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 Fp(e,t){const n=vr(e),r=vr(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Xc(e,t){return e=Ke(e),t=Ss(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Jt(e)}function zp(e,t,n){try{return Xc(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Ts(e,t){if(e=Ke(e),t=Ss(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 Jt(e)}function Wp(e,t,n){try{return Ts(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function ws(e,t){if(e=Ke(e),t=Ss(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 Jt(e)}function Up(e,t,n){try{return ws(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Jc(e,t=.15){return vr(e)>.5?Ts(e,t):ws(e,t)}function Hp(e,t,n){try{return Jc(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Gp(e,t,n,r=1){const o=(c,u)=>Math.round((c**(1/r)*(1-n)+u**(1/r)*n)**r),s=Ke(e),i=Ke(t),a=[o(s.values[0],i.values[0]),o(s.values[1],i.values[1]),o(s.values[2],i.values[2])];return Jt({type:"rgb",values:a})}const An={black:"#000",white:"#fff"},Kp={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"},It={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},jt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},fn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Lt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Dt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},$t={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Yp=["mode","contrastThreshold","tonalOffset"],Bi={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:An.white,default:An.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}},ao={text:{primary:An.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:An.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 Fi(e,t,n,r){const o=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Dp(e.main,o):t==="dark"&&(e.dark=Lp(e.main,s)))}function qp(e="light"){return e==="dark"?{main:Lt[200],light:Lt[50],dark:Lt[400]}:{main:Lt[700],light:Lt[400],dark:Lt[800]}}function Zp(e="light"){return e==="dark"?{main:It[200],light:It[50],dark:It[400]}:{main:It[500],light:It[300],dark:It[700]}}function Xp(e="light"){return e==="dark"?{main:jt[500],light:jt[300],dark:jt[700]}:{main:jt[700],light:jt[400],dark:jt[800]}}function Jp(e="light"){return e==="dark"?{main:Dt[400],light:Dt[300],dark:Dt[700]}:{main:Dt[700],light:Dt[500],dark:Dt[900]}}function Qp(e="light"){return e==="dark"?{main:$t[400],light:$t[300],dark:$t[700]}:{main:$t[800],light:$t[500],dark:$t[900]}}function em(e="light"){return e==="dark"?{main:fn[400],light:fn[300],dark:fn[700]}:{main:"#ed6c02",light:fn[500],dark:fn[900]}}function tm(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=St(e,Yp),s=e.primary||qp(t),i=e.secondary||Zp(t),a=e.error||Xp(t),c=e.info||Jp(t),u=e.success||Qp(t),l=e.warning||em(t);function d(h){const v=Vi(h,ao.text.primary)>=n?ao.text.primary:Bi.text.primary;if(process.env.NODE_ENV!=="production"){const b=Vi(h,v);b<3&&console.error([`MUI: The contrast ratio of ${b}:1 for ${v} on ${h}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
70
|
+
`))}return v}const f=({color:h,name:v,mainShade:b=500,lightShade:S=300,darkShade:y=700})=>{if(h=ce({},h),!h.main&&h[b]&&(h.main=h[b]),!h.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
|
|
71
|
+
The color object needs to have a \`main\` property or a \`${b}\` property.`:_n(11,v?` (${v})`:"",b));if(typeof h.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
|
|
72
|
+
\`color.main\` should be a string, but \`${JSON.stringify(h.main)}\` was provided instead.
|
|
73
73
|
|
|
74
74
|
Did you intend to use one of the following approaches?
|
|
75
75
|
|
|
@@ -81,11 +81,19 @@ const theme1 = createTheme({ palette: {
|
|
|
81
81
|
|
|
82
82
|
const theme2 = createTheme({ palette: {
|
|
83
83
|
primary: { main: green[500] },
|
|
84
|
-
} });`:
|
|
85
|
-
`)),Object.keys(
|
|
86
|
-
`))}m[g]={}}}};Object.keys(d.components).forEach(m=>{const h=d.components[m].styleOverrides;h&&m.indexOf("Mui")===0&&f(h,m)})}return d.unstable_sxConfig=se({},Lt,a==null?void 0:a.unstable_sxConfig),d.unstable_sx=function(f){return En({sx:f,theme:this})},d}const kl=Tl(),Ol="$$material";function Il(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ml=e=>Il(e)&&e!=="classes",Al=kc({themeId:Ol,defaultTheme:kl,rootShouldForwardProp:Ml});function jl(e){return sr("MuiSvgIcon",e)}ka("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Rl=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],$l=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${tt(t)}`,`fontSize${tt(n)}`]};return wa(o,jl,r)},Pl=Al("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${tt(n.color)}`],t[`fontSize${tt(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,s,a,i,u,d,l,f,m,h,g;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:((s=e.typography)==null||(a=s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem",medium:((i=e.typography)==null||(u=i.pxToRem)==null?void 0:u.call(i,24))||"1.5rem",large:((d=e.typography)==null||(l=d.pxToRem)==null?void 0:l.call(d,35))||"2.1875rem"}[t.fontSize],color:(f=(m=(e.vars||e).palette)==null||(m=m[t.color])==null?void 0:m.main)!=null?f:{action:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.active,disabled:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.disabled,inherit:void 0}[t.color]}}),an=We.forwardRef(function(t,n){const r=$a({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:a="inherit",component:i="svg",fontSize:u="medium",htmlColor:d,inheritViewBox:l=!1,titleAccess:f,viewBox:m="0 0 24 24"}=r,h=Ke(r,Rl),g=We.isValidElement(o)&&o.type==="svg",c=se({},r,{color:a,component:i,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:l,viewBox:m,hasSvgAsChild:g}),x={};l||(x.viewBox=m);const _=$l(c);return p.jsxs(Pl,se({as:i,className:Ma(_.root,s),focusable:"false",color:d,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},x,h,g&&o.props,{ownerState:c,children:[g?o.props.children:o,f?p.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(an.propTypes={children:Y.node,classes:Y.object,className:Y.string,color:Y.oneOfType([Y.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Y.string]),component:Y.elementType,fontSize:Y.oneOfType([Y.oneOf(["inherit","large","medium","small"]),Y.string]),htmlColor:Y.string,inheritViewBox:Y.bool,shapeRendering:Y.string,sx:Y.oneOfType([Y.arrayOf(Y.oneOfType([Y.func,Y.object,Y.bool])),Y.func,Y.object]),titleAccess:Y.string,viewBox:Y.string});an.muiName="SvgIcon";function Je(e,t){function n(r,o){return p.jsx(an,se({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=an.muiName,We.memo(We.forwardRef(n))}const Nl=Je(p.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Ll=Je(p.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),Bl=(e,t)=>()=>{if(!t)return;const n={};e.forEach(r=>{r.items.forEach(o=>{o.value!==void 0&&o.value!==null&&o.value!==""&&(n[o.id]=o.value)})}),console.log("Filtros ativos:",n),t(n)},Dl=(e,t,n)=>()=>{const r=e.map(o=>({...o,items:o.items.map(s=>({...s,value:void 0}))}));n&&n(r),t&&t()},zl=(e,t,n)=>()=>{const r=t.map(o=>o.id===e?{...o,expanded:!o.expanded}:o);n(r)},Fl=(e,t,n,r)=>o=>{const s=n.map(a=>a.id===e?{...a,items:a.items.map(i=>i.id===t?{...i,value:o}:i)}:a);r(s)},Wl="_modal_11tr7_1",Vl="_content_11tr7_60",Ul="_header_11tr7_67",Hl="_title_11tr7_74",Gl="_description_11tr7_83",Yl="_filtersContent_11tr7_92",ql="_filterGroup_11tr7_102",Kl="_expandableHeader_11tr7_109",Zl="_expandableLabel_11tr7_119",Jl="_chevronIcon_11tr7_127",Xl="_chevron_11tr7_127",Ql="_filterItems_11tr7_140",eu="_filterItem_11tr7_140",tu="_filterItemSize1_11tr7_152",nu="_filterItemSize2_11tr7_156",ru="_filterItemSize3_11tr7_160",ou="_filterItemSize4_11tr7_164",su="_filterItemSize5_11tr7_168",au="_filterItemSize6_11tr7_172",iu="_filterInput_11tr7_176",cu="_inputLabel_11tr7_180",lu="_select_11tr7_184",uu="_placeholder_11tr7_201",du="_helperText_11tr7_205",fu="_footer_11tr7_212",pu="_clearButton_11tr7_219",mu="_applyButton_11tr7_241",ae={modal:Wl,content:Vl,header:Ul,title:Hl,description:Gl,filtersContent:Yl,filterGroup:ql,expandableHeader:Kl,expandableLabel:Zl,chevronIcon:Jl,chevron:Xl,filterItems:Ql,filterItem:eu,filterItemSize1:tu,filterItemSize2:nu,filterItemSize3:ru,filterItemSize4:ou,filterItemSize5:su,filterItemSize6:au,filterInput:iu,inputLabel:cu,select:lu,"Mui-focused":"_Mui-focused_11tr7_193",placeholder:uu,helperText:du,footer:fu,clearButton:pu,applyButton:mu},qo=({open:e,onClose:t,title:n="Filtros",description:r="Use os filtros abaixo para encontrar câmeras e pontos de interesse.",groups:o,onApply:s,onClear:a,clearButtonText:i="Limpar filtros",applyButtonText:u="Filtrar",className:d,...l})=>{const m=S.useTheme().palette.mode==="dark",[h,g]=b.useState(o);b.useEffect(()=>{g(o)},[o]);const c=Bl(h,s),x=Dl(h,a,g),_=(E,v)=>{var C;const M=Fl(v,E.id,h,g),w=E.size||6,k=ae[`filterItemSize${w}`];if(E.render)return p.jsx(S.Box,{className:`${ae.filterItem} ${k}`,children:E.render(E,M)},E.id);switch(E.type){case"select":case"multi-select":const A=E.type==="multi-select";let $;A?E.value!==void 0&&E.value!==null?$=Array.isArray(E.value)?E.value:[E.value]:$=[]:$=E.value!==void 0&&E.value!==null?E.value:"";const z=A?Array.isArray($)&&$.length>0:$!==""&&$!==null&&$!==void 0;return p.jsx(S.Box,{className:`${ae.filterItem} ${k}`,children:p.jsxs(S.FormControl,{fullWidth:!0,className:ae.filterInput,children:[p.jsx(S.InputLabel,{id:`${E.id}-label`,className:ae.inputLabel,shrink:z,children:E.label}),p.jsx(S.Select,{labelId:`${E.id}-label`,value:$,onChange:B=>M(B.target.value),multiple:A,label:E.label,className:ae.select,displayEmpty:!0,renderValue:B=>{var U;if(A){const q=Array.isArray(B)?B:[];return q.length===0?p.jsx(S.Box,{component:"span",style:{opacity:0},children:E.label}):q.map(Q=>{var K,R;return((R=(K=E.options)==null?void 0:K.find(ee=>ee.value===Q))==null?void 0:R.label)||Q}).join(", ")}if(!B||B==="")return p.jsx(S.Box,{component:"span",style:{opacity:0},children:E.label});const W=(U=E.options)==null?void 0:U.find(q=>q.value===B);return(W==null?void 0:W.label)||B},notched:z,children:(C=E.options)==null?void 0:C.map(B=>p.jsx(S.MenuItem,{value:B.value,children:B.label},B.value))}),E.helperText&&p.jsx(S.Box,{className:ae.helperText,children:E.helperText})]})},E.id);case"text":return p.jsx(S.Box,{className:`${ae.filterItem} ${k}`,children:p.jsx(S.TextField,{fullWidth:!0,label:E.label,placeholder:E.placeholder,value:E.value||"",onChange:B=>M(B.target.value),className:ae.filterInput,helperText:E.helperText,FormHelperTextProps:{className:ae.helperText}})},E.id);default:return null}};return p.jsx(S.Dialog,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,PaperProps:{className:`${ae.modal} ${d||""}`,"data-theme":m?"dark":"light"},...l,children:p.jsxs(S.DialogContent,{className:ae.content,children:[p.jsxs(S.Box,{className:ae.header,children:[p.jsx(S.Box,{className:ae.title,children:n}),p.jsx(S.Box,{className:ae.description,children:r})]}),p.jsx(S.Box,{className:ae.filtersContent,children:h.map(E=>{const v=zl(E.id,h,g),M=E.expanded!==!1;return p.jsxs(S.Box,{className:ae.filterGroup,children:[p.jsxs(S.Box,{className:ae.expandableHeader,onClick:v,children:[p.jsx(S.Box,{className:ae.expandableLabel,children:E.label}),p.jsx(S.Box,{className:ae.chevronIcon,children:M?p.jsx(Ll,{className:ae.chevron}):p.jsx(Nl,{className:ae.chevron})})]}),M&&p.jsx(S.Box,{className:ae.filterItems,children:E.items.map(w=>_(w,E.id))})]},E.id)})}),p.jsxs(S.Box,{className:ae.footer,children:[p.jsx(S.Button,{onClick:x,className:ae.clearButton,"data-theme":m?"dark":"light",children:i}),p.jsx(S.Button,{onClick:c,className:ae.applyButton,"data-theme":m?"dark":"light",children:u})]})]})})};qo.displayName="FilterModal";const hu="_container_1hyey_1",gu="_card_1hyey_7",yu="_icon_1hyey_18",vu="_text_1hyey_32",Ut={container:hu,card:gu,icon:yu,text:vu},bu=({items:e,className:t,sx:n})=>{const r=S.useTheme(),o={backgroundColor:r.palette.background.paper,borderColor:r.palette.divider},s={color:r.palette.text.primary,"& svg":{fill:r.palette.text.primary}},a={color:r.palette.text.secondary,fontFamily:r.typography.fontFamily,fontSize:r.typography.body2.fontSize,fontWeight:r.typography.fontWeightMedium,lineHeight:r.typography.body2.lineHeight};return p.jsx(S.Box,{className:`${Ut.container} ${t||""}`,sx:n,children:e.map((i,u)=>p.jsxs(S.Box,{className:Ut.card,sx:o,children:[i.icon&&p.jsx(S.Box,{className:Ut.icon,sx:s,children:i.icon}),p.jsxs(S.Typography,{component:"span",className:Ut.text,sx:a,children:[i.count," ",i.label]})]},u))})},xu=(e,t=1,n=13)=>()=>{if(!e)return;const r=e.getZoom()??n;e.setZoom(r+t)},_u=(e,t=1,n=1,r=13)=>()=>{if(!e)return;const o=e.getZoom()??r;e.setZoom(Math.max(n,o-t))},Su="_container_1whpg_2",wu="_zoomButton_1whpg_10",Eu="_stateLayer_1whpg_43",Cu="_icon_1whpg_59",Ne={container:Su,zoomButton:wu,stateLayer:Eu,icon:Cu},Tu=({map:e,className:t,sx:n,zoomIncrement:r=1,minZoom:o=1,fallbackZoom:s=13,onFullscreen:a})=>{const u=S.useTheme().palette.mode==="dark",d=xu(e,r,s),l=_u(e,r,o,s),f={backgroundColor:u?"#DEDDDD":"#101111","&:hover":{backgroundColor:u?"#DEDDDD":"#101111",opacity:.9}},m={fill:u?"#101111":"#FDFCFC",color:u?"#101111":"#FDFCFC"};return p.jsxs(S.Box,{className:`${Ne.container} ${t||""}`,sx:n,children:[p.jsx(S.IconButton,{className:Ne.zoomButton,onClick:d,"aria-label":"Zoom in",sx:f,children:p.jsx(S.Box,{className:Ne.stateLayer,children:p.jsx(Re.Add,{className:Ne.icon,sx:m})})}),p.jsx(S.IconButton,{className:Ne.zoomButton,onClick:l,"aria-label":"Zoom out",sx:f,children:p.jsx(S.Box,{className:Ne.stateLayer,children:p.jsx(Re.Remove,{className:Ne.icon,sx:m})})}),p.jsx(S.IconButton,{className:Ne.zoomButton,onClick:a,"aria-label":"Fullscreen",sx:f,children:p.jsx(S.Box,{className:Ne.stateLayer,children:p.jsx(Re.ZoomOutMap,{className:Ne.icon,sx:m})})})]})};var ku=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var a=s[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n};const Ou=po(ku),Iu="1.7.1";function dt(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 Zn(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(l){try{d(r.next(l))}catch(f){a(f)}}function u(l){try{d(r.throw(l))}catch(f){a(f)}}function d(l){l.done?s(l.value):o(l.value).then(i,u)}d((r=r.apply(e,[])).next())})}const ze={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Mu="https://maps.googleapis.com/maps/api/js";class cn{static load(t,n){return Zn(this,void 0,void 0,function*(){var r,o;const s=t.libraries?t.libraries.split(","):[],a=this.serializeParams(t);this.listeners.push(n),!((o=(r=window.google)===null||r===void 0?void 0:r.maps)===null||o===void 0)&&o.importLibrary?(this.serializedApiParams||(this.loadingStatus=ze.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=a,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==a&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...s];yield Promise.all(i.map(u=>google.maps.importLibrary(u)))})}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((o,s)=>{var a;const i=document.createElement("script"),u=new URLSearchParams;for(const[d,l]of Object.entries(t)){const f=d.replace(/[A-Z]/g,m=>"_"+m[0].toLowerCase());u.set(f,String(l))}u.set("loading","async"),u.set("callback","__googleMapsCallback__"),i.async=!0,i.src=Mu+"?"+u.toString(),i.nonce=((a=document.querySelector("script[nonce]"))===null||a===void 0?void 0:a.nonce)||"",i.onerror=()=>{this.loadingStatus=ze.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=ze.LOADED,this.notifyLoadingStatusListeners(),o()},window.gm_authFailure=()=>{this.loadingStatus=ze.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=ze.LOADING,this.notifyLoadingStatusListeners(),document.head.append(i)}),n);google.maps.importLibrary=o=>r().then(()=>google.maps.importLibrary(o))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}cn.loadingStatus=ze.NOT_LOADED;cn.listeners=[];const Au="GMP_visgl_rgmlibrary_v1_default",ju=[`gmp_visgl_reactgooglemaps_v${Iu}`],Bt=b.createContext(null);function Ru(){const[e,t]=b.useState({});return{mapInstances:e,addMapInstance:(s,a="default")=>{t(i=>Object.assign(Object.assign({},i),{[a]:s}))},removeMapInstance:(s="default")=>{t(a=>{var i=s;a[i];var u=dt(a,[typeof i=="symbol"?i:i+""]);return u})},clearMapInstances:()=>{t({})}}}function $u(e){const{onLoad:t,onError:n,apiKey:r,version:o,libraries:s=[]}=e,a=dt(e,["onLoad","onError","apiKey","version","libraries"]),[i,u]=b.useState(cn.loadingStatus),[d,l]=b.useReducer((g,c)=>g[c.name]?g:Object.assign(Object.assign({},g),{[c.name]:c.value}),{}),f=b.useMemo(()=>s==null?void 0:s.join(","),[s]),m=b.useMemo(()=>JSON.stringify(Object.assign({apiKey:r,version:o},a)),[r,o,a]),h=b.useCallback(g=>Zn(this,void 0,void 0,function*(){var c;if(d[g])return d[g];if(!(!((c=google==null?void 0:google.maps)===null||c===void 0)&&c.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const x=yield window.google.maps.importLibrary(g);return l({name:g,value:x}),x}),[d]);return b.useEffect(()=>{Zn(this,void 0,void 0,function*(){try{const g=Object.assign({key:r},a);o&&(g.v=o),(f==null?void 0:f.length)>0&&(g.libraries=f),(g.channel===void 0||g.channel<0||g.channel>999)&&delete g.channel,g.solutionChannel===void 0?g.solutionChannel=Au:g.solutionChannel===""&&delete g.solutionChannel,yield cn.load(g,c=>u(c));for(const c of["core","maps",...s])yield h(c);t&&t()}catch(g){n?n(g):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",g)}})},[r,f,m]),{status:i,loadedLibraries:d,importLibrary:h}}function Pu(e){return b.useMemo(()=>e.disableUsageAttribution?null:ju,[e.disableUsageAttribution])}const Nu=e=>{const{children:t}=e,n=dt(e,["children"]),{mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:a}=Ru(),{status:i,loadedLibraries:u,importLibrary:d}=$u(n),l=Pu(n),f=b.useMemo(()=>({mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:a,status:i,loadedLibraries:u,importLibrary:d,internalUsageAttributionIds:l}),[r,o,s,a,i,u,d,l]);return b.createElement(Bt.Provider,{value:f},t)};function Lu(e,t){for(const n of Fu){const r=t[n],o=Ko[n];b.useEffect(()=>{if(!e||!r)return;const s=google.maps.event.addListener(e,o,a=>{r(Bu(o,e,a))});return()=>s.remove()},[e,o,r])}}function Bu(e,t,n){var r;const o={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(Du.includes(e)){const s=o,a=t.getCenter(),i=t.getZoom(),u=t.getHeading()||0,d=t.getTilt()||0,l=t.getBounds();return(!a||!l||!Number.isFinite(i))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(a==null?void 0:a.toJSON())||{lat:0,lng:0},zoom:i||0,heading:u,tilt:d,bounds:(l==null?void 0:l.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(zu.includes(e)){if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=o;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((r=n.latLng)===null||r===void 0?void 0:r.toJSON())||null,placeId:n.placeId},s}return o}const Ko={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},Du=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],zu=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Fu=Object.keys(Ko);function Wu(e){const t=b.useRef(void 0);return b.useEffect(()=>{t.current=e}),t.current}function Vu(e,t){const n=Wu(e);return b.useMemo(()=>n&&t(n,e)?n:e,[e,n,t])}function Uu(e,t,n){b.useEffect(e,[Vu(t,n)])}function Hu(e,t){Uu(e,t,Ou)}const Gu=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Yu(e,t){const n={},r=Object.keys(t);for(const o of r)Gu.has(o)&&(n[o]=t[o]);Hu(()=>{e&&e.setOptions(n)},[n])}function Zo(){var e;return((e=b.useContext(Bt))===null||e===void 0?void 0:e.status)||ze.NOT_LOADED}function qu(e,t){const{viewport:n,viewState:r}=t,o=!!n;return b.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:s,longitude:a,bearing:i,pitch:u,zoom:d}=r;e.moveCamera({center:{lat:s,lng:a},heading:i,tilt:u,zoom:d+1})},[e,r]),o}function Ku(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function Jo(e){return Ku(e)?e:e.toJSON()}function Zu(e,t,n){const r=n.center?Jo(n.center):null;let o=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(o=r.lat,s=r.lng);const a=Number.isFinite(n.zoom)?n.zoom:null,i=Number.isFinite(n.heading)?n.heading:null,u=Number.isFinite(n.tilt)?n.tilt:null;b.useLayoutEffect(()=>{if(!e)return;const d={};let l=!1;o!==null&&s!==null&&(t.current.center.lat!==o||t.current.center.lng!==s)&&(d.center={lat:o,lng:s},l=!0),a!==null&&t.current.zoom!==a&&(d.zoom=a,l=!0),i!==null&&t.current.heading!==i&&(d.heading=i,l=!0),u!==null&&t.current.tilt!==u&&(d.tilt=u,l=!0),l&&e.moveCamera(d)})}const Ju=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return b.createElement("div",{style:e},b.createElement("h2",null,"Error: AuthFailure"),b.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",b.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function Xu(){const[e,t]=b.useState(null),n=b.useCallback(r=>t(r),[t]);return[e,n]}function Xo(){return Zo()===ze.LOADED}function Qu(){const[,e]=b.useReducer(t=>t+1,0);return e}function ed(e,t){const n=e.getCenter(),r=e.getZoom(),o=e.getHeading()||0,s=e.getTilt()||0,a=e.getBounds();(!n||!a||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:o,tilt:s})}function td(e){const t=Qu(),n=b.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return b.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{ed(e,n),t()});return()=>r.remove()},[e,t]),n}class en{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}en.entries={};function nd(e,t){const n=Xo(),[r,o]=b.useState(null),[s,a]=Xu(),i=td(r),{id:u,defaultBounds:d,defaultCenter:l,defaultZoom:f,defaultHeading:m,defaultTilt:h,reuseMaps:g,renderingType:c,colorScheme:x}=e,_=dt(e,["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"]),E=e.zoom!==void 0||e.defaultZoom!==void 0,v=e.center!==void 0||e.defaultCenter!==void 0;!d&&(!E||!v)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!_.center&&l&&(_.center=l),!_.zoom&&Number.isFinite(f)&&(_.zoom=f),!_.heading&&Number.isFinite(m)&&(_.heading=m),!_.tilt&&Number.isFinite(h)&&(_.tilt=h);const M=_.internalUsageAttributionIds;M==null?_.internalUsageAttributionIds=t.internalUsageAttributionIds:_.internalUsageAttributionIds=[...t.internalUsageAttributionIds||[],...M];for(const k of Object.keys(_))_[k]===void 0&&delete _[k];const w=b.useRef(void 0);return b.useEffect(()=>{if(!s||!n)return;const{addMapInstance:k,removeMapInstance:C}=t,{mapId:A}=e,$=`${A||"default"}:${c||"default"}:${x||"LIGHT"}`;let z,B;if(g&&en.has($)?(B=en.pop($),z=B.getDiv(),s.appendChild(z),B.setOptions(_),setTimeout(()=>B.setCenter(B.getCenter()),0)):(z=document.createElement("div"),z.style.height="100%",s.appendChild(z),B=new google.maps.Map(z,Object.assign(Object.assign(Object.assign({},_),c?{renderingType:c}:{}),x?{colorScheme:x}:{}))),o(B),k(B,u),d){const{padding:W}=d,U=dt(d,["padding"]);B.fitBounds(U,W)}else(!E||!v)&&B.fitBounds({east:180,west:-180,south:-90,north:90});if(w.current){const{mapId:W,cameraState:U}=w.current;W!==A&&B.setOptions(U)}return()=>{w.current={mapId:A,cameraState:i.current},z.remove(),g?en.push($,B):google.maps.event.clearInstanceListeners(B),o(null),C(u)}},[s,n,u,e.mapId,e.renderingType,e.colorScheme]),[r,a,i]}const Qo=b.createContext(null),es=e=>{const{children:t,id:n,className:r,style:o}=e,s=b.useContext(Bt),a=Zo();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[i,u,d]=nd(e,s);Zu(i,d,e),Lu(i,e),Yu(i,e);const l=qu(i,e),f=!!e.controlled;b.useEffect(()=>{if(i)return l&&i.setOptions({disableDefaultUI:!0}),(l||f)&&i.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{i.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[i,l,f,e.gestureHandling,e.keyboardShortcuts]);const m=e.center?Jo(e.center):null;let h=null,g=null;m&&Number.isFinite(m.lat)&&Number.isFinite(m.lng)&&(h=m.lat,g=m.lng);const c=b.useMemo(()=>{var E,v,M;return{center:{lat:h??0,lng:g??0},zoom:(E=e.zoom)!==null&&E!==void 0?E:0,heading:(v=e.heading)!==null&&v!==void 0?v:0,tilt:(M=e.tilt)!==null&&M!==void 0?M:0}},[h,g,e.zoom,e.heading,e.tilt]);b.useLayoutEffect(()=>{if(!i||!f)return;i.moveCamera(c);const E=i.addListener("bounds_changed",()=>{i.moveCamera(c)});return()=>E.remove()},[i,f,c]);const x=b.useMemo(()=>Object.assign({width:"100%",height:"100%",position:"relative",zIndex:l?-1:0},o),[o,l]),_=b.useMemo(()=>({map:i}),[i]);return a===ze.AUTH_FAILURE?b.createElement("div",{style:Object.assign({position:"relative"},r?{}:x),className:r},b.createElement(Ju,null)):b.createElement("div",Object.assign({ref:u,"data-testid":"map",style:r?void 0:x,className:r},n?{id:n}:{}),i?b.createElement(Qo.Provider,{value:_},t):null)};es.deckGLViewProps=!0;const ro=new Set;function rd(...e){const t=JSON.stringify(e);ro.has(t)||(ro.add(t),console.error(...e))}const Cn=(e=null)=>{const t=b.useContext(Bt),{map:n}=b.useContext(Qo)||{};if(t===null)return rd("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function od(e){const t=Xo(),n=b.useContext(Bt);return b.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function Ht(e,t,n){b.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function Gt(e,t,n){b.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function oo(e,t,n){b.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}class sd{constructor(){this.renderedStyles=new Set,this.styleElement=null}getStyleElement(){return this.styleElement||(this.styleElement=document.createElement("style"),this.styleElement.setAttribute("data-rgm-anchor-styles",""),document.head.appendChild(this.styleElement)),this.styleElement}addAdvancedMarkerPointerEventsOverwrite(){if(this.renderedStyles.has("marker-pointer-events"))return;const t=this.getStyleElement();t.textContent+=`
|
|
84
|
+
} });`:_n(12,v?` (${v})`:"",JSON.stringify(h.main)));return Fi(h,"light",S,r),Fi(h,"dark",y,r),h.contrastText||(h.contrastText=d(h.main)),h},p={dark:ao,light:Bi};return process.env.NODE_ENV!=="production"&&(p[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),tt(ce({common:ce({},An),mode:t,primary:f({color:s,name:"primary"}),secondary:f({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:l,name:"warning"}),info:f({color:c,name:"info"}),success:f({color:u,name:"success"}),grey:Kp,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},p[t]),o)}const nm=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function rm(e){return Math.round(e*1e5)/1e5}const zi={textTransform:"uppercase"},Wi='"Roboto", "Helvetica", "Arial", sans-serif';function om(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=Wi,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:u=16,allVariants:l,pxToRem:d}=n,f=St(n,nm);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof u!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=o/14,m=d||(b=>`${b/u*p}rem`),h=(b,S,y,C,T)=>ce({fontFamily:r,fontWeight:b,fontSize:m(S),lineHeight:y},r===Wi?{letterSpacing:`${rm(C/S)}em`}:{},T,l),v={h1:h(s,96,1.167,-1.5),h2:h(s,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,zi),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,zi),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return tt(ce({htmlFontSize:u,pxToRem:m,fontFamily:r,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:c},v),f,{clone:!1})}const sm=.2,im=.14,am=.12;function ue(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${sm})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${im})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${am})`].join(",")}const cm=["none",ue(0,2,1,-1,0,1,1,0,0,1,3,0),ue(0,3,1,-2,0,2,2,0,0,1,5,0),ue(0,3,3,-2,0,3,4,0,0,1,8,0),ue(0,2,4,-1,0,4,5,0,0,1,10,0),ue(0,3,5,-1,0,5,8,0,0,1,14,0),ue(0,3,5,-1,0,6,10,0,0,1,18,0),ue(0,4,5,-2,0,7,10,1,0,2,16,1),ue(0,5,5,-3,0,8,10,1,0,3,14,2),ue(0,5,6,-3,0,9,12,1,0,3,16,2),ue(0,6,6,-3,0,10,14,1,0,4,18,3),ue(0,6,7,-4,0,11,15,1,0,4,20,3),ue(0,7,8,-4,0,12,17,2,0,5,22,4),ue(0,7,8,-4,0,13,19,2,0,5,24,4),ue(0,7,9,-4,0,14,21,2,0,5,26,4),ue(0,8,9,-5,0,15,22,2,0,6,28,5),ue(0,8,10,-5,0,16,24,2,0,6,30,5),ue(0,8,11,-5,0,17,26,2,0,6,32,5),ue(0,9,11,-5,0,18,28,2,0,7,34,6),ue(0,9,12,-6,0,19,29,2,0,7,36,6),ue(0,10,13,-6,0,20,31,3,0,8,38,7),ue(0,10,13,-6,0,21,33,3,0,8,40,7),ue(0,10,14,-6,0,22,35,3,0,8,42,7),ue(0,11,14,-7,0,23,36,3,0,9,44,8),ue(0,11,15,-7,0,24,38,3,0,9,46,8)],lm=["duration","easing","delay"],um={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)"},dm={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ui(e){return`${Math.round(e)}ms`}function fm(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function hm(e){const t=ce({},um,e.easing),n=ce({},dm,e.duration);return ce({getAutoHeightDuration:fm,create:(o=["all"],s={})=>{const{duration:i=n.standard,easing:a=t.easeInOut,delay:c=0}=s,u=St(s,lm);if(process.env.NODE_ENV!=="production"){const l=f=>typeof f=="string",d=f=>!isNaN(parseFloat(f));!l(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(i)&&!l(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),l(a)||console.error('MUI: Argument "easing" must be a string.'),!d(c)&&!l(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
85
|
+
`)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(l=>`${l} ${typeof i=="string"?i:Ui(i)} ${a} ${typeof c=="string"?c:Ui(c)}`).join(",")}},e,{easing:t,duration:n})}const pm={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},mm=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function gm(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:s={}}=e,i=St(e,mm);if(e.vars&&e.generateCssVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":_n(18));const a=tm(r),c=Hc(e);let u=tt(c,{mixins:Op(c.breakpoints,n),palette:a,shadows:cm.slice(),typography:om(a,s),transitions:hm(o),zIndex:ce({},pm)});if(u=tt(u,i),u=t.reduce((l,d)=>tt(l,d),u),process.env.NODE_ENV!=="production"){const l=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],d=(f,p)=>{let m;for(m in f){const h=f[m];if(l.indexOf(m)!==-1&&Object.keys(h).length>0){if(process.env.NODE_ENV!=="production"){const v=ms("",m);console.error([`MUI: The \`${p}\` component increases the CSS specificity of the \`${m}\` internal state.`,"You can not override it like this: ",JSON.stringify(f,null,2),"",`Instead, you need to use the '&.${v}' syntax:`,JSON.stringify({root:{[`&.${v}`]:h}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
86
|
+
`))}f[m]={}}}};Object.keys(u.components).forEach(f=>{const p=u.components[f].styleOverrides;p&&f.indexOf("Mui")===0&&d(p,f)})}return u.unstable_sxConfig=ce({},Vn,i==null?void 0:i.unstable_sxConfig),u.unstable_sx=function(d){return Wr({sx:d,theme:this})},u}const ym=gm(),vm="$$material";function bm(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const xm=e=>bm(e)&&e!=="classes",Sm=yp({themeId:vm,defaultTheme:ym,rootShouldForwardProp:xm});function Tm(e){return ms("MuiSvgIcon",e)}yf("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const wm=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Cm=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Ot(t)}`,`fontSize${Ot(n)}`]};return hf(o,Tm,r)},_m=Sm("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ot(n.color)}`],t[`fontSize${Ot(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,s,i,a,c,u,l,d,f,p,m;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:((s=e.typography)==null||(i=s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem",medium:((a=e.typography)==null||(c=a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem",large:((u=e.typography)==null||(l=u.pxToRem)==null?void 0:l.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:(p=(e.vars||e).palette)==null||(p=p.action)==null?void 0:p.active,disabled:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.disabled,inherit:void 0}[t.color]}}),br=Fe.forwardRef(function(t,n){const r=Cf({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:l=!1,titleAccess:d,viewBox:f="0 0 24 24"}=r,p=St(r,wm),m=Fe.isValidElement(o)&&o.type==="svg",h=ce({},r,{color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:l,viewBox:f,hasSvgAsChild:m}),v={};l||(v.viewBox=f);const b=Cm(h);return g.jsxs(_m,ce({as:a,className:xf(b.root,s),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},v,p,m&&o.props,{ownerState:h,children:[m?o.props.children:o,d?g.jsx("title",{children:d}):null]}))});process.env.NODE_ENV!=="production"&&(br.propTypes={children:Z.node,classes:Z.object,className:Z.string,color:Z.oneOfType([Z.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Z.string]),component:Z.elementType,fontSize:Z.oneOfType([Z.oneOf(["inherit","large","medium","small"]),Z.string]),htmlColor:Z.string,inheritViewBox:Z.bool,shapeRendering:Z.string,sx:Z.oneOfType([Z.arrayOf(Z.oneOfType([Z.func,Z.object,Z.bool])),Z.func,Z.object]),titleAccess:Z.string,viewBox:Z.string});br.muiName="SvgIcon";function dt(e,t){function n(r,o){return g.jsx(br,ce({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=br.muiName,Fe.memo(Fe.forwardRef(n))}const Em=dt(g.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Pm=dt(g.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),Am=dt(g.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"),Mm=(e,t)=>()=>{if(!t)return;const n={};e.forEach(r=>{r.items.forEach(o=>{o.value!==void 0&&o.value!==null&&o.value!==""&&(n[o.id]=o.value)})}),console.log("Filtros ativos:",n),t(n)},km=(e,t,n)=>()=>{const r=e.map(o=>({...o,items:o.items.map(s=>({...s,value:void 0}))}));n&&n(r),t&&t()},Rm=(e,t,n)=>()=>{const r=t.map(o=>o.id===e?{...o,expanded:!o.expanded}:o);n(r)},Om=(e,t,n,r)=>o=>{const s=n.map(i=>i.id===e?{...i,items:i.items.map(a=>a.id===t?{...a,value:o}:a)}:i);r(s)},Im="_modal_1v49l_1",jm="_content_1v49l_60",Lm="_contentWrapper_1v49l_67",Dm="_closeButton_1v49l_74",$m="_header_1v49l_86",Vm="_title_1v49l_93",Nm="_description_1v49l_102",Bm="_filtersContent_1v49l_111",Fm="_filterGroup_1v49l_121",zm="_expandableHeader_1v49l_128",Wm="_expandableLabel_1v49l_138",Um="_chevronIcon_1v49l_146",Hm="_chevron_1v49l_146",Gm="_filterItems_1v49l_159",Km="_filterItem_1v49l_159",Ym="_filterItemSize1_1v49l_171",qm="_filterItemSize2_1v49l_175",Zm="_filterItemSize3_1v49l_179",Xm="_filterItemSize4_1v49l_183",Jm="_filterItemSize5_1v49l_187",Qm="_filterItemSize6_1v49l_191",eg="_filterInput_1v49l_195",tg="_inputLabel_1v49l_199",ng="_select_1v49l_203",rg="_placeholder_1v49l_220",og="_helperText_1v49l_224",sg="_footer_1v49l_231",ig="_clearButton_1v49l_238",ag="_applyButton_1v49l_260",ae={modal:Im,content:jm,contentWrapper:Lm,closeButton:Dm,header:$m,title:Vm,description:Nm,filtersContent:Bm,filterGroup:Fm,expandableHeader:zm,expandableLabel:Wm,chevronIcon:Um,chevron:Hm,filterItems:Gm,filterItem:Km,filterItemSize1:Ym,filterItemSize2:qm,filterItemSize3:Zm,filterItemSize4:Xm,filterItemSize5:Jm,filterItemSize6:Qm,filterInput:eg,inputLabel:tg,select:ng,"Mui-focused":"_Mui-focused_1v49l_212",placeholder:rg,helperText:og,footer:sg,clearButton:ig,applyButton:ag},Qc=({open:e,onClose:t,title:n="Filtros",description:r="Use os filtros abaixo para encontrar câmeras e pontos de interesse.",groups:o,onApply:s,onClear:i,clearButtonText:a="Limpar filtros",applyButtonText:c="Filtrar",className:u,...l})=>{const f=_.useTheme().palette.mode==="dark",[p,m]=x.useState(o);x.useEffect(()=>{m(o)},[o]);const h=Mm(p,s),v=km(p,i,m),b=(S,y)=>{var P;const C=Om(y,S.id,p,m),T=S.size||6,E=ae[`filterItemSize${T}`];if(S.render)return g.jsx(_.Box,{className:`${ae.filterItem} ${E}`,children:S.render(S,C)},S.id);switch(S.type){case"select":case"multi-select":const A=S.type==="multi-select";let M;A?S.value!==void 0&&S.value!==null?M=Array.isArray(S.value)?S.value:[S.value]:M=[]:M=S.value!==void 0&&S.value!==null?S.value:"";const L=A?Array.isArray(M)&&M.length>0:M!==""&&M!==null&&M!==void 0;return g.jsx(_.Box,{className:`${ae.filterItem} ${E}`,children:g.jsxs(_.FormControl,{fullWidth:!0,className:ae.filterInput,children:[g.jsx(_.InputLabel,{id:`${S.id}-label`,className:ae.inputLabel,shrink:L,children:S.label}),g.jsx(_.Select,{labelId:`${S.id}-label`,value:M,onChange:$=>C($.target.value),multiple:A,label:S.label,className:ae.select,displayEmpty:!0,renderValue:$=>{var H;if(A){const q=Array.isArray($)?$:[];return q.length===0?g.jsx(_.Box,{component:"span",style:{opacity:0},children:S.label}):q.map(Q=>{var U,I;return((I=(U=S.options)==null?void 0:U.find(X=>X.value===Q))==null?void 0:I.label)||Q}).join(", ")}if(!$||$==="")return g.jsx(_.Box,{component:"span",style:{opacity:0},children:S.label});const W=(H=S.options)==null?void 0:H.find(q=>q.value===$);return(W==null?void 0:W.label)||$},notched:L,children:(P=S.options)==null?void 0:P.map($=>g.jsx(_.MenuItem,{value:$.value,children:$.label},$.value))}),S.helperText&&g.jsx(_.Box,{className:ae.helperText,children:S.helperText})]})},S.id);case"text":return g.jsx(_.Box,{className:`${ae.filterItem} ${E}`,children:g.jsx(_.TextField,{fullWidth:!0,label:S.label,placeholder:S.placeholder,value:S.value||"",onChange:$=>C($.target.value),className:ae.filterInput,helperText:S.helperText,FormHelperTextProps:{className:ae.helperText}})},S.id);default:return null}};return g.jsx(_.Dialog,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,PaperProps:{className:`${ae.modal} ${u||""}`,"data-theme":f?"dark":"light"},...l,children:g.jsx(_.DialogContent,{className:ae.content,children:g.jsxs(_.Box,{className:ae.contentWrapper,children:[g.jsx(_.IconButton,{className:ae.closeButton,onClick:t,"aria-label":"Fechar",size:"small",children:g.jsx(Am,{})}),g.jsxs(_.Box,{className:ae.header,children:[g.jsx(_.Box,{className:ae.title,children:n}),g.jsx(_.Box,{className:ae.description,children:r})]}),g.jsx(_.Box,{className:ae.filtersContent,children:p.map(S=>{const y=Rm(S.id,p,m),C=S.expanded!==!1;return g.jsxs(_.Box,{className:ae.filterGroup,children:[g.jsxs(_.Box,{className:ae.expandableHeader,onClick:y,children:[g.jsx(_.Box,{className:ae.expandableLabel,children:S.label}),g.jsx(_.Box,{className:ae.chevronIcon,children:C?g.jsx(Pm,{className:ae.chevron}):g.jsx(Em,{className:ae.chevron})})]}),C&&g.jsx(_.Box,{className:ae.filterItems,children:S.items.map(T=>b(T,S.id))})]},S.id)})}),g.jsxs(_.Box,{className:ae.footer,children:[g.jsx(_.Button,{onClick:v,className:ae.clearButton,"data-theme":f?"dark":"light",children:a}),g.jsx(_.Button,{onClick:h,className:ae.applyButton,"data-theme":f?"dark":"light",children:c})]})]})})})};Qc.displayName="FilterModal";const cg="_container_1hyey_1",lg="_card_1hyey_7",ug="_icon_1hyey_18",dg="_text_1hyey_32",qn={container:cg,card:lg,icon:ug,text:dg},fg=({items:e,className:t,sx:n})=>{const r=_.useTheme(),o={backgroundColor:r.palette.background.paper,borderColor:r.palette.divider},s={color:r.palette.text.primary,"& svg":{fill:r.palette.text.primary}},i={color:r.palette.text.secondary,fontFamily:r.typography.fontFamily,fontSize:r.typography.body2.fontSize,fontWeight:r.typography.fontWeightMedium,lineHeight:r.typography.body2.lineHeight};return g.jsx(_.Box,{className:`${qn.container} ${t||""}`,sx:n,children:e.map((a,c)=>g.jsxs(_.Box,{className:qn.card,sx:o,children:[a.icon&&g.jsx(_.Box,{className:qn.icon,sx:s,children:a.icon}),g.jsxs(_.Typography,{component:"span",className:qn.text,sx:i,children:[a.count," ",a.label]})]},c))})},hg=(e,t=1,n=13)=>()=>{if(!e)return;const r=e.getZoom()??n;e.setZoom(r+t)},pg=(e,t=1,n=1,r=13)=>()=>{if(!e)return;const o=e.getZoom()??r;e.setZoom(Math.max(n,o-t))},mg="_container_1whpg_2",gg="_zoomButton_1whpg_10",yg="_stateLayer_1whpg_43",vg="_icon_1whpg_59",Qe={container:mg,zoomButton:gg,stateLayer:yg,icon:vg},bg=({map:e,className:t,sx:n,zoomIncrement:r=1,minZoom:o=1,fallbackZoom:s=13,onFullscreen:i})=>{const c=_.useTheme().palette.mode==="dark",u=hg(e,r,s),l=pg(e,r,o,s),d={backgroundColor:c?"#DEDDDD":"#101111","&:hover":{backgroundColor:c?"#DEDDDD":"#101111",opacity:.9}},f={fill:c?"#101111":"#FDFCFC",color:c?"#101111":"#FDFCFC"};return g.jsxs(_.Box,{className:`${Qe.container} ${t||""}`,sx:n,children:[g.jsx(_.IconButton,{className:Qe.zoomButton,onClick:u,"aria-label":"Zoom in",sx:d,children:g.jsx(_.Box,{className:Qe.stateLayer,children:g.jsx(Ve.Add,{className:Qe.icon,sx:f})})}),g.jsx(_.IconButton,{className:Qe.zoomButton,onClick:l,"aria-label":"Zoom out",sx:d,children:g.jsx(_.Box,{className:Qe.stateLayer,children:g.jsx(Ve.Remove,{className:Qe.icon,sx:f})})}),g.jsx(_.IconButton,{className:Qe.zoomButton,onClick:i,"aria-label":"Fullscreen",sx:d,children:g.jsx(_.Box,{className:Qe.stateLayer,children:g.jsx(Ve.ZoomOutMap,{className:Qe.icon,sx:f})})})]})};var xg=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const Sg=vc(xg),Tg="1.7.1";function Yt(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 Do(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(l){try{u(r.next(l))}catch(d){i(d)}}function c(l){try{u(r.throw(l))}catch(d){i(d)}}function u(l){l.done?s(l.value):o(l.value).then(a,c)}u((r=r.apply(e,[])).next())})}const it={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},wg="https://maps.googleapis.com/maps/api/js";class xr{static load(t,n){return Do(this,void 0,void 0,function*(){var r,o;const s=t.libraries?t.libraries.split(","):[],i=this.serializeParams(t);this.listeners.push(n),!((o=(r=window.google)===null||r===void 0?void 0:r.maps)===null||o===void 0)&&o.importLibrary?(this.serializedApiParams||(this.loadingStatus=it.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=i,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==i&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const a=["maps",...s];yield Promise.all(a.map(c=>google.maps.importLibrary(c)))})}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((o,s)=>{var i;const a=document.createElement("script"),c=new URLSearchParams;for(const[u,l]of Object.entries(t)){const d=u.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());c.set(d,String(l))}c.set("loading","async"),c.set("callback","__googleMapsCallback__"),a.async=!0,a.src=wg+"?"+c.toString(),a.nonce=((i=document.querySelector("script[nonce]"))===null||i===void 0?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=it.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=it.LOADED,this.notifyLoadingStatusListeners(),o()},window.gm_authFailure=()=>{this.loadingStatus=it.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=it.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=o=>r().then(()=>google.maps.importLibrary(o))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}xr.loadingStatus=it.NOT_LOADED;xr.listeners=[];const Cg="GMP_visgl_rgmlibrary_v1_default",_g=[`gmp_visgl_reactgooglemaps_v${Tg}`],Nn=x.createContext(null);function Eg(){const[e,t]=x.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>Object.assign(Object.assign({},a),{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>{var a=s;i[a];var c=Yt(i,[typeof a=="symbol"?a:a+""]);return c})},clearMapInstances:()=>{t({})}}}function Pg(e){const{onLoad:t,onError:n,apiKey:r,version:o,libraries:s=[]}=e,i=Yt(e,["onLoad","onError","apiKey","version","libraries"]),[a,c]=x.useState(xr.loadingStatus),[u,l]=x.useReducer((m,h)=>m[h.name]?m:Object.assign(Object.assign({},m),{[h.name]:h.value}),{}),d=x.useMemo(()=>s==null?void 0:s.join(","),[s]),f=x.useMemo(()=>JSON.stringify(Object.assign({apiKey:r,version:o},i)),[r,o,i]),p=x.useCallback(m=>Do(this,void 0,void 0,function*(){var h;if(u[m])return u[m];if(!(!((h=google==null?void 0:google.maps)===null||h===void 0)&&h.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const v=yield window.google.maps.importLibrary(m);return l({name:m,value:v}),v}),[u]);return x.useEffect(()=>{Do(this,void 0,void 0,function*(){try{const m=Object.assign({key:r},i);o&&(m.v=o),(d==null?void 0:d.length)>0&&(m.libraries=d),(m.channel===void 0||m.channel<0||m.channel>999)&&delete m.channel,m.solutionChannel===void 0?m.solutionChannel=Cg:m.solutionChannel===""&&delete m.solutionChannel,yield xr.load(m,h=>c(h));for(const h of["core","maps",...s])yield p(h);t&&t()}catch(m){n?n(m):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",m)}})},[r,d,f]),{status:a,loadedLibraries:u,importLibrary:p}}function Ag(e){return x.useMemo(()=>e.disableUsageAttribution?null:_g,[e.disableUsageAttribution])}const Mg=e=>{const{children:t}=e,n=Yt(e,["children"]),{mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i}=Eg(),{status:a,loadedLibraries:c,importLibrary:u}=Pg(n),l=Ag(n),d=x.useMemo(()=>({mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:c,importLibrary:u,internalUsageAttributionIds:l}),[r,o,s,i,a,c,u,l]);return x.createElement(Nn.Provider,{value:d},t)};function kg(e,t){for(const n of jg){const r=t[n],o=el[n];x.useEffect(()=>{if(!e||!r)return;const s=google.maps.event.addListener(e,o,i=>{r(Rg(o,e,i))});return()=>s.remove()},[e,o,r])}}function Rg(e,t,n){var r;const o={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(Og.includes(e)){const s=o,i=t.getCenter(),a=t.getZoom(),c=t.getHeading()||0,u=t.getTilt()||0,l=t.getBounds();return(!i||!l||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:c,tilt:u,bounds:(l==null?void 0:l.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(Ig.includes(e)){if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=o;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((r=n.latLng)===null||r===void 0?void 0:r.toJSON())||null,placeId:n.placeId},s}return o}const el={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},Og=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Ig=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],jg=Object.keys(el);function Lg(e){const t=x.useRef(void 0);return x.useEffect(()=>{t.current=e}),t.current}function Dg(e,t){const n=Lg(e);return x.useMemo(()=>n&&t(n,e)?n:e,[e,n,t])}function $g(e,t,n){x.useEffect(e,[Dg(t,n)])}function Vg(e,t){$g(e,t,Sg)}const Ng=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Bg(e,t){const n={},r=Object.keys(t);for(const o of r)Ng.has(o)&&(n[o]=t[o]);Vg(()=>{e&&e.setOptions(n)},[n])}function tl(){var e;return((e=x.useContext(Nn))===null||e===void 0?void 0:e.status)||it.NOT_LOADED}function Fg(e,t){const{viewport:n,viewState:r}=t,o=!!n;return x.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:s,longitude:i,bearing:a,pitch:c,zoom:u}=r;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:c,zoom:u+1})},[e,r]),o}function zg(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function nl(e){return zg(e)?e:e.toJSON()}function Wg(e,t,n){const r=n.center?nl(n.center):null;let o=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(o=r.lat,s=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,c=Number.isFinite(n.tilt)?n.tilt:null;x.useLayoutEffect(()=>{if(!e)return;const u={};let l=!1;o!==null&&s!==null&&(t.current.center.lat!==o||t.current.center.lng!==s)&&(u.center={lat:o,lng:s},l=!0),i!==null&&t.current.zoom!==i&&(u.zoom=i,l=!0),a!==null&&t.current.heading!==a&&(u.heading=a,l=!0),c!==null&&t.current.tilt!==c&&(u.tilt=c,l=!0),l&&e.moveCamera(u)})}const Ug=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return x.createElement("div",{style:e},x.createElement("h2",null,"Error: AuthFailure"),x.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",x.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function Hg(){const[e,t]=x.useState(null),n=x.useCallback(r=>t(r),[t]);return[e,n]}function rl(){return tl()===it.LOADED}function Gg(){const[,e]=x.useReducer(t=>t+1,0);return e}function Kg(e,t){const n=e.getCenter(),r=e.getZoom(),o=e.getHeading()||0,s=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:o,tilt:s})}function Yg(e){const t=Gg(),n=x.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return x.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{Kg(e,n),t()});return()=>r.remove()},[e,t]),n}class lr{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}lr.entries={};function qg(e,t){const n=rl(),[r,o]=x.useState(null),[s,i]=Hg(),a=Yg(r),{id:c,defaultBounds:u,defaultCenter:l,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:m,renderingType:h,colorScheme:v}=e,b=Yt(e,["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"]),S=e.zoom!==void 0||e.defaultZoom!==void 0,y=e.center!==void 0||e.defaultCenter!==void 0;!u&&(!S||!y)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!b.center&&l&&(b.center=l),!b.zoom&&Number.isFinite(d)&&(b.zoom=d),!b.heading&&Number.isFinite(f)&&(b.heading=f),!b.tilt&&Number.isFinite(p)&&(b.tilt=p);const C=b.internalUsageAttributionIds;C==null?b.internalUsageAttributionIds=t.internalUsageAttributionIds:b.internalUsageAttributionIds=[...t.internalUsageAttributionIds||[],...C];for(const E of Object.keys(b))b[E]===void 0&&delete b[E];const T=x.useRef(void 0);return x.useEffect(()=>{if(!s||!n)return;const{addMapInstance:E,removeMapInstance:P}=t,{mapId:A}=e,M=`${A||"default"}:${h||"default"}:${v||"LIGHT"}`;let L,$;if(m&&lr.has(M)?($=lr.pop(M),L=$.getDiv(),s.appendChild(L),$.setOptions(b),setTimeout(()=>$.setCenter($.getCenter()),0)):(L=document.createElement("div"),L.style.height="100%",s.appendChild(L),$=new google.maps.Map(L,Object.assign(Object.assign(Object.assign({},b),h?{renderingType:h}:{}),v?{colorScheme:v}:{}))),o($),E($,c),u){const{padding:W}=u,H=Yt(u,["padding"]);$.fitBounds(H,W)}else(!S||!y)&&$.fitBounds({east:180,west:-180,south:-90,north:90});if(T.current){const{mapId:W,cameraState:H}=T.current;W!==A&&$.setOptions(H)}return()=>{T.current={mapId:A,cameraState:a.current},L.remove(),m?lr.push(M,$):google.maps.event.clearInstanceListeners($),o(null),P(c)}},[s,n,c,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const ol=x.createContext(null),sl=e=>{const{children:t,id:n,className:r,style:o}=e,s=x.useContext(Nn),i=tl();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,c,u]=qg(e,s);Wg(a,u,e),kg(a,e),Bg(a,e);const l=Fg(a,e),d=!!e.controlled;x.useEffect(()=>{if(a)return l&&a.setOptions({disableDefaultUI:!0}),(l||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,l,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?nl(e.center):null;let p=null,m=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(p=f.lat,m=f.lng);const h=x.useMemo(()=>{var S,y,C;return{center:{lat:p??0,lng:m??0},zoom:(S=e.zoom)!==null&&S!==void 0?S:0,heading:(y=e.heading)!==null&&y!==void 0?y:0,tilt:(C=e.tilt)!==null&&C!==void 0?C:0}},[p,m,e.zoom,e.heading,e.tilt]);x.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(h);const S=a.addListener("bounds_changed",()=>{a.moveCamera(h)});return()=>S.remove()},[a,d,h]);const v=x.useMemo(()=>Object.assign({width:"100%",height:"100%",position:"relative",zIndex:l?-1:0},o),[o,l]),b=x.useMemo(()=>({map:a}),[a]);return i===it.AUTH_FAILURE?x.createElement("div",{style:Object.assign({position:"relative"},r?{}:v),className:r},x.createElement(Ug,null)):x.createElement("div",Object.assign({ref:c,"data-testid":"map",style:r?void 0:v,className:r},n?{id:n}:{}),a?x.createElement(ol.Provider,{value:b},t):null)};sl.deckGLViewProps=!0;const Hi=new Set;function Zg(...e){const t=JSON.stringify(e);Hi.has(t)||(Hi.add(t),console.error(...e))}const Ur=(e=null)=>{const t=x.useContext(Nn),{map:n}=x.useContext(ol)||{};if(t===null)return Zg("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function Xg(e){const t=rl(),n=x.useContext(Nn);return x.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function Zn(e,t,n){x.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function Xn(e,t,n){x.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function Gi(e,t,n){x.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}class Jg{constructor(){this.renderedStyles=new Set,this.styleElement=null}getStyleElement(){return this.styleElement||(this.styleElement=document.createElement("style"),this.styleElement.setAttribute("data-rgm-anchor-styles",""),document.head.appendChild(this.styleElement)),this.styleElement}addAdvancedMarkerPointerEventsOverwrite(){if(this.renderedStyles.has("marker-pointer-events"))return;const t=this.getStyleElement();t.textContent+=`
|
|
87
87
|
gmp-advanced-marker[data-origin='rgm'] {
|
|
88
88
|
pointer-events: none !important;
|
|
89
89
|
}
|
|
90
|
-
`,this.renderedStyles.add("marker-pointer-events")}cleanup(){this.styleElement&&(this.styleElement.remove(),this.styleElement=null,this.renderedStyles.clear())}}const ad=new sd;function id(e,t){var n;if(!(!((n=google==null?void 0:google.maps)===null||n===void 0)&&n.version))return;const r=google.maps.version.split("."),o=parseInt(r[0],10),s=parseInt(r[1],10);return o>e||o===e&&s>=t}const cd=b.createContext(null),ld={BOTTOM:["50%","100%"]},ts=b.forwardRef((e,t)=>{const{children:n,style:r,className:o,anchorPoint:s}=e,[a,i]=dd(e),u=b.useMemo(()=>a?{marker:a}:null,[a]);return b.useImperativeHandle(t,()=>a,[a]),i?b.createElement(cd.Provider,{value:u},Ps.createPortal(b.createElement(ud,{anchorPoint:s,styles:r,className:o},n),i)):null});ts.displayName="AdvancedMarker";function Jn(e){return e.nodeType===Node.ELEMENT_NODE}const ud=({children:e,styles:t,className:n})=>b.createElement("div",{className:n,style:t},e);function dd(e){const[t,n]=b.useState(null),[r,o]=b.useState(null),s=Cn(),a=od("marker"),{children:i,onClick:u,className:d,onMouseEnter:l,onMouseLeave:f,onDrag:m,onDragStart:h,onDragEnd:g,collisionBehavior:c,clickable:x,draggable:_,position:E,title:v,zIndex:M,anchorPoint:w,anchorLeft:k,anchorTop:C}=e,A=b.Children.count(i);return b.useEffect(()=>{if(!s||!a)return;const $=new a.AdvancedMarkerElement;$.map=s,n($);let z=null;return A>0&&(z=document.createElement("div"),$.content=z,o(z)),()=>{$.map=null,z==null||z.remove(),n(null),o(null)}},[s,a,A]),b.useEffect(()=>{!(t!=null&&t.content)||!Jn(t.content)||A>0||(t.content.className=d??"")},[t,d,A]),fd(t,w,k,C,A>0),Gt(t,"position",E),Gt(t,"title",v??""),Gt(t,"zIndex",M),Gt(t,"collisionBehavior",c),b.useEffect(()=>{t&&(_!==void 0?t.gmpDraggable=_:m||h||g?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,_,m,g,h]),b.useEffect(()=>{if(!t)return;const $=x!==void 0||!!u||!!l||!!f;t.gmpClickable=$,$&&(t!=null&&t.content)&&Jn(t.content)&&(t.content.style.pointerEvents="all",u&&(t.content.style.cursor="pointer"))},[t,x,u,l,f]),Ht(t,"click",u),Ht(t,"drag",m),Ht(t,"dragstart",h),Ht(t,"dragend",g),oo(t==null?void 0:t.element,"mouseenter",l),oo(t==null?void 0:t.element,"mouseleave",f),[t,r]}function fd(e,t,n,r,o){b.useEffect(()=>{if(!e||!o)return;const s=id(3,62),a=e.content;if(!(!a||!Jn(a))){if(n!==void 0||r!==void 0){s||console.warn(`AdvancedMarker: The anchorLeft and anchorTop props are only supported in Google Maps API version 3.62 and above. The current version is ${google.maps.version}.`),e.anchorLeft=n,e.anchorTop=r,t!==void 0&&console.warn("AdvancedMarker: the anchorPoint prop is ignored when anchorLeft and/or anchorTop are set.");return}if(t!==void 0){const[i,u]=t??ld.BOTTOM,d=`calc(-1 * ${i})`,l=`calc(-1 * ${u})`;s?(e.anchorLeft=d,e.anchorTop=l,a.style.transform=""):(a.style.transform=`translate(50%, 100%) translate(${d}, ${l})`,e.dataset.origin="rgm",ad.addAdvancedMarkerPointerEventsOverwrite())}}},[e,t,n,r,o])}function pd(e){const[t,n]=b.useState(null),r=Cn(),{onClick:o,onDrag:s,onDragStart:a,onDragEnd:i,onMouseOver:u,onMouseOut:d}=e,l=dt(e,["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"]),{position:f,draggable:m}=l;return b.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const h=new google.maps.Marker(l);return h.setMap(r),n(h),()=>{h.setMap(null),n(null)}},[r]),b.useEffect(()=>{if(!t)return;const h=t,g=google.maps.event;return o&&g.addListener(h,"click",o),s&&g.addListener(h,"drag",s),a&&g.addListener(h,"dragstart",a),i&&g.addListener(h,"dragend",i),u&&g.addListener(h,"mouseover",u),d&&g.addListener(h,"mouseout",d),t.setDraggable(!!m),()=>{g.clearInstanceListeners(h)}},[t,m,o,s,a,i,u,d]),b.useEffect(()=>{t&&l&&t.setOptions(l)},[t,l]),b.useEffect(()=>{m||!f||!t||t.setPosition(f)},[m,f,t]),t}const md=b.forwardRef((e,t)=>{const n=pd(e);return b.useImperativeHandle(t,()=>n,[n]),b.createElement(b.Fragment,null)});md.displayName="Marker";const ns=b.createContext(void 0),rs=()=>{const e=b.useContext(ns);if(!e)throw new Error("useGoogleMapContext must be used within GoogleMap component");return e},mr=({children:e})=>{const t=Cn(),n=(r,o=16)=>{t&&(t.setCenter(r),t.setZoom(o))};return t?p.jsx(ns.Provider,{value:{isLoaded:!0,map:t,zoomToPosition:n},children:e}):null};mr.displayName="MapContent";const hd="_googleMap_j4y4m_1",gd="_container_j4y4m_10",yd="_errorContainer_j4y4m_21",Yt={googleMap:hd,container:gd,errorContainer:yd},vd={lat:-26.3044,lng:-48.8487},bd=13,xd={disableDefaultUI:!0,zoomControl:!1,streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1,rotateControl:!1,scaleControl:!1,panControl:!1,clickableIcons:!1,keyboardShortcuts:!1},_d=({colorScheme:e,options:t,onLoad:n,children:r})=>{const o=Cn();return b.useEffect(()=>{o&&(o.setOptions(xd),t&&o.setOptions(t),n&&n(o))},[o,t,n]),p.jsx(p.Fragment,{children:r})},os=({center:e=vd,zoom:t=bd,className:n,children:r,apiKey:o,mapId:s,themeMode:a="light",options:i,onLoad:u,onError:d})=>{if(!o||!s)return p.jsx("div",{className:`${Yt.container} ${Yt.errorContainer} ${n||""}`,children:p.jsxs("div",{children:[p.jsx("p",{children:"Google Maps não configurado"}),p.jsx("p",{style:{fontSize:"14px",marginTop:"8px",opacity:.7},children:"As props apiKey e mapId são obrigatórias"})]})});const l=a==="dark"?"DARK":"LIGHT",f={defaultCenter:e,defaultZoom:t,mapId:s,className:Yt.googleMap,colorScheme:l},m=`${s}-${l}`;return p.jsx(Nu,{apiKey:o,onLoad:()=>{console.log("Google Maps API carregada com sucesso")},onError:h=>{console.error("Erro ao carregar Google Maps API:",h),d&&h instanceof Error&&d(h)},children:p.jsx("div",{className:`${Yt.container} ${n||""}`,style:{width:"100%",height:"400px",minHeight:"400px",position:"relative"},children:p.jsx(es,{...f,style:{width:"100%",height:"100%"},children:p.jsx(_d,{colorScheme:l,options:i,onLoad:u,children:p.jsx(mr,{children:r})})},m)})})};os.displayName="GoogleMap";const Sd="_mapSpot_m5paz_1",wd="_count_m5paz_26",so={mapSpot:Sd,count:wd},hr=({count:e,addressText:t,className:n,onClick:r,sx:o})=>{const s=p.jsx(S.Box,{className:`${so.mapSpot} ${n||""}`,onClick:r,sx:o,children:p.jsx(S.Typography,{className:so.count,children:e})});return t?p.jsx(S.Tooltip,{title:t,arrow:!0,placement:"top",children:s}):s};hr.displayName="MapSpot";const Ed=16,ss=({spots:e,onSpotClick:t,zoomLevel:n=Ed})=>{const{isLoaded:r,zoomToPosition:o}=rs(),s=a=>{o({lat:a.lat,lng:a.lng},n),t==null||t(a)};return r?p.jsx(p.Fragment,{children:e.map((a,i)=>p.jsx(ts,{position:{lat:a.lat,lng:a.lng},onClick:()=>s(a),children:p.jsx(hr,{count:a.count,addressText:a.addressText})},a.id??i))}):null};ss.displayName="MapMarkers";const Cd="_searchBar_15mix_1",Td="_startIconContainer_15mix_106",kd="_endIconContainer_15mix_117",Od="_endIconContainerClickable_15mix_153",Id="_defaultIcon_15mix_157",Tt={searchBar:Cd,startIconContainer:Td,endIconContainer:kd,endIconContainerClickable:Od,defaultIcon:Id},Md=e=>()=>{e&&e()},Ad=e=>t=>{e&&e(t)},jd=()=>p.jsx(Re.Search,{className:Tt.defaultIcon}),Rd=e=>e||jd(),as=b.forwardRef(({startIcon:e,endIcon:t,onEndIconClick:n,placeholder:r,value:o,onChange:s,className:a,...i},u)=>{const l=S.useTheme().palette.mode==="dark",f=Rd(t),m=Md(n),h=Ad(s);return p.jsx(S.TextField,{ref:u,value:o,onChange:h,placeholder:r,variant:"outlined",autoComplete:"off",className:`${Tt.searchBar} ${a||""}`,"data-theme":l?"dark":"light",InputProps:{startAdornment:e?p.jsx(S.InputAdornment,{position:"start",className:Tt.startIconContainer,children:e}):null,endAdornment:p.jsx(S.InputAdornment,{position:"end",className:`${Tt.endIconContainer} ${n?Tt.endIconContainerClickable:""}`,onClick:m,disablePointerEvents:!n,children:f})},inputProps:{autoComplete:"off","data-form-type":"other"},...i})});as.displayName="SearchBar";const $d=Je(p.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),Pd=Je([p.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 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z"},"0"),p.jsx("path",{d:"M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z"},"1")],"SearchOff"),Nd="_container_1mb8b_1",Ld="_iconWrapper_1mb8b_11",Bd="_icon_1mb8b_11",Dd="_title_1mb8b_21",zd="_subtitle_1mb8b_30",Fd="_description_1mb8b_34",Wd="_button_1mb8b_38",Xe={container:Nd,iconWrapper:Ld,icon:Bd,title:Dd,subtitle:zd,description:Fd,button:Wd},is=({onGoHome:e,buttonText:t="Voltar para o início",title:n="Página não encontrada",description:r="Desculpe, a página que você está procurando não existe ou foi movida para outro endereço.",errorCode:o="404",className:s})=>p.jsx(S.Container,{maxWidth:"sm",children:p.jsxs(S.Box,{className:`${Xe.container} ${s||""}`,children:[p.jsx(S.Box,{className:Xe.iconWrapper,children:p.jsx(Pd,{className:Xe.icon,color:"primary"})}),p.jsx(S.Typography,{variant:"h1",className:Xe.title,sx:{fontSize:{xs:"6rem",md:"8rem"}},children:o}),p.jsx(S.Typography,{variant:"h4",component:"h2",className:Xe.subtitle,color:"text.primary",children:n}),p.jsx(S.Typography,{variant:"body1",className:Xe.description,color:"text.secondary",children:r}),e&&p.jsx(rr,{variant:"contained",size:"large",startIcon:p.jsx($d,{}),onClick:e,className:Xe.button,children:t})]})});is.displayName="NotFoundContent";const Vd=e=>{const t=e.find(r=>r.active),n=e.flatMap(r=>{var o;return((o=r.submenu)==null?void 0:o.map(s=>({item:r,subItem:s})))??[]}).find(({subItem:r})=>r.active);return{itemId:(n==null?void 0:n.item.id)??(t==null?void 0:t.id)??null,subItemId:(n==null?void 0:n.subItem.id)??null,expandedItemId:(n==null?void 0:n.item.id)??null}},Ud=({items:e,isExpanded:t=!0,onClick:n})=>{const r=b.useMemo(()=>Vd(e),[e]),[o,s]=b.useState(r.itemId),[a,i]=b.useState(r.subItemId),[u,d]=b.useState(r.expandedItemId),[l,f]=b.useState(null),[m,h]=b.useState(null);b.useEffect(()=>{s(r.itemId),i(r.subItemId),d(r.expandedItemId)},[r.itemId,r.subItemId,r.expandedItemId]);const g=m?e.find(k=>k.id===m):void 0,c=(g==null?void 0:g.submenu)??[];return{selectedItemId:o,selectedSubItemId:a,expandedItemId:u,submenuAnchorEl:l,submenuItem:g,submenuItems:c,getIsItemActive:k=>{var A;const C=a?!!((A=k.submenu)!=null&&A.some($=>$.id===a)):!1;return o?k.id===o:!!(k.active||C)},getIsSubItemActive:k=>a?k.id===a:!!k.active,shouldShowSubmenu:k=>{var C;return!!(t&&((C=k.submenu)!=null&&C.length)&&u===k.id)},handleItemClick:(k,C)=>{var A,$;s(k.id),i(null),(A=k.submenu)!=null&&A.length?t?d(z=>z===k.id?null:k.id):(f(C.currentTarget),h(k.id)):(d(null),f(null),h(null)),($=k.onClick)==null||$.call(k,C),n==null||n({item:k})},handleSubItemClick:(k,C,A,$)=>{var z;s(k.id),i(C.id),$!=null&&$.closeMenu&&(f(null),h(null)),(z=C.onClick)==null||z.call(C,A),n==null||n({item:k,subItem:C})},closeSubmenu:()=>{f(null),h(null)}}},cs=e=>typeof e=="number"?`${e*4}px`:e,Hd=({item:e,onClick:t,isActive:n})=>{const r=G.useTheme();return p.jsx(S.ButtonBase,{onClick:t,"aria-label":e.label,"aria-pressed":n||void 0,sx:{width:"100%",borderRadius:cs(r.shape.borderRadius),px:2,py:1.25,justifyContent:"flex-start",textAlign:"left",color:r.palette.text.primary,backgroundColor:n?r.palette.action.selected:"transparent","&:hover":{backgroundColor:r.palette.action.hover}},children:p.jsx(S.Typography,{variant:"body2",sx:{fontWeight:500},children:e.label})})},ls=({items:e,isExpanded:t=!0,className:n,onClick:r})=>{const o=G.useTheme(),s=cs(o.shape.borderRadius),{submenuAnchorEl:a,submenuItem:i,submenuItems:u,getIsItemActive:d,getIsSubItemActive:l,shouldShowSubmenu:f,handleItemClick:m,handleSubItemClick:h,closeSubmenu:g}=Ud({items:e,isExpanded:t,onClick:r});return p.jsxs(S.Stack,{className:n,direction:"column",spacing:2,sx:{width:"100%"},children:[e.map(c=>{var k,C;const x=d(c),_=f(c),E=t?o.spacing(2):o.spacing(4),v=t?x?o.palette.primary.main:o.palette.action.hover:"transparent",M=t?"transparent":x?o.palette.primary.main:o.palette.action.hover,w=!t&&x?o.palette.primary.contrastText:o.palette.text.primary;return p.jsxs(S.Stack,{direction:"column",spacing:1,sx:{width:"100%"},children:[p.jsx(S.ButtonBase,{onClick:A=>m(c,A),"aria-label":c.label,"aria-pressed":x||void 0,"aria-haspopup":(k=c.submenu)!=null&&k.length?"menu":void 0,sx:{width:"100%",borderRadius:s,px:t?2:1,py:t?1.5:1,justifyContent:t?"flex-start":"center",textAlign:"left",color:o.palette.text.primary,backgroundColor:v,boxShadow:t&&x?o.shadows[1]:"none","&:hover":{backgroundColor:t?o.palette.action.hover:"transparent"}},children:p.jsxs(S.Stack,{direction:t?"row":"column",alignItems:"center",spacing:t?1.5:1,sx:{width:"100%"},children:[p.jsx(S.Box,{sx:{width:64,height:E,borderRadius:s,display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:M,color:w,transition:o.transitions.create(["background-color","box-shadow"],{duration:o.transitions.duration.shortest}),...t?{}:{boxShadow:x?o.shadows[1]:"none","&:hover":{backgroundColor:x?G.alpha(o.palette.primary.main,.9):o.palette.action.selected}}},children:c.icon}),p.jsx(S.Typography,{variant:"body2",sx:{width:"100%",textAlign:t?"left":"center",fontWeight:x?600:500},children:c.label}),t&&c.trailingIcon?p.jsx(S.Box,{sx:{ml:"auto",display:"inline-flex",alignItems:"center"},children:c.trailingIcon}):null]})}),_?p.jsx(S.Collapse,{in:_,timeout:"auto",unmountOnExit:!0,children:p.jsx(S.Stack,{direction:"column",spacing:1,sx:{pl:4},children:(C=c.submenu)==null?void 0:C.map(A=>{const $=l(A);return p.jsx(Hd,{item:A,isActive:$,onClick:z=>h(c,A,z)},A.id)})})}):null]},c.id)}),p.jsx(S.Menu,{anchorEl:a,open:!!(a&&u.length),onClose:g,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},MenuListProps:{dense:!0,"aria-label":(i==null?void 0:i.label)??"submenu"},PaperProps:{sx:{borderRadius:s,minWidth:o.spacing(22),px:1,py:.5,boxShadow:o.shadows[3]}},children:u.map(c=>{const x=l(c);return p.jsx(S.MenuItem,{selected:x,onClick:_=>{i&&h(i,c,_,{closeMenu:!0})},sx:{borderRadius:s,fontWeight:x?600:500},children:c.label},c.id)})})]})};ls.displayName="SidebarMenu";const Gd=e=>{const t=e.find(n=>n.active);return(t==null?void 0:t.id)??null},Yd=({items:e,onSelect:t,isExpanded:n=!0})=>{const r=b.useMemo(()=>Gd(e),[e]),[o,s]=b.useState(r),[a,i]=b.useState(null);b.useEffect(()=>{s(r)},[r]);const u=o?e.find(h=>h.id===o):void 0;return{selectedItemId:o,selectedItem:u,menuAnchorEl:a,getIsItemActive:h=>o?h.id===o:!!h.active,openMenu:h=>{n||i(h.currentTarget)},closeMenu:()=>{n||i(null)},handleItemClick:(h,g)=>{var c;s(h.id),(c=h.onClick)==null||c.call(h,g),t==null||t(h),i(null)}}},qd=e=>typeof e=="number"?`${e*4}px`:e,us=({items:e,currentLabel:t,headerLabel:n,headerIcon:r,headerTrailingIcon:o,listTitle:s,action:a,isExpanded:i=!0,className:u,onSelect:d})=>{var Q,K;const l=G.useTheme(),f=b.useRef(null),m=qd(l.shape.borderRadius),[h,g]=b.useState(!1),c=b.useMemo(()=>Number.parseFloat(l.spacing(2).toString()),[l]),{selectedItem:x,menuAnchorEl:_,getIsItemActive:E,openMenu:v,closeMenu:M,handleItemClick:w}=Yd({items:e,onSelect:d,isExpanded:i}),k=t??(x==null?void 0:x.label)??((Q=e[0])==null?void 0:Q.label)??"",C=r??(x==null?void 0:x.icon)??((K=e[0])==null?void 0:K.icon)??null,A=i||!C,$=R=>{if(i){g(ee=>!ee);return}v(R)},z=(R,ee)=>{w(R,ee),g(!1)},B=p.jsx(S.Stack,{direction:"column",spacing:.5,children:e.map(R=>{const ee=E(R);return p.jsxs(S.MenuItem,{selected:ee,onClick:I=>z(R,I),sx:{borderRadius:m,gap:1.5,px:2,py:1.25,color:l.palette.text.primary,"&:hover":{backgroundColor:l.palette.action.hover}},children:[R.icon?p.jsx(S.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:R.icon}):null,p.jsx(S.Typography,{variant:"body1",sx:{fontWeight:ee?600:500},children:R.label})]},R.id)})}),W=p.jsxs(S.Box,{sx:{borderRadius:m,backgroundColor:l.palette.background.paper,boxShadow:l.shadows[3],display:"flex",flexDirection:"column",maxHeight:l.spacing(50)},children:[s?p.jsx(S.Box,{sx:{px:2,pt:2,pb:1},children:p.jsx(S.Typography,{variant:"subtitle2",sx:{color:l.palette.text.primary},children:s})}):null,p.jsx(S.Box,{sx:{px:2,pb:2,overflowY:"auto",flex:1,minHeight:0},children:B})]}),U=a?p.jsxs(S.MenuItem,{onClick:a.onClick,sx:{borderRadius:m,gap:1.5,px:2,py:1.25,color:l.palette.text.primary,"&:hover":{backgroundColor:l.palette.action.hover}},children:[a.icon?p.jsx(S.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:a.icon}):null,p.jsx(S.Typography,{variant:"body1",sx:{fontWeight:600},children:a.label})]}):null,q=U?p.jsx(S.Box,{sx:{borderRadius:m,backgroundColor:l.palette.background.paper,boxShadow:l.shadows[3]},children:U}):null,ie=p.jsxs(S.Stack,{direction:"column",spacing:1,sx:{minWidth:l.spacing(32)},children:[W,q]});return p.jsxs(S.Stack,{className:u,direction:i?"row":"column",spacing:i?2:1,sx:{width:"100%",alignItems:i?"flex-start":"stretch"},children:[p.jsx(S.ButtonBase,{onClick:$,"aria-label":k,ref:f,sx:{width:i?l.spacing(28):"64px",height:i?"auto":"64px",borderRadius:m,px:i?2:0,py:i?1.25:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"left",backgroundColor:l.palette.action.hover,"&:hover":{backgroundColor:l.palette.action.selected}},children:p.jsxs(S.Stack,{direction:"row",alignItems:"center",spacing:i?1:0,sx:{width:i?"100%":"auto",justifyContent:i?"space-between":"center",px:0},children:[C?p.jsx(S.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:C}):null,A?p.jsxs(S.Box,{sx:{minWidth:0,flex:1},children:[n?p.jsx(S.Typography,{variant:"caption",sx:{color:l.palette.text.secondary},children:n}):null,p.jsx(S.Typography,{variant:"body2",sx:{fontWeight:600},noWrap:!0,children:k})]}):null,i&&o?p.jsx(S.Box,{sx:{ml:"auto",display:"inline-flex",alignItems:"center"},children:o}):null]})}),i?h?p.jsx(S.ClickAwayListener,{onClickAway:()=>g(!1),children:p.jsx(S.Popper,{open:h,anchorEl:f.current,placement:"right-start",modifiers:[{name:"offset",options:{offset:[0,c]}}],sx:{zIndex:l.zIndex.modal},children:ie})}):null:p.jsx(S.Menu,{anchorEl:_,open:!!_,onClose:M,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},disableAutoFocusItem:!0,slotProps:{paper:{sx:{borderRadius:m,p:0,ml:2,backgroundColor:"transparent",boxShadow:"none",overflow:"visible"}}},MenuListProps:{"aria-label":k?`menu-${k}`:"menu",sx:{p:0}},children:ie})]})};us.displayName="ModuleMenu";const gr=e=>e.seekable&&e.seekable.length>0?e.seekable.end(e.seekable.length-1):Number.isFinite(e.duration)&&e.duration>0?e.duration:e.currentTime,Kd=(e,t,n)=>({...e&&{"--player-width":typeof e=="number"?`${e}px`:e},...t&&{"--player-height":typeof t=="number"?`${t}px`:t},...n&&{"--player-aspect-ratio":n}}),Zd=({stream:e,availableQualities:t,initialQuality:n,autoPlay:r,liveThresholdSeconds:o,allowPlaybackRateForStream:s})=>{const a=b.useRef(null),i=b.useRef(null),u=b.useMemo(()=>{if(!t||!t.length)return null;if(n){const R=t.find(ee=>ee.value===n);if(R)return R}return t[0]},[t,n]),[d,l]=b.useState(u),[f,m]=b.useState(!1),[h,g]=b.useState(!0),[c,x]=b.useState(!1),[_,E]=b.useState(0),[v,M]=b.useState(0),[w,k]=b.useState(1),[C,A]=b.useState(1),[$,z]=b.useState(!1),[B,W]=b.useState(!0),U=(d==null?void 0:d.stream)??e??null,q=(d==null?void 0:d.src)??null,Q=!!!U||s;b.useEffect(()=>{l(u)},[u]);const K=b.useCallback(()=>{const R=i.current;if(!R)return;if(!R.seekable||R.seekable.length===0){g(!0),x(!1);return}const ee=gr(R),I=Math.max(0,ee-R.currentTime);M(ee),E(R.currentTime),x(ee>0),g(I<=(o??2))},[o]);return b.useEffect(()=>{const R=i.current;if(!R)return;const ee=()=>m(!0),I=()=>m(!1),y=()=>W(!0),j=()=>W(!0),T=()=>W(!1),O=()=>W(!1);return R.addEventListener("play",ee),R.addEventListener("pause",I),R.addEventListener("waiting",y),R.addEventListener("loadstart",j),R.addEventListener("canplay",T),R.addEventListener("playing",O),R.addEventListener("timeupdate",K),R.addEventListener("durationchange",K),R.addEventListener("loadedmetadata",K),R.addEventListener("progress",K),()=>{R.removeEventListener("play",ee),R.removeEventListener("pause",I),R.removeEventListener("waiting",y),R.removeEventListener("loadstart",j),R.removeEventListener("canplay",T),R.removeEventListener("playing",O),R.removeEventListener("timeupdate",K),R.removeEventListener("durationchange",K),R.removeEventListener("loadedmetadata",K),R.removeEventListener("progress",K)}},[K]),b.useEffect(()=>{const R=i.current;R&&(W(!0),U?(R.srcObject!==U&&(R.srcObject=U),R.getAttribute("src")&&R.removeAttribute("src")):q?(R.srcObject&&(R.srcObject=null),R.src!==q&&(R.src=q,R.load())):(R.srcObject&&(R.srcObject=null),R.getAttribute("src")&&R.removeAttribute("src")),r&&R.play().then(()=>{}).catch(()=>{}))},[U,q,r]),b.useEffect(()=>{const R=i.current;R&&(Q?R.playbackRate=w:(R.playbackRate=1,k(1)))},[w,Q]),b.useEffect(()=>{const R=()=>{z(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",R),()=>{document.removeEventListener("fullscreenchange",R)}},[]),{containerRef:a,videoRef:i,selectedQuality:d,setSelectedQuality:l,isPlaying:f,isLive:h,canSeek:c,currentTime:_,setCurrentTime:E,seekableEnd:v,playbackRate:w,setPlaybackRate:k,zoom:C,setZoom:A,isFullscreen:$,isLoading:B,canAdjustPlaybackRate:Q,updateLiveStatus:K}},Jd="_container_zv1tx_1",Xd="_loader_zv1tx_19",Qd="_video_zv1tx_29",ef="_controlsOverlay_zv1tx_37",tf="_timeline_zv1tx_58",nf="_controlsRow_zv1tx_65",rf="_controlGroup_zv1tx_83",of="_iconButton_zv1tx_100",sf="_seekButton_zv1tx_113",af="_menuButton_zv1tx_133",cf="_liveBadge_zv1tx_149",Se={container:Jd,loader:Xd,video:Qd,controlsOverlay:ef,timeline:tf,controlsRow:nf,controlGroup:rf,iconButton:of,seekButton:sf,menuButton:af,liveBadge:cf},Dn=({label:e,valueLabel:t,selectedValue:n,options:r,onChange:o,disabled:s,ariaLabel:a})=>{const[i,u]=b.useState(null),d=!!i;return p.jsxs(p.Fragment,{children:[p.jsx(S.ButtonBase,{disabled:s,className:Se.menuButton,"aria-label":a,onClick:l=>u(l.currentTarget),children:e?`${e}: ${t}`:t}),p.jsx(S.Menu,{anchorEl:i,open:d,onClose:()=>u(null),children:r.map(l=>p.jsx(S.MenuItem,{selected:l.value===n,disabled:l.disabled,onClick:()=>{o(l.value),u(null)},children:l.label},`${e}-${String(l.value)}`))})]})},lf=e=>()=>{const t=e.current;t&&(t.paused?t.play().catch(()=>{}):t.pause())},uf=(e,t,n)=>r=>{const o=e.current;if(!o||!t)return;const s=gr(o),a=Math.min(Math.max(o.currentTime+r,0),s);o.currentTime=a,n()},df=e=>()=>{e.current&&(document.fullscreenElement?document.exitFullscreen().catch(()=>{}):e.current.requestFullscreen().catch(()=>{}))},ff=(e,t,n)=>r=>{const o=e.find(s=>s.value===r)??null;t(o),n==null||n(o)},pf=(e,t)=>(n,r)=>{if(!e)return;const o=Array.isArray(r)?r[0]:r;t(o)},mf=(e,t,n)=>(r,o)=>{const s=e.current;if(!s||!t)return;const a=Array.isArray(o)?o[0]:o,i=gr(s);s.currentTime=Math.min(Math.max(a,0),i),n()},ds=({stream:e=null,availableQualities:t=[],initialQuality:n,onQualityChange:r,autoPlay:o=!0,playsInline:s=!0,muted:a=!0,poster:i,className:u,sx:d,liveThresholdSeconds:l=2,allowPlaybackRateForStream:f=!1,playbackRates:m=[.5,1,1.5,2],zoomLevels:h=[1,1.2,1.5],width:g,height:c,aspectRatio:x="16 / 9",showTimestamp:_=!0,showTimeline:E=!0})=>{const v=G.useTheme(),[M,w]=b.useState(""),[k,C]=b.useState(!0),A=b.useRef(null);b.useEffect(()=>{if(!_)return;const ve=()=>{const Pe=new Date,zt=String(Pe.getDate()).padStart(2,"0"),Os=String(Pe.getMonth()+1).padStart(2,"0"),Is=Pe.getFullYear(),Ms=["Dom","Seg","Ter","Qua","Qui","Sex","Sab"][Pe.getDay()],As=String(Pe.getHours()).padStart(2,"0"),js=String(Pe.getMinutes()).padStart(2,"0"),Rs=String(Pe.getSeconds()).padStart(2,"0");w(`${zt}-${Os}-${Is}, ${Ms} ${As}:${js}:${Rs}`)};ve();const Dt=setInterval(ve,1e3);return()=>clearInterval(Dt)},[_]),b.useEffect(()=>{const ve=$.current;if(!ve)return;const Dt=()=>{A.current&&(clearTimeout(A.current),A.current=null),C(!0)},Pe=()=>{A.current=setTimeout(()=>{C(!1)},1e4)},zt=()=>{k||C(!0),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{C(!1)},1e4)};return ve.addEventListener("mouseenter",Dt),ve.addEventListener("mouseleave",Pe),ve.addEventListener("mousemove",zt),()=>{ve.removeEventListener("mouseenter",Dt),ve.removeEventListener("mouseleave",Pe),ve.removeEventListener("mousemove",zt),A.current&&clearTimeout(A.current)}},[k]);const{containerRef:$,videoRef:z,selectedQuality:B,setSelectedQuality:W,isPlaying:U,isLive:q,canSeek:ie,currentTime:Q,setCurrentTime:K,seekableEnd:R,playbackRate:ee,setPlaybackRate:I,zoom:y,setZoom:j,isFullscreen:T,isLoading:O,canAdjustPlaybackRate:D,updateLiveStatus:L}=Zd({stream:e,availableQualities:t,initialQuality:n,autoPlay:o,liveThresholdSeconds:l,allowPlaybackRateForStream:f}),N=lf(z),F=uf(z,ie,L),V=df($),H=ff(t,W,r),le=pf(ie,K),P=mf(z,ie,L),xe=h.map(ve=>({value:ve,label:`${Math.round(ve*100)}%`})),$e=m.map(ve=>({value:ve,label:`${ve}x`})),Ue=t.map(ve=>({value:ve.value,label:ve.label})),Tn=(B==null?void 0:B.label)??"Auto",gt=`${Math.round(y*100)}%`,yt=`${ee}x`,vt=ie&&R>0,kn=Kd(g,c,x);return p.jsxs(S.Box,{ref:$,className:`${Se.container} ${u||""}`.trim(),style:kn,sx:{borderRadius:0,backgroundColor:v.palette.common.black,...d},children:[O&&p.jsx(S.Box,{className:Se.loader,sx:{backgroundColor:v.palette.common.black},children:p.jsx(S.CircularProgress,{size:60,sx:{color:v.palette.primary.contrastText,width:{xs:"48px",sm:"60px"},height:{xs:"48px",sm:"60px"}}})}),p.jsx("video",{ref:z,className:Se.video,autoPlay:o,playsInline:s,muted:a,poster:i,style:{transform:`scale(${y})`}}),_&&M&&p.jsx(S.Box,{sx:{position:"absolute",top:0,left:0,right:0,padding:{xs:"10px 12px",sm:"12px 16px"}},children:p.jsx(S.Typography,{variant:"body2",sx:{color:v.palette.common.white,fontWeight:500,fontSize:{xs:"12px",sm:"14px"},textShadow:"0 2px 8px rgba(0,0,0,0.8)"},children:M})}),q&&!k&&p.jsx(S.Box,{sx:{position:"absolute",bottom:16,left:20,zIndex:10},children:p.jsx(S.Box,{className:Se.liveBadge,sx:{backgroundColor:G.alpha(v.palette.common.white,.9),color:v.palette.common.black},component:"span","aria-live":"polite",children:"ao vivo"})}),p.jsxs(S.Box,{className:Se.controlsOverlay,sx:{opacity:k?1:0,visibility:k?"visible":"hidden",transition:"opacity 0.3s ease, visibility 0.3s ease"},children:[E&&p.jsx(S.Box,{className:Se.timeline,children:p.jsx(S.Slider,{size:"small",min:0,max:vt?R:1,step:1,value:vt?Q:0,disabled:!vt,onChange:le,onChangeCommitted:P,"aria-label":"Linha do tempo do video",sx:{color:v.palette.common.white,"& .MuiSlider-thumb":{width:12,height:12,backgroundColor:v.palette.common.white},"& .MuiSlider-track":{border:"none",backgroundColor:v.palette.common.white},"& .MuiSlider-rail":{backgroundColor:G.alpha(v.palette.common.white,.3),opacity:1}}})}),p.jsxs(S.Box,{className:Se.controlsRow,children:[p.jsxs(S.Box,{className:Se.controlGroup,children:[p.jsx(S.Box,{className:Se.liveBadge,sx:{backgroundColor:q?G.alpha(v.palette.common.white,.9):G.alpha(v.palette.common.white,.15),color:q?v.palette.common.black:G.alpha(v.palette.common.white,.7)},component:"span","aria-live":"polite",children:"ao vivo"}),p.jsx(S.Box,{className:Se.seekButton,component:"button",onClick:()=>F(-15),"aria-label":"Voltar 15 segundos",sx:{backgroundColor:G.alpha(v.palette.common.white,.15),color:v.palette.common.white,border:"none",cursor:"pointer","&:hover":{backgroundColor:G.alpha(v.palette.common.white,.25)}},children:"15s"}),p.jsx(S.IconButton,{className:Se.iconButton,onClick:()=>F(-15),"aria-label":"Recuar 15 segundos",sx:{backgroundColor:G.alpha(v.palette.common.white,.15),color:v.palette.common.white,"&:hover":{backgroundColor:G.alpha(v.palette.common.white,.25)}},children:p.jsx(Re.FastRewind,{fontSize:"small"})}),p.jsx(S.IconButton,{className:Se.iconButton,onClick:N,"aria-label":"Play/Pause",sx:{backgroundColor:G.alpha(v.palette.common.white,.15),color:v.palette.common.white,"&:hover":{backgroundColor:G.alpha(v.palette.common.white,.25)}},children:U?p.jsx(Re.Pause,{fontSize:"small"}):p.jsx(Re.PlayArrow,{fontSize:"small"})}),p.jsx(S.IconButton,{className:Se.iconButton,onClick:()=>F(15),"aria-label":"Avançar 15 segundos",sx:{backgroundColor:G.alpha(v.palette.common.white,.15),color:v.palette.common.white,"&:hover":{backgroundColor:G.alpha(v.palette.common.white,.25)}},children:p.jsx(Re.FastForward,{fontSize:"small"})}),p.jsx(S.Box,{className:Se.seekButton,component:"button",onClick:()=>F(15),"aria-label":"Avançar 15 segundos",sx:{backgroundColor:G.alpha(v.palette.common.white,.15),color:v.palette.common.white,border:"none",cursor:"pointer","&:hover":{backgroundColor:G.alpha(v.palette.common.white,.25)}},children:"15s"})]}),p.jsxs(S.Box,{className:Se.controlGroup,children:[p.jsx(S.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:G.alpha(v.palette.common.white,.15),color:v.palette.common.white,"&:hover":{backgroundColor:G.alpha(v.palette.common.white,.25)}}},children:p.jsx(Dn,{label:"",valueLabel:yt,selectedValue:ee,options:$e,ariaLabel:"Selecionar velocidade de reprodução",onChange:I,disabled:!D})}),Ue.length>0?p.jsx(S.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:G.alpha(v.palette.common.white,.15),color:v.palette.common.white,"&:hover":{backgroundColor:G.alpha(v.palette.common.white,.25)}}},children:p.jsx(Dn,{label:"",valueLabel:Tn,selectedValue:(B==null?void 0:B.value)??"auto",options:Ue,ariaLabel:"Selecionar qualidade do vídeo",onChange:H})}):null,p.jsx(S.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:G.alpha(v.palette.common.white,.15),color:v.palette.common.white,"&:hover":{backgroundColor:G.alpha(v.palette.common.white,.25)}}},children:p.jsx(Dn,{label:"",valueLabel:gt,selectedValue:y,options:xe,ariaLabel:"Selecionar zoom do vídeo",onChange:j})}),p.jsx(S.IconButton,{className:Se.iconButton,onClick:V,"aria-label":"Fullscreen",sx:{backgroundColor:G.alpha(v.palette.common.white,.15),color:v.palette.common.white,"&:hover":{backgroundColor:G.alpha(v.palette.common.white,.25)}},children:T?p.jsx(Re.FullscreenExit,{fontSize:"small"}):p.jsx(Re.Fullscreen,{fontSize:"small"})})]})]})]})]})};ds.displayName="VideoPlayer";const hf=Je(p.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"UndoOutlined"),gf=Je(p.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),yf=Je(p.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),vf="_root_1gj5n_1",bf="_container_1gj5n_6",xf="_header_1gj5n_13",_f="_headerText_1gj5n_21",Sf="_controls_1gj5n_27",wf="_iconButton_1gj5n_34",Ef="_zoomGroup_1gj5n_43",Cf="_zoomTrack_1gj5n_52",Tf="_zoomTrackFill_1gj5n_59",kf="_layers_1gj5n_67",Of="_timeScale_1gj5n_78",If="_videoTrack_1gj5n_82",Mf="_eventsTrack_1gj5n_86",Af="_trackBox_1gj5n_90",jf="_trackLabelRow_1gj5n_95",Rf="_label_1gj5n_103",$f="_trackArea_1gj5n_112",Pf="_tick_1gj5n_118",Nf="_tickMajor_1gj5n_126",Lf="_tickMinor_1gj5n_131",Bf="_tickLabel_1gj5n_135",Df="_segment_1gj5n_146",zf="_event_1gj5n_86",Ff="_eventDot_1gj5n_166",Wf="_selectionOverlay_1gj5n_172",Vf="_playhead_1gj5n_180",Uf="_playheadLine_1gj5n_190",Hf="_playheadHandle_1gj5n_199",Z={root:vf,container:bf,header:xf,headerText:_f,controls:Sf,iconButton:wf,zoomGroup:Ef,zoomTrack:Cf,zoomTrackFill:Tf,layers:kf,timeScale:Of,videoTrack:If,eventsTrack:Mf,trackBox:Af,trackLabelRow:jf,label:Rf,trackArea:$f,tick:Pf,tickMajor:Nf,tickMinor:Lf,tickLabel:Bf,segment:Df,event:zf,eventDot:Ff,selectionOverlay:Wf,playhead:Vf,playheadLine:Uf,playheadHandle:Hf},Fe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function fs(e){return"init"in e}function Xn(e){return!!e.write}function ao(e){return"v"in e||"e"in e}function ln(e){if("e"in e)throw e.e;if((Fe?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const un=new WeakMap;function ps(e){var t;return dn(e)&&!!((t=un.get(e))!=null&&t[0])}function Gf(e){const t=un.get(e);t!=null&&t[0]&&(t[0]=!1,t[1].forEach(n=>n()))}function Qn(e,t){let n=un.get(e);if(!n){n=[!0,new Set],un.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)}function dn(e){return typeof(e==null?void 0:e.then)=="function"}function ms(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function hs(e,t,n){var r;const o=new Set;for(const s of((r=n.get(e))==null?void 0:r.t)||[])o.add(s);for(const s of t.p)o.add(s);return o}const Yf=(e,t,...n)=>t.read(...n),qf=(e,t,...n)=>t.write(...n),Kf=(e,t)=>{if(t.INTERNAL_onInit)return t.INTERNAL_onInit(e);if(t.unstable_onInit)return console.warn("[DEPRECATED] atom.unstable_onInit is renamed to atom.INTERNAL_onInit."),t.unstable_onInit(e)},Zf=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},Jf=(e,t)=>{var n;const r=Ce(e),o=r[0],s=r[6],a=r[9];if((Fe?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let i=o.get(t);return i||(i={d:new Map,p:new Set,n:0},o.set(t,i),(n=s.i)==null||n.call(s,t),a==null||a(e,t)),i},Xf=e=>{const t=Ce(e),n=t[1],r=t[3],o=t[4],s=t[5],a=t[6],i=t[13],u=[],d=l=>{try{l()}catch(f){u.push(f)}};do{a.f&&d(a.f);const l=new Set,f=l.add.bind(l);r.forEach(m=>{var h;return(h=n.get(m))==null?void 0:h.l.forEach(f)}),r.clear(),s.forEach(f),s.clear(),o.forEach(f),o.clear(),l.forEach(d),r.size&&i(e)}while(r.size||s.size||o.size);if(u.length)throw new AggregateError(u)},Qf=e=>{const t=Ce(e),n=t[1],r=t[2],o=t[3],s=t[11],a=t[14],i=t[17],u=[],d=new WeakSet,l=new WeakSet,f=Array.from(o);for(;f.length;){const m=f[f.length-1],h=s(e,m);if(l.has(m)){f.pop();continue}if(d.has(m)){if(r.get(m)===h.n)u.push([m,h]);else if((Fe?"production":void 0)!=="production"&&r.has(m))throw new Error("[Bug] invalidated atom exists");l.add(m),f.pop();continue}d.add(m);for(const g of hs(m,h,n))d.has(g)||f.push(g)}for(let m=u.length-1;m>=0;--m){const[h,g]=u[m];let c=!1;for(const x of g.d.keys())if(x!==h&&o.has(x)){c=!0;break}c&&(a(e,h),i(e,h)),r.delete(h)}},er=new WeakSet,ep=(e,t)=>{var n,r;const o=Ce(e),s=o[1],a=o[2],i=o[3],u=o[6],d=o[7],l=o[11],f=o[12],m=o[13],h=o[14],g=o[16],c=o[17],x=o[20],_=l(e,t);if(ao(_)){if(s.has(t)&&a.get(t)!==_.n)return _;let $=!1;for(const[z,B]of _.d)if(h(e,z).n!==B){$=!0;break}if(!$)return _}_.d.clear();let E=!0;function v(){s.has(t)&&(c(e,t),m(e),f(e))}function M($){var z;if($===t){const W=l(e,$);if(!ao(W))if(fs($))x(e,$,$.init);else throw new Error("no atom init");return ln(W)}const B=h(e,$);try{return ln(B)}finally{_.d.set($,B.n),ps(_.v)&&ms(t,_.v,B),s.has(t)&&((z=s.get($))==null||z.t.add(t)),E||v()}}let w,k;const C={get signal(){return w||(w=new AbortController),w.signal},get setSelf(){return(Fe?"production":void 0)!=="production"&&!Xn(t)&&console.warn("setSelf function cannot be used with read-only atom"),!k&&Xn(t)&&(k=(...$)=>{if((Fe?"production":void 0)!=="production"&&E&&console.warn("setSelf function cannot be called in sync"),!E)try{return g(e,t,...$)}finally{m(e),f(e)}}),k}},A=_.n;try{(Fe?"production":void 0)!=="production"&&er.delete(e);const $=d(e,t,M,C);return(Fe?"production":void 0)!=="production"&&er.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),x(e,t,$),dn($)&&(Qn($,()=>w==null?void 0:w.abort()),$.then(v,v)),(n=u.r)==null||n.call(u,t),_}catch($){return delete _.v,_.e=$,++_.n,_}finally{E=!1,A!==_.n&&a.get(t)===A&&(a.set(t,_.n),i.add(t),(r=u.c)==null||r.call(u,t))}},tp=(e,t)=>{const n=Ce(e),r=n[1],o=n[2],s=n[11],a=[t];for(;a.length;){const i=a.pop(),u=s(e,i);for(const d of hs(i,u,r)){const l=s(e,d);o.set(d,l.n),a.push(d)}}},np=(e,t,...n)=>{const r=Ce(e),o=r[3],s=r[6],a=r[8],i=r[11],u=r[12],d=r[13],l=r[14],f=r[15],m=r[16],h=r[17],g=r[20];let c=!0;const x=E=>ln(l(e,E)),_=(E,...v)=>{var M;const w=i(e,E);try{if(E===t){if(!fs(E))throw new Error("atom not writable");(Fe?"production":void 0)!=="production"&&er.add(e);const k=w.n,C=v[0];g(e,E,C),h(e,E),k!==w.n&&(o.add(E),f(e,E),(M=s.c)==null||M.call(s,E));return}else return m(e,E,...v)}finally{c||(d(e),u(e))}};try{return a(e,t,x,_,...n)}finally{c=!1}},rp=(e,t)=>{var n;const r=Ce(e),o=r[1],s=r[3],a=r[6],i=r[11],u=r[15],d=r[18],l=r[19],f=i(e,t),m=o.get(t);if(m&&!ps(f.v)){for(const[h,g]of f.d)if(!m.d.has(h)){const c=i(e,h);d(e,h).t.add(t),m.d.add(h),g!==c.n&&(s.add(h),u(e,h),(n=a.c)==null||n.call(a,h))}for(const h of m.d)if(!f.d.has(h)){m.d.delete(h);const g=l(e,h);g==null||g.t.delete(t)}}},op=(e,t)=>{var n;const r=Ce(e),o=r[1],s=r[4],a=r[6],i=r[10],u=r[11],d=r[12],l=r[13],f=r[14],m=r[16],h=r[18],g=u(e,t);let c=o.get(t);if(!c){f(e,t);for(const x of g.d.keys())h(e,x).t.add(t);if(c={l:new Set,d:new Set(g.d.keys()),t:new Set},o.set(t,c),Xn(t)){const x=()=>{let _=!0;const E=(...v)=>{try{return m(e,t,...v)}finally{_||(l(e),d(e))}};try{const v=i(e,t,E);v&&(c.u=()=>{_=!0;try{v()}finally{_=!1}})}finally{_=!1}};s.add(x)}(n=a.m)==null||n.call(a,t)}return c},sp=(e,t)=>{var n,r;const o=Ce(e),s=o[1],a=o[5],i=o[6],u=o[11],d=o[19],l=u(e,t);let f=s.get(t);if(!f||f.l.size)return f;let m=!1;for(const h of f.t)if((n=s.get(h))!=null&&n.d.has(t)){m=!0;break}if(!m){f.u&&a.add(f.u),f=void 0,s.delete(t);for(const h of l.d.keys()){const g=d(e,h);g==null||g.t.delete(t)}(r=i.u)==null||r.call(i,t);return}return f},ap=(e,t,n)=>{const r=Ce(e)[11],o=r(e,t),s="v"in o,a=o.v;if(dn(n))for(const i of o.d.keys())ms(t,n,r(e,i));o.v=n,delete o.e,(!s||!Object.is(a,o.v))&&(++o.n,dn(a)&&Gf(a))},ip=(e,t)=>{const n=Ce(e)[14];return ln(n(e,t))},cp=(e,t,...n)=>{const r=Ce(e),o=r[12],s=r[13],a=r[16];try{return a(e,t,...n)}finally{s(e),o(e)}},lp=(e,t,n)=>{const r=Ce(e),o=r[12],s=r[18],a=r[19],u=s(e,t).l;return u.add(n),o(e),()=>{u.delete(n),a(e,t),o(e)}},gs=new WeakMap,Ce=e=>{const t=gs.get(e);if((Fe?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function up(...e){const t={get(r){const o=Ce(t)[21];return o(t,r)},set(r,...o){const s=Ce(t)[22];return s(t,r,...o)},sub(r,o){const s=Ce(t)[23];return s(t,r,o)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Yf,qf,Kf,Zf,Jf,Xf,Qf,ep,tp,np,rp,op,sp,ap,ip,cp,lp,void 0].map((r,o)=>e[o]||r);return gs.set(t,Object.freeze(n)),t}const ys={};let dp=0;function ht(e,t){const n=`atom${++dp}`,r={toString(){return(ys?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=fp,r.write=pp),r}function fp(e){return e(this)}function pp(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function mp(){return up()}let Et;function hp(){return Et||(Et=mp(),(ys?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Et),globalThis.__JOTAI_DEFAULT_STORE__!==Et&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Et}const gp={},yp=b.createContext(void 0);function vs(e){return b.useContext(yp)||hp()}const tr=e=>typeof(e==null?void 0:e.then)=="function",nr=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},vp=b.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(nr(e),e)}),zn=new WeakMap,io=(e,t)=>{let n=zn.get(e);return n||(n=new Promise((r,o)=>{let s=e;const a=d=>l=>{s===d&&r(l)},i=d=>l=>{s===d&&o(l)},u=()=>{try{const d=t();tr(d)?(zn.set(d,n),s=d,d.then(a(d),i(d)),Qn(d,u)):r(d)}catch(d){o(d)}};e.then(a(e),i(e)),Qn(e,u)}),zn.set(e,n)),n};function fn(e,t){const{delay:n,unstable_promiseStatus:r=!b.use}={},o=vs(),[[s,a,i],u]=b.useReducer(l=>{const f=o.get(e);return Object.is(l[0],f)&&l[1]===o&&l[2]===e?l:[f,o,e]},void 0,()=>[o.get(e),o,e]);let d=s;if((a!==o||i!==e)&&(u(),d=o.get(e)),b.useEffect(()=>{const l=o.sub(e,()=>{if(r)try{const f=o.get(e);tr(f)&&nr(io(f,()=>o.get(e)))}catch{}if(typeof n=="number"){setTimeout(u,n);return}u()});return u(),l},[o,e,n,r]),b.useDebugValue(d),tr(d)){const l=io(d,()=>o.get(e));return r&&nr(l),vp(l)}return d}function bp(e,t){const n=vs();return b.useCallback((...o)=>{if((gp?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...o)},[n,e])}function it(e,t){return[fn(e),bp(e)]}const yr=ht(0),vr=ht(!0),br=ht(null),bs=ht({windowSeconds:24*60*60,fps:30}),xs=ht([]),_s=ht([]);function me(e,t,n){return Math.min(n,Math.max(t,e))}function Ye(e){const{time:t,windowStart:n,windowSeconds:r,width:o}=e;return o<=0||r<=0?0:(t-n)/r*o}function Ct(e){const{px:t,windowStart:n,windowSeconds:r,width:o}=e;return o<=0||r<=0?n:n+t/o*r}function be(e){return String(Math.floor(e)).padStart(2,"0")}function xp(e=Date.now()){const t=new Date(e);return t.getHours()*3600+t.getMinutes()*60+t.getSeconds()+t.getMilliseconds()/1e3}function Fn(e){const t=Math.max(0,e),n=Math.floor(t/3600)%24,r=Math.floor(t%3600/60),o=Math.floor(t%60);return`${be(n)}:${be(r)}:${be(o)}`}function _p(e,t){const n=Math.max(0,e),r=Math.floor(n/3600)%24,o=Math.floor(n%3600/60),s=Math.floor(n%60),a=n-Math.floor(n),i=Math.floor(a*t);return`${be(r)}:${be(o)}:${be(s)}:${be(i)}`}function Wn(e){const t=Math.max(0,e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=Math.floor(t%60);return n>0?`${be(n)}:${be(r)}:${be(o)}`:`${be(r)}:${be(o)}`}function Sp(e,t){const n=Math.max(0,e),r=Math.floor(n/3600),o=Math.floor(n%3600/60),s=Math.floor(n%60),a=n-Math.floor(n),i=Math.floor(a*t);return r>0?`${be(r)}:${be(o)}:${be(s)}:${be(i)}`:`${be(o)}:${be(s)}:${be(i)}`}function wp(e){const{width:t,windowSeconds:n,fps:r}=e,o=t>0?t/n:0,s=1/Math.max(1,r),a=[s,2*s,5*s,.25,.5,1,2,5,10,15,30,60,2*60,5*60,10*60,15*60,30*60,60*60,2*60*60,3*60*60,6*60*60],i=90,u=45;let d=a[a.length-1];for(const m of a)if(m*o>=i){d=m;break}const l=[d/2,d/5,d/10].filter(m=>m>0);let f=l[0]??d;for(const m of l)if(m*o>=u){f=m;break}return{majorStep:d,minorStep:f}}const Ep=(e,t,n)=>t>=3600?Fn(e).slice(0,2)+":00:00":t>=60?Fn(e).slice(0,5):t>=1?Fn(e):_p(e,n),Cp=(e,t,n)=>t>=3600||t>=60||t>=1?Wn(e):Sp(e,n);function Tp(){const e=b.useRef(null),[t,n]=b.useState(0);return b.useLayoutEffect(()=>{const r=e.current;if(!r)return;const o=new ResizeObserver(()=>{n(r.getBoundingClientRect().width)});return o.observe(r),n(r.getBoundingClientRect().width),()=>o.disconnect()},[]),{ref:e,width:t}}function kp(e){const{totalSeconds:t,enableWheelZoom:n,autoZoomOnSelection:r,tickLabelFormatter:o,clearSelectionOnEventClick:s}=e,[a,i]=it(yr),[u,d]=it(vr),[l,f]=it(br),m=fn(xs),h=fn(_s),[g,c]=it(bs),{ref:x,width:_}=Tp(),E=102,M=Math.max(0,_-E-10),[w,k]=b.useState(0),C=b.useMemo(()=>{const T=Math.max(1/Math.max(1,g.fps),.05);return me(g.windowSeconds,T,t)},[g.windowSeconds,g.fps,t]);b.useEffect(()=>{if(!u||_<=0)return;const T=me(a-C*.9,0,Math.max(0,t-C));k(T)},[a,u,_,C,t]);const A=b.useMemo(()=>{const T=me(w,0,Math.max(0,t-C)),O=T+C;return{start:T,end:O,seconds:C}},[w,t,C]),$=b.useMemo(()=>{if(M<=0)return[];const{majorStep:T,minorStep:O}=wp({width:M,windowSeconds:A.seconds,fps:g.fps}),D=Math.floor(A.start/O)*O,L=A.end,N=[],F=O*1e-6;for(let V=D;V<=L+F;V+=O){const H=Ye({time:V,windowStart:A.start,windowSeconds:A.seconds,width:M});if(H<-1||H>M+1)continue;const le=Math.abs(V/T-Math.round(V/T))<1e-6;N.push({time:V,px:H,kind:le?"major":"minor",label:le?o(V,T,g.fps):void 0})}return N},[M,o,A.end,A.seconds,A.start,g.fps]),z=b.useRef(null),B=b.useRef(null),W=T=>{B.current=T,z.current==null&&(z.current=requestAnimationFrame(()=>{z.current=null;const O=B.current;B.current=null,O==null||O()}))};b.useEffect(()=>()=>{z.current!=null&&cancelAnimationFrame(z.current)},[]);const U=b.useRef(null),q=T=>{const O=x.current;if(!O)return 0;const D=O.getBoundingClientRect();return me(T-D.left-E,0,M)};return{viewportRef:x,width:_,axisLeft:E,axisWidth:M,totalSeconds:t,zoom:g,setZoom:c,isLive:u,setIsLive:d,currentTime:a,selectedRange:l,setSelectedRange:f,videoSegments:m,events:h,view:A,ticks:$,onWheel:T=>{if(!n||_<=0)return;T.preventDefault(),d(!1);const O=q(T.clientX),D=me(Ct({px:O,windowStart:A.start,windowSeconds:A.seconds,width:M}),0,t),N=T.deltaY<0?.8:1.25,F=me(A.seconds*N,Math.max(1/Math.max(1,g.fps),.05),t),V=me(D-O/Math.max(1,M)*F,0,Math.max(0,t-F));c(H=>({...H,windowSeconds:F})),k(V)},onPointerDownScrub:T=>{if(T.button!==0)return;const O=x.current;if(!O)return;O.setPointerCapture(T.pointerId);const D=q(T.clientX),L=me(Ct({px:D,windowStart:A.start,windowSeconds:A.seconds,width:M}),0,t);d(!1),U.current={mode:"playhead",pointerId:T.pointerId,startPx:D,startTime:L},i(L)},onPointerDownSelect:T=>{if(T.button!==0)return;const O=x.current;if(!O)return;O.setPointerCapture(T.pointerId);const D=q(T.clientX),L=me(Ct({px:D,windowStart:A.start,windowSeconds:A.seconds,width:M}),0,t);d(!1),U.current={mode:"select",pointerId:T.pointerId,startPx:D,startTime:L},f({start:L,end:L})},onPointerDownPlayhead:T=>{if(T.button!==0)return;const O=x.current;if(!O)return;O.setPointerCapture(T.pointerId);const D=q(T.clientX),L=me(Ct({px:D,windowStart:A.start,windowSeconds:A.seconds,width:M}),0,t);d(!1),U.current={mode:"playhead",pointerId:T.pointerId,startPx:D,startTime:L},i(L)},onPointerMove:T=>{const O=U.current;if(!O||O.pointerId!==T.pointerId)return;const D=q(T.clientX);W(()=>{const L=me(Ct({px:D,windowStart:A.start,windowSeconds:A.seconds,width:M}),0,t);if(O.mode==="playhead")i(L);else{const N=Math.min(O.startTime,L),F=Math.max(O.startTime,L);f({start:N,end:F})}})},onPointerUp:T=>{const O=U.current;if(!(!O||O.pointerId!==T.pointerId)&&(U.current=null,O.mode==="select"&&l)){const D=Math.abs(l.end-l.start);if(D<Math.max(1/Math.max(1,g.fps),.1))f(null);else if(r){const L=me(D*1.05,Math.max(1/Math.max(1,g.fps),.05),t),N=me(l.start,0,Math.max(0,t-L));c(F=>({...F,windowSeconds:L})),k(N)}}},onClickEvent:T=>{s&&f(null),d(!1),i(me(T,0,t)),k(me(T-A.seconds/2,0,Math.max(0,t-A.seconds)))},resetView:()=>{d(!1),c(T=>({...T,windowSeconds:t})),k(0)}}}const Ss=({ticks:e,tickColor:t,labelColor:n})=>p.jsx("div",{className:Z.trackArea,children:e.map(r=>p.jsxs("div",{children:[p.jsx("div",{className:`${Z.tick} ${r.kind==="minor"?Z.tickMinor:Z.tickMajor}`.trim(),style:{left:`${r.px}px`,backgroundColor:t}}),r.kind==="major"&&r.label?p.jsx("div",{className:Z.tickLabel,style:{left:`${r.px}px`,color:n},children:r.label}):null]},`${r.time}-${r.kind}`))});Ss.displayName="TimeScale";const ws=({segments:e,viewStart:t,viewSeconds:n,width:r,totalSeconds:o,segmentColor:s,segmentColorHover:a})=>{const i=e.map(u=>({start:me(u.start,0,o),end:me(u.end,0,o)})).filter(u=>u.end>u.start).map(u=>{const d=Math.max(u.start,t),l=Math.min(u.end,t+n);return{start:d,end:l}}).filter(u=>u.end>u.start);return p.jsx("div",{className:Z.trackArea,children:i.map((u,d)=>{const l=Ye({time:u.start,windowStart:t,windowSeconds:n,width:r}),f=Ye({time:u.end,windowStart:t,windowSeconds:n,width:r}),m=Math.max(0,f-l);return p.jsx("div",{className:Z.segment,style:{left:`${l}px`,width:`${m}px`,background:s},onMouseEnter:h=>{h.currentTarget.style.background=a},onMouseLeave:h=>{h.currentTarget.style.background=s},"aria-hidden":!0},`${u.start}-${u.end}-${d}`)})})};ws.displayName="VideoTrack";const Es=({events:e,viewStart:t,viewSeconds:n,width:r,totalSeconds:o,onClickEvent:s,eventBg:a,eventBgHover:i,eventDot:u})=>{const d=e.map(l=>({...l,time:me(l.time,0,o)})).filter(l=>l.time>=t&&l.time<=t+n);return p.jsx("div",{className:Z.trackArea,children:d.map(l=>{const f=Ye({time:l.time,windowStart:t,windowSeconds:n,width:r});return p.jsx("button",{type:"button",className:Z.event,onPointerDown:m=>{m.stopPropagation()},onClick:()=>s(l.time),style:{left:`${f}px`,backgroundColor:a,border:"none",padding:0},onMouseEnter:m=>{m.currentTarget.style.backgroundColor=i},onMouseLeave:m=>{m.currentTarget.style.backgroundColor=a},"aria-label":`Evento em ${l.time.toFixed(2)}s`,children:l.icon?l.icon:p.jsx("span",{className:Z.eventDot,style:{backgroundColor:u}})},l.id)})})};Es.displayName="EventsTrack";const Cs=({className:e,title:t="Timeline",subtitle:n="Arraste para selecionar e aplicar zoom no período desejado",showHeader:r=!0,timeScaleMode:o="day24h",tickLabelFormatter:s,totalSeconds:a=24*60*60,enableWheelZoom:i=!0,height:u=190,autoZoomOnSelection:d=!0,showZoomControls:l=!0,enableScrubOnTracks:f=!1,clearSelectionOnEventClick:m=!0})=>{const h=G.useTheme(),g=s??(o==="duration"?Cp:Ep),{viewportRef:c,axisLeft:x,axisWidth:_,zoom:E,currentTime:v,selectedRange:M,videoSegments:w,events:k,view:C,ticks:A,onWheel:$,onPointerDownScrub:z,onPointerDownSelect:B,onPointerDownPlayhead:W,onPointerMove:U,onPointerUp:q,onClickEvent:ie,resetView:Q,setZoom:K}=kp({totalSeconds:a,enableWheelZoom:i,autoZoomOnSelection:d,tickLabelFormatter:g,clearSelectionOnEventClick:m}),R=_?x+Ye({time:v,windowStart:C.start,windowSeconds:C.seconds,width:_}):x,ee=h.palette.common.white,I=G.alpha(h.palette.common.black,.16),y="0px 4px 5.3px 0px rgba(0,0,0,0.16)",j=h.palette.mode==="dark"?G.alpha(h.palette.common.white,.7):"#79747e",T=G.alpha(h.palette.common.black,.16),O="#2c2c2c",D=G.alpha(h.palette.primary.main,.15),L=G.alpha(h.palette.primary.main,.22),N=G.alpha(h.palette.common.white,1),F=G.alpha(h.palette.common.white,1),V=G.alpha(h.palette.common.black,.55),H=G.alpha(h.palette.primary.main,.12),le=h.palette.primary.main,P=Math.max(1/Math.max(1,E.fps),.5),xe=P/a,$e=(()=>{const gt=me(C.seconds,P,a);if(xe<=0||xe>=1)return 0;const yt=Math.log(gt/a)/Math.log(xe)*100;return me(yt,0,100)})(),Ue=gt=>{const yt=me(gt,0,100),vt=a*Math.pow(xe,yt/100);K(kn=>({...kn,windowSeconds:me(vt,P,a)}))},Tn=`${Math.round($e)}%`;return p.jsxs(S.Box,{className:`${Z.root} ${Z.container} ${e??""}`.trim(),sx:{backgroundColor:ee,border:`1px solid ${I}`,boxShadow:y,px:1,py:2},children:[r?p.jsxs("div",{className:Z.header,children:[p.jsxs("div",{className:Z.headerText,children:[p.jsx(S.Typography,{variant:"subtitle1",sx:{color:j,fontWeight:500},children:t}),p.jsx(S.Typography,{variant:"body2",sx:{color:j},children:n})]}),l?p.jsxs("div",{className:Z.controls,children:[p.jsx(S.Box,{className:Z.iconButton,sx:{border:`1px solid ${G.alpha(h.palette.common.black,.22)}`},children:p.jsx(S.IconButton,{size:"small",onClick:Q,"aria-label":"Reset zoom",sx:{width:32,height:32},children:p.jsx(hf,{fontSize:"small"})})}),p.jsxs(S.Box,{className:Z.zoomGroup,sx:{backgroundColor:h.palette.common.white,border:`1px solid ${G.alpha(h.palette.common.black,.22)}`},"aria-label":"Zoom controls",children:[p.jsx(S.IconButton,{size:"small","aria-label":"Zoom out",onClick:()=>Ue($e-10),children:p.jsx(yf,{fontSize:"small"})}),p.jsxs("div",{className:Z.zoomTrack,"aria-hidden":!0,children:[p.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:G.alpha("#f5f5f5",.3),borderRadius:1,boxShadow:"1px 1px 1px rgba(10,10,10,0.04)"}}),p.jsx("div",{className:Z.zoomTrackFill,style:{width:Tn,backgroundColor:"#f5f5f5",boxShadow:"1px 1px 1px rgba(10,10,10,0.04)"}})]}),p.jsx(S.IconButton,{size:"small","aria-label":"Zoom in",onClick:()=>Ue($e+10),children:p.jsx(gf,{fontSize:"small"})})]})]}):null]}):null,p.jsx(S.Box,{sx:{mt:r?2:0,height:u},children:p.jsxs("div",{ref:c,className:Z.layers,onWheel:$,onPointerMove:U,onPointerUp:q,children:[p.jsxs("div",{className:Z.playhead,style:{left:`${R}px`},onPointerDown:W,role:"slider","aria-label":"Playhead","aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":v,tabIndex:0,children:[p.jsx("div",{className:Z.playheadHandle,style:{borderBottomColor:le}}),p.jsx("div",{className:Z.playheadLine,style:{backgroundColor:le}})]}),p.jsxs("div",{className:`${Z.trackLabelRow} ${Z.timeScale}`.trim(),children:[p.jsx("div",{}),p.jsx("div",{onPointerDown:z,style:{height:"100%",cursor:"ew-resize"},"aria-label":"Régua do tempo",children:p.jsx(Ss,{ticks:A,tickColor:T,labelColor:O})})]}),p.jsxs(S.Box,{className:Z.trackBox,sx:{mt:1,border:`1px solid ${G.alpha(h.palette.common.black,.1)}`,borderRadius:"12px",height:106,position:"relative"},children:[M?p.jsx("div",{className:Z.selectionOverlay,style:{left:`${x+Ye({time:M.start,windowStart:C.start,windowSeconds:C.seconds,width:_})}px`,width:`${Math.max(0,Ye({time:M.end,windowStart:C.start,windowSeconds:C.seconds,width:_})-Ye({time:M.start,windowStart:C.start,windowSeconds:C.seconds,width:_}))}px`,backgroundColor:H}}):null,p.jsxs("div",{className:`${Z.trackLabelRow} ${Z.videoTrack}`.trim(),children:[p.jsx("div",{className:Z.label,style:{color:j},children:"Video"}),p.jsx("div",{onPointerDown:f?z:void 0,style:{height:"100%"},children:p.jsx(ws,{segments:w,viewStart:C.start,viewSeconds:C.seconds,width:_,totalSeconds:a,segmentColor:D,segmentColorHover:L})})]}),p.jsxs("div",{className:`${Z.trackLabelRow} ${Z.eventsTrack}`.trim(),children:[p.jsx("div",{className:Z.label,style:{color:j},children:"Eventos"}),p.jsx("div",{onPointerDown:f?z:void 0,style:{height:"100%"},children:p.jsx(Es,{events:k,viewStart:C.start,viewSeconds:C.seconds,width:_,totalSeconds:a,onClickEvent:ie,eventBg:N,eventBgHover:F,eventDot:V})})]}),p.jsx("div",{onPointerDown:B,style:{position:"absolute",left:x,right:10,top:0,bottom:0,cursor:"crosshair"},"aria-label":"Arraste para selecionar"})]})]})})]})};Cs.displayName="VideoTimeline";const Ts=({stream:e=null,src:t,autoPlay:n=!0,muted:r=!0,playsInline:o=!0,className:s,liveEdgeThresholdSeconds:a=2,updateTimeForLiveStream:i=!0,constrainToSelectedRange:u=!0,loopSelection:d=!1})=>{const l=b.useRef(null),[f,m]=it(yr),[h,g]=it(vr),c=fn(br),x=!!e;b.useEffect(()=>{const v=l.current;if(v){if(e){v.srcObject=e;return}v.srcObject=null,t&&(v.src=t)}},[e,t]),b.useEffect(()=>{const v=l.current;if(!v||x)return;const M=()=>{if(u&&c){const C=Math.max(0,c.start),A=Math.max(C,c.end);v.currentTime<C?v.currentTime=C:v.currentTime>A&&(d?v.currentTime=C:(v.pause(),v.currentTime=A))}if(m(v.currentTime),Number.isFinite(v.duration)&&v.duration>0){const C=v.duration-v.currentTime<=a;g(C)}},w=()=>{if(!u||!c)return;const C=Math.max(0,c.start),A=Math.max(C,c.end);(v.currentTime<C||v.currentTime>A)&&(v.currentTime=C)},k=()=>{h&&Number.isFinite(v.duration)&&v.duration>0&&(v.currentTime=v.duration)};return v.addEventListener("timeupdate",M),v.addEventListener("play",w),v.addEventListener("loadedmetadata",k),()=>{v.removeEventListener("timeupdate",M),v.removeEventListener("play",w),v.removeEventListener("loadedmetadata",k)}},[u,x,h,a,d,c,m,g]);const _=b.useRef(-1);b.useEffect(()=>{const v=l.current;if(!v||x||!t)return;if(h){if(Number.isFinite(v.duration)&&v.duration>0){const w=v.duration;Math.abs(v.currentTime-w)>.25&&(v.currentTime=w,_.current=w)}return}if(Math.abs(_.current-f)<.05)return;let M=f;if(u&&c){const w=Math.max(0,c.start),k=Math.max(w,c.end);M=Math.min(k,Math.max(w,M))}Math.abs(v.currentTime-M)>.25&&(v.currentTime=M,_.current=f)},[u,f,h,x,c,t]),b.useEffect(()=>{const v=l.current;if(!v||x||!t||!u||!c)return;const M=Math.max(0,c.start),w=!v.paused;v.currentTime=M,_.current=M,g(!1),m(M),w&&v.play().catch(()=>{})},[u,x,c,m,g,t]),b.useEffect(()=>{if(!x||(g(!0),!i))return;let v=null,M=!0;const w=()=>{M&&(m(xp()),v=requestAnimationFrame(w))};return v=requestAnimationFrame(w),()=>{M=!1,v!=null&&cancelAnimationFrame(v)}},[x,m,g,i]);const E=b.useMemo(()=>({width:"100%",maxWidth:920,background:"black",aspectRatio:"16 / 9",display:"block"}),[]);return p.jsx("video",{ref:l,className:s,style:E,autoPlay:n,muted:r,playsInline:o,controls:!0})};Ts.displayName="VideoPlayerWebRTC";const Op=Je(p.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),Ip="_container_1vjy6_1",Mp="_segment_1vjy6_7",Ap="_selected_1vjy6_20",jp="_label_1vjy6_28",Rp="_icon_1vjy6_37",$p="_checkIcon_1vjy6_47",Pp="_unselected_1vjy6_53",Qe={container:Ip,segment:Mp,selected:Ap,label:jp,icon:Rp,checkIcon:$p,unselected:Pp},ks=({items:e,className:t,sx:n,...r})=>{const s=S.useTheme().palette.mode==="dark",a=(i,u)=>{i.onClick?i.onClick(u):console.log(`Item "${i.label}" clicado`)};return p.jsx(S.Box,{className:`${Qe.container} ${t||""}`,sx:n,"data-theme":s?"dark":"light",...r,children:e.map((i,u)=>p.jsxs(S.Box,{className:`${Qe.segment} ${i.selected?Qe.selected:Qe.unselected}`,onClick:d=>a(i,d),children:[i.selected&&p.jsx(S.Box,{className:Qe.icon,children:p.jsx(Op,{className:Qe.checkIcon})}),p.jsx(S.Box,{className:Qe.label,children:i.label})]},u))})};ks.displayName="DisplayTypes";exports.Button=rr;exports.CountCard=bu;exports.DisplayTypes=ks;exports.FilterButton=ho;exports.FilterChip=go;exports.FilterModal=qo;exports.GoogleMap=os;exports.MapContent=mr;exports.MapMarkers=ss;exports.MapSpot=hr;exports.ModuleMenu=us;exports.NotFoundContent=is;exports.SearchBar=as;exports.SidebarMenu=ls;exports.VideoPlayer=ds;exports.VideoPlayerWebRTC=Ts;exports.VideoTimeline=Cs;exports.VisioThemeProvider=zs;exports.ZoomControls=Tu;exports.currentTimeAtom=yr;exports.darkColors=de;exports.darkTheme=fo;exports.eventsAtom=_s;exports.isLiveAtom=vr;exports.lightColors=ue;exports.lightTheme=uo;exports.radiiTokens=qt;exports.selectedRangeAtom=br;exports.spacingScale=Ls;exports.spacingTokens=co;exports.typographyTokens=_e;exports.useGoogleMapContext=rs;exports.useVisioTheme=Fs;exports.videoSegmentsAtom=xs;exports.zoomAtom=bs;
|
|
90
|
+
`,this.renderedStyles.add("marker-pointer-events")}cleanup(){this.styleElement&&(this.styleElement.remove(),this.styleElement=null,this.renderedStyles.clear())}}const Qg=new Jg;function e0(e,t){var n;if(!(!((n=google==null?void 0:google.maps)===null||n===void 0)&&n.version))return;const r=google.maps.version.split("."),o=parseInt(r[0],10),s=parseInt(r[1],10);return o>e||o===e&&s>=t}const t0=x.createContext(null),n0={BOTTOM:["50%","100%"]},il=x.forwardRef((e,t)=>{const{children:n,style:r,className:o,anchorPoint:s}=e,[i,a]=o0(e),c=x.useMemo(()=>i?{marker:i}:null,[i]);return x.useImperativeHandle(t,()=>i,[i]),a?x.createElement(t0.Provider,{value:c},Cd.createPortal(x.createElement(r0,{anchorPoint:s,styles:r,className:o},n),a)):null});il.displayName="AdvancedMarker";function $o(e){return e.nodeType===Node.ELEMENT_NODE}const r0=({children:e,styles:t,className:n})=>x.createElement("div",{className:n,style:t},e);function o0(e){const[t,n]=x.useState(null),[r,o]=x.useState(null),s=Ur(),i=Xg("marker"),{children:a,onClick:c,className:u,onMouseEnter:l,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:m,collisionBehavior:h,clickable:v,draggable:b,position:S,title:y,zIndex:C,anchorPoint:T,anchorLeft:E,anchorTop:P}=e,A=x.Children.count(a);return x.useEffect(()=>{if(!s||!i)return;const M=new i.AdvancedMarkerElement;M.map=s,n(M);let L=null;return A>0&&(L=document.createElement("div"),M.content=L,o(L)),()=>{M.map=null,L==null||L.remove(),n(null),o(null)}},[s,i,A]),x.useEffect(()=>{!(t!=null&&t.content)||!$o(t.content)||A>0||(t.content.className=u??"")},[t,u,A]),s0(t,T,E,P,A>0),Xn(t,"position",S),Xn(t,"title",y??""),Xn(t,"zIndex",C),Xn(t,"collisionBehavior",h),x.useEffect(()=>{t&&(b!==void 0?t.gmpDraggable=b:f||p||m?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,b,f,m,p]),x.useEffect(()=>{if(!t)return;const M=v!==void 0||!!c||!!l||!!d;t.gmpClickable=M,M&&(t!=null&&t.content)&&$o(t.content)&&(t.content.style.pointerEvents="all",c&&(t.content.style.cursor="pointer"))},[t,v,c,l,d]),Zn(t,"click",c),Zn(t,"drag",f),Zn(t,"dragstart",p),Zn(t,"dragend",m),Gi(t==null?void 0:t.element,"mouseenter",l),Gi(t==null?void 0:t.element,"mouseleave",d),[t,r]}function s0(e,t,n,r,o){x.useEffect(()=>{if(!e||!o)return;const s=e0(3,62),i=e.content;if(!(!i||!$o(i))){if(n!==void 0||r!==void 0){s||console.warn(`AdvancedMarker: The anchorLeft and anchorTop props are only supported in Google Maps API version 3.62 and above. The current version is ${google.maps.version}.`),e.anchorLeft=n,e.anchorTop=r,t!==void 0&&console.warn("AdvancedMarker: the anchorPoint prop is ignored when anchorLeft and/or anchorTop are set.");return}if(t!==void 0){const[a,c]=t??n0.BOTTOM,u=`calc(-1 * ${a})`,l=`calc(-1 * ${c})`;s?(e.anchorLeft=u,e.anchorTop=l,i.style.transform=""):(i.style.transform=`translate(50%, 100%) translate(${u}, ${l})`,e.dataset.origin="rgm",Qg.addAdvancedMarkerPointerEventsOverwrite())}}},[e,t,n,r,o])}function i0(e){const[t,n]=x.useState(null),r=Ur(),{onClick:o,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:c,onMouseOut:u}=e,l=Yt(e,["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"]),{position:d,draggable:f}=l;return x.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const p=new google.maps.Marker(l);return p.setMap(r),n(p),()=>{p.setMap(null),n(null)}},[r]),x.useEffect(()=>{if(!t)return;const p=t,m=google.maps.event;return o&&m.addListener(p,"click",o),s&&m.addListener(p,"drag",s),i&&m.addListener(p,"dragstart",i),a&&m.addListener(p,"dragend",a),c&&m.addListener(p,"mouseover",c),u&&m.addListener(p,"mouseout",u),t.setDraggable(!!f),()=>{m.clearInstanceListeners(p)}},[t,f,o,s,i,a,c,u]),x.useEffect(()=>{t&&l&&t.setOptions(l)},[t,l]),x.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const a0=x.forwardRef((e,t)=>{const n=i0(e);return x.useImperativeHandle(t,()=>n,[n]),x.createElement(x.Fragment,null)});a0.displayName="Marker";const al=x.createContext(void 0),cl=()=>{const e=x.useContext(al);if(!e)throw new Error("useGoogleMapContext must be used within GoogleMap component");return e},Cs=({children:e})=>{const t=Ur(),n=(r,o=16)=>{t&&(t.setCenter(r),t.setZoom(o))};return t?g.jsx(al.Provider,{value:{isLoaded:!0,map:t,zoomToPosition:n},children:e}):null};Cs.displayName="MapContent";const c0="_googleMap_j4y4m_1",l0="_container_j4y4m_10",u0="_errorContainer_j4y4m_21",Jn={googleMap:c0,container:l0,errorContainer:u0},d0={lat:-26.3044,lng:-48.8487},f0=13,h0={disableDefaultUI:!0,zoomControl:!1,streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1,rotateControl:!1,scaleControl:!1,panControl:!1,clickableIcons:!1,keyboardShortcuts:!1},p0=({colorScheme:e,options:t,onLoad:n,children:r})=>{const o=Ur();return x.useEffect(()=>{o&&(o.setOptions(h0),t&&o.setOptions(t),n&&n(o))},[o,t,n]),g.jsx(g.Fragment,{children:r})},ll=({center:e=d0,zoom:t=f0,className:n,children:r,apiKey:o,mapId:s,themeMode:i="light",options:a,onLoad:c,onError:u})=>{if(!o||!s)return g.jsx("div",{className:`${Jn.container} ${Jn.errorContainer} ${n||""}`,children:g.jsxs("div",{children:[g.jsx("p",{children:"Google Maps não configurado"}),g.jsx("p",{style:{fontSize:"14px",marginTop:"8px",opacity:.7},children:"As props apiKey e mapId são obrigatórias"})]})});const l=i==="dark"?"DARK":"LIGHT",d={defaultCenter:e,defaultZoom:t,mapId:s,className:Jn.googleMap,colorScheme:l},f=`${s}-${l}`;return g.jsx(Mg,{apiKey:o,onLoad:()=>{console.log("Google Maps API carregada com sucesso")},onError:p=>{console.error("Erro ao carregar Google Maps API:",p),u&&p instanceof Error&&u(p)},children:g.jsx("div",{className:`${Jn.container} ${n||""}`,style:{width:"100%",height:"400px",minHeight:"400px",position:"relative"},children:g.jsx(sl,{...d,style:{width:"100%",height:"100%"},children:g.jsx(p0,{colorScheme:l,options:a,onLoad:c,children:g.jsx(Cs,{children:r})})},f)})})};ll.displayName="GoogleMap";const _s=x.createContext({});function Es(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const ul=typeof window<"u",dl=ul?x.useLayoutEffect:x.useEffect,Hr=x.createContext(null);function Ps(e,t){e.indexOf(t)===-1&&e.push(t)}function As(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const st=(e,t,n)=>n>t?t:n<e?e:n;function Vo(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Qt=()=>{},lt=()=>{};var hc;typeof process<"u"&&((hc=process.env)==null?void 0:hc.NODE_ENV)!=="production"&&(Qt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Vo(t,n))},lt=(e,t,n)=>{if(!e)throw new Error(Vo(t,n))});const ut={},fl=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function hl(e){return typeof e=="object"&&e!==null}const pl=e=>/^0[^.\s]+$/u.test(e);function Ms(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ge=e=>e,m0=(e,t)=>n=>t(e(n)),Bn=(...e)=>e.reduce(m0),Mn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ks{constructor(){this.subscriptions=[]}add(t){return Ps(this.subscriptions,t),()=>As(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const rt=e=>e*1e3,He=e=>e/1e3;function ml(e,t){return t?e*(1e3/t):0}const Ki=new Set;function Rs(e,t,n){e||Ki.has(t)||(console.warn(Vo(t,n)),Ki.add(t))}const gl=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,g0=1e-7,y0=12;function v0(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=gl(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>g0&&++a<y0);return i}function Fn(e,t,n,r){if(e===t&&n===r)return Ge;const o=s=>v0(s,0,1,e,n);return s=>s===0||s===1?s:gl(o(s),t,r)}const yl=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,vl=e=>t=>1-e(1-t),bl=Fn(.33,1.53,.69,.99),Os=vl(bl),xl=yl(Os),Sl=e=>(e*=2)<1?.5*Os(e):.5*(2-Math.pow(2,-10*(e-1))),Is=e=>1-Math.sin(Math.acos(e)),Tl=vl(Is),wl=yl(Is),b0=Fn(.42,0,1,1),x0=Fn(0,0,.58,1),Cl=Fn(.42,0,.58,1),S0=e=>Array.isArray(e)&&typeof e[0]!="number",_l=e=>Array.isArray(e)&&typeof e[0]=="number",Yi={linear:Ge,easeIn:b0,easeInOut:Cl,easeOut:x0,circIn:Is,circInOut:wl,circOut:Tl,backIn:Os,backInOut:xl,backOut:bl,anticipate:Sl},T0=e=>typeof e=="string",qi=e=>{if(_l(e)){lt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return Fn(t,n,r,o)}else if(T0(e))return lt(Yi[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Yi[e];return e},Qn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function w0(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(l){i.has(l)&&(u.schedule(l),e()),l(a)}const u={schedule:(l,d=!1,f=!1)=>{const m=f&&o?n:r;return d&&i.add(l),m.has(l)||m.add(l),l},cancel:l=>{r.delete(l),i.delete(l)},process:l=>{if(a=l,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,s&&(s=!1,u.process(l))}};return u}const C0=40;function El(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Qn.reduce((y,C)=>(y[C]=w0(s),y),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:l,update:d,preRender:f,render:p,postRender:m}=i,h=()=>{const y=ut.useManualTiming?o.timestamp:performance.now();n=!1,ut.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,C0),1)),o.timestamp=y,o.isProcessing=!0,a.process(o),c.process(o),u.process(o),l.process(o),d.process(o),f.process(o),p.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},v=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Qn.reduce((y,C)=>{const T=i[C];return y[C]=(E,P=!1,A=!1)=>(n||v(),T.schedule(E,P,A)),y},{}),cancel:y=>{for(let C=0;C<Qn.length;C++)i[Qn[C]].cancel(y)},state:o,steps:i}}const{schedule:le,cancel:vt,state:Me,steps:co}=El(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ge,!0);let ur;function _0(){ur=void 0}const Le={now:()=>(ur===void 0&&Le.set(Me.isProcessing||ut.useManualTiming?Me.timestamp:performance.now()),ur),set:e=>{ur=e,queueMicrotask(_0)}},Pl=e=>t=>typeof t=="string"&&t.startsWith(e),Al=Pl("--"),E0=Pl("var(--"),js=e=>E0(e)?P0.test(e.split("/*")[0].trim()):!1,P0=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zi(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const en={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kn={...en,transform:e=>st(0,1,e)},er={...en,default:1},Tn=e=>Math.round(e*1e5)/1e5,Ls=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function A0(e){return e==null}const M0=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ds=(e,t)=>n=>!!(typeof n=="string"&&M0.test(n)&&n.startsWith(e)||t&&!A0(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ml=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(Ls);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},k0=e=>st(0,255,e),lo={...en,transform:e=>Math.round(k0(e))},Mt={test:Ds("rgb","red"),parse:Ml("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+lo.transform(e)+", "+lo.transform(t)+", "+lo.transform(n)+", "+Tn(kn.transform(r))+")"};function R0(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const No={test:Ds("#"),parse:R0,transform:Mt.transform},zn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ht=zn("deg"),ot=zn("%"),B=zn("px"),O0=zn("vh"),I0=zn("vw"),Xi={...ot,parse:e=>ot.parse(e)/100,transform:e=>ot.transform(e*100)},Vt={test:Ds("hsl","hue"),parse:Ml("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ot.transform(Tn(t))+", "+ot.transform(Tn(n))+", "+Tn(kn.transform(r))+")"},Se={test:e=>Mt.test(e)||No.test(e)||Vt.test(e),parse:e=>Mt.test(e)?Mt.parse(e):Vt.test(e)?Vt.parse(e):No.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mt.transform(e):Vt.transform(e),getAnimatableNone:e=>{const t=Se.parse(e);return t.alpha=0,Se.transform(t)}},j0=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function L0(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ls))==null?void 0:t.length)||0)+(((n=e.match(j0))==null?void 0:n.length)||0)>0}const kl="number",Rl="color",D0="var",$0="var(",Ji="${}",V0=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(V0,c=>(Se.test(c)?(r.color.push(s),o.push(Rl),n.push(Se.parse(c))):c.startsWith($0)?(r.var.push(s),o.push(D0),n.push(c)):(r.number.push(s),o.push(kl),n.push(parseFloat(c))),++s,Ji)).split(Ji);return{values:n,split:a,indexes:r,types:o}}function Ol(e){return Rn(e).values}function Il(e){const{split:t,types:n}=Rn(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===kl?s+=Tn(o[i]):a===Rl?s+=Se.transform(o[i]):s+=o[i]}return s}}const N0=e=>typeof e=="number"?0:Se.test(e)?Se.getAnimatableNone(e):e;function B0(e){const t=Ol(e);return Il(e)(t.map(N0))}const bt={test:L0,parse:Ol,createTransformer:Il,getAnimatableNone:B0};function uo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function F0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;o=uo(c,a,e+1/3),s=uo(c,a,e),i=uo(c,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Sr(e,t){return n=>n>0?t:e}const fe=(e,t,n)=>e+(t-e)*n,fo=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},z0=[No,Mt,Vt],W0=e=>z0.find(t=>t.test(e));function Qi(e){const t=W0(e);if(Qt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Vt&&(n=F0(n)),n}const ea=(e,t)=>{const n=Qi(e),r=Qi(t);if(!n||!r)return Sr(e,t);const o={...n};return s=>(o.red=fo(n.red,r.red,s),o.green=fo(n.green,r.green,s),o.blue=fo(n.blue,r.blue,s),o.alpha=fe(n.alpha,r.alpha,s),Mt.transform(o))},Bo=new Set(["none","hidden"]);function U0(e,t){return Bo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function H0(e,t){return n=>fe(e,t,n)}function $s(e){return typeof e=="number"?H0:typeof e=="string"?js(e)?Sr:Se.test(e)?ea:Y0:Array.isArray(e)?jl:typeof e=="object"?Se.test(e)?ea:G0:Sr}function jl(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>$s(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function G0(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=$s(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function K0(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],i=e.indexes[s][r[s]],a=e.values[i]??0;n[o]=a,r[s]++}return n}const Y0=(e,t)=>{const n=bt.createTransformer(t),r=Rn(e),o=Rn(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Bo.has(e)&&!o.values.length||Bo.has(t)&&!r.values.length?U0(e,t):Bn(jl(K0(r,o),o.values),n):(Qt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Sr(e,t))};function Ll(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?fe(e,t,n):$s(e)(e,t)}const q0=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>le.update(t,n),stop:()=>vt(t),now:()=>Me.isProcessing?Me.timestamp:Le.now()}},Dl=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Tr=2e4;function Vs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Tr;)t+=n,r=e.next(t);return t>=Tr?1/0:t}function Z0(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Vs(r),Tr);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:He(o)}}const X0=5;function $l(e,t,n){const r=Math.max(t-X0,0);return ml(n-e(r),t-r)}const de={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ho=.001;function J0({duration:e=de.duration,bounce:t=de.bounce,velocity:n=de.velocity,mass:r=de.mass}){let o,s;Qt(e<=rt(de.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=st(de.minDamping,de.maxDamping,i),e=st(de.minDuration,de.maxDuration,He(e)),i<1?(o=u=>{const l=u*i,d=l*e,f=l-n,p=Fo(u,i),m=Math.exp(-d);return ho-f/p*m},s=u=>{const d=u*i*e,f=d*n+n,p=Math.pow(i,2)*Math.pow(u,2)*e,m=Math.exp(-d),h=Fo(Math.pow(u,2),i);return(-o(u)+ho>0?-1:1)*((f-p)*m)/h}):(o=u=>{const l=Math.exp(-u*e),d=(u-n)*e+1;return-ho+l*d},s=u=>{const l=Math.exp(-u*e),d=(n-u)*(e*e);return l*d});const a=5/e,c=ey(o,s,a);if(e=rt(e),isNaN(c))return{stiffness:de.stiffness,damping:de.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}const Q0=12;function ey(e,t,n){let r=n;for(let o=1;o<Q0;o++)r=r-e(r)/t(r);return r}function Fo(e,t){return e*Math.sqrt(1-t*t)}const ty=["duration","bounce"],ny=["stiffness","damping","mass"];function ta(e,t){return t.some(n=>e[n]!==void 0)}function ry(e){let t={velocity:de.velocity,stiffness:de.stiffness,damping:de.damping,mass:de.mass,isResolvedFromDuration:!1,...e};if(!ta(e,ny)&&ta(e,ty))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*st(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:de.mass,stiffness:o,damping:s}}else{const n=J0(e);t={...t,...n,mass:de.mass},t.isResolvedFromDuration=!0}return t}function wr(e=de.visualDuration,t=de.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:c,damping:u,mass:l,duration:d,velocity:f,isResolvedFromDuration:p}=ry({...n,velocity:-He(n.velocity||0)}),m=f||0,h=u/(2*Math.sqrt(c*l)),v=i-s,b=He(Math.sqrt(c/l)),S=Math.abs(v)<5;r||(r=S?de.restSpeed.granular:de.restSpeed.default),o||(o=S?de.restDelta.granular:de.restDelta.default);let y;if(h<1){const T=Fo(b,h);y=E=>{const P=Math.exp(-h*b*E);return i-P*((m+h*b*v)/T*Math.sin(T*E)+v*Math.cos(T*E))}}else if(h===1)y=T=>i-Math.exp(-b*T)*(v+(m+b*v)*T);else{const T=b*Math.sqrt(h*h-1);y=E=>{const P=Math.exp(-h*b*E),A=Math.min(T*E,300);return i-P*((m+h*b*v)*Math.sinh(A)+T*v*Math.cosh(A))/T}}const C={calculatedDuration:p&&d||null,next:T=>{const E=y(T);if(p)a.done=T>=d;else{let P=T===0?m:0;h<1&&(P=T===0?rt(m):$l(y,T,E));const A=Math.abs(P)<=r,M=Math.abs(i-E)<=o;a.done=A&&M}return a.value=a.done?i:E,a},toString:()=>{const T=Math.min(Vs(C),Tr),E=Dl(P=>C.next(T*P).value,T,30);return T+"ms "+E},toTransition:()=>{}};return C}wr.applyToOptions=e=>{const t=Z0(e,100,wr);return e.ease=t.ease,e.duration=rt(t.duration),e.type="keyframes",e};function zo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:c,restDelta:u=.5,restSpeed:l}){const d=e[0],f={done:!1,value:d},p=A=>a!==void 0&&A<a||c!==void 0&&A>c,m=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let h=n*t;const v=d+h,b=i===void 0?v:i(v);b!==v&&(h=b-d);const S=A=>-h*Math.exp(-A/r),y=A=>b+S(A),C=A=>{const M=S(A),L=y(A);f.done=Math.abs(M)<=u,f.value=f.done?b:L};let T,E;const P=A=>{p(f.value)&&(T=A,E=wr({keyframes:[f.value,m(f.value)],velocity:$l(y,A,f.value),damping:o,stiffness:s,restDelta:u,restSpeed:l}))};return P(0),{calculatedDuration:null,next:A=>{let M=!1;return!E&&T===void 0&&(M=!0,C(A),P(A)),T!==void 0&&A>=T?E.next(A-T):(!M&&C(A),f)}}}function oy(e,t,n){const r=[],o=n||ut.mix||Ll,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||Ge:t;a=Bn(c,a)}r.push(a)}return r}function sy(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(lt(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=oy(t,r,o),c=a.length,u=l=>{if(i&&l<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(l<e[d+1]);d++);const f=Mn(e[d],e[d+1],l);return a[d](f)};return n?l=>u(st(e[0],e[s-1],l)):u}function iy(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Mn(0,t,r);e.push(fe(n,1,o))}}function ay(e){const t=[0];return iy(t,e.length-1),t}function cy(e,t){return e.map(n=>n*t)}function ly(e,t){return e.map(()=>t||Cl).splice(0,e.length-1)}function Nt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=S0(r)?r.map(qi):qi(r),s={done:!1,value:t[0]},i=cy(n&&n.length===t.length?n:ay(t),e),a=sy(i,t,{ease:Array.isArray(o)?o:ly(t,o)});return{calculatedDuration:e,next:c=>(s.value=a(c),s.done=c>=e,s)}}const uy=e=>e!==null;function Ns(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(uy),a=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const dy={decay:zo,inertia:zo,tween:Nt,keyframes:Nt,spring:wr};function Vl(e){typeof e.type=="string"&&(e.type=dy[e.type])}class Bs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const fy=e=>e/100;class Fs extends Bs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==Le.now()&&this.tick(Le.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Vl(t);const{type:n=Nt,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=t;let{keyframes:a}=t;const c=n||Nt;process.env.NODE_ENV!=="production"&&c!==Nt&<(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Nt&&typeof a[0]!="number"&&(this.mixKeyframes=Bn(fy,Ll(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Vs(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:l,repeat:d,repeatType:f,repeatDelay:p,type:m,onUpdate:h,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?b<0:b>o;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let y=this.currentTime,C=r;if(d){const A=Math.min(this.currentTime,o)/a;let M=Math.floor(A),L=A%1;!L&&A>=1&&(L=1),L===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(f==="reverse"?(L=1-L,p&&(L-=p/a)):f==="mirror"&&(C=i)),y=st(0,1,L)*a}const T=S?{done:!1,value:l[0]}:C.next(y);s&&(T.value=s(T.value));let{done:E}=T;!S&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return P&&m!==zo&&(T.value=Ns(l,this.options,v,this.speed)),h&&h(T.value),P&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return He(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+He(t)}get time(){return He(this.currentTime)}set time(t){var n;t=rt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Le.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=He(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=q0,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function hy(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const kt=e=>e*180/Math.PI,Wo=e=>{const t=kt(Math.atan2(e[1],e[0]));return Uo(t)},py={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Wo,rotateZ:Wo,skewX:e=>kt(Math.atan(e[1])),skewY:e=>kt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Uo=e=>(e=e%360,e<0&&(e+=360),e),na=Wo,ra=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),oa=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),my={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ra,scaleY:oa,scale:e=>(ra(e)+oa(e))/2,rotateX:e=>Uo(kt(Math.atan2(e[6],e[5]))),rotateY:e=>Uo(kt(Math.atan2(-e[2],e[0]))),rotateZ:na,rotate:na,skewX:e=>kt(Math.atan(e[4])),skewY:e=>kt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ho(e){return e.includes("scale")?1:0}function Go(e,t){if(!e||e==="none")return Ho(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=my,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=py,o=a}if(!o)return Ho(t);const s=r[t],i=o[1].split(",").map(yy);return typeof s=="function"?s(i):i[s]}const gy=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Go(n,t)};function yy(e){return parseFloat(e.trim())}const tn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],nn=new Set(tn),sa=e=>e===en||e===B,vy=new Set(["x","y","z"]),by=tn.filter(e=>!vy.has(e));function xy(e){const t=[];return by.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const gt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Go(t,"x"),y:(e,{transform:t})=>Go(t,"y")};gt.translateX=gt.x;gt.translateY=gt.y;const Rt=new Set;let Ko=!1,Yo=!1,qo=!1;function Nl(){if(Yo){const e=Array.from(Rt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=xy(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))==null||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yo=!1,Ko=!1,Rt.forEach(e=>e.complete(qo)),Rt.clear()}function Bl(){Rt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yo=!0)})}function Sy(){qo=!0,Bl(),Nl(),qo=!1}class zs{constructor(t,n,r,o,s,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Rt.add(this),Ko||(Ko=!0,le.read(Bl),le.resolveKeyframes(Nl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}hy(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Rt.delete(this)}cancel(){this.state==="scheduled"&&(Rt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ty=e=>e.startsWith("--");function wy(e,t,n){Ty(t)?e.style.setProperty(t,n):e.style[t]=n}const Cy=Ms(()=>window.ScrollTimeline!==void 0),_y={};function Ey(e,t){const n=Ms(e);return()=>_y[t]??n()}const Fl=Ey(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ia={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gn([0,.65,.55,1]),circOut:gn([.55,0,1,.45]),backIn:gn([.31,.01,.66,-.59]),backOut:gn([.33,1.53,.69,.99])};function zl(e,t){if(e)return typeof e=="function"?Fl()?Dl(e,t):"ease-out":_l(e)?gn(e):Array.isArray(e)?e.map(n=>zl(n,t)||ia.easeOut):ia[e]}function Py(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeOut",times:c}={},u=void 0){const l={[t]:n};c&&(l.offset=c);const d=zl(a,o);Array.isArray(d)&&(l.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(l,f)}function Wl(e){return typeof e=="function"&&"applyToOptions"in e}function Ay({type:e,...t}){return Wl(e)&&Fl()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class My extends Bs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=i,this.options=t,lt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ay(t);this.animation=Py(n,r,o,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const l=Ns(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(l):wy(n,r,l),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return He(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+He(t)}get time(){return He(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=rt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Cy()?(this.animation.timeline=t,Ge):n(this)}}const Ul={anticipate:Sl,backInOut:xl,circInOut:wl};function ky(e){return e in Ul}function Ry(e){typeof e.ease=="string"&&ky(e.ease)&&(e.ease=Ul[e.ease])}const po=10;class Oy extends My{constructor(t){Ry(t),Vl(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Fs({...i,autoplay:!1}),c=Math.max(po,Le.now()-this.startTime),u=st(0,po,c-po);n.setWithVelocity(a.sample(Math.max(0,c-u)).value,a.sample(c).value,u),a.stop()}}const aa=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(bt.test(e)||e==="0")&&!e.startsWith("url("));function Iy(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function jy(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=aa(o,t),a=aa(s,t);return Qt(i===a,`You are trying to animate ${t} from "${o}" to "${s}". "${i?s:o}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:Iy(e)||(n==="spring"||Wl(n))&&r}function Zo(e){e.duration=0,e.type="keyframes"}const Ly=new Set(["opacity","clipPath","filter","transform"]),Dy=Ms(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function $y(e){var l;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:i}=e;if(!(((l=t==null?void 0:t.owner)==null?void 0:l.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return Dy()&&n&&Ly.has(n)&&(n!=="transform"||!u)&&!c&&!r&&o!=="mirror"&&s!==0&&i!=="inertia"}const Vy=40;class Ny extends Bs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",keyframes:a,name:c,motionValue:u,element:l,...d}){var m;super(),this.stop=()=>{var h,v;this._animation&&(this._animation.stop(),(h=this.stopTimeline)==null||h.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Le.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,name:c,motionValue:u,element:l,...d},p=(l==null?void 0:l.KeyframeResolver)||zs;this.keyframeResolver=new p(a,(h,v,b)=>this.onKeyframesResolved(h,v,f,!b),c,u,l),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,o){var v,b;this.keyframeResolver=void 0;const{name:s,type:i,velocity:a,delay:c,isHandoff:u,onUpdate:l}=r;this.resolvedAt=Le.now(),jy(t,s,i,a)||((ut.instantAnimations||!c)&&(l==null||l(Ns(t,r,n))),t[0]=t[t.length-1],Zo(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Vy?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!u&&$y(f),m=(b=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:b.current,h=p?new Oy({...f,element:m}):new Fs(f);h.finished.then(()=>{this.notifyFinished()}).catch(Ge),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Sy()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Hl(e,t,n,r=0,o=1){const s=Array.from(e).sort((u,l)=>u.sortNodePosition(l)).indexOf(t),i=e.size,a=(i-1)*r;return typeof n=="function"?n(s,i):o===1?s*r:a-s*r}const By=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fy(e){const t=By.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const zy=4;function Gl(e,t,n=1){lt(n<=zy,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=Fy(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return fl(i)?parseFloat(i):i}return js(o)?Gl(o,t,n+1):o}const Wy={type:"spring",stiffness:500,damping:25,restSpeed:10},Uy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Hy={type:"keyframes",duration:.8},Gy={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ky=(e,{keyframes:t})=>t.length>2?Hy:nn.has(e)?e.startsWith("scale")?Uy(t[1]):Wy:Gy,Yy=e=>e!==null;function qy(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Yy),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}function Ws(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function Zy({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:c,elapsed:u,...l}){return!!Object.keys(l).length}const Us=(e,t,n,r={},o,s)=>i=>{const a=Ws(r,e)||{},c=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-rt(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};Zy(a)||Object.assign(l,Ky(e,l)),l.duration&&(l.duration=rt(l.duration)),l.repeatDelay&&(l.repeatDelay=rt(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let d=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Zo(l),l.delay===0&&(d=!0)),(ut.instantAnimations||ut.skipAnimations)&&(d=!0,Zo(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=qy(l.keyframes,a);if(f!==void 0){le.update(()=>{l.onUpdate(f),l.onComplete()});return}}return a.isSync?new Fs(l):new Ny(l)};function ca(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Hs(e,t,n,r){if(typeof t=="function"){const[o,s]=ca(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ca(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Gt(e,t,n){const r=e.getProps();return Hs(r,t,n!==void 0?n:r.custom,e)}const Kl=new Set(["width","height","top","left","right","bottom",...tn]),la=30,Xy=e=>!isNaN(parseFloat(e));class Jy{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const o=Le.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Xy(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Rs(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ks);const r=this.events[t].add(n);return t==="change"?()=>{r(),le.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>la)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,la);return ml(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qt(e,t){return new Jy(e,t)}const Xo=e=>Array.isArray(e);function Qy(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qt(n))}function ev(e){return Xo(e)?e[e.length-1]||0:e}function tv(e,t){const n=Gt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=ev(s[i]);Qy(e,i,a)}}const Oe=e=>!!(e&&e.getVelocity);function nv(e){return!!(Oe(e)&&e.add)}function Jo(e,t){const n=e.getValue("willChange");if(nv(n))return n.add(t);if(!n&&ut.WillChange){const r=new ut.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Gs(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const rv="framerAppearId",Yl="data-"+Gs(rv);function ql(e){return e.props[Yl]}function ov({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Zl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:i,...a}=t;const c=s==null?void 0:s.reduceMotion;r&&(s=r);const u=[],l=o&&e.animationState&&e.animationState.getState()[o];for(const d in a){const f=e.getValue(d,e.latestValues[d]??null),p=a[d];if(p===void 0||l&&ov(l,d))continue;const m={delay:n,...Ws(s||{},d)},h=f.get();if(h!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===h&&!m.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const y=ql(e);if(y){const C=window.MotionHandoffAnimation(y,d,le);C!==null&&(m.startTime=C,v=!0)}}Jo(e,d);const b=c??e.shouldReduceMotion;f.start(Us(d,f,p,b&&Kl.has(d)?{type:!1}:m,e,v));const S=f.animation;S&&u.push(S)}return i&&Promise.all(u).then(()=>{le.update(()=>{i&&tv(e,i)})}),u}function Qo(e,t,n={}){var c;const r=Gt(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(Zl(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=o;return sv(e,t,u,l,d,f,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[u,l]=a==="beforeChildren"?[s,i]:[i,s];return u().then(()=>l())}else return Promise.all([s(),i(n.delay)])}function sv(e,t,n=0,r=0,o=0,s=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Qo(c,t,{...i,delay:n+(typeof r=="function"?0:r)+Hl(e.variantChildren,c,r,o,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function iv(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Qo(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Qo(e,t,n);else{const o=typeof t=="function"?Gt(e,t,n.custom):t;r=Promise.all(Zl(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const av={test:e=>e==="auto",parse:e=>e},Xl=e=>t=>t.test(e),Jl=[en,B,ot,ht,I0,O0,av],ua=e=>Jl.find(Xl(e));function cv(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||pl(e):!0}const lv=new Set(["brightness","contrast","saturate","opacity"]);function uv(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ls)||[];if(!r)return e;const o=n.replace(r,"");let s=lv.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const dv=/\b([a-z-]*)\(.*?\)/gu,es={...bt,getAnimatableNone:e=>{const t=e.match(dv);return t?t.map(uv).join(" "):e}},da={...en,transform:Math.round},fv={rotate:ht,rotateX:ht,rotateY:ht,rotateZ:ht,scale:er,scaleX:er,scaleY:er,scaleZ:er,skew:ht,skewX:ht,skewY:ht,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:kn,originX:Xi,originY:Xi,originZ:B},Ks={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...fv,zIndex:da,fillOpacity:kn,strokeOpacity:kn,numOctaves:da},hv={...Ks,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:es,WebkitFilter:es},Ql=e=>hv[e];function eu(e,t){let n=Ql(e);return n!==es&&(n=bt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pv=new Set(["auto","none","0"]);function mv(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!pv.has(s)&&Rn(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=eu(n,o)}class gv extends zs{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let d=t[l];if(typeof d=="string"&&(d=d.trim(),js(d))){const f=Gl(d,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Kl.has(r)||t.length!==2)return;const[o,s]=t,i=ua(o),a=ua(s),c=Zi(o),u=Zi(s);if(c!==u&>[r]){this.needsMeasurement=!0;return}if(i!==a)if(sa(i)&&sa(a))for(let l=0;l<t.length;l++){const d=t[l];typeof d=="string"&&(t[l]=parseFloat(d))}else gt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||cv(t[o]))&&r.push(o);r.length&&mv(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,i=r[s];r[s]=gt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function yv(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const tu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ts(e){return hl(e)&&"offsetHeight"in e}const{schedule:Ys}=El(queueMicrotask,!1),Ze={x:!1,y:!1};function nu(){return Ze.x||Ze.y}function vv(e){return e==="x"||e==="y"?Ze[e]?null:(Ze[e]=!0,()=>{Ze[e]=!1}):Ze.x||Ze.y?null:(Ze.x=Ze.y=!0,()=>{Ze.x=Ze.y=!1})}function ru(e,t){const n=yv(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function fa(e){return!(e.pointerType==="touch"||nu())}function bv(e,t,n={}){const[r,o,s]=ru(e,n),i=a=>{if(!fa(a))return;const{target:c}=a,u=t(c,a);if(typeof u!="function"||!c)return;const l=d=>{fa(d)&&(u(d),c.removeEventListener("pointerleave",l))};c.addEventListener("pointerleave",l,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}const ou=(e,t)=>t?e===t?!0:ou(e,t.parentElement):!1,qs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,xv=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function su(e){return xv.has(e.tagName)||e.isContentEditable===!0}const dr=new WeakSet;function ha(e){return t=>{t.key==="Enter"&&e(t)}}function mo(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Sv=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ha(()=>{if(dr.has(n))return;mo(n,"down");const o=ha(()=>{mo(n,"up")}),s=()=>mo(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function pa(e){return qs(e)&&!nu()}function Tv(e,t,n={}){const[r,o,s]=ru(e,n),i=a=>{const c=a.currentTarget;if(!pa(a))return;dr.add(c);const u=t(c,a),l=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),dr.has(c)&&dr.delete(c),pa(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{l(p,c===window||c===document||n.useGlobalTarget||ou(c,p.target))},f=p=>{l(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,o),ts(a)&&(a.addEventListener("focus",u=>Sv(u,o)),!su(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function iu(e){return hl(e)&&"ownerSVGElement"in e}function wv(e){return iu(e)&&e.tagName==="svg"}const Cv=[...Jl,Se,bt],_v=e=>Cv.find(Xl(e)),ma=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bt=()=>({x:ma(),y:ma()}),ga=()=>({min:0,max:0}),Ce=()=>({x:ga(),y:ga()}),ns={current:null},au={current:!1},Ev=typeof window<"u";function Pv(){if(au.current=!0,!!Ev)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ns.current=e.matches;e.addEventListener("change",t),t()}else ns.current=!1}const Av=new WeakMap;function Gr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function On(e){return typeof e=="string"||Array.isArray(e)}const Zs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xs=["initial",...Zs];function Kr(e){return Gr(e.animate)||Xs.some(t=>On(e[t]))}function cu(e){return!!(Kr(e)||e.variants)}function Mv(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Oe(o))e.addValue(r,o);else if(Oe(s))e.addValue(r,qt(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,qt(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ya=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Cr={};function lu(e){Cr=e}function kv(){return Cr}class Rv{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=zs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Le.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,le.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=i;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Kr(n),this.isVariantNode=cu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];c[f]!==void 0&&Oe(p)&&p.set(c[f])}}mount(t){var n;this.current=t,Av.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(au.current||Pv(),this.shouldReduceMotion=ns.current),process.env.NODE_ENV!=="production"&&Rs(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),vt(this.notifyUpdate),vt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=nn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Cr){const n=Cr[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ce()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ya.length;r++){const o=ya[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=Mv(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=qt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(fl(r)||pl(r))?r=parseFloat(r):!_v(r)&&bt.test(n)&&(r=eu(t,n)),this.setBaseTarget(t,Oe(r)?r.get():r)),Oe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Hs(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Oe(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ks),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ys.render(this.render)}}class uu extends Rv{constructor(){super(...arguments),this.KeyframeResolver=gv}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Oe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class wt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function du({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ov({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Iv(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function go(e){return e===void 0||e===1}function rs({scale:e,scaleX:t,scaleY:n}){return!go(e)||!go(t)||!go(n)}function At(e){return rs(e)||fu(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fu(e){return va(e.x)||va(e.y)}function va(e){return e&&e!=="0%"}function _r(e,t,n){const r=e-n,o=t*r;return n+o}function ba(e,t,n,r,o){return o!==void 0&&(e=_r(e,o,r)),_r(e,n,r)+t}function os(e,t=0,n=1,r,o){e.min=ba(e.min,t,n,r,o),e.max=ba(e.max,t,n,r,o)}function hu(e,{x:t,y:n}){os(e.x,t.translate,t.scale,t.originPoint),os(e.y,n.translate,n.scale,n.originPoint)}const xa=.999999999999,Sa=1.0000000000001;function jv(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&zt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,hu(e,i)),r&&At(s.latestValues)&&zt(e,s.latestValues))}t.x<Sa&&t.x>xa&&(t.x=1),t.y<Sa&&t.y>xa&&(t.y=1)}function Ft(e,t){e.min=e.min+t,e.max=e.max+t}function Ta(e,t,n,r,o=.5){const s=fe(e.min,e.max,o);os(e,t,n,s,r)}function zt(e,t){Ta(e.x,t.x,t.scaleX,t.scale,t.originX),Ta(e.y,t.y,t.scaleY,t.scale,t.originY)}function pu(e,t){return du(Iv(e.getBoundingClientRect(),t))}function Lv(e,t,n){const r=pu(e,n),{scroll:o}=t;return o&&(Ft(r.x,o.offset.x),Ft(r.y,o.offset.y)),r}const Dv={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$v=tn.length;function Vv(e,t,n){let r="",o=!0;for(let s=0;s<$v;s++){const i=tn[s],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(i.startsWith("scale")?1:0);else{const u=parseFloat(a);c=i.startsWith("scale")?u===1:u===0}if(!c||n){const u=tu(a,Ks[i]);if(!c){o=!1;const l=Dv[i]||i;r+=`${l}(${u}) `}n&&(t[i]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Js(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const c in t){const u=t[c];if(nn.has(c)){i=!0;continue}else if(Al(c)){o[c]=u;continue}else{const l=tu(u,Ks[c]);c.startsWith("origin")?(a=!0,s[c]=l):r[c]=l}}if(t.transform||(i||n?r.transform=Vv(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:l=0}=s;r.transformOrigin=`${c} ${u} ${l}`}}function mu(e,{style:t,vars:n},r,o){const s=e.style;let i;for(i in t)s[i]=t[i];o==null||o.applyProjectionStyles(s,r);for(i in n)s.setProperty(i,n[i])}function wa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const hn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=wa(e,t.target.x),r=wa(e,t.target.y);return`${n}% ${r}%`}},Nv={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=bt.parse(e);if(o.length>5)return r;const s=bt.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=c;const u=fe(a,c,.5);return typeof o[2+i]=="number"&&(o[2+i]/=u),typeof o[3+i]=="number"&&(o[3+i]/=u),s(o)}},ss={borderRadius:{...hn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:hn,borderTopRightRadius:hn,borderBottomLeftRadius:hn,borderBottomRightRadius:hn,boxShadow:Nv};function gu(e,{layout:t,layoutId:n}){return nn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ss[e]||e==="opacity")}function Qs(e,t,n){var i;const r=e.style,o=t==null?void 0:t.style,s={};if(!r)return s;for(const a in r)(Oe(r[a])||o&&Oe(o[a])||gu(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function Bv(e){return window.getComputedStyle(e)}class Fv extends uu{constructor(){super(...arguments),this.type="html",this.renderInstance=mu}readValueFromInstance(t,n){var r;if(nn.has(n))return(r=this.projection)!=null&&r.isProjecting?Ho(n):gy(t,n);{const o=Bv(t),s=(Al(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return pu(t,n)}build(t,n,r){Js(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Qs(t,n,r)}}const zv={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wv={offset:"strokeDashoffset",array:"strokeDasharray"};function Uv(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?zv:Wv;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const Hv=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function yu(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:i=0,...a},c,u,l){if(Js(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(l==null?void 0:l.transformBox)??"fill-box",delete d.transformBox);for(const p of Hv)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&Uv(d,o,s,i,!1)}const vu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),bu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gv(e,t,n,r){mu(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(vu.has(o)?o:Gs(o),t.attrs[o])}function xu(e,t,n){const r=Qs(e,t,n);for(const o in e)if(Oe(e[o])||Oe(t[o])){const s=tn.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}class Kv extends uu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(nn.has(n)){const r=Ql(n);return r&&r.default||0}return n=vu.has(n)?n:Gs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return xu(t,n,r)}build(t,n,r){yu(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){Gv(t,n,r,o)}mount(t){this.isSVGTag=bu(t.tagName),super.mount(t)}}const Yv=Xs.length;function Su(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Su(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Yv;n++){const r=Xs[n],o=e.props[r];(On(o)||o===!1)&&(t[r]=o)}return t}function Tu(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const qv=[...Zs].reverse(),Zv=Zs.length;function Xv(e){return t=>Promise.all(t.map(({animation:n,options:r})=>iv(e,n,r)))}function Jv(e){let t=Xv(e),n=Ca(),r=!0;const o=c=>(u,l)=>{var f;const d=Gt(e,l,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:p,transitionEnd:m,...h}=d;u={...u,...h,...m}}return u};function s(c){t=c(e)}function i(c){const{props:u}=e,l=Su(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let v=0;v<Zv;v++){const b=qv[v],S=n[b],y=u[b]!==void 0?u[b]:l[b],C=On(y),T=b===c?S.isActive:null;T===!1&&(m=v);let E=y===l[b]&&y!==u[b]&&C;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),S.protectedKeys={...p},!S.isActive&&T===null||!y&&!S.prevProp||Gr(y)||typeof y=="boolean")continue;const P=Qv(S.prevProp,y);let A=P||b===c&&S.isActive&&!E&&C||v>m&&C,M=!1;const L=Array.isArray(y)?y:[y];let $=L.reduce(o(b),{});T===!1&&($={});const{prevResolvedValues:W={}}=S,H={...W,...$},q=U=>{A=!0,f.has(U)&&(M=!0,f.delete(U)),S.needsAnimating[U]=!0;const I=e.getValue(U);I&&(I.liveStyle=!1)};for(const U in H){const I=$[U],X=W[U];if(p.hasOwnProperty(U))continue;let R=!1;Xo(I)&&Xo(X)?R=!Tu(I,X):R=I!==X,R?I!=null?q(U):f.add(U):I!==void 0&&f.has(U)?q(U):S.protectedKeys[U]=!0}S.prevProp=y,S.prevResolvedValues=$,S.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(A=!1);const oe=E&&P;A&&(!oe||M)&&d.push(...L.map(U=>{const I={type:b};if(typeof U=="string"&&r&&!oe&&e.manuallyAnimateOnMount&&e.parent){const{parent:X}=e,R=Gt(X,U);if(X.enteringChildren&&R){const{delayChildren:w}=R.transition||{};I.delay=Hl(X.enteringChildren,e,w)}}return{animation:U,options:I}}))}if(f.size){const v={};if(typeof u.initial!="boolean"){const b=Gt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const S=e.getBaseTarget(b),y=e.getValue(b);y&&(y.liveStyle=!0),v[b]=S??null}),d.push({animation:v})}let h=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(h=!1),r=!1,h?t(d):Promise.resolve()}function a(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(c,u)}),n[c].isActive=u;const l=i(c);for(const f in n)n[f].protectedKeys={};return l}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Ca()}}}function Qv(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Tu(t,e):!1}function Ct(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ca(){return{animate:Ct(!0),whileInView:Ct(),whileHover:Ct(),whileTap:Ct(),whileDrag:Ct(),whileFocus:Ct(),exit:Ct()}}function _a(e,t){e.min=t.min,e.max=t.max}function qe(e,t){_a(e.x,t.x),_a(e.y,t.y)}function Ea(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const wu=1e-4,e1=1-wu,t1=1+wu,Cu=.01,n1=0-Cu,r1=0+Cu;function De(e){return e.max-e.min}function o1(e,t,n){return Math.abs(e-t)<=n}function Pa(e,t,n,r=.5){e.origin=r,e.originPoint=fe(t.min,t.max,e.origin),e.scale=De(n)/De(t),e.translate=fe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=e1&&e.scale<=t1||isNaN(e.scale))&&(e.scale=1),(e.translate>=n1&&e.translate<=r1||isNaN(e.translate))&&(e.translate=0)}function wn(e,t,n,r){Pa(e.x,t.x,n.x,r?r.originX:void 0),Pa(e.y,t.y,n.y,r?r.originY:void 0)}function Aa(e,t,n){e.min=n.min+t.min,e.max=e.min+De(t)}function s1(e,t,n){Aa(e.x,t.x,n.x),Aa(e.y,t.y,n.y)}function Ma(e,t,n){e.min=t.min-n.min,e.max=e.min+De(t)}function Er(e,t,n){Ma(e.x,t.x,n.x),Ma(e.y,t.y,n.y)}function ka(e,t,n,r,o){return e-=t,e=_r(e,1/n,r),o!==void 0&&(e=_r(e,1/o,r)),e}function i1(e,t=0,n=1,r=.5,o,s=e,i=e){if(ot.test(t)&&(t=parseFloat(t),t=fe(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=fe(s.min,s.max,r);e===s&&(a-=t),e.min=ka(e.min,t,n,a,o),e.max=ka(e.max,t,n,a,o)}function Ra(e,t,[n,r,o],s,i){i1(e,t[n],t[r],t[o],t.scale,s,i)}const a1=["x","scaleX","originX"],c1=["y","scaleY","originY"];function Oa(e,t,n,r){Ra(e.x,t,a1,n?n.x:void 0,r?r.x:void 0),Ra(e.y,t,c1,n?n.y:void 0,r?r.y:void 0)}function Ia(e){return e.translate===0&&e.scale===1}function _u(e){return Ia(e.x)&&Ia(e.y)}function ja(e,t){return e.min===t.min&&e.max===t.max}function l1(e,t){return ja(e.x,t.x)&&ja(e.y,t.y)}function La(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Eu(e,t){return La(e.x,t.x)&&La(e.y,t.y)}function Da(e){return De(e.x)/De(e.y)}function $a(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ze(e){return[e("x"),e("y")]}function u1(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:l,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),l&&(r+=`rotate(${l}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const Pu=["TopLeft","TopRight","BottomLeft","BottomRight"],d1=Pu.length,Va=e=>typeof e=="string"?parseFloat(e):e,Na=e=>typeof e=="number"||B.test(e);function f1(e,t,n,r,o,s){o?(e.opacity=fe(0,n.opacity??1,h1(r)),e.opacityExit=fe(t.opacity??1,0,p1(r))):s&&(e.opacity=fe(t.opacity??1,n.opacity??1,r));for(let i=0;i<d1;i++){const a=`border${Pu[i]}Radius`;let c=Ba(t,a),u=Ba(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Na(c)===Na(u)?(e[a]=Math.max(fe(Va(c),Va(u),r),0),(ot.test(u)||ot.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=fe(t.rotate||0,n.rotate||0,r))}function Ba(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const h1=Au(0,.5,Tl),p1=Au(.5,.95,Ge);function Au(e,t,n){return r=>r<e?0:r>t?1:n(Mn(e,t,r))}function m1(e,t,n){const r=Oe(e)?e:qt(e);return r.start(Us("",r,t,n)),r.animation}function In(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const g1=(e,t)=>e.depth-t.depth;class y1{constructor(){this.children=[],this.isDirty=!1}add(t){Ps(this.children,t),this.isDirty=!0}remove(t){As(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(g1),this.isDirty=!1,this.children.forEach(t)}}function v1(e,t){const n=Le.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(vt(r),e(s-t))};return le.setup(r,!0),()=>vt(r)}function fr(e){return Oe(e)?e.get():e}class b1{constructor(){this.members=[]}add(t){Ps(this.members,t),t.scheduleRender()}remove(t){if(As(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,s=t.options.layoutDependency;o!==void 0&&s!==void 0&&o===s||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const hr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},yo=["","X","Y","Z"],x1=1e3;let S1=0;function vo(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Mu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ql(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",le,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Mu(r)}function ku({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=S1++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(C1),this.nodes.forEach(A1),this.nodes.forEach(M1),this.nodes.forEach(_1)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new y1)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new ks),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const c=this.eventHandlers.get(i);c&&c.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=iu(i)&&!wv(i),this.instance=i;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let l,d=0;const f=()=>this.root.updateBlockedByResize=!1;le.read(()=>{d=window.innerWidth}),e(i,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,l&&l(),l=v1(f,250),hr.hasAnimatedSinceResize&&(hr.hasAnimatedSinceResize=!1,this.nodes.forEach(Wa)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||j1,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Eu(this.targetLayout,p),S=!d&&f;if(this.options.layoutRoot||this.resumeFrom||S||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Ws(m,"layout"),onPlay:h,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(l,S)}else d||Wa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),vt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(k1),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Mu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const d=this.path[l];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Fa);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(za);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(P1),this.nodes.forEach(T1),this.nodes.forEach(w1)):this.nodes.forEach(za),this.clearAllSnapshots();const a=Le.now();Me.delta=st(0,1e3/60,a-Me.timestamp),Me.timestamp=a,Me.isProcessing=!0,co.update.process(Me),co.preRender.process(Me),co.render.process(Me),Me.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ys.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(E1),this.sharedNodes.forEach(R1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!De(this.snapshot.measuredBox.x)&&!De(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ce(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!_u(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,l=u!==this.prevTransformTemplateValue;i&&this.instance&&(a||At(this.latestValues)||l)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return i&&(c=this.removeTransform(c)),L1(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:i}=this.options;if(!i)return Ce();const a=i.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(D1))){const{scroll:l}=this.root;l&&(Ft(a.x,l.offset.x),Ft(a.y,l.offset.y))}return a}removeElementScroll(i){var c;const a=Ce();if(qe(a,i),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){const l=this.path[u],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&qe(a,i),Ft(a.x,d.offset.x),Ft(a.y,d.offset.y))}return a}applyTransform(i,a=!1){const c=Ce();qe(c,i);for(let u=0;u<this.path.length;u++){const l=this.path[u];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&zt(c,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),At(l.latestValues)&&zt(c,l.latestValues)}return At(this.latestValues)&&zt(c,this.latestValues),c}removeTransform(i){const a=Ce();qe(a,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!At(u.latestValues))continue;rs(u.latestValues)&&u.updateSnapshot();const l=Ce(),d=u.measurePageBox();qe(l,d),Oa(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,l)}return At(this.latestValues)&&Oa(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Me.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var p;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:d}=this.options;if(!this.layout||!(l||d))return;this.resolvedRelativeTargetAt=Me.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ce(),this.targetWithTransforms=Ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s1(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qe(this.target,this.layout.layoutBox),hu(this.target,this.targetDelta)):qe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||rs(this.parent.latestValues)||fu(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,c){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),Er(this.relativeTargetOrigin,a,c),qe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Me.timestamp&&(c=!1),c)return;const{layout:u,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||l))return;qe(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;jv(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Ce());const{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ea(this.prevProjectionDelta.x,this.projectionDelta.x),Ea(this.prevProjectionDelta.y,this.projectionDelta.y)),wn(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!$a(this.projectionDelta.x,this.prevProjectionDelta.x)||!$a(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bt(),this.projectionDelta=Bt(),this.projectionDeltaWithTransform=Bt()}setAnimationOrigin(i,a=!1){const c=this.snapshot,u=c?c.latestValues:{},l={...this.latestValues},d=Bt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ce(),p=c?c.source:void 0,m=this.layout?this.layout.source:void 0,h=p!==m,v=this.getStack(),b=!v||v.members.length<=1,S=!!(h&&!b&&this.options.crossfade===!0&&!this.path.some(I1));this.animationProgress=0;let y;this.mixTargetDelta=C=>{const T=C/1e3;Ua(d.x,i.x,T),Ua(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Er(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),O1(this.relativeTarget,this.relativeTargetOrigin,f,T),y&&l1(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Ce()),qe(y,this.relativeTarget)),h&&(this.animationValues=l,f1(l,u,this.latestValues,T,S,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(vt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(()=>{hr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qt(0)),this.currentAnimation=m1(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),i.onUpdate&&i.onUpdate(l)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(x1),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=i;if(!(!a||!c||!u)){if(this!==i&&this.layout&&u&&Ru(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ce();const d=De(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+d;const f=De(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+f}qe(a,c),zt(a,l),wn(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new b1),this.sharedNodes.get(i).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&vo("z",i,u,this.animationValues);for(let l=0;l<yo.length;l++)vo(`rotate${yo[l]}`,i,u,this.animationValues),vo(`skew${yo[l]}`,i,u,this.animationValues);i.render();for(const l in u)i.setStaticValue(l,u[l]),this.animationValues&&(this.animationValues[l]=u[l]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=fr(a==null?void 0:a.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=fr(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!At(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const l=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=u1(this.projectionDeltaWithTransform,this.treeScale,l);c&&(d=c(l,d)),i.transform=d;const{x:f,y:p}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?i.opacity=u===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:i.opacity=u===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const m in ss){if(l[m]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:b}=ss[m],S=d==="none"?l[m]:h(l[m],u);if(v){const y=v.length;for(let C=0;C<y;C++)i[v[C]]=S}else b?this.options.visualElement.renderState.vars[m]=S:i[m]=S}this.options.layoutId&&(i.pointerEvents=u===this?fr(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Fa),this.root.sharedNodes.clear()}}}function T1(e){e.updateLayout()}function w1(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=t.source!==e.layout.source;s==="size"?ze(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],p=De(f);f.min=r[d].min,f.max=f.min+p}):Ru(s,t.layoutBox,r)&&ze(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],p=De(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=Bt();wn(a,r,t.layoutBox);const c=Bt();i?wn(c,e.applyTransform(o,!0),t.measuredBox):wn(c,r,t.layoutBox);const u=!_u(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Ce();Er(m,t.layoutBox,f.layoutBox);const h=Ce();Er(h,r,p.layoutBox),Eu(m,h)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function C1(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _1(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function E1(e){e.clearSnapshot()}function Fa(e){e.clearMeasurements()}function za(e){e.isLayoutDirty=!1}function P1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wa(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function A1(e){e.resolveTargetDelta()}function M1(e){e.calcProjection()}function k1(e){e.resetSkewAndRotation()}function R1(e){e.removeLeadSnapshot()}function Ua(e,t,n){e.translate=fe(t.translate,0,n),e.scale=fe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ha(e,t,n,r){e.min=fe(t.min,n.min,r),e.max=fe(t.max,n.max,r)}function O1(e,t,n,r){Ha(e.x,t.x,n.x,r),Ha(e.y,t.y,n.y,r)}function I1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const j1={duration:.45,ease:[.4,0,.1,1]},Ga=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ka=Ga("applewebkit/")&&!Ga("chrome/")?Math.round:Ge;function Ya(e){e.min=Ka(e.min),e.max=Ka(e.max)}function L1(e){Ya(e.x),Ya(e.y)}function Ru(e,t,n){return e==="position"||e==="preserve-aspect"&&!o1(Da(t),Da(n),.2)}function D1(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const $1=ku({attachResizeListener:(e,t)=>In(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),bo={current:void 0},Ou=ku({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bo.current){const e=new $1({});e.mount(window),e.setOptions({layoutScroll:!0}),bo.current=e}return bo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ei=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function qa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function V1(...e){return t=>{let n=!1;const r=e.map(o=>{const s=qa(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():qa(e[o],null)}}}}function N1(...e){return Fe.useCallback(V1(...e),e)}class B1 extends Fe.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=ts(r)&&r.offsetWidth||0,s=ts(r)&&r.offsetHeight||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left,i.bottom=s-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function F1({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){var d;const s=x.useId(),i=x.useRef(null),a=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=x.useContext(ei),u=((d=e.props)==null?void 0:d.ref)??(e==null?void 0:e.ref),l=N1(i,u);return x.useInsertionEffect(()=>{const{width:f,height:p,top:m,left:h,right:v,bottom:b}=a.current;if(t||!i.current||!f||!p)return;const S=n==="left"?`left: ${h}`:`right: ${v}`,y=r==="bottom"?`bottom: ${b}`:`top: ${m}`;i.current.dataset.motionPopId=s;const C=document.createElement("style");c&&(C.nonce=c);const T=o??document.head;return T.appendChild(C),C.sheet&&C.sheet.insertRule(`
|
|
91
|
+
[data-motion-pop-id="${s}"] {
|
|
92
|
+
position: absolute !important;
|
|
93
|
+
width: ${f}px !important;
|
|
94
|
+
height: ${p}px !important;
|
|
95
|
+
${S}px !important;
|
|
96
|
+
${y}px !important;
|
|
97
|
+
}
|
|
98
|
+
`),()=>{T.contains(C)&&T.removeChild(C)}},[t]),g.jsx(B1,{isPresent:t,childRef:i,sizeRef:a,children:Fe.cloneElement(e,{ref:l})})}const z1=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a,anchorY:c,root:u})=>{const l=Es(W1),d=x.useId();let f=!0,p=x.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:m=>{l.set(m,!0);for(const h of l.values())if(!h)return;r&&r()},register:m=>(l.set(m,!1),()=>l.delete(m))}),[n,l,r]);return s&&f&&(p={...p}),x.useMemo(()=>{l.forEach((m,h)=>l.set(h,!1))},[n]),Fe.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=g.jsx(F1,{isPresent:n,anchorX:a,anchorY:c,root:u,children:e})),g.jsx(Hr.Provider,{value:p,children:e})};function W1(){return new Map}function Iu(e=!0){const t=x.useContext(Hr);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=x.useId();x.useEffect(()=>{if(e)return o(s)},[e]);const i=x.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const tr=e=>e.key||"";function Za(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const U1=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[l,d]=Iu(i),f=x.useMemo(()=>Za(e),[e]),p=i&&!l?[]:f.map(tr),m=x.useRef(!0),h=x.useRef(f),v=Es(()=>new Map),b=x.useRef(new Set),[S,y]=x.useState(f),[C,T]=x.useState(f);dl(()=>{m.current=!1,h.current=f;for(let A=0;A<C.length;A++){const M=tr(C[A]);p.includes(M)?(v.delete(M),b.current.delete(M)):v.get(M)!==!0&&v.set(M,!1)}},[C,p.length,p.join("-")]);const E=[];if(f!==S){let A=[...f];for(let M=0;M<C.length;M++){const L=C[M],$=tr(L);p.includes($)||(A.splice(M,0,L),E.push(L))}return s==="wait"&&E.length&&(A=E),T(Za(A)),y(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&C.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=x.useContext(_s);return g.jsx(g.Fragment,{children:C.map(A=>{const M=tr(A),L=i&&!l?!1:f===C||p.includes(M),$=()=>{if(b.current.has(M))return;if(b.current.add(M),v.has(M))v.set(M,!0);else return;let W=!0;v.forEach(H=>{H||(W=!1)}),W&&(P==null||P(),T(h.current),i&&(d==null||d()),r&&r())};return g.jsx(z1,{isPresent:L,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:u,onExitComplete:L?void 0:$,anchorX:a,anchorY:c,children:A},M)})})},ju=x.createContext({strict:!1}),Xa={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ja=!1;function H1(){if(Ja)return;const e={};for(const t in Xa)e[t]={isEnabled:n=>Xa[t].some(r=>!!n[r])};lu(e),Ja=!0}function Lu(){return H1(),kv()}function G1(e){const t=Lu();for(const n in e)t[n]={...t[n],...e[n]};lu(t)}const K1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Pr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||K1.has(e)}let Du=e=>!Pr(e);function Y1(e){typeof e=="function"&&(Du=t=>t.startsWith("on")?!Pr(t):e(t))}try{Y1(require("@emotion/is-prop-valid").default)}catch{}function q1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Du(o)||n===!0&&Pr(o)||!t&&!Pr(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Yr=x.createContext({});function Z1(e,t){if(Kr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||On(n)?n:void 0,animate:On(r)?r:void 0}}return e.inherit!==!1?t:{}}function X1(e){const{initial:t,animate:n}=Z1(e,x.useContext(Yr));return x.useMemo(()=>({initial:t,animate:n}),[Qa(t),Qa(n)])}function Qa(e){return Array.isArray(e)?e.join(" "):e}const ti=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $u(e,t,n){for(const r in t)!Oe(t[r])&&!gu(r,n)&&(e[r]=t[r])}function J1({transformTemplate:e},t){return x.useMemo(()=>{const n=ti();return Js(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Q1(e,t){const n=e.style||{},r={};return $u(r,n,e),Object.assign(r,J1(e,t)),r}function eb(e,t){const n={},r=Q1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Vu=()=>({...ti(),attrs:{}});function tb(e,t,n,r){const o=x.useMemo(()=>{const s=Vu();return yu(s,t,bu(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};$u(s,e.style,e),o.style={...s,...o.style}}return o}const nb=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ni(e){return typeof e!="string"||e.includes("-")?!1:!!(nb.indexOf(e)>-1||/[A-Z]/u.test(e))}function rb(e,t,n,{latestValues:r},o,s=!1,i){const c=(i??ni(e)?tb:eb)(t,r,o,e),u=q1(t,typeof e=="string",s),l=e!==x.Fragment?{...u,...c,ref:n}:{},{children:d}=t,f=x.useMemo(()=>Oe(d)?d.get():d,[d]);return x.createElement(e,{...l,children:f})}function ob({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:sb(n,r,o,e),renderState:t()}}function sb(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=fr(s[f]);let{initial:i,animate:a}=e;const c=Kr(e),u=cu(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let l=n?n.initial===!1:!1;l=l||i===!1;const d=l?a:i;if(d&&typeof d!="boolean"&&!Gr(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const m=Hs(e,f[p]);if(m){const{transitionEnd:h,transition:v,...b}=m;for(const S in b){let y=b[S];if(Array.isArray(y)){const C=l?y.length-1:0;y=y[C]}y!==null&&(o[S]=y)}for(const S in h)o[S]=h[S]}}}return o}const Nu=e=>(t,n)=>{const r=x.useContext(Yr),o=x.useContext(Hr),s=()=>ob(e,t,r,o);return n?s():Es(s)},ib=Nu({scrapeMotionValuesFromProps:Qs,createRenderState:ti}),ab=Nu({scrapeMotionValuesFromProps:xu,createRenderState:Vu}),cb=Symbol.for("motionComponentSymbol");function lb(e,t,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const o=x.useRef(null);return x.useCallback(s=>{var a;s&&((a=e.onMount)==null||a.call(e,s)),t&&(s?t.mount(s):t.unmount());const i=r.current;if(typeof i=="function")if(s){const c=i(s);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):i(s);else i&&(i.current=s)},[t])}const Bu=x.createContext({});function yn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ub(e,t,n,r,o,s){var b,S;const{visualElement:i}=x.useContext(Yr),a=x.useContext(ju),c=x.useContext(Hr),u=x.useContext(ei).reducedMotion,l=x.useRef(null),d=x.useRef(!1);r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,isSVG:s}),d.current&&l.current&&(l.current.manuallyAnimateOnMount=!0));const f=l.current,p=x.useContext(Bu);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&db(l.current,n,o,p);const m=x.useRef(!1);x.useInsertionEffect(()=>{f&&m.current&&f.update(n,c)});const h=n[Yl],v=x.useRef(!!h&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,h))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,h)));return dl(()=>{d.current=!0,f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),x.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,h)}),v.current=!1),f.enteringChildren=void 0)}),f}function db(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutCrossfade:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Fu(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&yn(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:l,layoutScroll:c,layoutRoot:u})}function Fu(e){if(e)return e.options.allowProjection!==!1?e.projection:Fu(e.parent)}function xo(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&G1(r);const s=n?n==="svg":ni(e),i=s?ab:ib;function a(u,l){let d;const f={...x.useContext(ei),...u,layoutId:fb(u)},{isStatic:p}=f,m=X1(u),h=i(u,p);if(!p&&ul){hb(f,r);const v=pb(f);d=v.MeasureLayout,m.visualElement=ub(e,h,f,o,v.ProjectionNode,s)}return g.jsxs(Yr.Provider,{value:m,children:[d&&m.visualElement?g.jsx(d,{visualElement:m.visualElement,...f}):null,rb(e,u,lb(h,m.visualElement,l),h,p,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=x.forwardRef(a);return c[cb]=e,c}function fb({layoutId:e}){const t=x.useContext(_s).id;return t&&e!==void 0?t+"-"+e:e}function hb(e,t){const n=x.useContext(ju).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Qt(!1,r,"lazy-strict-mode"):lt(!1,r,"lazy-strict-mode")}}function pb(e){const t=Lu(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function mb(e,t){if(typeof Proxy>"u")return xo;const n=new Map,r=(s,i)=>xo(s,i,e,t),o=(s,i)=>(process.env.NODE_ENV!=="production"&&Rs(!1,"motion() is deprecated. Use motion.create() instead."),r(s,i));return new Proxy(o,{get:(s,i)=>i==="create"?r:(n.has(i)||n.set(i,xo(i,void 0,e,t)),n.get(i))})}const gb=(e,t)=>t.isSVG??ni(e)?new Kv(t):new Fv(t,{allowProjection:e!==x.Fragment});class yb extends wt{constructor(t){super(t),t.animationState||(t.animationState=Jv(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let vb=0;class bb extends wt{constructor(){super(...arguments),this.id=vb++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const xb={animation:{Feature:yb},exit:{Feature:bb}};function Wn(e){return{point:{x:e.pageX,y:e.pageY}}}const Sb=e=>t=>qs(t)&&e(t,Wn(t));function Cn(e,t,n,r){return In(e,t,Sb(n),r)}const zu=({current:e})=>e?e.ownerDocument.defaultView:null,ec=(e,t)=>Math.abs(e-t);function Tb(e,t){const n=ec(e.x,t.x),r=ec(e.y,t.y);return Math.sqrt(n**2+r**2)}const tc=new Set(["auto","scroll"]);class Wu{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=To(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,h=Tb(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!h)return;const{point:v}=p,{timestamp:b}=Me;this.history.push({...v,timestamp:b});const{onStart:S,onMove:y}=this.handlers;m||(S&&S(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=So(m,this.transformPagePoint),le.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:h,onSessionEnd:v,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=To(p.type==="pointercancel"?this.lastMoveEventInfo:So(m,this.transformPagePoint),this.history);this.startEvent&&h&&h(p,S),v&&v(p,S)},!qs(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=o||window;const c=Wn(t),u=So(c,this.transformPagePoint),{point:l}=u,{timestamp:d}=Me;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,To(u,this.history)),this.removeListeners=Bn(Cn(this.contextWindow,"pointermove",this.handlePointerMove),Cn(this.contextWindow,"pointerup",this.handlePointerUp),Cn(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(tc.has(r.overflowX)||tc.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),le.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),vt(this.updatePoint)}}function So(e,t){return t?{point:t(e.point)}:e}function nc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function To({point:e},t){return{point:e,delta:nc(e,Uu(t)),offset:nc(e,wb(t)),velocity:Cb(t,.1)}}function wb(e){return e[0]}function Uu(e){return e[e.length-1]}function Cb(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Uu(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>rt(t)));)n--;if(!r)return{x:0,y:0};const s=He(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function _b(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?fe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?fe(n,e,r.max):Math.min(e,n)),e}function rc(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Eb(e,{top:t,left:n,bottom:r,right:o}){return{x:rc(e.x,n,o),y:rc(e.y,t,r)}}function oc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Pb(e,t){return{x:oc(e.x,t.x),y:oc(e.y,t.y)}}function Ab(e,t){let n=.5;const r=De(e),o=De(t);return o>r?n=Mn(t.min,t.max-r,e.min):r>o&&(n=Mn(e.min,e.max-o,t.min)),st(0,1,n)}function Mb(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const is=.35;function kb(e=is){return e===!1?e=0:e===!0&&(e=is),{x:sc(e,"left","right"),y:sc(e,"top","bottom")}}function sc(e,t,n){return{min:ic(e,t),max:ic(e,n)}}function ic(e,t){return typeof e=="number"?e:e[t]||0}const Rb=new WeakMap;class Ob{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=d=>{n?(this.stopAnimation(),this.snapToCursor(Wn(d).point)):this.pauseAnimation()},i=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:m,onDragStart:h}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=vv(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ze(b=>{let S=this.getAxisMotionValue(b).get()||0;if(ot.test(S)){const{projection:y}=this.visualElement;if(y&&y.layout){const C=y.layout.layoutBox[b];C&&(S=De(C)*(parseFloat(S)/100))}}this.originPoint[b]=S}),h&&le.postRender(()=>h(d,f)),Jo(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:h,onDrag:v}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=f;if(m&&this.currentDirection===null){this.currentDirection=Ib(b),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),v&&v(d,f)},c=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>ze(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Wu(t,{onSessionStart:s,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:r,contextWindow:zu(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:i}=o;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&le.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!nr(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=_b(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&yn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Eb(r.layoutBox,t):this.constraints=!1,this.elastic=kb(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ze(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Mb(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yn(t))return!1;const r=t.current;lt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Lv(r,o.root,this.visualElement.getTransformPagePoint());let i=Pb(o.layout.layoutBox,s);if(n){const a=n(Ov(i));this.hasMutatedConstraints=!!a,a&&(i=du(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=ze(l=>{if(!nr(l,n,this.currentDirection))return;let d=c&&c[l]||{};i&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:r?t[l]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(l,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jo(this.visualElement,t),r.start(Us(t,r,0,n,this.visualElement,!1))}stopAnimation(){ze(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ze(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ze(n=>{const{drag:r}=this.getProps();if(!nr(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n],c=s.get()||0;s.set(t[n]-fe(i,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!yn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ze(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();o[i]=Ab({min:c,max:c},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ze(i=>{if(!nr(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:u}=this.constraints[i];a.set(fe(c,u,o[i]))})}addListeners(){if(!this.visualElement.current)return;Rb.set(this.visualElement,this);const t=this.visualElement.current,n=Cn(t,"pointerdown",c=>{const{drag:u,dragListener:l=!0}=this.getProps(),d=c.target,f=d!==t&&su(d);u&&l&&!f&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();yn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),le.read(r);const i=In(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(ze(l=>{const d=this.getAxisMotionValue(l);d&&(this.originPoint[l]+=c[l].translate,d.set(d.get()+c[l].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=is,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function nr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ib(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class jb extends wt{constructor(t){super(t),this.removeGroupControls=Ge,this.removeListeners=Ge,this.controls=new Ob(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ge}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const ac=e=>(t,n)=>{e&&le.postRender(()=>e(t,n))};class Lb extends wt{constructor(){super(...arguments),this.removePointerDownListener=Ge}onPointerDown(t){this.session=new Wu(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zu(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ac(t),onStart:ac(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&le.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Cn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let wo=!1;class Db extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),wo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),hr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:i}=r;return i&&(i.isPresent=s,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),wo=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||le.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ys.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;wo=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Hu(e){const[t,n]=Iu(),r=x.useContext(_s);return g.jsx(Db,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Bu),isPresent:t,safeToRemove:n})}const $b={pan:{Feature:Lb},drag:{Feature:jb,ProjectionNode:Ou,MeasureLayout:Hu}};function cc(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&le.postRender(()=>s(t,Wn(t)))}class Vb extends wt{mount(){const{current:t}=this.node;t&&(this.unmount=bv(t,(n,r)=>(cc(this.node,r,"Start"),o=>cc(this.node,o,"End"))))}unmount(){}}class Nb extends wt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Bn(In(this.node.current,"focus",()=>this.onFocus()),In(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function lc(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&le.postRender(()=>s(t,Wn(t)))}class Bb extends wt{mount(){const{current:t}=this.node;t&&(this.unmount=Tv(t,(n,r)=>(lc(this.node,r,"Start"),(o,{success:s})=>lc(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const as=new WeakMap,Co=new WeakMap,Fb=e=>{const t=as.get(e.target);t&&t(e)},zb=e=>{e.forEach(Fb)};function Wb({root:e,...t}){const n=e||document;Co.has(n)||Co.set(n,{});const r=Co.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(zb,{root:e,...t})),r[o]}function Ub(e,t,n){const r=Wb(t);return as.set(e,n),r.observe(e),()=>{as.delete(e),r.unobserve(e)}}const Hb={some:0,all:1};class Gb extends wt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Hb[o]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:d}=this.node.getProps(),f=u?l:d;f&&f(c)};return Ub(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Kb(t,n))&&this.startObserver()}unmount(){}}function Kb({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Yb={inView:{Feature:Gb},tap:{Feature:Bb},focus:{Feature:Nb},hover:{Feature:Vb}},qb={layout:{ProjectionNode:Ou,MeasureLayout:Hu}},Zb={...xb,...Yb,...$b,...qb},vn=mb(Zb,gb),Gu="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.75%203.1875C0.75%201.84104%201.84104%200.75%203.1875%200.75L5.625%200.75V2.25H3.1875C2.66946%202.25%202.25%202.66946%202.25%203.1875V5.625H0.75L0.75%203.1875Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M0.75%2014.8125L0.75%2012.375H2.25V14.8125C2.25%2015.3305%202.66946%2015.75%203.1875%2015.75H5.625V17.25H3.1875C1.84104%2017.25%200.75%2016.159%200.75%2014.8125Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M15.75%2014.8125V12.375H17.25V14.8125C17.25%2016.159%2016.159%2017.25%2014.8125%2017.25H12.375V15.75H14.8125C15.3305%2015.75%2015.75%2015.3305%2015.75%2014.8125Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M15.75%203.1875C15.75%202.66946%2015.3305%202.25%2014.8125%202.25H12.375V0.75L14.8125%200.75C16.159%200.75%2017.25%201.84104%2017.25%203.1875V5.625H15.75V3.1875Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M10.8889%2010.5C11.6372%2010.5%2012.3895%2010.6845%2012.991%2011.053L12.9902%2011.0537C13.3468%2011.2719%2013.6565%2011.5584%2013.8684%2011.9092L14.5298%2013.0049L13.2451%2013.7798L12.5845%2012.6841C12.5191%2012.576%2012.3992%2012.4499%2012.2073%2012.3325C11.8787%2012.1312%2011.4076%2012%2010.8889%2012H7.11108C6.59216%2012%206.1214%2012.1305%205.79199%2012.3318L5.79272%2012.3325C5.64854%2012.4207%205.54509%2012.5138%205.47485%2012.6006L5.41553%2012.6841L4.75488%2013.7798L3.47021%2013.0049L4.13086%2011.9092C4.34281%2011.5583%204.6531%2011.2712%205.00977%2011.053C5.6104%2010.6859%206.36112%2010.5%207.11108%2010.5H10.8889Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M10.5%206.75C10.5%205.92157%209.82843%205.25%209%205.25C8.17157%205.25%207.5%205.92157%207.5%206.75C7.5%207.57843%208.17157%208.25%209%208.25C9.82843%208.25%2010.5%207.57843%2010.5%206.75ZM12%206.75C12%208.40685%2010.6569%209.75%209%209.75C7.34315%209.75%206%208.40685%206%206.75C6%205.09315%207.34315%203.75%209%203.75C10.6569%203.75%2012%205.09315%2012%206.75Z'%20fill='%23FDFCFC'/%3e%3c/svg%3e",Ku="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.25%2014.8125C2.25%2015.3305%202.66946%2015.75%203.1875%2015.75H5.625V17.25H3.1875C1.84104%2017.25%200.75%2016.159%200.75%2014.8125L0.75%2012.375H2.25V14.8125ZM17.25%2014.8125C17.25%2016.159%2016.159%2017.25%2014.8125%2017.25H12.375L12.375%2015.75H14.8125C15.3305%2015.75%2015.75%2015.3305%2015.75%2014.8125V12.375L17.25%2012.375V14.8125ZM14.135%206.35229C14.2958%206.19142%2014.5379%206.14314%2014.748%206.22998C14.9583%206.31702%2015.0959%206.52245%2015.0959%206.75V10.5015C15.0959%2010.812%2014.8439%2011.0638%2014.5334%2011.064C14.2228%2011.0639%2013.9709%2010.8121%2013.9709%2010.5015V8.10571C13.7502%208.30415%2013.4107%208.29824%2013.1982%208.08594C12.9785%207.86637%2012.9787%207.51027%2013.1982%207.29053L14.135%206.35229ZM11.3298%206.19336C11.5137%206.21969%2011.6748%206.33566%2011.7568%206.5061C11.8505%206.70099%2011.8245%206.93272%2011.6895%207.10156L9.42041%209.9375H11.25C11.5607%209.9375%2011.8125%2010.1893%2011.8125%2010.5C11.8125%2010.8107%2011.5607%2011.0625%2011.25%2011.0625H8.25C8.03386%2011.0625%207.83688%2010.9386%207.74316%2010.7439C7.6495%2010.549%207.67547%2010.3173%207.81055%2010.1484L10.0796%207.3125L8.25%207.3125C7.93934%207.3125%207.6875%207.06066%207.6875%206.75C7.6875%206.43934%207.93934%206.1875%208.25%206.1875L11.25%206.1875L11.3298%206.19336ZM5.25%206.19482C5.45567%206.22809%205.62952%206.37352%205.69531%206.57642L6.9104%2010.3264C7.00614%2010.6219%206.84405%2010.9396%206.54858%2011.0354C6.25308%2011.1311%205.93539%2010.9691%205.8396%2010.6736L5.72241%2010.3125H3.65259L3.5354%2010.6736C3.43961%2010.9691%203.12192%2011.1311%202.82642%2011.0354C2.53095%2010.9396%202.36886%2010.6219%202.4646%2010.3264L2.68579%209.6416C2.69424%209.59828%202.7083%209.55696%202.72607%209.51782L3.67969%206.57642L3.71411%206.49365C3.80908%206.30792%204.00155%206.1875%204.21509%206.1875H5.15991L5.25%206.19482ZM4.0166%209.1875H5.3584L4.75122%207.3125H4.62378L4.0166%209.1875ZM5.625%202.25H3.1875C2.66946%202.25%202.25%202.66946%202.25%203.1875V5.625H0.75L0.75%203.1875C0.75%201.84104%201.84104%200.75%203.1875%200.75L5.625%200.75V2.25ZM14.8125%200.75C16.159%200.75%2017.25%201.84104%2017.25%203.1875V5.625H15.75V3.1875C15.75%202.66946%2015.3305%202.25%2014.8125%202.25H12.375V0.75L14.8125%200.75Z'%20fill='%23FDFCFC'/%3e%3c/svg%3e";function Xb(e){return e==="Facial"?g.jsx("img",{src:Gu,alt:"Facial",width:16,height:16,style:{display:"block"}}):e==="LPR"?g.jsx("img",{src:Ku,alt:"LPR",width:16,height:16,style:{display:"block"}}):g.jsx(Ve.VideocamOutlined,{sx:{fontSize:16}})}function Jb(e){return e==="Facial"?g.jsx("img",{src:Gu,alt:"Facial",width:18,height:18,style:{display:"block"}}):e==="LPR"?g.jsx("img",{src:Ku,alt:"LPR",width:18,height:18,style:{display:"block"}}):g.jsx(Ve.VideocamOutlined,{sx:{fontSize:18,color:"#fff"}})}function Qb(e){if(!e||!Array.isArray(e)||e.length===0)return;const t={};return e.forEach(n=>{const r=n.algorithm||"Outros";t[r]=(t[r]||0)+1}),Object.entries(t).map(([n,r])=>({count:r,icon:Xb(n)}))}const ex="_spotWrapper_dvp29_1",tx="_mapSpot_dvp29_8",nx="_selected_dvp29_27",rx="_count_dvp29_31",ox="_countSelected_dvp29_39",sx="_cameraTypesContainer_dvp29_43",ix="_cameraTypeItem_dvp29_50",ax="_cameraTypeCount_dvp29_57",cx="_cameraTypeIcon_dvp29_64",lx="_selectionEffect_dvp29_72",ux="_arrowSvg_dvp29_81",dx="_cameraButtonWrapper_dvp29_86",fx="_cone_dvp29_91",hx="_cameraButton_dvp29_86",je={spotWrapper:ex,mapSpot:tx,selected:nx,count:rx,countSelected:ox,cameraTypesContainer:sx,cameraTypeItem:ix,cameraTypeCount:ax,cameraTypeIcon:cx,selectionEffect:lx,arrowSvg:ux,cameraButtonWrapper:dx,cone:fx,cameraButton:hx},px=vn(_.Box),uc=60,mx=34,ri=({count:e,addressText:t,cameras:n,isSelected:r,animateOnClick:o=!0,disableClick:s=!1,className:i,onClick:a,sx:c})=>{const[u,l]=x.useState(!1),d=x.useMemo(()=>Qb(n),[n]),f=d&&d.length>0,p=(v,b)=>{const S=(v-90)*(Math.PI/180);return{x:Math.cos(S)*b,y:Math.sin(S)*b}},m=(v,b)=>{const S=v.orientation??b*90,y=p(S,uc);return g.jsxs("svg",{className:je.arrowSvg,style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",overflow:"visible",pointerEvents:"none"},width:"1",height:"1",children:[g.jsx("defs",{children:g.jsx("marker",{id:`arrowhead-${v.id}`,markerWidth:"6",markerHeight:"6",refX:"3",refY:"3",orient:"auto",children:g.jsx("polygon",{points:"0 0, 6 3, 0 6",fill:"var(--Tertiary-On-Tertiary, #ffffff)"})})}),g.jsx("line",{x1:"0",y1:"0",x2:y.x,y2:y.y,stroke:"var(--Tertiary-On-Tertiary, #ffffff)",strokeWidth:"2",markerEnd:`url(#arrowhead-${v.id})`})]},`arrow-${v.id}`)},h=(v,b)=>{const S=v.orientation??b*90,y=p(S,uc+mx/2+10),C=Jb(v.algorithm);return g.jsxs("div",{className:je.cameraButtonWrapper,style:{position:"absolute",left:"50%",top:"50%",transform:`translate(calc(-50% + ${y.x}px), calc(-50% + ${y.y}px))`},children:[g.jsx("div",{className:je.cone,style:{transform:`rotate(${S+180}deg)`}}),g.jsx("div",{className:je.cameraButton,children:C})]},`camera-${v.id}`)};return g.jsxs("div",{className:je.spotWrapper,children:[r&&n&&n.length>0&&(o?g.jsxs(vn.div,{className:je.selectionEffect,initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.3,ease:"easeOut"},children:[n.map((v,b)=>m(v,b)),n.map((v,b)=>h(v,b))]}):g.jsxs("div",{className:je.selectionEffect,children:[n.map((v,b)=>m(v,b)),n.map((v,b)=>h(v,b))]})),g.jsx(px,{className:`${je.mapSpot} ${r?je.selected:""} ${i||""}`,onClick:s?void 0:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),sx:{...c},animate:{width:u&&f&&!r?"auto":30,height:u&&f&&!r?"auto":30,borderRadius:"100px",backgroundColor:r?"var(--Tertiary-Tertiary, #7FCFCF)":u&&f?"var(--Surface-Surface-Tint, #5E5E5E)":"var(--Surface-Inverse-Surface, #3B3B3C)",padding:u&&f&&!r?"4px 8px":0,borderWidth:r?1:0,borderStyle:"solid",borderColor:r?"var(--Tertiary-On-Tertiary, #ffffff)":"transparent"},transition:{duration:.2,ease:"easeInOut"},children:g.jsx(U1,{mode:"wait",children:u&&f&&!r?g.jsx(vn.div,{className:je.cameraTypesContainer,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2,ease:"easeInOut"},children:d.map((v,b)=>g.jsxs(vn.div,{className:je.cameraTypeItem,initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:b*.05},children:[g.jsx(_.Typography,{className:je.cameraTypeCount,children:v.count}),v.icon&&g.jsx(_.Box,{className:je.cameraTypeIcon,children:v.icon})]},b))},"expanded"):g.jsx(vn.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2,ease:"easeInOut"},children:g.jsx(_.Typography,{className:`${je.count} ${r?je.countSelected:""}`,children:e})},"collapsed")})})]})};ri.displayName="MapSpot";const gx=16,Yu=({spots:e,onSpotClick:t,zoomLevel:n=gx,selectedSpotId:r,animateOnClick:o,disableClick:s})=>{const{isLoaded:i,zoomToPosition:a}=cl(),c=u=>{a({lat:u.lat,lng:u.lng},n),s||t==null||t(u)};return i?g.jsx(g.Fragment,{children:e.map((u,l)=>g.jsx(il,{position:{lat:u.lat,lng:u.lng},onClick:()=>c(u),children:g.jsx(ri,{count:u.count,addressText:u.addressText,cameras:u.cameras,isSelected:!s&&r===u.id,animateOnClick:o,disableClick:s})},u.id??l))}):null};Yu.displayName="MapMarkers";const yx="_searchBar_15mix_1",vx="_startIconContainer_15mix_106",bx="_endIconContainer_15mix_117",xx="_endIconContainerClickable_15mix_153",Sx="_defaultIcon_15mix_157",bn={searchBar:yx,startIconContainer:vx,endIconContainer:bx,endIconContainerClickable:xx,defaultIcon:Sx},Tx=e=>()=>{e&&e()},wx=e=>t=>{e&&e(t)},Cx=()=>g.jsx(Ve.Search,{className:bn.defaultIcon}),_x=e=>e||Cx(),qu=x.forwardRef(({startIcon:e,endIcon:t,onEndIconClick:n,placeholder:r,value:o,onChange:s,className:i,...a},c)=>{const l=_.useTheme().palette.mode==="dark",d=_x(t),f=Tx(n),p=wx(s);return g.jsx(_.TextField,{ref:c,value:o,onChange:p,placeholder:r,variant:"outlined",autoComplete:"off",className:`${bn.searchBar} ${i||""}`,"data-theme":l?"dark":"light",InputProps:{startAdornment:e?g.jsx(_.InputAdornment,{position:"start",className:bn.startIconContainer,children:e}):null,endAdornment:g.jsx(_.InputAdornment,{position:"end",className:`${bn.endIconContainer} ${n?bn.endIconContainerClickable:""}`,onClick:f,disablePointerEvents:!n,children:d})},inputProps:{autoComplete:"off","data-form-type":"other"},...a})});qu.displayName="SearchBar";const Ex=dt(g.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),Px=dt([g.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 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z"},"0"),g.jsx("path",{d:"M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z"},"1")],"SearchOff"),Ax="_container_1mb8b_1",Mx="_iconWrapper_1mb8b_11",kx="_icon_1mb8b_11",Rx="_title_1mb8b_21",Ox="_subtitle_1mb8b_30",Ix="_description_1mb8b_34",jx="_button_1mb8b_38",_t={container:Ax,iconWrapper:Mx,icon:kx,title:Rx,subtitle:Ox,description:Ix,button:jx},Zu=({onGoHome:e,buttonText:t="Voltar para o início",title:n="Página não encontrada",description:r="Desculpe, a página que você está procurando não existe ou foi movida para outro endereço.",errorCode:o="404",className:s})=>g.jsx(_.Container,{maxWidth:"sm",children:g.jsxs(_.Box,{className:`${_t.container} ${s||""}`,children:[g.jsx(_.Box,{className:_t.iconWrapper,children:g.jsx(Px,{className:_t.icon,color:"primary"})}),g.jsx(_.Typography,{variant:"h1",className:_t.title,sx:{fontSize:{xs:"6rem",md:"8rem"}},children:o}),g.jsx(_.Typography,{variant:"h4",component:"h2",className:_t.subtitle,color:"text.primary",children:n}),g.jsx(_.Typography,{variant:"body1",className:_t.description,color:"text.secondary",children:r}),e&&g.jsx(hs,{variant:"contained",size:"large",startIcon:g.jsx(Ex,{}),onClick:e,className:_t.button,children:t})]})});Zu.displayName="NotFoundContent";const Lx=e=>{const t=e.find(r=>r.active),n=e.flatMap(r=>{var o;return((o=r.submenu)==null?void 0:o.map(s=>({item:r,subItem:s})))??[]}).find(({subItem:r})=>r.active);return{itemId:(n==null?void 0:n.item.id)??(t==null?void 0:t.id)??null,subItemId:(n==null?void 0:n.subItem.id)??null,expandedItemId:(n==null?void 0:n.item.id)??null}},Dx=({items:e,isExpanded:t=!0,onClick:n})=>{const r=x.useMemo(()=>Lx(e),[e]),[o,s]=x.useState(r.itemId),[i,a]=x.useState(r.subItemId),[c,u]=x.useState(r.expandedItemId),[l,d]=x.useState(null),[f,p]=x.useState(null);x.useEffect(()=>{s(r.itemId),a(r.subItemId),u(r.expandedItemId)},[r.itemId,r.subItemId,r.expandedItemId]);const m=f?e.find(E=>E.id===f):void 0,h=(m==null?void 0:m.submenu)??[];return{selectedItemId:o,selectedSubItemId:i,expandedItemId:c,submenuAnchorEl:l,submenuItem:m,submenuItems:h,getIsItemActive:E=>{var A;const P=i?!!((A=E.submenu)!=null&&A.some(M=>M.id===i)):!1;return o?E.id===o:!!(E.active||P)},getIsSubItemActive:E=>i?E.id===i:!!E.active,shouldShowSubmenu:E=>{var P;return!!(t&&((P=E.submenu)!=null&&P.length)&&c===E.id)},handleItemClick:(E,P)=>{var A,M;s(E.id),a(null),(A=E.submenu)!=null&&A.length?t?u(L=>L===E.id?null:E.id):(d(P.currentTarget),p(E.id)):(u(null),d(null),p(null)),(M=E.onClick)==null||M.call(E,P),n==null||n({item:E})},handleSubItemClick:(E,P,A,M)=>{var L;s(E.id),a(P.id),M!=null&&M.closeMenu&&(d(null),p(null)),(L=P.onClick)==null||L.call(P,A),n==null||n({item:E,subItem:P})},closeSubmenu:()=>{d(null),p(null)}}},Xu=e=>typeof e=="number"?`${e*4}px`:e,$x=({item:e,onClick:t,isActive:n})=>{const r=Y.useTheme();return g.jsx(_.ButtonBase,{onClick:t,"aria-label":e.label,"aria-pressed":n||void 0,sx:{width:"100%",borderRadius:Xu(r.shape.borderRadius),px:2,py:1.25,justifyContent:"flex-start",textAlign:"left",color:r.palette.text.primary,backgroundColor:n?r.palette.action.selected:"transparent","&:hover":{backgroundColor:r.palette.action.hover}},children:g.jsx(_.Typography,{variant:"body2",sx:{fontWeight:500},children:e.label})})},Ju=({items:e,isExpanded:t=!0,className:n,onClick:r})=>{const o=Y.useTheme(),s=Xu(o.shape.borderRadius),{submenuAnchorEl:i,submenuItem:a,submenuItems:c,getIsItemActive:u,getIsSubItemActive:l,shouldShowSubmenu:d,handleItemClick:f,handleSubItemClick:p,closeSubmenu:m}=Dx({items:e,isExpanded:t,onClick:r});return g.jsxs(_.Stack,{className:n,direction:"column",spacing:2,sx:{width:"100%"},children:[e.map(h=>{var E,P;const v=u(h),b=d(h),S=t?o.spacing(2):o.spacing(4),y=t?v?o.palette.primary.main:o.palette.action.hover:"transparent",C=t?"transparent":v?o.palette.primary.main:o.palette.action.hover,T=!t&&v?o.palette.primary.contrastText:o.palette.text.primary;return g.jsxs(_.Stack,{direction:"column",spacing:1,sx:{width:"100%"},children:[g.jsx(_.ButtonBase,{onClick:A=>f(h,A),"aria-label":h.label,"aria-pressed":v||void 0,"aria-haspopup":(E=h.submenu)!=null&&E.length?"menu":void 0,sx:{width:"100%",borderRadius:s,px:t?2:1,py:t?1.5:1,justifyContent:t?"flex-start":"center",textAlign:"left",color:o.palette.text.primary,backgroundColor:y,boxShadow:t&&v?o.shadows[1]:"none","&:hover":{backgroundColor:t?o.palette.action.hover:"transparent"}},children:g.jsxs(_.Stack,{direction:t?"row":"column",alignItems:"center",spacing:t?1.5:1,sx:{width:"100%"},children:[g.jsx(_.Box,{sx:{width:64,height:S,borderRadius:s,display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:C,color:T,transition:o.transitions.create(["background-color","box-shadow"],{duration:o.transitions.duration.shortest}),...t?{}:{boxShadow:v?o.shadows[1]:"none","&:hover":{backgroundColor:v?Y.alpha(o.palette.primary.main,.9):o.palette.action.selected}}},children:h.icon}),g.jsx(_.Typography,{variant:"body2",sx:{width:"100%",textAlign:t?"left":"center",fontWeight:v?600:500},children:h.label}),t&&h.trailingIcon?g.jsx(_.Box,{sx:{ml:"auto",display:"inline-flex",alignItems:"center"},children:h.trailingIcon}):null]})}),b?g.jsx(_.Collapse,{in:b,timeout:"auto",unmountOnExit:!0,children:g.jsx(_.Stack,{direction:"column",spacing:1,sx:{pl:4},children:(P=h.submenu)==null?void 0:P.map(A=>{const M=l(A);return g.jsx($x,{item:A,isActive:M,onClick:L=>p(h,A,L)},A.id)})})}):null]},h.id)}),g.jsx(_.Menu,{anchorEl:i,open:!!(i&&c.length),onClose:m,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},MenuListProps:{dense:!0,"aria-label":(a==null?void 0:a.label)??"submenu"},PaperProps:{sx:{borderRadius:s,minWidth:o.spacing(22),px:1,py:.5,boxShadow:o.shadows[3]}},children:c.map(h=>{const v=l(h);return g.jsx(_.MenuItem,{selected:v,onClick:b=>{a&&p(a,h,b,{closeMenu:!0})},sx:{borderRadius:s,fontWeight:v?600:500},children:h.label},h.id)})})]})};Ju.displayName="SidebarMenu";const Vx=e=>{const t=e.find(n=>n.active);return(t==null?void 0:t.id)??null},Nx=({items:e,onSelect:t,isExpanded:n=!0})=>{const r=x.useMemo(()=>Vx(e),[e]),[o,s]=x.useState(r),[i,a]=x.useState(null);x.useEffect(()=>{s(r)},[r]);const c=o?e.find(p=>p.id===o):void 0;return{selectedItemId:o,selectedItem:c,menuAnchorEl:i,getIsItemActive:p=>o?p.id===o:!!p.active,openMenu:p=>{n||a(p.currentTarget)},closeMenu:()=>{n||a(null)},handleItemClick:(p,m)=>{var h;s(p.id),(h=p.onClick)==null||h.call(p,m),t==null||t(p),a(null)}}},Bx=e=>typeof e=="number"?`${e*4}px`:e,Qu=({items:e,currentLabel:t,headerLabel:n,headerIcon:r,headerTrailingIcon:o,listTitle:s,action:i,isExpanded:a=!0,className:c,onSelect:u})=>{var Q,U;const l=Y.useTheme(),d=x.useRef(null),f=Bx(l.shape.borderRadius),[p,m]=x.useState(!1),h=x.useMemo(()=>Number.parseFloat(l.spacing(2).toString()),[l]),{selectedItem:v,menuAnchorEl:b,getIsItemActive:S,openMenu:y,closeMenu:C,handleItemClick:T}=Nx({items:e,onSelect:u,isExpanded:a}),E=t??(v==null?void 0:v.label)??((Q=e[0])==null?void 0:Q.label)??"",P=r??(v==null?void 0:v.icon)??((U=e[0])==null?void 0:U.icon)??null,A=a||!P,M=I=>{if(a){m(X=>!X);return}y(I)},L=(I,X)=>{T(I,X),m(!1)},$=g.jsx(_.Stack,{direction:"column",spacing:.5,children:e.map(I=>{const X=S(I);return g.jsxs(_.MenuItem,{selected:X,onClick:R=>L(I,R),sx:{borderRadius:f,gap:1.5,px:2,py:1.25,color:l.palette.text.primary,"&:hover":{backgroundColor:l.palette.action.hover}},children:[I.icon?g.jsx(_.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:I.icon}):null,g.jsx(_.Typography,{variant:"body1",sx:{fontWeight:X?600:500},children:I.label})]},I.id)})}),W=g.jsxs(_.Box,{sx:{borderRadius:f,backgroundColor:l.palette.background.paper,boxShadow:l.shadows[3],display:"flex",flexDirection:"column",maxHeight:l.spacing(50)},children:[s?g.jsx(_.Box,{sx:{px:2,pt:2,pb:1},children:g.jsx(_.Typography,{variant:"subtitle2",sx:{color:l.palette.text.primary},children:s})}):null,g.jsx(_.Box,{sx:{px:2,pb:2,overflowY:"auto",flex:1,minHeight:0},children:$})]}),H=i?g.jsxs(_.MenuItem,{onClick:i.onClick,sx:{borderRadius:f,gap:1.5,px:2,py:1.25,color:l.palette.text.primary,"&:hover":{backgroundColor:l.palette.action.hover}},children:[i.icon?g.jsx(_.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:i.icon}):null,g.jsx(_.Typography,{variant:"body1",sx:{fontWeight:600},children:i.label})]}):null,q=H?g.jsx(_.Box,{sx:{borderRadius:f,backgroundColor:l.palette.background.paper,boxShadow:l.shadows[3]},children:H}):null,oe=g.jsxs(_.Stack,{direction:"column",spacing:1,sx:{minWidth:l.spacing(32)},children:[W,q]});return g.jsxs(_.Stack,{className:c,direction:a?"row":"column",spacing:a?2:1,sx:{width:"100%",alignItems:a?"flex-start":"stretch"},children:[g.jsx(_.ButtonBase,{onClick:M,"aria-label":E,ref:d,sx:{width:a?l.spacing(28):"64px",height:a?"auto":"64px",borderRadius:f,px:a?2:0,py:a?1.25:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"left",backgroundColor:l.palette.action.hover,"&:hover":{backgroundColor:l.palette.action.selected}},children:g.jsxs(_.Stack,{direction:"row",alignItems:"center",spacing:a?1:0,sx:{width:a?"100%":"auto",justifyContent:a?"space-between":"center",px:0},children:[P?g.jsx(_.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:P}):null,A?g.jsxs(_.Box,{sx:{minWidth:0,flex:1},children:[n?g.jsx(_.Typography,{variant:"caption",sx:{color:l.palette.text.secondary},children:n}):null,g.jsx(_.Typography,{variant:"body2",sx:{fontWeight:600},noWrap:!0,children:E})]}):null,a&&o?g.jsx(_.Box,{sx:{ml:"auto",display:"inline-flex",alignItems:"center"},children:o}):null]})}),a?p?g.jsx(_.ClickAwayListener,{onClickAway:()=>m(!1),children:g.jsx(_.Popper,{open:p,anchorEl:d.current,placement:"right-start",modifiers:[{name:"offset",options:{offset:[0,h]}}],sx:{zIndex:l.zIndex.modal},children:oe})}):null:g.jsx(_.Menu,{anchorEl:b,open:!!b,onClose:C,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},disableAutoFocusItem:!0,slotProps:{paper:{sx:{borderRadius:f,p:0,ml:2,backgroundColor:"transparent",boxShadow:"none",overflow:"visible"}}},MenuListProps:{"aria-label":E?`menu-${E}`:"menu",sx:{p:0}},children:oe})]})};Qu.displayName="ModuleMenu";const oi=e=>e.seekable&&e.seekable.length>0?e.seekable.end(e.seekable.length-1):Number.isFinite(e.duration)&&e.duration>0?e.duration:e.currentTime,Fx=(e,t,n)=>({...e&&{"--player-width":typeof e=="number"?`${e}px`:e},...t&&{"--player-height":typeof t=="number"?`${t}px`:t},...n&&{"--player-aspect-ratio":n}}),zx=({stream:e,availableQualities:t,initialQuality:n,autoPlay:r,liveThresholdSeconds:o,allowPlaybackRateForStream:s})=>{const i=x.useRef(null),a=x.useRef(null),c=x.useMemo(()=>{if(!t||!t.length)return null;if(n){const I=t.find(X=>X.value===n);if(I)return I}return t[0]},[t,n]),[u,l]=x.useState(c),[d,f]=x.useState(!1),[p,m]=x.useState(!0),[h,v]=x.useState(!1),[b,S]=x.useState(0),[y,C]=x.useState(0),[T,E]=x.useState(1),[P,A]=x.useState(1),[M,L]=x.useState(!1),[$,W]=x.useState(!0),H=(u==null?void 0:u.stream)??e??null,q=(u==null?void 0:u.src)??null,Q=!!!H||s;x.useEffect(()=>{l(c)},[c]);const U=x.useCallback(()=>{const I=a.current;if(!I)return;if(!I.seekable||I.seekable.length===0){m(!0),v(!1);return}const X=oi(I),R=Math.max(0,X-I.currentTime);C(X),S(I.currentTime),v(X>0),m(R<=(o??2))},[o]);return x.useEffect(()=>{const I=a.current;if(!I)return;const X=()=>f(!0),R=()=>f(!1),w=()=>W(!0),j=()=>W(!0),k=()=>W(!1),O=()=>W(!1);return I.addEventListener("play",X),I.addEventListener("pause",R),I.addEventListener("waiting",w),I.addEventListener("loadstart",j),I.addEventListener("canplay",k),I.addEventListener("playing",O),I.addEventListener("timeupdate",U),I.addEventListener("durationchange",U),I.addEventListener("loadedmetadata",U),I.addEventListener("progress",U),()=>{I.removeEventListener("play",X),I.removeEventListener("pause",R),I.removeEventListener("waiting",w),I.removeEventListener("loadstart",j),I.removeEventListener("canplay",k),I.removeEventListener("playing",O),I.removeEventListener("timeupdate",U),I.removeEventListener("durationchange",U),I.removeEventListener("loadedmetadata",U),I.removeEventListener("progress",U)}},[U]),x.useEffect(()=>{const I=a.current;I&&(W(!0),H?(I.srcObject!==H&&(I.srcObject=H),I.getAttribute("src")&&I.removeAttribute("src")):q?(I.srcObject&&(I.srcObject=null),I.src!==q&&(I.src=q,I.load())):(I.srcObject&&(I.srcObject=null),I.getAttribute("src")&&I.removeAttribute("src")),r&&I.play().then(()=>{}).catch(()=>{}))},[H,q,r]),x.useEffect(()=>{const I=a.current;I&&(Q?I.playbackRate=T:(I.playbackRate=1,E(1)))},[T,Q]),x.useEffect(()=>{const I=()=>{L(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",I),()=>{document.removeEventListener("fullscreenchange",I)}},[]),{containerRef:i,videoRef:a,selectedQuality:u,setSelectedQuality:l,isPlaying:d,isLive:p,canSeek:h,currentTime:b,setCurrentTime:S,seekableEnd:y,playbackRate:T,setPlaybackRate:E,zoom:P,setZoom:A,isFullscreen:M,isLoading:$,canAdjustPlaybackRate:Q,updateLiveStatus:U}},Wx="_container_zv1tx_1",Ux="_loader_zv1tx_19",Hx="_video_zv1tx_29",Gx="_controlsOverlay_zv1tx_37",Kx="_timeline_zv1tx_58",Yx="_controlsRow_zv1tx_65",qx="_controlGroup_zv1tx_83",Zx="_iconButton_zv1tx_100",Xx="_seekButton_zv1tx_113",Jx="_menuButton_zv1tx_133",Qx="_liveBadge_zv1tx_149",Ae={container:Wx,loader:Ux,video:Hx,controlsOverlay:Gx,timeline:Kx,controlsRow:Yx,controlGroup:qx,iconButton:Zx,seekButton:Xx,menuButton:Jx,liveBadge:Qx},_o=({label:e,valueLabel:t,selectedValue:n,options:r,onChange:o,disabled:s,ariaLabel:i})=>{const[a,c]=x.useState(null),u=!!a;return g.jsxs(g.Fragment,{children:[g.jsx(_.ButtonBase,{disabled:s,className:Ae.menuButton,"aria-label":i,onClick:l=>c(l.currentTarget),children:e?`${e}: ${t}`:t}),g.jsx(_.Menu,{anchorEl:a,open:u,onClose:()=>c(null),children:r.map(l=>g.jsx(_.MenuItem,{selected:l.value===n,disabled:l.disabled,onClick:()=>{o(l.value),c(null)},children:l.label},`${e}-${String(l.value)}`))})]})},eS=e=>()=>{const t=e.current;t&&(t.paused?t.play().catch(()=>{}):t.pause())},tS=(e,t,n)=>r=>{const o=e.current;if(!o||!t)return;const s=oi(o),i=Math.min(Math.max(o.currentTime+r,0),s);o.currentTime=i,n()},nS=e=>()=>{e.current&&(document.fullscreenElement?document.exitFullscreen().catch(()=>{}):e.current.requestFullscreen().catch(()=>{}))},rS=(e,t,n)=>r=>{const o=e.find(s=>s.value===r)??null;t(o),n==null||n(o)},oS=(e,t)=>(n,r)=>{if(!e)return;const o=Array.isArray(r)?r[0]:r;t(o)},sS=(e,t,n)=>(r,o)=>{const s=e.current;if(!s||!t)return;const i=Array.isArray(o)?o[0]:o,a=oi(s);s.currentTime=Math.min(Math.max(i,0),a),n()},ed=({stream:e=null,availableQualities:t=[],initialQuality:n,onQualityChange:r,autoPlay:o=!0,playsInline:s=!0,muted:i=!0,poster:a,className:c,sx:u,liveThresholdSeconds:l=2,allowPlaybackRateForStream:d=!1,playbackRates:f=[.5,1,1.5,2],zoomLevels:p=[1,1.2,1.5],width:m,height:h,aspectRatio:v="16 / 9",showTimestamp:b=!0,showTimeline:S=!0})=>{const y=Y.useTheme(),[C,T]=x.useState(""),[E,P]=x.useState(!0),A=x.useRef(null);x.useEffect(()=>{if(!b)return;const we=()=>{const Je=new Date,Hn=String(Je.getDate()).padStart(2,"0"),yd=String(Je.getMonth()+1).padStart(2,"0"),vd=Je.getFullYear(),bd=["Dom","Seg","Ter","Qua","Qui","Sex","Sab"][Je.getDay()],xd=String(Je.getHours()).padStart(2,"0"),Sd=String(Je.getMinutes()).padStart(2,"0"),Td=String(Je.getSeconds()).padStart(2,"0");T(`${Hn}-${yd}-${vd}, ${bd} ${xd}:${Sd}:${Td}`)};we();const Un=setInterval(we,1e3);return()=>clearInterval(Un)},[b]),x.useEffect(()=>{const we=M.current;if(!we)return;const Un=()=>{A.current&&(clearTimeout(A.current),A.current=null),P(!0)},Je=()=>{A.current=setTimeout(()=>{P(!1)},1e4)},Hn=()=>{E||P(!0),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{P(!1)},1e4)};return we.addEventListener("mouseenter",Un),we.addEventListener("mouseleave",Je),we.addEventListener("mousemove",Hn),()=>{we.removeEventListener("mouseenter",Un),we.removeEventListener("mouseleave",Je),we.removeEventListener("mousemove",Hn),A.current&&clearTimeout(A.current)}},[E]);const{containerRef:M,videoRef:L,selectedQuality:$,setSelectedQuality:W,isPlaying:H,isLive:q,canSeek:oe,currentTime:Q,setCurrentTime:U,seekableEnd:I,playbackRate:X,setPlaybackRate:R,zoom:w,setZoom:j,isFullscreen:k,isLoading:O,canAdjustPlaybackRate:F,updateLiveStatus:N}=zx({stream:e,availableQualities:t,initialQuality:n,autoPlay:o,liveThresholdSeconds:l,allowPlaybackRateForStream:d}),V=eS(L),z=tS(L,oe,N),G=nS(M),K=rS(t,W,r),he=oS(oe,U),D=sS(L,oe,N),Ee=p.map(we=>({value:we,label:`${Math.round(we*100)}%`})),Xe=f.map(we=>({value:we,label:`${we}x`})),ft=t.map(we=>({value:we.value,label:we.label})),qr=($==null?void 0:$.label)??"Auto",on=`${Math.round(w*100)}%`,sn=`${X}x`,an=oe&&I>0,Zr=Fx(m,h,v);return g.jsxs(_.Box,{ref:M,className:`${Ae.container} ${c||""}`.trim(),style:Zr,sx:{borderRadius:0,backgroundColor:y.palette.common.black,...u},children:[O&&g.jsx(_.Box,{className:Ae.loader,sx:{backgroundColor:y.palette.common.black},children:g.jsx(_.CircularProgress,{size:60,sx:{color:y.palette.primary.contrastText,width:{xs:"48px",sm:"60px"},height:{xs:"48px",sm:"60px"}}})}),g.jsx("video",{ref:L,className:Ae.video,autoPlay:o,playsInline:s,muted:i,poster:a,style:{transform:`scale(${w})`}}),b&&C&&g.jsx(_.Box,{sx:{position:"absolute",top:0,left:0,right:0,padding:{xs:"10px 12px",sm:"12px 16px"}},children:g.jsx(_.Typography,{variant:"body2",sx:{color:y.palette.common.white,fontWeight:500,fontSize:{xs:"12px",sm:"14px"},textShadow:"0 2px 8px rgba(0,0,0,0.8)"},children:C})}),q&&!E&&g.jsx(_.Box,{sx:{position:"absolute",bottom:16,left:20,zIndex:10},children:g.jsx(_.Box,{className:Ae.liveBadge,sx:{backgroundColor:Y.alpha(y.palette.common.white,.9),color:y.palette.common.black},component:"span","aria-live":"polite",children:"ao vivo"})}),g.jsxs(_.Box,{className:Ae.controlsOverlay,sx:{opacity:E?1:0,visibility:E?"visible":"hidden",transition:"opacity 0.3s ease, visibility 0.3s ease"},children:[S&&g.jsx(_.Box,{className:Ae.timeline,children:g.jsx(_.Slider,{size:"small",min:0,max:an?I:1,step:1,value:an?Q:0,disabled:!an,onChange:he,onChangeCommitted:D,"aria-label":"Linha do tempo do video",sx:{color:y.palette.common.white,"& .MuiSlider-thumb":{width:12,height:12,backgroundColor:y.palette.common.white},"& .MuiSlider-track":{border:"none",backgroundColor:y.palette.common.white},"& .MuiSlider-rail":{backgroundColor:Y.alpha(y.palette.common.white,.3),opacity:1}}})}),g.jsxs(_.Box,{className:Ae.controlsRow,children:[g.jsxs(_.Box,{className:Ae.controlGroup,children:[g.jsx(_.Box,{className:Ae.liveBadge,sx:{backgroundColor:q?Y.alpha(y.palette.common.white,.9):Y.alpha(y.palette.common.white,.15),color:q?y.palette.common.black:Y.alpha(y.palette.common.white,.7)},component:"span","aria-live":"polite",children:"ao vivo"}),g.jsx(_.Box,{className:Ae.seekButton,component:"button",onClick:()=>z(-15),"aria-label":"Voltar 15 segundos",sx:{backgroundColor:Y.alpha(y.palette.common.white,.15),color:y.palette.common.white,border:"none",cursor:"pointer","&:hover":{backgroundColor:Y.alpha(y.palette.common.white,.25)}},children:"15s"}),g.jsx(_.IconButton,{className:Ae.iconButton,onClick:()=>z(-15),"aria-label":"Recuar 15 segundos",sx:{backgroundColor:Y.alpha(y.palette.common.white,.15),color:y.palette.common.white,"&:hover":{backgroundColor:Y.alpha(y.palette.common.white,.25)}},children:g.jsx(Ve.FastRewind,{fontSize:"small"})}),g.jsx(_.IconButton,{className:Ae.iconButton,onClick:V,"aria-label":"Play/Pause",sx:{backgroundColor:Y.alpha(y.palette.common.white,.15),color:y.palette.common.white,"&:hover":{backgroundColor:Y.alpha(y.palette.common.white,.25)}},children:H?g.jsx(Ve.Pause,{fontSize:"small"}):g.jsx(Ve.PlayArrow,{fontSize:"small"})}),g.jsx(_.IconButton,{className:Ae.iconButton,onClick:()=>z(15),"aria-label":"Avançar 15 segundos",sx:{backgroundColor:Y.alpha(y.palette.common.white,.15),color:y.palette.common.white,"&:hover":{backgroundColor:Y.alpha(y.palette.common.white,.25)}},children:g.jsx(Ve.FastForward,{fontSize:"small"})}),g.jsx(_.Box,{className:Ae.seekButton,component:"button",onClick:()=>z(15),"aria-label":"Avançar 15 segundos",sx:{backgroundColor:Y.alpha(y.palette.common.white,.15),color:y.palette.common.white,border:"none",cursor:"pointer","&:hover":{backgroundColor:Y.alpha(y.palette.common.white,.25)}},children:"15s"})]}),g.jsxs(_.Box,{className:Ae.controlGroup,children:[g.jsx(_.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:Y.alpha(y.palette.common.white,.15),color:y.palette.common.white,"&:hover":{backgroundColor:Y.alpha(y.palette.common.white,.25)}}},children:g.jsx(_o,{label:"",valueLabel:sn,selectedValue:X,options:Xe,ariaLabel:"Selecionar velocidade de reprodução",onChange:R,disabled:!F})}),ft.length>0?g.jsx(_.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:Y.alpha(y.palette.common.white,.15),color:y.palette.common.white,"&:hover":{backgroundColor:Y.alpha(y.palette.common.white,.25)}}},children:g.jsx(_o,{label:"",valueLabel:qr,selectedValue:($==null?void 0:$.value)??"auto",options:ft,ariaLabel:"Selecionar qualidade do vídeo",onChange:K})}):null,g.jsx(_.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:Y.alpha(y.palette.common.white,.15),color:y.palette.common.white,"&:hover":{backgroundColor:Y.alpha(y.palette.common.white,.25)}}},children:g.jsx(_o,{label:"",valueLabel:on,selectedValue:w,options:Ee,ariaLabel:"Selecionar zoom do vídeo",onChange:j})}),g.jsx(_.IconButton,{className:Ae.iconButton,onClick:G,"aria-label":"Fullscreen",sx:{backgroundColor:Y.alpha(y.palette.common.white,.15),color:y.palette.common.white,"&:hover":{backgroundColor:Y.alpha(y.palette.common.white,.25)}},children:k?g.jsx(Ve.FullscreenExit,{fontSize:"small"}):g.jsx(Ve.Fullscreen,{fontSize:"small"})})]})]})]})]})};ed.displayName="VideoPlayer";const iS=dt(g.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"UndoOutlined"),aS=dt(g.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),cS=dt(g.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),lS="_root_1gj5n_1",uS="_container_1gj5n_6",dS="_header_1gj5n_13",fS="_headerText_1gj5n_21",hS="_controls_1gj5n_27",pS="_iconButton_1gj5n_34",mS="_zoomGroup_1gj5n_43",gS="_zoomTrack_1gj5n_52",yS="_zoomTrackFill_1gj5n_59",vS="_layers_1gj5n_67",bS="_timeScale_1gj5n_78",xS="_videoTrack_1gj5n_82",SS="_eventsTrack_1gj5n_86",TS="_trackBox_1gj5n_90",wS="_trackLabelRow_1gj5n_95",CS="_label_1gj5n_103",_S="_trackArea_1gj5n_112",ES="_tick_1gj5n_118",PS="_tickMajor_1gj5n_126",AS="_tickMinor_1gj5n_131",MS="_tickLabel_1gj5n_135",kS="_segment_1gj5n_146",RS="_event_1gj5n_86",OS="_eventDot_1gj5n_166",IS="_selectionOverlay_1gj5n_172",jS="_playhead_1gj5n_180",LS="_playheadLine_1gj5n_190",DS="_playheadHandle_1gj5n_199",J={root:lS,container:uS,header:dS,headerText:fS,controls:hS,iconButton:pS,zoomGroup:mS,zoomTrack:gS,zoomTrackFill:yS,layers:vS,timeScale:bS,videoTrack:xS,eventsTrack:SS,trackBox:TS,trackLabelRow:wS,label:CS,trackArea:_S,tick:ES,tickMajor:PS,tickMinor:AS,tickLabel:MS,segment:kS,event:RS,eventDot:OS,selectionOverlay:IS,playhead:jS,playheadLine:LS,playheadHandle:DS},at={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function td(e){return"init"in e}function cs(e){return!!e.write}function dc(e){return"v"in e||"e"in e}function Ar(e){if("e"in e)throw e.e;if((at?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const Mr=new WeakMap;function nd(e){var t;return kr(e)&&!!((t=Mr.get(e))!=null&&t[0])}function $S(e){const t=Mr.get(e);t!=null&&t[0]&&(t[0]=!1,t[1].forEach(n=>n()))}function ls(e,t){let n=Mr.get(e);if(!n){n=[!0,new Set],Mr.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)}function kr(e){return typeof(e==null?void 0:e.then)=="function"}function rd(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function od(e,t,n){var r;const o=new Set;for(const s of((r=n.get(e))==null?void 0:r.t)||[])o.add(s);for(const s of t.p)o.add(s);return o}const VS=(e,t,...n)=>t.read(...n),NS=(e,t,...n)=>t.write(...n),BS=(e,t)=>{if(t.INTERNAL_onInit)return t.INTERNAL_onInit(e);if(t.unstable_onInit)return console.warn("[DEPRECATED] atom.unstable_onInit is renamed to atom.INTERNAL_onInit."),t.unstable_onInit(e)},FS=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},zS=(e,t)=>{var n;const r=Ie(e),o=r[0],s=r[6],i=r[9];if((at?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let a=o.get(t);return a||(a={d:new Map,p:new Set,n:0},o.set(t,a),(n=s.i)==null||n.call(s,t),i==null||i(e,t)),a},WS=e=>{const t=Ie(e),n=t[1],r=t[3],o=t[4],s=t[5],i=t[6],a=t[13],c=[],u=l=>{try{l()}catch(d){c.push(d)}};do{i.f&&u(i.f);const l=new Set,d=l.add.bind(l);r.forEach(f=>{var p;return(p=n.get(f))==null?void 0:p.l.forEach(d)}),r.clear(),s.forEach(d),s.clear(),o.forEach(d),o.clear(),l.forEach(u),r.size&&a(e)}while(r.size||s.size||o.size);if(c.length)throw new AggregateError(c)},US=e=>{const t=Ie(e),n=t[1],r=t[2],o=t[3],s=t[11],i=t[14],a=t[17],c=[],u=new WeakSet,l=new WeakSet,d=Array.from(o);for(;d.length;){const f=d[d.length-1],p=s(e,f);if(l.has(f)){d.pop();continue}if(u.has(f)){if(r.get(f)===p.n)c.push([f,p]);else if((at?"production":void 0)!=="production"&&r.has(f))throw new Error("[Bug] invalidated atom exists");l.add(f),d.pop();continue}u.add(f);for(const m of od(f,p,n))u.has(m)||d.push(m)}for(let f=c.length-1;f>=0;--f){const[p,m]=c[f];let h=!1;for(const v of m.d.keys())if(v!==p&&o.has(v)){h=!0;break}h&&(i(e,p),a(e,p)),r.delete(p)}},us=new WeakSet,HS=(e,t)=>{var n,r;const o=Ie(e),s=o[1],i=o[2],a=o[3],c=o[6],u=o[7],l=o[11],d=o[12],f=o[13],p=o[14],m=o[16],h=o[17],v=o[20],b=l(e,t);if(dc(b)){if(s.has(t)&&i.get(t)!==b.n)return b;let M=!1;for(const[L,$]of b.d)if(p(e,L).n!==$){M=!0;break}if(!M)return b}b.d.clear();let S=!0;function y(){s.has(t)&&(h(e,t),f(e),d(e))}function C(M){var L;if(M===t){const W=l(e,M);if(!dc(W))if(td(M))v(e,M,M.init);else throw new Error("no atom init");return Ar(W)}const $=p(e,M);try{return Ar($)}finally{b.d.set(M,$.n),nd(b.v)&&rd(t,b.v,$),s.has(t)&&((L=s.get(M))==null||L.t.add(t)),S||y()}}let T,E;const P={get signal(){return T||(T=new AbortController),T.signal},get setSelf(){return(at?"production":void 0)!=="production"&&!cs(t)&&console.warn("setSelf function cannot be used with read-only atom"),!E&&cs(t)&&(E=(...M)=>{if((at?"production":void 0)!=="production"&&S&&console.warn("setSelf function cannot be called in sync"),!S)try{return m(e,t,...M)}finally{f(e),d(e)}}),E}},A=b.n;try{(at?"production":void 0)!=="production"&&us.delete(e);const M=u(e,t,C,P);return(at?"production":void 0)!=="production"&&us.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,t,M),kr(M)&&(ls(M,()=>T==null?void 0:T.abort()),M.then(y,y)),(n=c.r)==null||n.call(c,t),b}catch(M){return delete b.v,b.e=M,++b.n,b}finally{S=!1,A!==b.n&&i.get(t)===A&&(i.set(t,b.n),a.add(t),(r=c.c)==null||r.call(c,t))}},GS=(e,t)=>{const n=Ie(e),r=n[1],o=n[2],s=n[11],i=[t];for(;i.length;){const a=i.pop(),c=s(e,a);for(const u of od(a,c,r)){const l=s(e,u);o.set(u,l.n),i.push(u)}}},KS=(e,t,...n)=>{const r=Ie(e),o=r[3],s=r[6],i=r[8],a=r[11],c=r[12],u=r[13],l=r[14],d=r[15],f=r[16],p=r[17],m=r[20];let h=!0;const v=S=>Ar(l(e,S)),b=(S,...y)=>{var C;const T=a(e,S);try{if(S===t){if(!td(S))throw new Error("atom not writable");(at?"production":void 0)!=="production"&&us.add(e);const E=T.n,P=y[0];m(e,S,P),p(e,S),E!==T.n&&(o.add(S),d(e,S),(C=s.c)==null||C.call(s,S));return}else return f(e,S,...y)}finally{h||(u(e),c(e))}};try{return i(e,t,v,b,...n)}finally{h=!1}},YS=(e,t)=>{var n;const r=Ie(e),o=r[1],s=r[3],i=r[6],a=r[11],c=r[15],u=r[18],l=r[19],d=a(e,t),f=o.get(t);if(f&&!nd(d.v)){for(const[p,m]of d.d)if(!f.d.has(p)){const h=a(e,p);u(e,p).t.add(t),f.d.add(p),m!==h.n&&(s.add(p),c(e,p),(n=i.c)==null||n.call(i,p))}for(const p of f.d)if(!d.d.has(p)){f.d.delete(p);const m=l(e,p);m==null||m.t.delete(t)}}},qS=(e,t)=>{var n;const r=Ie(e),o=r[1],s=r[4],i=r[6],a=r[10],c=r[11],u=r[12],l=r[13],d=r[14],f=r[16],p=r[18],m=c(e,t);let h=o.get(t);if(!h){d(e,t);for(const v of m.d.keys())p(e,v).t.add(t);if(h={l:new Set,d:new Set(m.d.keys()),t:new Set},o.set(t,h),cs(t)){const v=()=>{let b=!0;const S=(...y)=>{try{return f(e,t,...y)}finally{b||(l(e),u(e))}};try{const y=a(e,t,S);y&&(h.u=()=>{b=!0;try{y()}finally{b=!1}})}finally{b=!1}};s.add(v)}(n=i.m)==null||n.call(i,t)}return h},ZS=(e,t)=>{var n,r;const o=Ie(e),s=o[1],i=o[5],a=o[6],c=o[11],u=o[19],l=c(e,t);let d=s.get(t);if(!d||d.l.size)return d;let f=!1;for(const p of d.t)if((n=s.get(p))!=null&&n.d.has(t)){f=!0;break}if(!f){d.u&&i.add(d.u),d=void 0,s.delete(t);for(const p of l.d.keys()){const m=u(e,p);m==null||m.t.delete(t)}(r=a.u)==null||r.call(a,t);return}return d},XS=(e,t,n)=>{const r=Ie(e)[11],o=r(e,t),s="v"in o,i=o.v;if(kr(n))for(const a of o.d.keys())rd(t,n,r(e,a));o.v=n,delete o.e,(!s||!Object.is(i,o.v))&&(++o.n,kr(i)&&$S(i))},JS=(e,t)=>{const n=Ie(e)[14];return Ar(n(e,t))},QS=(e,t,...n)=>{const r=Ie(e),o=r[12],s=r[13],i=r[16];try{return i(e,t,...n)}finally{s(e),o(e)}},e2=(e,t,n)=>{const r=Ie(e),o=r[12],s=r[18],i=r[19],c=s(e,t).l;return c.add(n),o(e),()=>{c.delete(n),i(e,t),o(e)}},sd=new WeakMap,Ie=e=>{const t=sd.get(e);if((at?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function t2(...e){const t={get(r){const o=Ie(t)[21];return o(t,r)},set(r,...o){const s=Ie(t)[22];return s(t,r,...o)},sub(r,o){const s=Ie(t)[23];return s(t,r,o)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},VS,NS,BS,FS,zS,WS,US,HS,GS,KS,YS,qS,ZS,XS,JS,QS,e2,void 0].map((r,o)=>e[o]||r);return sd.set(t,Object.freeze(n)),t}const id={};let n2=0;function rn(e,t){const n=`atom${++n2}`,r={toString(){return(id?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=r2,r.write=o2),r}function r2(e){return e(this)}function o2(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function s2(){return t2()}let pn;function i2(){return pn||(pn=s2(),(id?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=pn),globalThis.__JOTAI_DEFAULT_STORE__!==pn&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),pn}const a2={},c2=x.createContext(void 0);function ad(e){return x.useContext(c2)||i2()}const ds=e=>typeof(e==null?void 0:e.then)=="function",fs=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},l2=x.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(fs(e),e)}),Eo=new WeakMap,fc=(e,t)=>{let n=Eo.get(e);return n||(n=new Promise((r,o)=>{let s=e;const i=u=>l=>{s===u&&r(l)},a=u=>l=>{s===u&&o(l)},c=()=>{try{const u=t();ds(u)?(Eo.set(u,n),s=u,u.then(i(u),a(u)),ls(u,c)):r(u)}catch(u){o(u)}};e.then(i(e),a(e)),ls(e,c)}),Eo.set(e,n)),n};function Rr(e,t){const{delay:n,unstable_promiseStatus:r=!x.use}={},o=ad(),[[s,i,a],c]=x.useReducer(l=>{const d=o.get(e);return Object.is(l[0],d)&&l[1]===o&&l[2]===e?l:[d,o,e]},void 0,()=>[o.get(e),o,e]);let u=s;if((i!==o||a!==e)&&(c(),u=o.get(e)),x.useEffect(()=>{const l=o.sub(e,()=>{if(r)try{const d=o.get(e);ds(d)&&fs(fc(d,()=>o.get(e)))}catch{}if(typeof n=="number"){setTimeout(c,n);return}c()});return c(),l},[o,e,n,r]),x.useDebugValue(u),ds(u)){const l=fc(u,()=>o.get(e));return r&&fs(l),l2(l)}return u}function u2(e,t){const n=ad();return x.useCallback((...o)=>{if((a2?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...o)},[n,e])}function Wt(e,t){return[Rr(e),u2(e)]}const si=rn(0),ii=rn(!0),ai=rn(null),cd=rn({windowSeconds:24*60*60,fps:30}),ld=rn([]),ud=rn([]);function ve(e,t,n){return Math.min(n,Math.max(t,e))}function yt(e){const{time:t,windowStart:n,windowSeconds:r,width:o}=e;return o<=0||r<=0?0:(t-n)/r*o}function mn(e){const{px:t,windowStart:n,windowSeconds:r,width:o}=e;return o<=0||r<=0?n:n+t/o*r}function _e(e){return String(Math.floor(e)).padStart(2,"0")}function d2(e=Date.now()){const t=new Date(e);return t.getHours()*3600+t.getMinutes()*60+t.getSeconds()+t.getMilliseconds()/1e3}function Po(e){const t=Math.max(0,e),n=Math.floor(t/3600)%24,r=Math.floor(t%3600/60),o=Math.floor(t%60);return`${_e(n)}:${_e(r)}:${_e(o)}`}function f2(e,t){const n=Math.max(0,e),r=Math.floor(n/3600)%24,o=Math.floor(n%3600/60),s=Math.floor(n%60),i=n-Math.floor(n),a=Math.floor(i*t);return`${_e(r)}:${_e(o)}:${_e(s)}:${_e(a)}`}function Ao(e){const t=Math.max(0,e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=Math.floor(t%60);return n>0?`${_e(n)}:${_e(r)}:${_e(o)}`:`${_e(r)}:${_e(o)}`}function h2(e,t){const n=Math.max(0,e),r=Math.floor(n/3600),o=Math.floor(n%3600/60),s=Math.floor(n%60),i=n-Math.floor(n),a=Math.floor(i*t);return r>0?`${_e(r)}:${_e(o)}:${_e(s)}:${_e(a)}`:`${_e(o)}:${_e(s)}:${_e(a)}`}function p2(e){const{width:t,windowSeconds:n,fps:r}=e,o=t>0?t/n:0,s=1/Math.max(1,r),i=[s,2*s,5*s,.25,.5,1,2,5,10,15,30,60,2*60,5*60,10*60,15*60,30*60,60*60,2*60*60,3*60*60,6*60*60],a=90,c=45;let u=i[i.length-1];for(const f of i)if(f*o>=a){u=f;break}const l=[u/2,u/5,u/10].filter(f=>f>0);let d=l[0]??u;for(const f of l)if(f*o>=c){d=f;break}return{majorStep:u,minorStep:d}}const m2=(e,t,n)=>t>=3600?Po(e).slice(0,2)+":00:00":t>=60?Po(e).slice(0,5):t>=1?Po(e):f2(e,n),g2=(e,t,n)=>t>=3600||t>=60||t>=1?Ao(e):h2(e,n);function y2(){const e=x.useRef(null),[t,n]=x.useState(0);return x.useLayoutEffect(()=>{const r=e.current;if(!r)return;const o=new ResizeObserver(()=>{n(r.getBoundingClientRect().width)});return o.observe(r),n(r.getBoundingClientRect().width),()=>o.disconnect()},[]),{ref:e,width:t}}function v2(e){const{totalSeconds:t,enableWheelZoom:n,autoZoomOnSelection:r,tickLabelFormatter:o,clearSelectionOnEventClick:s}=e,[i,a]=Wt(si),[c,u]=Wt(ii),[l,d]=Wt(ai),f=Rr(ld),p=Rr(ud),[m,h]=Wt(cd),{ref:v,width:b}=y2(),S=102,C=Math.max(0,b-S-10),[T,E]=x.useState(0),P=x.useMemo(()=>{const k=Math.max(1/Math.max(1,m.fps),.05);return ve(m.windowSeconds,k,t)},[m.windowSeconds,m.fps,t]);x.useEffect(()=>{if(!c||b<=0)return;const k=ve(i-P*.9,0,Math.max(0,t-P));E(k)},[i,c,b,P,t]);const A=x.useMemo(()=>{const k=ve(T,0,Math.max(0,t-P)),O=k+P;return{start:k,end:O,seconds:P}},[T,t,P]),M=x.useMemo(()=>{if(C<=0)return[];const{majorStep:k,minorStep:O}=p2({width:C,windowSeconds:A.seconds,fps:m.fps}),F=Math.floor(A.start/O)*O,N=A.end,V=[],z=O*1e-6;for(let G=F;G<=N+z;G+=O){const K=yt({time:G,windowStart:A.start,windowSeconds:A.seconds,width:C});if(K<-1||K>C+1)continue;const he=Math.abs(G/k-Math.round(G/k))<1e-6;V.push({time:G,px:K,kind:he?"major":"minor",label:he?o(G,k,m.fps):void 0})}return V},[C,o,A.end,A.seconds,A.start,m.fps]),L=x.useRef(null),$=x.useRef(null),W=k=>{$.current=k,L.current==null&&(L.current=requestAnimationFrame(()=>{L.current=null;const O=$.current;$.current=null,O==null||O()}))};x.useEffect(()=>()=>{L.current!=null&&cancelAnimationFrame(L.current)},[]);const H=x.useRef(null),q=k=>{const O=v.current;if(!O)return 0;const F=O.getBoundingClientRect();return ve(k-F.left-S,0,C)};return{viewportRef:v,width:b,axisLeft:S,axisWidth:C,totalSeconds:t,zoom:m,setZoom:h,isLive:c,setIsLive:u,currentTime:i,selectedRange:l,setSelectedRange:d,videoSegments:f,events:p,view:A,ticks:M,onWheel:k=>{if(!n||b<=0)return;k.preventDefault(),u(!1);const O=q(k.clientX),F=ve(mn({px:O,windowStart:A.start,windowSeconds:A.seconds,width:C}),0,t),V=k.deltaY<0?.8:1.25,z=ve(A.seconds*V,Math.max(1/Math.max(1,m.fps),.05),t),G=ve(F-O/Math.max(1,C)*z,0,Math.max(0,t-z));h(K=>({...K,windowSeconds:z})),E(G)},onPointerDownScrub:k=>{if(k.button!==0)return;const O=v.current;if(!O)return;O.setPointerCapture(k.pointerId);const F=q(k.clientX),N=ve(mn({px:F,windowStart:A.start,windowSeconds:A.seconds,width:C}),0,t);u(!1),H.current={mode:"playhead",pointerId:k.pointerId,startPx:F,startTime:N},a(N)},onPointerDownSelect:k=>{if(k.button!==0)return;const O=v.current;if(!O)return;O.setPointerCapture(k.pointerId);const F=q(k.clientX),N=ve(mn({px:F,windowStart:A.start,windowSeconds:A.seconds,width:C}),0,t);u(!1),H.current={mode:"select",pointerId:k.pointerId,startPx:F,startTime:N},d({start:N,end:N})},onPointerDownPlayhead:k=>{if(k.button!==0)return;const O=v.current;if(!O)return;O.setPointerCapture(k.pointerId);const F=q(k.clientX),N=ve(mn({px:F,windowStart:A.start,windowSeconds:A.seconds,width:C}),0,t);u(!1),H.current={mode:"playhead",pointerId:k.pointerId,startPx:F,startTime:N},a(N)},onPointerMove:k=>{const O=H.current;if(!O||O.pointerId!==k.pointerId)return;const F=q(k.clientX);W(()=>{const N=ve(mn({px:F,windowStart:A.start,windowSeconds:A.seconds,width:C}),0,t);if(O.mode==="playhead")a(N);else{const V=Math.min(O.startTime,N),z=Math.max(O.startTime,N);d({start:V,end:z})}})},onPointerUp:k=>{const O=H.current;if(!(!O||O.pointerId!==k.pointerId)&&(H.current=null,O.mode==="select"&&l)){const F=Math.abs(l.end-l.start);if(F<Math.max(1/Math.max(1,m.fps),.1))d(null);else if(r){const N=ve(F*1.05,Math.max(1/Math.max(1,m.fps),.05),t),V=ve(l.start,0,Math.max(0,t-N));h(z=>({...z,windowSeconds:N})),E(V)}}},onClickEvent:k=>{s&&d(null),u(!1),a(ve(k,0,t)),E(ve(k-A.seconds/2,0,Math.max(0,t-A.seconds)))},resetView:()=>{u(!1),h(k=>({...k,windowSeconds:t})),E(0)}}}const dd=({ticks:e,tickColor:t,labelColor:n})=>g.jsx("div",{className:J.trackArea,children:e.map(r=>g.jsxs("div",{children:[g.jsx("div",{className:`${J.tick} ${r.kind==="minor"?J.tickMinor:J.tickMajor}`.trim(),style:{left:`${r.px}px`,backgroundColor:t}}),r.kind==="major"&&r.label?g.jsx("div",{className:J.tickLabel,style:{left:`${r.px}px`,color:n},children:r.label}):null]},`${r.time}-${r.kind}`))});dd.displayName="TimeScale";const fd=({segments:e,viewStart:t,viewSeconds:n,width:r,totalSeconds:o,segmentColor:s,segmentColorHover:i})=>{const a=e.map(c=>({start:ve(c.start,0,o),end:ve(c.end,0,o)})).filter(c=>c.end>c.start).map(c=>{const u=Math.max(c.start,t),l=Math.min(c.end,t+n);return{start:u,end:l}}).filter(c=>c.end>c.start);return g.jsx("div",{className:J.trackArea,children:a.map((c,u)=>{const l=yt({time:c.start,windowStart:t,windowSeconds:n,width:r}),d=yt({time:c.end,windowStart:t,windowSeconds:n,width:r}),f=Math.max(0,d-l);return g.jsx("div",{className:J.segment,style:{left:`${l}px`,width:`${f}px`,background:s},onMouseEnter:p=>{p.currentTarget.style.background=i},onMouseLeave:p=>{p.currentTarget.style.background=s},"aria-hidden":!0},`${c.start}-${c.end}-${u}`)})})};fd.displayName="VideoTrack";const hd=({events:e,viewStart:t,viewSeconds:n,width:r,totalSeconds:o,onClickEvent:s,eventBg:i,eventBgHover:a,eventDot:c})=>{const u=e.map(l=>({...l,time:ve(l.time,0,o)})).filter(l=>l.time>=t&&l.time<=t+n);return g.jsx("div",{className:J.trackArea,children:u.map(l=>{const d=yt({time:l.time,windowStart:t,windowSeconds:n,width:r});return g.jsx("button",{type:"button",className:J.event,onPointerDown:f=>{f.stopPropagation()},onClick:()=>s(l.time),style:{left:`${d}px`,backgroundColor:i,border:"none",padding:0},onMouseEnter:f=>{f.currentTarget.style.backgroundColor=a},onMouseLeave:f=>{f.currentTarget.style.backgroundColor=i},"aria-label":`Evento em ${l.time.toFixed(2)}s`,children:l.icon?l.icon:g.jsx("span",{className:J.eventDot,style:{backgroundColor:c}})},l.id)})})};hd.displayName="EventsTrack";const pd=({className:e,title:t="Timeline",subtitle:n="Arraste para selecionar e aplicar zoom no período desejado",showHeader:r=!0,timeScaleMode:o="day24h",tickLabelFormatter:s,totalSeconds:i=24*60*60,enableWheelZoom:a=!0,height:c=190,autoZoomOnSelection:u=!0,showZoomControls:l=!0,enableScrubOnTracks:d=!1,clearSelectionOnEventClick:f=!0})=>{const p=Y.useTheme(),m=s??(o==="duration"?g2:m2),{viewportRef:h,axisLeft:v,axisWidth:b,zoom:S,currentTime:y,selectedRange:C,videoSegments:T,events:E,view:P,ticks:A,onWheel:M,onPointerDownScrub:L,onPointerDownSelect:$,onPointerDownPlayhead:W,onPointerMove:H,onPointerUp:q,onClickEvent:oe,resetView:Q,setZoom:U}=v2({totalSeconds:i,enableWheelZoom:a,autoZoomOnSelection:u,tickLabelFormatter:m,clearSelectionOnEventClick:f}),I=b?v+yt({time:y,windowStart:P.start,windowSeconds:P.seconds,width:b}):v,X=p.palette.common.white,R=Y.alpha(p.palette.common.black,.16),w="0px 4px 5.3px 0px rgba(0,0,0,0.16)",j=p.palette.mode==="dark"?Y.alpha(p.palette.common.white,.7):"#79747e",k=Y.alpha(p.palette.common.black,.16),O="#2c2c2c",F=Y.alpha(p.palette.primary.main,.15),N=Y.alpha(p.palette.primary.main,.22),V=Y.alpha(p.palette.common.white,1),z=Y.alpha(p.palette.common.white,1),G=Y.alpha(p.palette.common.black,.55),K=Y.alpha(p.palette.primary.main,.12),he=p.palette.primary.main,D=Math.max(1/Math.max(1,S.fps),.5),Ee=D/i,Xe=(()=>{const on=ve(P.seconds,D,i);if(Ee<=0||Ee>=1)return 0;const sn=Math.log(on/i)/Math.log(Ee)*100;return ve(sn,0,100)})(),ft=on=>{const sn=ve(on,0,100),an=i*Math.pow(Ee,sn/100);U(Zr=>({...Zr,windowSeconds:ve(an,D,i)}))},qr=`${Math.round(Xe)}%`;return g.jsxs(_.Box,{className:`${J.root} ${J.container} ${e??""}`.trim(),sx:{backgroundColor:X,border:`1px solid ${R}`,boxShadow:w,px:1,py:2},children:[r?g.jsxs("div",{className:J.header,children:[g.jsxs("div",{className:J.headerText,children:[g.jsx(_.Typography,{variant:"subtitle1",sx:{color:j,fontWeight:500},children:t}),g.jsx(_.Typography,{variant:"body2",sx:{color:j},children:n})]}),l?g.jsxs("div",{className:J.controls,children:[g.jsx(_.Box,{className:J.iconButton,sx:{border:`1px solid ${Y.alpha(p.palette.common.black,.22)}`},children:g.jsx(_.IconButton,{size:"small",onClick:Q,"aria-label":"Reset zoom",sx:{width:32,height:32},children:g.jsx(iS,{fontSize:"small"})})}),g.jsxs(_.Box,{className:J.zoomGroup,sx:{backgroundColor:p.palette.common.white,border:`1px solid ${Y.alpha(p.palette.common.black,.22)}`},"aria-label":"Zoom controls",children:[g.jsx(_.IconButton,{size:"small","aria-label":"Zoom out",onClick:()=>ft(Xe-10),children:g.jsx(cS,{fontSize:"small"})}),g.jsxs("div",{className:J.zoomTrack,"aria-hidden":!0,children:[g.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:Y.alpha("#f5f5f5",.3),borderRadius:1,boxShadow:"1px 1px 1px rgba(10,10,10,0.04)"}}),g.jsx("div",{className:J.zoomTrackFill,style:{width:qr,backgroundColor:"#f5f5f5",boxShadow:"1px 1px 1px rgba(10,10,10,0.04)"}})]}),g.jsx(_.IconButton,{size:"small","aria-label":"Zoom in",onClick:()=>ft(Xe+10),children:g.jsx(aS,{fontSize:"small"})})]})]}):null]}):null,g.jsx(_.Box,{sx:{mt:r?2:0,height:c},children:g.jsxs("div",{ref:h,className:J.layers,onWheel:M,onPointerMove:H,onPointerUp:q,children:[g.jsxs("div",{className:J.playhead,style:{left:`${I}px`},onPointerDown:W,role:"slider","aria-label":"Playhead","aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":y,tabIndex:0,children:[g.jsx("div",{className:J.playheadHandle,style:{borderBottomColor:he}}),g.jsx("div",{className:J.playheadLine,style:{backgroundColor:he}})]}),g.jsxs("div",{className:`${J.trackLabelRow} ${J.timeScale}`.trim(),children:[g.jsx("div",{}),g.jsx("div",{onPointerDown:L,style:{height:"100%",cursor:"ew-resize"},"aria-label":"Régua do tempo",children:g.jsx(dd,{ticks:A,tickColor:k,labelColor:O})})]}),g.jsxs(_.Box,{className:J.trackBox,sx:{mt:1,border:`1px solid ${Y.alpha(p.palette.common.black,.1)}`,borderRadius:"12px",height:106,position:"relative"},children:[C?g.jsx("div",{className:J.selectionOverlay,style:{left:`${v+yt({time:C.start,windowStart:P.start,windowSeconds:P.seconds,width:b})}px`,width:`${Math.max(0,yt({time:C.end,windowStart:P.start,windowSeconds:P.seconds,width:b})-yt({time:C.start,windowStart:P.start,windowSeconds:P.seconds,width:b}))}px`,backgroundColor:K}}):null,g.jsxs("div",{className:`${J.trackLabelRow} ${J.videoTrack}`.trim(),children:[g.jsx("div",{className:J.label,style:{color:j},children:"Video"}),g.jsx("div",{onPointerDown:d?L:void 0,style:{height:"100%"},children:g.jsx(fd,{segments:T,viewStart:P.start,viewSeconds:P.seconds,width:b,totalSeconds:i,segmentColor:F,segmentColorHover:N})})]}),g.jsxs("div",{className:`${J.trackLabelRow} ${J.eventsTrack}`.trim(),children:[g.jsx("div",{className:J.label,style:{color:j},children:"Eventos"}),g.jsx("div",{onPointerDown:d?L:void 0,style:{height:"100%"},children:g.jsx(hd,{events:E,viewStart:P.start,viewSeconds:P.seconds,width:b,totalSeconds:i,onClickEvent:oe,eventBg:V,eventBgHover:z,eventDot:G})})]}),g.jsx("div",{onPointerDown:$,style:{position:"absolute",left:v,right:10,top:0,bottom:0,cursor:"crosshair"},"aria-label":"Arraste para selecionar"})]})]})})]})};pd.displayName="VideoTimeline";const md=({stream:e=null,src:t,autoPlay:n=!0,muted:r=!0,playsInline:o=!0,className:s,liveEdgeThresholdSeconds:i=2,updateTimeForLiveStream:a=!0,constrainToSelectedRange:c=!0,loopSelection:u=!1})=>{const l=x.useRef(null),[d,f]=Wt(si),[p,m]=Wt(ii),h=Rr(ai),v=!!e;x.useEffect(()=>{const y=l.current;if(y){if(e){y.srcObject=e;return}y.srcObject=null,t&&(y.src=t)}},[e,t]),x.useEffect(()=>{const y=l.current;if(!y||v)return;const C=()=>{if(c&&h){const P=Math.max(0,h.start),A=Math.max(P,h.end);y.currentTime<P?y.currentTime=P:y.currentTime>A&&(u?y.currentTime=P:(y.pause(),y.currentTime=A))}if(f(y.currentTime),Number.isFinite(y.duration)&&y.duration>0){const P=y.duration-y.currentTime<=i;m(P)}},T=()=>{if(!c||!h)return;const P=Math.max(0,h.start),A=Math.max(P,h.end);(y.currentTime<P||y.currentTime>A)&&(y.currentTime=P)},E=()=>{p&&Number.isFinite(y.duration)&&y.duration>0&&(y.currentTime=y.duration)};return y.addEventListener("timeupdate",C),y.addEventListener("play",T),y.addEventListener("loadedmetadata",E),()=>{y.removeEventListener("timeupdate",C),y.removeEventListener("play",T),y.removeEventListener("loadedmetadata",E)}},[c,v,p,i,u,h,f,m]);const b=x.useRef(-1);x.useEffect(()=>{const y=l.current;if(!y||v||!t)return;if(p){if(Number.isFinite(y.duration)&&y.duration>0){const T=y.duration;Math.abs(y.currentTime-T)>.25&&(y.currentTime=T,b.current=T)}return}if(Math.abs(b.current-d)<.05)return;let C=d;if(c&&h){const T=Math.max(0,h.start),E=Math.max(T,h.end);C=Math.min(E,Math.max(T,C))}Math.abs(y.currentTime-C)>.25&&(y.currentTime=C,b.current=d)},[c,d,p,v,h,t]),x.useEffect(()=>{const y=l.current;if(!y||v||!t||!c||!h)return;const C=Math.max(0,h.start),T=!y.paused;y.currentTime=C,b.current=C,m(!1),f(C),T&&y.play().catch(()=>{})},[c,v,h,f,m,t]),x.useEffect(()=>{if(!v||(m(!0),!a))return;let y=null,C=!0;const T=()=>{C&&(f(d2()),y=requestAnimationFrame(T))};return y=requestAnimationFrame(T),()=>{C=!1,y!=null&&cancelAnimationFrame(y)}},[v,f,m,a]);const S=x.useMemo(()=>({width:"100%",maxWidth:920,background:"black",aspectRatio:"16 / 9",display:"block"}),[]);return g.jsx("video",{ref:l,className:s,style:S,autoPlay:n,muted:r,playsInline:o,controls:!0})};md.displayName="VideoPlayerWebRTC";const b2=dt(g.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),x2="_container_1vjy6_1",S2="_segment_1vjy6_7",T2="_selected_1vjy6_20",w2="_label_1vjy6_28",C2="_icon_1vjy6_37",_2="_checkIcon_1vjy6_47",E2="_unselected_1vjy6_53",Et={container:x2,segment:S2,selected:T2,label:w2,icon:C2,checkIcon:_2,unselected:E2},gd=({items:e,className:t,sx:n,...r})=>{const s=_.useTheme().palette.mode==="dark",i=(a,c)=>{a.onClick?a.onClick(c):console.log(`Item "${a.label}" clicado`)};return g.jsx(_.Box,{className:`${Et.container} ${t||""}`,sx:n,"data-theme":s?"dark":"light",...r,children:e.map((a,c)=>g.jsxs(_.Box,{className:`${Et.segment} ${a.selected?Et.selected:Et.unselected}`,onClick:u=>i(a,u),children:[a.selected&&g.jsx(_.Box,{className:Et.icon,children:g.jsx(b2,{className:Et.checkIcon})}),g.jsx(_.Box,{className:Et.label,children:a.label})]},c))})};gd.displayName="DisplayTypes";exports.Button=hs;exports.CountCard=fg;exports.DisplayTypes=gd;exports.FilterButton=xc;exports.FilterChip=Sc;exports.FilterModal=Qc;exports.GoogleMap=ll;exports.MapContent=Cs;exports.MapMarkers=Yu;exports.MapSpot=ri;exports.ModuleMenu=Qu;exports.NotFoundContent=Zu;exports.SearchBar=qu;exports.SidebarMenu=Ju;exports.VideoPlayer=ed;exports.VideoPlayerWebRTC=md;exports.VideoTimeline=pd;exports.VisioThemeProvider=Md;exports.ZoomControls=bg;exports.currentTimeAtom=si;exports.darkColors=me;exports.darkTheme=yc;exports.eventsAtom=ud;exports.isLiveAtom=ii;exports.lightColors=pe;exports.lightTheme=gc;exports.radiiTokens=rr;exports.selectedRangeAtom=ai;exports.spacingScale=Ed;exports.spacingTokens=pc;exports.typographyTokens=Pe;exports.useGoogleMapContext=cl;exports.useVisioTheme=kd;exports.videoSegmentsAtom=ld;exports.zoomAtom=cd;
|
|
91
99
|
//# sourceMappingURL=index.cjs.js.map
|